From owner-svn-src-all@freebsd.org Sun Jun 28 00:29:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 92CBD338802; Sun, 28 Jun 2020 00:29:21 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vWhd3Q5Rz4dcG; Sun, 28 Jun 2020 00:29:21 +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 706D8DBB1; Sun, 28 Jun 2020 00:29:21 +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 05S0TLlP047208; Sun, 28 Jun 2020 00:29:21 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05S0TLd7047207; Sun, 28 Jun 2020 00:29:21 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202006280029.05S0TLd7047207@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 28 Jun 2020 00:29:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362711 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 362711 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 00:29:21 -0000 Author: kib Date: Sun Jun 28 00:29:21 2020 New Revision: 362711 URL: https://svnweb.freebsd.org/changeset/base/362711 Log: top: do not try to use sysctl machdep.smp_active. The sysctl was removed by r76078 in 2001. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/usr.bin/top/machine.c Modified: head/usr.bin/top/machine.c ============================================================================== --- head/usr.bin/top/machine.c Sat Jun 27 22:51:15 2020 (r362710) +++ head/usr.bin/top/machine.c Sun Jun 28 00:29:21 2020 (r362711) @@ -282,10 +282,7 @@ machine_init(struct statics *statics) size_t size; size = sizeof(smpmode); - if ((sysctlbyname("machdep.smp_active", &smpmode, &size, - NULL, 0) != 0 && - sysctlbyname("kern.smp.active", &smpmode, &size, - NULL, 0) != 0) || + if (sysctlbyname("kern.smp.active", &smpmode, &size, NULL, 0) != 0 || size != sizeof(smpmode)) smpmode = 0; From owner-svn-src-all@freebsd.org Sun Jun 28 00:55:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6515C338A74; Sun, 28 Jun 2020 00:55:18 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vXGZ1qw2z4flT; Sun, 28 Jun 2020 00:55:18 +0000 (UTC) (envelope-from rmacklem@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 3A175E228; Sun, 28 Jun 2020 00:55:18 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05S0tIhW065795; Sun, 28 Jun 2020 00:55:18 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05S0tIET065794; Sun, 28 Jun 2020 00:55:18 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202006280055.05S0tIET065794@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 28 Jun 2020 00:55:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362712 - stable/11/usr.sbin/mountd X-SVN-Group: stable-11 X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: stable/11/usr.sbin/mountd X-SVN-Commit-Revision: 362712 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 00:55:18 -0000 Author: rmacklem Date: Sun Jun 28 00:55:17 2020 New Revision: 362712 URL: https://svnweb.freebsd.org/changeset/base/362712 Log: MFC: r361780, r361956 Fix mountd to handle getgrouplist() not returning groups[0] == groups[1]. Prior to r174547, getgrouplist(3) always returned a groups list with element 0 and 1 set to the basegid argument, so long as ngroups was > 1. Post-r174547 this is not the case. r328304 disabled the deduplication that removed the duplicate, but the duplicate still does not occur unless the group for a user in the password database is also entered in the group database. This patch fixes mountd so that it handles the case where a user specified with the -maproot or -mapall exports option has a getgrouplist(3) groups list where groups[0] != groups[1]. Modified: stable/11/usr.sbin/mountd/mountd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/mountd/mountd.c ============================================================================== --- stable/11/usr.sbin/mountd/mountd.c Sun Jun 28 00:29:21 2020 (r362711) +++ stable/11/usr.sbin/mountd/mountd.c Sun Jun 28 00:55:17 2020 (r362712) @@ -3437,10 +3437,18 @@ parsecred(char *namelist, struct xucred *cr) /* * Compress out duplicate. */ - cr->cr_ngroups = ngroups - 1; cr->cr_groups[0] = groups[0]; - for (cnt = 2; cnt < ngroups; cnt++) - cr->cr_groups[cnt - 1] = groups[cnt]; + if (ngroups > 1 && groups[0] == groups[1]) { + cr->cr_ngroups = ngroups - 1; + for (cnt = 2; cnt < ngroups; cnt++) + cr->cr_groups[cnt - 1] = groups[cnt]; + } else { + cr->cr_ngroups = ngroups; + if (cr->cr_ngroups > XU_NGROUPS) + cr->cr_ngroups = XU_NGROUPS; + for (cnt = 1; cnt < cr->cr_ngroups; cnt++) + cr->cr_groups[cnt] = groups[cnt]; + } return; } /* From owner-svn-src-all@freebsd.org Sun Jun 28 01:29:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 89AD133A6D3; Sun, 28 Jun 2020 01:29:15 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vY1l37QTz3T5Q; Sun, 28 Jun 2020 01:29:15 +0000 (UTC) (envelope-from rmacklem@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 66B62E463; Sun, 28 Jun 2020 01:29:15 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05S1TFKH084630; Sun, 28 Jun 2020 01:29:15 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05S1TF7t084629; Sun, 28 Jun 2020 01:29:15 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202006280129.05S1TF7t084629@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 28 Jun 2020 01:29:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362713 - stable/12/usr.sbin/mountd X-SVN-Group: stable-12 X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: stable/12/usr.sbin/mountd X-SVN-Commit-Revision: 362713 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 01:29:15 -0000 Author: rmacklem Date: Sun Jun 28 01:29:14 2020 New Revision: 362713 URL: https://svnweb.freebsd.org/changeset/base/362713 Log: MFC: r361854 Fix mountd so that it will not lose SIGHUPs that indicate "reload exports". Without this patch, if a SIGHUP is handled while the process is executing get_exportlist(), that SIGHUP is essentially ignored because the got_sighup variable is reset to 0 after get_exportlist(). This results in the exports file(s) not being reloaded until another SIGHUP signal is sent to mountd. This patch fixes this by resetting got_sighup to zero before the get_exportlist() call while SIGHUP is blocked. It also defines a delay time of 250msec before doing another exports reload if there are RPC request(s) to process. This prevents repeated exports reloads from delaying handling of RPC requests significantly. PR: 246597 Modified: stable/12/usr.sbin/mountd/mountd.c Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/mountd/mountd.c ============================================================================== --- stable/12/usr.sbin/mountd/mountd.c Sun Jun 28 00:55:17 2020 (r362712) +++ stable/12/usr.sbin/mountd/mountd.c Sun Jun 28 01:29:14 2020 (r362713) @@ -184,6 +184,12 @@ struct fhreturn { #define GETPORT_MAXTRY 20 /* Max tries to get a port # */ +/* + * How long to delay a reload of exports when there are RPC request(s) + * to process, in usec. Must be less than 1second. + */ +#define RELOADDELAY 250000 + /* Global defs */ static char *add_expdir(struct dirlist **, char *, int); static void add_dlist(struct dirlist **, struct dirlist *, @@ -410,6 +416,10 @@ main(int argc, char **argv) int maxrec = RPC_MAXDATASIZE; int attempt_cnt, port_len, port_pos, ret; char **port_list; + uint64_t curtime, nexttime; + struct timeval tv; + struct timespec tp; + sigset_t sighup_mask; /* Check that another mountd isn't already running. */ pfh = pidfile_open(_PATH_MOUNTDPID, 0600, &otherpid); @@ -665,19 +675,49 @@ main(int argc, char **argv) } /* Expand svc_run() here so that we can call get_exportlist(). */ + curtime = nexttime = 0; + sigemptyset(&sighup_mask); + sigaddset(&sighup_mask, SIGHUP); for (;;) { - if (got_sighup) { - get_exportlist(1); + clock_gettime(CLOCK_MONOTONIC, &tp); + curtime = tp.tv_sec; + curtime = curtime * 1000000 + tp.tv_nsec / 1000; + sigprocmask(SIG_BLOCK, &sighup_mask, NULL); + if (got_sighup && curtime >= nexttime) { got_sighup = 0; - } + sigprocmask(SIG_UNBLOCK, &sighup_mask, NULL); + get_exportlist(1); + clock_gettime(CLOCK_MONOTONIC, &tp); + nexttime = tp.tv_sec; + nexttime = nexttime * 1000000 + tp.tv_nsec / 1000 + + RELOADDELAY; + } else + sigprocmask(SIG_UNBLOCK, &sighup_mask, NULL); + + /* + * If a reload is pending, poll for received request(s), + * otherwise set a RELOADDELAY timeout, since a SIGHUP + * could be processed between the got_sighup test and + * the select() system call. + */ + tv.tv_sec = 0; + if (got_sighup) + tv.tv_usec = 0; + else + tv.tv_usec = RELOADDELAY; readfds = svc_fdset; - switch (select(svc_maxfd + 1, &readfds, NULL, NULL, NULL)) { + switch (select(svc_maxfd + 1, &readfds, NULL, NULL, &tv)) { case -1: - if (errno == EINTR) - continue; + if (errno == EINTR) { + /* Allow a reload now. */ + nexttime = 0; + continue; + } syslog(LOG_ERR, "mountd died: select: %m"); exit(1); case 0: + /* Allow a reload now. */ + nexttime = 0; continue; default: svc_getreqset(&readfds); From owner-svn-src-all@freebsd.org Sun Jun 28 02:26:44 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B82F633C894; Sun, 28 Jun 2020 02:26:44 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vZJ44RhZz3WNm; Sun, 28 Jun 2020 02:26:44 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qv1-f42.google.com (mail-qv1-f42.google.com [209.85.219.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 8E97926C2E; Sun, 28 Jun 2020 02:26:44 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qv1-f42.google.com with SMTP id el4so2125040qvb.13; Sat, 27 Jun 2020 19:26:44 -0700 (PDT) X-Gm-Message-State: AOAM532zXkokzGjLs35EXu+Sl++TuHwxOzwXaBv20vmRgkq7hlGOzB5n v2b64PlOwStPUiIvPxN2YlViNwtIECitkT/EWp8= X-Google-Smtp-Source: ABdhPJxBfqscDhpuzV4OOvX//ZJdjKN0HzmjuUWgvFIc5dPCM7jqmWa/AEnKe0mFsdUan4PAwWc7dmPxoW+1H9+MdPM= X-Received: by 2002:a0c:9ba0:: with SMTP id o32mr9645871qve.129.1593311203998; Sat, 27 Jun 2020 19:26:43 -0700 (PDT) MIME-Version: 1.0 References: <202006272251.05RMpGxH086999@repo.freebsd.org> <1c896bbe-7a85-bc76-5163-cf83a0c39b8e@FreeBSD.org> In-Reply-To: <1c896bbe-7a85-bc76-5163-cf83a0c39b8e@FreeBSD.org> From: Kyle Evans Date: Sat, 27 Jun 2020 21:26:31 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r362710 - stable/11/usr.bin/sed/tests To: Mateusz Piotrowski <0mp@freebsd.org> Cc: src-committers , svn-src-all , svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 02:26:44 -0000 On Sat, Jun 27, 2020 at 6:32 PM Mateusz Piotrowski <0mp@freebsd.org> wrote: > > On 6/28/20 1:28 AM, Kyle Evans wrote: > > (sorry, still on mobile) > > Please restore escape_subst...as per my last email, it was only hex_subst that needed to go away. The former was already there. > > On Sat, Jun 27, 2020, 17:51 Mateusz Piotrowski <0mp@freebsd.org> wrote: >> >> Author: 0mp (doc,ports committer) >> Date: Sat Jun 27 22:51:15 2020 >> New Revision: 362710 >> URL: https://svnweb.freebsd.org/changeset/base/362710 >> >> Log: >> Disable mismerged tests committed in r362687 >> >> Reported by: lwhsu >> >> Modified: >> stable/11/usr.bin/sed/tests/sed2_test.sh >> >> Modified: stable/11/usr.bin/sed/tests/sed2_test.sh >> ============================================================================== >> --- stable/11/usr.bin/sed/tests/sed2_test.sh Sat Jun 27 21:37:48 2020 (r362709) >> +++ stable/11/usr.bin/sed/tests/sed2_test.sh Sat Jun 27 22:51:15 2020 (r362710) >> @@ -92,7 +92,5 @@ atf_init_test_cases() >> atf_add_test_case inplace_command_q >> atf_add_test_case inplace_hardlink_src >> atf_add_test_case inplace_symlink_src >> - atf_add_test_case escape_subst >> atf_add_test_case commands_on_stdin >> - atf_add_test_case hex_subst >> } > > I've tested the change and atf_add_test_case escape_subst was also failing... > > Would you like me to bring back escape_subst? Back at a machine, I see now that I looked at the wrong commit and apparently did infact not merge \r, \n, and \t back, so this was my bad -- these tests are now as they should be as of this commit, sorry about that. Thanks! Kyle Evans From owner-svn-src-all@freebsd.org Sun Jun 28 02:29:54 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 33D9033C930; Sun, 28 Jun 2020 02:29:54 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vZMk0f3Wz3WZQ; Sun, 28 Jun 2020 02:29:54 +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 116FBF4D8; Sun, 28 Jun 2020 02:29:54 +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 05S2Tr5k021198; Sun, 28 Jun 2020 02:29:53 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05S2Trgn021197; Sun, 28 Jun 2020 02:29:53 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202006280229.05S2Trgn021197@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 28 Jun 2020 02:29:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362714 - stable/12/usr.bin/sed/tests X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/12/usr.bin/sed/tests X-SVN-Commit-Revision: 362714 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 02:29:54 -0000 Author: kevans Date: Sun Jun 28 02:29:53 2020 New Revision: 362714 URL: https://svnweb.freebsd.org/changeset/base/362714 Log: Fix mismerge from r362687 Hex substitutions and the corresponding test case have not yet been merged back to this branch, but a mismerge added in the atf_add_test_case. Back out that line, it'll get re-added with the test shortly. Modified: stable/12/usr.bin/sed/tests/sed2_test.sh Modified: stable/12/usr.bin/sed/tests/sed2_test.sh ============================================================================== --- stable/12/usr.bin/sed/tests/sed2_test.sh Sun Jun 28 01:29:14 2020 (r362713) +++ stable/12/usr.bin/sed/tests/sed2_test.sh Sun Jun 28 02:29:53 2020 (r362714) @@ -113,5 +113,4 @@ atf_init_test_cases() atf_add_test_case inplace_symlink_src atf_add_test_case escape_subst atf_add_test_case commands_on_stdin - atf_add_test_case hex_subst } From owner-svn-src-all@freebsd.org Sun Jun 28 02:38:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0276E33CCB0; Sun, 28 Jun 2020 02:38: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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vZYC6GCTz3WyJ; Sun, 28 Jun 2020 02:38:07 +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 D1B3AF4F2; Sun, 28 Jun 2020 02:38:07 +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 05S2c7Yl027254; Sun, 28 Jun 2020 02:38:07 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05S2c7hA027252; Sun, 28 Jun 2020 02:38:07 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202006280238.05S2c7hA027252@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Sun, 28 Jun 2020 02:38:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362715 - in stable/12/usr.bin/sed: . tests X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/12/usr.bin/sed: . tests X-SVN-Commit-Revision: 362715 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 02:38:08 -0000 Author: kevans Date: Sun Jun 28 02:38:07 2020 New Revision: 362715 URL: https://svnweb.freebsd.org/changeset/base/362715 Log: MFC r361884: sed: attempt to learn about hex escapes (e.g. \x27) Somewhat predictably, software often wants to use \x27/\x24 among others so that they can decline worrying about ugly escaping, if said escaping is even possible. Right now, this software is using these and getting the wrong results, as we'll interpret those as x27 and x24 respectively. Some examples of this, when an exp-run was ran, were science/octopus and misc/vifm. Go ahead and process these at all times. We allow either one or two digits, and the tests account for both. If extra digits are specified, e.g. \x2727, then the third and fourth digits are interpreted literally as one might expect. Modified: stable/12/usr.bin/sed/compile.c stable/12/usr.bin/sed/tests/sed2_test.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/sed/compile.c ============================================================================== --- stable/12/usr.bin/sed/compile.c Sun Jun 28 02:29:53 2020 (r362714) +++ stable/12/usr.bin/sed/compile.c Sun Jun 28 02:38:07 2020 (r362715) @@ -49,6 +49,7 @@ static const char sccsid[] = "@(#)compile.c 8.1 (Berke #include #include #include +#include #include #include #include @@ -365,6 +366,51 @@ nonsel: /* Now parse the command */ } } +static int +hex2char(const char *in, char *out, int len) +{ + long ord; + char *endptr, hexbuf[3]; + + hexbuf[0] = in[0]; + hexbuf[1] = len > 1 ? in[1] : '\0'; + hexbuf[2] = '\0'; + + errno = 0; + ord = strtol(hexbuf, &endptr, 16); + if (*endptr != '\0' || errno != 0) + return (ERANGE); + *out = (char)ord; + return (0); +} + +static bool +hexdigit(char c) +{ + int lc; + + lc = tolower(c); + return isdigit(lc) || (lc >= 'a' && lc <= 'f'); +} + +static bool +dohex(const char *in, char *out, int *len) +{ + int tmplen; + + if (!hexdigit(in[0])) + return (false); + tmplen = 1; + if (hexdigit(in[1])) + ++tmplen; + if (hex2char(in, out, tmplen) == 0) { + *len = tmplen; + return (true); + } + + return (false); +} + /* * Get a delimited string. P points to the delimiter of the string; d points * to a buffer area. Newline and delimiter escapes are processed; other @@ -377,6 +423,7 @@ nonsel: /* Now parse the command */ static char * compile_delimited(char *p, char *d, int is_tr) { + int hexlen; char c; c = *p++; @@ -412,6 +459,12 @@ compile_delimited(char *p, char *d, int is_tr) } p += 2; continue; + } else if (*p == '\\' && p[1] == 'x') { + if (dohex(&p[2], d, &hexlen)) { + ++d; + p += hexlen + 2; + continue; + } } else if (*p == '\\' && p[1] == '\\') { if (is_tr) p++; @@ -431,7 +484,7 @@ compile_delimited(char *p, char *d, int is_tr) static char * compile_ccl(char **sp, char *t) { - int c, d; + int c, d, hexlen; char *s = *sp; *t++ = *s++; @@ -459,6 +512,10 @@ compile_ccl(char **sp, char *t) *t = '\t'; s++; break; + case 'x': + if (dohex(&s[2], t, &hexlen)) + s += hexlen + 1; + break; } } } @@ -499,7 +556,7 @@ static char * compile_subst(char *p, struct s_subst *s) { static char lbuf[_POSIX2_LINE_MAX + 1]; - int asize, size; + int asize, hexlen, size; u_char ref; char c, *text, *op, *sp; int more = 1, sawesc = 0; @@ -562,6 +619,21 @@ compile_subst(char *p, struct s_subst *s) break; case 't': *p = '\t'; + break; + case 'x': +#define ADVANCE_N(s, n) \ + do { \ + char *adv = (s); \ + while (*(adv + (n) - 1) != '\0') { \ + *adv = *(adv + (n)); \ + ++adv; \ + } \ + *adv = '\0'; \ + } while (0); + if (dohex(&p[1], p, &hexlen)) { + ADVANCE_N(p + 1, + hexlen); + } break; } } Modified: stable/12/usr.bin/sed/tests/sed2_test.sh ============================================================================== --- stable/12/usr.bin/sed/tests/sed2_test.sh Sun Jun 28 02:29:53 2020 (r362714) +++ stable/12/usr.bin/sed/tests/sed2_test.sh Sun Jun 28 02:38:07 2020 (r362715) @@ -88,6 +88,34 @@ escape_subst_body() atf_check -o 'inline:abcx\n' sed 's/[ \r\t]//g' c } +atf_test_case hex_subst +hex_subst_head() +{ + atf_set "descr" "Verify proper conversion of hex escapes" +} +hex_subst_body() +{ + printf "test='foo'" > a + printf "test='27foo'" > b + printf "\rn" > c + printf "xx" > d + + atf_check -o 'inline:test="foo"' sed 's/\x27/"/g' a + atf_check -o "inline:'test'='foo'" sed 's/test/\x27test\x27/g' a + + # Make sure we take trailing digits literally. + atf_check -o "inline:test=\"foo'" sed 's/\x2727/"/g' b + + # Single digit \x should work as well. + atf_check -o "inline:xn" sed 's/\xd/x/' c + + # Invalid digit should cause us to ignore the sequence. This test + # invokes UB, escapes of an ordinary character. A future change will + # make regex(3) on longer tolerate this and we'll need to adjust what + # we're doing, but for now this will suffice. + atf_check -o "inline:" sed 's/\xx//' d +} + atf_test_case commands_on_stdin commands_on_stdin_head() { @@ -112,5 +140,6 @@ atf_init_test_cases() atf_add_test_case inplace_hardlink_src atf_add_test_case inplace_symlink_src atf_add_test_case escape_subst + atf_add_test_case hex_subst atf_add_test_case commands_on_stdin } From owner-svn-src-all@freebsd.org Sun Jun 28 03:28:32 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5234B33DAE2; Sun, 28 Jun 2020 03:28:32 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vbgN1cTFz3YlK; Sun, 28 Jun 2020 03:28:32 +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 3240E1010D; Sun, 28 Jun 2020 03:28:32 +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 05S3SWnf058638; Sun, 28 Jun 2020 03:28:32 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05S3STdQ058628; Sun, 28 Jun 2020 03:28:29 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202006280328.05S3STdQ058628@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 28 Jun 2020 03:28:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362716 - in stable: 11/contrib/ntp 11/contrib/ntp/html/drivers 11/contrib/ntp/include 11/contrib/ntp/lib/isc/win32/include/isc 11/contrib/ntp/libntp 11/contrib/ntp/ntpd 11/contrib/ntp/... X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/contrib/ntp 11/contrib/ntp/html/drivers 11/contrib/ntp/include 11/contrib/ntp/lib/isc/win32/include/isc 11/contrib/ntp/libntp 11/contrib/ntp/ntpd 11/contrib/ntp/ntpdate 11/contrib/ntp/nt... X-SVN-Commit-Revision: 362716 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 03:28:32 -0000 Author: cy Date: Sun Jun 28 03:28:28 2020 New Revision: 362716 URL: https://svnweb.freebsd.org/changeset/base/362716 Log: MFC r362568: MFV r362565: Update 4.2.8p14 --> 4.2.8p15 Summary: Systems that use a CMAC algorithm in ntp.keys will not release a bit of memory on each packet that uses a CMAC keyid, eventually causing ntpd to run out of memory and fail. The CMAC cleanup from https://bugs.ntp.org/3447, part of ntp-4.2.8p11, introduced a bug whereby the CMAC data structure was no longer completely removed. Security: NTP Bug 3661 Modified: stable/11/contrib/ntp/ChangeLog stable/11/contrib/ntp/CommitLog stable/11/contrib/ntp/NEWS stable/11/contrib/ntp/config.h.in stable/11/contrib/ntp/configure stable/11/contrib/ntp/configure.ac stable/11/contrib/ntp/html/drivers/driver40-ja.html stable/11/contrib/ntp/html/drivers/driver40.html stable/11/contrib/ntp/include/l_stdlib.h stable/11/contrib/ntp/include/ntp.h stable/11/contrib/ntp/include/ntp_config.h stable/11/contrib/ntp/include/recvbuff.h stable/11/contrib/ntp/lib/isc/win32/include/isc/int.h stable/11/contrib/ntp/libntp/a_md5encrypt.c stable/11/contrib/ntp/libntp/decodenetnum.c stable/11/contrib/ntp/libntp/recvbuff.c stable/11/contrib/ntp/libntp/strdup.c stable/11/contrib/ntp/libntp/timexsup.c stable/11/contrib/ntp/ntpd/invoke-ntp.conf.texi stable/11/contrib/ntp/ntpd/invoke-ntp.keys.texi stable/11/contrib/ntp/ntpd/invoke-ntpd.texi stable/11/contrib/ntp/ntpd/ntp.conf.5man stable/11/contrib/ntp/ntpd/ntp.conf.5mdoc stable/11/contrib/ntp/ntpd/ntp.conf.html stable/11/contrib/ntp/ntpd/ntp.conf.man.in stable/11/contrib/ntp/ntpd/ntp.conf.mdoc.in stable/11/contrib/ntp/ntpd/ntp.keys.5man stable/11/contrib/ntp/ntpd/ntp.keys.5mdoc stable/11/contrib/ntp/ntpd/ntp.keys.html stable/11/contrib/ntp/ntpd/ntp.keys.man.in stable/11/contrib/ntp/ntpd/ntp.keys.mdoc.in stable/11/contrib/ntp/ntpd/ntp_config.c stable/11/contrib/ntp/ntpd/ntp_io.c stable/11/contrib/ntp/ntpd/ntp_proto.c stable/11/contrib/ntp/ntpd/ntp_refclock.c stable/11/contrib/ntp/ntpd/ntp_request.c stable/11/contrib/ntp/ntpd/ntp_timer.c stable/11/contrib/ntp/ntpd/ntpd-opts.c stable/11/contrib/ntp/ntpd/ntpd-opts.h stable/11/contrib/ntp/ntpd/ntpd.1ntpdman stable/11/contrib/ntp/ntpd/ntpd.1ntpdmdoc stable/11/contrib/ntp/ntpd/ntpd.html stable/11/contrib/ntp/ntpd/ntpd.man.in stable/11/contrib/ntp/ntpd/ntpd.mdoc.in stable/11/contrib/ntp/ntpd/refclock_jjy.c stable/11/contrib/ntp/ntpd/refclock_nmea.c stable/11/contrib/ntp/ntpd/refclock_palisade.c stable/11/contrib/ntp/ntpd/refclock_parse.c stable/11/contrib/ntp/ntpdate/ntpdate.c stable/11/contrib/ntp/ntpdc/invoke-ntpdc.texi stable/11/contrib/ntp/ntpdc/ntpdc-opts.c stable/11/contrib/ntp/ntpdc/ntpdc-opts.h stable/11/contrib/ntp/ntpdc/ntpdc.1ntpdcman stable/11/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc stable/11/contrib/ntp/ntpdc/ntpdc.html stable/11/contrib/ntp/ntpdc/ntpdc.man.in stable/11/contrib/ntp/ntpdc/ntpdc.mdoc.in stable/11/contrib/ntp/ntpq/invoke-ntpq.texi stable/11/contrib/ntp/ntpq/ntpq-opts.c stable/11/contrib/ntp/ntpq/ntpq-opts.h stable/11/contrib/ntp/ntpq/ntpq.1ntpqman stable/11/contrib/ntp/ntpq/ntpq.1ntpqmdoc stable/11/contrib/ntp/ntpq/ntpq.html stable/11/contrib/ntp/ntpq/ntpq.man.in stable/11/contrib/ntp/ntpq/ntpq.mdoc.in stable/11/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.html stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in stable/11/contrib/ntp/packageinfo.sh stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in stable/11/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi stable/11/contrib/ntp/scripts/invoke-plot_summary.texi stable/11/contrib/ntp/scripts/invoke-summary.texi stable/11/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait-opts stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.html stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in stable/11/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep-opts stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.html stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in stable/11/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi stable/11/contrib/ntp/scripts/ntptrace/ntptrace-opts stable/11/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman stable/11/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc stable/11/contrib/ntp/scripts/ntptrace/ntptrace.html stable/11/contrib/ntp/scripts/ntptrace/ntptrace.man.in stable/11/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in stable/11/contrib/ntp/scripts/plot_summary-opts stable/11/contrib/ntp/scripts/plot_summary.1plot_summaryman stable/11/contrib/ntp/scripts/plot_summary.1plot_summarymdoc stable/11/contrib/ntp/scripts/plot_summary.html stable/11/contrib/ntp/scripts/plot_summary.man.in stable/11/contrib/ntp/scripts/plot_summary.mdoc.in stable/11/contrib/ntp/scripts/summary-opts stable/11/contrib/ntp/scripts/summary.1summaryman stable/11/contrib/ntp/scripts/summary.1summarymdoc stable/11/contrib/ntp/scripts/summary.html stable/11/contrib/ntp/scripts/summary.man.in stable/11/contrib/ntp/scripts/summary.mdoc.in stable/11/contrib/ntp/scripts/update-leap/invoke-update-leap.texi stable/11/contrib/ntp/scripts/update-leap/update-leap-opts stable/11/contrib/ntp/scripts/update-leap/update-leap.1update-leapman stable/11/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc stable/11/contrib/ntp/scripts/update-leap/update-leap.html stable/11/contrib/ntp/scripts/update-leap/update-leap.man.in stable/11/contrib/ntp/scripts/update-leap/update-leap.mdoc.in stable/11/contrib/ntp/sntp/configure stable/11/contrib/ntp/sntp/crypto.c stable/11/contrib/ntp/sntp/include/version.def stable/11/contrib/ntp/sntp/include/version.texi stable/11/contrib/ntp/sntp/invoke-sntp.texi stable/11/contrib/ntp/sntp/m4/version.m4 stable/11/contrib/ntp/sntp/sntp-opts.c stable/11/contrib/ntp/sntp/sntp-opts.h stable/11/contrib/ntp/sntp/sntp.1sntpman stable/11/contrib/ntp/sntp/sntp.1sntpmdoc stable/11/contrib/ntp/sntp/sntp.html stable/11/contrib/ntp/sntp/sntp.man.in stable/11/contrib/ntp/sntp/sntp.mdoc.in stable/11/contrib/ntp/sntp/version.c stable/11/contrib/ntp/util/invoke-ntp-keygen.texi stable/11/contrib/ntp/util/ntp-keygen-opts.c stable/11/contrib/ntp/util/ntp-keygen-opts.h stable/11/contrib/ntp/util/ntp-keygen.1ntp-keygenman stable/11/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc stable/11/contrib/ntp/util/ntp-keygen.html stable/11/contrib/ntp/util/ntp-keygen.man.in stable/11/contrib/ntp/util/ntp-keygen.mdoc.in stable/11/usr.sbin/ntp/config.h stable/11/usr.sbin/ntp/scripts/mkver Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/contrib/ntp/ChangeLog stable/12/contrib/ntp/CommitLog stable/12/contrib/ntp/NEWS stable/12/contrib/ntp/config.h.in stable/12/contrib/ntp/configure stable/12/contrib/ntp/configure.ac stable/12/contrib/ntp/html/drivers/driver40-ja.html stable/12/contrib/ntp/html/drivers/driver40.html stable/12/contrib/ntp/include/l_stdlib.h stable/12/contrib/ntp/include/ntp.h stable/12/contrib/ntp/include/ntp_config.h stable/12/contrib/ntp/include/recvbuff.h stable/12/contrib/ntp/lib/isc/win32/include/isc/int.h stable/12/contrib/ntp/libntp/a_md5encrypt.c stable/12/contrib/ntp/libntp/decodenetnum.c stable/12/contrib/ntp/libntp/recvbuff.c stable/12/contrib/ntp/libntp/strdup.c stable/12/contrib/ntp/libntp/timexsup.c stable/12/contrib/ntp/ntpd/invoke-ntp.conf.texi stable/12/contrib/ntp/ntpd/invoke-ntp.keys.texi stable/12/contrib/ntp/ntpd/invoke-ntpd.texi stable/12/contrib/ntp/ntpd/ntp.conf.5man stable/12/contrib/ntp/ntpd/ntp.conf.5mdoc stable/12/contrib/ntp/ntpd/ntp.conf.html stable/12/contrib/ntp/ntpd/ntp.conf.man.in stable/12/contrib/ntp/ntpd/ntp.conf.mdoc.in stable/12/contrib/ntp/ntpd/ntp.keys.5man stable/12/contrib/ntp/ntpd/ntp.keys.5mdoc stable/12/contrib/ntp/ntpd/ntp.keys.html stable/12/contrib/ntp/ntpd/ntp.keys.man.in stable/12/contrib/ntp/ntpd/ntp.keys.mdoc.in stable/12/contrib/ntp/ntpd/ntp_config.c stable/12/contrib/ntp/ntpd/ntp_io.c stable/12/contrib/ntp/ntpd/ntp_proto.c stable/12/contrib/ntp/ntpd/ntp_refclock.c stable/12/contrib/ntp/ntpd/ntp_request.c stable/12/contrib/ntp/ntpd/ntp_timer.c stable/12/contrib/ntp/ntpd/ntpd-opts.c stable/12/contrib/ntp/ntpd/ntpd-opts.h stable/12/contrib/ntp/ntpd/ntpd.1ntpdman stable/12/contrib/ntp/ntpd/ntpd.1ntpdmdoc stable/12/contrib/ntp/ntpd/ntpd.html stable/12/contrib/ntp/ntpd/ntpd.man.in stable/12/contrib/ntp/ntpd/ntpd.mdoc.in stable/12/contrib/ntp/ntpd/refclock_jjy.c stable/12/contrib/ntp/ntpd/refclock_nmea.c stable/12/contrib/ntp/ntpd/refclock_palisade.c stable/12/contrib/ntp/ntpd/refclock_parse.c stable/12/contrib/ntp/ntpdate/ntpdate.c stable/12/contrib/ntp/ntpdc/invoke-ntpdc.texi stable/12/contrib/ntp/ntpdc/ntpdc-opts.c stable/12/contrib/ntp/ntpdc/ntpdc-opts.h stable/12/contrib/ntp/ntpdc/ntpdc.1ntpdcman stable/12/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc stable/12/contrib/ntp/ntpdc/ntpdc.html stable/12/contrib/ntp/ntpdc/ntpdc.man.in stable/12/contrib/ntp/ntpdc/ntpdc.mdoc.in stable/12/contrib/ntp/ntpq/invoke-ntpq.texi stable/12/contrib/ntp/ntpq/ntpq-opts.c stable/12/contrib/ntp/ntpq/ntpq-opts.h stable/12/contrib/ntp/ntpq/ntpq.1ntpqman stable/12/contrib/ntp/ntpq/ntpq.1ntpqmdoc stable/12/contrib/ntp/ntpq/ntpq.html stable/12/contrib/ntp/ntpq/ntpq.man.in stable/12/contrib/ntp/ntpq/ntpq.mdoc.in stable/12/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.html stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in stable/12/contrib/ntp/packageinfo.sh stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in stable/12/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi stable/12/contrib/ntp/scripts/invoke-plot_summary.texi stable/12/contrib/ntp/scripts/invoke-summary.texi stable/12/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait-opts stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.html stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in stable/12/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep-opts stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.html stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in stable/12/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi stable/12/contrib/ntp/scripts/ntptrace/ntptrace-opts stable/12/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman stable/12/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc stable/12/contrib/ntp/scripts/ntptrace/ntptrace.html stable/12/contrib/ntp/scripts/ntptrace/ntptrace.man.in stable/12/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in stable/12/contrib/ntp/scripts/plot_summary-opts stable/12/contrib/ntp/scripts/plot_summary.1plot_summaryman stable/12/contrib/ntp/scripts/plot_summary.1plot_summarymdoc stable/12/contrib/ntp/scripts/plot_summary.html stable/12/contrib/ntp/scripts/plot_summary.man.in stable/12/contrib/ntp/scripts/plot_summary.mdoc.in stable/12/contrib/ntp/scripts/summary-opts stable/12/contrib/ntp/scripts/summary.1summaryman stable/12/contrib/ntp/scripts/summary.1summarymdoc stable/12/contrib/ntp/scripts/summary.html stable/12/contrib/ntp/scripts/summary.man.in stable/12/contrib/ntp/scripts/summary.mdoc.in stable/12/contrib/ntp/scripts/update-leap/invoke-update-leap.texi stable/12/contrib/ntp/scripts/update-leap/update-leap-opts stable/12/contrib/ntp/scripts/update-leap/update-leap.1update-leapman stable/12/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc stable/12/contrib/ntp/scripts/update-leap/update-leap.html stable/12/contrib/ntp/scripts/update-leap/update-leap.man.in stable/12/contrib/ntp/scripts/update-leap/update-leap.mdoc.in stable/12/contrib/ntp/sntp/configure stable/12/contrib/ntp/sntp/crypto.c stable/12/contrib/ntp/sntp/include/version.def stable/12/contrib/ntp/sntp/include/version.texi stable/12/contrib/ntp/sntp/invoke-sntp.texi stable/12/contrib/ntp/sntp/m4/version.m4 stable/12/contrib/ntp/sntp/sntp-opts.c stable/12/contrib/ntp/sntp/sntp-opts.h stable/12/contrib/ntp/sntp/sntp.1sntpman stable/12/contrib/ntp/sntp/sntp.1sntpmdoc stable/12/contrib/ntp/sntp/sntp.html stable/12/contrib/ntp/sntp/sntp.man.in stable/12/contrib/ntp/sntp/sntp.mdoc.in stable/12/contrib/ntp/sntp/version.c stable/12/contrib/ntp/util/invoke-ntp-keygen.texi stable/12/contrib/ntp/util/ntp-keygen-opts.c stable/12/contrib/ntp/util/ntp-keygen-opts.h stable/12/contrib/ntp/util/ntp-keygen.1ntp-keygenman stable/12/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc stable/12/contrib/ntp/util/ntp-keygen.html stable/12/contrib/ntp/util/ntp-keygen.man.in stable/12/contrib/ntp/util/ntp-keygen.mdoc.in stable/12/usr.sbin/ntp/config.h stable/12/usr.sbin/ntp/scripts/mkver Directory Properties: stable/12/ (props changed) Modified: stable/11/contrib/ntp/ChangeLog ============================================================================== --- stable/11/contrib/ntp/ChangeLog Sun Jun 28 02:38:07 2020 (r362715) +++ stable/11/contrib/ntp/ChangeLog Sun Jun 28 03:28:28 2020 (r362716) @@ -1,4 +1,33 @@ --- +(4.2.8p15) 2020/06/23 Released by Harlan Stenn +(4.2.8p15) 2020/06/23 Released by Harlan Stenn + +* [Sec 3661] memory leak with AES128CMAC keys +* [Bug 3670] Regression from bad merge of 3592 and 3596 + - fixed a bad merge that happened before 4.2.8-p14. Thanks to + Sylar Tao for noticing this! +* [Bug 3667] decodenetnum fails with numeric port + - rewrite 'decodenetnum()' in terms of inet_pton +* [Bug 3666] avoid unlimited receive buffer allocation + - limit number of receive buffers, with an iron reserve for refclocks +* [Bug 3664] Enable openSSL CMAC support on Windows +* [Bug 3662] Fix build errors on Windows with VS2008 +* [Bug 3660] Manycast orphan mode startup discovery problem. + - integrated patch from Charles Claggett +* [Bug 3659] Move definition of psl[] from ntp_config.h to + ntp_config.h +* [Bug 3657] Wrong "Autokey group mismatch" debug message +* [Bug 3655] ntpdc memstats hash counts + - fix by Gerry garvey +* [Bug 3653] Refclock jitter RMS calculation + - thanks to Gerry Garvey +* [Bug 3646] Avoid sync with unsync orphan + - patch by Gerry Garvey +* [Bug 3644] Unsynchronized server [...] selected as candidate +* [Bug 3639] refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. + - applied patch by Takao Abe + +--- (4.2.8p14) 2020/03/03 Released by Harlan Stenn * [Sec 3610] process_control() should bail earlier on short packets. stenn@ Modified: stable/11/contrib/ntp/CommitLog ============================================================================== --- stable/11/contrib/ntp/CommitLog Sun Jun 28 02:38:07 2020 (r362715) +++ stable/11/contrib/ntp/CommitLog Sun Jun 28 03:28:28 2020 (r362716) @@ -1,3 +1,700 @@ +ChangeSet@1.3911, 2020-06-23 02:22:19-07:00, ntpreleng@ntp-build.tal1.ntfo.org + NTP_4_2_8P15 + TAG: NTP_4_2_8P15 + + ChangeLog@1.1985 +1 -0 + NTP_4_2_8P15 + + ntpd/invoke-ntp.conf.texi@1.222 +1 -1 + NTP_4_2_8P15 + + ntpd/invoke-ntp.keys.texi@1.207 +1 -1 + NTP_4_2_8P15 + + ntpd/invoke-ntpd.texi@1.521 +2 -2 + NTP_4_2_8P15 + + ntpd/ntp.conf.5man@1.256 +2 -2 + NTP_4_2_8P15 + + ntpd/ntp.conf.5mdoc@1.256 +2 -2 + NTP_4_2_8P15 + + ntpd/ntp.conf.html@1.204 +1 -1 + NTP_4_2_8P15 + + ntpd/ntp.conf.man.in@1.256 +2 -2 + NTP_4_2_8P15 + + ntpd/ntp.conf.mdoc.in@1.256 +2 -2 + NTP_4_2_8P15 + + ntpd/ntp.keys.5man@1.241 +2 -2 + NTP_4_2_8P15 + + ntpd/ntp.keys.5mdoc@1.241 +2 -2 + NTP_4_2_8P15 + + ntpd/ntp.keys.html@1.202 +1 -1 + NTP_4_2_8P15 + + ntpd/ntp.keys.man.in@1.241 +2 -2 + NTP_4_2_8P15 + + ntpd/ntp.keys.mdoc.in@1.241 +2 -2 + NTP_4_2_8P15 + + ntpd/ntpd-opts.c@1.544 +7 -7 + NTP_4_2_8P15 + + ntpd/ntpd-opts.h@1.543 +3 -3 + NTP_4_2_8P15 + + ntpd/ntpd.1ntpdman@1.350 +2 -2 + NTP_4_2_8P15 + + ntpd/ntpd.1ntpdmdoc@1.350 +2 -2 + NTP_4_2_8P15 + + ntpd/ntpd.html@1.195 +2 -2 + NTP_4_2_8P15 + + ntpd/ntpd.man.in@1.350 +2 -2 + NTP_4_2_8P15 + + ntpd/ntpd.mdoc.in@1.350 +2 -2 + NTP_4_2_8P15 + + ntpdc/invoke-ntpdc.texi@1.518 +2 -2 + NTP_4_2_8P15 + + ntpdc/ntpdc-opts.c@1.537 +7 -7 + NTP_4_2_8P15 + + ntpdc/ntpdc-opts.h@1.536 +3 -3 + NTP_4_2_8P15 + + ntpdc/ntpdc.1ntpdcman@1.349 +2 -2 + NTP_4_2_8P15 + + ntpdc/ntpdc.1ntpdcmdoc@1.349 +2 -2 + NTP_4_2_8P15 + + ntpdc/ntpdc.html@1.364 +2 -2 + NTP_4_2_8P15 + + ntpdc/ntpdc.man.in@1.349 +2 -2 + NTP_4_2_8P15 + + ntpdc/ntpdc.mdoc.in@1.349 +2 -2 + NTP_4_2_8P15 + + ntpq/invoke-ntpq.texi@1.528 +2 -2 + NTP_4_2_8P15 + + ntpq/ntpq-opts.c@1.546 +7 -7 + NTP_4_2_8P15 + + ntpq/ntpq-opts.h@1.544 +3 -3 + NTP_4_2_8P15 + + ntpq/ntpq.1ntpqman@1.356 +2 -2 + NTP_4_2_8P15 + + ntpq/ntpq.1ntpqmdoc@1.356 +2 -2 + NTP_4_2_8P15 + + ntpq/ntpq.html@1.195 +2 -2 + NTP_4_2_8P15 + + ntpq/ntpq.man.in@1.356 +2 -2 + NTP_4_2_8P15 + + ntpq/ntpq.mdoc.in@1.356 +2 -2 + NTP_4_2_8P15 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.520 +1 -1 + NTP_4_2_8P15 + + ntpsnmpd/ntpsnmpd-opts.c@1.539 +7 -7 + NTP_4_2_8P15 + + ntpsnmpd/ntpsnmpd-opts.h@1.538 +3 -3 + NTP_4_2_8P15 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.349 +2 -2 + NTP_4_2_8P15 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.349 +2 -2 + NTP_4_2_8P15 + + ntpsnmpd/ntpsnmpd.html@1.188 +1 -1 + NTP_4_2_8P15 + + ntpsnmpd/ntpsnmpd.man.in@1.349 +2 -2 + NTP_4_2_8P15 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.349 +2 -2 + NTP_4_2_8P15 + + packageinfo.sh@1.546 +2 -2 + NTP_4_2_8P15 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.110 +2 -2 + NTP_4_2_8P15 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.111 +2 -2 + NTP_4_2_8P15 + + scripts/calc_tickadj/calc_tickadj.html@1.111 +1 -1 + NTP_4_2_8P15 + + scripts/calc_tickadj/calc_tickadj.man.in@1.109 +2 -2 + NTP_4_2_8P15 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.111 +2 -2 + NTP_4_2_8P15 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.114 +1 -1 + NTP_4_2_8P15 + + scripts/invoke-plot_summary.texi@1.132 +2 -2 + NTP_4_2_8P15 + + scripts/invoke-summary.texi@1.131 +2 -2 + NTP_4_2_8P15 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.342 +2 -2 + NTP_4_2_8P15 + + scripts/ntp-wait/ntp-wait-opts@1.78 +2 -2 + NTP_4_2_8P15 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.338 +2 -2 + NTP_4_2_8P15 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.339 +2 -2 + NTP_4_2_8P15 + + scripts/ntp-wait/ntp-wait.html@1.360 +2 -2 + NTP_4_2_8P15 + + scripts/ntp-wait/ntp-wait.man.in@1.338 +2 -2 + NTP_4_2_8P15 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.339 +2 -2 + NTP_4_2_8P15 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.129 +2 -2 + NTP_4_2_8P15 + + scripts/ntpsweep/ntpsweep-opts@1.80 +2 -2 + NTP_4_2_8P15 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.117 +2 -2 + NTP_4_2_8P15 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.117 +2 -2 + NTP_4_2_8P15 + + scripts/ntpsweep/ntpsweep.html@1.132 +2 -2 + NTP_4_2_8P15 + + scripts/ntpsweep/ntpsweep.man.in@1.117 +2 -2 + NTP_4_2_8P15 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.118 +2 -2 + NTP_4_2_8P15 + + scripts/ntptrace/invoke-ntptrace.texi@1.131 +2 -2 + NTP_4_2_8P15 + + scripts/ntptrace/ntptrace-opts@1.80 +2 -2 + NTP_4_2_8P15 + + scripts/ntptrace/ntptrace.1ntptraceman@1.117 +2 -2 + NTP_4_2_8P15 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.118 +2 -2 + NTP_4_2_8P15 + + scripts/ntptrace/ntptrace.html@1.133 +2 -2 + NTP_4_2_8P15 + + scripts/ntptrace/ntptrace.man.in@1.117 +2 -2 + NTP_4_2_8P15 + + scripts/ntptrace/ntptrace.mdoc.in@1.119 +2 -2 + NTP_4_2_8P15 + + scripts/plot_summary-opts@1.81 +2 -2 + NTP_4_2_8P15 + + scripts/plot_summary.1plot_summaryman@1.130 +2 -2 + NTP_4_2_8P15 + + scripts/plot_summary.1plot_summarymdoc@1.130 +2 -2 + NTP_4_2_8P15 + + scripts/plot_summary.html@1.135 +2 -2 + NTP_4_2_8P15 + + scripts/plot_summary.man.in@1.130 +2 -2 + NTP_4_2_8P15 + + scripts/plot_summary.mdoc.in@1.130 +2 -2 + NTP_4_2_8P15 + + scripts/summary-opts@1.80 +2 -2 + NTP_4_2_8P15 + + scripts/summary.1summaryman@1.129 +2 -2 + NTP_4_2_8P15 + + scripts/summary.1summarymdoc@1.129 +2 -2 + NTP_4_2_8P15 + + scripts/summary.html@1.134 +2 -2 + NTP_4_2_8P15 + + scripts/summary.man.in@1.129 +2 -2 + NTP_4_2_8P15 + + scripts/summary.mdoc.in@1.129 +2 -2 + NTP_4_2_8P15 + + scripts/update-leap/invoke-update-leap.texi@1.30 +1 -1 + NTP_4_2_8P15 + + scripts/update-leap/update-leap-opts@1.31 +2 -2 + NTP_4_2_8P15 + + scripts/update-leap/update-leap.1update-leapman@1.30 +2 -2 + NTP_4_2_8P15 + + scripts/update-leap/update-leap.1update-leapmdoc@1.30 +2 -2 + NTP_4_2_8P15 + + scripts/update-leap/update-leap.html@1.31 +1 -1 + NTP_4_2_8P15 + + scripts/update-leap/update-leap.man.in@1.30 +2 -2 + NTP_4_2_8P15 + + scripts/update-leap/update-leap.mdoc.in@1.30 +2 -2 + NTP_4_2_8P15 + + sntp/invoke-sntp.texi@1.520 +2 -2 + NTP_4_2_8P15 + + sntp/sntp-opts.c@1.540 +7 -7 + NTP_4_2_8P15 + + sntp/sntp-opts.h@1.538 +3 -3 + NTP_4_2_8P15 + + sntp/sntp.1sntpman@1.355 +2 -2 + NTP_4_2_8P15 + + sntp/sntp.1sntpmdoc@1.355 +2 -2 + NTP_4_2_8P15 + + sntp/sntp.html@1.536 +2 -2 + NTP_4_2_8P15 + + sntp/sntp.man.in@1.355 +2 -2 + NTP_4_2_8P15 + + sntp/sntp.mdoc.in@1.355 +2 -2 + NTP_4_2_8P15 + + util/invoke-ntp-keygen.texi@1.523 +2 -2 + NTP_4_2_8P15 + + util/ntp-keygen-opts.c@1.542 +7 -7 + NTP_4_2_8P15 + + util/ntp-keygen-opts.h@1.540 +3 -3 + NTP_4_2_8P15 + + util/ntp-keygen.1ntp-keygenman@1.351 +2 -2 + NTP_4_2_8P15 + + util/ntp-keygen.1ntp-keygenmdoc@1.351 +2 -2 + NTP_4_2_8P15 + + util/ntp-keygen.html@1.196 +2 -2 + NTP_4_2_8P15 + + util/ntp-keygen.man.in@1.351 +2 -2 + NTP_4_2_8P15 + + util/ntp-keygen.mdoc.in@1.351 +2 -2 + NTP_4_2_8P15 + +ChangeSet@1.3910, 2020-06-23 02:05:32-07:00, ntpreleng@ntp-build.tal1.ntfo.org + ntp-4.2.8p15 + + packageinfo.sh@1.545 +1 -1 + ntp-4.2.8p15 + +ChangeSet@1.3908, 2020-06-09 07:12:27-04:00, stenn@psp-deb2.ntp.org + p15 updates + + ChangeLog@1.1983 +1 -1 + p15 updates + + NEWS@1.214 +1 -1 + p15 updates + +ChangeSet@1.3896.1.22, 2020-06-09 07:09:18-04:00, stenn@psp-deb2.ntp.org + 3670 + + ChangeLog@1.1974.1.14 +1 -1 + 3670 + + NEWS@1.205.1.7 +3 -1 + 3670 + +ChangeSet@1.3896.1.21, 2020-06-09 08:39:26+02:00, perlinger@ntp.org + [Bug 3670] Deleted statements come back + + ChangeLog@1.1974.1.13 +3 -0 + [Bug 3670] Deleted statements come back + + ntpd/ntp_proto.c@1.437 +4 -19 + [Bug 3670] Deleted statements come back + +ChangeSet@1.3906, 2020-05-31 09:52:14+00:00, stenn@psp-deb1.ntp.org + update the expected releease date + + NEWS@1.213 +1 -1 + update the expected releease date + +ChangeSet@1.3896.9.3, 2020-05-31 09:49:39+00:00, stenn@psp-deb1.ntp.org + Update ChangeLog and NEWS files for 3644 + + ChangeLog@1.1974.1.12 +1 -3 + Update ChangeLog and NEWS files for 3644 + + NEWS@1.205.1.6 +2 -1 + Update ChangeLog and NEWS files for 3644 + +ChangeSet@1.3896.9.2, 2020-05-31 09:47:05+00:00, stenn@psp-deb1.ntp.org + [Bug 3644]: Do we want to log an event in this case? + + ntpd/ntp_timer.c@1.99 +2 -0 + [Bug 3644]: Do we want to log an event in this case? + +ChangeSet@1.3896.9.1, 2020-05-31 11:13:45+02:00, perlinger@ntp.org + [Bug 3644] Unsynchronized server (minsane not satisfied) selected as candidate + + ChangeLog@1.1974.1.11 +3 -0 + [Bug 3644] Unsynchronized server (minsane not satisfied) selected as candidate + + include/ntp.h@1.233 +1 -1 + [Bug 3644] Unsynchronized server [...] selected as candidate + - comment typo + + ntpd/ntp_proto.c@1.436 +2 -3 + [Bug 3644] Unsynchronized server (minsane not satisfied) selected as candidate + + ntpd/ntp_timer.c@1.98 +24 -9 + [Bug 3644] Unsynchronized server (minsane not satisfied) selected as candidate + - according to DLM, we should go S16/UNSYNCED if we have no proper orphan config + +ChangeSet@1.3896.1.19, 2020-05-25 12:42:46+02:00, nb241700@md2g3rcc.ad001.siemens.net + [Bug 3667] decodenetnum fails with numeric port + - windows compilation issues + + libntp/decodenetnum.c@1.21 +1 -1 + [Bug 3667] decodenetnum fails with numeric port + - windows compilation issues ('sa_family_t' is POSIX, now ANSI/MSVC) + + libntp/strdup.c@1.11 +3 -3 + [Bug 3667] decodenetnum fails with numeric port + - windows compilation issues (typo+cast in memchr replacement) + + ports/winnt/include/config.h@1.117 +2 -0 + [Bug 3667] decodenetnum fails with numeric port + - windows compilation issues (have memchr() and strnlen() in MSVC) + +ChangeSet@1.3896.1.18, 2020-05-22 06:07:28+00:00, stenn@psp-deb1.ntp.org + Update NEWS file with 3667 + + NEWS@1.205.1.5 +3 -1 + Update NEWS file with 3667 + +ChangeSet@1.3896.1.17, 2020-05-22 06:05:45+00:00, stenn@psp-deb1.ntp.org + cleanup + + ChangeLog@1.1974.1.10 +2 -4 + cleanup + +ChangeSet@1.3896.1.16, 2020-05-22 06:04:57+00:00, stenn@psp-deb1.ntp.org + indentation tweaks + + tests/libntp/sockaddrtest.c@1.5 +7 -7 + indentation tweaks + +ChangeSet@1.3896.1.15, 2020-05-20 09:44:15+02:00, perlinger@ntp.org + [Bug 3667] decodenetnum fails with numeric port + + ChangeLog@1.1974.1.9 +4 -0 + [Bug 3667] decodenetnum fails with numeric port + + configure.ac@1.619 +1 -1 + [Bug 3667] decodenetnum fails with numeric port + sidekick: implement strnlen() and memchr() for ancient hosts (pogo.udel.edu...) + + include/l_stdlib.h@1.21 +9 -0 + [Bug 3667] decodenetnum fails with numeric port + sidekick: implement strnlen() and memchr() for ancient hosts (pogo.udel.edu...) + + libntp/decodenetnum.c@1.20 +123 -77 + [Bug 3667] decodenetnum fails with numeric port + - rewrite in terms of inet_pton() and strtoul(), no getaddrinfo() any more + + libntp/strdup.c@1.10 +29 -3 + [Bug 3667] decodenetnum fails with numeric port + sidekick: implement strnlen() and memchr() for ancient hosts (pogo.udel.edu...) + + tests/libntp/decodenetnum.c@1.13 +94 -6 + [Bug 3667] decodenetnum fails with numeric port + - additional tests + + tests/libntp/netof.c@1.10 +2 -0 + Bug 3667 - decodenetnum fails with numeric port + - clear address buffers before use + + tests/libntp/run-decodenetnum.c@1.14 +8 -2 + [Bug 3667] decodenetnum fails with numeric port + - regenerated + + tests/libntp/sockaddrtest.c@1.4 +2 -1 + [Bug 3667] decodenetnum fails with numeric port + - include scope id in IPv6 compare + +ChangeSet@1.3896.1.14, 2020-05-14 03:45:40-07:00, harlan@psp-at0.tal1.ntfo.org + Added 3660 to the NEWS file + + NEWS@1.205.1.4 +3 -1 + Added 3660 to the NEWS file + +ChangeSet@1.3896.8.1, 2020-05-14 03:14:44-07:00, harlan@psp-at0.tal1.ntfo.org + [Bug 3660] Manycast orphan mode startup discovery problem + + ChangeLog@1.1974.8.1 +5 -0 + [Bug 3660] Manycast orphan mode startup discovery problem + + ntpd/ntp_proto.c@1.432.2.1 +2 -1 + [Bug 3660] Manycast orphan mode startup discovery problem + +ChangeSet@1.3896.1.12, 2020-05-10 11:26:21+00:00, stenn@psp-deb1.ntp.org + Update NEWS + + NEWS@1.205.1.3 +3 -1 + Update NEWS + +ChangeSet@1.3896.1.11, 2020-05-10 09:44:50+00:00, stenn@psp-deb1.ntp.org + Merge cleanup + + ChangeLog@1.1974.1.7 +2 -4 + Merge cleanup + +ChangeSet@1.3896.1.10, 2020-05-09 08:20:44+02:00, perlinger@ntp.org + [Bug 3666] avoid unlimited receive buffer allocation + + BitKeeper/etc/ignore@1.95 +1 -0 + [Bug 3666] avoid unlimited receive buffer allocation + - (sidekick) ignore the '.vs' directory of VS2017 & above + + ChangeLog@1.1974.1.6 +4 -0 + [Bug 3666] avoid unlimited receive buffer allocation + + include/recvbuff.h@1.28 +23 -7 + [Bug 3666] avoid unlimited receive buffer allocation + - buffer count limit is 4096 now, always enforced + - API change for urgent buffers + + lib/isc/win32/include/isc/int.h@1.5 +3 -1 + [Bug 3666] avoid unlimited receive buffer allocation + - (sidekick) define standard reserved macros only if not yet defined! + + libntp/recvbuff.c@1.44 +131 -73 + [Bug 3666] avoid unlimited receive buffer allocation + - don't exceed RECV_TOOMANY allocated buffers + - keep emergency reserve for clocks + + libntp/timexsup.c@1.3 +3 -4 + [bug 3666] avoid unlimited receive buffer allocation + - (sidekick) fix some warnings of clang on lp64 targets + + ntpd/ntp_io.c@1.432 +23 -13 + [Bug 3666] avoid unlimited receive buffer allocation + - support urgent buffer reserve for refclocks + + ntpd/refclock_parse.c@1.89 +1 -1 + [Bug 3666] avoid unlimited receive buffer allocation + - support urgent buffer reserve for refclocks + + ntpdate/ntpdate.c@1.106 +1 -1 + [Bug 3666] avoid unlimited receive buffer allocation + - get_free_recv_buffer() API change + + ports/winnt/libntp/messages.h@1.3 +1 -1 + [Bug 3666] avoid unlimited receive buffer allocation + - (sidekick) regenerated + + ports/winnt/ntpd/ntp_iocompletionport.c@1.81 +63 -38 + [Bug 3666] avoid unlimited receive buffer allocation + - reuse last buffer ASAP if no new buffer available + - typos and some internal renaming + + tests/libntp/recvbuff.c@1.8 +2 -2 + [Bug 3666] avoid unlimited receive buffer allocation + - internal API changes + +ChangeSet@1.3896.1.9, 2020-05-05 03:53:50+00:00, stenn@psp-deb1.ntp.org + Update NEWS with 3639 + + NEWS@1.205.1.2 +3 -1 + Update NEWS with 3639 + +ChangeSet@1.3896.1.7, 2020-04-20 08:14:39+00:00, stenn@psp-deb1.ntp.org + NEWS and bug 3664 + + NEWS@1.205.1.1 +2 -1 + NEWS and bug 3664 + +ChangeSet@1.3896.7.1, 2020-04-16 17:50:44+02:00, burnicki@psp-deb1.ntp.org + Enable openSSL CMAC support on Windows. + + ChangeLog@1.1974.7.1 +2 -0 + Enable openSSL CMAC support on Windows. + + ports/winnt/include/config.h@1.116 +2 -0 + Enable openSSL CMAC support on Windows. + +ChangeSet@1.3899, 2020-04-11 09:59:23+00:00, stenn@psp-deb1.ntp.org + update + + NEWS@1.206 +1 -0 + update + +ChangeSet@1.3896.1.5, 2020-04-11 09:35:19+00:00, stenn@psp-deb1.ntp.org + update + + NEWS@1.205 +2 -2 + update + +ChangeSet@1.3896.1.3, 2020-04-11 08:10:59+00:00, stenn@psp-deb1.ntp.org + update + + NEWS@1.204 +3 -1 + update + +ChangeSet@1.3896.2.3, 2020-04-11 07:21:36+00:00, stenn@psp-deb1.ntp.org + update + + NEWS@1.203 +1 -0 + update + +ChangeSet@1.3896.3.3, 2020-04-11 07:12:47+00:00, stenn@psp-deb1.ntp.org + update + + NEWS@1.202 +22 -0 + update + +ChangeSet@1.3896.6.4, 2020-04-07 17:51:25+02:00, burnicki@psp-deb1.ntp.org + [Bug 3662] Fix build errors on Windows with VS2008. + + ChangeLog@1.1974.6.1 +2 -0 + [Bug 3662] Fix build errors on Windows with VS2008. + +ChangeSet@1.3896.6.3, 2020-04-07 17:49:08+02:00, burnicki@psp-deb1.ntp.org + Fix unused variable warning in ntpdate.c. + + ntpdate/ntpdate.c@1.105 +2 -1 + Fix unused variable warning. + +ChangeSet@1.3896.6.2, 2020-04-07 17:48:25+02:00, burnicki@psp-deb1.ntp.org + Fix compiling refclock_palisade.c + Don't have variable declarations after code. + + ntpd/refclock_palisade.c@1.49 +25 -23 + Don't have variable declarations after code. + +ChangeSet@1.3896.6.1, 2020-04-07 17:47:02+02:00, burnicki@psp-deb1.ntp.org + Fix prototype in ntpd/refclock_nmea.c + + ntpd/refclock_nmea.c@1.85 +1 -1 + Fix prototype in ntpd/refclock_nmea.c + +ChangeSet@1.3896.5.1, 2020-04-05 10:10:12+02:00, perlinger@ntp.org + [Bug 3646] Avoid sync with unsync orphan + + ChangeLog@1.1974.5.1 +4 -0 + [Bug 3646] Avoid sync with unsync orphan + + ntpd/ntp_proto.c@1.432.1.1 +21 -0 + [Bug 3646] Avoid sync with unsync orphan + +ChangeSet@1.3896.4.1, 2020-04-05 09:53:25+02:00, perlinger@ntp.org + [Bug 3653] Refclock jitter RMS calculation + + ChangeLog@1.1974.4.1 +4 -0 + [Bug 3653] Refclock jitter RMS calculation + + ntpd/ntp_refclock.c@1.132 +36 -36 + [Bug 3653] Refclock jitter RMS calculation + +ChangeSet@1.3896.3.1, 2020-04-04 08:57:51+02:00, perlinger@ntp.org + [Bug 3655] ntpdc memstats hash counts + + ChangeLog@1.1974.3.1 +4 -0 + [Bug 3655] ntpdc memstats hash counts + + ntpd/ntp_request.c@1.132 +1 -1 + [Bug 3655] ntpdc memstats hash counts + +ChangeSet@1.3896.2.1, 2020-04-04 08:48:51+02:00, perlinger@ntp.org + [Bug 3657] Wrong "Autokey group mismatch" debug message + + ChangeLog@1.1974.2.1 +3 -0 + [Bug 3657] Wrong "Autokey group mismatch" debug message + + ntpd/ntp_proto.c@1.433 +3 -2 + [Bug 3657] Wrong "Autokey group mismatch" debug message + +ChangeSet@1.3896.1.1, 2020-04-04 08:38:06+02:00, perlinger@ntp.org + [Bug 3659] ntp-4.2.8p14 fails to build + + ChangeLog@1.1974.1.1 +3 -0 + [Bug 3659] ntp-4.2.8p14 fails to build + + include/ntp_config.h@1.90 +0 -10 + [Bug 3659] ntp-4.2.8p14 fails to build + - move global declaration of 'psl' from header to static declaration in code + + ntpd/ntp_config.c@1.376 +10 -0 + [Bug 3659] ntp-4.2.8p14 fails to build + - move global declaration of 'psl' from header to static declaration in code + +ChangeSet@1.3897, 2020-04-01 16:49:43+02:00, perlinger@ntp.org + [Bug 3661] memory leak with AES128CMAC keys + + ChangeLog@1.1975 +3 -0 + [Bug 3661] memory leak with AES128CMAC keys + + libntp/a_md5encrypt.c@1.52 +1 -1 + [Bug 3661] memory leak with AES128CMAC keys + - free context, not just cleaning up internally + + sntp/crypto.c@1.40 +2 -1 + [Bug 3661] memory leak with AES128CMAC keys + - free context, not just cleaning up internally + ChangeSet@1.3896, 2020-03-03 17:42:43-08:00, ntpreleng@ntp-build.tal1.ntfo.org NTP_4_2_8P14 TAG: NTP_4_2_8P14 @@ -675,7 +1372,7 @@ ChangeSet@1.3892, 2020-03-03 16:05:38-08:00, ntpreleng ntpd/ntp_config.c@1.374 +2 -2 provide get_pollskew() for simulator -ChangeSet@1.3844.24.1, 2020-03-03 03:30:13-08:00, ntpreleng@ntp-build.tal1.ntfo.org +ChangeSet@1.3844.25.1, 2020-03-03 03:30:13-08:00, ntpreleng@ntp-build.tal1.ntfo.org NTP_4_2_8P13 TAG: NTP_4_2_8P13 (currently on 1.3894) @@ -933,7 +1630,7 @@ ChangeSet@1.3880, 2020-02-17 08:48:45+00:00, stenn@psp ChangeSet@1.3879, 2020-02-17 08:11:42+00:00, stenn@psp-deb1.ntp.org updates - ChangeLog@1.1968.34.1 +2 -0 + ChangeLog@1.1968.35.1 +2 -0 ChangeSet@1.3877.1.2, 2020-02-08 23:00:11+00:00, stenn@psp-deb1.ntp.org html/confopt.html cleanup @@ -1288,6 +1985,22 @@ ChangeSet@1.3878, 2020-01-29 06:03:13+00:00, stenn@psp ntpd/ntp_proto.c@1.427.1.1 +8 -0 Initial pass at fixes for bug 3596 + +ChangeSet@1.3844.24.1, 2020-01-21 12:49:14+00:00, abe@psp-deb1.ntp.org + driver40.html, refclock_jjy.c, driver40-ja.html, ChangeLog: + refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. + + ChangeLog@1.1968.34.1 +3 -0 + refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. + + html/drivers/driver40-ja.html@1.8 +10 -2 + refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. + + html/drivers/driver40.html@1.23 +9 -2 + refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. + + ntpd/refclock_jjy.c@1.37 +76 -32 + refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. ChangeSet@1.3873.4.2, 2020-01-18 04:46:30-05:00, stenn@psp-deb2.ntp.org [Bug 3637] Emit the version of ntpd in saveconfig Modified: stable/11/contrib/ntp/NEWS ============================================================================== --- stable/11/contrib/ntp/NEWS Sun Jun 28 02:38:07 2020 (r362715) +++ stable/11/contrib/ntp/NEWS Sun Jun 28 03:28:28 2020 (r362716) @@ -1,4 +1,42 @@ --- +NTP 4.2.8p15 (Harlan Stenn , 2020 Jun 23) + +Focus: Security, Bug fixes + +Severity: MEDIUM + +This release fixes one vulnerability: Associations that use CMAC +authentication between ntpd from versions 4.2.8p11/4.3.97 and +4.2.8p14/4.3.100 will leak a small amount of memory for each packet. +Eventually, ntpd will run out of memory and abort. + +It also fixes 13 other bugs. + +* [Sec 3661] memory leak with AES128CMAC keys +* [Bug 3670] Regression from bad merger between 3592 and 3596 + - Thanks to Sylar Tao +* [Bug 3667] decodenetnum fails with numeric port + - rewrite 'decodenetnum()' in terms of inet_pton +* [Bug 3666] avoid unlimited receive buffer allocation + - limit number of receive buffers, with an iron reserve for refclocks +* [Bug 3664] Enable openSSL CMAC support on Windows +* [Bug 3662] Fix build errors on Windows with VS2008 +* [Bug 3660] Manycast orphan mode startup discovery problem. + - integrated patch from Charles Claggett +* [Bug 3659] Move definition of psl[] from ntp_config.h to + ntp_config.h +* [Bug 3657] Wrong "Autokey group mismatch" debug message +* [Bug 3655] ntpdc memstats hash counts + - fix by Gerry garvey +* [Bug 3653] Refclock jitter RMS calculation + - thanks to Gerry Garvey +* [Bug 3646] Avoid sync with unsync orphan + - patch by Gerry Garvey +* [Bug 3644] Unsynchronized server [...] selected as candidate +* [Bug 3639] refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. + - applied patch by Takao Abe + +--- NTP 4.2.8p14 (Harlan Stenn , 2020 Mar 03) Focus: Security, Bug fixes, enhancements. Modified: stable/11/contrib/ntp/config.h.in ============================================================================== --- stable/11/contrib/ntp/config.h.in Sun Jun 28 02:38:07 2020 (r362715) +++ stable/11/contrib/ntp/config.h.in Sun Jun 28 03:28:28 2020 (r362716) @@ -583,6 +583,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MD5_H +/* Define to 1 if you have the `memchr' function. */ +#undef HAVE_MEMCHR + /* Define to 1 if you have the `memlk' function. */ #undef HAVE_MEMLK @@ -894,6 +897,9 @@ /* Define to 1 if you have the `strlcpy' function. */ #undef HAVE_STRLCPY + +/* Define to 1 if you have the `strnlen' function. */ +#undef HAVE_STRNLEN /* Define to 1 if you have the header file. */ #undef HAVE_STROPTS_H Modified: stable/11/contrib/ntp/configure ============================================================================== --- stable/11/contrib/ntp/configure Sun Jun 28 02:38:07 2020 (r362715) +++ stable/11/contrib/ntp/configure Sun Jun 28 03:28:28 2020 (r362716) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for ntp 4.2.8p14. +# Generated by GNU Autoconf 2.69 for ntp 4.2.8p15. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='ntp' PACKAGE_TARNAME='ntp' -PACKAGE_VERSION='4.2.8p14' -PACKAGE_STRING='ntp 4.2.8p14' +PACKAGE_VERSION='4.2.8p15' +PACKAGE_STRING='ntp 4.2.8p15' PACKAGE_BUGREPORT='http://bugs.ntp.org./' PACKAGE_URL='http://www.ntp.org./' @@ -1617,7 +1617,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ntp 4.2.8p14 to adapt to many kinds of systems. +\`configure' configures ntp 4.2.8p15 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1687,7 +1687,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ntp 4.2.8p14:";; + short | recursive ) echo "Configuration of ntp 4.2.8p15:";; esac cat <<\_ACEOF @@ -1930,7 +1930,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ntp configure 4.2.8p14 +ntp configure 4.2.8p15 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2639,7 +2639,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ntp $as_me 4.2.8p14, which was +It was created by ntp $as_me 4.2.8p15, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3640,7 +3640,7 @@ fi # Define the identity of the package. PACKAGE='ntp' - VERSION='4.2.8p14' + VERSION='4.2.8p15' cat >>confdefs.h <<_ACEOF @@ -27308,7 +27308,7 @@ _ACEOF fi done -for ac_func in strdup strerror setrlimit strchr +for ac_func in strdup strnlen memchr strerror setrlimit strchr do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -34174,7 +34174,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ntp $as_me 4.2.8p14, which was +This file was extended by ntp $as_me 4.2.8p15, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -34241,7 +34241,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -ntp config.status 4.2.8p14 +ntp config.status 4.2.8p15 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: stable/11/contrib/ntp/configure.ac ============================================================================== --- stable/11/contrib/ntp/configure.ac Sun Jun 28 02:38:07 2020 (r362715) +++ stable/11/contrib/ntp/configure.ac Sun Jun 28 03:28:28 2020 (r362716) @@ -912,7 +912,7 @@ case "$host" in ;; esac AC_CHECK_FUNCS([setlinebuf setpgid setpriority setsid setvbuf]) -AC_CHECK_FUNCS([strdup strerror setrlimit strchr]) +AC_CHECK_FUNCS([strdup strnlen memchr strerror setrlimit strchr]) case "$host" in *-*-aix[[4-9]]*) # XXX only verified thru AIX6. Modified: stable/11/contrib/ntp/html/drivers/driver40-ja.html ============================================================================== Binary file (source and/or target). No diff available. Modified: stable/11/contrib/ntp/html/drivers/driver40.html ============================================================================== --- stable/11/contrib/ntp/html/drivers/driver40.html Sun Jun 28 02:38:07 2020 (r362715) +++ stable/11/contrib/ntp/html/drivers/driver40.html Sun Jun 28 03:28:28 2020 (r362716) @@ -52,14 +52,20 @@
server   127.127.40.X   mode 1

-
fudge   127.127.40.X   time1 0.NNN   flag1 0|1
+
fudge   127.127.40.X   time1 0.NNN   flag1 0|1   flag2 0|1   time2 H

Time1 may specify a constant to be added to the time offset for the time from the receiver, a fixed-point decimal number in seconds. You may specify the time offset from several tens of milli-seconds ( 0.0NN seconds ) to a hundred and several tens of milli-seconds ( 0.1NN seconds ) for this clock.

-

Flag1 has no effect for time synchronization. When flag1 is set to 1, status commands are issued before DATE and STIM commands, and write a response text into the clockstats file.

+

Time2 may specify a grace period in hours after the 'adjusted' reply of the STUS command stopped coming.
This hours is effective when both flag1 and flag2 are set to 1.

+

Flag1 has no effect for time synchronization unless flag2 is set to 1.
When flag1 is set to 1, status commands are issued before DATE and STIM commands, and write a response text into the clockstats file.

0 (Default)DCST and STUS commands are not issued
1DCST and STUS commands are issued
+

Flag2 enables the time synchronization only when the reply of the STUS is 'adjusted'. When this functionality is used, flag1 must be set to 1 together.

+ + + +
0 (Default)Always
1'adjusted' only

@@ -193,6 +199,7 @@
  • CITIZEN T.I.C. CO.,LTD.   JJY-200   http://www.tic-citizen.co.jp/ (Japanese only)


    +

    The JJY-200 became the end of sales in 2013.


    NTP configuration ( ntp.conf )

    Modified: stable/11/contrib/ntp/include/l_stdlib.h ============================================================================== --- stable/11/contrib/ntp/include/l_stdlib.h Sun Jun 28 02:38:07 2020 (r362715) +++ stable/11/contrib/ntp/include/l_stdlib.h Sun Jun 28 03:28:28 2020 (r362716) @@ -221,4 +221,13 @@ extern int errno; extern int h_errno; #endif +#ifndef HAVE_MEMCHR +extern void *memchr(const void *s, int c, size_t n); +#endif + +#ifndef HAVE_STRNLEN +extern size_t strnlen(const char *s, size_t n); +#endif + + #endif /* L_STDLIB_H */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Jun 28 03:28:35 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BF63933DDF8; Sun, 28 Jun 2020 03:28:35 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vbgR24rDz3ZPM; Sun, 28 Jun 2020 03:28:35 +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 37FB31010E; Sun, 28 Jun 2020 03:28:35 +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 05S3SYNL058652; Sun, 28 Jun 2020 03:28:34 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05S3SWwf058643; Sun, 28 Jun 2020 03:28:32 GMT (envelope-from cy@FreeBSD.org) Message-Id: <202006280328.05S3SWwf058643@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Sun, 28 Jun 2020 03:28:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362716 - in stable: 11/contrib/ntp 11/contrib/ntp/html/drivers 11/contrib/ntp/include 11/contrib/ntp/lib/isc/win32/include/isc 11/contrib/ntp/libntp 11/contrib/ntp/ntpd 11/contrib/ntp/... X-SVN-Group: stable-12 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 11/contrib/ntp 11/contrib/ntp/html/drivers 11/contrib/ntp/include 11/contrib/ntp/lib/isc/win32/include/isc 11/contrib/ntp/libntp 11/contrib/ntp/ntpd 11/contrib/ntp/ntpdate 11/contrib/ntp/nt... X-SVN-Commit-Revision: 362716 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 03:28:35 -0000 Author: cy Date: Sun Jun 28 03:28:28 2020 New Revision: 362716 URL: https://svnweb.freebsd.org/changeset/base/362716 Log: MFC r362568: MFV r362565: Update 4.2.8p14 --> 4.2.8p15 Summary: Systems that use a CMAC algorithm in ntp.keys will not release a bit of memory on each packet that uses a CMAC keyid, eventually causing ntpd to run out of memory and fail. The CMAC cleanup from https://bugs.ntp.org/3447, part of ntp-4.2.8p11, introduced a bug whereby the CMAC data structure was no longer completely removed. Security: NTP Bug 3661 Modified: stable/12/contrib/ntp/ChangeLog stable/12/contrib/ntp/CommitLog stable/12/contrib/ntp/NEWS stable/12/contrib/ntp/config.h.in stable/12/contrib/ntp/configure stable/12/contrib/ntp/configure.ac stable/12/contrib/ntp/html/drivers/driver40-ja.html stable/12/contrib/ntp/html/drivers/driver40.html stable/12/contrib/ntp/include/l_stdlib.h stable/12/contrib/ntp/include/ntp.h stable/12/contrib/ntp/include/ntp_config.h stable/12/contrib/ntp/include/recvbuff.h stable/12/contrib/ntp/lib/isc/win32/include/isc/int.h stable/12/contrib/ntp/libntp/a_md5encrypt.c stable/12/contrib/ntp/libntp/decodenetnum.c stable/12/contrib/ntp/libntp/recvbuff.c stable/12/contrib/ntp/libntp/strdup.c stable/12/contrib/ntp/libntp/timexsup.c stable/12/contrib/ntp/ntpd/invoke-ntp.conf.texi stable/12/contrib/ntp/ntpd/invoke-ntp.keys.texi stable/12/contrib/ntp/ntpd/invoke-ntpd.texi stable/12/contrib/ntp/ntpd/ntp.conf.5man stable/12/contrib/ntp/ntpd/ntp.conf.5mdoc stable/12/contrib/ntp/ntpd/ntp.conf.html stable/12/contrib/ntp/ntpd/ntp.conf.man.in stable/12/contrib/ntp/ntpd/ntp.conf.mdoc.in stable/12/contrib/ntp/ntpd/ntp.keys.5man stable/12/contrib/ntp/ntpd/ntp.keys.5mdoc stable/12/contrib/ntp/ntpd/ntp.keys.html stable/12/contrib/ntp/ntpd/ntp.keys.man.in stable/12/contrib/ntp/ntpd/ntp.keys.mdoc.in stable/12/contrib/ntp/ntpd/ntp_config.c stable/12/contrib/ntp/ntpd/ntp_io.c stable/12/contrib/ntp/ntpd/ntp_proto.c stable/12/contrib/ntp/ntpd/ntp_refclock.c stable/12/contrib/ntp/ntpd/ntp_request.c stable/12/contrib/ntp/ntpd/ntp_timer.c stable/12/contrib/ntp/ntpd/ntpd-opts.c stable/12/contrib/ntp/ntpd/ntpd-opts.h stable/12/contrib/ntp/ntpd/ntpd.1ntpdman stable/12/contrib/ntp/ntpd/ntpd.1ntpdmdoc stable/12/contrib/ntp/ntpd/ntpd.html stable/12/contrib/ntp/ntpd/ntpd.man.in stable/12/contrib/ntp/ntpd/ntpd.mdoc.in stable/12/contrib/ntp/ntpd/refclock_jjy.c stable/12/contrib/ntp/ntpd/refclock_nmea.c stable/12/contrib/ntp/ntpd/refclock_palisade.c stable/12/contrib/ntp/ntpd/refclock_parse.c stable/12/contrib/ntp/ntpdate/ntpdate.c stable/12/contrib/ntp/ntpdc/invoke-ntpdc.texi stable/12/contrib/ntp/ntpdc/ntpdc-opts.c stable/12/contrib/ntp/ntpdc/ntpdc-opts.h stable/12/contrib/ntp/ntpdc/ntpdc.1ntpdcman stable/12/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc stable/12/contrib/ntp/ntpdc/ntpdc.html stable/12/contrib/ntp/ntpdc/ntpdc.man.in stable/12/contrib/ntp/ntpdc/ntpdc.mdoc.in stable/12/contrib/ntp/ntpq/invoke-ntpq.texi stable/12/contrib/ntp/ntpq/ntpq-opts.c stable/12/contrib/ntp/ntpq/ntpq-opts.h stable/12/contrib/ntp/ntpq/ntpq.1ntpqman stable/12/contrib/ntp/ntpq/ntpq.1ntpqmdoc stable/12/contrib/ntp/ntpq/ntpq.html stable/12/contrib/ntp/ntpq/ntpq.man.in stable/12/contrib/ntp/ntpq/ntpq.mdoc.in stable/12/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.html stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in stable/12/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in stable/12/contrib/ntp/packageinfo.sh stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in stable/12/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in stable/12/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi stable/12/contrib/ntp/scripts/invoke-plot_summary.texi stable/12/contrib/ntp/scripts/invoke-summary.texi stable/12/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait-opts stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.html stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in stable/12/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in stable/12/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep-opts stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.html stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in stable/12/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in stable/12/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi stable/12/contrib/ntp/scripts/ntptrace/ntptrace-opts stable/12/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman stable/12/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc stable/12/contrib/ntp/scripts/ntptrace/ntptrace.html stable/12/contrib/ntp/scripts/ntptrace/ntptrace.man.in stable/12/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in stable/12/contrib/ntp/scripts/plot_summary-opts stable/12/contrib/ntp/scripts/plot_summary.1plot_summaryman stable/12/contrib/ntp/scripts/plot_summary.1plot_summarymdoc stable/12/contrib/ntp/scripts/plot_summary.html stable/12/contrib/ntp/scripts/plot_summary.man.in stable/12/contrib/ntp/scripts/plot_summary.mdoc.in stable/12/contrib/ntp/scripts/summary-opts stable/12/contrib/ntp/scripts/summary.1summaryman stable/12/contrib/ntp/scripts/summary.1summarymdoc stable/12/contrib/ntp/scripts/summary.html stable/12/contrib/ntp/scripts/summary.man.in stable/12/contrib/ntp/scripts/summary.mdoc.in stable/12/contrib/ntp/scripts/update-leap/invoke-update-leap.texi stable/12/contrib/ntp/scripts/update-leap/update-leap-opts stable/12/contrib/ntp/scripts/update-leap/update-leap.1update-leapman stable/12/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc stable/12/contrib/ntp/scripts/update-leap/update-leap.html stable/12/contrib/ntp/scripts/update-leap/update-leap.man.in stable/12/contrib/ntp/scripts/update-leap/update-leap.mdoc.in stable/12/contrib/ntp/sntp/configure stable/12/contrib/ntp/sntp/crypto.c stable/12/contrib/ntp/sntp/include/version.def stable/12/contrib/ntp/sntp/include/version.texi stable/12/contrib/ntp/sntp/invoke-sntp.texi stable/12/contrib/ntp/sntp/m4/version.m4 stable/12/contrib/ntp/sntp/sntp-opts.c stable/12/contrib/ntp/sntp/sntp-opts.h stable/12/contrib/ntp/sntp/sntp.1sntpman stable/12/contrib/ntp/sntp/sntp.1sntpmdoc stable/12/contrib/ntp/sntp/sntp.html stable/12/contrib/ntp/sntp/sntp.man.in stable/12/contrib/ntp/sntp/sntp.mdoc.in stable/12/contrib/ntp/sntp/version.c stable/12/contrib/ntp/util/invoke-ntp-keygen.texi stable/12/contrib/ntp/util/ntp-keygen-opts.c stable/12/contrib/ntp/util/ntp-keygen-opts.h stable/12/contrib/ntp/util/ntp-keygen.1ntp-keygenman stable/12/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc stable/12/contrib/ntp/util/ntp-keygen.html stable/12/contrib/ntp/util/ntp-keygen.man.in stable/12/contrib/ntp/util/ntp-keygen.mdoc.in stable/12/usr.sbin/ntp/config.h stable/12/usr.sbin/ntp/scripts/mkver Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/ntp/ChangeLog stable/11/contrib/ntp/CommitLog stable/11/contrib/ntp/NEWS stable/11/contrib/ntp/config.h.in stable/11/contrib/ntp/configure stable/11/contrib/ntp/configure.ac stable/11/contrib/ntp/html/drivers/driver40-ja.html stable/11/contrib/ntp/html/drivers/driver40.html stable/11/contrib/ntp/include/l_stdlib.h stable/11/contrib/ntp/include/ntp.h stable/11/contrib/ntp/include/ntp_config.h stable/11/contrib/ntp/include/recvbuff.h stable/11/contrib/ntp/lib/isc/win32/include/isc/int.h stable/11/contrib/ntp/libntp/a_md5encrypt.c stable/11/contrib/ntp/libntp/decodenetnum.c stable/11/contrib/ntp/libntp/recvbuff.c stable/11/contrib/ntp/libntp/strdup.c stable/11/contrib/ntp/libntp/timexsup.c stable/11/contrib/ntp/ntpd/invoke-ntp.conf.texi stable/11/contrib/ntp/ntpd/invoke-ntp.keys.texi stable/11/contrib/ntp/ntpd/invoke-ntpd.texi stable/11/contrib/ntp/ntpd/ntp.conf.5man stable/11/contrib/ntp/ntpd/ntp.conf.5mdoc stable/11/contrib/ntp/ntpd/ntp.conf.html stable/11/contrib/ntp/ntpd/ntp.conf.man.in stable/11/contrib/ntp/ntpd/ntp.conf.mdoc.in stable/11/contrib/ntp/ntpd/ntp.keys.5man stable/11/contrib/ntp/ntpd/ntp.keys.5mdoc stable/11/contrib/ntp/ntpd/ntp.keys.html stable/11/contrib/ntp/ntpd/ntp.keys.man.in stable/11/contrib/ntp/ntpd/ntp.keys.mdoc.in stable/11/contrib/ntp/ntpd/ntp_config.c stable/11/contrib/ntp/ntpd/ntp_io.c stable/11/contrib/ntp/ntpd/ntp_proto.c stable/11/contrib/ntp/ntpd/ntp_refclock.c stable/11/contrib/ntp/ntpd/ntp_request.c stable/11/contrib/ntp/ntpd/ntp_timer.c stable/11/contrib/ntp/ntpd/ntpd-opts.c stable/11/contrib/ntp/ntpd/ntpd-opts.h stable/11/contrib/ntp/ntpd/ntpd.1ntpdman stable/11/contrib/ntp/ntpd/ntpd.1ntpdmdoc stable/11/contrib/ntp/ntpd/ntpd.html stable/11/contrib/ntp/ntpd/ntpd.man.in stable/11/contrib/ntp/ntpd/ntpd.mdoc.in stable/11/contrib/ntp/ntpd/refclock_jjy.c stable/11/contrib/ntp/ntpd/refclock_nmea.c stable/11/contrib/ntp/ntpd/refclock_palisade.c stable/11/contrib/ntp/ntpd/refclock_parse.c stable/11/contrib/ntp/ntpdate/ntpdate.c stable/11/contrib/ntp/ntpdc/invoke-ntpdc.texi stable/11/contrib/ntp/ntpdc/ntpdc-opts.c stable/11/contrib/ntp/ntpdc/ntpdc-opts.h stable/11/contrib/ntp/ntpdc/ntpdc.1ntpdcman stable/11/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc stable/11/contrib/ntp/ntpdc/ntpdc.html stable/11/contrib/ntp/ntpdc/ntpdc.man.in stable/11/contrib/ntp/ntpdc/ntpdc.mdoc.in stable/11/contrib/ntp/ntpq/invoke-ntpq.texi stable/11/contrib/ntp/ntpq/ntpq-opts.c stable/11/contrib/ntp/ntpq/ntpq-opts.h stable/11/contrib/ntp/ntpq/ntpq.1ntpqman stable/11/contrib/ntp/ntpq/ntpq.1ntpqmdoc stable/11/contrib/ntp/ntpq/ntpq.html stable/11/contrib/ntp/ntpq/ntpq.man.in stable/11/contrib/ntp/ntpq/ntpq.mdoc.in stable/11/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.html stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in stable/11/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in stable/11/contrib/ntp/packageinfo.sh stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in stable/11/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in stable/11/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi stable/11/contrib/ntp/scripts/invoke-plot_summary.texi stable/11/contrib/ntp/scripts/invoke-summary.texi stable/11/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait-opts stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.html stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in stable/11/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in stable/11/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep-opts stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.html stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in stable/11/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in stable/11/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi stable/11/contrib/ntp/scripts/ntptrace/ntptrace-opts stable/11/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman stable/11/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc stable/11/contrib/ntp/scripts/ntptrace/ntptrace.html stable/11/contrib/ntp/scripts/ntptrace/ntptrace.man.in stable/11/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in stable/11/contrib/ntp/scripts/plot_summary-opts stable/11/contrib/ntp/scripts/plot_summary.1plot_summaryman stable/11/contrib/ntp/scripts/plot_summary.1plot_summarymdoc stable/11/contrib/ntp/scripts/plot_summary.html stable/11/contrib/ntp/scripts/plot_summary.man.in stable/11/contrib/ntp/scripts/plot_summary.mdoc.in stable/11/contrib/ntp/scripts/summary-opts stable/11/contrib/ntp/scripts/summary.1summaryman stable/11/contrib/ntp/scripts/summary.1summarymdoc stable/11/contrib/ntp/scripts/summary.html stable/11/contrib/ntp/scripts/summary.man.in stable/11/contrib/ntp/scripts/summary.mdoc.in stable/11/contrib/ntp/scripts/update-leap/invoke-update-leap.texi stable/11/contrib/ntp/scripts/update-leap/update-leap-opts stable/11/contrib/ntp/scripts/update-leap/update-leap.1update-leapman stable/11/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc stable/11/contrib/ntp/scripts/update-leap/update-leap.html stable/11/contrib/ntp/scripts/update-leap/update-leap.man.in stable/11/contrib/ntp/scripts/update-leap/update-leap.mdoc.in stable/11/contrib/ntp/sntp/configure stable/11/contrib/ntp/sntp/crypto.c stable/11/contrib/ntp/sntp/include/version.def stable/11/contrib/ntp/sntp/include/version.texi stable/11/contrib/ntp/sntp/invoke-sntp.texi stable/11/contrib/ntp/sntp/m4/version.m4 stable/11/contrib/ntp/sntp/sntp-opts.c stable/11/contrib/ntp/sntp/sntp-opts.h stable/11/contrib/ntp/sntp/sntp.1sntpman stable/11/contrib/ntp/sntp/sntp.1sntpmdoc stable/11/contrib/ntp/sntp/sntp.html stable/11/contrib/ntp/sntp/sntp.man.in stable/11/contrib/ntp/sntp/sntp.mdoc.in stable/11/contrib/ntp/sntp/version.c stable/11/contrib/ntp/util/invoke-ntp-keygen.texi stable/11/contrib/ntp/util/ntp-keygen-opts.c stable/11/contrib/ntp/util/ntp-keygen-opts.h stable/11/contrib/ntp/util/ntp-keygen.1ntp-keygenman stable/11/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc stable/11/contrib/ntp/util/ntp-keygen.html stable/11/contrib/ntp/util/ntp-keygen.man.in stable/11/contrib/ntp/util/ntp-keygen.mdoc.in stable/11/usr.sbin/ntp/config.h stable/11/usr.sbin/ntp/scripts/mkver Directory Properties: stable/11/ (props changed) Modified: stable/12/contrib/ntp/ChangeLog ============================================================================== --- stable/12/contrib/ntp/ChangeLog Sun Jun 28 02:38:07 2020 (r362715) +++ stable/12/contrib/ntp/ChangeLog Sun Jun 28 03:28:28 2020 (r362716) @@ -1,4 +1,33 @@ --- +(4.2.8p15) 2020/06/23 Released by Harlan Stenn +(4.2.8p15) 2020/06/23 Released by Harlan Stenn + +* [Sec 3661] memory leak with AES128CMAC keys +* [Bug 3670] Regression from bad merge of 3592 and 3596 + - fixed a bad merge that happened before 4.2.8-p14. Thanks to + Sylar Tao for noticing this! +* [Bug 3667] decodenetnum fails with numeric port + - rewrite 'decodenetnum()' in terms of inet_pton +* [Bug 3666] avoid unlimited receive buffer allocation + - limit number of receive buffers, with an iron reserve for refclocks +* [Bug 3664] Enable openSSL CMAC support on Windows +* [Bug 3662] Fix build errors on Windows with VS2008 +* [Bug 3660] Manycast orphan mode startup discovery problem. + - integrated patch from Charles Claggett +* [Bug 3659] Move definition of psl[] from ntp_config.h to + ntp_config.h +* [Bug 3657] Wrong "Autokey group mismatch" debug message +* [Bug 3655] ntpdc memstats hash counts + - fix by Gerry garvey +* [Bug 3653] Refclock jitter RMS calculation + - thanks to Gerry Garvey +* [Bug 3646] Avoid sync with unsync orphan + - patch by Gerry Garvey +* [Bug 3644] Unsynchronized server [...] selected as candidate +* [Bug 3639] refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. + - applied patch by Takao Abe + +--- (4.2.8p14) 2020/03/03 Released by Harlan Stenn * [Sec 3610] process_control() should bail earlier on short packets. stenn@ Modified: stable/12/contrib/ntp/CommitLog ============================================================================== --- stable/12/contrib/ntp/CommitLog Sun Jun 28 02:38:07 2020 (r362715) +++ stable/12/contrib/ntp/CommitLog Sun Jun 28 03:28:28 2020 (r362716) @@ -1,3 +1,700 @@ +ChangeSet@1.3911, 2020-06-23 02:22:19-07:00, ntpreleng@ntp-build.tal1.ntfo.org + NTP_4_2_8P15 + TAG: NTP_4_2_8P15 + + ChangeLog@1.1985 +1 -0 + NTP_4_2_8P15 + + ntpd/invoke-ntp.conf.texi@1.222 +1 -1 + NTP_4_2_8P15 + + ntpd/invoke-ntp.keys.texi@1.207 +1 -1 + NTP_4_2_8P15 + + ntpd/invoke-ntpd.texi@1.521 +2 -2 + NTP_4_2_8P15 + + ntpd/ntp.conf.5man@1.256 +2 -2 + NTP_4_2_8P15 + + ntpd/ntp.conf.5mdoc@1.256 +2 -2 + NTP_4_2_8P15 + + ntpd/ntp.conf.html@1.204 +1 -1 + NTP_4_2_8P15 + + ntpd/ntp.conf.man.in@1.256 +2 -2 + NTP_4_2_8P15 + + ntpd/ntp.conf.mdoc.in@1.256 +2 -2 + NTP_4_2_8P15 + + ntpd/ntp.keys.5man@1.241 +2 -2 + NTP_4_2_8P15 + + ntpd/ntp.keys.5mdoc@1.241 +2 -2 + NTP_4_2_8P15 + + ntpd/ntp.keys.html@1.202 +1 -1 + NTP_4_2_8P15 + + ntpd/ntp.keys.man.in@1.241 +2 -2 + NTP_4_2_8P15 + + ntpd/ntp.keys.mdoc.in@1.241 +2 -2 + NTP_4_2_8P15 + + ntpd/ntpd-opts.c@1.544 +7 -7 + NTP_4_2_8P15 + + ntpd/ntpd-opts.h@1.543 +3 -3 + NTP_4_2_8P15 + + ntpd/ntpd.1ntpdman@1.350 +2 -2 + NTP_4_2_8P15 + + ntpd/ntpd.1ntpdmdoc@1.350 +2 -2 + NTP_4_2_8P15 + + ntpd/ntpd.html@1.195 +2 -2 + NTP_4_2_8P15 + + ntpd/ntpd.man.in@1.350 +2 -2 + NTP_4_2_8P15 + + ntpd/ntpd.mdoc.in@1.350 +2 -2 + NTP_4_2_8P15 + + ntpdc/invoke-ntpdc.texi@1.518 +2 -2 + NTP_4_2_8P15 + + ntpdc/ntpdc-opts.c@1.537 +7 -7 + NTP_4_2_8P15 + + ntpdc/ntpdc-opts.h@1.536 +3 -3 + NTP_4_2_8P15 + + ntpdc/ntpdc.1ntpdcman@1.349 +2 -2 + NTP_4_2_8P15 + + ntpdc/ntpdc.1ntpdcmdoc@1.349 +2 -2 + NTP_4_2_8P15 + + ntpdc/ntpdc.html@1.364 +2 -2 + NTP_4_2_8P15 + + ntpdc/ntpdc.man.in@1.349 +2 -2 + NTP_4_2_8P15 + + ntpdc/ntpdc.mdoc.in@1.349 +2 -2 + NTP_4_2_8P15 + + ntpq/invoke-ntpq.texi@1.528 +2 -2 + NTP_4_2_8P15 + + ntpq/ntpq-opts.c@1.546 +7 -7 + NTP_4_2_8P15 + + ntpq/ntpq-opts.h@1.544 +3 -3 + NTP_4_2_8P15 + + ntpq/ntpq.1ntpqman@1.356 +2 -2 + NTP_4_2_8P15 + + ntpq/ntpq.1ntpqmdoc@1.356 +2 -2 + NTP_4_2_8P15 + + ntpq/ntpq.html@1.195 +2 -2 + NTP_4_2_8P15 + + ntpq/ntpq.man.in@1.356 +2 -2 + NTP_4_2_8P15 + + ntpq/ntpq.mdoc.in@1.356 +2 -2 + NTP_4_2_8P15 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.520 +1 -1 + NTP_4_2_8P15 + + ntpsnmpd/ntpsnmpd-opts.c@1.539 +7 -7 + NTP_4_2_8P15 + + ntpsnmpd/ntpsnmpd-opts.h@1.538 +3 -3 + NTP_4_2_8P15 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.349 +2 -2 + NTP_4_2_8P15 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.349 +2 -2 + NTP_4_2_8P15 + + ntpsnmpd/ntpsnmpd.html@1.188 +1 -1 + NTP_4_2_8P15 + + ntpsnmpd/ntpsnmpd.man.in@1.349 +2 -2 + NTP_4_2_8P15 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.349 +2 -2 + NTP_4_2_8P15 + + packageinfo.sh@1.546 +2 -2 + NTP_4_2_8P15 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.110 +2 -2 + NTP_4_2_8P15 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.111 +2 -2 + NTP_4_2_8P15 + + scripts/calc_tickadj/calc_tickadj.html@1.111 +1 -1 + NTP_4_2_8P15 + + scripts/calc_tickadj/calc_tickadj.man.in@1.109 +2 -2 + NTP_4_2_8P15 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.111 +2 -2 + NTP_4_2_8P15 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.114 +1 -1 + NTP_4_2_8P15 + + scripts/invoke-plot_summary.texi@1.132 +2 -2 + NTP_4_2_8P15 + + scripts/invoke-summary.texi@1.131 +2 -2 + NTP_4_2_8P15 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.342 +2 -2 + NTP_4_2_8P15 + + scripts/ntp-wait/ntp-wait-opts@1.78 +2 -2 + NTP_4_2_8P15 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.338 +2 -2 + NTP_4_2_8P15 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.339 +2 -2 + NTP_4_2_8P15 + + scripts/ntp-wait/ntp-wait.html@1.360 +2 -2 + NTP_4_2_8P15 + + scripts/ntp-wait/ntp-wait.man.in@1.338 +2 -2 + NTP_4_2_8P15 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.339 +2 -2 + NTP_4_2_8P15 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.129 +2 -2 + NTP_4_2_8P15 + + scripts/ntpsweep/ntpsweep-opts@1.80 +2 -2 + NTP_4_2_8P15 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.117 +2 -2 + NTP_4_2_8P15 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.117 +2 -2 + NTP_4_2_8P15 + + scripts/ntpsweep/ntpsweep.html@1.132 +2 -2 + NTP_4_2_8P15 + + scripts/ntpsweep/ntpsweep.man.in@1.117 +2 -2 + NTP_4_2_8P15 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.118 +2 -2 + NTP_4_2_8P15 + + scripts/ntptrace/invoke-ntptrace.texi@1.131 +2 -2 + NTP_4_2_8P15 + + scripts/ntptrace/ntptrace-opts@1.80 +2 -2 + NTP_4_2_8P15 + + scripts/ntptrace/ntptrace.1ntptraceman@1.117 +2 -2 + NTP_4_2_8P15 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.118 +2 -2 + NTP_4_2_8P15 + + scripts/ntptrace/ntptrace.html@1.133 +2 -2 + NTP_4_2_8P15 + + scripts/ntptrace/ntptrace.man.in@1.117 +2 -2 + NTP_4_2_8P15 + + scripts/ntptrace/ntptrace.mdoc.in@1.119 +2 -2 + NTP_4_2_8P15 + + scripts/plot_summary-opts@1.81 +2 -2 + NTP_4_2_8P15 + + scripts/plot_summary.1plot_summaryman@1.130 +2 -2 + NTP_4_2_8P15 + + scripts/plot_summary.1plot_summarymdoc@1.130 +2 -2 + NTP_4_2_8P15 + + scripts/plot_summary.html@1.135 +2 -2 + NTP_4_2_8P15 + + scripts/plot_summary.man.in@1.130 +2 -2 + NTP_4_2_8P15 + + scripts/plot_summary.mdoc.in@1.130 +2 -2 + NTP_4_2_8P15 + + scripts/summary-opts@1.80 +2 -2 + NTP_4_2_8P15 + + scripts/summary.1summaryman@1.129 +2 -2 + NTP_4_2_8P15 + + scripts/summary.1summarymdoc@1.129 +2 -2 + NTP_4_2_8P15 + + scripts/summary.html@1.134 +2 -2 + NTP_4_2_8P15 + + scripts/summary.man.in@1.129 +2 -2 + NTP_4_2_8P15 + + scripts/summary.mdoc.in@1.129 +2 -2 + NTP_4_2_8P15 + + scripts/update-leap/invoke-update-leap.texi@1.30 +1 -1 + NTP_4_2_8P15 + + scripts/update-leap/update-leap-opts@1.31 +2 -2 + NTP_4_2_8P15 + + scripts/update-leap/update-leap.1update-leapman@1.30 +2 -2 + NTP_4_2_8P15 + + scripts/update-leap/update-leap.1update-leapmdoc@1.30 +2 -2 + NTP_4_2_8P15 + + scripts/update-leap/update-leap.html@1.31 +1 -1 + NTP_4_2_8P15 + + scripts/update-leap/update-leap.man.in@1.30 +2 -2 + NTP_4_2_8P15 + + scripts/update-leap/update-leap.mdoc.in@1.30 +2 -2 + NTP_4_2_8P15 + + sntp/invoke-sntp.texi@1.520 +2 -2 + NTP_4_2_8P15 + + sntp/sntp-opts.c@1.540 +7 -7 + NTP_4_2_8P15 + + sntp/sntp-opts.h@1.538 +3 -3 + NTP_4_2_8P15 + + sntp/sntp.1sntpman@1.355 +2 -2 + NTP_4_2_8P15 + + sntp/sntp.1sntpmdoc@1.355 +2 -2 + NTP_4_2_8P15 + + sntp/sntp.html@1.536 +2 -2 + NTP_4_2_8P15 + + sntp/sntp.man.in@1.355 +2 -2 + NTP_4_2_8P15 + + sntp/sntp.mdoc.in@1.355 +2 -2 + NTP_4_2_8P15 + + util/invoke-ntp-keygen.texi@1.523 +2 -2 + NTP_4_2_8P15 + + util/ntp-keygen-opts.c@1.542 +7 -7 + NTP_4_2_8P15 + + util/ntp-keygen-opts.h@1.540 +3 -3 + NTP_4_2_8P15 + + util/ntp-keygen.1ntp-keygenman@1.351 +2 -2 + NTP_4_2_8P15 + + util/ntp-keygen.1ntp-keygenmdoc@1.351 +2 -2 + NTP_4_2_8P15 + + util/ntp-keygen.html@1.196 +2 -2 + NTP_4_2_8P15 + + util/ntp-keygen.man.in@1.351 +2 -2 + NTP_4_2_8P15 + + util/ntp-keygen.mdoc.in@1.351 +2 -2 + NTP_4_2_8P15 + +ChangeSet@1.3910, 2020-06-23 02:05:32-07:00, ntpreleng@ntp-build.tal1.ntfo.org + ntp-4.2.8p15 + + packageinfo.sh@1.545 +1 -1 + ntp-4.2.8p15 + +ChangeSet@1.3908, 2020-06-09 07:12:27-04:00, stenn@psp-deb2.ntp.org + p15 updates + + ChangeLog@1.1983 +1 -1 + p15 updates + + NEWS@1.214 +1 -1 + p15 updates + +ChangeSet@1.3896.1.22, 2020-06-09 07:09:18-04:00, stenn@psp-deb2.ntp.org + 3670 + + ChangeLog@1.1974.1.14 +1 -1 + 3670 + + NEWS@1.205.1.7 +3 -1 + 3670 + +ChangeSet@1.3896.1.21, 2020-06-09 08:39:26+02:00, perlinger@ntp.org + [Bug 3670] Deleted statements come back + + ChangeLog@1.1974.1.13 +3 -0 + [Bug 3670] Deleted statements come back + + ntpd/ntp_proto.c@1.437 +4 -19 + [Bug 3670] Deleted statements come back + +ChangeSet@1.3906, 2020-05-31 09:52:14+00:00, stenn@psp-deb1.ntp.org + update the expected releease date + + NEWS@1.213 +1 -1 + update the expected releease date + +ChangeSet@1.3896.9.3, 2020-05-31 09:49:39+00:00, stenn@psp-deb1.ntp.org + Update ChangeLog and NEWS files for 3644 + + ChangeLog@1.1974.1.12 +1 -3 + Update ChangeLog and NEWS files for 3644 + + NEWS@1.205.1.6 +2 -1 + Update ChangeLog and NEWS files for 3644 + +ChangeSet@1.3896.9.2, 2020-05-31 09:47:05+00:00, stenn@psp-deb1.ntp.org + [Bug 3644]: Do we want to log an event in this case? + + ntpd/ntp_timer.c@1.99 +2 -0 + [Bug 3644]: Do we want to log an event in this case? + +ChangeSet@1.3896.9.1, 2020-05-31 11:13:45+02:00, perlinger@ntp.org + [Bug 3644] Unsynchronized server (minsane not satisfied) selected as candidate + + ChangeLog@1.1974.1.11 +3 -0 + [Bug 3644] Unsynchronized server (minsane not satisfied) selected as candidate + + include/ntp.h@1.233 +1 -1 + [Bug 3644] Unsynchronized server [...] selected as candidate + - comment typo + + ntpd/ntp_proto.c@1.436 +2 -3 + [Bug 3644] Unsynchronized server (minsane not satisfied) selected as candidate + + ntpd/ntp_timer.c@1.98 +24 -9 + [Bug 3644] Unsynchronized server (minsane not satisfied) selected as candidate + - according to DLM, we should go S16/UNSYNCED if we have no proper orphan config + +ChangeSet@1.3896.1.19, 2020-05-25 12:42:46+02:00, nb241700@md2g3rcc.ad001.siemens.net + [Bug 3667] decodenetnum fails with numeric port + - windows compilation issues + + libntp/decodenetnum.c@1.21 +1 -1 + [Bug 3667] decodenetnum fails with numeric port + - windows compilation issues ('sa_family_t' is POSIX, now ANSI/MSVC) + + libntp/strdup.c@1.11 +3 -3 + [Bug 3667] decodenetnum fails with numeric port + - windows compilation issues (typo+cast in memchr replacement) + + ports/winnt/include/config.h@1.117 +2 -0 + [Bug 3667] decodenetnum fails with numeric port + - windows compilation issues (have memchr() and strnlen() in MSVC) + +ChangeSet@1.3896.1.18, 2020-05-22 06:07:28+00:00, stenn@psp-deb1.ntp.org + Update NEWS file with 3667 + + NEWS@1.205.1.5 +3 -1 + Update NEWS file with 3667 + +ChangeSet@1.3896.1.17, 2020-05-22 06:05:45+00:00, stenn@psp-deb1.ntp.org + cleanup + + ChangeLog@1.1974.1.10 +2 -4 + cleanup + +ChangeSet@1.3896.1.16, 2020-05-22 06:04:57+00:00, stenn@psp-deb1.ntp.org + indentation tweaks + + tests/libntp/sockaddrtest.c@1.5 +7 -7 + indentation tweaks + +ChangeSet@1.3896.1.15, 2020-05-20 09:44:15+02:00, perlinger@ntp.org + [Bug 3667] decodenetnum fails with numeric port + + ChangeLog@1.1974.1.9 +4 -0 + [Bug 3667] decodenetnum fails with numeric port + + configure.ac@1.619 +1 -1 + [Bug 3667] decodenetnum fails with numeric port + sidekick: implement strnlen() and memchr() for ancient hosts (pogo.udel.edu...) + + include/l_stdlib.h@1.21 +9 -0 + [Bug 3667] decodenetnum fails with numeric port + sidekick: implement strnlen() and memchr() for ancient hosts (pogo.udel.edu...) + + libntp/decodenetnum.c@1.20 +123 -77 + [Bug 3667] decodenetnum fails with numeric port + - rewrite in terms of inet_pton() and strtoul(), no getaddrinfo() any more + + libntp/strdup.c@1.10 +29 -3 + [Bug 3667] decodenetnum fails with numeric port + sidekick: implement strnlen() and memchr() for ancient hosts (pogo.udel.edu...) + + tests/libntp/decodenetnum.c@1.13 +94 -6 + [Bug 3667] decodenetnum fails with numeric port + - additional tests + + tests/libntp/netof.c@1.10 +2 -0 + Bug 3667 - decodenetnum fails with numeric port + - clear address buffers before use + + tests/libntp/run-decodenetnum.c@1.14 +8 -2 + [Bug 3667] decodenetnum fails with numeric port + - regenerated + + tests/libntp/sockaddrtest.c@1.4 +2 -1 + [Bug 3667] decodenetnum fails with numeric port + - include scope id in IPv6 compare + +ChangeSet@1.3896.1.14, 2020-05-14 03:45:40-07:00, harlan@psp-at0.tal1.ntfo.org + Added 3660 to the NEWS file + + NEWS@1.205.1.4 +3 -1 + Added 3660 to the NEWS file + +ChangeSet@1.3896.8.1, 2020-05-14 03:14:44-07:00, harlan@psp-at0.tal1.ntfo.org + [Bug 3660] Manycast orphan mode startup discovery problem + + ChangeLog@1.1974.8.1 +5 -0 + [Bug 3660] Manycast orphan mode startup discovery problem + + ntpd/ntp_proto.c@1.432.2.1 +2 -1 + [Bug 3660] Manycast orphan mode startup discovery problem + +ChangeSet@1.3896.1.12, 2020-05-10 11:26:21+00:00, stenn@psp-deb1.ntp.org + Update NEWS + + NEWS@1.205.1.3 +3 -1 + Update NEWS + +ChangeSet@1.3896.1.11, 2020-05-10 09:44:50+00:00, stenn@psp-deb1.ntp.org + Merge cleanup + + ChangeLog@1.1974.1.7 +2 -4 + Merge cleanup + +ChangeSet@1.3896.1.10, 2020-05-09 08:20:44+02:00, perlinger@ntp.org + [Bug 3666] avoid unlimited receive buffer allocation + + BitKeeper/etc/ignore@1.95 +1 -0 + [Bug 3666] avoid unlimited receive buffer allocation + - (sidekick) ignore the '.vs' directory of VS2017 & above + + ChangeLog@1.1974.1.6 +4 -0 + [Bug 3666] avoid unlimited receive buffer allocation + + include/recvbuff.h@1.28 +23 -7 + [Bug 3666] avoid unlimited receive buffer allocation + - buffer count limit is 4096 now, always enforced + - API change for urgent buffers + + lib/isc/win32/include/isc/int.h@1.5 +3 -1 + [Bug 3666] avoid unlimited receive buffer allocation + - (sidekick) define standard reserved macros only if not yet defined! + + libntp/recvbuff.c@1.44 +131 -73 + [Bug 3666] avoid unlimited receive buffer allocation + - don't exceed RECV_TOOMANY allocated buffers + - keep emergency reserve for clocks + + libntp/timexsup.c@1.3 +3 -4 + [bug 3666] avoid unlimited receive buffer allocation + - (sidekick) fix some warnings of clang on lp64 targets + + ntpd/ntp_io.c@1.432 +23 -13 + [Bug 3666] avoid unlimited receive buffer allocation + - support urgent buffer reserve for refclocks + + ntpd/refclock_parse.c@1.89 +1 -1 + [Bug 3666] avoid unlimited receive buffer allocation + - support urgent buffer reserve for refclocks + + ntpdate/ntpdate.c@1.106 +1 -1 + [Bug 3666] avoid unlimited receive buffer allocation + - get_free_recv_buffer() API change + + ports/winnt/libntp/messages.h@1.3 +1 -1 + [Bug 3666] avoid unlimited receive buffer allocation + - (sidekick) regenerated + + ports/winnt/ntpd/ntp_iocompletionport.c@1.81 +63 -38 + [Bug 3666] avoid unlimited receive buffer allocation + - reuse last buffer ASAP if no new buffer available + - typos and some internal renaming + + tests/libntp/recvbuff.c@1.8 +2 -2 + [Bug 3666] avoid unlimited receive buffer allocation + - internal API changes + +ChangeSet@1.3896.1.9, 2020-05-05 03:53:50+00:00, stenn@psp-deb1.ntp.org + Update NEWS with 3639 + + NEWS@1.205.1.2 +3 -1 + Update NEWS with 3639 + +ChangeSet@1.3896.1.7, 2020-04-20 08:14:39+00:00, stenn@psp-deb1.ntp.org + NEWS and bug 3664 + + NEWS@1.205.1.1 +2 -1 + NEWS and bug 3664 + +ChangeSet@1.3896.7.1, 2020-04-16 17:50:44+02:00, burnicki@psp-deb1.ntp.org + Enable openSSL CMAC support on Windows. + + ChangeLog@1.1974.7.1 +2 -0 + Enable openSSL CMAC support on Windows. + + ports/winnt/include/config.h@1.116 +2 -0 + Enable openSSL CMAC support on Windows. + +ChangeSet@1.3899, 2020-04-11 09:59:23+00:00, stenn@psp-deb1.ntp.org + update + + NEWS@1.206 +1 -0 + update + +ChangeSet@1.3896.1.5, 2020-04-11 09:35:19+00:00, stenn@psp-deb1.ntp.org + update + + NEWS@1.205 +2 -2 + update + +ChangeSet@1.3896.1.3, 2020-04-11 08:10:59+00:00, stenn@psp-deb1.ntp.org + update + + NEWS@1.204 +3 -1 + update + +ChangeSet@1.3896.2.3, 2020-04-11 07:21:36+00:00, stenn@psp-deb1.ntp.org + update + + NEWS@1.203 +1 -0 + update + +ChangeSet@1.3896.3.3, 2020-04-11 07:12:47+00:00, stenn@psp-deb1.ntp.org + update + + NEWS@1.202 +22 -0 + update + +ChangeSet@1.3896.6.4, 2020-04-07 17:51:25+02:00, burnicki@psp-deb1.ntp.org + [Bug 3662] Fix build errors on Windows with VS2008. + + ChangeLog@1.1974.6.1 +2 -0 + [Bug 3662] Fix build errors on Windows with VS2008. + +ChangeSet@1.3896.6.3, 2020-04-07 17:49:08+02:00, burnicki@psp-deb1.ntp.org + Fix unused variable warning in ntpdate.c. + + ntpdate/ntpdate.c@1.105 +2 -1 + Fix unused variable warning. + +ChangeSet@1.3896.6.2, 2020-04-07 17:48:25+02:00, burnicki@psp-deb1.ntp.org + Fix compiling refclock_palisade.c + Don't have variable declarations after code. + + ntpd/refclock_palisade.c@1.49 +25 -23 + Don't have variable declarations after code. + +ChangeSet@1.3896.6.1, 2020-04-07 17:47:02+02:00, burnicki@psp-deb1.ntp.org + Fix prototype in ntpd/refclock_nmea.c + + ntpd/refclock_nmea.c@1.85 +1 -1 + Fix prototype in ntpd/refclock_nmea.c + +ChangeSet@1.3896.5.1, 2020-04-05 10:10:12+02:00, perlinger@ntp.org + [Bug 3646] Avoid sync with unsync orphan + + ChangeLog@1.1974.5.1 +4 -0 + [Bug 3646] Avoid sync with unsync orphan + + ntpd/ntp_proto.c@1.432.1.1 +21 -0 + [Bug 3646] Avoid sync with unsync orphan + +ChangeSet@1.3896.4.1, 2020-04-05 09:53:25+02:00, perlinger@ntp.org + [Bug 3653] Refclock jitter RMS calculation + + ChangeLog@1.1974.4.1 +4 -0 + [Bug 3653] Refclock jitter RMS calculation + + ntpd/ntp_refclock.c@1.132 +36 -36 + [Bug 3653] Refclock jitter RMS calculation + +ChangeSet@1.3896.3.1, 2020-04-04 08:57:51+02:00, perlinger@ntp.org + [Bug 3655] ntpdc memstats hash counts + + ChangeLog@1.1974.3.1 +4 -0 + [Bug 3655] ntpdc memstats hash counts + + ntpd/ntp_request.c@1.132 +1 -1 + [Bug 3655] ntpdc memstats hash counts + +ChangeSet@1.3896.2.1, 2020-04-04 08:48:51+02:00, perlinger@ntp.org + [Bug 3657] Wrong "Autokey group mismatch" debug message + + ChangeLog@1.1974.2.1 +3 -0 + [Bug 3657] Wrong "Autokey group mismatch" debug message + + ntpd/ntp_proto.c@1.433 +3 -2 + [Bug 3657] Wrong "Autokey group mismatch" debug message + +ChangeSet@1.3896.1.1, 2020-04-04 08:38:06+02:00, perlinger@ntp.org + [Bug 3659] ntp-4.2.8p14 fails to build + + ChangeLog@1.1974.1.1 +3 -0 + [Bug 3659] ntp-4.2.8p14 fails to build + + include/ntp_config.h@1.90 +0 -10 + [Bug 3659] ntp-4.2.8p14 fails to build + - move global declaration of 'psl' from header to static declaration in code + + ntpd/ntp_config.c@1.376 +10 -0 + [Bug 3659] ntp-4.2.8p14 fails to build + - move global declaration of 'psl' from header to static declaration in code + +ChangeSet@1.3897, 2020-04-01 16:49:43+02:00, perlinger@ntp.org + [Bug 3661] memory leak with AES128CMAC keys + + ChangeLog@1.1975 +3 -0 + [Bug 3661] memory leak with AES128CMAC keys + + libntp/a_md5encrypt.c@1.52 +1 -1 + [Bug 3661] memory leak with AES128CMAC keys + - free context, not just cleaning up internally + + sntp/crypto.c@1.40 +2 -1 + [Bug 3661] memory leak with AES128CMAC keys + - free context, not just cleaning up internally + ChangeSet@1.3896, 2020-03-03 17:42:43-08:00, ntpreleng@ntp-build.tal1.ntfo.org NTP_4_2_8P14 TAG: NTP_4_2_8P14 @@ -675,7 +1372,7 @@ ChangeSet@1.3892, 2020-03-03 16:05:38-08:00, ntpreleng ntpd/ntp_config.c@1.374 +2 -2 provide get_pollskew() for simulator -ChangeSet@1.3844.24.1, 2020-03-03 03:30:13-08:00, ntpreleng@ntp-build.tal1.ntfo.org +ChangeSet@1.3844.25.1, 2020-03-03 03:30:13-08:00, ntpreleng@ntp-build.tal1.ntfo.org NTP_4_2_8P13 TAG: NTP_4_2_8P13 (currently on 1.3894) @@ -933,7 +1630,7 @@ ChangeSet@1.3880, 2020-02-17 08:48:45+00:00, stenn@psp ChangeSet@1.3879, 2020-02-17 08:11:42+00:00, stenn@psp-deb1.ntp.org updates - ChangeLog@1.1968.34.1 +2 -0 + ChangeLog@1.1968.35.1 +2 -0 ChangeSet@1.3877.1.2, 2020-02-08 23:00:11+00:00, stenn@psp-deb1.ntp.org html/confopt.html cleanup @@ -1288,6 +1985,22 @@ ChangeSet@1.3878, 2020-01-29 06:03:13+00:00, stenn@psp ntpd/ntp_proto.c@1.427.1.1 +8 -0 Initial pass at fixes for bug 3596 + +ChangeSet@1.3844.24.1, 2020-01-21 12:49:14+00:00, abe@psp-deb1.ntp.org + driver40.html, refclock_jjy.c, driver40-ja.html, ChangeLog: + refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. + + ChangeLog@1.1968.34.1 +3 -0 + refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. + + html/drivers/driver40-ja.html@1.8 +10 -2 + refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. + + html/drivers/driver40.html@1.23 +9 -2 + refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. + + ntpd/refclock_jjy.c@1.37 +76 -32 + refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. ChangeSet@1.3873.4.2, 2020-01-18 04:46:30-05:00, stenn@psp-deb2.ntp.org [Bug 3637] Emit the version of ntpd in saveconfig Modified: stable/12/contrib/ntp/NEWS ============================================================================== --- stable/12/contrib/ntp/NEWS Sun Jun 28 02:38:07 2020 (r362715) +++ stable/12/contrib/ntp/NEWS Sun Jun 28 03:28:28 2020 (r362716) @@ -1,4 +1,42 @@ --- +NTP 4.2.8p15 (Harlan Stenn , 2020 Jun 23) + +Focus: Security, Bug fixes + +Severity: MEDIUM + +This release fixes one vulnerability: Associations that use CMAC +authentication between ntpd from versions 4.2.8p11/4.3.97 and +4.2.8p14/4.3.100 will leak a small amount of memory for each packet. +Eventually, ntpd will run out of memory and abort. + +It also fixes 13 other bugs. + +* [Sec 3661] memory leak with AES128CMAC keys +* [Bug 3670] Regression from bad merger between 3592 and 3596 + - Thanks to Sylar Tao +* [Bug 3667] decodenetnum fails with numeric port + - rewrite 'decodenetnum()' in terms of inet_pton +* [Bug 3666] avoid unlimited receive buffer allocation + - limit number of receive buffers, with an iron reserve for refclocks +* [Bug 3664] Enable openSSL CMAC support on Windows +* [Bug 3662] Fix build errors on Windows with VS2008 +* [Bug 3660] Manycast orphan mode startup discovery problem. + - integrated patch from Charles Claggett +* [Bug 3659] Move definition of psl[] from ntp_config.h to + ntp_config.h +* [Bug 3657] Wrong "Autokey group mismatch" debug message +* [Bug 3655] ntpdc memstats hash counts + - fix by Gerry garvey +* [Bug 3653] Refclock jitter RMS calculation + - thanks to Gerry Garvey +* [Bug 3646] Avoid sync with unsync orphan + - patch by Gerry Garvey +* [Bug 3644] Unsynchronized server [...] selected as candidate +* [Bug 3639] refclock_jjy: TS-JJY0x can skip time sync depending on the STUS reply. + - applied patch by Takao Abe + +--- NTP 4.2.8p14 (Harlan Stenn , 2020 Mar 03) Focus: Security, Bug fixes, enhancements. Modified: stable/12/contrib/ntp/config.h.in ============================================================================== --- stable/12/contrib/ntp/config.h.in Sun Jun 28 02:38:07 2020 (r362715) +++ stable/12/contrib/ntp/config.h.in Sun Jun 28 03:28:28 2020 (r362716) @@ -583,6 +583,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MD5_H +/* Define to 1 if you have the `memchr' function. */ +#undef HAVE_MEMCHR + /* Define to 1 if you have the `memlk' function. */ #undef HAVE_MEMLK @@ -894,6 +897,9 @@ /* Define to 1 if you have the `strlcpy' function. */ #undef HAVE_STRLCPY + +/* Define to 1 if you have the `strnlen' function. */ +#undef HAVE_STRNLEN /* Define to 1 if you have the header file. */ #undef HAVE_STROPTS_H Modified: stable/12/contrib/ntp/configure ============================================================================== --- stable/12/contrib/ntp/configure Sun Jun 28 02:38:07 2020 (r362715) +++ stable/12/contrib/ntp/configure Sun Jun 28 03:28:28 2020 (r362716) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for ntp 4.2.8p14. +# Generated by GNU Autoconf 2.69 for ntp 4.2.8p15. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='ntp' PACKAGE_TARNAME='ntp' -PACKAGE_VERSION='4.2.8p14' -PACKAGE_STRING='ntp 4.2.8p14' +PACKAGE_VERSION='4.2.8p15' +PACKAGE_STRING='ntp 4.2.8p15' PACKAGE_BUGREPORT='http://bugs.ntp.org./' PACKAGE_URL='http://www.ntp.org./' @@ -1617,7 +1617,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ntp 4.2.8p14 to adapt to many kinds of systems. +\`configure' configures ntp 4.2.8p15 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1687,7 +1687,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ntp 4.2.8p14:";; + short | recursive ) echo "Configuration of ntp 4.2.8p15:";; esac cat <<\_ACEOF @@ -1930,7 +1930,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ntp configure 4.2.8p14 +ntp configure 4.2.8p15 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2639,7 +2639,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ntp $as_me 4.2.8p14, which was +It was created by ntp $as_me 4.2.8p15, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3640,7 +3640,7 @@ fi # Define the identity of the package. PACKAGE='ntp' - VERSION='4.2.8p14' + VERSION='4.2.8p15' cat >>confdefs.h <<_ACEOF @@ -27308,7 +27308,7 @@ _ACEOF fi done -for ac_func in strdup strerror setrlimit strchr +for ac_func in strdup strnlen memchr strerror setrlimit strchr do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -34174,7 +34174,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ntp $as_me 4.2.8p14, which was +This file was extended by ntp $as_me 4.2.8p15, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -34241,7 +34241,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -ntp config.status 4.2.8p14 +ntp config.status 4.2.8p15 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: stable/12/contrib/ntp/configure.ac ============================================================================== --- stable/12/contrib/ntp/configure.ac Sun Jun 28 02:38:07 2020 (r362715) +++ stable/12/contrib/ntp/configure.ac Sun Jun 28 03:28:28 2020 (r362716) @@ -912,7 +912,7 @@ case "$host" in ;; esac AC_CHECK_FUNCS([setlinebuf setpgid setpriority setsid setvbuf]) -AC_CHECK_FUNCS([strdup strerror setrlimit strchr]) +AC_CHECK_FUNCS([strdup strnlen memchr strerror setrlimit strchr]) case "$host" in *-*-aix[[4-9]]*) # XXX only verified thru AIX6. Modified: stable/12/contrib/ntp/html/drivers/driver40-ja.html ============================================================================== Binary file (source and/or target). No diff available. Modified: stable/12/contrib/ntp/html/drivers/driver40.html ============================================================================== --- stable/12/contrib/ntp/html/drivers/driver40.html Sun Jun 28 02:38:07 2020 (r362715) +++ stable/12/contrib/ntp/html/drivers/driver40.html Sun Jun 28 03:28:28 2020 (r362716) @@ -52,14 +52,20 @@
    server   127.127.40.X   mode 1

    -
    fudge   127.127.40.X   time1 0.NNN   flag1 0|1
    +
    fudge   127.127.40.X   time1 0.NNN   flag1 0|1   flag2 0|1   time2 H

    Time1 may specify a constant to be added to the time offset for the time from the receiver, a fixed-point decimal number in seconds. You may specify the time offset from several tens of milli-seconds ( 0.0NN seconds ) to a hundred and several tens of milli-seconds ( 0.1NN seconds ) for this clock.

    -

    Flag1 has no effect for time synchronization. When flag1 is set to 1, status commands are issued before DATE and STIM commands, and write a response text into the clockstats file.

    +

    Time2 may specify a grace period in hours after the 'adjusted' reply of the STUS command stopped coming.
    This hours is effective when both flag1 and flag2 are set to 1.

    +

    Flag1 has no effect for time synchronization unless flag2 is set to 1.
    When flag1 is set to 1, status commands are issued before DATE and STIM commands, and write a response text into the clockstats file.

    0 (Default)DCST and STUS commands are not issued
    1DCST and STUS commands are issued
    +

    Flag2 enables the time synchronization only when the reply of the STUS is 'adjusted'. When this functionality is used, flag1 must be set to 1 together.

    + + + +
    0 (Default)Always
    1'adjusted' only

    @@ -193,6 +199,7 @@
  • CITIZEN T.I.C. CO.,LTD.   JJY-200   http://www.tic-citizen.co.jp/ (Japanese only)


    +

    The JJY-200 became the end of sales in 2013.


    NTP configuration ( ntp.conf )

    Modified: stable/12/contrib/ntp/include/l_stdlib.h ============================================================================== --- stable/12/contrib/ntp/include/l_stdlib.h Sun Jun 28 02:38:07 2020 (r362715) +++ stable/12/contrib/ntp/include/l_stdlib.h Sun Jun 28 03:28:28 2020 (r362716) @@ -221,4 +221,13 @@ extern int errno; extern int h_errno; #endif +#ifndef HAVE_MEMCHR +extern void *memchr(const void *s, int c, size_t n); +#endif + +#ifndef HAVE_STRNLEN +extern size_t strnlen(const char *s, size_t n); +#endif + + #endif /* L_STDLIB_H */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Jun 28 04:08:42 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F233B33EC51; Sun, 28 Jun 2020 04:08:42 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vcYk65XLz3c3S; Sun, 28 Jun 2020 04:08:42 +0000 (UTC) (envelope-from rmacklem@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 C3E8A1062E; Sun, 28 Jun 2020 04:08:42 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05S48gwu083684; Sun, 28 Jun 2020 04:08:42 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05S48gsD083683; Sun, 28 Jun 2020 04:08:42 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202006280408.05S48gsD083683@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 28 Jun 2020 04:08:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362717 - stable/11/usr.sbin/mountd X-SVN-Group: stable-11 X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: stable/11/usr.sbin/mountd X-SVN-Commit-Revision: 362717 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 04:08:43 -0000 Author: rmacklem Date: Sun Jun 28 04:08:42 2020 New Revision: 362717 URL: https://svnweb.freebsd.org/changeset/base/362717 Log: MFC: r361854 Fix mountd so that it will not lose SIGHUPs that indicate "reload exports". Without this patch, if a SIGHUP is handled while the process is executing get_exportlist(), that SIGHUP is essentially ignored because the got_sighup variable is reset to 0 after get_exportlist(). This results in the exports file(s) not being reloaded until another SIGHUP signal is sent to mountd. This patch fixes this by resetting got_sighup to zero before the get_exportlist() call while SIGHUP is blocked. It also defines a delay time of 250msec before doing another exports reload if there are RPC request(s) to process. This prevents repeated exports reloads from delaying handling of RPC requests significantly. PR: 246597 Modified: stable/11/usr.sbin/mountd/mountd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/mountd/mountd.c ============================================================================== --- stable/11/usr.sbin/mountd/mountd.c Sun Jun 28 03:28:28 2020 (r362716) +++ stable/11/usr.sbin/mountd/mountd.c Sun Jun 28 04:08:42 2020 (r362717) @@ -182,6 +182,12 @@ struct fhreturn { #define GETPORT_MAXTRY 20 /* Max tries to get a port # */ +/* + * How long to delay a reload of exports when there are RPC request(s) + * to process, in usec. Must be less than 1second. + */ +#define RELOADDELAY 250000 + /* Global defs */ static char *add_expdir(struct dirlist **, char *, int); static void add_dlist(struct dirlist **, struct dirlist *, @@ -408,6 +414,10 @@ main(int argc, char **argv) int maxrec = RPC_MAXDATASIZE; int attempt_cnt, port_len, port_pos, ret; char **port_list; + uint64_t curtime, nexttime; + struct timeval tv; + struct timespec tp; + sigset_t sighup_mask; /* Check that another mountd isn't already running. */ pfh = pidfile_open(_PATH_MOUNTDPID, 0600, &otherpid); @@ -663,19 +673,49 @@ main(int argc, char **argv) } /* Expand svc_run() here so that we can call get_exportlist(). */ + curtime = nexttime = 0; + sigemptyset(&sighup_mask); + sigaddset(&sighup_mask, SIGHUP); for (;;) { - if (got_sighup) { - get_exportlist(1); + clock_gettime(CLOCK_MONOTONIC, &tp); + curtime = tp.tv_sec; + curtime = curtime * 1000000 + tp.tv_nsec / 1000; + sigprocmask(SIG_BLOCK, &sighup_mask, NULL); + if (got_sighup && curtime >= nexttime) { got_sighup = 0; - } + sigprocmask(SIG_UNBLOCK, &sighup_mask, NULL); + get_exportlist(1); + clock_gettime(CLOCK_MONOTONIC, &tp); + nexttime = tp.tv_sec; + nexttime = nexttime * 1000000 + tp.tv_nsec / 1000 + + RELOADDELAY; + } else + sigprocmask(SIG_UNBLOCK, &sighup_mask, NULL); + + /* + * If a reload is pending, poll for received request(s), + * otherwise set a RELOADDELAY timeout, since a SIGHUP + * could be processed between the got_sighup test and + * the select() system call. + */ + tv.tv_sec = 0; + if (got_sighup) + tv.tv_usec = 0; + else + tv.tv_usec = RELOADDELAY; readfds = svc_fdset; - switch (select(svc_maxfd + 1, &readfds, NULL, NULL, NULL)) { + switch (select(svc_maxfd + 1, &readfds, NULL, NULL, &tv)) { case -1: - if (errno == EINTR) - continue; + if (errno == EINTR) { + /* Allow a reload now. */ + nexttime = 0; + continue; + } syslog(LOG_ERR, "mountd died: select: %m"); exit(1); case 0: + /* Allow a reload now. */ + nexttime = 0; continue; default: svc_getreqset(&readfds); From owner-svn-src-all@freebsd.org Sun Jun 28 06:52:39 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B8E99341FEE; Sun, 28 Jun 2020 06:52:39 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vhBv4Xpdz41r7; Sun, 28 Jun 2020 06:52:39 +0000 (UTC) (envelope-from adrian@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 96DCE1267D; Sun, 28 Jun 2020 06:52:39 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05S6qdZ6088833; Sun, 28 Jun 2020 06:52:39 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05S6qdrd088832; Sun, 28 Jun 2020 06:52:39 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <202006280652.05S6qdrd088832@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 28 Jun 2020 06:52:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362718 - head/usr.sbin/fifolog/lib X-SVN-Group: head X-SVN-Commit-Author: adrian X-SVN-Commit-Paths: head/usr.sbin/fifolog/lib X-SVN-Commit-Revision: 362718 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 06:52:39 -0000 Author: adrian Date: Sun Jun 28 06:52:39 2020 New Revision: 362718 URL: https://svnweb.freebsd.org/changeset/base/362718 Log: [fifolog] wrap the recno when we hit the end of the provided file size. Without this the log just keeps growing to infinity. Reviewed by: phk Differential Revision: https://reviews.freebsd.org/D25478 Modified: head/usr.sbin/fifolog/lib/fifolog_write_poll.c Modified: head/usr.sbin/fifolog/lib/fifolog_write_poll.c ============================================================================== --- head/usr.sbin/fifolog/lib/fifolog_write_poll.c Sun Jun 28 04:08:42 2020 (r362717) +++ head/usr.sbin/fifolog/lib/fifolog_write_poll.c Sun Jun 28 06:52:39 2020 (r362718) @@ -239,6 +239,14 @@ fifolog_write_output(struct fifolog_writer *f, int fl, */ f->seq++; f->recno++; + + /* + * Ensure we wrap recno once we hit the file size (in records.) + */ + if (f->recno >= f->ff->logsize) + /* recno 0 is header; skip */ + f->recno = 1; + f->flag = 0; memset(f->obuf, 0, f->obufsize); From owner-svn-src-all@freebsd.org Sun Jun 28 07:43:48 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CE3D03437F9; Sun, 28 Jun 2020 07:43:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vjKw5LlCz43qm; Sun, 28 Jun 2020 07:43:48 +0000 (UTC) (envelope-from dim@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 B267112D2D; Sun, 28 Jun 2020 07:43:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05S7hmNh019380; Sun, 28 Jun 2020 07:43:48 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05S7hiMe019358; Sun, 28 Jun 2020 07:43:44 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202006280743.05S7hiMe019358@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 28 Jun 2020 07:43:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362719 - in head: contrib/llvm-project contrib/llvm-project/clang/lib/CodeGen contrib/llvm-project/compiler-rt/lib/builtins/riscv contrib/llvm-project/libcxx/include contrib/llvm-proje... X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head: contrib/llvm-project contrib/llvm-project/clang/lib/CodeGen contrib/llvm-project/compiler-rt/lib/builtins/riscv contrib/llvm-project/libcxx/include contrib/llvm-project/llvm/lib/CodeGen/Selec... X-SVN-Commit-Revision: 362719 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 07:43:48 -0000 Author: dim Date: Sun Jun 28 07:43:43 2020 New Revision: 362719 URL: https://svnweb.freebsd.org/changeset/base/362719 Log: Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp llvmorg-10.0.1-rc2-0-g77d76b71d7d. Also add a few more llvm utilities under WITH_CLANG_EXTRAS: * llvm-dwp, a utility for merging DWARF 5 Split DWARF .dwo files into .dwp (DWARF package files) * llvm-size, a size(1) replacement * llvm-strings, a strings(1) replacement MFC after: 3 weeks Added: head/contrib/llvm-project/compiler-rt/lib/builtins/riscv/int_mul_impl.inc - copied unchanged from r362704, vendor/llvm-project/release-10.x/compiler-rt/lib/builtins/riscv/int_mul_impl.inc head/contrib/llvm-project/compiler-rt/lib/builtins/riscv/muldi3.S - copied unchanged from r362704, vendor/llvm-project/release-10.x/compiler-rt/lib/builtins/riscv/muldi3.S head/contrib/llvm-project/llvm/tools/llvm-dwp/ - copied from r362704, vendor/llvm-project/release-10.x/llvm/tools/llvm-dwp/ head/contrib/llvm-project/llvm/tools/llvm-size/ - copied from r362704, vendor/llvm-project/release-10.x/llvm/tools/llvm-size/ head/contrib/llvm-project/llvm/tools/llvm-strings/ - copied from r362704, vendor/llvm-project/release-10.x/llvm/tools/llvm-strings/ head/usr.bin/clang/llvm-dwp/ head/usr.bin/clang/llvm-dwp/Makefile (contents, props changed) head/usr.bin/clang/llvm-size/ head/usr.bin/clang/llvm-size/Makefile (contents, props changed) head/usr.bin/clang/llvm-size/llvm-size.1 (contents, props changed) head/usr.bin/clang/llvm-strings/ head/usr.bin/clang/llvm-strings/Makefile (contents, props changed) head/usr.bin/clang/llvm-strings/llvm-strings.1 (contents, props changed) Modified: head/contrib/llvm-project/FREEBSD-Xlist head/contrib/llvm-project/clang/lib/CodeGen/TargetInfo.cpp head/contrib/llvm-project/compiler-rt/lib/builtins/riscv/mulsi3.S head/contrib/llvm-project/libcxx/include/array head/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp head/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp head/lib/clang/include/VCSVersion.inc head/lib/clang/include/llvm/Support/VCSRevision.h head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.bin/clang/Makefile Directory Properties: head/contrib/llvm-project/ (props changed) head/contrib/llvm-project/clang/ (props changed) head/contrib/llvm-project/compiler-rt/ (props changed) head/contrib/llvm-project/libcxx/ (props changed) head/contrib/llvm-project/llvm/ (props changed) Modified: head/contrib/llvm-project/FREEBSD-Xlist ============================================================================== --- head/contrib/llvm-project/FREEBSD-Xlist Sun Jun 28 06:52:39 2020 (r362718) +++ head/contrib/llvm-project/FREEBSD-Xlist Sun Jun 28 07:43:43 2020 (r362719) @@ -864,7 +864,8 @@ llvm/tools/llvm-dis/LLVMBuild.txt llvm/tools/llvm-dwarfdump/CMakeLists.txt llvm/tools/llvm-dwarfdump/LLVMBuild.txt llvm/tools/llvm-dwarfdump/fuzzer/ -llvm/tools/llvm-dwp/ +llvm/tools/llvm-dwp/CMakeLists.txt +llvm/tools/llvm-dwp/LLVMBuild.txt llvm/tools/llvm-elfabi/ llvm/tools/llvm-exegesis/ llvm/tools/llvm-extract/CMakeLists.txt @@ -911,12 +912,14 @@ llvm/tools/llvm-reduce/ llvm/tools/llvm-rtdyld/CMakeLists.txt llvm/tools/llvm-rtdyld/LLVMBuild.txt llvm/tools/llvm-shlib/ -llvm/tools/llvm-size/ +llvm/tools/llvm-size/CMakeLists.txt +llvm/tools/llvm-size/LLVMBuild.txt llvm/tools/llvm-special-case-list-fuzzer/ llvm/tools/llvm-split/ llvm/tools/llvm-stress/CMakeLists.txt llvm/tools/llvm-stress/LLVMBuild.txt -llvm/tools/llvm-strings/ +llvm/tools/llvm-strings/CMakeLists.txt +llvm/tools/llvm-strings/LLVMBuild.txt llvm/tools/llvm-symbolizer/CMakeLists.txt llvm/tools/llvm-undname/ llvm/tools/llvm-xray/CMakeLists.txt Modified: head/contrib/llvm-project/clang/lib/CodeGen/TargetInfo.cpp ============================================================================== --- head/contrib/llvm-project/clang/lib/CodeGen/TargetInfo.cpp Sun Jun 28 06:52:39 2020 (r362718) +++ head/contrib/llvm-project/clang/lib/CodeGen/TargetInfo.cpp Sun Jun 28 07:43:43 2020 (r362719) @@ -9677,7 +9677,8 @@ ABIArgInfo RISCVABIInfo::classifyArgumentType(QualType uint64_t Size = getContext().getTypeSize(Ty); // Pass floating point values via FPRs if possible. - if (IsFixed && Ty->isFloatingType() && FLen >= Size && ArgFPRsLeft) { + if (IsFixed && Ty->isFloatingType() && !Ty->isComplexType() && + FLen >= Size && ArgFPRsLeft) { ArgFPRsLeft--; return ABIArgInfo::getDirect(); } Copied: head/contrib/llvm-project/compiler-rt/lib/builtins/riscv/int_mul_impl.inc (from r362704, vendor/llvm-project/release-10.x/compiler-rt/lib/builtins/riscv/int_mul_impl.inc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm-project/compiler-rt/lib/builtins/riscv/int_mul_impl.inc Sun Jun 28 07:43:43 2020 (r362719, copy of r362704, vendor/llvm-project/release-10.x/compiler-rt/lib/builtins/riscv/int_mul_impl.inc) @@ -0,0 +1,31 @@ +//===-- int_mul_impl.inc - Integer multiplication -------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// Helpers used by __mulsi3, __muldi3. +// +//===----------------------------------------------------------------------===// + +#if !defined(__riscv_mul) + .text + .align 2 + + .globl __mulxi3 + .type __mulxi3, @function +__mulxi3: + mv a2, a0 + mv a0, zero +.L1: + andi a3, a1, 1 + beqz a3, .L2 + add a0, a0, a2 +.L2: + srli a1, a1, 1 + slli a2, a2, 1 + bnez a1, .L1 + ret +#endif Copied: head/contrib/llvm-project/compiler-rt/lib/builtins/riscv/muldi3.S (from r362704, vendor/llvm-project/release-10.x/compiler-rt/lib/builtins/riscv/muldi3.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm-project/compiler-rt/lib/builtins/riscv/muldi3.S Sun Jun 28 07:43:43 2020 (r362719, copy of r362704, vendor/llvm-project/release-10.x/compiler-rt/lib/builtins/riscv/muldi3.S) @@ -0,0 +1,11 @@ +//===--- muldi3.S - Integer multiplication routines -----------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +#if __riscv_xlen == 64 +#define __mulxi3 __muldi3 +#include "int_mul_impl.inc" +#endif Modified: head/contrib/llvm-project/compiler-rt/lib/builtins/riscv/mulsi3.S ============================================================================== --- head/contrib/llvm-project/compiler-rt/lib/builtins/riscv/mulsi3.S Sun Jun 28 06:52:39 2020 (r362718) +++ head/contrib/llvm-project/compiler-rt/lib/builtins/riscv/mulsi3.S Sun Jun 28 07:43:43 2020 (r362719) @@ -1,4 +1,4 @@ -//===--- mulsi3.S - Integer multiplication routines routines ---===// +//===--- mulsi3.S - Integer multiplication routines -----------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -6,22 +6,7 @@ // //===----------------------------------------------------------------------===// -#if !defined(__riscv_mul) && __riscv_xlen == 32 - .text - .align 2 - - .globl __mulsi3 - .type __mulsi3, @function -__mulsi3: - mv a2, a0 - mv a0, zero -.L1: - andi a3, a1, 1 - beqz a3, .L2 - add a0, a0, a2 -.L2: - srli a1, a1, 1 - slli a2, a2, 1 - bnez a1, .L1 - ret +#if __riscv_xlen == 32 +#define __mulxi3 __mulsi3 +#include "int_mul_impl.inc" #endif Modified: head/contrib/llvm-project/libcxx/include/array ============================================================================== --- head/contrib/llvm-project/libcxx/include/array Sun Jun 28 06:52:39 2020 (r362718) +++ head/contrib/llvm-project/libcxx/include/array Sun Jun 28 07:43:43 2020 (r362719) @@ -359,7 +359,7 @@ struct _LIBCPP_TEMPLATE_VIS array<_Tp, 0> #ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES template && ...), void>::type + class = _EnableIf<__all<_IsSame<_Tp, _Args>::value...>::value> > array(_Tp, _Args...) -> array<_Tp, 1 + sizeof...(_Args)>; Modified: head/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp ============================================================================== --- head/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp Sun Jun 28 06:52:39 2020 (r362718) +++ head/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp Sun Jun 28 07:43:43 2020 (r362719) @@ -271,8 +271,20 @@ SDValue DAGTypeLegalizer::PromoteIntRes_AtomicCmpSwap( return Res.getValue(1); } - SDValue Op2 = GetPromotedInteger(N->getOperand(2)); + // Op2 is used for the comparison and thus must be extended according to the + // target's atomic operations. Op3 is merely stored and so can be left alone. + SDValue Op2 = N->getOperand(2); SDValue Op3 = GetPromotedInteger(N->getOperand(3)); + if (TLI.getTargetMachine().getTargetTriple().isRISCV()) { + // The comparison argument must be sign-extended for RISC-V. This is + // abstracted using a new TargetLowering hook in the main LLVM development + // branch, but handled here directly in order to fix the codegen bug for + // 10.x without breaking the libLLVM.so ABI. + Op2 = SExtPromotedInteger(Op2); + } else { + Op2 = GetPromotedInteger(Op2); + } + SDVTList VTs = DAG.getVTList(Op2.getValueType(), N->getValueType(1), MVT::Other); SDValue Res = DAG.getAtomicCmpSwap( Modified: head/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp ============================================================================== --- head/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp Sun Jun 28 06:52:39 2020 (r362718) +++ head/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp Sun Jun 28 07:43:43 2020 (r362719) @@ -5490,10 +5490,21 @@ char TargetLowering::isNegatibleForFree(SDValue Op, Se EVT VT = Op.getValueType(); const SDNodeFlags Flags = Op->getFlags(); const TargetOptions &Options = DAG.getTarget().Options; - if (!Op.hasOneUse() && !(Op.getOpcode() == ISD::FP_EXTEND && - isFPExtFree(VT, Op.getOperand(0).getValueType()))) - return 0; + if (!Op.hasOneUse()) { + bool IsFreeExtend = Op.getOpcode() == ISD::FP_EXTEND && + isFPExtFree(VT, Op.getOperand(0).getValueType()); + // If we already have the use of the negated floating constant, it is free + // to negate it even it has multiple uses. + bool IsFreeConstant = + Op.getOpcode() == ISD::ConstantFP && + !getNegatedExpression(Op, DAG, LegalOperations, ForCodeSize) + .use_empty(); + + if (!IsFreeExtend && !IsFreeConstant) + return 0; + } + // Don't recurse exponentially. if (Depth > SelectionDAG::MaxRecursionDepth) return 0; @@ -5687,14 +5698,7 @@ SDValue TargetLowering::getNegatedExpression(SDValue O ForCodeSize, Depth + 1); char V1 = isNegatibleForFree(Op.getOperand(1), DAG, LegalOperations, ForCodeSize, Depth + 1); - // TODO: This is a hack. It is possible that costs have changed between now - // and the initial calls to isNegatibleForFree(). That is because we - // are rewriting the expression, and that may change the number of - // uses (and therefore the cost) of values. If the negation costs are - // equal, only negate this value if it is a constant. Otherwise, try - // operand 1. A better fix would eliminate uses as a cost factor or - // track the change in uses as we rewrite the expression. - if (V0 > V1 || (V0 == V1 && isa(Op.getOperand(0)))) { + if (V0 > V1) { // fold (fneg (fma X, Y, Z)) -> (fma (fneg X), Y, (fneg Z)) SDValue Neg0 = getNegatedExpression( Op.getOperand(0), DAG, LegalOperations, ForCodeSize, Depth + 1); Modified: head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp ============================================================================== --- head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp Sun Jun 28 06:52:39 2020 (r362718) +++ head/contrib/llvm-project/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp Sun Jun 28 07:43:43 2020 (r362719) @@ -211,6 +211,24 @@ AArch64FrameLowering::getStackIDForScalableVectors() c return TargetStackID::SVEVector; } +/// Returns the size of the fixed object area (allocated next to sp on entry) +/// On Win64 this may include a var args area and an UnwindHelp object for EH. +static unsigned getFixedObjectSize(const MachineFunction &MF, + const AArch64FunctionInfo *AFI, bool IsWin64, + bool IsFunclet) { + if (!IsWin64 || IsFunclet) { + // Only Win64 uses fixed objects, and then only for the function (not + // funclets) + return 0; + } else { + // Var args are stored here in the primary function. + const unsigned VarArgsArea = AFI->getVarArgsGPRSize(); + // To support EH funclets we allocate an UnwindHelp object + const unsigned UnwindHelpObject = (MF.hasEHFunclets() ? 8 : 0); + return alignTo(VarArgsArea + UnwindHelpObject, 16); + } +} + /// Returns the size of the entire SVE stackframe (calleesaves + spills). static StackOffset getSVEStackSize(const MachineFunction &MF) { const AArch64FunctionInfo *AFI = MF.getInfo(); @@ -959,10 +977,7 @@ void AArch64FrameLowering::emitPrologue(MachineFunctio bool IsWin64 = Subtarget.isCallingConvWin64(MF.getFunction().getCallingConv()); - // Var args are accounted for in the containing function, so don't - // include them for funclets. - unsigned FixedObject = (IsWin64 && !IsFunclet) ? - alignTo(AFI->getVarArgsGPRSize(), 16) : 0; + unsigned FixedObject = getFixedObjectSize(MF, AFI, IsWin64, IsFunclet); auto PrologueSaveSize = AFI->getCalleeSavedStackSize() + FixedObject; // All of the remaining stack allocations are for locals. @@ -993,32 +1008,8 @@ void AArch64FrameLowering::emitPrologue(MachineFunctio ++MBBI; } - // The code below is not applicable to funclets. We have emitted all the SEH - // opcodes that we needed to emit. The FP and BP belong to the containing - // function. - if (IsFunclet) { - if (NeedsWinCFI) { - HasWinCFI = true; - BuildMI(MBB, MBBI, DL, TII->get(AArch64::SEH_PrologEnd)) - .setMIFlag(MachineInstr::FrameSetup); - } - - // SEH funclets are passed the frame pointer in X1. If the parent - // function uses the base register, then the base register is used - // directly, and is not retrieved from X1. - if (F.hasPersonalityFn()) { - EHPersonality Per = classifyEHPersonality(F.getPersonalityFn()); - if (isAsynchronousEHPersonality(Per)) { - BuildMI(MBB, MBBI, DL, TII->get(TargetOpcode::COPY), AArch64::FP) - .addReg(AArch64::X1).setMIFlag(MachineInstr::FrameSetup); - MBB.addLiveIn(AArch64::X1); - } - } - - return; - } - - if (HasFP) { + // For funclets the FP belongs to the containing function. + if (!IsFunclet && HasFP) { // Only set up FP if we actually need to. int64_t FPOffset = isTargetDarwin(MF) ? (AFI->getCalleeSavedStackSize() - 16) : 0; @@ -1161,7 +1152,9 @@ void AArch64FrameLowering::emitPrologue(MachineFunctio // Allocate space for the rest of the frame. if (NumBytes) { - const bool NeedsRealignment = RegInfo->needsStackRealignment(MF); + // Alignment is required for the parent frame, not the funclet + const bool NeedsRealignment = + !IsFunclet && RegInfo->needsStackRealignment(MF); unsigned scratchSPReg = AArch64::SP; if (NeedsRealignment) { @@ -1215,7 +1208,8 @@ void AArch64FrameLowering::emitPrologue(MachineFunctio // FIXME: Clarify FrameSetup flags here. // Note: Use emitFrameOffset() like above for FP if the FrameSetup flag is // needed. - if (RegInfo->hasBasePointer(MF)) { + // For funclets the BP belongs to the containing function. + if (!IsFunclet && RegInfo->hasBasePointer(MF)) { TII->copyPhysReg(MBB, MBBI, DL, RegInfo->getBaseRegister(), AArch64::SP, false); if (NeedsWinCFI) { @@ -1232,6 +1226,19 @@ void AArch64FrameLowering::emitPrologue(MachineFunctio .setMIFlag(MachineInstr::FrameSetup); } + // SEH funclets are passed the frame pointer in X1. If the parent + // function uses the base register, then the base register is used + // directly, and is not retrieved from X1. + if (IsFunclet && F.hasPersonalityFn()) { + EHPersonality Per = classifyEHPersonality(F.getPersonalityFn()); + if (isAsynchronousEHPersonality(Per)) { + BuildMI(MBB, MBBI, DL, TII->get(TargetOpcode::COPY), AArch64::FP) + .addReg(AArch64::X1) + .setMIFlag(MachineInstr::FrameSetup); + MBB.addLiveIn(AArch64::X1); + } + } + if (needsFrameMoves) { const DataLayout &TD = MF.getDataLayout(); const int StackGrowth = isTargetDarwin(MF) @@ -1450,10 +1457,7 @@ void AArch64FrameLowering::emitEpilogue(MachineFunctio bool IsWin64 = Subtarget.isCallingConvWin64(MF.getFunction().getCallingConv()); - // Var args are accounted for in the containing function, so don't - // include them for funclets. - unsigned FixedObject = - (IsWin64 && !IsFunclet) ? alignTo(AFI->getVarArgsGPRSize(), 16) : 0; + unsigned FixedObject = getFixedObjectSize(MF, AFI, IsWin64, IsFunclet); uint64_t AfterCSRPopSize = ArgumentPopSize; auto PrologueSaveSize = AFI->getCalleeSavedStackSize() + FixedObject; @@ -1679,7 +1683,9 @@ static StackOffset getFPOffset(const MachineFunction & const auto &Subtarget = MF.getSubtarget(); bool IsWin64 = Subtarget.isCallingConvWin64(MF.getFunction().getCallingConv()); - unsigned FixedObject = IsWin64 ? alignTo(AFI->getVarArgsGPRSize(), 16) : 0; + + unsigned FixedObject = + getFixedObjectSize(MF, AFI, IsWin64, /*IsFunclet=*/false); unsigned FPAdjust = isTargetDarwin(MF) ? 16 : AFI->getCalleeSavedStackSize(MF.getFrameInfo()); return {ObjectOffset + FixedObject + FPAdjust, MVT::i8}; @@ -2632,9 +2638,14 @@ void AArch64FrameLowering::processFunctionBeforeFrameF ++MBBI; // Create an UnwindHelp object. - int UnwindHelpFI = - MFI.CreateStackObject(/*size*/8, /*alignment*/16, false); + // The UnwindHelp object is allocated at the start of the fixed object area + int64_t FixedObject = + getFixedObjectSize(MF, AFI, /*IsWin64*/ true, /*IsFunclet*/ false); + int UnwindHelpFI = MFI.CreateFixedObject(/*Size*/ 8, + /*SPOffset*/ -FixedObject, + /*IsImmutable=*/false); EHInfo.UnwindHelpFrameIdx = UnwindHelpFI; + // We need to store -2 into the UnwindHelp object at the start of the // function. DebugLoc DL; @@ -2656,10 +2667,14 @@ int AArch64FrameLowering::getFrameIndexReferencePrefer const MachineFunction &MF, int FI, unsigned &FrameReg, bool IgnoreSPUpdates) const { const MachineFrameInfo &MFI = MF.getFrameInfo(); - LLVM_DEBUG(dbgs() << "Offset from the SP for " << FI << " is " - << MFI.getObjectOffset(FI) << "\n"); - FrameReg = AArch64::SP; - return MFI.getObjectOffset(FI); + if (IgnoreSPUpdates) { + LLVM_DEBUG(dbgs() << "Offset from the SP for " << FI << " is " + << MFI.getObjectOffset(FI) << "\n"); + FrameReg = AArch64::SP; + return MFI.getObjectOffset(FI); + } + + return getFrameIndexReference(MF, FI, FrameReg); } /// The parent frame offset (aka dispFrame) is only used on X86_64 to retrieve Modified: head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp ============================================================================== --- head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Sun Jun 28 06:52:39 2020 (r362718) +++ head/contrib/llvm-project/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Sun Jun 28 07:43:43 2020 (r362719) @@ -298,6 +298,11 @@ bool PPCAsmPrinter::PrintAsmMemoryOperand(const Machin switch (ExtraCode[0]) { default: return true; // Unknown modifier. + case 'L': // A memory reference to the upper word of a double word op. + O << getDataLayout().getPointerSize() << "("; + printOperand(MI, OpNo, O); + O << ")"; + return false; case 'y': // A memory reference for an X-form instruction { const char *RegName = "r0"; @@ -309,7 +314,6 @@ bool PPCAsmPrinter::PrintAsmMemoryOperand(const Machin } case 'U': // Print 'u' for update form. case 'X': // Print 'x' for indexed form. - { // FIXME: Currently for PowerPC memory operands are always loaded // into a register, so we never get an update or indexed form. // This is bad even for offset forms, since even if we know we @@ -318,7 +322,6 @@ bool PPCAsmPrinter::PrintAsmMemoryOperand(const Machin // tolerate 'U' and 'X' but don't output anything. assert(MI->getOperand(OpNo).isReg()); return false; - } } } Modified: head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp ============================================================================== --- head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp Sun Jun 28 06:52:39 2020 (r362718) +++ head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp Sun Jun 28 07:43:43 2020 (r362719) @@ -181,9 +181,9 @@ void RISCVFrameLowering::emitPrologue(MachineFunction adjustReg(MBB, MBBI, DL, FPReg, SPReg, StackSize - RVFI->getVarArgsSaveSize(), MachineInstr::FrameSetup); - // Emit ".cfi_def_cfa $fp, 0" + // Emit ".cfi_def_cfa $fp, -RVFI->getVarArgsSaveSize()" unsigned CFIIndex = MF.addFrameInst(MCCFIInstruction::createDefCfa( - nullptr, RI->getDwarfRegNum(FPReg, true), 0)); + nullptr, RI->getDwarfRegNum(FPReg, true), -RVFI->getVarArgsSaveSize())); BuildMI(MBB, MBBI, DL, TII->get(TargetOpcode::CFI_INSTRUCTION)) .addCFIIndex(CFIIndex); } Modified: head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp ============================================================================== --- head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp Sun Jun 28 06:52:39 2020 (r362718) +++ head/contrib/llvm-project/llvm/lib/Target/RISCV/RISCVISelLowering.cpp Sun Jun 28 07:43:43 2020 (r362719) @@ -197,6 +197,14 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetM setTruncStoreAction(MVT::f64, MVT::f16, Expand); } + if (Subtarget.is64Bit() && + !(Subtarget.hasStdExtD() || Subtarget.hasStdExtF())) { + setOperationAction(ISD::FP_TO_UINT, MVT::i32, Custom); + setOperationAction(ISD::FP_TO_SINT, MVT::i32, Custom); + setOperationAction(ISD::STRICT_FP_TO_UINT, MVT::i32, Custom); + setOperationAction(ISD::STRICT_FP_TO_SINT, MVT::i32, Custom); + } + setOperationAction(ISD::GlobalAddress, XLenVT, Custom); setOperationAction(ISD::BlockAddress, XLenVT, Custom); setOperationAction(ISD::ConstantPool, XLenVT, Custom); @@ -876,6 +884,32 @@ void RISCVTargetLowering::ReplaceNodeResults(SDNode *N switch (N->getOpcode()) { default: llvm_unreachable("Don't know how to custom type legalize this operation!"); + case ISD::STRICT_FP_TO_SINT: + case ISD::STRICT_FP_TO_UINT: + case ISD::FP_TO_SINT: + case ISD::FP_TO_UINT: { + bool IsStrict = N->isStrictFPOpcode(); + assert(N->getValueType(0) == MVT::i32 && Subtarget.is64Bit() && + "Unexpected custom legalisation"); + SDValue Op0 = IsStrict ? N->getOperand(1) : N->getOperand(0); + RTLIB::Libcall LC; + if (N->getOpcode() == ISD::FP_TO_SINT || + N->getOpcode() == ISD::STRICT_FP_TO_SINT) + LC = RTLIB::getFPTOSINT(Op0.getValueType(), N->getValueType(0)); + else + LC = RTLIB::getFPTOUINT(Op0.getValueType(), N->getValueType(0)); + MakeLibCallOptions CallOptions; + EVT OpVT = Op0.getValueType(); + CallOptions.setTypeListBeforeSoften(OpVT, N->getValueType(0), true); + SDValue Chain = IsStrict ? N->getOperand(0) : SDValue(); + SDValue Result; + std::tie(Result, Chain) = + makeLibCall(DAG, LC, N->getValueType(0), Op0, CallOptions, DL, Chain); + Results.push_back(Result); + if (IsStrict) + Results.push_back(Chain); + break; + } case ISD::READCYCLECOUNTER: { assert(!Subtarget.is64Bit() && "READCYCLECOUNTER only has custom type legalization on riscv32"); Modified: head/lib/clang/include/VCSVersion.inc ============================================================================== --- head/lib/clang/include/VCSVersion.inc Sun Jun 28 06:52:39 2020 (r362718) +++ head/lib/clang/include/VCSVersion.inc Sun Jun 28 07:43:43 2020 (r362719) @@ -1,14 +1,14 @@ // $FreeBSD$ -#define LLVM_REVISION "llvmorg-10.0.0-129-gd24d5c8e308" +#define LLVM_REVISION "llvmorg-10.0.1-rc2-0-g77d76b71d7d" #define LLVM_REPOSITORY "git@github.com:llvm/llvm-project.git" -#define CLANG_REVISION "llvmorg-10.0.0-129-gd24d5c8e308" +#define CLANG_REVISION "llvmorg-10.0.1-rc2-0-g77d76b71d7d" #define CLANG_REPOSITORY "git@github.com:llvm/llvm-project.git" // - -#define LLD_REVISION "llvmorg-10.0.0-129-gd24d5c8e308-1300007" +#define LLD_REVISION "llvmorg-10.0.1-rc2-0-g77d76b71d7d-1300007" #define LLD_REPOSITORY "FreeBSD" -#define LLDB_REVISION "llvmorg-10.0.0-129-gd24d5c8e308" +#define LLDB_REVISION "llvmorg-10.0.1-rc2-0-g77d76b71d7d" #define LLDB_REPOSITORY "git@github.com:llvm/llvm-project.git" Modified: head/lib/clang/include/llvm/Support/VCSRevision.h ============================================================================== --- head/lib/clang/include/llvm/Support/VCSRevision.h Sun Jun 28 06:52:39 2020 (r362718) +++ head/lib/clang/include/llvm/Support/VCSRevision.h Sun Jun 28 07:43:43 2020 (r362719) @@ -1,3 +1,3 @@ /* $FreeBSD$ */ -#define LLVM_REVISION "llvmorg-10.0.0-129-gd24d5c8e308" +#define LLVM_REVISION "llvmorg-10.0.1-rc2-0-g77d76b71d7d" #define LLVM_REPOSITORY "git@github.com:llvm/llvm-project.git" Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sun Jun 28 06:52:39 2020 (r362718) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sun Jun 28 07:43:43 2020 (r362719) @@ -1493,6 +1493,7 @@ OLD_FILES+=usr/bin/llvm-cxxfilt OLD_FILES+=usr/bin/llvm-diff OLD_FILES+=usr/bin/llvm-dis OLD_FILES+=usr/bin/llvm-dwarfdump +OLD_FILES+=usr/bin/llvm-dwp OLD_FILES+=usr/bin/llvm-extract OLD_FILES+=usr/bin/llvm-link OLD_FILES+=usr/bin/llvm-lto @@ -1503,6 +1504,8 @@ OLD_FILES+=usr/bin/llvm-modextract OLD_FILES+=usr/bin/llvm-objcopy OLD_FILES+=usr/bin/llvm-pdbutil OLD_FILES+=usr/bin/llvm-rtdyld +OLD_FILES+=usr/bin/llvm-size +OLD_FILES+=usr/bin/llvm-strings OLD_FILES+=usr/bin/llvm-xray OLD_FILES+=usr/bin/opt OLD_FILES+=usr/share/man/man1/bugpoint.1.gz @@ -1518,6 +1521,8 @@ OLD_FILES+=usr/share/man/man1/llvm-extract.1.gz OLD_FILES+=usr/share/man/man1/llvm-link.1.gz OLD_FILES+=usr/share/man/man1/llvm-objcopy.1.gz OLD_FILES+=usr/share/man/man1/llvm-pdbutil.1.gz +OLD_FILES+=usr/share/man/man1/llvm-size.1.gz +OLD_FILES+=usr/share/man/man1/llvm-strings.1.gz OLD_FILES+=usr/share/man/man1/opt.1.gz .endif @@ -2078,6 +2083,7 @@ OLD_FILES+=usr/share/man/man1/gcov.1.gz OLD_FILES+=usr/bin/llvm-cov OLD_FILES+=usr/bin/llvm-profdata OLD_FILES+=usr/share/man/man1/llvm-cov.1.gz +OLD_FILES+=usr/share/man/man1/llvm-profdata.1.gz .endif .if ${MK_GDB} == no Modified: head/usr.bin/clang/Makefile ============================================================================== --- head/usr.bin/clang/Makefile Sun Jun 28 06:52:39 2020 (r362718) +++ head/usr.bin/clang/Makefile Sun Jun 28 07:43:43 2020 (r362719) @@ -27,6 +27,7 @@ SUBDIR+= llvm-cxxfilt SUBDIR+= llvm-diff SUBDIR+= llvm-dis SUBDIR+= llvm-dwarfdump +SUBDIR+= llvm-dwp SUBDIR+= llvm-extract SUBDIR+= llvm-link SUBDIR+= llvm-lto @@ -37,6 +38,8 @@ SUBDIR+= llvm-modextract SUBDIR+= llvm-objcopy SUBDIR+= llvm-pdbutil SUBDIR+= llvm-rtdyld +SUBDIR+= llvm-size +SUBDIR+= llvm-strings SUBDIR+= llvm-xray SUBDIR+= opt .endif Added: head/usr.bin/clang/llvm-dwp/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/clang/llvm-dwp/Makefile Sun Jun 28 07:43:43 2020 (r362719) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +PROG_CXX= llvm-dwp +MAN= + +SRCDIR= llvm/tools/llvm-dwp +SRCS+= DWPError.cpp +SRCS+= llvm-dwp.cpp + +LIBADD+= z + +.include "../llvm.prog.mk" Added: head/usr.bin/clang/llvm-size/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/clang/llvm-size/Makefile Sun Jun 28 07:43:43 2020 (r362719) @@ -0,0 +1,8 @@ +# $FreeBSD$ + +PROG_CXX= llvm-size + +SRCDIR= llvm/tools/llvm-size +SRCS+= llvm-size.cpp + +.include "../llvm.prog.mk" Added: head/usr.bin/clang/llvm-size/llvm-size.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/clang/llvm-size/llvm-size.1 Sun Jun 28 07:43:43 2020 (r362719) @@ -0,0 +1,275 @@ +.\" $FreeBSD$ +.\" Man page generated from reStructuredText. +. +.TH "LLVM-SIZE" "1" "2020-06-26" "10" "LLVM" +.SH NAME +llvm-size \- print size information +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.SH SYNOPSIS +.sp +\fBllvm\-size\fP [\fIoptions\fP] [\fIinput...\fP] +.SH DESCRIPTION +.sp +\fBllvm\-size\fP is a tool that prints size information for binary files. +It is intended to be a drop\-in replacement for GNU\(aqs \fBsize\fP\&. +.sp +The tool prints size information for each \fBinput\fP specified. If no input is +specified, the program prints size information for \fBa.out\fP\&. If "\fB\-\fP" is +specified as an input file, \fBllvm\-size\fP reads a file from the standard +input stream. If an input is an archive, size information will be displayed for +all its members. +.SH OPTIONS +.INDENT 0.0 +.TP +.B \-A +Equivalent to \fI\%\-\-format\fP with a value of \fBsysv\fP\&. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-arch= +Architecture(s) from Mach\-O universal binaries to display information for. +.UNINDENT +.INDENT 0.0 +.TP +.B \-B +Equivalent to \fI\%\-\-format\fP with a value of \fBberkeley\fP\&. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-common +Include ELF common symbol sizes in bss size for \fBberkeley\fP output format, or +as a separate section entry for \fBsysv\fP output. If not specified, these +symbols are ignored. +.UNINDENT +.INDENT 0.0 +.TP +.B \-d +Equivalent to \fI\%\-\-radix\fP with a value of \fB10\fP\&. +.UNINDENT +.INDENT 0.0 +.TP +.B \-l +Display verbose address and offset information for segments and sections in +Mach\-O files in \fBdarwin\fP format. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-format= +Set the output format to the \fB\fP specified. Available \fB\fP +options are \fBberkeley\fP (the default), \fBsysv\fP and \fBdarwin\fP\&. +.sp +Berkeley output summarises text, data and bss sizes in each file, as shown +below for a typical pair of ELF files: +.INDENT 7.0 +.INDENT 3.5 +.sp +.nf +.ft C +$ llvm\-size \-\-format=berkeley test.o test2.o + text data bss dec hex filename + 182 16 5 203 cb test.elf + 82 8 1 91 5b test2.o +.ft P +.fi +.UNINDENT +.UNINDENT +.sp +For Mach\-O files, the output format is slightly different: +.INDENT 7.0 +.INDENT 3.5 +.sp +.nf +.ft C +$ llvm\-size \-\-format=berkeley macho.obj macho2.obj +__TEXT __DATA __OBJC others dec hex +4 8 0 0 12 c macho.obj +16 32 0 0 48 30 macho2.obj +.ft P +.fi +.UNINDENT +.UNINDENT +.sp +Sysv output displays size and address information for most sections, with each +file being listed separately: +.INDENT 7.0 +.INDENT 3.5 +.sp +.nf +.ft C +$ llvm\-size \-\-format=sysv test.elf test2.o + test.elf : + section size addr + .eh_frame 92 2097496 + .text 90 2101248 + .data 16 2105344 + .bss 5 2105360 + .comment 209 0 + Total 412 + + test2.o : + section size addr + .text 26 0 + .data 8 0 + .bss 1 0 + .comment 106 0 + .note.GNU\-stack 0 0 + .eh_frame 56 0 + .llvm_addrsig 2 0 + Total 199 +.ft P +.fi +.UNINDENT +.UNINDENT +.sp +\fBdarwin\fP format only affects Mach\-O input files. If an input of a different +file format is specified, \fBllvm\-size\fP falls back to \fBberkeley\fP +format. When producing \fBdarwin\fP format, the tool displays information about +segments and sections: +.INDENT 7.0 +.INDENT 3.5 +.sp +.nf +.ft C +$ llvm\-size \-\-format=darwin macho.obj macho2.obj + macho.obj: + Segment : 12 + Section (__TEXT, __text): 4 + Section (__DATA, __data): 8 + total 12 + total 12 + macho2.obj: + Segment : 48 + Section (__TEXT, __text): 16 + Section (__DATA, __data): 32 + total 48 + total 48 +.ft P +.fi +.UNINDENT +.UNINDENT +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-help, \-h +Display a summary of command line options. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-help\-list +Display an uncategorized summary of command line options. +.UNINDENT +.INDENT 0.0 +.TP +.B \-m +Equivalent to \fI\%\-\-format\fP with a value of \fBdarwin\fP\&. +.UNINDENT +.INDENT 0.0 +.TP +.B \-o +Equivalent to \fI\%\-\-radix\fP with a value of \fB8\fP\&. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-radix= +Display size information in the specified radix. Permitted values are \fB8\fP, +\fB10\fP (the default) and \fB16\fP for octal, decimal and hexadecimal output +respectively. +.sp +Example: +.INDENT 7.0 +.INDENT 3.5 +.sp +.nf +.ft C +$ llvm\-size \-\-radix=8 test.o + text data bss oct hex filename + 0152 04 04 162 72 test.o + +$ llvm\-size \-\-radix=10 test.o + text data bss dec hex filename + 106 4 4 114 72 test.o + +$ llvm\-size \-\-radix=16 test.o + text data bss dec hex filename + 0x6a 0x4 0x4 114 72 test.o +.ft P +.fi +.UNINDENT +.UNINDENT +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-totals, \-t +Applies only to \fBberkeley\fP output format. Display the totals for all listed +fields, in addition to the individual file listings. +.sp +Example: +.INDENT 7.0 +.INDENT 3.5 +.sp +.nf +.ft C +$ llvm\-size \-\-totals test.elf test2.o + text data bss dec hex filename + 182 16 5 203 cb test.elf + 82 8 1 91 5b test2.o + 264 24 6 294 126 (TOTALS) +.ft P +.fi +.UNINDENT +.UNINDENT +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-version +Display the version of the \fBllvm\-size\fP executable. +.UNINDENT +.INDENT 0.0 +.TP +.B \-x +Equivalent to \fI\%\-\-radix\fP with a value of \fB16\fP\&. +.UNINDENT +.INDENT 0.0 +.TP +.B @ +Read command\-line options from response file \fB\fP\&. +.UNINDENT +.SH EXIT STATUS +.sp +\fBllvm\-size\fP exits with a non\-zero exit code if there is an error. +Otherwise, it exits with code 0. +.SH BUGS +.sp +To report bugs, please visit <\fI\%http://llvm.org/bugs/\fP>. +.SH AUTHOR +Maintained by the LLVM Team (https://llvm.org/). +.SH COPYRIGHT +2003-2020, LLVM Project +.\" Generated by docutils manpage writer. +. Added: head/usr.bin/clang/llvm-strings/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/clang/llvm-strings/Makefile Sun Jun 28 07:43:43 2020 (r362719) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +PROG_CXX= llvm-strings +MAN= + +SRCDIR= llvm/tools/llvm-strings +SRCS+= llvm-strings.cpp + +.include "../llvm.prog.mk" Added: head/usr.bin/clang/llvm-strings/llvm-strings.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/clang/llvm-strings/llvm-strings.1 Sun Jun 28 07:43:43 2020 (r362719) @@ -0,0 +1,179 @@ +.\" $FreeBSD$ +.\" Man page generated from reStructuredText. +. +.TH "LLVM-STRINGS" "1" "2020-06-26" "10" "LLVM" +.SH NAME +llvm-strings \- print strings +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.SH SYNOPSIS +.sp +\fBllvm\-strings\fP [\fIoptions\fP] [\fIinput...\fP] +.SH DESCRIPTION +.sp +\fBllvm\-strings\fP is a tool intended as a drop\-in replacement for GNU\(aqs +\fBstrings\fP, which looks for printable strings in files and writes them +to the standard output stream. A printable string is any sequence of four (by +default) or more printable ASCII characters. The end of the file, or any other +byte, terminates the current sequence. +.sp +\fBllvm\-strings\fP looks for strings in each \fBinput\fP file specified. +Unlike GNU \fBstrings\fP it looks in the entire input file, regardless of +file format, rather than restricting the search to certain sections of object +files. If "\fB\-\fP" is specified as an \fBinput\fP, or no \fBinput\fP is specified, +the program reads from the standard input stream. +.SH EXAMPLE +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +$ cat input.txt +bars +foo +wibble blob +$ llvm\-strings input.txt +bars +wibble blob +.ft P +.fi +.UNINDENT +.UNINDENT +.SH OPTIONS +.INDENT 0.0 +.TP +.B \-\-all, \-a +Silently ignored. Present for GNU \fBstrings\fP compatibility. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-bytes=, \-n +Set the minimum number of printable ASCII characters required for a sequence of +bytes to be considered a string. The default value is 4. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-help, \-h +Display a summary of command line options. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-help\-list +Display an uncategorized summary of command line options. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-print\-file\-name, \-f +Display the name of the containing file before each string. +.sp +Example: +.INDENT 7.0 +.INDENT 3.5 +.sp +.nf +.ft C +$ llvm\-strings \-\-print\-file\-name test.o test.elf +test.o: _Z5hellov +test.o: some_bss +test.o: test.cpp +test.o: main +test.elf: test.cpp +test.elf: test2.cpp +test.elf: _Z5hellov +test.elf: main +test.elf: some_bss +.ft P +.fi +.UNINDENT +.UNINDENT +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-radix=, \-t +Display the offset within the file of each string, before the string and using +the specified radix. Valid \fB\fP values are \fBo\fP, \fBd\fP and \fBx\fP for +octal, decimal and hexadecimal respectively. +.sp +Example: +.INDENT 7.0 +.INDENT 3.5 +.sp +.nf +.ft C +$ llvm\-strings \-\-radix=o test.o + 1054 _Z5hellov *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sun Jun 28 08:28:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EADC63456A3; Sun, 28 Jun 2020 08:28:14 +0000 (UTC) (envelope-from se@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vkKB5jYTz47Ls; Sun, 28 Jun 2020 08:28:14 +0000 (UTC) (envelope-from se@freebsd.org) Received: from Stefans-MBP-WLAN.fritz.box (p200300cd5f20330048efac7f3c2f423b.dip0.t-ipconnect.de [IPv6:2003:cd:5f20:3300:48ef:ac7f:3c2f:423b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id EFB7F29998; Sun, 28 Jun 2020 08:28:13 +0000 (UTC) (envelope-from se@freebsd.org) Subject: Re: svn commit: r362681 - in head: contrib/bc contrib/bc/gen contrib/bc/include contrib/bc/locales contrib/bc/manuals contrib/bc/src contrib/bc/src/bc contrib/bc/src/dc contrib/bc/src/history contrib/b... To: Eric van Gyzen References: <202006271202.05RC22oR085945@repo.freebsd.org> <2b7f0d0f-e243-9c9c-f1c0-e700e0bf6d48@FreeBSD.org> <577b1bd1-598a-d3f9-3c23-537b9747612a@vangyzen.net> From: =?UTF-8?Q?Stefan_E=c3=9fer?= Autocrypt: addr=se@freebsd.org; keydata= mQENBFVxiRIBCADOLNOZBsqlplHUQ3tG782FNtVT33rQli9EjNt2fhFERHIo4NxHlWBpHLnU b0s4L/eItx7au0i7Gegv01A9LUMwOnAc9EFAm4EW3Wmoa6MYrcP7xDClohg/Y69f7SNpEs3x YATBy+L6NzWZbJjZXD4vqPgZSDuMcLU7BEdJf0f+6h1BJPnGuwHpsSdnnMrZeIM8xQ8PPUVQ L0GZkVojHgNUngJH6e21qDrud0BkdiBcij0M3TCP4GQrJ/YMdurfc8mhueLpwGR2U1W8TYB7 4UY+NLw0McThOCLCxXflIeF/Y7jSB0zxzvb/H3LWkodUTkV57yX9IbUAGA5RKRg9zsUtABEB AAG0J1N0ZWZhbiBFw59lciAoRnJlZUJTRCkgPHNlQGZyZWVic2Qub3JnPokBVAQTAQoAPgIb AwULCQgHAwUVCgkICwUWAwIBAAIeAQIXgBYhBKNx6mWcC+zIK3FTE0frte9a/fVEBQJa8u+q BQkLJQETAAoJEEfrte9a/fVEOeMH/icmdK1eZQvB3U8quJo9VMaZsaTuCMbUE4NThyfsIvIm MCd+rb/yULmMYwqNfjyKB1x4ikR4x+94l+yJoz7K0Usks+eNKDmMGJM6pWWssTigaJubFdVd hVVC+C1QJi7JshYSib08uONoPmO4lv5Az0TDYGtsMzsES2sIlc62c9go5WPGYhQFRbX3Lk6y V6m8OHh+G9XGSj3oPO4UteRwu+SzTdOLunZBWG1wu34+IeZm663D+2gOppQLWpLa2qaTerqw THu377ayZ2B2LPJ5JkvkZeHYPkwDQ+b5PGn0UhfkxPnDVYki5F7qKxvQ5uq1/q9YaCX7mmOl H2yO7tgVsrW5AQ0EVXGJEgEIALEj9qCXMZVucjpcd3QxM/TlUr98m5viEd1z4tCnPUyRWcIC EVtj2h5xMH+2iB0q1+KWhq+NsWtvScmEmfHnsr7dJ1K677OdpDhKVaJk61eeRulFY1R4yb6C 1MMxK+WgYB+vvpG0UeyR0M4uBewcPvRsq4yGUHFQKtLAbMdoPTSryJA+ElnmK1vdY+rPcHgi OIMBZM7ahsPXC0C9K4e5SP9clGyIoMpbfHXdx9q+Rp3zVtlbhyk3BS/xccu/+9pk9ICXL6GR js2sNnJ0wxdU1DsAlC59a5MnSruwiZFwRnkQhr3x6wk97Lg7sLS9jjTnCN7LGlVmSmpOEMy6 uq1AWfUAEQEAAYkBPAQYAQoAJgIbDBYhBKNx6mWcC+zIK3FTE0frte9a/fVEBQJa8u+rBQkL JQEZAAoJEEfrte9a/fVEuesH/2DNxGWnHvWwMyiyhlQtafvDKwEn/wAgR8gHJFodB7emf8rA TnukH7MVttCoHtjN5lvv9RSBHjNTZls5wR/ANlwdRuPQHd8ZGxLe3S6IuUB3zDSwFltLGurO N2kOMhs5mTGyypSa+uw3rtQbUAVYf1oPbiR4FLtiM8FLyEvE95hX5fPq9Qvx9FmN79kmCIEw jDKPqDaUf/OR2fEF0LSIbXHEk4tNqCEwx5DIJ0fp5/z5UzICUAmwxyRs5O/Hre1jzPsMVyud Ml9t7UTOJGKVWwRory1PMnOFxN+iz5/d4FhYSKXF7kfMiFgol4LuWaxJRwbBrr71VGBrRy2a L1nw6Bc= Cc: John Baldwin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <8670f956-1ed4-2b87-ee64-d04bc37d6810@freebsd.org> Date: Sun, 28 Jun 2020 10:28:08 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <577b1bd1-598a-d3f9-3c23-537b9747612a@vangyzen.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 08:28:15 -0000 Am 27.06.20 um 23:52 schrieb Eric van Gyzen: > On 6/27/20 8:11 AM, John Baldwin wrote: >> On 6/27/20 5:02 AM, Stefan Eßer wrote: >>> Author: se >>> Date: Sat Jun 27 12:02:01 2020 >>> New Revision: 362681 >>> URL: https://svnweb.freebsd.org/changeset/base/362681 >>> >>> Log: >>>    Import new 2-clause BSD licenced implementation of the bc and dc >>> commands >> >> Hmm, I didn't see a commit to add the vendor sources into ^/vendor >> first via our >> standard process for contrib sources, nor any discussion about that in >> the review. > > When you add this to the vendor area, please include the tests, to > remove a barrier to integration. Hi Eric, I have already imported the full sources into the vendor area, including the tests. These tests compare the output of this bc and dc with that of GNU bc/dc and are run as regression tests by the author before a release is tagged (and have been extended over time for each area where an issue has been found). Extensive fuzzing is also performed to verify that the low level math functions give correct results (again using another bc/dc as reference), but we do not want to include those particular tests. I'd like to make the tests available as regression tests in FreeBSD, but have not looked at the best way to integrate them, yet. (The tests are meant to be run within the source directory after building from sources in place, for example, which is not at all what we do in FreeBSD.) Independently of the issue of tests, I'm not sure about the best way to proceed from the current situation with regard to what's in contrib/bc now, and I have decided to leave the incomplete import untouched in contrib/bc until I understand the best way forward. I could delete what's currently in contrib/bc and use svn copy to make the whole contents of vendor/bc/dist available in contrib/bc. The tests require 1112 KB of space, while the rest of the sources takes up less than 900 KB. I could revert the full import to contrib/bc, but that would also revert changes to e.g. usr.bin/Makefile and I'd rather remove just what's now in contrib/bc and then use svn copy to make vendor/bc/dist available there. The sources from the dist directory can be used unmodified, the reason for cherry-picking was just that I did not want to import more than is used at this time ... I'd appreciate any advice given about what causes the least repo churn and extra effort for the Git conversion. Regards, STefan From owner-svn-src-all@freebsd.org Sun Jun 28 11:12:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 764C6348B1F; Sun, 28 Jun 2020 11:12:04 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vnyD2PxHz4G0B; Sun, 28 Jun 2020 11:12:04 +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 4E1D2151F2; Sun, 28 Jun 2020 11:12:04 +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 05SBC4jv050171; Sun, 28 Jun 2020 11:12:04 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05SBC4g1050170; Sun, 28 Jun 2020 11:12:04 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202006281112.05SBC4g1050170@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 28 Jun 2020 11:12:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362720 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 362720 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 11:12:04 -0000 Author: tuexen Date: Sun Jun 28 11:12:03 2020 New Revision: 362720 URL: https://svnweb.freebsd.org/changeset/base/362720 Log: Don't check ch for not being NULL, since that is true. MFC after: 1 week Modified: head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sun Jun 28 07:43:43 2020 (r362719) +++ head/sys/netinet/sctp_input.c Sun Jun 28 11:12:03 2020 (r362720) @@ -5106,7 +5106,7 @@ process_control_chunks: break; case SCTP_STREAM_RESET: SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_STREAM_RESET\n"); - if (((stcb == NULL) || (ch == NULL) || (chk_length < sizeof(struct sctp_stream_reset_tsn_req)))) { + if ((stcb == NULL) || (chk_length < sizeof(struct sctp_stream_reset_tsn_req))) { /* Its not ours */ *offset = length; return (stcb); @@ -5129,7 +5129,7 @@ process_control_chunks: return (stcb); } - if ((ch != NULL) && (stcb != NULL) && (netp != NULL) && (*netp != NULL)) { + if ((stcb != NULL) && (netp != NULL) && (*netp != NULL)) { if (stcb->asoc.pktdrop_supported == 0) { goto unknown_chunk; } @@ -5165,8 +5165,7 @@ process_control_chunks: goto next_chunk; } got_auth = 1; - if ((ch == NULL) || sctp_handle_auth(stcb, (struct sctp_auth_chunk *)ch, - m, *offset)) { + if (sctp_handle_auth(stcb, (struct sctp_auth_chunk *)ch, m, *offset)) { /* auth HMAC failed so dump the packet */ *offset = length; return (stcb); From owner-svn-src-all@freebsd.org Sun Jun 28 14:02:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 06FE234CF49; Sun, 28 Jun 2020 14:02:50 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vslF6BZbz4Rxl; Sun, 28 Jun 2020 14:02:49 +0000 (UTC) (envelope-from gbe@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 CFED617698; Sun, 28 Jun 2020 14:02:49 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05SE2nwd063057; Sun, 28 Jun 2020 14:02:49 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05SE2nZh063056; Sun, 28 Jun 2020 14:02:49 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202006281402.05SE2nZh063056@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sun, 28 Jun 2020 14:02:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362721 - stable/12/share/man/man9 X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: stable/12/share/man/man9 X-SVN-Commit-Revision: 362721 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 14:02:50 -0000 Author: gbe (doc committer) Date: Sun Jun 28 14:02:49 2020 New Revision: 362721 URL: https://svnweb.freebsd.org/changeset/base/362721 Log: MFC r360459: Add a HISTORY section to domain(9). Approved by: bcr Differential Revision: https://reviews.freebsd.org/D24150 Modified: stable/12/share/man/man9/domain.9 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man9/domain.9 ============================================================================== --- stable/12/share/man/man9/domain.9 Sun Jun 28 11:12:03 2020 (r362720) +++ stable/12/share/man/man9/domain.9 Sun Jun 28 14:02:49 2020 (r362721) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 1, 2016 +.Dd April 29, 2020 .Dt DOMAIN 9 .Os .Sh NAME @@ -236,6 +236,18 @@ the default protocol may be returned for types if the domain has a default raw protocol. .Sh SEE ALSO .Xr socket 2 +.Sh HISTORY +The functions +.Fn domain_add , +.Fn pfctlinput , +.Fn pfctlinput2 , +.Fn pffinddomain , +.Fn pffindproto , +.Fn pffindtype +and +.Fn DOMAIN_SET +first appeared in +.Fx 4.4 . .Sh AUTHORS This manual page was written by .An Chad David Aq Mt davidc@acns.ab.ca . From owner-svn-src-all@freebsd.org Sun Jun 28 14:11:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2232C34CFE2; Sun, 28 Jun 2020 14:11:37 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vsxP0712z4SSj; Sun, 28 Jun 2020 14:11:37 +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 F39A91790D; Sun, 28 Jun 2020 14:11:36 +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 05SEBa3p066034; Sun, 28 Jun 2020 14:11:36 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05SEBarK066033; Sun, 28 Jun 2020 14:11:36 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202006281411.05SEBarK066033@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 28 Jun 2020 14:11:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362722 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 362722 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 14:11:37 -0000 Author: tuexen Date: Sun Jun 28 14:11:36 2020 New Revision: 362722 URL: https://svnweb.freebsd.org/changeset/base/362722 Log: Don't send packets containing ERROR chunks in response to unknown chunks when being in a state where the verification tag to be used is not known yet. MFC after: 1 week Modified: head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sun Jun 28 14:02:49 2020 (r362721) +++ head/sys/netinet/sctp_input.c Sun Jun 28 14:11:36 2020 (r362722) @@ -5178,7 +5178,11 @@ process_control_chunks: default: unknown_chunk: /* it's an unknown chunk! */ - if ((ch->chunk_type & 0x40) && (stcb != NULL)) { + if ((ch->chunk_type & 0x40) && + (stcb != NULL) && + (SCTP_GET_STATE(stcb) != SCTP_STATE_EMPTY) && + (SCTP_GET_STATE(stcb) != SCTP_STATE_INUSE) && + (SCTP_GET_STATE(stcb) != SCTP_STATE_COOKIE_WAIT)) { struct sctp_gen_error_cause *cause; int len; From owner-svn-src-all@freebsd.org Sun Jun 28 14:22:58 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B0C5C34D47F; Sun, 28 Jun 2020 14:22:58 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vtBV4BVQz4Tc9; Sun, 28 Jun 2020 14:22:58 +0000 (UTC) (envelope-from gbe@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 70FB117867; Sun, 28 Jun 2020 14:22:58 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05SEMwHd075860; Sun, 28 Jun 2020 14:22:58 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05SEMwBi075859; Sun, 28 Jun 2020 14:22:58 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202006281422.05SEMwBi075859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sun, 28 Jun 2020 14:22:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362723 - stable/12/share/man/man5 X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: stable/12/share/man/man5 X-SVN-Commit-Revision: 362723 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 14:22:58 -0000 Author: gbe (doc committer) Date: Sun Jun 28 14:22:57 2020 New Revision: 362723 URL: https://svnweb.freebsd.org/changeset/base/362723 Log: MFC r360493: Add a new manual page for unionfs(5) Approved by: bcr Differential Revision: https://reviews.freebsd.org/D24589 Added: stable/12/share/man/man5/unionfs.5 - copied unchanged from r360493, head/share/man/man5/unionfs.5 Modified: stable/12/share/man/man5/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man5/Makefile ============================================================================== --- stable/12/share/man/man5/Makefile Sun Jun 28 14:11:36 2020 (r362722) +++ stable/12/share/man/man5/Makefile Sun Jun 28 14:22:57 2020 (r362723) @@ -69,7 +69,8 @@ MAN= acct.5 \ stab.5 \ style.Makefile.5 \ sysctl.conf.5 \ - tmpfs.5 + tmpfs.5 \ + unionfs.5 MLINKS= dir.5 dirent.5 MLINKS+=ext2fs.5 ext4fs.5 Copied: stable/12/share/man/man5/unionfs.5 (from r360493, head/share/man/man5/unionfs.5) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/share/man/man5/unionfs.5 Sun Jun 28 14:22:57 2020 (r362723, copy of r360493, head/share/man/man5/unionfs.5) @@ -0,0 +1,87 @@ +.\" Copyright (c) 2020 Gordon Bergling +.\" +.\" 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 April 27, 2020 +.Dt UNIONFS 5 +.Os +.Sh NAME +.Nm unionfs +.Nd "UNION FS" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "option UNIONFS" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +unionfs_load="YES" +.Ed +.Sh DESCRIPTION +The UNIONFS driver is an implementation of a stackable unification filesystem. +.Sh SEE ALSO +.Xr mount_unionfs 8 +.Sh STANDARDS +.Rs +.%T Union mounts in 4.4BSD-Lite +.%A J. S. Pendry +.%A M. K. McKusick +.%R Proceedings of the USENIX Technical Conference on UNIX and Advanced Computing Systems +.%D December 1995 +.Re +.Pp +.Rs +.%T Jails: Confining the omnipotent root +.%A P. H. Kamp +.%A R. N. M. Watson +.%R Proceedings of the Second International System Administration and Networking Conference (SANE2000) +.%D May 2000 +.Re +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 5.0 . +.Sh AUTHORS +The +.Nm +device driver was written by Jan-Simon Pendry for +.Bx 4.4 +and +.An Masanori OZAWA Aq Mt ozawa@ongs.co.jp +reimplemented the handling of the locking for +.Fx 7.0 . +The manual page was written by +.An Gordon Bergling Aq Mt gbergling@gmail.com . +.Sh BUGS +Please see the +.Xr mount_unionfs 8 +manual page for a list of bugs regarding the +.Nm +filesystem. From owner-svn-src-all@freebsd.org Sun Jun 28 14:36:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6659434D92A; Sun, 28 Jun 2020 14:36:57 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vtVd27Bjz4VH7; Sun, 28 Jun 2020 14:36:57 +0000 (UTC) (envelope-from gbe@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 443DF17E0D; Sun, 28 Jun 2020 14:36:57 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05SEavf9082753; Sun, 28 Jun 2020 14:36:57 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05SEauTH082751; Sun, 28 Jun 2020 14:36:56 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202006281436.05SEauTH082751@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sun, 28 Jun 2020 14:36:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362724 - stable/12/share/man/man4 X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: stable/12/share/man/man4 X-SVN-Commit-Revision: 362724 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 14:36:57 -0000 Author: gbe (doc committer) Date: Sun Jun 28 14:36:56 2020 New Revision: 362724 URL: https://svnweb.freebsd.org/changeset/base/362724 Log: MFC r359633, r359656, r360190: Add a manpage for smbios(4). PR: 240252, 163830 Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D23714 Added: stable/12/share/man/man4/smbios.4 - copied, changed from r359633, head/share/man/man4/smbios.4 Modified: stable/12/share/man/man4/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/Makefile ============================================================================== --- stable/12/share/man/man4/Makefile Sun Jun 28 14:22:57 2020 (r362723) +++ stable/12/share/man/man4/Makefile Sun Jun 28 14:36:56 2020 (r362724) @@ -485,6 +485,7 @@ MAN= aac.4 \ sk.4 \ ${_smartpqi.4} \ smb.4 \ + smbios.4 \ smbus.4 \ smp.4 \ smsc.4 \ Copied and modified: stable/12/share/man/man4/smbios.4 (from r359633, head/share/man/man4/smbios.4) ============================================================================== --- head/share/man/man4/smbios.4 Sat Apr 4 21:38:00 2020 (r359633, copy source) +++ stable/12/share/man/man4/smbios.4 Sun Jun 28 14:36:56 2020 (r362724) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2020 Gordon Bergling +.\" Copyright (c) 2020 Gordon Bergling .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -23,11 +23,11 @@ .\" .\" $FreeBSD$ .\" -.Dd April 4, 2020 +.Dd April 22, 2020 .Dt SMBIOS 4 .Os .Sh NAME -.Nm smbios +.Nm smbios .Nd "System Management BIOS" .Sh SYNOPSIS To compile this driver into the kernel, @@ -46,7 +46,7 @@ smbios_load="YES" .Sh DESCRIPTION The System Management BIOS (SMBIOS) describes hardware components. .Sh SEE ALSO -.Xr efi 4 +.Xr efi 8 .Rs .%T System Management BIOS (SMBIOS) Reference Specification .%N DMTF DSP0134 @@ -61,3 +61,5 @@ The .Nm device driver was written by .An Matthew N. Dodd Aq Mt winter@jurai.net . +This manual page was written by +.An Gordon Bergling Aq Mt gbergling@gmail.com . From owner-svn-src-all@freebsd.org Sun Jun 28 14:40:48 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D025734CCB7; Sun, 28 Jun 2020 14:40:48 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vtb45C2Pz4VbT; Sun, 28 Jun 2020 14:40:48 +0000 (UTC) (envelope-from gbe@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 ADA6417E91; Sun, 28 Jun 2020 14:40:48 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05SEemL6083036; Sun, 28 Jun 2020 14:40:48 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05SEem9W083035; Sun, 28 Jun 2020 14:40:48 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202006281440.05SEem9W083035@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Sun, 28 Jun 2020 14:40:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362725 - stable/12/share/man/man7 X-SVN-Group: stable-12 X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: stable/12/share/man/man7 X-SVN-Commit-Revision: 362725 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 14:40:48 -0000 Author: gbe (doc committer) Date: Sun Jun 28 14:40:48 2020 New Revision: 362725 URL: https://svnweb.freebsd.org/changeset/base/362725 Log: MFC r360604: Add references for the most important man7 pages worth reading to intro(7). Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D24649 Modified: stable/12/share/man/man7/intro.7 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man7/intro.7 ============================================================================== --- stable/12/share/man/man7/intro.7 Sun Jun 28 14:36:56 2020 (r362724) +++ stable/12/share/man/man7/intro.7 Sun Jun 28 14:40:48 2020 (r362725) @@ -28,7 +28,7 @@ .\" @(#)intro.7 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd June 5, 1993 +.Dd May 3, 2020 .Dt INTRO 7 .Os .Sh NAME @@ -36,6 +36,44 @@ .Nd miscellaneous information pages .Sh DESCRIPTION This section contains miscellaneous documentation. +.Bl -tag -width "mdoc.samples(7)" -offset indent +.It Xr ascii 7 +map of ASCII character set +.It Xr c 7 +the C programming language +.It Xr environ 7 +user environment +.It Xr firewall 7 +simple firewalls under +.Fx +.It Xr hier 7 +file system hierarchy in +.Fx +.It Xr hostname 7 +host name resolution description +.It Xr release 7 +layout of +.Fx +releases and snapshots +.It Xr ports 7 +introduction to the ports infrastructure of +.Fx +.It Xr security 7 +security features available in +.Fx +.It Xr tuning 7 +general advice on tuning +.Fx +.El +.Sh SEE ALSO +.Xr man 1 , +.Xr intro 2 , +.Xr intro 3 , +.Xr intro 4 , +.Xr intro 5 , +.Xr intro 6 , +.Xr intro 8 , +.Xr intro 9 .Sh HISTORY The .Nm From owner-svn-src-all@freebsd.org Sun Jun 28 15:03:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AB63D34E1A1; Sun, 28 Jun 2020 15:03: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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vv4r3wPvz4WYQ; Sun, 28 Jun 2020 15:03: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 81D74181D6; Sun, 28 Jun 2020 15:03: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 05SF38pk001230; Sun, 28 Jun 2020 15:03:08 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05SF37F5001227; Sun, 28 Jun 2020 15:03:07 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202006281503.05SF37F5001227@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 28 Jun 2020 15:03:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362726 - in head/sys/arm64: arm64 include X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys/arm64: arm64 include X-SVN-Commit-Revision: 362726 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 15:03:08 -0000 Author: andrew Date: Sun Jun 28 15:03:07 2020 New Revision: 362726 URL: https://svnweb.freebsd.org/changeset/base/362726 Log: Use EFI memory map to determine attributes for Acpi mappings on arm64. AcpiOsMapMemory is used for device memory when e.g. an _INI method wants to access physical memory, however, aarch64 pmap_mapbios is hardcoded to writeback. Search for the correct memory type to use in pmap_mapbios. Submitted by: Greg V Differential Revision: https://reviews.freebsd.org/D25201 Modified: head/sys/arm64/arm64/machdep.c head/sys/arm64/arm64/pmap.c head/sys/arm64/include/machdep.h Modified: head/sys/arm64/arm64/machdep.c ============================================================================== --- head/sys/arm64/arm64/machdep.c Sun Jun 28 14:40:48 2020 (r362725) +++ head/sys/arm64/arm64/machdep.c Sun Jun 28 15:03:07 2020 (r362726) @@ -120,6 +120,7 @@ int has_pan; * passed into the kernel and used by the EFI code to call runtime services. */ vm_paddr_t efi_systbl_phys; +static struct efi_map_header *efihdr; /* pagezero_* implementations are provided in support.S */ void pagezero_simple(void *); @@ -1071,11 +1072,52 @@ cache_setup(void) } } +int +memory_mapping_mode(vm_paddr_t pa) +{ + struct efi_md *map, *p; + size_t efisz; + int ndesc, i; + + if (efihdr == NULL) + return (VM_MEMATTR_WRITE_BACK); + + /* + * Memory map data provided by UEFI via the GetMemoryMap + * Boot Services API. + */ + efisz = (sizeof(struct efi_map_header) + 0xf) & ~0xf; + map = (struct efi_md *)((uint8_t *)efihdr + efisz); + + if (efihdr->descriptor_size == 0) + return (VM_MEMATTR_WRITE_BACK); + ndesc = efihdr->memory_size / efihdr->descriptor_size; + + for (i = 0, p = map; i < ndesc; i++, + p = efi_next_descriptor(p, efihdr->descriptor_size)) { + if (pa < p->md_phys || + pa >= p->md_phys + p->md_pages * EFI_PAGE_SIZE) + continue; + if (p->md_type == EFI_MD_TYPE_IOMEM || + p->md_type == EFI_MD_TYPE_IOPORT) + return (VM_MEMATTR_DEVICE); + else if ((p->md_attr & EFI_MD_ATTR_WB) != 0 || + p->md_type == EFI_MD_TYPE_RECLAIM) + return (VM_MEMATTR_WRITE_BACK); + else if ((p->md_attr & EFI_MD_ATTR_WT) != 0) + return (VM_MEMATTR_WRITE_THROUGH); + else if ((p->md_attr & EFI_MD_ATTR_WC) != 0) + return (VM_MEMATTR_WRITE_COMBINING); + break; + } + + return (VM_MEMATTR_DEVICE); +} + void initarm(struct arm64_bootparams *abp) { struct efi_fb *efifb; - struct efi_map_header *efihdr; struct pcpu *pcpup; char *env; #ifdef FDT Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Sun Jun 28 14:40:48 2020 (r362725) +++ head/sys/arm64/arm64/pmap.c Sun Jun 28 15:03:07 2020 (r362726) @@ -5449,7 +5449,7 @@ pmap_mapbios(vm_paddr_t pa, vm_size_t size) /* L3 table is linked */ va = trunc_page(va); pa = trunc_page(pa); - pmap_kenter(va, size, pa, VM_MEMATTR_WRITE_BACK); + pmap_kenter(va, size, pa, memory_mapping_mode(pa)); } return ((void *)(va + offset)); Modified: head/sys/arm64/include/machdep.h ============================================================================== --- head/sys/arm64/include/machdep.h Sun Jun 28 14:40:48 2020 (r362725) +++ head/sys/arm64/include/machdep.h Sun Jun 28 15:03:07 2020 (r362726) @@ -56,6 +56,7 @@ vm_offset_t parse_boot_param(struct arm64_bootparams * #ifdef FDT void parse_fdt_bootargs(void); #endif +int memory_mapping_mode(vm_paddr_t pa); extern void (*pagezero)(void *); #endif /* _KERNEL */ From owner-svn-src-all@freebsd.org Sun Jun 28 17:28:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A2CD2351335; Sun, 28 Jun 2020 17:28:11 +0000 (UTC) (envelope-from grembo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vyJC3shXz4dyP; Sun, 28 Jun 2020 17:28:11 +0000 (UTC) (envelope-from grembo@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 7F22C19942; Sun, 28 Jun 2020 17:28:11 +0000 (UTC) (envelope-from grembo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05SHSBUD087106; Sun, 28 Jun 2020 17:28:11 GMT (envelope-from grembo@FreeBSD.org) Received: (from grembo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05SHSBGs087105; Sun, 28 Jun 2020 17:28:11 GMT (envelope-from grembo@FreeBSD.org) Message-Id: <202006281728.05SHSBGs087105@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grembo set sender to grembo@FreeBSD.org using -f From: Michael Gmelin Date: Sun, 28 Jun 2020 17:28:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362727 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: grembo X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 362727 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 17:28:11 -0000 Author: grembo (ports committer) Date: Sun Jun 28 17:28:11 2020 New Revision: 362727 URL: https://svnweb.freebsd.org/changeset/base/362727 Log: Adapt documentation of kern.tty_info_kstacks. s/stack/kernel stack/, as this feature only shows kernel stacks. Reported by: jhb Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D25488 Modified: head/share/man/man4/termios.4 Modified: head/share/man/man4/termios.4 ============================================================================== --- head/share/man/man4/termios.4 Sun Jun 28 15:03:07 2020 (r362726) +++ head/share/man/man4/termios.4 Sun Jun 28 17:28:11 2020 (r362727) @@ -28,7 +28,7 @@ .\" @(#)termios.4 8.4 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd June 27, 2020 +.Dd June 28, 2020 .Dt TERMIOS 4 .Os .Sh NAME @@ -766,7 +766,7 @@ In case the .Xr sysctl 8 variable .Va kern.tty_info_kstacks -is set to a non-zero value, the running thread's stack is +is set to a non-zero value, the running thread's kernel stack is written to the terminal (e.g., for debugging purposes). .El .Pp From owner-svn-src-all@freebsd.org Sun Jun 28 17:43:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8A578351C81; Sun, 28 Jun 2020 17:43:49 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vyfF341hz4fbP; Sun, 28 Jun 2020 17:43:49 +0000 (UTC) (envelope-from mhorne@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 648CD1A050; Sun, 28 Jun 2020 17:43:49 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05SHhnjb099198; Sun, 28 Jun 2020 17:43:49 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05SHhnNr099197; Sun, 28 Jun 2020 17:43:49 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202006281743.05SHhnNr099197@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Sun, 28 Jun 2020 17:43:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362728 - stable/12/sys/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: stable/12/sys/sys X-SVN-Commit-Revision: 362728 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 17:43:49 -0000 Author: mhorne Date: Sun Jun 28 17:43:48 2020 New Revision: 362728 URL: https://svnweb.freebsd.org/changeset/base/362728 Log: MFC r360826: Sync relocation definitions Modified: stable/12/sys/sys/elf_common.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/sys/elf_common.h ============================================================================== --- stable/12/sys/sys/elf_common.h Sun Jun 28 17:28:11 2020 (r362727) +++ stable/12/sys/sys/elf_common.h Sun Jun 28 17:43:48 2020 (r362728) @@ -1303,6 +1303,8 @@ typedef struct { #define R_RISCV_SET8 54 #define R_RISCV_SET16 55 #define R_RISCV_SET32 56 +#define R_RISCV_32_PCREL 57 +#define R_RISCV_IRELATIVE 58 #define R_SPARC_NONE 0 #define R_SPARC_8 1 From owner-svn-src-all@freebsd.org Sun Jun 28 17:45:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7C48A351C96; Sun, 28 Jun 2020 17:45:14 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vygt2hFhz4fYV; Sun, 28 Jun 2020 17:45:14 +0000 (UTC) (envelope-from mhorne@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 576D21A20C; Sun, 28 Jun 2020 17:45:14 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05SHjEuQ099354; Sun, 28 Jun 2020 17:45:14 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05SHjE1U099353; Sun, 28 Jun 2020 17:45:14 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202006281745.05SHjE1U099353@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Sun, 28 Jun 2020 17:45:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362729 - stable/12/sys/conf X-SVN-Group: stable-12 X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: stable/12/sys/conf X-SVN-Commit-Revision: 362729 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 17:45:14 -0000 Author: mhorne Date: Sun Jun 28 17:45:13 2020 New Revision: 362729 URL: https://svnweb.freebsd.org/changeset/base/362729 Log: MFC r361402: Simplify the RISC-V kernel linker invocation Modified: stable/12/sys/conf/Makefile.riscv Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/conf/Makefile.riscv ============================================================================== --- stable/12/sys/conf/Makefile.riscv Sun Jun 28 17:43:48 2020 (r362728) +++ stable/12/sys/conf/Makefile.riscv Sun Jun 28 17:45:13 2020 (r362729) @@ -35,12 +35,7 @@ INCLUDES+= -I$S/contrib/libfdt # We set this value using --defsym rather than hardcoding it in ldscript.riscv # so that different kernel configs can override the load address. KERNEL_LMA?= 0x80200000 - -SYSTEM_LD= @${LD} -N -m ${LD_EMULATION} -Bdynamic -T ${LDSCRIPT} ${_LDFLAGS} \ - --no-warn-mismatch --warn-common --export-dynamic \ - --defsym='kernel_lma=${KERNEL_LMA}' \ - --dynamic-linker /red/herring \ - -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o +LDFLAGS+= --defsym='kernel_lma=${KERNEL_LMA}' .if !empty(DDB_ENABLED) CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls From owner-svn-src-all@freebsd.org Sun Jun 28 17:47:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DD509351CAA; Sun, 28 Jun 2020 17:47:41 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vykj5Xmlz4g03; Sun, 28 Jun 2020 17:47:41 +0000 (UTC) (envelope-from mhorne@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 B49EB19AE1; Sun, 28 Jun 2020 17:47:41 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05SHlfUF099508; Sun, 28 Jun 2020 17:47:41 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05SHlfHN099507; Sun, 28 Jun 2020 17:47:41 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202006281747.05SHlfHN099507@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Sun, 28 Jun 2020 17:47:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362730 - stable/12/stand/efi/gptboot X-SVN-Group: stable-12 X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: stable/12/stand/efi/gptboot X-SVN-Commit-Revision: 362730 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 17:47:41 -0000 Author: mhorne Date: Sun Jun 28 17:47:41 2020 New Revision: 362730 URL: https://svnweb.freebsd.org/changeset/base/362730 Log: MFC r361754: gptboot.efi: align secbuf to 4K Modified: stable/12/stand/efi/gptboot/proto.c Directory Properties: stable/12/ (props changed) Modified: stable/12/stand/efi/gptboot/proto.c ============================================================================== --- stable/12/stand/efi/gptboot/proto.c Sun Jun 28 17:45:13 2020 (r362729) +++ stable/12/stand/efi/gptboot/proto.c Sun Jun 28 17:47:41 2020 (r362730) @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); #include "gpt.h" #include static const uuid_t freebsd_ufs_uuid = GPT_ENT_TYPE_FREEBSD_UFS; -static char secbuf[4096]; +static char secbuf[4096] __aligned(4096); static struct dsk dsk; static dev_info_t *devices = NULL; static dev_info_t *raw_device = NULL; From owner-svn-src-all@freebsd.org Sun Jun 28 17:49:42 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 58BEB351A57; Sun, 28 Jun 2020 17:49:42 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vyn21fBjz4fxW; Sun, 28 Jun 2020 17:49:42 +0000 (UTC) (envelope-from mhorne@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 2F96B1A052; Sun, 28 Jun 2020 17:49:42 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05SHngkx099652; Sun, 28 Jun 2020 17:49:42 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05SHngdT099651; Sun, 28 Jun 2020 17:49:42 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202006281749.05SHngdT099651@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Sun, 28 Jun 2020 17:49:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362731 - stable/12/share/man/man7 X-SVN-Group: stable-12 X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: stable/12/share/man/man7 X-SVN-Commit-Revision: 362731 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 17:49:42 -0000 Author: mhorne Date: Sun Jun 28 17:49:41 2020 New Revision: 362731 URL: https://svnweb.freebsd.org/changeset/base/362731 Log: MFC r362546: arch(7): small corrections for RISC-V Modified: stable/12/share/man/man7/arch.7 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man7/arch.7 ============================================================================== --- stable/12/share/man/man7/arch.7 Sun Jun 28 17:47:41 2020 (r362730) +++ stable/12/share/man/man7/arch.7 Sun Jun 28 17:49:41 2020 (r362731) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 8, 2020 +.Dd June 23, 2020 .Dt ARCH 7 .Os .Sh NAME @@ -258,8 +258,8 @@ is 8 bytes on all supported architectures except i386. .It powerpc Ta 4K .It powerpcspe Ta 4K .It powerpc64 Ta 4K -.It riscv64 Ta 4K -.It riscv64sf Ta 4K +.It riscv64 Ta 4K, 2M, 1G +.It riscv64sf Ta 4K, 2M, 1G .It sparc64 Ta 8K .El .Ss Floating Point @@ -283,8 +283,8 @@ is 8 bytes on all supported architectures except i386. .It powerpc Ta hard Ta hard, double precision .It powerpcspe Ta hard Ta hard, double precision .It powerpc64 Ta hard Ta hard, double precision -.It riscv64 Ta hard Ta hard, double precision -.It riscv64sf Ta soft Ta soft, double precision +.It riscv64 Ta hard Ta hard, quad precision +.It riscv64sf Ta soft Ta soft, quad precision .It sparc64 Ta hard Ta hard, quad precision .El .Pp @@ -378,7 +378,7 @@ Architecture-specific macros: .It powerpcspe Ta Dv __powerpc__, Dv __SPE__ .It powerpc64 Ta Dv __powerpc__, Dv __powerpc64__ .It riscv64 Ta Dv __riscv, Dv __riscv_xlen == 64 -.It riscv64sf Ta Dv __riscv, Dv __riscv_xlen == 64 +.It riscv64sf Ta Dv __riscv, Dv __riscv_xlen == 64, Dv __riscv_float_abi_soft .It sparc64 Ta Dv __sparc64__ .El .Pp From owner-svn-src-all@freebsd.org Sun Jun 28 17:51:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8A3F7351CD8; Sun, 28 Jun 2020 17:51:18 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vypt38jFz4gK1; Sun, 28 Jun 2020 17:51:18 +0000 (UTC) (envelope-from mhorne@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 679BF1A2A0; Sun, 28 Jun 2020 17:51:18 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05SHpIHW002942; Sun, 28 Jun 2020 17:51:18 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05SHpIgg002941; Sun, 28 Jun 2020 17:51:18 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202006281751.05SHpIgg002941@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Sun, 28 Jun 2020 17:51:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362732 - stable/12/sys/riscv/conf X-SVN-Group: stable-12 X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: stable/12/sys/riscv/conf X-SVN-Commit-Revision: 362732 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 17:51:18 -0000 Author: mhorne Date: Sun Jun 28 17:51:17 2020 New Revision: 362732 URL: https://svnweb.freebsd.org/changeset/base/362732 Log: MFC r354259: RISC-V: Remove EARLY_AP_STARTUP from GENERIC Modified: stable/12/sys/riscv/conf/GENERIC Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/riscv/conf/GENERIC ============================================================================== --- stable/12/sys/riscv/conf/GENERIC Sun Jun 28 17:49:41 2020 (r362731) +++ stable/12/sys/riscv/conf/GENERIC Sun Jun 28 17:51:17 2020 (r362732) @@ -72,7 +72,6 @@ options RACCT # Resource accounting framework options RACCT_DEFAULT_TO_DISABLED # Set kern.racct.enable=0 by default options RCTL # Resource limits options SMP -options EARLY_AP_STARTUP options INTRNG # RISC-V SBI console From owner-svn-src-all@freebsd.org Sun Jun 28 18:02:13 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7F87B351FD3; Sun, 28 Jun 2020 18:02:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vz3T2mjPz3Rxh; Sun, 28 Jun 2020 18:02:13 +0000 (UTC) (envelope-from dim@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 5A41B1A55C; Sun, 28 Jun 2020 18:02:13 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05SI2Daq007855; Sun, 28 Jun 2020 18:02:13 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05SI2DiL007849; Sun, 28 Jun 2020 18:02:13 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202006281802.05SI2DiL007849@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 28 Jun 2020 18:02:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362733 - head X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 362733 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 18:02:13 -0000 Author: dim Date: Sun Jun 28 18:02:12 2020 New Revision: 362733 URL: https://svnweb.freebsd.org/changeset/base/362733 Log: Remove older llvm-ranlib.1 entry from ObsoleteFiles.inc, as it has gotten its own manpage now, and should be no longer be removed by "make delete-old". MFC after: 3 weeks Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Jun 28 17:51:17 2020 (r362732) +++ head/ObsoleteFiles.inc Sun Jun 28 18:02:12 2020 (r362733) @@ -6763,7 +6763,6 @@ OLD_FILES+=usr/include/clang/3.3/x86intrin.h OLD_FILES+=usr/include/clang/3.3/xmmintrin.h OLD_FILES+=usr/include/clang/3.3/xopintrin.h OLD_FILES+=usr/share/man/man1/llvm-prof.1.gz -OLD_FILES+=usr/share/man/man1/llvm-ranlib.1.gz OLD_DIRS+=usr/include/clang/3.3 # 20140216: nve(4) removed OLD_FILES+=usr/share/man/man4/if_nve.4.gz From owner-svn-src-all@freebsd.org Sun Jun 28 18:02:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 18579352197; Sun, 28 Jun 2020 18:02:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49vz4C70v6z3SJ2; Sun, 28 Jun 2020 18:02:51 +0000 (UTC) (envelope-from dim@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 EBD0419DF6; Sun, 28 Jun 2020 18:02:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05SI2p6X011913; Sun, 28 Jun 2020 18:02:51 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05SI2pFJ011912; Sun, 28 Jun 2020 18:02:51 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202006281802.05SI2pFJ011912@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 28 Jun 2020 18:02:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362734 - head/usr.bin/clang/llvm-strings X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head/usr.bin/clang/llvm-strings X-SVN-Commit-Revision: 362734 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 18:02:52 -0000 Author: dim Date: Sun Jun 28 18:02:51 2020 New Revision: 362734 URL: https://svnweb.freebsd.org/changeset/base/362734 Log: Fix llvm-strings.1 not installing, this was a copy/paste error. MFC after: 3 weeks Modified: head/usr.bin/clang/llvm-strings/Makefile Modified: head/usr.bin/clang/llvm-strings/Makefile ============================================================================== --- head/usr.bin/clang/llvm-strings/Makefile Sun Jun 28 18:02:12 2020 (r362733) +++ head/usr.bin/clang/llvm-strings/Makefile Sun Jun 28 18:02:51 2020 (r362734) @@ -1,7 +1,6 @@ # $FreeBSD$ PROG_CXX= llvm-strings -MAN= SRCDIR= llvm/tools/llvm-strings SRCS+= llvm-strings.cpp From owner-svn-src-all@freebsd.org Sun Jun 28 18:56:33 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 60724352CF0; Sun, 28 Jun 2020 18:56:33 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w0G91w11z3TfP; Sun, 28 Jun 2020 18:56:33 +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 3CA8E1ACC2; Sun, 28 Jun 2020 18:56:33 +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 05SIuXFV042330; Sun, 28 Jun 2020 18:56:33 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05SIuWIa042328; Sun, 28 Jun 2020 18:56:32 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202006281856.05SIuWIa042328@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 28 Jun 2020 18:56:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362735 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 362735 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 18:56:33 -0000 Author: trasz Date: Sun Jun 28 18:56:32 2020 New Revision: 362735 URL: https://svnweb.freebsd.org/changeset/base/362735 Log: Make linux(4) support SO_PROTOCOL. Running Python test suite with python3.8 from Focal triggers those. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25491 Modified: head/sys/compat/linux/linux_socket.c head/sys/compat/linux/linux_socket.h Modified: head/sys/compat/linux/linux_socket.c ============================================================================== --- head/sys/compat/linux/linux_socket.c Sun Jun 28 18:02:51 2020 (r362734) +++ head/sys/compat/linux/linux_socket.c Sun Jun 28 18:56:32 2020 (r362735) @@ -236,6 +236,8 @@ linux_to_bsd_so_sockopt(int opt) return (SO_TIMESTAMP); case LINUX_SO_ACCEPTCONN: return (SO_ACCEPTCONN); + case LINUX_SO_PROTOCOL: + return (SO_PROTOCOL); } return (-1); } Modified: head/sys/compat/linux/linux_socket.h ============================================================================== --- head/sys/compat/linux/linux_socket.h Sun Jun 28 18:02:51 2020 (r362734) +++ head/sys/compat/linux/linux_socket.h Sun Jun 28 18:56:32 2020 (r362735) @@ -197,6 +197,7 @@ int linux_accept(struct thread *td, struct linux_accep #define LINUX_SO_ACCEPTCONN 30 #define LINUX_SO_SNDBUFFORCE 32 #define LINUX_SO_RCVBUFFORCE 33 +#define LINUX_SO_PROTOCOL 38 /* Socket options */ #define LINUX_IP_TOS 1 From owner-svn-src-all@freebsd.org Sun Jun 28 21:11:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DA22835612B; Sun, 28 Jun 2020 21:11:10 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w3FV5R1xz3c6g; Sun, 28 Jun 2020 21:11:10 +0000 (UTC) (envelope-from gonzo@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 9F24D1C726; Sun, 28 Jun 2020 21:11:10 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05SLBAoa025545; Sun, 28 Jun 2020 21:11:10 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05SLBAAq025544; Sun, 28 Jun 2020 21:11:10 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <202006282111.05SLBAAq025544@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 28 Jun 2020 21:11:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362736 - head/sys/arm64/rockchip X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: head/sys/arm64/rockchip X-SVN-Commit-Revision: 362736 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 21:11:10 -0000 Author: gonzo Date: Sun Jun 28 21:11:10 2020 New Revision: 362736 URL: https://svnweb.freebsd.org/changeset/base/362736 Log: Configure rx_delay/tx_delay values for RK3399/RK3328 GMAC For 1000Mb mode to work reliably TX/RX delays need to be configured between the TX/RX clock and the respective signals on the PHY to compensate for differing trace lengths on the PCB. Reviewed by: manu MFC after: 1 week Modified: head/sys/arm64/rockchip/if_dwc_rk.c Modified: head/sys/arm64/rockchip/if_dwc_rk.c ============================================================================== --- head/sys/arm64/rockchip/if_dwc_rk.c Sun Jun 28 18:56:32 2020 (r362735) +++ head/sys/arm64/rockchip/if_dwc_rk.c Sun Jun 28 21:11:10 2020 (r362736) @@ -57,6 +57,8 @@ __FBSDID("$FreeBSD$"); #define RK3328_GRF_MAC_CON0_RX_SHIFT 7 #define RK3328_GRF_MAC_CON1 0x0904 +#define RK3328_GRF_MAC_CON1_RX_ENA (1 << 1) +#define RK3328_GRF_MAC_CON1_TX_ENA (1 << 0) #define RK3328_GRF_MAC_CON2 0x0908 #define RK3328_GRF_MACPHY_CON0 0x0B00 #define RK3328_GRF_MACPHY_CON1 0x0B04 @@ -71,7 +73,6 @@ static struct ofw_compat_data compat_data[] = { {NULL, 0} }; -#ifdef notyet static void rk3328_set_delays(struct syscon *grf, phandle_t node) { @@ -82,22 +83,26 @@ rk3328_set_delays(struct syscon *grf, phandle_t node) if (OF_getencprop(node, "rx_delay", &rx, sizeof(rx)) <= 0) rx = 0x10; + if (bootverbose) + printf("setting RK3328 RX/TX delays: %d/%d\n", rx, tx); tx = ((tx & RK3328_GRF_MAC_CON0_TX_MASK) << RK3328_GRF_MAC_CON0_TX_SHIFT); rx = ((rx & RK3328_GRF_MAC_CON0_TX_MASK) << RK3328_GRF_MAC_CON0_RX_SHIFT); SYSCON_WRITE_4(grf, RK3328_GRF_MAC_CON0, tx | rx | 0xFFFF0000); + SYSCON_WRITE_4(grf, RK3328_GRF_MAC_CON1, RK3328_GRF_MAC_CON1_TX_ENA | RK3328_GRF_MAC_CON1_RX_ENA | + ((RK3328_GRF_MAC_CON1_TX_ENA | RK3328_GRF_MAC_CON1_RX_ENA) << 16)); } -#endif #define RK3399_GRF_SOC_CON6 0xc218 +#define RK3399_GRF_SOC_CON6_TX_ENA (1 << 7) #define RK3399_GRF_SOC_CON6_TX_MASK 0x7F #define RK3399_GRF_SOC_CON6_TX_SHIFT 0 #define RK3399_GRF_SOC_CON6_RX_MASK 0x7F +#define RK3399_GRF_SOC_CON6_RX_ENA (1 << 15) #define RK3399_GRF_SOC_CON6_RX_SHIFT 8 -#ifdef notyet static void rk3399_set_delays(struct syscon *grf, phandle_t node) { @@ -108,14 +113,15 @@ rk3399_set_delays(struct syscon *grf, phandle_t node) if (OF_getencprop(node, "rx_delay", &rx, sizeof(rx)) <= 0) rx = 0x10; + if (bootverbose) + printf("setting RK3399 RX/TX delays: %d/%d\n", rx, tx); tx = ((tx & RK3399_GRF_SOC_CON6_TX_MASK) << - RK3399_GRF_SOC_CON6_TX_SHIFT); + RK3399_GRF_SOC_CON6_TX_SHIFT) | RK3399_GRF_SOC_CON6_TX_ENA; rx = ((rx & RK3399_GRF_SOC_CON6_TX_MASK) << - RK3399_GRF_SOC_CON6_RX_SHIFT); + RK3399_GRF_SOC_CON6_RX_SHIFT) | RK3399_GRF_SOC_CON6_RX_ENA; SYSCON_WRITE_4(grf, RK3399_GRF_SOC_CON6, tx | rx | 0xFFFF0000); } -#endif static int if_dwc_rk_probe(device_t dev) @@ -144,12 +150,10 @@ if_dwc_rk_init(device_t dev) return (ENXIO); } -#ifdef notyet if (ofw_bus_is_compatible(dev, "rockchip,rk3399-gmac")) rk3399_set_delays(grf, node); else if (ofw_bus_is_compatible(dev, "rockchip,rk3328-gmac")) rk3328_set_delays(grf, node); -#endif /* Mode should be set according to dtb property */ From owner-svn-src-all@freebsd.org Sun Jun 28 21:15:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A85633563F0; Sun, 28 Jun 2020 21:15:29 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w3LT40jkz3cPp; Sun, 28 Jun 2020 21:15:29 +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 6C6CB1C843; Sun, 28 Jun 2020 21:15:29 +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 05SLFTKj028416; Sun, 28 Jun 2020 21:15:29 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05SLFTYg028415; Sun, 28 Jun 2020 21:15:29 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <202006282115.05SLFTYg028415@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 28 Jun 2020 21:15:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362737 - head/bin/sh/tests/execution X-SVN-Group: head X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: head/bin/sh/tests/execution X-SVN-Commit-Revision: 362737 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 21:15:29 -0000 Author: jilles Date: Sun Jun 28 21:15:29 2020 New Revision: 362737 URL: https://svnweb.freebsd.org/changeset/base/362737 Log: sh/tests: Fix flaky execution/bg12.0 When job control is not enabled, the shell ignores SIGINT while waiting for a foreground process unless that process exits on SIGINT. In this case, the foreground process is sleep and it does not exit on SIGINT because the signal is only sent to the shell. Depending on order of events, this could cause the SIGINT to be unexpectedly ignored. On lightly loaded bare metal, the chance of this happening tends to be less than 0.01% but with higher loads and/or virtualization it becomes more likely. Starting the sleep in background and using the wait builtin ensures SIGINT will not be ignored. PR: 247559 Reported by: lwhsu MFC after: 1 week Modified: head/bin/sh/tests/execution/bg12.0 Modified: head/bin/sh/tests/execution/bg12.0 ============================================================================== --- head/bin/sh/tests/execution/bg12.0 Sun Jun 28 21:11:10 2020 (r362736) +++ head/bin/sh/tests/execution/bg12.0 Sun Jun 28 21:15:29 2020 (r362737) @@ -4,7 +4,7 @@ T=`mktemp -d ${TMPDIR:-/tmp}/sh-test.XXXXXXXX` trap 'rm -rf $T' 0 cd $T || exit 3 mkfifo fifo1 -{ trap - INT; : >fifo1; sleep 5; exit 4; } & +{ trap - INT; : >fifo1; sleep 5 & wait; exit 4; } & : Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0ECA6356671; Sun, 28 Jun 2020 21:33:09 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w3kr6dpCz3dYS; Sun, 28 Jun 2020 21:33:08 +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 C75EA1CC67; Sun, 28 Jun 2020 21:33:08 +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 05SLX8VP040022; Sun, 28 Jun 2020 21:33:08 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05SLX8rL040021; Sun, 28 Jun 2020 21:33:08 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <202006282133.05SLX8rL040021@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 28 Jun 2020 21:33:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362738 - head/bin/sh/tests X-SVN-Group: head X-SVN-Commit-Author: jilles X-SVN-Commit-Paths: head/bin/sh/tests X-SVN-Commit-Revision: 362738 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 21:33:09 -0000 Author: jilles Date: Sun Jun 28 21:33:08 2020 New Revision: 362738 URL: https://svnweb.freebsd.org/changeset/base/362738 Log: sh/tests: Re-enable bin.sh.execution.functional_test.bg12.0 This reverts r362646. PR: 247559 MFC after: 1 week Modified: head/bin/sh/tests/functional_test.sh Modified: head/bin/sh/tests/functional_test.sh ============================================================================== --- head/bin/sh/tests/functional_test.sh Sun Jun 28 21:15:29 2020 (r362737) +++ head/bin/sh/tests/functional_test.sh Sun Jun 28 21:33:08 2020 (r362738) @@ -27,7 +27,6 @@ # $FreeBSD$ SRCDIR=$(atf_get_srcdir) -CATEGORY=$(basename ${SRCDIR}) check() { @@ -61,20 +60,7 @@ add_testcase() esac atf_test_case ${tc_escaped} - - if [ "$(atf_config_get ci false)" = "true" ]; then - case "${CATEGORY}/${tc}" in - execution/bg12.0) - eval "${tc_escaped}_body() { atf_skip 'https://bugs.freebsd.org/247559'; }" - ;; - *) - eval "${tc_escaped}_body() { check ${tc}; }" - ;; - esac - else - eval "${tc_escaped}_body() { check ${tc}; }" - fi - + eval "${tc_escaped}_body() { check ${tc}; }" atf_add_test_case ${tc_escaped} } From owner-svn-src-all@freebsd.org Sun Jun 28 21:34:39 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E432E3566C8; Sun, 28 Jun 2020 21:34:39 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w3mb5mN4z3dbw; Sun, 28 Jun 2020 21:34:39 +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 8F0F81C8CF; Sun, 28 Jun 2020 21:34:39 +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 05SLYdCP040143; Sun, 28 Jun 2020 21:34:39 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05SLYdfL040142; Sun, 28 Jun 2020 21:34:39 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202006282134.05SLYdfL040142@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 28 Jun 2020 21:34:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362739 - in head/sys: compat/linuxkpi/common/src dev/md X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys: compat/linuxkpi/common/src dev/md X-SVN-Commit-Revision: 362739 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 21:34:40 -0000 Author: markj Date: Sun Jun 28 21:34:38 2020 New Revision: 362739 URL: https://svnweb.freebsd.org/changeset/base/362739 Log: Remove some redundant assignments and computations. Reported by: alc Reviewed by: alc, kib Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25400 Modified: head/sys/compat/linuxkpi/common/src/linux_page.c head/sys/dev/md/md.c Modified: head/sys/compat/linuxkpi/common/src/linux_page.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_page.c Sun Jun 28 21:33:08 2020 (r362738) +++ head/sys/compat/linuxkpi/common/src/linux_page.c Sun Jun 28 21:34:38 2020 (r362739) @@ -199,7 +199,7 @@ linux_get_user_pages_internal(vm_map_t map, unsigned l int count; prot = write ? (VM_PROT_READ | VM_PROT_WRITE) : VM_PROT_READ; - len = ((size_t)nr_pages) << PAGE_SHIFT; + len = ptoa((vm_offset_t)nr_pages); count = vm_fault_quick_hold_pages(map, start, len, prot, pages, nr_pages); return (count == -1 ? -EFAULT : nr_pages); } @@ -219,9 +219,8 @@ __get_user_pages_fast(unsigned long start, int nr_page return (0); MPASS(pages != NULL); - va = start; map = &curthread->td_proc->p_vmspace->vm_map; - end = start + (((size_t)nr_pages) << PAGE_SHIFT); + end = start + ptoa((vm_offset_t)nr_pages); if (!vm_map_range_valid(map, start, end)) return (-EINVAL); prot = write ? (VM_PROT_READ | VM_PROT_WRITE) : VM_PROT_READ; Modified: head/sys/dev/md/md.c ============================================================================== --- head/sys/dev/md/md.c Sun Jun 28 21:33:08 2020 (r362738) +++ head/sys/dev/md/md.c Sun Jun 28 21:34:38 2020 (r362739) @@ -1561,8 +1561,8 @@ mdresize(struct md_s *sc, struct md_req *mdr) if (mdr->md_mediasize <= 0 || (mdr->md_mediasize % PAGE_SIZE) != 0) return (EDOM); - oldpages = OFF_TO_IDX(round_page(sc->mediasize)); - newpages = OFF_TO_IDX(round_page(mdr->md_mediasize)); + oldpages = OFF_TO_IDX(sc->mediasize); + newpages = OFF_TO_IDX(mdr->md_mediasize); if (newpages < oldpages) { VM_OBJECT_WLOCK(sc->object); vm_object_page_remove(sc->object, newpages, 0, 0); From owner-svn-src-all@freebsd.org Sun Jun 28 21:35:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CC536356A17; Sun, 28 Jun 2020 21:35:04 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w3n453mNz3dr2; Sun, 28 Jun 2020 21:35:04 +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 90FEB1CD15; Sun, 28 Jun 2020 21:35:04 +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 05SLZ4No040223; Sun, 28 Jun 2020 21:35:04 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05SLZ4w7040222; Sun, 28 Jun 2020 21:35:04 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202006282135.05SLZ4w7040222@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 28 Jun 2020 21:35:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362740 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 362740 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 21:35:04 -0000 Author: markj Date: Sun Jun 28 21:35:04 2020 New Revision: 362740 URL: https://svnweb.freebsd.org/changeset/base/362740 Log: Fix UMA's first-touch policy on systems with empty domains. Suppose a thread is running on a CPU in a NUMA domain with no physical RAM. When an item is freed to a first-touch zone, it ends up in the cross-domain bucket. When the bucket is full, it gets placed in another domain's bucket queue. However, when allocating an item, UMA will always go to the keg upon a per-CPU cache miss because the empty domain's bucket queue will always be empty. This means that a non-empty domain's bucket queues can grow very rapidly on such systems. For example, it can easily cause mbuf allocation failures when the zone limit is reached. Change cache_alloc() to follow a round-robin policy when running on an empty domain. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25355 Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c ============================================================================== --- head/sys/vm/uma_core.c Sun Jun 28 21:34:38 2020 (r362739) +++ head/sys/vm/uma_core.c Sun Jun 28 21:35:04 2020 (r362740) @@ -3398,7 +3398,7 @@ static __noinline bool cache_alloc(uma_zone_t zone, uma_cache_t cache, void *udata, int flags) { uma_bucket_t bucket; - int domain; + int curdomain, domain; bool new; CRITICAL_ASSERT(curthread); @@ -3445,7 +3445,8 @@ cache_alloc(uma_zone_t zone, uma_cache_t cache, void * * the critical section. */ domain = PCPU_GET(domain); - if ((cache_uz_flags(cache) & UMA_ZONE_ROUNDROBIN) != 0) + if ((cache_uz_flags(cache) & UMA_ZONE_ROUNDROBIN) != 0 || + VM_DOMAIN_EMPTY(domain)) domain = zone_domain_highest(zone, domain); bucket = cache_fetch_bucket(zone, cache, domain); if (bucket == NULL) { @@ -3470,7 +3471,8 @@ cache_alloc(uma_zone_t zone, uma_cache_t cache, void * cache = &zone->uz_cpu[curcpu]; if (cache->uc_allocbucket.ucb_bucket == NULL && ((cache_uz_flags(cache) & UMA_ZONE_FIRSTTOUCH) == 0 || - domain == PCPU_GET(domain))) { + (curdomain = PCPU_GET(domain)) == domain || + VM_DOMAIN_EMPTY(curdomain))) { if (new) atomic_add_long(&ZDOM_GET(zone, domain)->uzd_imax, bucket->ub_cnt); @@ -3877,7 +3879,7 @@ zone_alloc_bucket(uma_zone_t zone, void *udata, int do /* Avoid allocs targeting empty domains. */ if (domain != UMA_ANYDOMAIN && VM_DOMAIN_EMPTY(domain)) domain = UMA_ANYDOMAIN; - if ((zone->uz_flags & UMA_ZONE_ROUNDROBIN) != 0) + else if ((zone->uz_flags & UMA_ZONE_ROUNDROBIN) != 0) domain = UMA_ANYDOMAIN; if (zone->uz_max_items > 0) From owner-svn-src-all@freebsd.org Sun Jun 28 21:48:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 30B98356AB6; Sun, 28 Jun 2020 21:48:57 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w4550SpHz3fLC; Sun, 28 Jun 2020 21:48:57 +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 E76611CF0C; Sun, 28 Jun 2020 21:48:56 +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 05SLmudV046957; Sun, 28 Jun 2020 21:48:56 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05SLmuTa046956; Sun, 28 Jun 2020 21:48:56 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202006282148.05SLmuTa046956@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: Sun, 28 Jun 2020 21:48:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362741 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 362741 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 21:48:57 -0000 Author: 0mp (doc,ports committer) Date: Sun Jun 28 21:48:56 2020 New Revision: 362741 URL: https://svnweb.freebsd.org/changeset/base/362741 Log: Document that Intel Dual Band Wireless AC 8265 is supported by iwm(4) MFC after: 2 weeks Modified: head/share/man/man4/iwm.4 head/share/man/man4/iwmfw.4 Modified: head/share/man/man4/iwm.4 ============================================================================== --- head/share/man/man4/iwm.4 Sun Jun 28 21:35:04 2020 (r362740) +++ head/share/man/man4/iwm.4 Sun Jun 28 21:48:56 2020 (r362741) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 7, 2019 +.Dd June 28, 2020 .Dt IWM 4 .Os .Sh NAME @@ -88,6 +88,7 @@ driver provides support for: .It Intel Dual Band Wireless AC 7260 .It Intel Dual Band Wireless AC 7265 .It Intel Dual Band Wireless AC 8260 +.It Intel Dual Band Wireless AC 8265 .It Intel Dual Band Wireless AC 9260 .It Intel Dual Band Wireless AC 9270 .It Intel Dual Band Wireless AC 946X Modified: head/share/man/man4/iwmfw.4 ============================================================================== --- head/share/man/man4/iwmfw.4 Sun Jun 28 21:35:04 2020 (r362740) +++ head/share/man/man4/iwmfw.4 Sun Jun 28 21:48:56 2020 (r362741) @@ -22,7 +22,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 7, 2019 +.Dd June 28, 2020 .Dt IWMFW 4 .Os .Sh NAME @@ -68,7 +68,7 @@ iwm9260fw_load="YES" .Ed .Sh DESCRIPTION This module provides access to firmware sets for the -Intel Dual Band Wireless WiFi 3160, 3165, 3168, 7260, 7265, 8000, 8260, +Intel Dual Band Wireless WiFi 3160, 3165, 3168, 7260, 7265, 8000, 8260, 8265, 9000 and 9260 series of IEEE 802.11n/11ac adapters. It may be statically linked into the kernel, or loaded as a module. .Sh SEE ALSO From owner-svn-src-all@freebsd.org Sun Jun 28 22:04:53 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4FE25357193; Sun, 28 Jun 2020 22:04: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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w4RT18jpz3g5h; Sun, 28 Jun 2020 22:04:53 +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 0BEA71D1C8; Sun, 28 Jun 2020 22:04:53 +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 05SM4qD1058966; Sun, 28 Jun 2020 22:04:52 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05SM4qic058965; Sun, 28 Jun 2020 22:04:52 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202006282204.05SM4qic058965@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: Sun, 28 Jun 2020 22:04:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362742 - head/usr.sbin/config X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: head/usr.sbin/config X-SVN-Commit-Revision: 362742 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jun 2020 22:04:53 -0000 Author: 0mp (doc,ports committer) Date: Sun Jun 28 22:04:52 2020 New Revision: 362742 URL: https://svnweb.freebsd.org/changeset/base/362742 Log: Do not use macros in the argument to -width This patch improves the presentation of the FILES section dramatically. MFC after: 2 weeks Modified: head/usr.sbin/config/config.8 Modified: head/usr.sbin/config/config.8 ============================================================================== --- head/usr.sbin/config/config.8 Sun Jun 28 21:48:56 2020 (r362741) +++ head/usr.sbin/config/config.8 Sun Jun 28 22:04:52 2020 (r362742) @@ -28,7 +28,7 @@ .\" @(#)config.8 8.2 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd May 8, 2007 +.Dd June 29, 2020 .Dt CONFIG 8 .Os .Sh NAME @@ -61,7 +61,7 @@ that give alternate files for a specific machine section below). .Pp Available options and operands: -.Bl -tag -width ".Ar SYSTEM_NAME" +.Bl -tag -width "SYSTEM_NAME" .It Fl V Print the .Nm @@ -235,7 +235,7 @@ installs in the root file system. .El .Sh FILES -.Bl -tag -width ".Pa /sys/ Ns Va ARCH Ns Pa /compile/ Ns Ar SYSTEM_NAME" -compact +.Bl -tag -width "/sys/ARCH/compile/SYSTEM_NAME" -compact .It Pa /sys/conf/files list of common files system is built from .It Pa /sys/conf/Makefile. Ns Va ARCH From owner-svn-src-all@freebsd.org Mon Jun 29 00:28:12 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B0B623591AF; Mon, 29 Jun 2020 00:28:12 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w7cr4FG0z42T9; Mon, 29 Jun 2020 00:28:12 +0000 (UTC) (envelope-from gonzo@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 5C10E1E759; Mon, 29 Jun 2020 00:28:12 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05T0SCl9044265; Mon, 29 Jun 2020 00:28:12 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T0SBw5044260; Mon, 29 Jun 2020 00:28:11 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <202006290028.05T0SBw5044260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 29 Jun 2020 00:28:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362743 - in stable/12/sys: arm/freescale/imx dev/hdmi X-SVN-Group: stable-12 X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: in stable/12/sys: arm/freescale/imx dev/hdmi X-SVN-Commit-Revision: 362743 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 00:28:12 -0000 Author: gonzo Date: Mon Jun 29 00:28:11 2020 New Revision: 362743 URL: https://svnweb.freebsd.org/changeset/base/362743 Log: MFC r362029-r362030 r362029: Fix reading EDID on TVs/monitors without E-DCC support Writing segment id to I2C device 0x30 only required if the segment is non-zero. On the devices without E-DCC support writing to that address fails and whole transaction then fails too. To avoid this do not attempt write to the segment selection device unless required. r362030: Add mode selection to iMX6 IPU driver - Configure ipu1_di0 tob e sourced from the VIDEO_PLL(PLL5) and hardcode frequency to (455000000/3)Mhz. This value, further divided, can yield frequencies close enough to support 1080p, 720p, 1024x768, and 640x480 modes. This is not ideal but it's an improvement comparing to the only hardcoded 1024x768 mode. - Fix memory leaks if attach method failed - Print EDID when -v passed to the kernel Modified: stable/12/sys/arm/freescale/imx/imx6_ccm.c stable/12/sys/arm/freescale/imx/imx6_ccmreg.h stable/12/sys/arm/freescale/imx/imx6_ipu.c stable/12/sys/arm/freescale/imx/imx_ccmvar.h stable/12/sys/dev/hdmi/dwc_hdmi.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/freescale/imx/imx6_ccm.c ============================================================================== --- stable/12/sys/arm/freescale/imx/imx6_ccm.c Sun Jun 28 22:04:52 2020 (r362742) +++ stable/12/sys/arm/freescale/imx/imx6_ccm.c Mon Jun 29 00:28:11 2020 (r362743) @@ -393,6 +393,53 @@ imx_ccm_ahb_hz(void) return (132000000); } +int +imx_ccm_pll_video_enable(void) +{ + uint32_t reg; + int timeout; + + /* Power down PLL */ + reg = RD4(ccm_sc, CCM_ANALOG_PLL_VIDEO); + reg &= ~CCM_ANALOG_PLL_VIDEO_POWERDOWN; + WR4(ccm_sc, CCM_ANALOG_PLL_VIDEO, reg); + + /* + * Fvideo = Fref * (37 + 11/12) / 2 + * Fref = 24MHz, Fvideo = 455MHz + */ + reg &= ~CCM_ANALOG_PLL_VIDEO_POST_DIV_SELECT_MASK; + reg |= CCM_ANALOG_PLL_VIDEO_POST_DIV_2; + reg &= ~CCM_ANALOG_PLL_VIDEO_DIV_SELECT_MASK; + reg |= 37 << CCM_ANALOG_PLL_VIDEO_DIV_SELECT_SHIFT; + WR4(ccm_sc, CCM_ANALOG_PLL_VIDEO, reg); + + WR4(ccm_sc, CCM_ANALOG_PLL_VIDEO_NUM, 11); + WR4(ccm_sc, CCM_ANALOG_PLL_VIDEO_DENOM, 12); + + /* Power up and wait for PLL lock down */ + reg = RD4(ccm_sc, CCM_ANALOG_PLL_VIDEO); + reg &= ~CCM_ANALOG_PLL_VIDEO_POWERDOWN; + WR4(ccm_sc, CCM_ANALOG_PLL_VIDEO, reg); + + for (timeout = 100000; timeout > 0; timeout--) { + if (RD4(ccm_sc, CCM_ANALOG_PLL_VIDEO) & + CCM_ANALOG_PLL_VIDEO_LOCK) { + break; + } + } + if (timeout <= 0) { + return ETIMEDOUT; + } + + /* Enable the PLL */ + reg |= CCM_ANALOG_PLL_VIDEO_ENABLE; + reg &= ~CCM_ANALOG_PLL_VIDEO_BYPASS; + WR4(ccm_sc, CCM_ANALOG_PLL_VIDEO, reg); + + return (0); +} + void imx_ccm_ipu_enable(int ipu) { @@ -406,8 +453,26 @@ imx_ccm_ipu_enable(int ipu) else reg |= CCGR3_IPU2_IPU | CCGR3_IPU2_DI0; WR4(sc, CCM_CCGR3, reg); + + /* Set IPU1_DI0 clock to source from PLL5 and divide it by 3 */ + reg = RD4(sc, CCM_CHSCCDR); + reg &= ~(CHSCCDR_IPU1_DI0_PRE_CLK_SEL_MASK | + CHSCCDR_IPU1_DI0_PODF_MASK | CHSCCDR_IPU1_DI0_CLK_SEL_MASK); + reg |= (CHSCCDR_PODF_DIVIDE_BY_3 << CHSCCDR_IPU1_DI0_PODF_SHIFT); + reg |= (CHSCCDR_IPU_PRE_CLK_PLL5 << CHSCCDR_IPU1_DI0_PRE_CLK_SEL_SHIFT); + WR4(sc, CCM_CHSCCDR, reg); + + reg |= (CHSCCDR_CLK_SEL_PREMUXED << CHSCCDR_IPU1_DI0_CLK_SEL_SHIFT); + WR4(sc, CCM_CHSCCDR, reg); } +uint32_t +imx_ccm_ipu_hz(void) +{ + + return (455000000 / 3); +} + void imx_ccm_hdmi_enable(void) { @@ -418,16 +483,6 @@ imx_ccm_hdmi_enable(void) reg = RD4(sc, CCM_CCGR2); reg |= CCGR2_HDMI_TX | CCGR2_HDMI_TX_ISFR; WR4(sc, CCM_CCGR2, reg); - - /* Set HDMI clock to 280MHz */ - reg = RD4(sc, CCM_CHSCCDR); - reg &= ~(CHSCCDR_IPU1_DI0_PRE_CLK_SEL_MASK | - CHSCCDR_IPU1_DI0_PODF_MASK | CHSCCDR_IPU1_DI0_CLK_SEL_MASK); - reg |= (CHSCCDR_PODF_DIVIDE_BY_3 << CHSCCDR_IPU1_DI0_PODF_SHIFT); - reg |= (CHSCCDR_IPU_PRE_CLK_540M_PFD << CHSCCDR_IPU1_DI0_PRE_CLK_SEL_SHIFT); - WR4(sc, CCM_CHSCCDR, reg); - reg |= (CHSCCDR_CLK_SEL_LDB_DI0 << CHSCCDR_IPU1_DI0_CLK_SEL_SHIFT); - WR4(sc, CCM_CHSCCDR, reg); } uint32_t Modified: stable/12/sys/arm/freescale/imx/imx6_ccmreg.h ============================================================================== --- stable/12/sys/arm/freescale/imx/imx6_ccmreg.h Sun Jun 28 22:04:52 2020 (r362742) +++ stable/12/sys/arm/freescale/imx/imx6_ccmreg.h Mon Jun 29 00:28:11 2020 (r362743) @@ -64,9 +64,12 @@ #define CHSCCDR_IPU1_DI0_PODF_SHIFT 3 #define CHSCCDR_IPU1_DI0_CLK_SEL_MASK (0x7) #define CHSCCDR_IPU1_DI0_CLK_SEL_SHIFT 0 +#define CHSCCDR_CLK_SEL_PREMUXED 0 #define CHSCCDR_CLK_SEL_LDB_DI0 3 #define CHSCCDR_PODF_DIVIDE_BY_3 2 +#define CHSCCDR_PODF_DIVIDE_BY_1 0 #define CHSCCDR_IPU_PRE_CLK_540M_PFD 5 +#define CHSCCDR_IPU_PRE_CLK_PLL5 2 #define CCM_CSCDR2 0x038 #define CCM_CLPCR 0x054 #define CCM_CLPCR_LPM_MASK 0x03 @@ -138,6 +141,19 @@ #define CCGR6_USDHC3 (0x3 << 6) #define CCGR6_USDHC4 (0x3 << 8) #define CCM_CMEOR 0x088 + +#define CCM_ANALOG_PLL_VIDEO 0x000040a0 +#define CCM_ANALOG_PLL_VIDEO_LOCK (1u << 31) +#define CCM_ANALOG_PLL_VIDEO_BYPASS (1u << 16) +#define CCM_ANALOG_PLL_VIDEO_ENABLE (1u << 13) +#define CCM_ANALOG_PLL_VIDEO_POWERDOWN (1u << 12) +#define CCM_ANALOG_PLL_VIDEO_POST_DIV_SELECT_MASK (3u << 19) +#define CCM_ANALOG_PLL_VIDEO_POST_DIV_2 (1u << 19) +#define CCM_ANALOG_PLL_VIDEO_DIV_SELECT_MASK (0x7f << 0) +#define CCM_ANALOG_PLL_VIDEO_DIV_SELECT_SHIFT 0 + +#define CCM_ANALOG_PLL_VIDEO_NUM 0x000040b0 +#define CCM_ANALOG_PLL_VIDEO_DENOM 0x000040c0 #define CCM_ANALOG_PLL_ENET 0x000040e0 #define CCM_ANALOG_PLL_ENET_LOCK (1u << 31) Modified: stable/12/sys/arm/freescale/imx/imx6_ipu.c ============================================================================== --- stable/12/sys/arm/freescale/imx/imx6_ipu.c Sun Jun 28 22:04:52 2020 (r362742) +++ stable/12/sys/arm/freescale/imx/imx6_ipu.c Mon Jun 29 00:28:11 2020 (r362743) @@ -60,12 +60,8 @@ __FBSDID("$FreeBSD$"); #include "fb_if.h" #include "hdmi_if.h" -#define EDID_DEBUG_not - static int have_ipu = 0; -#define LDB_CLOCK_RATE 280000000 - #define MODE_HBP(mode) ((mode)->htotal - (mode)->hsync_end) #define MODE_HFP(mode) ((mode)->hsync_start - (mode)->hdisplay) #define MODE_HSW(mode) ((mode)->hsync_end - (mode)->hsync_start) @@ -76,11 +72,6 @@ static int have_ipu = 0; #define MODE_BPP 16 #define MODE_PIXEL_CLOCK_INVERT 1 -#define M(nm,hr,vr,clk,hs,he,ht,vs,ve,vt,f) \ - { clk, hr, hs, he, ht, vr, vs, ve, vt, f, nm } - -static struct videomode mode1024x768 = M("1024x768x60",1024,768,65000,1048,1184,1344,771,777,806,VID_NHSYNC|VID_PHSYNC); - #define DMA_CHANNEL 23 #define DC_CHAN5 5 #define DI_PORT 0 @@ -383,7 +374,7 @@ struct ipu_softc { void *sc_intr_hl; struct mtx sc_mtx; struct fb_info sc_fb_info; - struct videomode *sc_mode; + const struct videomode *sc_mode; /* Framebuffer */ bus_dma_tag_t sc_dma_tag; @@ -633,10 +624,30 @@ ipu_init_microcode_template(struct ipu_softc *sc, int } } +static uint32_t +ipu_calc_divisor(uint32_t reference, uint32_t freq) +{ + uint32_t div, i; + uint32_t delta, min_delta; + + min_delta = freq; + div = 255; + + for (i = 1; i < 255; i++) { + delta = abs(reference/i - freq); + if (delta < min_delta) { + div = i; + min_delta = delta; + } + } + + return (div); +} + static void ipu_config_timing(struct ipu_softc *sc, int di) { - int div; + uint32_t div; uint32_t di_scr_conf; uint32_t gen_offset, gen; uint32_t as_gen_offset, as_gen; @@ -644,10 +655,11 @@ ipu_config_timing(struct ipu_softc *sc, int di) uint32_t dw_set_offset, dw_set; uint32_t bs_clkgen_offset; int map; + uint32_t freq; - /* TODO: check mode restrictions / fixup */ - /* TODO: enable timers, get divisors */ - div = 1; + freq = sc->sc_mode->dot_clock * 1000; + + div = ipu_calc_divisor(imx_ccm_ipu_hz(), freq); map = 0; bs_clkgen_offset = di ? IPU_DI1_BS_CLKGEN0 : IPU_DI0_BS_CLKGEN0; @@ -655,14 +667,6 @@ ipu_config_timing(struct ipu_softc *sc, int di) /* half of the divider */ IPU_WRITE4(sc, bs_clkgen_offset + 4, DI_BS_CLKGEN1_DOWN(div / 2, div % 2)); - /* - * TODO: Configure LLDB clock by changing following fields - * in CCM fields: - * CS2CDR_LDB_DI0_CLK_SEL - * CSCMR2_LDB_DI0_IPU_DIV - * CBCDR_MMDC_CH1_AXI_PODF - */ - /* Setup wave generator */ dw_gen_offset = di ? IPU_DI1_DW_GEN_0 : IPU_DI0_DW_GEN_0; dw_gen = DW_GEN_DI_ACCESS_SIZE(div - 1) | DW_GEN_DI_COMPONENT_SIZE(div - 1); @@ -767,8 +771,6 @@ ipu_dc_enable(struct ipu_softc *sc) conf &= ~WRITE_CH_CONF_PROG_CHAN_TYP_MASK; conf |= WRITE_CH_CONF_PROG_CHAN_NORMAL; IPU_WRITE4(sc, DC_WRITE_CH_CONF_5, conf); - - /* TODO: enable clock */ } static void @@ -1062,15 +1064,55 @@ fail: return (err); } +static int +ipu_mode_is_valid(const struct videomode *mode) +{ + if ((mode->dot_clock < 13500) || (mode->dot_clock > 216000)) + return (0); + + return (1); +} + +static const struct videomode * +ipu_pick_mode(struct edid_info *ei) +{ + const struct videomode *videomode; + const struct videomode *m; + int n; + + videomode = NULL; + + /* + * Pick a mode. + */ + if (ei->edid_preferred_mode != NULL) { + if (ipu_mode_is_valid(ei->edid_preferred_mode)) + videomode = ei->edid_preferred_mode; + } + + if (videomode == NULL) { + m = ei->edid_modes; + + sort_modes(ei->edid_modes, + &ei->edid_preferred_mode, + ei->edid_nmodes); + for (n = 0; n < ei->edid_nmodes; n++) + if (ipu_mode_is_valid(&m[n])) { + videomode = &m[n]; + break; + } + } + + return videomode; +} + static void ipu_hdmi_event(void *arg, device_t hdmi_dev) { struct ipu_softc *sc; uint8_t *edid; uint32_t edid_len; -#ifdef EDID_DEBUG struct edid_info ei; -#endif const struct videomode *videomode; sc = arg; @@ -1083,14 +1125,28 @@ ipu_hdmi_event(void *arg, device_t hdmi_dev) videomode = NULL; -#ifdef EDID_DEBUG if ( edid && (edid_parse(edid, &ei) == 0)) { - edid_print(&ei); + if (bootverbose) + edid_print(&ei); + videomode = ipu_pick_mode(&ei); } else device_printf(sc->sc_dev, "failed to parse EDID\n"); -#endif - sc->sc_mode = &mode1024x768; + /* Use standard VGA as fallback */ + if (videomode == NULL) + videomode = pick_mode_by_ref(640, 480, 60); + + if (videomode == NULL) { + device_printf(sc->sc_dev, "failed to find usable videomode\n"); + return; + } + + sc->sc_mode = videomode; + + if (bootverbose) + device_printf(sc->sc_dev, "detected videomode: %dx%d\n", + videomode->hdisplay, videomode->vdisplay); + ipu_init(sc); HDMI_SET_VIDEOMODE(hdmi_dev, sc->sc_mode); @@ -1144,9 +1200,22 @@ ipu_attach(device_t dev) } /* Enable IPU1 */ + if (imx_ccm_pll_video_enable() != 0) { + bus_release_resource(dev, SYS_RES_MEMORY, + sc->sc_mem_rid, sc->sc_mem_res); + bus_release_resource(dev, SYS_RES_IRQ, + sc->sc_irq_rid, sc->sc_irq_res); + device_printf(dev, "failed to set up video PLL\n"); + return (ENXIO); + } + imx_ccm_ipu_enable(1); if (src_reset_ipu() != 0) { + bus_release_resource(dev, SYS_RES_MEMORY, + sc->sc_mem_rid, sc->sc_mem_res); + bus_release_resource(dev, SYS_RES_IRQ, + sc->sc_irq_rid, sc->sc_irq_res); device_printf(dev, "failed to reset IPU\n"); return (ENXIO); } Modified: stable/12/sys/arm/freescale/imx/imx_ccmvar.h ============================================================================== --- stable/12/sys/arm/freescale/imx/imx_ccmvar.h Sun Jun 28 22:04:52 2020 (r362742) +++ stable/12/sys/arm/freescale/imx/imx_ccmvar.h Mon Jun 29 00:28:11 2020 (r362743) @@ -49,10 +49,12 @@ uint32_t imx_ccm_perclk_hz(void); uint32_t imx_ccm_sdhci_hz(void); uint32_t imx_ccm_uart_hz(void); uint32_t imx_ccm_ahb_hz(void); +uint32_t imx_ccm_ipu_hz(void); void imx_ccm_usb_enable(device_t _usbdev); void imx_ccm_usbphy_enable(device_t _phydev); void imx_ccm_ssi_configure(device_t _ssidev); +int imx_ccm_pll_video_enable(void); void imx_ccm_hdmi_enable(void); void imx_ccm_ipu_enable(int ipu); int imx6_ccm_sata_enable(void); Modified: stable/12/sys/dev/hdmi/dwc_hdmi.c ============================================================================== --- stable/12/sys/dev/hdmi/dwc_hdmi.c Sun Jun 28 22:04:52 2020 (r362742) +++ stable/12/sys/dev/hdmi/dwc_hdmi.c Mon Jun 29 00:28:11 2020 (r362743) @@ -657,6 +657,11 @@ hdmi_edid_read(struct dwc_hdmi_softc *sc, int block, u int result; uint8_t addr = block & 1 ? EDID_LENGTH : 0; uint8_t segment = block >> 1; + /* + * Some devices do not support E-DDC so attempt + * writing segment address only if it's neccessary + */ + unsigned char xfers = segment ? 3 : 2; struct iic_msg msg[] = { { I2C_DDC_SEGADDR, IIC_M_WR, 1, &segment }, { I2C_DDC_ADDR, IIC_M_WR, 1, &addr }, @@ -686,7 +691,7 @@ hdmi_edid_read(struct dwc_hdmi_softc *sc, int block, u return (result); } - result = iicbus_transfer(i2c_dev, msg, 3); + result = iicbus_transfer(i2c_dev, &msg[3 - xfers], xfers); iicbus_release_bus(i2c_dev, sc->sc_dev); if (result) { From owner-svn-src-all@freebsd.org Mon Jun 29 00:31:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C207F359334; Mon, 29 Jun 2020 00:31:11 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w7hH4z7pz42SB; Mon, 29 Jun 2020 00:31:11 +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 8E20A1EBCB; Mon, 29 Jun 2020 00:31:11 +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 05T0VBhm045174; Mon, 29 Jun 2020 00:31:11 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T0VBAU045173; Mon, 29 Jun 2020 00:31:11 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <202006290031.05T0VBAU045173@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Mon, 29 Jun 2020 00:31:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362744 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 362744 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 00:31:11 -0000 Author: chuck Date: Mon Jun 29 00:31:11 2020 New Revision: 362744 URL: https://svnweb.freebsd.org/changeset/base/362744 Log: bhyve: convert NVMe logging statements Convert the debug and warning logging macros to be parameterized and correctly use bhyve's PRINTLN macro. Reviewed by: imp Tested by: Jason Tubnor MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24878 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:28:11 2020 (r362743) +++ head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:31:11 2020 (r362744) @@ -83,8 +83,8 @@ __FBSDID("$FreeBSD$"); static int nvme_debug = 0; -#define DPRINTF(params) if (nvme_debug) PRINTLN params -#define WPRINTF(params) PRINTLN params +#define DPRINTF(fmt, args...) if (nvme_debug) PRINTLN(fmt, ##args) +#define WPRINTF(fmt, args...) PRINTLN(fmt, ##args) /* defaults; can be overridden */ #define NVME_MSIX_BAR 4 @@ -495,7 +495,7 @@ pci_nvme_init_logpages(struct pci_nvme_softc *sc) static void pci_nvme_reset_locked(struct pci_nvme_softc *sc) { - DPRINTF(("%s", __func__)); + DPRINTF("%s", __func__); sc->regs.cap_lo = (ZERO_BASED(sc->max_qentries) & NVME_CAP_LO_REG_MQES_MASK) | (1 << NVME_CAP_LO_REG_CQR_SHIFT) | @@ -562,23 +562,23 @@ pci_nvme_init_controller(struct vmctx *ctx, struct pci { uint16_t acqs, asqs; - DPRINTF(("%s", __func__)); + DPRINTF("%s", __func__); asqs = (sc->regs.aqa & NVME_AQA_REG_ASQS_MASK) + 1; sc->submit_queues[0].size = asqs; sc->submit_queues[0].qbase = vm_map_gpa(ctx, sc->regs.asq, sizeof(struct nvme_command) * asqs); - DPRINTF(("%s mapping Admin-SQ guest 0x%lx, host: %p", - __func__, sc->regs.asq, sc->submit_queues[0].qbase)); + DPRINTF("%s mapping Admin-SQ guest 0x%lx, host: %p", + __func__, sc->regs.asq, sc->submit_queues[0].qbase); acqs = ((sc->regs.aqa >> NVME_AQA_REG_ACQS_SHIFT) & NVME_AQA_REG_ACQS_MASK) + 1; sc->compl_queues[0].size = acqs; sc->compl_queues[0].qbase = vm_map_gpa(ctx, sc->regs.acq, sizeof(struct nvme_completion) * acqs); - DPRINTF(("%s mapping Admin-CQ guest 0x%lx, host: %p", - __func__, sc->regs.acq, sc->compl_queues[0].qbase)); + DPRINTF("%s mapping Admin-CQ guest 0x%lx, host: %p", + __func__, sc->regs.acq, sc->compl_queues[0].qbase); } static int @@ -634,10 +634,10 @@ nvme_opc_delete_io_sq(struct pci_nvme_softc* sc, struc { uint16_t qid = command->cdw10 & 0xffff; - DPRINTF(("%s DELETE_IO_SQ %u", __func__, qid)); + DPRINTF("%s DELETE_IO_SQ %u", __func__, qid); if (qid == 0 || qid > sc->num_squeues) { - WPRINTF(("%s NOT PERMITTED queue id %u / num_squeues %u", - __func__, qid, sc->num_squeues)); + WPRINTF("%s NOT PERMITTED queue id %u / num_squeues %u", + __func__, qid, sc->num_squeues); pci_nvme_status_tc(&compl->status, NVME_SCT_COMMAND_SPECIFIC, NVME_SC_INVALID_QUEUE_IDENTIFIER); return (1); @@ -657,8 +657,8 @@ nvme_opc_create_io_sq(struct pci_nvme_softc* sc, struc struct nvme_submission_queue *nsq; if ((qid == 0) || (qid > sc->num_squeues)) { - WPRINTF(("%s queue index %u > num_squeues %u", - __func__, qid, sc->num_squeues)); + WPRINTF("%s queue index %u > num_squeues %u", + __func__, qid, sc->num_squeues); pci_nvme_status_tc(&compl->status, NVME_SCT_COMMAND_SPECIFIC, NVME_SC_INVALID_QUEUE_IDENTIFIER); @@ -673,20 +673,20 @@ nvme_opc_create_io_sq(struct pci_nvme_softc* sc, struc nsq->cqid = (command->cdw11 >> 16) & 0xffff; nsq->qpriority = (command->cdw11 >> 1) & 0x03; - DPRINTF(("%s sq %u size %u gaddr %p cqid %u", __func__, - qid, nsq->size, nsq->qbase, nsq->cqid)); + DPRINTF("%s sq %u size %u gaddr %p cqid %u", __func__, + qid, nsq->size, nsq->qbase, nsq->cqid); pci_nvme_status_genc(&compl->status, NVME_SC_SUCCESS); - DPRINTF(("%s completed creating IOSQ qid %u", - __func__, qid)); + DPRINTF("%s completed creating IOSQ qid %u", + __func__, qid); } else { /* * Guest sent non-cont submission queue request. * This setting is unsupported by this emulation. */ - WPRINTF(("%s unsupported non-contig (list-based) " - "create i/o submission queue", __func__)); + WPRINTF("%s unsupported non-contig (list-based) " + "create i/o submission queue", __func__); pci_nvme_status_genc(&compl->status, NVME_SC_INVALID_FIELD); } @@ -699,10 +699,10 @@ nvme_opc_delete_io_cq(struct pci_nvme_softc* sc, struc { uint16_t qid = command->cdw10 & 0xffff; - DPRINTF(("%s DELETE_IO_CQ %u", __func__, qid)); + DPRINTF("%s DELETE_IO_CQ %u", __func__, qid); if (qid == 0 || qid > sc->num_cqueues) { - WPRINTF(("%s queue index %u / num_cqueues %u", - __func__, qid, sc->num_cqueues)); + WPRINTF("%s queue index %u / num_cqueues %u", + __func__, qid, sc->num_cqueues); pci_nvme_status_tc(&compl->status, NVME_SCT_COMMAND_SPECIFIC, NVME_SC_INVALID_QUEUE_IDENTIFIER); return (1); @@ -722,8 +722,8 @@ nvme_opc_create_io_cq(struct pci_nvme_softc* sc, struc struct nvme_completion_queue *ncq; if ((qid == 0) || (qid > sc->num_cqueues)) { - WPRINTF(("%s queue index %u > num_cqueues %u", - __func__, qid, sc->num_cqueues)); + WPRINTF("%s queue index %u > num_cqueues %u", + __func__, qid, sc->num_cqueues); pci_nvme_status_tc(&compl->status, NVME_SCT_COMMAND_SPECIFIC, NVME_SC_INVALID_QUEUE_IDENTIFIER); @@ -744,9 +744,9 @@ nvme_opc_create_io_cq(struct pci_nvme_softc* sc, struc /* * Non-contig completion queue unsupported. */ - WPRINTF(("%s unsupported non-contig (list-based) " + WPRINTF("%s unsupported non-contig (list-based) " "create i/o completion queue", - __func__)); + __func__); /* 0x12 = Invalid Use of Controller Memory Buffer */ pci_nvme_status_genc(&compl->status, 0x12); @@ -762,7 +762,7 @@ nvme_opc_get_log_page(struct pci_nvme_softc* sc, struc uint32_t logsize = (1 + ((command->cdw10 >> 16) & 0xFFF)) * 2; uint8_t logpage = command->cdw10 & 0xFF; - DPRINTF(("%s log page %u len %u", __func__, logpage, logsize)); + DPRINTF("%s log page %u len %u", __func__, logpage, logsize); pci_nvme_status_genc(&compl->status, NVME_SC_SUCCESS); @@ -784,8 +784,8 @@ nvme_opc_get_log_page(struct pci_nvme_softc* sc, struc NVME_COPY_TO_PRP); break; default: - WPRINTF(("%s get log page %x command not supported", - __func__, logpage)); + WPRINTF("%s get log page %x command not supported", + __func__, logpage); pci_nvme_status_tc(&compl->status, NVME_SCT_COMMAND_SPECIFIC, NVME_SC_INVALID_LOG_PAGE); @@ -800,8 +800,8 @@ nvme_opc_identify(struct pci_nvme_softc* sc, struct nv { void *dest; - DPRINTF(("%s identify 0x%x nsid 0x%x", __func__, - command->cdw10 & 0xFF, command->nsid)); + DPRINTF("%s identify 0x%x nsid 0x%x", __func__, + command->cdw10 & 0xFF, command->nsid); switch (command->cdw10 & 0xFF) { case 0x00: /* return Identify Namespace data structure */ @@ -832,8 +832,8 @@ nvme_opc_identify(struct pci_nvme_softc* sc, struct nv case 0x14: case 0x15: default: - DPRINTF(("%s unsupported identify command requested 0x%x", - __func__, command->cdw10 & 0xFF)); + DPRINTF("%s unsupported identify command requested 0x%x", + __func__, command->cdw10 & 0xFF); pci_nvme_status_genc(&compl->status, NVME_SC_INVALID_FIELD); return (1); } @@ -850,29 +850,29 @@ nvme_set_feature_queues(struct pci_nvme_softc* sc, str nqr = command->cdw11 & 0xFFFF; if (nqr == 0xffff) { - WPRINTF(("%s: Illegal NSQR value %#x", __func__, nqr)); + WPRINTF("%s: Illegal NSQR value %#x", __func__, nqr); pci_nvme_status_genc(&compl->status, NVME_SC_INVALID_FIELD); return (-1); } sc->num_squeues = ONE_BASED(nqr); if (sc->num_squeues > sc->max_queues) { - DPRINTF(("NSQR=%u is greater than max %u", sc->num_squeues, - sc->max_queues)); + DPRINTF("NSQR=%u is greater than max %u", sc->num_squeues, + sc->max_queues); sc->num_squeues = sc->max_queues; } nqr = (command->cdw11 >> 16) & 0xFFFF; if (nqr == 0xffff) { - WPRINTF(("%s: Illegal NCQR value %#x", __func__, nqr)); + WPRINTF("%s: Illegal NCQR value %#x", __func__, nqr); pci_nvme_status_genc(&compl->status, NVME_SC_INVALID_FIELD); return (-1); } sc->num_cqueues = ONE_BASED(nqr); if (sc->num_cqueues > sc->max_queues) { - DPRINTF(("NCQR=%u is greater than max %u", sc->num_cqueues, - sc->max_queues)); + DPRINTF("NCQR=%u is greater than max %u", sc->num_cqueues, + sc->max_queues); sc->num_cqueues = sc->max_queues; } @@ -888,33 +888,33 @@ nvme_opc_set_features(struct pci_nvme_softc* sc, struc int feature = command->cdw10 & 0xFF; uint32_t iv; - DPRINTF(("%s feature 0x%x", __func__, feature)); + DPRINTF("%s feature 0x%x", __func__, feature); compl->cdw0 = 0; switch (feature) { case NVME_FEAT_ARBITRATION: - DPRINTF((" arbitration 0x%x", command->cdw11)); + DPRINTF(" arbitration 0x%x", command->cdw11); break; case NVME_FEAT_POWER_MANAGEMENT: - DPRINTF((" power management 0x%x", command->cdw11)); + DPRINTF(" power management 0x%x", command->cdw11); break; case NVME_FEAT_LBA_RANGE_TYPE: - DPRINTF((" lba range 0x%x", command->cdw11)); + DPRINTF(" lba range 0x%x", command->cdw11); break; case NVME_FEAT_TEMPERATURE_THRESHOLD: - DPRINTF((" temperature threshold 0x%x", command->cdw11)); + DPRINTF(" temperature threshold 0x%x", command->cdw11); break; case NVME_FEAT_ERROR_RECOVERY: - DPRINTF((" error recovery 0x%x", command->cdw11)); + DPRINTF(" error recovery 0x%x", command->cdw11); break; case NVME_FEAT_VOLATILE_WRITE_CACHE: - DPRINTF((" volatile write cache 0x%x", command->cdw11)); + DPRINTF(" volatile write cache 0x%x", command->cdw11); break; case NVME_FEAT_NUMBER_OF_QUEUES: nvme_set_feature_queues(sc, command, compl); break; case NVME_FEAT_INTERRUPT_COALESCING: - DPRINTF((" interrupt coalescing 0x%x", command->cdw11)); + DPRINTF(" interrupt coalescing 0x%x", command->cdw11); /* in uS */ sc->intr_coales_aggr_time = ((command->cdw11 >> 8) & 0xFF)*100; @@ -924,8 +924,8 @@ nvme_opc_set_features(struct pci_nvme_softc* sc, struc case NVME_FEAT_INTERRUPT_VECTOR_CONFIGURATION: iv = command->cdw11 & 0xFFFF; - DPRINTF((" interrupt vector configuration 0x%x", - command->cdw11)); + DPRINTF(" interrupt vector configuration 0x%x", + command->cdw11); for (uint32_t i = 0; i < sc->num_cqueues + 1; i++) { if (sc->compl_queues[i].intr_vec == iv) { @@ -939,23 +939,23 @@ nvme_opc_set_features(struct pci_nvme_softc* sc, struc } break; case NVME_FEAT_WRITE_ATOMICITY: - DPRINTF((" write atomicity 0x%x", command->cdw11)); + DPRINTF(" write atomicity 0x%x", command->cdw11); break; case NVME_FEAT_ASYNC_EVENT_CONFIGURATION: - DPRINTF((" async event configuration 0x%x", - command->cdw11)); + DPRINTF(" async event configuration 0x%x", + command->cdw11); sc->async_ev_config = command->cdw11; break; case NVME_FEAT_SOFTWARE_PROGRESS_MARKER: - DPRINTF((" software progress marker 0x%x", - command->cdw11)); + DPRINTF(" software progress marker 0x%x", + command->cdw11); break; case 0x0C: - DPRINTF((" autonomous power state transition 0x%x", - command->cdw11)); + DPRINTF(" autonomous power state transition 0x%x", + command->cdw11); break; default: - WPRINTF(("%s invalid feature", __func__)); + WPRINTF("%s invalid feature", __func__); pci_nvme_status_genc(&compl->status, NVME_SC_INVALID_FIELD); return (1); } @@ -970,22 +970,22 @@ nvme_opc_get_features(struct pci_nvme_softc* sc, struc { int feature = command->cdw10 & 0xFF; - DPRINTF(("%s feature 0x%x", __func__, feature)); + DPRINTF("%s feature 0x%x", __func__, feature); compl->cdw0 = 0; switch (feature) { case NVME_FEAT_ARBITRATION: - DPRINTF((" arbitration")); + DPRINTF(" arbitration"); break; case NVME_FEAT_POWER_MANAGEMENT: - DPRINTF((" power management")); + DPRINTF(" power management"); break; case NVME_FEAT_LBA_RANGE_TYPE: - DPRINTF((" lba range")); + DPRINTF(" lba range"); break; case NVME_FEAT_TEMPERATURE_THRESHOLD: - DPRINTF((" temperature threshold")); + DPRINTF(" temperature threshold"); switch ((command->cdw11 >> 20) & 0x3) { case 0: /* Over temp threshold */ @@ -996,47 +996,47 @@ nvme_opc_get_features(struct pci_nvme_softc* sc, struc compl->cdw0 = 0; break; default: - WPRINTF((" invalid threshold type select")); + WPRINTF(" invalid threshold type select"); pci_nvme_status_genc(&compl->status, NVME_SC_INVALID_FIELD); return (1); } break; case NVME_FEAT_ERROR_RECOVERY: - DPRINTF((" error recovery")); + DPRINTF(" error recovery"); break; case NVME_FEAT_VOLATILE_WRITE_CACHE: - DPRINTF((" volatile write cache")); + DPRINTF(" volatile write cache"); break; case NVME_FEAT_NUMBER_OF_QUEUES: compl->cdw0 = NVME_FEATURE_NUM_QUEUES(sc); - DPRINTF((" number of queues (submit %u, completion %u)", + DPRINTF(" number of queues (submit %u, completion %u)", compl->cdw0 & 0xFFFF, - (compl->cdw0 >> 16) & 0xFFFF)); + (compl->cdw0 >> 16) & 0xFFFF); break; case NVME_FEAT_INTERRUPT_COALESCING: - DPRINTF((" interrupt coalescing")); + DPRINTF(" interrupt coalescing"); break; case NVME_FEAT_INTERRUPT_VECTOR_CONFIGURATION: - DPRINTF((" interrupt vector configuration")); + DPRINTF(" interrupt vector configuration"); break; case NVME_FEAT_WRITE_ATOMICITY: - DPRINTF((" write atomicity")); + DPRINTF(" write atomicity"); break; case NVME_FEAT_ASYNC_EVENT_CONFIGURATION: - DPRINTF((" async event configuration")); + DPRINTF(" async event configuration"); sc->async_ev_config = command->cdw11; break; case NVME_FEAT_SOFTWARE_PROGRESS_MARKER: - DPRINTF((" software progress marker")); + DPRINTF(" software progress marker"); break; case 0x0C: - DPRINTF((" autonomous power state transition")); + DPRINTF(" autonomous power state transition"); break; default: - WPRINTF(("%s invalid feature 0x%x", __func__, feature)); + WPRINTF("%s invalid feature 0x%x", __func__, feature); pci_nvme_status_genc(&compl->status, NVME_SC_INVALID_FIELD); return (1); } @@ -1049,8 +1049,8 @@ static int nvme_opc_abort(struct pci_nvme_softc* sc, struct nvme_command* command, struct nvme_completion* compl) { - DPRINTF(("%s submission queue %u, command ID 0x%x", __func__, - command->cdw10 & 0xFFFF, (command->cdw10 >> 16) & 0xFFFF)); + DPRINTF("%s submission queue %u, command ID 0x%x", __func__, + command->cdw10 & 0xFFFF, (command->cdw10 >> 16) & 0xFFFF); /* TODO: search for the command ID and abort it */ @@ -1063,7 +1063,7 @@ static int nvme_opc_async_event_req(struct pci_nvme_softc* sc, struct nvme_command* command, struct nvme_completion* compl) { - DPRINTF(("%s async event request 0x%x", __func__, command->cdw11)); + DPRINTF("%s async event request 0x%x", __func__, command->cdw11); /* * TODO: raise events when they happen based on the Set Features cmd. @@ -1084,7 +1084,7 @@ pci_nvme_handle_admin_cmd(struct pci_nvme_softc* sc, u struct nvme_completion_queue *cq; uint16_t sqhead; - DPRINTF(("%s index %u", __func__, (uint32_t)value)); + DPRINTF("%s index %u", __func__, (uint32_t)value); sq = &sc->submit_queues[0]; cq = &sc->compl_queues[0]; @@ -1092,12 +1092,12 @@ pci_nvme_handle_admin_cmd(struct pci_nvme_softc* sc, u sqhead = atomic_load_acq_short(&sq->head); if (atomic_testandset_int(&sq->busy, 1)) { - DPRINTF(("%s SQ busy, head %u, tail %u", - __func__, sqhead, sq->tail)); + DPRINTF("%s SQ busy, head %u, tail %u", + __func__, sqhead, sq->tail); return; } - DPRINTF(("sqhead %u, tail %u", sqhead, sq->tail)); + DPRINTF("sqhead %u, tail %u", sqhead, sq->tail); while (sqhead != atomic_load_acq_short(&sq->tail)) { cmd = &(sq->qbase)[sqhead]; @@ -1106,51 +1106,51 @@ pci_nvme_handle_admin_cmd(struct pci_nvme_softc* sc, u switch (cmd->opc) { case NVME_OPC_DELETE_IO_SQ: - DPRINTF(("%s command DELETE_IO_SQ", __func__)); + DPRINTF("%s command DELETE_IO_SQ", __func__); nvme_opc_delete_io_sq(sc, cmd, &compl); break; case NVME_OPC_CREATE_IO_SQ: - DPRINTF(("%s command CREATE_IO_SQ", __func__)); + DPRINTF("%s command CREATE_IO_SQ", __func__); nvme_opc_create_io_sq(sc, cmd, &compl); break; case NVME_OPC_DELETE_IO_CQ: - DPRINTF(("%s command DELETE_IO_CQ", __func__)); + DPRINTF("%s command DELETE_IO_CQ", __func__); nvme_opc_delete_io_cq(sc, cmd, &compl); break; case NVME_OPC_CREATE_IO_CQ: - DPRINTF(("%s command CREATE_IO_CQ", __func__)); + DPRINTF("%s command CREATE_IO_CQ", __func__); nvme_opc_create_io_cq(sc, cmd, &compl); break; case NVME_OPC_GET_LOG_PAGE: - DPRINTF(("%s command GET_LOG_PAGE", __func__)); + DPRINTF("%s command GET_LOG_PAGE", __func__); nvme_opc_get_log_page(sc, cmd, &compl); break; case NVME_OPC_IDENTIFY: - DPRINTF(("%s command IDENTIFY", __func__)); + DPRINTF("%s command IDENTIFY", __func__); nvme_opc_identify(sc, cmd, &compl); break; case NVME_OPC_ABORT: - DPRINTF(("%s command ABORT", __func__)); + DPRINTF("%s command ABORT", __func__); nvme_opc_abort(sc, cmd, &compl); break; case NVME_OPC_SET_FEATURES: - DPRINTF(("%s command SET_FEATURES", __func__)); + DPRINTF("%s command SET_FEATURES", __func__); nvme_opc_set_features(sc, cmd, &compl); break; case NVME_OPC_GET_FEATURES: - DPRINTF(("%s command GET_FEATURES", __func__)); + DPRINTF("%s command GET_FEATURES", __func__); nvme_opc_get_features(sc, cmd, &compl); break; case NVME_OPC_ASYNC_EVENT_REQUEST: - DPRINTF(("%s command ASYNC_EVENT_REQ", __func__)); + DPRINTF("%s command ASYNC_EVENT_REQ", __func__); /* XXX dont care, unhandled for now nvme_opc_async_event_req(sc, cmd, &compl); */ compl.status = NVME_NO_STATUS; break; default: - WPRINTF(("0x%x command is not implemented", - cmd->opc)); + WPRINTF("0x%x command is not implemented", + cmd->opc); pci_nvme_status_genc(&compl.status, NVME_SC_INVALID_OPCODE); } sqhead = (sqhead + 1) % sq->size; @@ -1173,7 +1173,7 @@ pci_nvme_handle_admin_cmd(struct pci_nvme_softc* sc, u } } - DPRINTF(("setting sqhead %u", sqhead)); + DPRINTF("setting sqhead %u", sqhead); atomic_store_short(&sq->head, sqhead); atomic_store_int(&sq->busy, 0); @@ -1208,7 +1208,7 @@ pci_nvme_append_iov_req(struct pci_nvme_softc *sc, str if (iovidx == NVME_MAX_BLOCKIOVS) { int err = 0; - DPRINTF(("large I/O, doing partial req")); + DPRINTF("large I/O, doing partial req"); iovidx = 0; req->io_req.br_iovcnt = 0; @@ -1252,7 +1252,7 @@ pci_nvme_append_iov_req(struct pci_nvme_softc *sc, str void *gptr; if ((lba + size) > sc->nvstore.size) { - WPRINTF(("%s write would overflow RAM", __func__)); + WPRINTF("%s write would overflow RAM", __func__); return (-1); } @@ -1275,9 +1275,9 @@ pci_nvme_set_completion(struct pci_nvme_softc *sc, struct nvme_completion *compl; int phase; - DPRINTF(("%s sqid %d cqid %u cid %u status: 0x%x 0x%x", + DPRINTF("%s sqid %d cqid %u cid %u status: 0x%x 0x%x", __func__, sqid, sq->cqid, cid, NVME_STATUS_GET_SCT(status), - NVME_STATUS_GET_SC(status))); + NVME_STATUS_GET_SC(status)); pthread_mutex_lock(&cq->mtx); @@ -1303,8 +1303,8 @@ pci_nvme_set_completion(struct pci_nvme_softc *sc, if (cq->intr_en & NVME_CQ_INTEN) { pci_generate_msix(sc->nsc_pi, cq->intr_vec); } else { - DPRINTF(("%s: CQ%u interrupt disabled\n", - __func__, sq->cqid)); + DPRINTF("%s: CQ%u interrupt disabled", + __func__, sq->cqid); } } } @@ -1366,7 +1366,7 @@ pci_nvme_io_done(struct blockif_req *br, int err) struct nvme_submission_queue *sq = req->nvme_sq; uint16_t code, status; - DPRINTF(("%s error %d %s", __func__, err, strerror(err))); + DPRINTF("%s error %d %s", __func__, err, strerror(err)); /* TODO return correct error */ code = err ? NVME_SC_DATA_TRANSFER_ERROR : NVME_SC_SUCCESS; @@ -1381,7 +1381,7 @@ pci_nvme_io_partial(struct blockif_req *br, int err) { struct pci_nvme_ioreq *req = br->br_param; - DPRINTF(("%s error %d %s", __func__, err, strerror(err))); + DPRINTF("%s error %d %s", __func__, err, strerror(err)); pthread_cond_signal(&req->cv); } @@ -1520,14 +1520,14 @@ pci_nvme_handle_io_cmd(struct pci_nvme_softc* sc, uint sq = &sc->submit_queues[idx]; if (atomic_testandset_int(&sq->busy, 1)) { - DPRINTF(("%s sqid %u busy", __func__, idx)); + DPRINTF("%s sqid %u busy", __func__, idx); return; } sqhead = atomic_load_acq_short(&sq->head); - DPRINTF(("nvme_handle_io qid %u head %u tail %u cmdlist %p", - idx, sqhead, sq->tail, sq->qbase)); + DPRINTF("nvme_handle_io qid %u head %u tail %u cmdlist %p", + idx, sqhead, sq->tail, sq->qbase); while (sqhead != atomic_load_acq_short(&sq->tail)) { struct nvme_command *cmd; @@ -1550,8 +1550,8 @@ pci_nvme_handle_io_cmd(struct pci_nvme_softc* sc, uint continue; } else if (cmd->opc == 0x08) { /* TODO: write zeroes */ - WPRINTF(("%s write zeroes lba 0x%lx blocks %u", - __func__, lba, cmd->cdw12 & 0xFFFF)); + WPRINTF("%s write zeroes lba 0x%lx blocks %u", + __func__, lba, cmd->cdw12 & 0xFFFF); pci_nvme_status_genc(&status, NVME_SC_SUCCESS); pci_nvme_set_completion(sc, sq, idx, cmd->cid, 0, status, 1); @@ -1585,17 +1585,17 @@ pci_nvme_handle_io_cmd(struct pci_nvme_softc* sc, uint * increase page count */ - DPRINTF(("[h%u:t%u:n%u] %s starting LBA 0x%lx blocks %lu " + DPRINTF("[h%u:t%u:n%u] %s starting LBA 0x%lx blocks %lu " "(%lu-bytes)", sqhead==0 ? sq->size-1 : sqhead-1, sq->tail, sq->size, cmd->opc == NVME_OPC_WRITE ? "WRITE" : "READ", - lba, nblocks, bytes)); + lba, nblocks, bytes); cmd->prp1 &= ~(0x03UL); cmd->prp2 &= ~(0x03UL); - DPRINTF((" prp1 0x%lx prp2 0x%lx", cmd->prp1, cmd->prp2)); + DPRINTF(" prp1 0x%lx prp2 0x%lx", cmd->prp1, cmd->prp2); size = bytes; lba *= sc->nvstore.sectsz; @@ -1653,7 +1653,7 @@ pci_nvme_handle_io_cmd(struct pci_nvme_softc* sc, uint i = 0; } if (prp_list[i] == 0) { - WPRINTF(("PRP2[%d] = 0 !!!", i)); + WPRINTF("PRP2[%d] = 0 !!!", i); err = 1; break; } @@ -1699,8 +1699,8 @@ iodone: err = blockif_write(sc->nvstore.ctx, &req->io_req); break; default: - WPRINTF(("%s unhandled io command 0x%x", - __func__, cmd->opc)); + WPRINTF("%s unhandled io command 0x%x", + __func__, cmd->opc); err = 1; } @@ -1725,8 +1725,8 @@ static void pci_nvme_handle_doorbell(struct vmctx *ctx, struct pci_nvme_softc* sc, uint64_t idx, int is_sq, uint64_t value) { - DPRINTF(("nvme doorbell %lu, %s, val 0x%lx", - idx, is_sq ? "SQ" : "CQ", value & 0xFFFF)); + DPRINTF("nvme doorbell %lu, %s, val 0x%lx", + idx, is_sq ? "SQ" : "CQ", value & 0xFFFF); if (is_sq) { atomic_store_short(&sc->submit_queues[idx].tail, @@ -1737,18 +1737,18 @@ pci_nvme_handle_doorbell(struct vmctx *ctx, struct pci } else { /* submission queue; handle new entries in SQ */ if (idx > sc->num_squeues) { - WPRINTF(("%s SQ index %lu overflow from " + WPRINTF("%s SQ index %lu overflow from " "guest (max %u)", - __func__, idx, sc->num_squeues)); + __func__, idx, sc->num_squeues); return; } pci_nvme_handle_io_cmd(sc, (uint16_t)idx); } } else { if (idx > sc->num_cqueues) { - WPRINTF(("%s queue index %lu overflow from " + WPRINTF("%s queue index %lu overflow from " "guest (max %u)", - __func__, idx, sc->num_cqueues)); + __func__, idx, sc->num_cqueues); return; } @@ -1763,46 +1763,46 @@ pci_nvme_bar0_reg_dumps(const char *func, uint64_t off switch (offset) { case NVME_CR_CAP_LOW: - DPRINTF(("%s %s NVME_CR_CAP_LOW", func, s)); + DPRINTF("%s %s NVME_CR_CAP_LOW", func, s); break; case NVME_CR_CAP_HI: - DPRINTF(("%s %s NVME_CR_CAP_HI", func, s)); + DPRINTF("%s %s NVME_CR_CAP_HI", func, s); break; case NVME_CR_VS: - DPRINTF(("%s %s NVME_CR_VS", func, s)); + DPRINTF("%s %s NVME_CR_VS", func, s); break; case NVME_CR_INTMS: - DPRINTF(("%s %s NVME_CR_INTMS", func, s)); + DPRINTF("%s %s NVME_CR_INTMS", func, s); break; case NVME_CR_INTMC: - DPRINTF(("%s %s NVME_CR_INTMC", func, s)); + DPRINTF("%s %s NVME_CR_INTMC", func, s); break; case NVME_CR_CC: - DPRINTF(("%s %s NVME_CR_CC", func, s)); + DPRINTF("%s %s NVME_CR_CC", func, s); break; case NVME_CR_CSTS: - DPRINTF(("%s %s NVME_CR_CSTS", func, s)); + DPRINTF("%s %s NVME_CR_CSTS", func, s); break; case NVME_CR_NSSR: - DPRINTF(("%s %s NVME_CR_NSSR", func, s)); + DPRINTF("%s %s NVME_CR_NSSR", func, s); break; case NVME_CR_AQA: - DPRINTF(("%s %s NVME_CR_AQA", func, s)); + DPRINTF("%s %s NVME_CR_AQA", func, s); break; case NVME_CR_ASQ_LOW: - DPRINTF(("%s %s NVME_CR_ASQ_LOW", func, s)); + DPRINTF("%s %s NVME_CR_ASQ_LOW", func, s); break; case NVME_CR_ASQ_HI: - DPRINTF(("%s %s NVME_CR_ASQ_HI", func, s)); + DPRINTF("%s %s NVME_CR_ASQ_HI", func, s); break; case NVME_CR_ACQ_LOW: - DPRINTF(("%s %s NVME_CR_ACQ_LOW", func, s)); + DPRINTF("%s %s NVME_CR_ACQ_LOW", func, s); break; case NVME_CR_ACQ_HI: - DPRINTF(("%s %s NVME_CR_ACQ_HI", func, s)); + DPRINTF("%s %s NVME_CR_ACQ_HI", func, s); break; default: - DPRINTF(("unknown nvme bar-0 offset 0x%lx", offset)); + DPRINTF("unknown nvme bar-0 offset 0x%lx", offset); } } @@ -1819,9 +1819,9 @@ pci_nvme_write_bar_0(struct vmctx *ctx, struct pci_nvm int is_sq = (belloffset % 8) < 4; if (belloffset > ((sc->max_queues+1) * 8 - 4)) { - WPRINTF(("guest attempted an overflow write offset " + WPRINTF("guest attempted an overflow write offset " "0x%lx, val 0x%lx in %s", - offset, value, __func__)); + offset, value, __func__); return; } @@ -1829,13 +1829,13 @@ pci_nvme_write_bar_0(struct vmctx *ctx, struct pci_nvm return; } - DPRINTF(("nvme-write offset 0x%lx, size %d, value 0x%lx", - offset, size, value)); + DPRINTF("nvme-write offset 0x%lx, size %d, value 0x%lx", + offset, size, value); if (size != 4) { - WPRINTF(("guest wrote invalid size %d (offset 0x%lx, " + WPRINTF("guest wrote invalid size %d (offset 0x%lx, " "val 0x%lx) to bar0 in %s", - size, offset, value, __func__)); + size, offset, value, __func__); /* TODO: shutdown device */ return; } @@ -1861,12 +1861,12 @@ pci_nvme_write_bar_0(struct vmctx *ctx, struct pci_nvm case NVME_CR_CC: ccreg = (uint32_t)value; - DPRINTF(("%s NVME_CR_CC en %x css %x shn %x iosqes %u " + DPRINTF("%s NVME_CR_CC en %x css %x shn %x iosqes %u " "iocqes %u", __func__, NVME_CC_GET_EN(ccreg), NVME_CC_GET_CSS(ccreg), NVME_CC_GET_SHN(ccreg), NVME_CC_GET_IOSQES(ccreg), - NVME_CC_GET_IOCQES(ccreg))); + NVME_CC_GET_IOCQES(ccreg)); if (NVME_CC_GET_SHN(ccreg)) { /* perform shutdown - flush out data to backend */ @@ -1920,8 +1920,8 @@ pci_nvme_write_bar_0(struct vmctx *ctx, struct pci_nvm (value << 32); break; default: - DPRINTF(("%s unknown offset 0x%lx, value 0x%lx size %d", - __func__, offset, value, size)); + DPRINTF("%s unknown offset 0x%lx, value 0x%lx size %d", + __func__, offset, value, size); } pthread_mutex_unlock(&sc->mtx); } @@ -1934,8 +1934,8 @@ pci_nvme_write(struct vmctx *ctx, int vcpu, struct pci if (baridx == pci_msix_table_bar(pi) || baridx == pci_msix_pba_bar(pi)) { - DPRINTF(("nvme-write baridx %d, msix: off 0x%lx, size %d, " - " value 0x%lx", baridx, offset, size, value)); + DPRINTF("nvme-write baridx %d, msix: off 0x%lx, size %d, " + " value 0x%lx", baridx, offset, size, value); pci_emul_msix_twrite(pi, offset, size, value); return; @@ -1947,8 +1947,8 @@ pci_nvme_write(struct vmctx *ctx, int vcpu, struct pci break; default: - DPRINTF(("%s unknown baridx %d, val 0x%lx", - __func__, baridx, value)); + DPRINTF("%s unknown baridx %d, val 0x%lx", + __func__, baridx, value); } } @@ -1966,7 +1966,7 @@ static uint64_t pci_nvme_read_bar_0(struct pci_nvme_so pthread_mutex_unlock(&sc->mtx); } else { value = 0; - WPRINTF(("pci_nvme: read invalid offset %ld", offset)); + WPRINTF("pci_nvme: read invalid offset %ld", offset); } switch (size) { @@ -1981,8 +1981,8 @@ static uint64_t pci_nvme_read_bar_0(struct pci_nvme_so break; } - DPRINTF((" nvme-read offset 0x%lx, size %d -> value 0x%x", - offset, size, (uint32_t)value)); + DPRINTF(" nvme-read offset 0x%lx, size %d -> value 0x%x", + offset, size, (uint32_t)value); return (value); } @@ -1997,8 +1997,8 @@ pci_nvme_read(struct vmctx *ctx, int vcpu, struct pci_ if (baridx == pci_msix_table_bar(pi) || baridx == pci_msix_pba_bar(pi)) { - DPRINTF(("nvme-read bar: %d, msix: regoff 0x%lx, size %d", - baridx, offset, size)); + DPRINTF("nvme-read bar: %d, msix: regoff 0x%lx, size %d", + baridx, offset, size); return pci_emul_msix_tread(pi, offset, size); } @@ -2008,7 +2008,7 @@ pci_nvme_read(struct vmctx *ctx, int vcpu, struct pci_ return pci_nvme_read_bar_0(sc, offset, size); default: - DPRINTF(("unknown bar %d, 0x%lx", baridx, offset)); + DPRINTF("unknown bar %d, 0x%lx", baridx, offset); } return (0); @@ -2174,23 +2174,23 @@ pci_nvme_init(struct vmctx *ctx, struct pci_devinst *p 2 * sizeof(uint32_t) * (sc->max_queues + 1); pci_membar_sz = MAX(pci_membar_sz, NVME_MMIO_SPACE_MIN); - DPRINTF(("nvme membar size: %u", pci_membar_sz)); + DPRINTF("nvme membar size: %u", pci_membar_sz); error = pci_emul_alloc_bar(pi, 0, PCIBAR_MEM64, pci_membar_sz); if (error) { - WPRINTF(("%s pci alloc mem bar failed", __func__)); + WPRINTF("%s pci alloc mem bar failed", __func__); goto done; } error = pci_emul_add_msixcap(pi, sc->max_queues + 1, NVME_MSIX_BAR); if (error) { - WPRINTF(("%s pci add msixcap failed", __func__)); + WPRINTF("%s pci add msixcap failed", __func__); goto done; } error = pci_emul_add_pciecap(pi, PCIEM_TYPE_ROOT_INT_EP); if (error) { - WPRINTF(("%s pci add Express capability failed", __func__)); + WPRINTF("%s pci add Express capability failed", __func__); goto done; } From owner-svn-src-all@freebsd.org Mon Jun 29 00:31:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 919E2359436; Mon, 29 Jun 2020 00:31:15 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w7hL6d3Zz42mf; Mon, 29 Jun 2020 00:31:14 +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 B8F561E765; Mon, 29 Jun 2020 00:31:14 +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 05T0VEW3045219; Mon, 29 Jun 2020 00:31:14 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T0VEni045218; Mon, 29 Jun 2020 00:31:14 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <202006290031.05T0VEni045218@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Mon, 29 Jun 2020 00:31:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362745 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 362745 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 00:31:15 -0000 Author: chuck Date: Mon Jun 29 00:31:14 2020 New Revision: 362745 URL: https://svnweb.freebsd.org/changeset/base/362745 Log: bhyve: refactor NVMe IO command handling This refactors the NVMe I/O command processing function to make adding new commands easier. The main change is to move command specific processing (i.e. Read/Write) to separate functions for each NVMe I/O command and leave the common per-command processing in the existing pci_nvme_handle_io_cmd() function. While here, add checks for some common errors (invalid Namespace ID, invalid opcode, LBA out of range). Add myself to the Copyright holders Reviewed by: imp Tested by: Jason Tubnor MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24879 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:31:11 2020 (r362744) +++ head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:31:14 2020 (r362745) @@ -3,6 +3,7 @@ * * Copyright (c) 2017 Shunsuke Mie * Copyright (c) 2018 Leon Dang + * Copyright (c) 2020 Chuck Tuffli * * Function crc16 Copyright (c) 2017, Fedor Uporov * Obtained from function ext2_crc16() in sys/fs/ext2fs/ext2_csum.c @@ -1386,6 +1387,122 @@ pci_nvme_io_partial(struct blockif_req *br, int err) pthread_cond_signal(&req->cv); } +static bool +nvme_opc_write_read(struct pci_nvme_softc *sc, + struct nvme_command *cmd, + struct pci_nvme_blockstore *nvstore, + struct pci_nvme_ioreq *req, + uint16_t *status) +{ + uint64_t lba, nblocks, bytes; + size_t offset; + bool is_write = cmd->opc == NVME_OPC_WRITE; + bool pending = false; + + lba = ((uint64_t)cmd->cdw11 << 32) | cmd->cdw10; + nblocks = (cmd->cdw12 & 0xFFFF) + 1; + + offset = lba * nvstore->sectsz; + bytes = nblocks * nvstore->sectsz; + + if ((offset + bytes) > nvstore->size) { + WPRINTF("%s command would exceed LBA range", __func__); + pci_nvme_status_genc(status, NVME_SC_LBA_OUT_OF_RANGE); + goto out; + } + + req->io_req.br_offset = lba; + + /* PRP bits 1:0 must be zero */ + cmd->prp1 &= ~0x3UL; + cmd->prp2 &= ~0x3UL; + + if (nvstore->type == NVME_STOR_RAM) { + uint8_t *buf = nvstore->ctx; + enum nvme_copy_dir dir; + + if (is_write) + dir = NVME_COPY_TO_PRP; + else + dir = NVME_COPY_FROM_PRP; + + if (nvme_prp_memcpy(sc->nsc_pi->pi_vmctx, cmd->prp1, cmd->prp2, + buf + offset, bytes, dir)) + pci_nvme_status_genc(status, + NVME_SC_DATA_TRANSFER_ERROR); + else + pci_nvme_status_genc(status, NVME_SC_SUCCESS); + } else { + uint64_t size; + int err; + + size = MIN(PAGE_SIZE - (cmd->prp1 % PAGE_SIZE), bytes); + if (pci_nvme_append_iov_req(sc, req, cmd->prp1, + size, is_write, offset)) { + pci_nvme_status_genc(status, + NVME_SC_DATA_TRANSFER_ERROR); + goto out; + } + + offset += size; + bytes -= size; + + if (bytes == 0) { + ; + } else if (bytes <= PAGE_SIZE) { + size = bytes; + if (pci_nvme_append_iov_req(sc, req, cmd->prp2, + size, is_write, offset)) { + pci_nvme_status_genc(status, + NVME_SC_DATA_TRANSFER_ERROR); + goto out; + } + } else { + void *vmctx = sc->nsc_pi->pi_vmctx; + uint64_t *prp_list = &cmd->prp2; + uint64_t *last = prp_list; + + /* PRP2 is pointer to a physical region page list */ + while (bytes) { + /* Last entry in list points to the next list */ + if (prp_list == last) { + uint64_t prp = *prp_list; + + prp_list = paddr_guest2host(vmctx, prp, + PAGE_SIZE - (prp % PAGE_SIZE)); + last = prp_list + (NVME_PRP2_ITEMS - 1); + } + + size = MIN(bytes, PAGE_SIZE); + + if (pci_nvme_append_iov_req(sc, req, *prp_list, + size, is_write, offset)) { + pci_nvme_status_genc(status, + NVME_SC_DATA_TRANSFER_ERROR); + goto out; + } + + offset += size; + bytes -= size; + + prp_list++; + } + } + req->io_req.br_callback = pci_nvme_io_done; + if (is_write) + err = blockif_write(nvstore->ctx, &req->io_req); + else + err = blockif_read(nvstore->ctx, &req->io_req); + + if (err) + pci_nvme_status_genc(status, NVME_SC_DATA_TRANSFER_ERROR); + else + pending = true; + } +out: + return (pending); +} + static void pci_nvme_dealloc_sm(struct blockif_req *br, int err) { @@ -1421,14 +1538,15 @@ pci_nvme_dealloc_sm(struct blockif_req *br, int err) } } -static int +static bool nvme_opc_dataset_mgmt(struct pci_nvme_softc *sc, struct nvme_command *cmd, struct pci_nvme_blockstore *nvstore, struct pci_nvme_ioreq *req, uint16_t *status) { - int err = -1; + int err; + bool pending = false; if ((sc->ctrldata.oncs & NVME_ONCS_DSM) == 0) { pci_nvme_status_genc(status, NVME_SC_INVALID_OPCODE); @@ -1463,9 +1581,6 @@ nvme_opc_dataset_mgmt(struct pci_nvme_softc *sc, nvme_prp_memcpy(sc->nsc_pi->pi_vmctx, cmd->prp1, cmd->prp2, (uint8_t *)range, NVME_MAX_DSM_TRIM, NVME_COPY_FROM_PRP); - req->opc = cmd->opc; - req->cid = cmd->cid; - req->nsid = cmd->nsid; /* * If the request is for more than a single range, store * the ranges in the br_iov. Optimize for the common case @@ -1501,11 +1616,13 @@ nvme_opc_dataset_mgmt(struct pci_nvme_softc *sc, err = blockif_delete(nvstore->ctx, &req->io_req); if (err) pci_nvme_status_genc(status, NVME_SC_INTERNAL_DEVICE_ERROR); + else + pending = true; free(range); } out: - return (err); + return (pending); } static void @@ -1514,7 +1631,6 @@ pci_nvme_handle_io_cmd(struct pci_nvme_softc* sc, uint struct nvme_submission_queue *sq; uint16_t status; uint16_t sqhead; - int err; /* handle all submissions up to sq->tail index */ sq = &sc->submit_queues[idx]; @@ -1531,189 +1647,69 @@ pci_nvme_handle_io_cmd(struct pci_nvme_softc* sc, uint while (sqhead != atomic_load_acq_short(&sq->tail)) { struct nvme_command *cmd; - struct pci_nvme_ioreq *req = NULL; - uint64_t lba; - uint64_t nblocks, bytes, size, cpsz; + struct pci_nvme_ioreq *req; + uint32_t nsid; + bool pending; - /* TODO: support scatter gather list handling */ + pending = false; + req = NULL; + status = 0; cmd = &sq->qbase[sqhead]; sqhead = (sqhead + 1) % sq->size; - lba = ((uint64_t)cmd->cdw11 << 32) | cmd->cdw10; + nsid = le32toh(cmd->nsid); + if ((nsid == 0) || (nsid > sc->ctrldata.nn)) { + pci_nvme_status_genc(&status, + NVME_SC_INVALID_NAMESPACE_OR_FORMAT); + status |= + NVME_STATUS_DNR_MASK << NVME_STATUS_DNR_SHIFT; + goto complete; + } - if (cmd->opc == NVME_OPC_FLUSH) { - pci_nvme_status_genc(&status, NVME_SC_SUCCESS); - pci_nvme_set_completion(sc, sq, idx, cmd->cid, 0, - status, 1); - - continue; - } else if (cmd->opc == 0x08) { - /* TODO: write zeroes */ - WPRINTF("%s write zeroes lba 0x%lx blocks %u", - __func__, lba, cmd->cdw12 & 0xFFFF); - pci_nvme_status_genc(&status, NVME_SC_SUCCESS); - pci_nvme_set_completion(sc, sq, idx, cmd->cid, 0, - status, 1); - - continue; + req = pci_nvme_get_ioreq(sc); + if (req == NULL) { + pci_nvme_status_genc(&status, + NVME_SC_INTERNAL_DEVICE_ERROR); + WPRINTF("%s: unable to allocate IO req", __func__); + goto complete; } + req->nvme_sq = sq; + req->sqid = idx; + req->opc = cmd->opc; + req->cid = cmd->cid; + req->nsid = cmd->nsid; - if (sc->nvstore.type == NVME_STOR_BLOCKIF) { - req = pci_nvme_get_ioreq(sc); - req->nvme_sq = sq; - req->sqid = idx; - } - - if (cmd->opc == NVME_OPC_DATASET_MANAGEMENT) { - if (nvme_opc_dataset_mgmt(sc, cmd, &sc->nvstore, req, - &status)) { - pci_nvme_set_completion(sc, sq, idx, cmd->cid, - 0, status, 1); - if (req) - pci_nvme_release_ioreq(sc, req); - } - continue; - } - - nblocks = (cmd->cdw12 & 0xFFFF) + 1; - - bytes = nblocks * sc->nvstore.sectsz; - - /* - * If data starts mid-page and flows into the next page, then - * increase page count - */ - - DPRINTF("[h%u:t%u:n%u] %s starting LBA 0x%lx blocks %lu " - "(%lu-bytes)", - sqhead==0 ? sq->size-1 : sqhead-1, sq->tail, sq->size, - cmd->opc == NVME_OPC_WRITE ? - "WRITE" : "READ", - lba, nblocks, bytes); - - cmd->prp1 &= ~(0x03UL); - cmd->prp2 &= ~(0x03UL); - - DPRINTF(" prp1 0x%lx prp2 0x%lx", cmd->prp1, cmd->prp2); - - size = bytes; - lba *= sc->nvstore.sectsz; - - cpsz = PAGE_SIZE - (cmd->prp1 % PAGE_SIZE); - - if (cpsz > bytes) - cpsz = bytes; - - if (req != NULL) { - req->io_req.br_offset = ((uint64_t)cmd->cdw11 << 32) | - cmd->cdw10; - req->opc = cmd->opc; - req->cid = cmd->cid; - req->nsid = cmd->nsid; - } - - err = pci_nvme_append_iov_req(sc, req, cmd->prp1, cpsz, - cmd->opc == NVME_OPC_WRITE, lba); - lba += cpsz; - size -= cpsz; - - if (size == 0) - goto iodone; - - if (size <= PAGE_SIZE) { - /* prp2 is second (and final) page in transfer */ - - err = pci_nvme_append_iov_req(sc, req, cmd->prp2, - size, - cmd->opc == NVME_OPC_WRITE, - lba); - } else { - uint64_t *prp_list; - int i; - - /* prp2 is pointer to a physical region page list */ - prp_list = paddr_guest2host(sc->nsc_pi->pi_vmctx, - cmd->prp2, PAGE_SIZE); - - i = 0; - while (size != 0) { - cpsz = MIN(size, PAGE_SIZE); - - /* - * Move to linked physical region page list - * in last item. - */ - if (i == (NVME_PRP2_ITEMS-1) && - size > PAGE_SIZE) { - assert((prp_list[i] & (PAGE_SIZE-1)) == 0); - prp_list = paddr_guest2host( - sc->nsc_pi->pi_vmctx, - prp_list[i], PAGE_SIZE); - i = 0; - } - if (prp_list[i] == 0) { - WPRINTF("PRP2[%d] = 0 !!!", i); - err = 1; - break; - } - - err = pci_nvme_append_iov_req(sc, req, - prp_list[i], cpsz, - cmd->opc == NVME_OPC_WRITE, lba); - if (err) - break; - - lba += cpsz; - size -= cpsz; - i++; - } - } - -iodone: - if (sc->nvstore.type == NVME_STOR_RAM) { - uint16_t code, status; - - code = err ? NVME_SC_LBA_OUT_OF_RANGE : - NVME_SC_SUCCESS; - pci_nvme_status_genc(&status, code); - - pci_nvme_set_completion(sc, sq, idx, cmd->cid, 0, - status, 1); - - continue; - } - - - if (err) - goto do_error; - - req->io_req.br_callback = pci_nvme_io_done; - - err = 0; switch (cmd->opc) { + case NVME_OPC_FLUSH: + pci_nvme_status_genc(&status, NVME_SC_SUCCESS); + break; + case NVME_OPC_WRITE: case NVME_OPC_READ: - err = blockif_read(sc->nvstore.ctx, &req->io_req); + pending = nvme_opc_write_read(sc, cmd, &sc->nvstore, + req, &status); break; - case NVME_OPC_WRITE: - err = blockif_write(sc->nvstore.ctx, &req->io_req); + case NVME_OPC_WRITE_ZEROES: + /* TODO: write zeroes + WPRINTF("%s write zeroes lba 0x%lx blocks %u", + __func__, lba, cmd->cdw12 & 0xFFFF); */ + pci_nvme_status_genc(&status, NVME_SC_SUCCESS); break; - default: - WPRINTF("%s unhandled io command 0x%x", - __func__, cmd->opc); - err = 1; + case NVME_OPC_DATASET_MANAGEMENT: + pending = nvme_opc_dataset_mgmt(sc, cmd, &sc->nvstore, + req, &status); + break; + default: + WPRINTF("%s unhandled io command 0x%x", + __func__, cmd->opc); + pci_nvme_status_genc(&status, NVME_SC_INVALID_OPCODE); } - -do_error: - if (err) { - uint16_t status; - - pci_nvme_status_genc(&status, - NVME_SC_DATA_TRANSFER_ERROR); - +complete: + if (!pending) { pci_nvme_set_completion(sc, sq, idx, cmd->cid, 0, - status, 1); - pci_nvme_release_ioreq(sc, req); + status, 1); + if (req != NULL) + pci_nvme_release_ioreq(sc, req); } } From owner-svn-src-all@freebsd.org Mon Jun 29 00:31:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9F2A9359681; Mon, 29 Jun 2020 00:31:23 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w7hT0q7fz42kM; Mon, 29 Jun 2020 00:31:20 +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 2A1471EA3E; Mon, 29 Jun 2020 00:31:18 +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 05T0VHBI046226; Mon, 29 Jun 2020 00:31:17 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T0VHcn046225; Mon, 29 Jun 2020 00:31:17 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <202006290031.05T0VHcn046225@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Mon, 29 Jun 2020 00:31:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362746 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 362746 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 00:31:23 -0000 Author: chuck Date: Mon Jun 29 00:31:17 2020 New Revision: 362746 URL: https://svnweb.freebsd.org/changeset/base/362746 Log: bhyve: implement NVMe Flush command This adds support for the NVMe I/O command Flush. For block-based devices, submit a DIOCGFLUSH to the backing storage. Otherwise, command is treated like a NOP and completes with a Successful status. Tested by: Jason Tubnor MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24880 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:31:14 2020 (r362745) +++ head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:31:17 2020 (r362746) @@ -58,6 +58,7 @@ #include __FBSDID("$FreeBSD$"); +#include #include #include @@ -1387,7 +1388,47 @@ pci_nvme_io_partial(struct blockif_req *br, int err) pthread_cond_signal(&req->cv); } +/* + * Implements the Flush command. The specification states: + * If a volatile write cache is not present, Flush commands complete + * successfully and have no effect + * in the description of the Volatile Write Cache (VWC) field of the Identify + * Controller data. Therefore, set status to Success if the command is + * not supported (i.e. RAM or as indicated by the blockif). + */ static bool +nvme_opc_flush(struct pci_nvme_softc *sc, + struct nvme_command *cmd, + struct pci_nvme_blockstore *nvstore, + struct pci_nvme_ioreq *req, + uint16_t *status) +{ + bool pending = false; + + if (nvstore->type == NVME_STOR_RAM) { + pci_nvme_status_genc(status, NVME_SC_SUCCESS); + } else { + int err; + + req->io_req.br_callback = pci_nvme_io_done; + + err = blockif_flush(nvstore->ctx, &req->io_req); + switch (err) { + case 0: + pending = true; + break; + case EOPNOTSUPP: + pci_nvme_status_genc(status, NVME_SC_SUCCESS); + break; + default: + pci_nvme_status_genc(status, NVME_SC_INTERNAL_DEVICE_ERROR); + } + } + + return (pending); +} + +static bool nvme_opc_write_read(struct pci_nvme_softc *sc, struct nvme_command *cmd, struct pci_nvme_blockstore *nvstore, @@ -1682,7 +1723,8 @@ pci_nvme_handle_io_cmd(struct pci_nvme_softc* sc, uint switch (cmd->opc) { case NVME_OPC_FLUSH: - pci_nvme_status_genc(&status, NVME_SC_SUCCESS); + pending = nvme_opc_flush(sc, cmd, &sc->nvstore, + req, &status); break; case NVME_OPC_WRITE: case NVME_OPC_READ: From owner-svn-src-all@freebsd.org Mon Jun 29 00:31:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2B69A359442; Mon, 29 Jun 2020 00:31:24 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w7hW2Dd2z42fG; Mon, 29 Jun 2020 00:31:23 +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 536F41EC3D; Mon, 29 Jun 2020 00:31:21 +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 05T0VLFD046273; Mon, 29 Jun 2020 00:31:21 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T0VLhU046272; Mon, 29 Jun 2020 00:31:21 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <202006290031.05T0VLhU046272@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Mon, 29 Jun 2020 00:31:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362747 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 362747 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 00:31:24 -0000 Author: chuck Date: Mon Jun 29 00:31:20 2020 New Revision: 362747 URL: https://svnweb.freebsd.org/changeset/base/362747 Log: bhyve: add a comment explaining NVME dsm option Tested by: Jason Tubnor MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24881 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:31:17 2020 (r362746) +++ head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:31:20 2020 (r362747) @@ -34,7 +34,7 @@ * bhyve PCIe-NVMe device emulation. * * options: - * -s ,nvme,devpath,maxq=#,qsz=#,ioslots=#,sectsz=#,ser=A-Z,eui64=# + * -s ,nvme,devpath,maxq=#,qsz=#,ioslots=#,sectsz=#,ser=A-Z,eui64=#,dsm= * * accepted devpath: * /dev/blockdev @@ -47,6 +47,7 @@ * sectsz = sector size (defaults to blockif sector size) * ser = serial number (20-chars max) * eui64 = IEEE Extended Unique Identifier (8 byte value) + * dsm = DataSet Management support. Option is one of auto, enable,disable * */ From owner-svn-src-all@freebsd.org Mon Jun 29 00:31:34 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5743635945D; Mon, 29 Jun 2020 00:31:34 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w7hj2f4bz42Qb; Mon, 29 Jun 2020 00:31:33 +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 084F21E76A; Mon, 29 Jun 2020 00:31:28 +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 05T0VRNh047110; Mon, 29 Jun 2020 00:31:27 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T0VRCv047109; Mon, 29 Jun 2020 00:31:27 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <202006290031.05T0VRCv047109@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Mon, 29 Jun 2020 00:31:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362749 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 362749 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 00:31:34 -0000 Author: chuck Date: Mon Jun 29 00:31:27 2020 New Revision: 362749 URL: https://svnweb.freebsd.org/changeset/base/362749 Log: bhyve: Consolidate NVMe CQ update Consolidate the code which writes Completion Queue entries and updates the CQ doorbell value. While in the neighborhood, convert the "toggle CQ phase bit" code to use an XOR operation instead of an "if/else" branch. Tested by: Jason Tubnor MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24882 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:31:24 2020 (r362748) +++ head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:31:27 2020 (r362749) @@ -329,16 +329,6 @@ pci_nvme_status_genc(uint16_t *status, uint16_t code) pci_nvme_status_tc(status, NVME_SCT_GENERIC, code); } -static __inline void -pci_nvme_toggle_phase(uint16_t *status, int prev) -{ - - if (prev) - *status &= ~NVME_STATUS_P; - else - *status |= NVME_STATUS_P; -} - /* * Initialize the requested number or IO Submission and Completion Queues. * Admin queues are allocated implicitly. @@ -617,6 +607,7 @@ pci_nvme_init_controller(struct vmctx *ctx, struct pci sc->compl_queues[0].size = acqs; sc->compl_queues[0].qbase = vm_map_gpa(ctx, sc->regs.acq, sizeof(struct nvme_completion) * acqs); + DPRINTF("%s mapping Admin-CQ guest 0x%lx, host: %p", __func__, sc->regs.acq, sc->compl_queues[0].qbase); } @@ -668,6 +659,45 @@ nvme_prp_memcpy(struct vmctx *ctx, uint64_t prp1, uint return (0); } +/* + * Write a Completion Queue Entry update + * + * Write the completion and update the doorbell value + */ +static void +pci_nvme_cq_update(struct pci_nvme_softc *sc, + struct nvme_completion_queue *cq, + uint32_t cdw0, + uint16_t cid, + uint16_t sqid, + uint16_t status) +{ + struct nvme_submission_queue *sq = &sc->submit_queues[sqid]; + struct nvme_completion *cqe; + + assert(cq->qbase != NULL); + + pthread_mutex_lock(&cq->mtx); + + cqe = &cq->qbase[cq->tail]; + + /* Flip the phase bit */ + status |= (cqe->status ^ NVME_STATUS_P) & NVME_STATUS_P_MASK; + + cqe->cdw0 = cdw0; + cqe->sqhd = sq->head; + cqe->sqid = sqid; + cqe->cid = cid; + cqe->status = status; + + cq->tail++; + if (cq->tail >= cq->size) { + cq->tail = 0; + } + + pthread_mutex_unlock(&cq->mtx); +} + static int nvme_opc_delete_io_sq(struct pci_nvme_softc* sc, struct nvme_command* command, struct nvme_completion* compl) @@ -757,6 +787,7 @@ static int nvme_opc_create_io_cq(struct pci_nvme_softc* sc, struct nvme_command* command, struct nvme_completion* compl) { + if (command->cdw11 & NVME_CMD_CDW11_PC) { uint16_t qid = command->cdw10 & 0xffff; struct nvme_completion_queue *ncq; @@ -1191,24 +1222,11 @@ pci_nvme_handle_admin_cmd(struct pci_nvme_softc* sc, u sqhead = (sqhead + 1) % sq->size; if (NVME_COMPLETION_VALID(compl)) { - struct nvme_completion *cp; - int phase; - - pthread_mutex_lock(&cq->mtx); - - cp = &(cq->qbase)[cq->tail]; - cp->cdw0 = compl.cdw0; - cp->sqid = 0; - cp->sqhd = sqhead; - cp->cid = cmd->cid; - - phase = NVME_STATUS_GET_P(cp->status); - cp->status = compl.status; - pci_nvme_toggle_phase(&cp->status, phase); - - cq->tail = (cq->tail + 1) % cq->size; - - pthread_mutex_unlock(&cq->mtx); + pci_nvme_cq_update(sc, &sc->compl_queues[0], + compl.cdw0, + cmd->cid, + 0, /* SQID */ + compl.status); } } @@ -1311,32 +1329,16 @@ pci_nvme_set_completion(struct pci_nvme_softc *sc, uint32_t cdw0, uint16_t status) { struct nvme_completion_queue *cq = &sc->compl_queues[sq->cqid]; - struct nvme_completion *compl; - int phase; DPRINTF("%s sqid %d cqid %u cid %u status: 0x%x 0x%x", __func__, sqid, sq->cqid, cid, NVME_STATUS_GET_SCT(status), NVME_STATUS_GET_SC(status)); - pthread_mutex_lock(&cq->mtx); - - assert(cq->qbase != NULL); - - compl = &cq->qbase[cq->tail]; - - compl->cdw0 = cdw0; - compl->sqid = sqid; - compl->sqhd = sq->head; - compl->cid = cid; - - // toggle phase - phase = NVME_STATUS_GET_P(compl->status); - compl->status = status; - pci_nvme_toggle_phase(&compl->status, phase); - - cq->tail = (cq->tail + 1) % cq->size; - - pthread_mutex_unlock(&cq->mtx); + pci_nvme_cq_update(sc, cq, + 0, /* CDW0 */ + cid, + sqid, + status); if (cq->head != cq->tail) { if (cq->intr_en & NVME_CQ_INTEN) { From owner-svn-src-all@freebsd.org Mon Jun 29 00:31:51 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9878D3593E2; Mon, 29 Jun 2020 00:31:51 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w7j22Xkrz435Z; Mon, 29 Jun 2020 00:31:50 +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 28C061ED8C; Mon, 29 Jun 2020 00:31:31 +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 05T0VVd3047155; Mon, 29 Jun 2020 00:31:31 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T0VV0d047154; Mon, 29 Jun 2020 00:31:31 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <202006290031.05T0VV0d047154@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Mon, 29 Jun 2020 00:31:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362750 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 362750 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 00:31:51 -0000 Author: chuck Date: Mon Jun 29 00:31:30 2020 New Revision: 362750 URL: https://svnweb.freebsd.org/changeset/base/362750 Log: bhyve: implement NVMe Namespace Identification Descriptor NVMe 1.3 compliant controllers must implement the Namespace Identification Descriptor structure (i.e. CNS=3). Previously this was unimplemented. Fixes UNH Test 1.1.4-0 Tested by: Jason Tubnor MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24884 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:31:27 2020 (r362749) +++ head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:31:30 2020 (r362750) @@ -870,10 +870,13 @@ nvme_opc_identify(struct pci_nvme_softc* sc, struct nv struct nvme_completion* compl) { void *dest; + uint16_t status; DPRINTF("%s identify 0x%x nsid 0x%x", __func__, command->cdw10 & 0xFF, command->nsid); + pci_nvme_status_genc(&status, NVME_SC_SUCCESS); + switch (command->cdw10 & 0xFF) { case 0x00: /* return Identify Namespace data structure */ nvme_prp_memcpy(sc->nsc_pi->pi_vmctx, command->prp1, @@ -892,24 +895,30 @@ nvme_opc_identify(struct pci_nvme_softc* sc, struct nv ((uint32_t *)dest)[0] = 1; ((uint32_t *)dest)[1] = 0; break; - case 0x11: - pci_nvme_status_genc(&compl->status, - NVME_SC_INVALID_NAMESPACE_OR_FORMAT); - return (1); case 0x03: /* list of NSID structures in CDW1.NSID, 4096 bytes */ - case 0x10: - case 0x12: - case 0x13: - case 0x14: - case 0x15: + if (command->nsid != 1) { + pci_nvme_status_genc(&status, + NVME_SC_INVALID_NAMESPACE_OR_FORMAT); + break; + } + dest = vm_map_gpa(sc->nsc_pi->pi_vmctx, command->prp1, + sizeof(uint32_t) * 1024); + /* All bytes after the descriptor shall be zero */ + bzero(dest, sizeof(uint32_t) * 1024); + + /* Return NIDT=1 (i.e. EUI64) descriptor */ + ((uint8_t *)dest)[0] = 1; + ((uint8_t *)dest)[1] = sizeof(uint64_t); + bcopy(sc->nsdata.eui64, ((uint8_t *)dest) + 4, sizeof(uint64_t)); + break; default: DPRINTF("%s unsupported identify command requested 0x%x", __func__, command->cdw10 & 0xFF); - pci_nvme_status_genc(&compl->status, NVME_SC_INVALID_FIELD); + pci_nvme_status_genc(&status, NVME_SC_INVALID_FIELD); return (1); } - pci_nvme_status_genc(&compl->status, NVME_SC_SUCCESS); + compl->status = status; return (1); } From owner-svn-src-all@freebsd.org Mon Jun 29 00:32:02 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2E76D359374; Mon, 29 Jun 2020 00:32:02 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w7jD4NHzz43FL; Mon, 29 Jun 2020 00:31:59 +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 724FE1EBE3; Mon, 29 Jun 2020 00:31:34 +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 05T0VYWH047201; Mon, 29 Jun 2020 00:31:34 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T0VYG5047200; Mon, 29 Jun 2020 00:31:34 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <202006290031.05T0VYG5047200@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Mon, 29 Jun 2020 00:31:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362751 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 362751 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 00:32:03 -0000 Author: chuck Date: Mon Jun 29 00:31:34 2020 New Revision: 362751 URL: https://svnweb.freebsd.org/changeset/base/362751 Log: bhyve: fix NVMe Get Log Page command Fix the logic in nvme_opc_get_log_page to calculate the number of DWORDS (uint32_t) instead of WORDS (uint16_t) for the byte length. And only return the allowed number of Log Page bytes as determined by the user request and actual size of the requested log page. Fixes UNH Test 1.3 Tested by: Jason Tubnor MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24885 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:31:30 2020 (r362750) +++ head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:31:34 2020 (r362751) @@ -830,32 +830,42 @@ static int nvme_opc_get_log_page(struct pci_nvme_softc* sc, struct nvme_command* command, struct nvme_completion* compl) { - uint32_t logsize = (1 + ((command->cdw10 >> 16) & 0xFFF)) * 2; + uint32_t logsize; uint8_t logpage = command->cdw10 & 0xFF; DPRINTF("%s log page %u len %u", __func__, logpage, logsize); pci_nvme_status_genc(&compl->status, NVME_SC_SUCCESS); + /* + * Command specifies the number of dwords to return in fields NUMDU + * and NUMDL. This is a zero-based value. + */ + logsize = ((command->cdw11 << 16) | (command->cdw10 >> 16)) + 1; + logsize *= sizeof(uint32_t); + switch (logpage) { case NVME_LOG_ERROR: nvme_prp_memcpy(sc->nsc_pi->pi_vmctx, command->prp1, - command->prp2, (uint8_t *)&sc->err_log, logsize, + command->prp2, (uint8_t *)&sc->err_log, + MIN(logsize, sizeof(sc->err_log)), NVME_COPY_TO_PRP); break; case NVME_LOG_HEALTH_INFORMATION: /* TODO: present some smart info */ nvme_prp_memcpy(sc->nsc_pi->pi_vmctx, command->prp1, - command->prp2, (uint8_t *)&sc->health_log, logsize, + command->prp2, (uint8_t *)&sc->health_log, + MIN(logsize, sizeof(sc->health_log)), NVME_COPY_TO_PRP); break; case NVME_LOG_FIRMWARE_SLOT: nvme_prp_memcpy(sc->nsc_pi->pi_vmctx, command->prp1, - command->prp2, (uint8_t *)&sc->fw_log, logsize, + command->prp2, (uint8_t *)&sc->fw_log, + MIN(logsize, sizeof(sc->fw_log)), NVME_COPY_TO_PRP); break; default: - WPRINTF("%s get log page %x command not supported", + DPRINTF("%s get log page %x command not supported", __func__, logpage); pci_nvme_status_tc(&compl->status, NVME_SCT_COMMAND_SPECIFIC, From owner-svn-src-all@freebsd.org Mon Jun 29 00:32:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C0DC135972A; Mon, 29 Jun 2020 00:32:02 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w7jF2JwKz431T; Mon, 29 Jun 2020 00:31:59 +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 5A61C1EC54; Mon, 29 Jun 2020 00:31:38 +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 05T0Vcls047244; Mon, 29 Jun 2020 00:31:38 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T0VcBV047243; Mon, 29 Jun 2020 00:31:38 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <202006290031.05T0VcBV047243@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Mon, 29 Jun 2020 00:31:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362752 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 362752 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 00:32:03 -0000 Author: chuck Date: Mon Jun 29 00:31:37 2020 New Revision: 362752 URL: https://svnweb.freebsd.org/changeset/base/362752 Log: bhyve: fix NVMe queue creation and deletion Add checks for various types of invalid I/O Queue Create and Delete command parameters, including: - QID=0 - QID>MAX - QID already in use - Delete an Active CQ - Invalid QSIZE - Invalid CQID (SQ creation) - Invalid interrupt vector (CQ creation) Fixes UNH Tests 1.4.2-5,7-8 Tested by: Jason Tubnor MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24886 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:31:34 2020 (r362751) +++ head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:31:37 2020 (r362752) @@ -705,7 +705,8 @@ nvme_opc_delete_io_sq(struct pci_nvme_softc* sc, struc uint16_t qid = command->cdw10 & 0xffff; DPRINTF("%s DELETE_IO_SQ %u", __func__, qid); - if (qid == 0 || qid > sc->num_squeues) { + if (qid == 0 || qid > sc->num_squeues || + (sc->submit_queues[qid].qbase == NULL)) { WPRINTF("%s NOT PERMITTED queue id %u / num_squeues %u", __func__, qid, sc->num_squeues); pci_nvme_status_tc(&compl->status, NVME_SCT_COMMAND_SPECIFIC, @@ -714,6 +715,7 @@ nvme_opc_delete_io_sq(struct pci_nvme_softc* sc, struc } sc->submit_queues[qid].qbase = NULL; + sc->submit_queues[qid].cqid = 0; pci_nvme_status_genc(&compl->status, NVME_SC_SUCCESS); return (1); } @@ -726,7 +728,8 @@ nvme_opc_create_io_sq(struct pci_nvme_softc* sc, struc uint16_t qid = command->cdw10 & 0xffff; struct nvme_submission_queue *nsq; - if ((qid == 0) || (qid > sc->num_squeues)) { + if ((qid == 0) || (qid > sc->num_squeues) || + (sc->submit_queues[qid].qbase != NULL)) { WPRINTF("%s queue index %u > num_squeues %u", __func__, qid, sc->num_squeues); pci_nvme_status_tc(&compl->status, @@ -737,12 +740,39 @@ nvme_opc_create_io_sq(struct pci_nvme_softc* sc, struc nsq = &sc->submit_queues[qid]; nsq->size = ONE_BASED((command->cdw10 >> 16) & 0xffff); + DPRINTF("%s size=%u (max=%u)", __func__, nsq->size, sc->max_qentries); + if ((nsq->size < 2) || (nsq->size > sc->max_qentries)) { + /* + * Queues must specify at least two entries + * NOTE: "MAXIMUM QUEUE SIZE EXCEEDED" was renamed to + * "INVALID QUEUE SIZE" in the NVM Express 1.3 Spec + */ + pci_nvme_status_tc(&compl->status, + NVME_SCT_COMMAND_SPECIFIC, + NVME_SC_MAXIMUM_QUEUE_SIZE_EXCEEDED); + return (1); + } - nsq->qbase = vm_map_gpa(sc->nsc_pi->pi_vmctx, command->prp1, - sizeof(struct nvme_command) * (size_t)nsq->size); nsq->cqid = (command->cdw11 >> 16) & 0xffff; + if ((nsq->cqid == 0) || (nsq->cqid > sc->num_cqueues)) { + pci_nvme_status_tc(&compl->status, + NVME_SCT_COMMAND_SPECIFIC, + NVME_SC_INVALID_QUEUE_IDENTIFIER); + return (1); + } + + if (sc->compl_queues[nsq->cqid].qbase == NULL) { + pci_nvme_status_tc(&compl->status, + NVME_SCT_COMMAND_SPECIFIC, + NVME_SC_COMPLETION_QUEUE_INVALID); + return (1); + } + nsq->qpriority = (command->cdw11 >> 1) & 0x03; + nsq->qbase = vm_map_gpa(sc->nsc_pi->pi_vmctx, command->prp1, + sizeof(struct nvme_command) * (size_t)nsq->size); + DPRINTF("%s sq %u size %u gaddr %p cqid %u", __func__, qid, nsq->size, nsq->qbase, nsq->cqid); @@ -768,9 +798,11 @@ nvme_opc_delete_io_cq(struct pci_nvme_softc* sc, struc struct nvme_completion* compl) { uint16_t qid = command->cdw10 & 0xffff; + uint16_t sqid; DPRINTF("%s DELETE_IO_CQ %u", __func__, qid); - if (qid == 0 || qid > sc->num_cqueues) { + if (qid == 0 || qid > sc->num_cqueues || + (sc->compl_queues[qid].qbase == NULL)) { WPRINTF("%s queue index %u / num_cqueues %u", __func__, qid, sc->num_cqueues); pci_nvme_status_tc(&compl->status, NVME_SCT_COMMAND_SPECIFIC, @@ -778,6 +810,15 @@ nvme_opc_delete_io_cq(struct pci_nvme_softc* sc, struc return (1); } + /* Deleting an Active CQ is an error */ + for (sqid = 1; sqid < sc->num_squeues + 1; sqid++) + if (sc->submit_queues[sqid].cqid == qid) { + pci_nvme_status_tc(&compl->status, + NVME_SCT_COMMAND_SPECIFIC, + NVME_SC_INVALID_QUEUE_DELETION); + return (1); + } + sc->compl_queues[qid].qbase = NULL; pci_nvme_status_genc(&compl->status, NVME_SC_SUCCESS); return (1); @@ -787,41 +828,57 @@ static int nvme_opc_create_io_cq(struct pci_nvme_softc* sc, struct nvme_command* command, struct nvme_completion* compl) { + struct nvme_completion_queue *ncq; + uint16_t qid = command->cdw10 & 0xffff; - if (command->cdw11 & NVME_CMD_CDW11_PC) { - uint16_t qid = command->cdw10 & 0xffff; - struct nvme_completion_queue *ncq; + /* Only support Physically Contiguous queues */ + if ((command->cdw11 & NVME_CMD_CDW11_PC) == 0) { + WPRINTF("%s unsupported non-contig (list-based) " + "create i/o completion queue", + __func__); - if ((qid == 0) || (qid > sc->num_cqueues)) { - WPRINTF("%s queue index %u > num_cqueues %u", - __func__, qid, sc->num_cqueues); - pci_nvme_status_tc(&compl->status, - NVME_SCT_COMMAND_SPECIFIC, - NVME_SC_INVALID_QUEUE_IDENTIFIER); - return (1); - } + pci_nvme_status_genc(&compl->status, NVME_SC_INVALID_FIELD); + return (1); + } - ncq = &sc->compl_queues[qid]; - ncq->intr_en = (command->cdw11 & NVME_CMD_CDW11_IEN) >> 1; - ncq->intr_vec = (command->cdw11 >> 16) & 0xffff; - ncq->size = ONE_BASED((command->cdw10 >> 16) & 0xffff); + if ((qid == 0) || (qid > sc->num_cqueues) || + (sc->compl_queues[qid].qbase != NULL)) { + WPRINTF("%s queue index %u > num_cqueues %u", + __func__, qid, sc->num_cqueues); + pci_nvme_status_tc(&compl->status, + NVME_SCT_COMMAND_SPECIFIC, + NVME_SC_INVALID_QUEUE_IDENTIFIER); + return (1); + } - ncq->qbase = vm_map_gpa(sc->nsc_pi->pi_vmctx, - command->prp1, - sizeof(struct nvme_command) * (size_t)ncq->size); + ncq = &sc->compl_queues[qid]; + ncq->intr_en = (command->cdw11 & NVME_CMD_CDW11_IEN) >> 1; + ncq->intr_vec = (command->cdw11 >> 16) & 0xffff; + if (ncq->intr_vec > (sc->max_queues + 1)) { + pci_nvme_status_tc(&compl->status, + NVME_SCT_COMMAND_SPECIFIC, + NVME_SC_INVALID_INTERRUPT_VECTOR); + return (1); + } - pci_nvme_status_genc(&compl->status, NVME_SC_SUCCESS); - } else { - /* - * Non-contig completion queue unsupported. + ncq->size = ONE_BASED((command->cdw10 >> 16) & 0xffff); + if ((ncq->size < 2) || (ncq->size > sc->max_qentries)) { + /* + * Queues must specify at least two entries + * NOTE: "MAXIMUM QUEUE SIZE EXCEEDED" was renamed to + * "INVALID QUEUE SIZE" in the NVM Express 1.3 Spec */ - WPRINTF("%s unsupported non-contig (list-based) " - "create i/o completion queue", - __func__); - - /* 0x12 = Invalid Use of Controller Memory Buffer */ - pci_nvme_status_genc(&compl->status, 0x12); + pci_nvme_status_tc(&compl->status, + NVME_SCT_COMMAND_SPECIFIC, + NVME_SC_MAXIMUM_QUEUE_SIZE_EXCEEDED); + return (1); } + ncq->qbase = vm_map_gpa(sc->nsc_pi->pi_vmctx, + command->prp1, + sizeof(struct nvme_command) * (size_t)ncq->size); + + pci_nvme_status_genc(&compl->status, NVME_SC_SUCCESS); + return (1); } From owner-svn-src-all@freebsd.org Mon Jun 29 00:32:02 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A424D359729; Mon, 29 Jun 2020 00:32:02 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w7jF2yQRz436Q; Mon, 29 Jun 2020 00:32:00 +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 2E1761EC56; Mon, 29 Jun 2020 00:31:45 +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 05T0Vi39047333; Mon, 29 Jun 2020 00:31:44 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T0Vi2d047332; Mon, 29 Jun 2020 00:31:44 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <202006290031.05T0Vi2d047332@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Mon, 29 Jun 2020 00:31:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362754 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 362754 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 00:32:02 -0000 Author: chuck Date: Mon Jun 29 00:31:44 2020 New Revision: 362754 URL: https://svnweb.freebsd.org/changeset/base/362754 Log: bhyve: make unsupported NVMe commands a debug message Tested by: Jason Tubnor MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24888 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:31:41 2020 (r362753) +++ head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:31:44 2020 (r362754) @@ -1353,7 +1353,7 @@ pci_nvme_handle_admin_cmd(struct pci_nvme_softc* sc, u compl.status = NVME_NO_STATUS; break; default: - WPRINTF("0x%x command is not implemented", + DPRINTF("0x%x command is not implemented", cmd->opc); pci_nvme_status_genc(&compl.status, NVME_SC_INVALID_OPCODE); } From owner-svn-src-all@freebsd.org Mon Jun 29 00:32:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AEFBD35978C; Mon, 29 Jun 2020 00:32:02 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w7jF2yh6z436S; Mon, 29 Jun 2020 00:32:00 +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 AF3651EA56; Mon, 29 Jun 2020 00:31:41 +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 05T0Vf4Q047288; Mon, 29 Jun 2020 00:31:41 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T0VfJk047287; Mon, 29 Jun 2020 00:31:41 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <202006290031.05T0VfJk047287@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Mon, 29 Jun 2020 00:31:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362753 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 362753 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 00:32:03 -0000 Author: chuck Date: Mon Jun 29 00:31:41 2020 New Revision: 362753 URL: https://svnweb.freebsd.org/changeset/base/362753 Log: bhyve: add more compliant NVMe Get/Set Features Create a generic Get/Set Features by saving off the contents of CDW11 from the Set command and returning the saved value in the completion of the Get command. Implementation allows providing optional implementation for both Set and Get. Add infrastructure to determine which feature ID's are namespace specific and flag violations of this category of error. Also adds the feature specific behavior of Set Features, Number of Queues to only allow this command once per Controller reset. Fixes UNH Tests 1.2, 5.4, and 5.5.6 Tested by: Jason Tubnor MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24887 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:31:37 2020 (r362752) +++ head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:31:41 2020 (r362753) @@ -222,6 +222,23 @@ enum nvme_dsm_type { NVME_DATASET_MANAGEMENT_DISABLE, }; +struct pci_nvme_softc; +struct nvme_feature_obj; + +typedef void (*nvme_feature_cb)(struct pci_nvme_softc *, + struct nvme_feature_obj *, + struct nvme_command *, + struct nvme_completion *); + +struct nvme_feature_obj { + uint32_t cdw11; + nvme_feature_cb set; + nvme_feature_cb get; + bool namespace_specific; +}; + +#define NVME_FID_MAX (NVME_FEAT_ENDURANCE_GROUP_EVENT_CONFIGURATION + 1) + struct pci_nvme_softc { struct pci_devinst *nsc_pi; @@ -241,6 +258,7 @@ struct pci_nvme_softc { uint32_t max_queues; /* max number of IO SQ's or CQ's */ uint32_t num_cqueues; uint32_t num_squeues; + bool num_q_is_set; /* Has host set Number of Queues */ struct pci_nvme_ioreq *ioreqs; STAILQ_HEAD(, pci_nvme_ioreq) ioreqs_free; /* free list of ioreqs */ @@ -255,10 +273,7 @@ struct pci_nvme_softc { struct nvme_completion_queue *compl_queues; struct nvme_submission_queue *submit_queues; - /* controller features */ - uint32_t intr_coales_aggr_time; /* 0x08: uS to delay intr */ - uint32_t intr_coales_aggr_thresh; /* 0x08: compl-Q entries */ - uint32_t async_ev_config; /* 0x0B: async event config */ + struct nvme_feature_obj feat[NVME_FID_MAX]; enum nvme_dsm_type dataset_management; }; @@ -303,6 +318,15 @@ static void pci_nvme_io_partial(struct blockif_req *br #define NVME_ONCS_DSM (NVME_CTRLR_DATA_ONCS_DSM_MASK << \ NVME_CTRLR_DATA_ONCS_DSM_SHIFT) +static void nvme_feature_invalid_cb(struct pci_nvme_softc *, + struct nvme_feature_obj *, + struct nvme_command *, + struct nvme_completion *); +static void nvme_feature_num_queues(struct pci_nvme_softc *, + struct nvme_feature_obj *, + struct nvme_command *, + struct nvme_completion *); + static __inline void cpywithpad(char *dst, size_t dst_size, const char *src, char pad) { @@ -542,6 +566,18 @@ pci_nvme_init_logpages(struct pci_nvme_softc *sc) } static void +pci_nvme_init_features(struct pci_nvme_softc *sc) +{ + + sc->feat[0].set = nvme_feature_invalid_cb; + sc->feat[0].get = nvme_feature_invalid_cb; + + sc->feat[NVME_FEAT_LBA_RANGE_TYPE].namespace_specific = true; + sc->feat[NVME_FEAT_ERROR_RECOVERY].namespace_specific = true; + sc->feat[NVME_FEAT_NUMBER_OF_QUEUES].set = nvme_feature_num_queues; +} + +static void pci_nvme_reset_locked(struct pci_nvme_softc *sc) { uint32_t i; @@ -577,6 +613,8 @@ pci_nvme_reset_locked(struct pci_nvme_softc *sc) sc->compl_queues[i].tail = 0; sc->compl_queues[i].head = 0; } + + sc->num_q_is_set = false; } static void @@ -982,24 +1020,144 @@ nvme_opc_identify(struct pci_nvme_softc* sc, struct nv DPRINTF("%s unsupported identify command requested 0x%x", __func__, command->cdw10 & 0xFF); pci_nvme_status_genc(&status, NVME_SC_INVALID_FIELD); - return (1); + break; } compl->status = status; return (1); } -static int -nvme_set_feature_queues(struct pci_nvme_softc* sc, struct nvme_command* command, - struct nvme_completion* compl) +static const char * +nvme_fid_to_name(uint8_t fid) { + const char *name; + + switch (fid) { + case NVME_FEAT_ARBITRATION: + name = "Arbitration"; + break; + case NVME_FEAT_POWER_MANAGEMENT: + name = "Power Management"; + break; + case NVME_FEAT_LBA_RANGE_TYPE: + name = "LBA Range Type"; + break; + case NVME_FEAT_TEMPERATURE_THRESHOLD: + name = "Temperature Threshold"; + break; + case NVME_FEAT_ERROR_RECOVERY: + name = "Error Recovery"; + break; + case NVME_FEAT_VOLATILE_WRITE_CACHE: + name = "Volatile Write Cache"; + break; + case NVME_FEAT_NUMBER_OF_QUEUES: + name = "Number of Queues"; + break; + case NVME_FEAT_INTERRUPT_COALESCING: + name = "Interrupt Coalescing"; + break; + case NVME_FEAT_INTERRUPT_VECTOR_CONFIGURATION: + name = "Interrupt Vector Configuration"; + break; + case NVME_FEAT_WRITE_ATOMICITY: + name = "Write Atomicity Normal"; + break; + case NVME_FEAT_ASYNC_EVENT_CONFIGURATION: + name = "Asynchronous Event Configuration"; + break; + case NVME_FEAT_AUTONOMOUS_POWER_STATE_TRANSITION: + name = "Autonomous Power State Transition"; + break; + case NVME_FEAT_HOST_MEMORY_BUFFER: + name = "Host Memory Buffer"; + break; + case NVME_FEAT_TIMESTAMP: + name = "Timestamp"; + break; + case NVME_FEAT_KEEP_ALIVE_TIMER: + name = "Keep Alive Timer"; + break; + case NVME_FEAT_HOST_CONTROLLED_THERMAL_MGMT: + name = "Host Controlled Thermal Management"; + break; + case NVME_FEAT_NON_OP_POWER_STATE_CONFIG: + name = "Non-Operation Power State Config"; + break; + case NVME_FEAT_READ_RECOVERY_LEVEL_CONFIG: + name = "Read Recovery Level Config"; + break; + case NVME_FEAT_PREDICTABLE_LATENCY_MODE_CONFIG: + name = "Predictable Latency Mode Config"; + break; + case NVME_FEAT_PREDICTABLE_LATENCY_MODE_WINDOW: + name = "Predictable Latency Mode Window"; + break; + case NVME_FEAT_LBA_STATUS_INFORMATION_ATTRIBUTES: + name = "LBA Status Information Report Interval"; + break; + case NVME_FEAT_HOST_BEHAVIOR_SUPPORT: + name = "Host Behavior Support"; + break; + case NVME_FEAT_SANITIZE_CONFIG: + name = "Sanitize Config"; + break; + case NVME_FEAT_ENDURANCE_GROUP_EVENT_CONFIGURATION: + name = "Endurance Group Event Configuration"; + break; + case NVME_FEAT_SOFTWARE_PROGRESS_MARKER: + name = "Software Progress Marker"; + break; + case NVME_FEAT_HOST_IDENTIFIER: + name = "Host Identifier"; + break; + case NVME_FEAT_RESERVATION_NOTIFICATION_MASK: + name = "Reservation Notification Mask"; + break; + case NVME_FEAT_RESERVATION_PERSISTENCE: + name = "Reservation Persistence"; + break; + case NVME_FEAT_NAMESPACE_WRITE_PROTECTION_CONFIG: + name = "Namespace Write Protection Config"; + break; + default: + name = "Unknown"; + break; + } + + return (name); +} + +static void +nvme_feature_invalid_cb(struct pci_nvme_softc *sc, + struct nvme_feature_obj *feat, + struct nvme_command *command, + struct nvme_completion *compl) +{ + + pci_nvme_status_genc(&compl->status, NVME_SC_INVALID_FIELD); +} + +static void +nvme_feature_num_queues(struct pci_nvme_softc *sc, + struct nvme_feature_obj *feat, + struct nvme_command *command, + struct nvme_completion *compl) +{ uint16_t nqr; /* Number of Queues Requested */ + if (sc->num_q_is_set) { + WPRINTF("%s: Number of Queues already set", __func__); + pci_nvme_status_genc(&compl->status, + NVME_SC_COMMAND_SEQUENCE_ERROR); + return; + } + nqr = command->cdw11 & 0xFFFF; if (nqr == 0xffff) { WPRINTF("%s: Illegal NSQR value %#x", __func__, nqr); pci_nvme_status_genc(&compl->status, NVME_SC_INVALID_FIELD); - return (-1); + return; } sc->num_squeues = ONE_BASED(nqr); @@ -1013,7 +1171,7 @@ nvme_set_feature_queues(struct pci_nvme_softc* sc, str if (nqr == 0xffff) { WPRINTF("%s: Illegal NCQR value %#x", __func__, nqr); pci_nvme_status_genc(&compl->status, NVME_SC_INVALID_FIELD); - return (-1); + return; } sc->num_cqueues = ONE_BASED(nqr); @@ -1023,173 +1181,77 @@ nvme_set_feature_queues(struct pci_nvme_softc* sc, str sc->num_cqueues = sc->max_queues; } + /* Patch the command value which will be saved on callback's return */ + command->cdw11 = NVME_FEATURE_NUM_QUEUES(sc); compl->cdw0 = NVME_FEATURE_NUM_QUEUES(sc); - return (0); + sc->num_q_is_set = true; } static int -nvme_opc_set_features(struct pci_nvme_softc* sc, struct nvme_command* command, - struct nvme_completion* compl) +nvme_opc_set_features(struct pci_nvme_softc *sc, struct nvme_command *command, + struct nvme_completion *compl) { - int feature = command->cdw10 & 0xFF; - uint32_t iv; + struct nvme_feature_obj *feat; + uint32_t nsid = command->nsid; + uint8_t fid = command->cdw10 & 0xFF; - DPRINTF("%s feature 0x%x", __func__, feature); - compl->cdw0 = 0; + DPRINTF("%s: Feature ID 0x%x (%s)", __func__, fid, nvme_fid_to_name(fid)); - switch (feature) { - case NVME_FEAT_ARBITRATION: - DPRINTF(" arbitration 0x%x", command->cdw11); - break; - case NVME_FEAT_POWER_MANAGEMENT: - DPRINTF(" power management 0x%x", command->cdw11); - break; - case NVME_FEAT_LBA_RANGE_TYPE: - DPRINTF(" lba range 0x%x", command->cdw11); - break; - case NVME_FEAT_TEMPERATURE_THRESHOLD: - DPRINTF(" temperature threshold 0x%x", command->cdw11); - break; - case NVME_FEAT_ERROR_RECOVERY: - DPRINTF(" error recovery 0x%x", command->cdw11); - break; - case NVME_FEAT_VOLATILE_WRITE_CACHE: - DPRINTF(" volatile write cache 0x%x", command->cdw11); - break; - case NVME_FEAT_NUMBER_OF_QUEUES: - nvme_set_feature_queues(sc, command, compl); - break; - case NVME_FEAT_INTERRUPT_COALESCING: - DPRINTF(" interrupt coalescing 0x%x", command->cdw11); - - /* in uS */ - sc->intr_coales_aggr_time = ((command->cdw11 >> 8) & 0xFF)*100; - - sc->intr_coales_aggr_thresh = command->cdw11 & 0xFF; - break; - case NVME_FEAT_INTERRUPT_VECTOR_CONFIGURATION: - iv = command->cdw11 & 0xFFFF; - - DPRINTF(" interrupt vector configuration 0x%x", - command->cdw11); - - for (uint32_t i = 0; i < sc->num_cqueues + 1; i++) { - if (sc->compl_queues[i].intr_vec == iv) { - if (command->cdw11 & (1 << 16)) - sc->compl_queues[i].intr_en |= - NVME_CQ_INTCOAL; - else - sc->compl_queues[i].intr_en &= - ~NVME_CQ_INTCOAL; - } - } - break; - case NVME_FEAT_WRITE_ATOMICITY: - DPRINTF(" write atomicity 0x%x", command->cdw11); - break; - case NVME_FEAT_ASYNC_EVENT_CONFIGURATION: - DPRINTF(" async event configuration 0x%x", - command->cdw11); - sc->async_ev_config = command->cdw11; - break; - case NVME_FEAT_SOFTWARE_PROGRESS_MARKER: - DPRINTF(" software progress marker 0x%x", - command->cdw11); - break; - case 0x0C: - DPRINTF(" autonomous power state transition 0x%x", - command->cdw11); - break; - default: - WPRINTF("%s invalid feature", __func__); + if (fid >= NVME_FID_MAX) { + DPRINTF("%s invalid feature 0x%x", __func__, fid); pci_nvme_status_genc(&compl->status, NVME_SC_INVALID_FIELD); return (1); } + feat = &sc->feat[fid]; + if (!feat->namespace_specific && + !((nsid == 0) || (nsid == NVME_GLOBAL_NAMESPACE_TAG))) { + pci_nvme_status_tc(&compl->status, NVME_SCT_COMMAND_SPECIFIC, + NVME_SC_FEATURE_NOT_NS_SPECIFIC); + return (1); + } + + compl->cdw0 = 0; pci_nvme_status_genc(&compl->status, NVME_SC_SUCCESS); - return (1); + + if (feat->set) + feat->set(sc, feat, command, compl); + + if (compl->status == NVME_SC_SUCCESS) + feat->cdw11 = command->cdw11; + + return (0); } static int nvme_opc_get_features(struct pci_nvme_softc* sc, struct nvme_command* command, struct nvme_completion* compl) { - int feature = command->cdw10 & 0xFF; + struct nvme_feature_obj *feat; + uint8_t fid = command->cdw10 & 0xFF; - DPRINTF("%s feature 0x%x", __func__, feature); + DPRINTF("%s: Feature ID 0x%x (%s)", __func__, fid, nvme_fid_to_name(fid)); - compl->cdw0 = 0; - - switch (feature) { - case NVME_FEAT_ARBITRATION: - DPRINTF(" arbitration"); - break; - case NVME_FEAT_POWER_MANAGEMENT: - DPRINTF(" power management"); - break; - case NVME_FEAT_LBA_RANGE_TYPE: - DPRINTF(" lba range"); - break; - case NVME_FEAT_TEMPERATURE_THRESHOLD: - DPRINTF(" temperature threshold"); - switch ((command->cdw11 >> 20) & 0x3) { - case 0: - /* Over temp threshold */ - compl->cdw0 = 0xFFFF; - break; - case 1: - /* Under temp threshold */ - compl->cdw0 = 0; - break; - default: - WPRINTF(" invalid threshold type select"); - pci_nvme_status_genc(&compl->status, - NVME_SC_INVALID_FIELD); - return (1); - } - break; - case NVME_FEAT_ERROR_RECOVERY: - DPRINTF(" error recovery"); - break; - case NVME_FEAT_VOLATILE_WRITE_CACHE: - DPRINTF(" volatile write cache"); - break; - case NVME_FEAT_NUMBER_OF_QUEUES: - compl->cdw0 = NVME_FEATURE_NUM_QUEUES(sc); - - DPRINTF(" number of queues (submit %u, completion %u)", - compl->cdw0 & 0xFFFF, - (compl->cdw0 >> 16) & 0xFFFF); - - break; - case NVME_FEAT_INTERRUPT_COALESCING: - DPRINTF(" interrupt coalescing"); - break; - case NVME_FEAT_INTERRUPT_VECTOR_CONFIGURATION: - DPRINTF(" interrupt vector configuration"); - break; - case NVME_FEAT_WRITE_ATOMICITY: - DPRINTF(" write atomicity"); - break; - case NVME_FEAT_ASYNC_EVENT_CONFIGURATION: - DPRINTF(" async event configuration"); - sc->async_ev_config = command->cdw11; - break; - case NVME_FEAT_SOFTWARE_PROGRESS_MARKER: - DPRINTF(" software progress marker"); - break; - case 0x0C: - DPRINTF(" autonomous power state transition"); - break; - default: - WPRINTF("%s invalid feature 0x%x", __func__, feature); + if (fid >= NVME_FID_MAX) { + DPRINTF("%s invalid feature 0x%x", __func__, fid); pci_nvme_status_genc(&compl->status, NVME_SC_INVALID_FIELD); return (1); } + compl->cdw0 = 0; pci_nvme_status_genc(&compl->status, NVME_SC_SUCCESS); - return (1); + + feat = &sc->feat[fid]; + if (feat->get) { + feat->get(sc, feat, command, compl); + } + + if (compl->status == NVME_SC_SUCCESS) { + compl->cdw0 = feat->cdw11; + } + + return (0); } static int @@ -2312,7 +2374,6 @@ pci_nvme_init(struct vmctx *ctx, struct pci_devinst *p pthread_mutex_init(&sc->ioreqs[i].mtx, NULL); pthread_cond_init(&sc->ioreqs[i].cv, NULL); } - sc->intr_coales_aggr_thresh = 1; pci_set_cfgdata16(pi, PCIR_DEVICE, 0x0A0A); pci_set_cfgdata16(pi, PCIR_VENDOR, 0xFB5D); @@ -2363,6 +2424,7 @@ pci_nvme_init(struct vmctx *ctx, struct pci_devinst *p pci_nvme_init_nsdata(sc, &sc->nsdata, 1, &sc->nvstore); pci_nvme_init_ctrldata(sc); pci_nvme_init_logpages(sc); + pci_nvme_init_features(sc); pci_nvme_reset(sc); From owner-svn-src-all@freebsd.org Mon Jun 29 00:32:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9B72E359554; Mon, 29 Jun 2020 00:32:10 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w7jP2BTnz43Q7; Mon, 29 Jun 2020 00:32:08 +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 80A8C1EA5A; Mon, 29 Jun 2020 00:31:48 +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 05T0Vmcp047379; Mon, 29 Jun 2020 00:31:48 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T0Vmlf047378; Mon, 29 Jun 2020 00:31:48 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <202006290031.05T0Vmlf047378@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Mon, 29 Jun 2020 00:31:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362755 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 362755 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 00:32:10 -0000 Author: chuck Date: Mon Jun 29 00:31:47 2020 New Revision: 362755 URL: https://svnweb.freebsd.org/changeset/base/362755 Log: bhyve: implement NVMe Format NVM command The Format NVM command mainly allows the host to specify the block size and protection information used for the Namespace. As the bhyve implementation simply maps the capabilities of the backing storage through to the guest, there isn't anything to implement. But a side effect of the format is the NVMe Controller shall not return any data previously written (i.e. erase previously written data). This patch implements this later behavior to provide a compliant implementation. Fixes UNH Test 1.6 Tested by: Jason Tubnor MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24889 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:31:44 2020 (r362754) +++ head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:31:47 2020 (r362755) @@ -280,6 +280,9 @@ struct pci_nvme_softc { static void pci_nvme_io_partial(struct blockif_req *br, int err); +static struct pci_nvme_ioreq *pci_nvme_get_ioreq(struct pci_nvme_softc *); +static void pci_nvme_release_ioreq(struct pci_nvme_softc *, struct pci_nvme_ioreq *); +static void pci_nvme_io_done(struct blockif_req *, int); /* Controller Configuration utils */ #define NVME_CC_GET_EN(cc) \ @@ -645,6 +648,7 @@ pci_nvme_init_controller(struct vmctx *ctx, struct pci sc->compl_queues[0].size = acqs; sc->compl_queues[0].qbase = vm_map_gpa(ctx, sc->regs.acq, sizeof(struct nvme_completion) * acqs); + sc->compl_queues[0].intr_en = NVME_CQ_INTEN; DPRINTF("%s mapping Admin-CQ guest 0x%lx, host: %p", __func__, sc->regs.acq, sc->compl_queues[0].qbase); @@ -1255,6 +1259,71 @@ nvme_opc_get_features(struct pci_nvme_softc* sc, struc } static int +nvme_opc_format_nvm(struct pci_nvme_softc* sc, struct nvme_command* command, + struct nvme_completion* compl) +{ + uint8_t ses, lbaf, pi; + + /* Only supports Secure Erase Setting - User Data Erase */ + ses = (command->cdw10 >> 9) & 0x7; + if (ses > 0x1) { + pci_nvme_status_genc(&compl->status, NVME_SC_INVALID_FIELD); + return (1); + } + + /* Only supports a single LBA Format */ + lbaf = command->cdw10 & 0xf; + if (lbaf != 0) { + pci_nvme_status_tc(&compl->status, NVME_SCT_COMMAND_SPECIFIC, + NVME_SC_INVALID_FORMAT); + return (1); + } + + /* Doesn't support Protection Infomation */ + pi = (command->cdw10 >> 5) & 0x7; + if (pi != 0) { + pci_nvme_status_genc(&compl->status, NVME_SC_INVALID_FIELD); + return (1); + } + + if (sc->nvstore.type == NVME_STOR_RAM) { + if (sc->nvstore.ctx) + free(sc->nvstore.ctx); + sc->nvstore.ctx = calloc(1, sc->nvstore.size); + pci_nvme_status_genc(&compl->status, NVME_SC_SUCCESS); + } else { + struct pci_nvme_ioreq *req; + int err; + + req = pci_nvme_get_ioreq(sc); + if (req == NULL) { + pci_nvme_status_genc(&compl->status, + NVME_SC_INTERNAL_DEVICE_ERROR); + WPRINTF("%s: unable to allocate IO req", __func__); + return (1); + } + req->nvme_sq = &sc->submit_queues[0]; + req->sqid = 0; + req->opc = command->opc; + req->cid = command->cid; + req->nsid = command->nsid; + + req->io_req.br_offset = 0; + req->io_req.br_resid = sc->nvstore.size; + req->io_req.br_callback = pci_nvme_io_done; + + err = blockif_delete(sc->nvstore.ctx, &req->io_req); + if (err) { + pci_nvme_status_genc(&compl->status, + NVME_SC_INTERNAL_DEVICE_ERROR); + pci_nvme_release_ioreq(sc, req); + } + } + + return (1); +} + +static int nvme_opc_abort(struct pci_nvme_softc* sc, struct nvme_command* command, struct nvme_completion* compl) { @@ -1351,6 +1420,15 @@ pci_nvme_handle_admin_cmd(struct pci_nvme_softc* sc, u nvme_opc_async_event_req(sc, cmd, &compl); */ compl.status = NVME_NO_STATUS; + break; + case NVME_OPC_FORMAT_NVM: + DPRINTF("%s command FORMAT_NVM", __func__); + if ((sc->ctrldata.oacs & + (1 << NVME_CTRLR_DATA_OACS_FORMAT_SHIFT)) == 0) { + pci_nvme_status_genc(&compl.status, NVME_SC_INVALID_OPCODE); + } + compl.status = NVME_NO_STATUS; + nvme_opc_format_nvm(sc, cmd, &compl); break; default: DPRINTF("0x%x command is not implemented", From owner-svn-src-all@freebsd.org Mon Jun 29 00:32:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8F1B33596B6; Mon, 29 Jun 2020 00:32:14 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w7jS3zxBz43GB; Mon, 29 Jun 2020 00:32:11 +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 D644B1EA5D; Mon, 29 Jun 2020 00:31:51 +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 05T0VpxS049581; Mon, 29 Jun 2020 00:31:51 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T0VpkP049545; Mon, 29 Jun 2020 00:31:51 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <202006290031.05T0VpkP049545@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Mon, 29 Jun 2020 00:31:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362756 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 362756 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 00:32:14 -0000 Author: chuck Date: Mon Jun 29 00:31:51 2020 New Revision: 362756 URL: https://svnweb.freebsd.org/changeset/base/362756 Log: bhyve: refactor NVMe I/O read/write Split the NVM I/O function (i.e. nvme_opc_write_read) into separate functions - one for RAM based backing-store and another for disk based backing-store for easier maintenance. No functional changes. Tested by: Jason Tubnor MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24890 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:31:47 2020 (r362755) +++ head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:31:51 2020 (r362756) @@ -1683,6 +1683,108 @@ nvme_opc_flush(struct pci_nvme_softc *sc, return (pending); } +static uint16_t +nvme_write_read_ram(struct pci_nvme_softc *sc, + struct pci_nvme_blockstore *nvstore, + uint64_t prp1, uint64_t prp2, + size_t offset, uint64_t bytes, + bool is_write) +{ + uint8_t *buf = nvstore->ctx; + enum nvme_copy_dir dir; + uint16_t status; + + if (is_write) + dir = NVME_COPY_TO_PRP; + else + dir = NVME_COPY_FROM_PRP; + + if (nvme_prp_memcpy(sc->nsc_pi->pi_vmctx, prp1, prp2, + buf + offset, bytes, dir)) + pci_nvme_status_genc(&status, + NVME_SC_DATA_TRANSFER_ERROR); + else + pci_nvme_status_genc(&status, NVME_SC_SUCCESS); + + return (status); +} + +static uint16_t +nvme_write_read_blockif(struct pci_nvme_softc *sc, + struct pci_nvme_blockstore *nvstore, + struct pci_nvme_ioreq *req, + uint64_t prp1, uint64_t prp2, + size_t offset, uint64_t bytes, + bool is_write) +{ + uint64_t size; + int err; + uint16_t status = NVME_NO_STATUS; + + size = MIN(PAGE_SIZE - (prp1 % PAGE_SIZE), bytes); + if (pci_nvme_append_iov_req(sc, req, prp1, + size, is_write, offset)) { + pci_nvme_status_genc(&status, + NVME_SC_DATA_TRANSFER_ERROR); + goto out; + } + + offset += size; + bytes -= size; + + if (bytes == 0) { + ; + } else if (bytes <= PAGE_SIZE) { + size = bytes; + if (pci_nvme_append_iov_req(sc, req, prp2, + size, is_write, offset)) { + pci_nvme_status_genc(&status, + NVME_SC_DATA_TRANSFER_ERROR); + goto out; + } + } else { + void *vmctx = sc->nsc_pi->pi_vmctx; + uint64_t *prp_list = &prp2; + uint64_t *last = prp_list; + + /* PRP2 is pointer to a physical region page list */ + while (bytes) { + /* Last entry in list points to the next list */ + if (prp_list == last) { + uint64_t prp = *prp_list; + + prp_list = paddr_guest2host(vmctx, prp, + PAGE_SIZE - (prp % PAGE_SIZE)); + last = prp_list + (NVME_PRP2_ITEMS - 1); + } + + size = MIN(bytes, PAGE_SIZE); + + if (pci_nvme_append_iov_req(sc, req, *prp_list, + size, is_write, offset)) { + pci_nvme_status_genc(&status, + NVME_SC_DATA_TRANSFER_ERROR); + goto out; + } + + offset += size; + bytes -= size; + + prp_list++; + } + } + req->io_req.br_callback = pci_nvme_io_done; + if (is_write) + err = blockif_write(nvstore->ctx, &req->io_req); + else + err = blockif_read(nvstore->ctx, &req->io_req); + + if (err) + pci_nvme_status_genc(&status, NVME_SC_DATA_TRANSFER_ERROR); +out: + return (status); +} + static bool nvme_opc_write_read(struct pci_nvme_softc *sc, struct nvme_command *cmd, @@ -1714,85 +1816,13 @@ nvme_opc_write_read(struct pci_nvme_softc *sc, cmd->prp2 &= ~0x3UL; if (nvstore->type == NVME_STOR_RAM) { - uint8_t *buf = nvstore->ctx; - enum nvme_copy_dir dir; - - if (is_write) - dir = NVME_COPY_TO_PRP; - else - dir = NVME_COPY_FROM_PRP; - - if (nvme_prp_memcpy(sc->nsc_pi->pi_vmctx, cmd->prp1, cmd->prp2, - buf + offset, bytes, dir)) - pci_nvme_status_genc(status, - NVME_SC_DATA_TRANSFER_ERROR); - else - pci_nvme_status_genc(status, NVME_SC_SUCCESS); + *status = nvme_write_read_ram(sc, nvstore, cmd->prp1, + cmd->prp2, offset, bytes, is_write); } else { - uint64_t size; - int err; + *status = nvme_write_read_blockif(sc, nvstore, req, + cmd->prp1, cmd->prp2, offset, bytes, is_write); - size = MIN(PAGE_SIZE - (cmd->prp1 % PAGE_SIZE), bytes); - if (pci_nvme_append_iov_req(sc, req, cmd->prp1, - size, is_write, offset)) { - pci_nvme_status_genc(status, - NVME_SC_DATA_TRANSFER_ERROR); - goto out; - } - - offset += size; - bytes -= size; - - if (bytes == 0) { - ; - } else if (bytes <= PAGE_SIZE) { - size = bytes; - if (pci_nvme_append_iov_req(sc, req, cmd->prp2, - size, is_write, offset)) { - pci_nvme_status_genc(status, - NVME_SC_DATA_TRANSFER_ERROR); - goto out; - } - } else { - void *vmctx = sc->nsc_pi->pi_vmctx; - uint64_t *prp_list = &cmd->prp2; - uint64_t *last = prp_list; - - /* PRP2 is pointer to a physical region page list */ - while (bytes) { - /* Last entry in list points to the next list */ - if (prp_list == last) { - uint64_t prp = *prp_list; - - prp_list = paddr_guest2host(vmctx, prp, - PAGE_SIZE - (prp % PAGE_SIZE)); - last = prp_list + (NVME_PRP2_ITEMS - 1); - } - - size = MIN(bytes, PAGE_SIZE); - - if (pci_nvme_append_iov_req(sc, req, *prp_list, - size, is_write, offset)) { - pci_nvme_status_genc(status, - NVME_SC_DATA_TRANSFER_ERROR); - goto out; - } - - offset += size; - bytes -= size; - - prp_list++; - } - } - req->io_req.br_callback = pci_nvme_io_done; - if (is_write) - err = blockif_write(nvstore->ctx, &req->io_req); - else - err = blockif_read(nvstore->ctx, &req->io_req); - - if (err) - pci_nvme_status_genc(status, NVME_SC_DATA_TRANSFER_ERROR); - else + if (*status == NVME_NO_STATUS) pending = true; } out: From owner-svn-src-all@freebsd.org Mon Jun 29 00:32:38 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 28FE735980E; Mon, 29 Jun 2020 00:32:38 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w7jw0Zfrz43JX; Mon, 29 Jun 2020 00:32:35 +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 59E991EE08; Mon, 29 Jun 2020 00:31:55 +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 05T0Vt4o049780; Mon, 29 Jun 2020 00:31:55 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T0Vtks049779; Mon, 29 Jun 2020 00:31:55 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <202006290031.05T0Vtks049779@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Mon, 29 Jun 2020 00:31:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362757 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 362757 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 00:32:38 -0000 Author: chuck Date: Mon Jun 29 00:31:54 2020 New Revision: 362757 URL: https://svnweb.freebsd.org/changeset/base/362757 Log: bhyve: base pci_nvme_ioreq size on advertised MDTS NVMe controllers advertise their Max Data Transfer Size (MDTS) to limit the number of page descriptors in an I/O request. Take advantage of this and size the struct pci_nvme_ioreq accordingly. Ensuring these values match both future-proofs the code and allows removing some complexity which only exists to handle this possibility. Tested by: Jason Tubnor MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24891 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:31:51 2020 (r362756) +++ head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:31:54 2020 (r362757) @@ -99,9 +99,16 @@ static int nvme_debug = 0; #define NVME_QUEUES 16 #define NVME_MAX_QENTRIES 2048 +/* Memory Page size Minimum reported in CAP register */ +#define NVME_MPSMIN 0 +/* MPSMIN converted to bytes */ +#define NVME_MPSMIN_BYTES (1 << (12 + NVME_MPSMIN)) #define NVME_PRP2_ITEMS (PAGE_SIZE/sizeof(uint64_t)) -#define NVME_MAX_BLOCKIOVS 512 +#define NVME_MDTS 9 +/* Note the + 1 allows for the initial descriptor to not be page aligned */ +#define NVME_MAX_IOVEC ((1 << NVME_MDTS) + 1) +#define NVME_MAX_DATA_SIZE ((1 << NVME_MDTS) * NVME_MPSMIN_BYTES) /* This is a synthetic status code to indicate there is no status */ #define NVME_NO_STATUS 0xffff @@ -186,6 +193,18 @@ struct pci_nvme_blockstore { uint32_t deallocate:1; }; +/* + * Calculate the number of additional page descriptors for guest IO requests + * based on the advertised Max Data Transfer (MDTS) and given the number of + * default iovec's in a struct blockif_req. + * + * Note the + 1 allows for the initial descriptor to not be page aligned. + */ +#define MDTS_PAD_SIZE \ + NVME_MAX_IOVEC > BLOCKIF_IOV_MAX ? \ + NVME_MAX_IOVEC - BLOCKIF_IOV_MAX : \ + 0 + struct pci_nvme_ioreq { struct pci_nvme_softc *sc; STAILQ_ENTRY(pci_nvme_ioreq) link; @@ -200,17 +219,9 @@ struct pci_nvme_ioreq { uint64_t prev_gpaddr; size_t prev_size; - /* - * lock if all iovs consumed (big IO); - * complete transaction before continuing - */ - pthread_mutex_t mtx; - pthread_cond_t cv; - struct blockif_req io_req; - /* pad to fit up to 512 page descriptors from guest IO request */ - struct iovec iovpadding[NVME_MAX_BLOCKIOVS-BLOCKIF_IOV_MAX]; + struct iovec iovpadding[MDTS_PAD_SIZE]; }; enum nvme_dsm_type { @@ -279,7 +290,6 @@ struct pci_nvme_softc { }; -static void pci_nvme_io_partial(struct blockif_req *br, int err); static struct pci_nvme_ioreq *pci_nvme_get_ioreq(struct pci_nvme_softc *); static void pci_nvme_release_ioreq(struct pci_nvme_softc *, struct pci_nvme_ioreq *); static void pci_nvme_io_done(struct blockif_req *, int); @@ -433,7 +443,7 @@ pci_nvme_init_ctrldata(struct pci_nvme_softc *sc) cd->mic = 0; - cd->mdts = 9; /* max data transfer size (2^mdts * CAP.MPSMIN) */ + cd->mdts = NVME_MDTS; /* max data transfer size (2^mdts * CAP.MPSMIN) */ cd->ver = 0x00010300; @@ -1461,81 +1471,46 @@ pci_nvme_append_iov_req(struct pci_nvme_softc *sc, str { int iovidx; - if (req != NULL) { - /* concatenate contig block-iovs to minimize number of iovs */ - if ((req->prev_gpaddr + req->prev_size) == gpaddr) { - iovidx = req->io_req.br_iovcnt - 1; + if (req == NULL) + return (-1); - req->io_req.br_iov[iovidx].iov_base = - paddr_guest2host(req->sc->nsc_pi->pi_vmctx, - req->prev_gpaddr, size); + if (req->io_req.br_iovcnt == NVME_MAX_IOVEC) { + return (-1); + } - req->prev_size += size; - req->io_req.br_resid += size; + /* concatenate contig block-iovs to minimize number of iovs */ + if ((req->prev_gpaddr + req->prev_size) == gpaddr) { + iovidx = req->io_req.br_iovcnt - 1; - req->io_req.br_iov[iovidx].iov_len = req->prev_size; - } else { - pthread_mutex_lock(&req->mtx); + req->io_req.br_iov[iovidx].iov_base = + paddr_guest2host(req->sc->nsc_pi->pi_vmctx, + req->prev_gpaddr, size); - iovidx = req->io_req.br_iovcnt; - if (iovidx == NVME_MAX_BLOCKIOVS) { - int err = 0; + req->prev_size += size; + req->io_req.br_resid += size; - DPRINTF("large I/O, doing partial req"); + req->io_req.br_iov[iovidx].iov_len = req->prev_size; + } else { + iovidx = req->io_req.br_iovcnt; + if (iovidx == 0) { + req->io_req.br_offset = lba; + req->io_req.br_resid = 0; + req->io_req.br_param = req; + } - iovidx = 0; - req->io_req.br_iovcnt = 0; + req->io_req.br_iov[iovidx].iov_base = + paddr_guest2host(req->sc->nsc_pi->pi_vmctx, + gpaddr, size); - req->io_req.br_callback = pci_nvme_io_partial; + req->io_req.br_iov[iovidx].iov_len = size; - if (!do_write) - err = blockif_read(sc->nvstore.ctx, - &req->io_req); - else - err = blockif_write(sc->nvstore.ctx, - &req->io_req); + req->prev_gpaddr = gpaddr; + req->prev_size = size; + req->io_req.br_resid += size; - /* wait until req completes before cont */ - if (err == 0) - pthread_cond_wait(&req->cv, &req->mtx); - } - if (iovidx == 0) { - req->io_req.br_offset = lba; - req->io_req.br_resid = 0; - req->io_req.br_param = req; - } - - req->io_req.br_iov[iovidx].iov_base = - paddr_guest2host(req->sc->nsc_pi->pi_vmctx, - gpaddr, size); - - req->io_req.br_iov[iovidx].iov_len = size; - - req->prev_gpaddr = gpaddr; - req->prev_size = size; - req->io_req.br_resid += size; - - req->io_req.br_iovcnt++; - - pthread_mutex_unlock(&req->mtx); - } - } else { - /* RAM buffer: read/write directly */ - void *p = sc->nvstore.ctx; - void *gptr; - - if ((lba + size) > sc->nvstore.size) { - WPRINTF("%s write would overflow RAM", __func__); - return (-1); - } - - p = (void *)((uintptr_t)p + (uintptr_t)lba); - gptr = paddr_guest2host(sc->nsc_pi->pi_vmctx, gpaddr, size); - if (do_write) - memcpy(p, gptr, size); - else - memcpy(gptr, p, size); + req->io_req.br_iovcnt++; } + return (0); } @@ -1633,16 +1608,6 @@ pci_nvme_io_done(struct blockif_req *br, int err) pci_nvme_release_ioreq(req->sc, req); } -static void -pci_nvme_io_partial(struct blockif_req *br, int err) -{ - struct pci_nvme_ioreq *req = br->br_param; - - DPRINTF("%s error %d %s", __func__, err, strerror(err)); - - pthread_cond_signal(&req->cv); -} - /* * Implements the Flush command. The specification states: * If a volatile write cache is not present, Flush commands complete @@ -1800,9 +1765,14 @@ nvme_opc_write_read(struct pci_nvme_softc *sc, lba = ((uint64_t)cmd->cdw11 << 32) | cmd->cdw10; nblocks = (cmd->cdw12 & 0xFFFF) + 1; - offset = lba * nvstore->sectsz; bytes = nblocks * nvstore->sectsz; + if (bytes > NVME_MAX_DATA_SIZE) { + WPRINTF("%s command would exceed MDTS", __func__); + pci_nvme_status_genc(status, NVME_SC_INVALID_FIELD); + goto out; + } + offset = lba * nvstore->sectsz; if ((offset + bytes) > nvstore->size) { WPRINTF("%s command would exceed LBA range", __func__); pci_nvme_status_genc(status, NVME_SC_LBA_OUT_OF_RANGE); @@ -2479,8 +2449,6 @@ pci_nvme_init(struct vmctx *ctx, struct pci_devinst *p sc->ioreqs = calloc(sc->ioslots, sizeof(struct pci_nvme_ioreq)); for (int i = 0; i < sc->ioslots; i++) { STAILQ_INSERT_TAIL(&sc->ioreqs_free, &sc->ioreqs[i], link); - pthread_mutex_init(&sc->ioreqs[i].mtx, NULL); - pthread_cond_init(&sc->ioreqs[i].cv, NULL); } pci_set_cfgdata16(pi, PCIR_DEVICE, 0x0A0A); From owner-svn-src-all@freebsd.org Mon Jun 29 00:32:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B0F2535964C; Mon, 29 Jun 2020 00:32:43 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w7k13PD5z43dh; Mon, 29 Jun 2020 00:32:40 +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 B62E41EDB1; Mon, 29 Jun 2020 00:32:05 +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 05T0W5IH049919; Mon, 29 Jun 2020 00:32:05 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T0W5tR049918; Mon, 29 Jun 2020 00:32:05 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <202006290032.05T0W5tR049918@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Mon, 29 Jun 2020 00:32:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362760 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 362760 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 00:32:43 -0000 Author: chuck Date: Mon Jun 29 00:32:04 2020 New Revision: 362760 URL: https://svnweb.freebsd.org/changeset/base/362760 Log: bhyve: validate the NVMe LBA start and count Add checks that the combination of Starting LBA and Number of Logical Blocks in a command will not exceed the range of the underlying storage. Note that because NVMe specifices the Starting LBA as a uint64_t, care must be taken when converting it and the block count to avoid an integer overflow. Fixes UNH Tests 2.2.3, 2.3.2, and 2.4.2 Tested by: Jason Tubnor MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24895 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:32:01 2020 (r362759) +++ head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:32:04 2020 (r362760) @@ -1529,6 +1529,34 @@ pci_nvme_stats_write_read_update(struct pci_nvme_softc pthread_mutex_unlock(&sc->mtx); } +/* + * Check if the combination of Starting LBA (slba) and Number of Logical + * Blocks (nlb) exceeds the range of the underlying storage. + * + * Because NVMe specifies the SLBA in blocks as a uint64_t and blockif stores + * the capacity in bytes as a uint64_t, care must be taken to avoid integer + * overflow. + */ +static bool +pci_nvme_out_of_range(struct pci_nvme_blockstore *nvstore, uint64_t slba, + uint32_t nlb) +{ + size_t offset, bytes; + + /* Overflow check of multiplying Starting LBA by the sector size */ + if (slba >> (64 - nvstore->sectsz_bits)) + return (true); + + offset = slba << nvstore->sectsz_bits; + bytes = nlb << nvstore->sectsz_bits; + + /* Overflow check of Number of Logical Blocks */ + if ((nvstore->size - offset) < bytes) + return (true); + + return (false); +} + static int pci_nvme_append_iov_req(struct pci_nvme_softc *sc, struct pci_nvme_ioreq *req, uint64_t gpaddr, size_t size, int do_write, uint64_t lba) @@ -1830,20 +1858,20 @@ nvme_opc_write_read(struct pci_nvme_softc *sc, lba = ((uint64_t)cmd->cdw11 << 32) | cmd->cdw10; nblocks = (cmd->cdw12 & 0xFFFF) + 1; + if (pci_nvme_out_of_range(nvstore, lba, nblocks)) { + WPRINTF("%s command would exceed LBA range", __func__); + pci_nvme_status_genc(status, NVME_SC_LBA_OUT_OF_RANGE); + goto out; + } - bytes = nblocks * nvstore->sectsz; + bytes = nblocks << nvstore->sectsz_bits; if (bytes > NVME_MAX_DATA_SIZE) { WPRINTF("%s command would exceed MDTS", __func__); pci_nvme_status_genc(status, NVME_SC_INVALID_FIELD); goto out; } - offset = lba * nvstore->sectsz; - if ((offset + bytes) > nvstore->size) { - WPRINTF("%s command would exceed LBA range", __func__); - pci_nvme_status_genc(status, NVME_SC_LBA_OUT_OF_RANGE); - goto out; - } + offset = lba << nvstore->sectsz_bits; req->bytes = bytes; req->io_req.br_offset = lba; @@ -1921,8 +1949,9 @@ nvme_opc_dataset_mgmt(struct pci_nvme_softc *sc, if (cmd->cdw11 & NVME_DSM_ATTR_DEALLOCATE) { struct nvme_dsm_range *range; + size_t offset, bytes; uint32_t nr, r; - int sectsz = sc->nvstore.sectsz; + int sectsz_bits = sc->nvstore.sectsz_bits; /* * DSM calls are advisory only, and compliant controllers @@ -1947,10 +1976,13 @@ nvme_opc_dataset_mgmt(struct pci_nvme_softc *sc, nvme_prp_memcpy(sc->nsc_pi->pi_vmctx, cmd->prp1, cmd->prp2, (uint8_t *)range, NVME_MAX_DSM_TRIM, NVME_COPY_FROM_PRP); - if ((range[0].starting_lba * sectsz) > nvstore->size) { + if (pci_nvme_out_of_range(nvstore, range[0].starting_lba, + range[0].length)) { pci_nvme_status_genc(status, NVME_SC_LBA_OUT_OF_RANGE); goto out; } + offset = range[0].starting_lba << sectsz_bits; + bytes = range[0].length << sectsz_bits; /* * If the request is for more than a single range, store @@ -1962,8 +1994,8 @@ nvme_opc_dataset_mgmt(struct pci_nvme_softc *sc, nr = cmd->cdw10 & 0xff; req->io_req.br_iovcnt = 0; - req->io_req.br_offset = range[0].starting_lba * sectsz; - req->io_req.br_resid = range[0].length * sectsz; + req->io_req.br_offset = offset; + req->io_req.br_resid = bytes; if (nr == 0) { req->io_req.br_callback = pci_nvme_io_done; @@ -1971,12 +2003,19 @@ nvme_opc_dataset_mgmt(struct pci_nvme_softc *sc, struct iovec *iov = req->io_req.br_iov; for (r = 0; r <= nr; r++) { - if ((range[r].starting_lba * sectsz) > nvstore->size) { + if (pci_nvme_out_of_range(nvstore, range[r].starting_lba, + range[r].length)) { pci_nvme_status_genc(status, NVME_SC_LBA_OUT_OF_RANGE); goto out; } - iov[r].iov_base = (void *)(range[r].starting_lba * sectsz); - iov[r].iov_len = range[r].length * sectsz; + offset = range[r].starting_lba << sectsz_bits; + bytes = range[r].length << sectsz_bits; + if ((nvstore->size - offset) < bytes) { + pci_nvme_status_genc(status, NVME_SC_LBA_OUT_OF_RANGE); + goto out; + } + iov[r].iov_base = (void *)offset; + iov[r].iov_len = bytes; } req->io_req.br_callback = pci_nvme_dealloc_sm; From owner-svn-src-all@freebsd.org Mon Jun 29 00:32:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 680133597B4; Mon, 29 Jun 2020 00:32:41 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w7jz5mw7z43YH; Mon, 29 Jun 2020 00:32:39 +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 BDD291EAC7; Mon, 29 Jun 2020 00:31:58 +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 05T0VwwM049826; Mon, 29 Jun 2020 00:31:58 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T0VwS7049825; Mon, 29 Jun 2020 00:31:58 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <202006290031.05T0VwS7049825@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Mon, 29 Jun 2020 00:31:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362758 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 362758 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 00:32:42 -0000 Author: chuck Date: Mon Jun 29 00:31:58 2020 New Revision: 362758 URL: https://svnweb.freebsd.org/changeset/base/362758 Log: bhyve: validate NVMe deallocate range values For NVMe emulation, validate the Data Set Management LBA ranges do not exceed the capacity of the backing storage. If they do, return an "LBA Out of Range" error. Fixes UNH Test 2.2.3 Tested by: Jason Tubnor MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24893 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:31:54 2020 (r362757) +++ head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:31:58 2020 (r362758) @@ -1877,6 +1877,11 @@ nvme_opc_dataset_mgmt(struct pci_nvme_softc *sc, nvme_prp_memcpy(sc->nsc_pi->pi_vmctx, cmd->prp1, cmd->prp2, (uint8_t *)range, NVME_MAX_DSM_TRIM, NVME_COPY_FROM_PRP); + if ((range[0].starting_lba * sectsz) > nvstore->size) { + pci_nvme_status_genc(status, NVME_SC_LBA_OUT_OF_RANGE); + goto out; + } + /* * If the request is for more than a single range, store * the ranges in the br_iov. Optimize for the common case @@ -1896,6 +1901,10 @@ nvme_opc_dataset_mgmt(struct pci_nvme_softc *sc, struct iovec *iov = req->io_req.br_iov; for (r = 0; r <= nr; r++) { + if ((range[r].starting_lba * sectsz) > nvstore->size) { + pci_nvme_status_genc(status, NVME_SC_LBA_OUT_OF_RANGE); + goto out; + } iov[r].iov_base = (void *)(range[r].starting_lba * sectsz); iov[r].iov_len = range[r].length * sectsz; } From owner-svn-src-all@freebsd.org Mon Jun 29 00:32:44 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C0211359572; Mon, 29 Jun 2020 00:32:43 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w7k15gXcz43dq; Mon, 29 Jun 2020 00:32:41 +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 F0B8E1EC6C; Mon, 29 Jun 2020 00:32:01 +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 05T0W1Sp049873; Mon, 29 Jun 2020 00:32:01 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T0W1bm049872; Mon, 29 Jun 2020 00:32:01 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <202006290032.05T0W1bm049872@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Mon, 29 Jun 2020 00:32:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362759 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 362759 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 00:32:44 -0000 Author: chuck Date: Mon Jun 29 00:32:01 2020 New Revision: 362759 URL: https://svnweb.freebsd.org/changeset/base/362759 Log: bhyve: implement NVMe SMART data I/O statistics SMART data in NVMe includes statistics for number of read and write commands issued as well as the number of "data units" read and written. NVMe defines "data unit" as thousands of 512 byte blocks (e.g. 1 data unit is 1-1,000 512 byte blocks, 3 data units are 2,001-3,000 512 byte blocks). This patch implements counters for: - Data Units Read - Data Units Written - Host Read Commands - Host Write Commands and exposes the values when the guest reads the SMART/Health Log Page. Fixes UNH Test 1.3.8 Tested by: Jason Tubnor MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24894 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:31:58 2020 (r362758) +++ head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:32:01 2020 (r362759) @@ -218,6 +218,7 @@ struct pci_nvme_ioreq { uint64_t prev_gpaddr; size_t prev_size; + size_t bytes; struct blockif_req io_req; @@ -287,6 +288,14 @@ struct pci_nvme_softc { struct nvme_feature_obj feat[NVME_FID_MAX]; enum nvme_dsm_type dataset_management; + + /* Accounting for SMART data */ + __uint128_t read_data_units; + __uint128_t write_data_units; + __uint128_t read_commands; + __uint128_t write_commands; + uint32_t read_dunits_remainder; + uint32_t write_dunits_remainder; }; @@ -576,6 +585,10 @@ pci_nvme_init_logpages(struct pci_nvme_softc *sc) memset(&sc->err_log, 0, sizeof(sc->err_log)); memset(&sc->health_log, 0, sizeof(sc->health_log)); memset(&sc->fw_log, 0, sizeof(sc->fw_log)); + + /* Set read/write remainder to round up according to spec */ + sc->read_dunits_remainder = 999; + sc->write_dunits_remainder = 999; } static void @@ -961,7 +974,17 @@ nvme_opc_get_log_page(struct pci_nvme_softc* sc, struc NVME_COPY_TO_PRP); break; case NVME_LOG_HEALTH_INFORMATION: - /* TODO: present some smart info */ + pthread_mutex_lock(&sc->mtx); + memcpy(&sc->health_log.data_units_read, &sc->read_data_units, + sizeof(sc->health_log.data_units_read)); + memcpy(&sc->health_log.data_units_written, &sc->write_data_units, + sizeof(sc->health_log.data_units_written)); + memcpy(&sc->health_log.host_read_commands, &sc->read_commands, + sizeof(sc->health_log.host_read_commands)); + memcpy(&sc->health_log.host_write_commands, &sc->write_commands, + sizeof(sc->health_log.host_write_commands)); + pthread_mutex_unlock(&sc->mtx); + nvme_prp_memcpy(sc->nsc_pi->pi_vmctx, command->prp1, command->prp2, (uint8_t *)&sc->health_log, MIN(logsize, sizeof(sc->health_log)), @@ -1465,6 +1488,47 @@ pci_nvme_handle_admin_cmd(struct pci_nvme_softc* sc, u pthread_mutex_unlock(&sq->mtx); } +/* + * Update the Write and Read statistics reported in SMART data + * + * NVMe defines "data unit" as thousand's of 512 byte blocks and is rounded up. + * E.g. 1 data unit is 1 - 1,000 512 byte blocks. 3 data units are 2,001 - 3,000 + * 512 byte blocks. Rounding up is acheived by initializing the remainder to 999. + */ +static void +pci_nvme_stats_write_read_update(struct pci_nvme_softc *sc, uint8_t opc, + size_t bytes, uint16_t status) +{ + + pthread_mutex_lock(&sc->mtx); + switch (opc) { + case NVME_OPC_WRITE: + sc->write_commands++; + if (status != NVME_SC_SUCCESS) + break; + sc->write_dunits_remainder += (bytes / 512); + while (sc->write_dunits_remainder >= 1000) { + sc->write_data_units++; + sc->write_dunits_remainder -= 1000; + } + break; + case NVME_OPC_READ: + sc->read_commands++; + if (status != NVME_SC_SUCCESS) + break; + sc->read_dunits_remainder += (bytes / 512); + while (sc->read_dunits_remainder >= 1000) { + sc->read_data_units++; + sc->read_dunits_remainder -= 1000; + } + break; + default: + DPRINTF("%s: Invalid OPC 0x%02x for stats", __func__, opc); + break; + } + pthread_mutex_unlock(&sc->mtx); +} + static int pci_nvme_append_iov_req(struct pci_nvme_softc *sc, struct pci_nvme_ioreq *req, uint64_t gpaddr, size_t size, int do_write, uint64_t lba) @@ -1605,6 +1669,8 @@ pci_nvme_io_done(struct blockif_req *br, int err) pci_nvme_status_genc(&status, code); pci_nvme_set_completion(req->sc, sq, req->sqid, req->cid, 0, status); + pci_nvme_stats_write_read_update(req->sc, req->opc, + req->bytes, status); pci_nvme_release_ioreq(req->sc, req); } @@ -1779,6 +1845,7 @@ nvme_opc_write_read(struct pci_nvme_softc *sc, goto out; } + req->bytes = bytes; req->io_req.br_offset = lba; /* PRP bits 1:0 must be zero */ @@ -1796,6 +1863,9 @@ nvme_opc_write_read(struct pci_nvme_softc *sc, pending = true; } out: + if (!pending) + pci_nvme_stats_write_read_update(sc, cmd->opc, bytes, *status); + return (pending); } From owner-svn-src-all@freebsd.org Mon Jun 29 00:33:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EAFBD359664; Mon, 29 Jun 2020 00:33:00 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w7kL1sTRz43y6; Mon, 29 Jun 2020 00:32: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 34DE21EE84; Mon, 29 Jun 2020 00:32:12 +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 05T0WCiE050008; Mon, 29 Jun 2020 00:32:12 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T0WCNE050007; Mon, 29 Jun 2020 00:32:12 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <202006290032.05T0WCNE050007@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Mon, 29 Jun 2020 00:32:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362762 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 362762 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 00:33:01 -0000 Author: chuck Date: Mon Jun 29 00:32:11 2020 New Revision: 362762 URL: https://svnweb.freebsd.org/changeset/base/362762 Log: bhyve: add basic NVMe Firmware Commit support This commit updates the Identify Controller data to advertise the Controller supports a single firmware slot and that firmware slot 1 is read-only. Additionally, it returns an "Invalid Firmware Slot" error when the host issues any Firmware Commit command (a.k.a. Firmware Activate). Fixes UNH Test 5.5.3 Tested by: Jason Tubnor MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24897 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:32:08 2020 (r362761) +++ head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:32:11 2020 (r362762) @@ -468,6 +468,9 @@ pci_nvme_init_ctrldata(struct pci_nvme_softc *sc) cd->acl = 2; cd->aerl = 4; + /* Advertise 1, Read-only firmware slot */ + cd->frmw = NVME_CTRLR_DATA_FRMW_SLOT1_RO_MASK | + (1 << NVME_CTRLR_DATA_FRMW_NUM_SLOTS_SHIFT); cd->lpa = 0; /* TODO: support some simple things like SMART */ cd->elpe = 0; /* max error log page entries */ cd->npss = 1; /* number of power states support */ @@ -1556,6 +1559,12 @@ pci_nvme_handle_admin_cmd(struct pci_nvme_softc* sc, u case NVME_OPC_GET_FEATURES: DPRINTF("%s command GET_FEATURES", __func__); nvme_opc_get_features(sc, cmd, &compl); + break; + case NVME_OPC_FIRMWARE_ACTIVATE: + DPRINTF("%s command FIRMWARE_ACTIVATE", __func__); + pci_nvme_status_tc(&compl.status, + NVME_SCT_COMMAND_SPECIFIC, + NVME_SC_INVALID_FIRMWARE_SLOT); break; case NVME_OPC_ASYNC_EVENT_REQUEST: DPRINTF("%s command ASYNC_EVENT_REQ", __func__); From owner-svn-src-all@freebsd.org Mon Jun 29 00:32:51 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EED07359812; Mon, 29 Jun 2020 00:32:50 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w7kB00vXz43mn; Mon, 29 Jun 2020 00:32:49 +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 E74EA1EE13; Mon, 29 Jun 2020 00:32:08 +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 05T0W8UU049962; Mon, 29 Jun 2020 00:32:08 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T0W8hJ049961; Mon, 29 Jun 2020 00:32:08 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <202006290032.05T0W8hJ049961@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Mon, 29 Jun 2020 00:32:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362761 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 362761 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 00:32:51 -0000 Author: chuck Date: Mon Jun 29 00:32:08 2020 New Revision: 362761 URL: https://svnweb.freebsd.org/changeset/base/362761 Log: bhyve: Add AER support to NVMe emulation This adds support to bhyve's NVMe device emulation for processing Async Event Requests but not returning them (i.e. Async Event Notifications). Fixes UNH Test 5.5.2 Tested by: Jason Tubnor MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24896 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:32:04 2020 (r362760) +++ head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:32:08 2020 (r362761) @@ -251,6 +251,11 @@ struct nvme_feature_obj { #define NVME_FID_MAX (NVME_FEAT_ENDURANCE_GROUP_EVENT_CONFIGURATION + 1) +struct pci_nvme_aer { + STAILQ_ENTRY(pci_nvme_aer) link; + uint16_t cid; /* Command ID of the submitted AER */ +}; + struct pci_nvme_softc { struct pci_devinst *nsc_pi; @@ -296,6 +301,9 @@ struct pci_nvme_softc { __uint128_t write_commands; uint32_t read_dunits_remainder; uint32_t write_dunits_remainder; + + STAILQ_HEAD(, pci_nvme_aer) aer_list; + uint32_t aer_count; }; @@ -604,6 +612,93 @@ pci_nvme_init_features(struct pci_nvme_softc *sc) } static void +pci_nvme_aer_init(struct pci_nvme_softc *sc) +{ + + STAILQ_INIT(&sc->aer_list); + sc->aer_count = 0; +} + +static void +pci_nvme_aer_destroy(struct pci_nvme_softc *sc) +{ + struct pci_nvme_aer *aer = NULL; + + while (!STAILQ_EMPTY(&sc->aer_list)) { + aer = STAILQ_FIRST(&sc->aer_list); + STAILQ_REMOVE_HEAD(&sc->aer_list, link); + free(aer); + } + + pci_nvme_aer_init(sc); +} + +static bool +pci_nvme_aer_available(struct pci_nvme_softc *sc) +{ + + return (!STAILQ_EMPTY(&sc->aer_list)); +} + +static bool +pci_nvme_aer_limit_reached(struct pci_nvme_softc *sc) +{ + struct nvme_controller_data *cd = &sc->ctrldata; + + /* AERL is a zero based value while aer_count is one's based */ + return (sc->aer_count == (cd->aerl + 1)); +} + +/* + * Add an Async Event Request + * + * Stores an AER to be returned later if the Controller needs to notify the + * host of an event. + * Note that while the NVMe spec doesn't require Controllers to return AER's + * in order, this implementation does preserve the order. + */ +static int +pci_nvme_aer_add(struct pci_nvme_softc *sc, uint16_t cid) +{ + struct pci_nvme_aer *aer = NULL; + + if (pci_nvme_aer_limit_reached(sc)) + return (-1); + + aer = calloc(1, sizeof(struct pci_nvme_aer)); + if (aer == NULL) + return (-1); + + sc->aer_count++; + + /* Save the Command ID for use in the completion message */ + aer->cid = cid; + STAILQ_INSERT_TAIL(&sc->aer_list, aer, link); + + return (0); +} + +/* + * Get an Async Event Request structure + * + * Returns a pointer to an AER previously submitted by the host or NULL if + * no AER's exist. Caller is responsible for freeing the returned struct. + */ +static struct pci_nvme_aer * +pci_nvme_aer_get(struct pci_nvme_softc *sc) +{ + struct pci_nvme_aer *aer = NULL; + + aer = STAILQ_FIRST(&sc->aer_list); + if (aer != NULL) { + STAILQ_REMOVE_HEAD(&sc->aer_list, link); + sc->aer_count--; + } + + return (aer); +} + +static void pci_nvme_reset_locked(struct pci_nvme_softc *sc) { uint32_t i; @@ -641,6 +736,8 @@ pci_nvme_reset_locked(struct pci_nvme_softc *sc) } sc->num_q_is_set = false; + + pci_nvme_aer_destroy(sc); } static void @@ -1376,13 +1473,26 @@ nvme_opc_async_event_req(struct pci_nvme_softc* sc, { DPRINTF("%s async event request 0x%x", __func__, command->cdw11); + /* Don't exceed the Async Event Request Limit (AERL). */ + if (pci_nvme_aer_limit_reached(sc)) { + pci_nvme_status_tc(&compl->status, NVME_SCT_COMMAND_SPECIFIC, + NVME_SC_ASYNC_EVENT_REQUEST_LIMIT_EXCEEDED); + return (1); + } + + if (pci_nvme_aer_add(sc, command->cid)) { + pci_nvme_status_tc(&compl->status, NVME_SCT_GENERIC, + NVME_SC_INTERNAL_DEVICE_ERROR); + return (1); + } + /* - * TODO: raise events when they happen based on the Set Features cmd. + * Raise events when they happen based on the Set Features cmd. * These events happen async, so only set completion successful if * there is an event reflective of the request to get event. */ - pci_nvme_status_tc(&compl->status, NVME_SCT_COMMAND_SPECIFIC, - NVME_SC_ASYNC_EVENT_REQUEST_LIMIT_EXCEEDED); + compl->status = NVME_NO_STATUS; + return (0); } @@ -1449,10 +1559,7 @@ pci_nvme_handle_admin_cmd(struct pci_nvme_softc* sc, u break; case NVME_OPC_ASYNC_EVENT_REQUEST: DPRINTF("%s command ASYNC_EVENT_REQ", __func__); - /* XXX dont care, unhandled for now nvme_opc_async_event_req(sc, cmd, &compl); - */ - compl.status = NVME_NO_STATUS; break; case NVME_OPC_FORMAT_NVM: DPRINTF("%s command FORMAT_NVM", __func__); @@ -2619,6 +2726,8 @@ pci_nvme_init(struct vmctx *ctx, struct pci_devinst *p pci_nvme_init_ctrldata(sc); pci_nvme_init_logpages(sc); pci_nvme_init_features(sc); + + pci_nvme_aer_init(sc); pci_nvme_reset(sc); From owner-svn-src-all@freebsd.org Mon Jun 29 00:33:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 034BD359768; Mon, 29 Jun 2020 00:33:10 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w7kX5Kjlz43x0; Mon, 29 Jun 2020 00:33:08 +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 5D19E1EE8E; Mon, 29 Jun 2020 00:32:22 +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 05T0WM2C050143; Mon, 29 Jun 2020 00:32:22 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T0WM6R050142; Mon, 29 Jun 2020 00:32:22 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <202006290032.05T0WM6R050142@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Mon, 29 Jun 2020 00:32:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362765 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 362765 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 00:33:11 -0000 Author: chuck Date: Mon Jun 29 00:32:21 2020 New Revision: 362765 URL: https://svnweb.freebsd.org/changeset/base/362765 Log: bhyve: NVMe handle zero length DSM ranges Dataset Management range specifications may have a zero length (a.k.a. an empty range definition). Handle the case of all ranges being empty by completing with Success (DSM commands are advisory only). For Deallocate, skip empty range definitions when sending TRIM's to the backing storage. Fixes UNH Test 2.2.4 Reviewed by: imp Tested by: Jason Tubnor MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24900 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:32:18 2020 (r362764) +++ head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:32:21 2020 (r362765) @@ -2098,6 +2098,8 @@ nvme_opc_dataset_mgmt(struct pci_nvme_softc *sc, struct pci_nvme_ioreq *req, uint16_t *status) { + struct nvme_dsm_range *range; + uint32_t nr, r, non_zero, dr; int err; bool pending = false; @@ -2106,10 +2108,31 @@ nvme_opc_dataset_mgmt(struct pci_nvme_softc *sc, goto out; } + nr = cmd->cdw10 & 0xff; + + /* copy locally because a range entry could straddle PRPs */ + range = calloc(1, NVME_MAX_DSM_TRIM); + if (range == NULL) { + pci_nvme_status_genc(status, NVME_SC_INTERNAL_DEVICE_ERROR); + goto out; + } + nvme_prp_memcpy(sc->nsc_pi->pi_vmctx, cmd->prp1, cmd->prp2, + (uint8_t *)range, NVME_MAX_DSM_TRIM, NVME_COPY_FROM_PRP); + + /* Check for invalid ranges and the number of non-zero lengths */ + non_zero = 0; + for (r = 0; r <= nr; r++) { + if (pci_nvme_out_of_range(nvstore, + range[r].starting_lba, range[r].length)) { + pci_nvme_status_genc(status, NVME_SC_LBA_OUT_OF_RANGE); + goto out; + } + if (range[r].length != 0) + non_zero++; + } + if (cmd->cdw11 & NVME_DSM_ATTR_DEALLOCATE) { - struct nvme_dsm_range *range; size_t offset, bytes; - uint32_t nr, r; int sectsz_bits = sc->nvstore.sectsz_bits; /* @@ -2121,25 +2144,17 @@ nvme_opc_dataset_mgmt(struct pci_nvme_softc *sc, goto out; } - if (req == NULL) { - pci_nvme_status_genc(status, NVME_SC_INTERNAL_DEVICE_ERROR); + /* If all ranges have a zero length, return Success */ + if (non_zero == 0) { + pci_nvme_status_genc(status, NVME_SC_SUCCESS); goto out; } - /* copy locally because a range entry could straddle PRPs */ - range = calloc(1, NVME_MAX_DSM_TRIM); - if (range == NULL) { + if (req == NULL) { pci_nvme_status_genc(status, NVME_SC_INTERNAL_DEVICE_ERROR); goto out; } - nvme_prp_memcpy(sc->nsc_pi->pi_vmctx, cmd->prp1, cmd->prp2, - (uint8_t *)range, NVME_MAX_DSM_TRIM, NVME_COPY_FROM_PRP); - if (pci_nvme_out_of_range(nvstore, range[0].starting_lba, - range[0].length)) { - pci_nvme_status_genc(status, NVME_SC_LBA_OUT_OF_RANGE); - goto out; - } offset = range[0].starting_lba << sectsz_bits; bytes = range[0].length << sectsz_bits; @@ -2150,8 +2165,6 @@ nvme_opc_dataset_mgmt(struct pci_nvme_softc *sc, * * Note that NVMe Number of Ranges is a zero based value */ - nr = cmd->cdw10 & 0xff; - req->io_req.br_iovcnt = 0; req->io_req.br_offset = offset; req->io_req.br_resid = bytes; @@ -2161,20 +2174,20 @@ nvme_opc_dataset_mgmt(struct pci_nvme_softc *sc, } else { struct iovec *iov = req->io_req.br_iov; - for (r = 0; r <= nr; r++) { - if (pci_nvme_out_of_range(nvstore, range[r].starting_lba, - range[r].length)) { - pci_nvme_status_genc(status, NVME_SC_LBA_OUT_OF_RANGE); - goto out; - } + for (r = 0, dr = 0; r <= nr; r++) { offset = range[r].starting_lba << sectsz_bits; bytes = range[r].length << sectsz_bits; + if (bytes == 0) + continue; + if ((nvstore->size - offset) < bytes) { - pci_nvme_status_genc(status, NVME_SC_LBA_OUT_OF_RANGE); + pci_nvme_status_genc(status, + NVME_SC_LBA_OUT_OF_RANGE); goto out; } - iov[r].iov_base = (void *)offset; - iov[r].iov_len = bytes; + iov[dr].iov_base = (void *)offset; + iov[dr].iov_len = bytes; + dr++; } req->io_req.br_callback = pci_nvme_dealloc_sm; @@ -2183,7 +2196,7 @@ nvme_opc_dataset_mgmt(struct pci_nvme_softc *sc, * prev_size to track the number of entries */ req->prev_gpaddr = 0; - req->prev_size = r; + req->prev_size = dr; } err = blockif_delete(nvstore->ctx, &req->io_req); @@ -2191,10 +2204,9 @@ nvme_opc_dataset_mgmt(struct pci_nvme_softc *sc, pci_nvme_status_genc(status, NVME_SC_INTERNAL_DEVICE_ERROR); else pending = true; - - free(range); } out: + free(range); return (pending); } From owner-svn-src-all@freebsd.org Mon Jun 29 00:33:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4F7B3359767; Mon, 29 Jun 2020 00:33:10 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w7kW3Rqcz446H; Mon, 29 Jun 2020 00:33:06 +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 B55D61EC7C; Mon, 29 Jun 2020 00:32:15 +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 05T0WFOo050054; Mon, 29 Jun 2020 00:32:15 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T0WF6V050053; Mon, 29 Jun 2020 00:32:15 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <202006290032.05T0WF6V050053@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Mon, 29 Jun 2020 00:32:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362763 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 362763 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 00:33:10 -0000 Author: chuck Date: Mon Jun 29 00:32:15 2020 New Revision: 362763 URL: https://svnweb.freebsd.org/changeset/base/362763 Log: bhyve: add NVMe Feature Interrupt Vector Config This adds support for NVMe Get Features, Interrupt Vector Config parameter error checking done by the UNH compliance tests. Fixes UNH Tests 1.6.8 and 5.5.6 Tested by: Jason Tubnor MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24898 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:32:11 2020 (r362762) +++ head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:32:15 2020 (r362763) @@ -356,6 +356,10 @@ static void nvme_feature_num_queues(struct pci_nvme_so struct nvme_feature_obj *, struct nvme_command *, struct nvme_completion *); +static void nvme_feature_iv_config(struct pci_nvme_softc *, + struct nvme_feature_obj *, + struct nvme_command *, + struct nvme_completion *); static __inline void cpywithpad(char *dst, size_t dst_size, const char *src, char pad) @@ -612,6 +616,8 @@ pci_nvme_init_features(struct pci_nvme_softc *sc) sc->feat[NVME_FEAT_LBA_RANGE_TYPE].namespace_specific = true; sc->feat[NVME_FEAT_ERROR_RECOVERY].namespace_specific = true; sc->feat[NVME_FEAT_NUMBER_OF_QUEUES].set = nvme_feature_num_queues; + sc->feat[NVME_FEAT_INTERRUPT_VECTOR_CONFIGURATION].set = + nvme_feature_iv_config; } static void @@ -1273,6 +1279,39 @@ nvme_feature_invalid_cb(struct pci_nvme_softc *sc, { pci_nvme_status_genc(&compl->status, NVME_SC_INVALID_FIELD); +} + +static void +nvme_feature_iv_config(struct pci_nvme_softc *sc, + struct nvme_feature_obj *feat, + struct nvme_command *command, + struct nvme_completion *compl) +{ + uint32_t i; + uint32_t cdw11 = command->cdw11; + uint16_t iv; + bool cd; + + pci_nvme_status_genc(&compl->status, NVME_SC_INVALID_FIELD); + + iv = cdw11 & 0xffff; + cd = cdw11 & (1 << 16); + + if (iv > (sc->max_queues + 1)) { + return; + } + + /* No Interrupt Coalescing (i.e. not Coalescing Disable) for Admin Q */ + if ((iv == 0) && !cd) + return; + + /* Requested Interrupt Vector must be used by a CQ */ + for (i = 0; i < sc->num_cqueues + 1; i++) { + if (sc->compl_queues[i].intr_vec == iv) { + pci_nvme_status_genc(&compl->status, NVME_SC_SUCCESS); + } + } + } static void From owner-svn-src-all@freebsd.org Mon Jun 29 00:33:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 13A6E35981F; Mon, 29 Jun 2020 00:33:11 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w7kX1XQBz43rM; Mon, 29 Jun 2020 00:33:08 +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 E3D241EF04; Mon, 29 Jun 2020 00:32:18 +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 05T0WI9N050097; Mon, 29 Jun 2020 00:32:18 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T0WIXT050096; Mon, 29 Jun 2020 00:32:18 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <202006290032.05T0WIXT050096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Mon, 29 Jun 2020 00:32:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362764 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 362764 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 00:33:11 -0000 Author: chuck Date: Mon Jun 29 00:32:18 2020 New Revision: 362764 URL: https://svnweb.freebsd.org/changeset/base/362764 Log: bhyve: fix NVMe Get Features, Predictable Latency If the Predictable Latency Mode is not supported, NVMe Controllers must return Invalid Field in Command status for the Get Features command with IDs: - Predictable Latency Mode Config - Predictable Latency Mode Window Fixes UNH Tests 3.6 Tested by: Jason Tubnor MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24899 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:32:15 2020 (r362763) +++ head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:32:18 2020 (r362764) @@ -618,6 +618,10 @@ pci_nvme_init_features(struct pci_nvme_softc *sc) sc->feat[NVME_FEAT_NUMBER_OF_QUEUES].set = nvme_feature_num_queues; sc->feat[NVME_FEAT_INTERRUPT_VECTOR_CONFIGURATION].set = nvme_feature_iv_config; + sc->feat[NVME_FEAT_PREDICTABLE_LATENCY_MODE_CONFIG].get = + nvme_feature_invalid_cb; + sc->feat[NVME_FEAT_PREDICTABLE_LATENCY_MODE_WINDOW].get = + nvme_feature_invalid_cb; } static void From owner-svn-src-all@freebsd.org Mon Jun 29 00:33:19 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 825D6359998; Mon, 29 Jun 2020 00:33:19 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w7kh6Mqgz44CG; Mon, 29 Jun 2020 00:33:16 +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 AE32F1EAD6; Mon, 29 Jun 2020 00:32:25 +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 05T0WP68050186; Mon, 29 Jun 2020 00:32:25 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T0WPaf050185; Mon, 29 Jun 2020 00:32:25 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <202006290032.05T0WPaf050185@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Mon, 29 Jun 2020 00:32:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362766 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 362766 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 00:33:19 -0000 Author: chuck Date: Mon Jun 29 00:32:24 2020 New Revision: 362766 URL: https://svnweb.freebsd.org/changeset/base/362766 Log: bhyve: fix NVMe Active Namespace list The NVMe specification requires unused entries in the Identify, Active Namespace ID data to be zero. Fix is bzero the provided page, similar to what is done for the Namespace Descriptors list. Fixes UNH Tests 2.6 and 2.9 Tested by: Jason Tubnor MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24901 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:32:21 2020 (r362765) +++ head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:32:24 2020 (r362766) @@ -1144,8 +1144,9 @@ nvme_opc_identify(struct pci_nvme_softc* sc, struct nv case 0x02: /* list of 1024 active NSIDs > CDW1.NSID */ dest = vm_map_gpa(sc->nsc_pi->pi_vmctx, command->prp1, sizeof(uint32_t) * 1024); + /* All unused entries shall be zero */ + bzero(dest, sizeof(uint32_t) * 1024); ((uint32_t *)dest)[0] = 1; - ((uint32_t *)dest)[1] = 0; break; case 0x03: /* list of NSID structures in CDW1.NSID, 4096 bytes */ if (command->nsid != 1) { From owner-svn-src-all@freebsd.org Mon Jun 29 00:34:20 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0823B359919; Mon, 29 Jun 2020 00:34:19 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w7lt23gwz44qG; Mon, 29 Jun 2020 00:34:17 +0000 (UTC) (envelope-from gonzo@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 B75881F01A; Mon, 29 Jun 2020 00:34:14 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05T0YEvJ051121; Mon, 29 Jun 2020 00:34:14 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T0YBU7051105; Mon, 29 Jun 2020 00:34:11 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <202006290034.05T0YBU7051105@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 29 Jun 2020 00:34:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362767 - in stable/12/usr.bin/mkimg: . tests X-SVN-Group: stable-12 X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: in stable/12/usr.bin/mkimg: . tests X-SVN-Commit-Revision: 362767 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 00:34:20 -0000 Author: gonzo Date: Mon Jun 29 00:34:11 2020 New Revision: 362767 URL: https://svnweb.freebsd.org/changeset/base/362767 Log: MFC r361935: Add VHDX support to mkimg(1) VHDX is the successor of Microsoft's VHD file format. It increases maximum capacity of the virtual drive to 64TB and introduces features to better handle power/system failures. VHDX is the required format for 2nd generation Hyper-V VMs. Reviewed by: marcel Differential Revision: https://reviews.freebsd.org/D25184 Added: stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-apm.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-1x1-512-apm.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-apm.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-63x255-4096-apm.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-apm.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-63x255-512-apm.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-bsd.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-63x255-512-bsd.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-ebr.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-63x255-512-ebr.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-mbr.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-63x255-512-mbr.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhdx.hex stable/12/usr.bin/mkimg/vhdx.c - copied unchanged from r361935, head/usr.bin/mkimg/vhdx.c Modified: stable/12/usr.bin/mkimg/Makefile stable/12/usr.bin/mkimg/mkimg.1 stable/12/usr.bin/mkimg/tests/mkimg_test.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/mkimg/Makefile ============================================================================== --- stable/12/usr.bin/mkimg/Makefile Mon Jun 29 00:32:24 2020 (r362766) +++ stable/12/usr.bin/mkimg/Makefile Mon Jun 29 00:34:11 2020 (r362767) @@ -18,6 +18,7 @@ SRCS+= \ qcow.c \ raw.c \ vhd.c \ + vhdx.c \ vmdk.c # List of schemes to support Modified: stable/12/usr.bin/mkimg/mkimg.1 ============================================================================== --- stable/12/usr.bin/mkimg/mkimg.1 Mon Jun 29 00:32:24 2020 (r362766) +++ stable/12/usr.bin/mkimg/mkimg.1 Mon Jun 29 00:34:11 2020 (r362767) @@ -257,6 +257,16 @@ To create a fixed VHD file for use by Azure, specify .Fl f Ar vhdf on the command line. The preferred file extension is ".vhd". +.Ss Dynamic VHDX +Microsoft's "Virtual Hard Disk v2" file formats, the +successor to VHD. +VHDX is the required format for the 2nd generation Hyper-V VMs. +To have +.Nm +create a dynamic VHDX file, specify +.Fl f Ar vhdx +on the command line. +The preferred file extension is ".vhdx". .Ss VMDK VMware's "Virtual Machine Disk" file format. It's a sparse file format akin to QCOW and VHD and supported by many Copied: stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdx.hex (from r361935, head/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdx.hex Mon Jun 29 00:34:11 2020 (r362767, copy of r361935, head/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdx.hex) @@ -0,0 +1,79 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00210020 00 02 00 00 00 10 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400000 45 52 02 00 00 00 80 00 00 00 00 00 00 00 00 00 |ER..............| +00400010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400200 50 4d 00 00 00 00 00 03 00 00 00 01 00 00 00 03 |PM..............| +00400210 41 70 70 6c 65 00 00 00 00 00 00 00 00 00 00 00 |Apple...........| +00400220 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00400230 41 70 70 6c 65 5f 70 61 72 74 69 74 69 6f 6e 5f |Apple_partition_| +00400240 6d 61 70 00 00 00 00 00 00 00 00 00 00 00 00 00 |map.............| +00400250 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400400 50 4d 00 00 00 00 00 03 00 00 00 08 00 00 20 00 |PM............ .| +00400410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400430 46 72 65 65 42 53 44 2d 55 46 53 00 00 00 00 00 |FreeBSD-UFS.....| +00400440 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400600 50 4d 00 00 00 00 00 03 00 00 20 08 00 00 01 00 |PM........ .....| +00400610 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400630 46 72 65 65 42 53 44 2d 73 77 61 70 00 00 00 00 |FreeBSD-swap....| +00400640 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00401000 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00801000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/12/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdx.hex (from r361935, head/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdx.hex Mon Jun 29 00:34:11 2020 (r362767, copy of r361935, head/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdx.hex) @@ -0,0 +1,75 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00210020 00 02 00 00 00 10 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00400200 57 45 56 82 00 00 00 00 00 00 00 00 00 00 00 00 |WEV.............| +00400210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00400220 00 00 00 00 00 00 00 00 00 02 00 00 01 00 00 00 |................| +00400230 01 00 00 00 00 80 00 00 01 00 00 00 00 80 00 00 |................| +00400240 00 00 00 00 00 00 00 00 10 0e 00 00 00 00 00 00 |................| +00400250 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400280 00 00 00 00 57 45 56 82 1f ad 08 00 00 20 00 00 |....WEV...... ..| +00400290 00 00 00 00 00 20 00 00 10 00 00 00 00 00 00 00 |..... ..........| +004002a0 07 00 00 00 00 01 00 00 10 20 00 00 00 00 00 00 |......... ......| +004002b0 01 00 00 00 00 80 00 00 00 00 00 00 00 00 00 00 |................| +004002c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400310 00 00 00 00 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |....B.B.B.B.B.B.| +00400320 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00402000 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00802000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/12/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdx.hex (from r361935, head/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdx.hex Mon Jun 29 00:34:11 2020 (r362767, copy of r361935, head/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdx.hex) @@ -0,0 +1,80 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00210020 00 02 00 00 00 10 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +004001b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff |................| +004001c0 ff ff a5 ff ff ff 01 00 00 00 10 21 00 00 00 00 |...........!....| +004001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +004001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00400200 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00400400 57 45 56 82 00 00 00 00 00 00 00 00 00 00 00 00 |WEV.............| +00400410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00400420 00 00 00 00 00 00 00 00 00 02 00 00 01 00 00 00 |................| +00400430 01 00 00 00 10 21 00 00 01 00 00 00 10 21 00 00 |.....!.......!..| +00400440 00 00 00 00 00 00 00 00 10 0e 00 00 00 00 00 00 |................| +00400450 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400480 00 00 00 00 57 45 56 82 0f 0c 08 00 00 20 00 00 |....WEV...... ..| +00400490 00 00 00 00 00 20 00 00 10 00 00 00 00 00 00 00 |..... ..........| +004004a0 07 00 00 00 00 01 00 00 10 20 00 00 00 00 00 00 |......... ......| +004004b0 01 00 00 00 10 21 00 00 00 00 00 00 00 00 00 00 |.....!..........| +004004c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400510 00 00 00 00 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |....B.B.B.B.B.B.| +00400520 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00402200 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00802200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/12/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.hex (from r361935, head/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.hex Mon Jun 29 00:34:11 2020 (r362767, copy of r361935, head/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.hex) @@ -0,0 +1,100 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 |................| +00210020 00 02 00 00 00 10 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +004001b0 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 00 00 |B.B.B.B.B.B.B...| +004001c0 02 00 ee ff ff ff 01 00 00 00 ff 7f 00 00 00 00 |................| +004001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +004001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00400200 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 |EFI PART....\...| +00400210 74 bd 80 b6 00 00 00 00 01 00 00 00 00 00 00 00 |t...............| +00400220 ff 7f 00 00 00 00 00 00 03 00 00 00 00 00 00 00 |................| +00400230 fd 7f 00 00 00 00 00 00 03 03 03 03 03 03 03 03 |................| +00400240 03 03 03 03 03 03 03 03 02 00 00 00 00 00 00 00 |................| +00400250 04 00 00 00 80 00 00 00 b2 50 1a c4 00 00 00 00 |.........P......| +00400260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400400 b6 7c 6e 51 cf 6e d6 11 8f f8 00 02 2d 09 71 2b |.|nQ.n......-.q+| +00400410 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00400420 08 00 00 00 00 00 00 00 07 20 00 00 00 00 00 00 |......... ......| +00400430 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400480 b5 7c 6e 51 cf 6e d6 11 8f f8 00 02 2d 09 71 2b |.|nQ.n......-.q+| +00400490 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 |................| +004004a0 08 20 00 00 00 00 00 00 07 21 00 00 00 00 00 00 |. .......!......| +004004b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00401000 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00801000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +013ffc00 b6 7c 6e 51 cf 6e d6 11 8f f8 00 02 2d 09 71 2b |.|nQ.n......-.q+| +013ffc10 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +013ffc20 08 00 00 00 00 00 00 00 07 20 00 00 00 00 00 00 |......... ......| +013ffc30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +013ffc80 b5 7c 6e 51 cf 6e d6 11 8f f8 00 02 2d 09 71 2b |.|nQ.n......-.q+| +013ffc90 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 |................| +013ffca0 08 20 00 00 00 00 00 00 07 21 00 00 00 00 00 00 |. .......!......| +013ffcb0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +013ffe00 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 |EFI PART....\...| +013ffe10 87 87 ed 30 00 00 00 00 ff 7f 00 00 00 00 00 00 |...0............| +013ffe20 01 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 |................| +013ffe30 fd 7f 00 00 00 00 00 00 03 03 03 03 03 03 03 03 |................| +013ffe40 03 03 03 03 03 03 03 03 fe 7f 00 00 00 00 00 00 |................| +013ffe50 04 00 00 00 80 00 00 00 b2 50 1a c4 00 00 00 00 |.........P......| +013ffe60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/12/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdx.hex (from r361935, head/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdx.hex Mon Jun 29 00:34:11 2020 (r362767, copy of r361935, head/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdx.hex) @@ -0,0 +1,82 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00210020 00 02 00 00 00 10 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +004001b0 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 80 ff |B.B.B.B.B.B.B...| +004001c0 ff ff a5 ff ff ff 01 00 00 00 10 21 00 00 00 00 |...........!....| +004001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +004001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00400200 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00400400 57 45 56 82 00 00 00 00 00 00 00 00 00 00 00 00 |WEV.............| +00400410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00400420 00 00 00 00 00 00 00 00 00 02 00 00 01 00 00 00 |................| +00400430 01 00 00 00 10 21 00 00 01 00 00 00 10 21 00 00 |.....!.......!..| +00400440 00 00 00 00 00 00 00 00 10 0e 00 00 00 00 00 00 |................| +00400450 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400480 00 00 00 00 57 45 56 82 0f 0c 08 00 00 20 00 00 |....WEV...... ..| +00400490 00 00 00 00 00 20 00 00 10 00 00 00 00 00 00 00 |..... ..........| +004004a0 07 00 00 00 00 01 00 00 10 20 00 00 00 00 00 00 |......... ......| +004004b0 01 00 00 00 10 21 00 00 00 00 00 00 00 00 00 00 |.....!..........| +004004c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400510 00 00 00 00 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |....B.B.B.B.B.B.| +00400520 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00402200 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00802200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/12/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdx.hex (from r361935, head/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdx.hex Mon Jun 29 00:34:11 2020 (r362767, copy of r361935, head/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdx.hex) @@ -0,0 +1,72 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00210020 00 02 00 00 00 10 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400000 46 72 65 65 42 53 44 31 36 4d 00 00 00 00 00 00 |FreeBSD16M......| +00400010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400080 00 00 00 01 00 00 00 00 00 00 00 00 00 08 09 02 |................| +00400090 00 00 09 01 00 00 00 00 00 00 00 00 00 00 00 00 |................| +004000a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +004000b0 00 00 00 00 00 00 00 00 00 00 00 00 60 0d de ee |............`...| +004000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +004001a0 00 00 00 00 0e 10 80 00 00 00 00 00 00 00 00 00 |................| +004001b0 80 00 00 00 00 01 00 01 00 00 00 00 00 00 00 01 |................| +004001c0 00 00 20 00 00 00 20 01 00 00 01 00 00 00 00 00 |.. ... .........| +004001d0 00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +004001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +004001f0 00 00 00 00 00 00 00 00 00 00 00 00 da be f8 7f |................| +00400200 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00800200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/12/usr.bin/mkimg/tests/img-1x1-512-apm.vhdx.hex (from r361935, head/usr.bin/mkimg/tests/img-1x1-512-apm.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-512-apm.vhdx.hex Mon Jun 29 00:34:11 2020 (r362767, copy of r361935, head/usr.bin/mkimg/tests/img-1x1-512-apm.vhdx.hex) @@ -0,0 +1,79 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00210020 00 02 00 00 00 02 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400000 45 52 02 00 00 00 80 00 00 00 00 00 00 00 00 00 |ER..............| +00400010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400200 50 4d 00 00 00 00 00 03 00 00 00 01 00 00 00 03 |PM..............| +00400210 41 70 70 6c 65 00 00 00 00 00 00 00 00 00 00 00 |Apple...........| +00400220 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00400230 41 70 70 6c 65 5f 70 61 72 74 69 74 69 6f 6e 5f |Apple_partition_| +00400240 6d 61 70 00 00 00 00 00 00 00 00 00 00 00 00 00 |map.............| +00400250 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400400 50 4d 00 00 00 00 00 03 00 00 00 04 00 00 20 00 |PM............ .| +00400410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400430 46 72 65 65 42 53 44 2d 55 46 53 00 00 00 00 00 |FreeBSD-UFS.....| +00400440 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400600 50 4d 00 00 00 00 00 03 00 00 20 04 00 00 01 00 |PM........ .....| +00400610 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400630 46 72 65 65 42 53 44 2d 73 77 61 70 00 00 00 00 |FreeBSD-swap....| +00400640 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400800 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00800800 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/12/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdx.hex (from r361935, head/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdx.hex Mon Jun 29 00:34:11 2020 (r362767, copy of r361935, head/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdx.hex) @@ -0,0 +1,75 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00210020 00 02 00 00 00 02 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00400200 57 45 56 82 00 00 00 00 00 00 00 00 00 00 00 00 |WEV.............| +00400210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00400220 00 00 00 00 00 00 00 00 00 02 00 00 01 00 00 00 |................| +00400230 01 00 00 00 00 80 00 00 01 00 00 00 00 80 00 00 |................| +00400240 00 00 00 00 00 00 00 00 10 0e 00 00 00 00 00 00 |................| +00400250 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400280 00 00 00 00 57 45 56 82 1f ad 08 00 00 20 00 00 |....WEV...... ..| +00400290 00 00 00 00 00 20 00 00 10 00 00 00 00 00 00 00 |..... ..........| +004002a0 07 00 00 00 00 01 00 00 10 20 00 00 00 00 00 00 |......... ......| +004002b0 01 00 00 00 00 80 00 00 00 00 00 00 00 00 00 00 |................| +004002c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400310 00 00 00 00 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |....B.B.B.B.B.B.| +00400320 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00402000 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00802000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/12/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdx.hex (from r361935, head/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdx.hex Mon Jun 29 00:34:11 2020 (r362767, copy of r361935, head/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdx.hex) @@ -0,0 +1,80 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00210020 00 02 00 00 00 02 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +004001b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff |................| +004001c0 ff ff a5 ff ff ff 01 00 00 00 10 21 00 00 00 00 |...........!....| +004001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +004001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00400200 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00400400 57 45 56 82 00 00 00 00 00 00 00 00 00 00 00 00 |WEV.............| +00400410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00400420 00 00 00 00 00 00 00 00 00 02 00 00 01 00 00 00 |................| +00400430 01 00 00 00 10 21 00 00 01 00 00 00 10 21 00 00 |.....!.......!..| +00400440 00 00 00 00 00 00 00 00 10 0e 00 00 00 00 00 00 |................| +00400450 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400480 00 00 00 00 57 45 56 82 0f 0c 08 00 00 20 00 00 |....WEV...... ..| +00400490 00 00 00 00 00 20 00 00 10 00 00 00 00 00 00 00 |..... ..........| +004004a0 07 00 00 00 00 01 00 00 10 20 00 00 00 00 00 00 |......... ......| +004004b0 01 00 00 00 10 21 00 00 00 00 00 00 00 00 00 00 |.....!..........| +004004c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400510 00 00 00 00 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |....B.B.B.B.B.B.| +00400520 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00402200 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00802200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/12/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.hex (from r361935, head/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.hex Mon Jun 29 00:34:11 2020 (r362767, copy of r361935, head/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.hex) @@ -0,0 +1,100 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 |................| +00210020 00 02 00 00 00 02 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +004001b0 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 00 00 |B.B.B.B.B.B.B...| +004001c0 02 00 ee ff ff ff 01 00 00 00 ff 7f 00 00 00 00 |................| +004001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +004001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00400200 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 |EFI PART....\...| +00400210 71 3e 06 15 00 00 00 00 01 00 00 00 00 00 00 00 |q>..............| +00400220 ff 7f 00 00 00 00 00 00 03 00 00 00 00 00 00 00 |................| +00400230 fd 7f 00 00 00 00 00 00 03 03 03 03 03 03 03 03 |................| +00400240 03 03 03 03 03 03 03 03 02 00 00 00 00 00 00 00 |................| +00400250 04 00 00 00 80 00 00 00 45 45 ea fb 00 00 00 00 |........EE......| +00400260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400400 b6 7c 6e 51 cf 6e d6 11 8f f8 00 02 2d 09 71 2b |.|nQ.n......-.q+| +00400410 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00400420 03 00 00 00 00 00 00 00 02 20 00 00 00 00 00 00 |......... ......| +00400430 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400480 b5 7c 6e 51 cf 6e d6 11 8f f8 00 02 2d 09 71 2b |.|nQ.n......-.q+| +00400490 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 |................| +004004a0 03 20 00 00 00 00 00 00 02 21 00 00 00 00 00 00 |. .......!......| +004004b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400600 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00800600 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +013ffc00 b6 7c 6e 51 cf 6e d6 11 8f f8 00 02 2d 09 71 2b |.|nQ.n......-.q+| +013ffc10 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +013ffc20 03 00 00 00 00 00 00 00 02 20 00 00 00 00 00 00 |......... ......| +013ffc30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +013ffc80 b5 7c 6e 51 cf 6e d6 11 8f f8 00 02 2d 09 71 2b |.|nQ.n......-.q+| +013ffc90 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 |................| +013ffca0 03 20 00 00 00 00 00 00 02 21 00 00 00 00 00 00 |. .......!......| +013ffcb0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +013ffe00 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 |EFI PART....\...| +013ffe10 82 04 6b 93 00 00 00 00 ff 7f 00 00 00 00 00 00 |..k.............| +013ffe20 01 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 |................| +013ffe30 fd 7f 00 00 00 00 00 00 03 03 03 03 03 03 03 03 |................| +013ffe40 03 03 03 03 03 03 03 03 fe 7f 00 00 00 00 00 00 |................| +013ffe50 04 00 00 00 80 00 00 00 45 45 ea fb 00 00 00 00 |........EE......| +013ffe60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/12/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdx.hex (from r361935, head/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdx.hex Mon Jun 29 00:34:11 2020 (r362767, copy of r361935, head/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdx.hex) @@ -0,0 +1,82 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00210020 00 02 00 00 00 02 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +004001b0 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 80 ff |B.B.B.B.B.B.B...| +004001c0 ff ff a5 ff ff ff 01 00 00 00 10 21 00 00 00 00 |...........!....| +004001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +004001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00400200 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00400400 57 45 56 82 00 00 00 00 00 00 00 00 00 00 00 00 |WEV.............| +00400410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00400420 00 00 00 00 00 00 00 00 00 02 00 00 01 00 00 00 |................| +00400430 01 00 00 00 10 21 00 00 01 00 00 00 10 21 00 00 |.....!.......!..| +00400440 00 00 00 00 00 00 00 00 10 0e 00 00 00 00 00 00 |................| +00400450 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400480 00 00 00 00 57 45 56 82 0f 0c 08 00 00 20 00 00 |....WEV...... ..| +00400490 00 00 00 00 00 20 00 00 10 00 00 00 00 00 00 00 |..... ..........| +004004a0 07 00 00 00 00 01 00 00 10 20 00 00 00 00 00 00 |......... ......| +004004b0 01 00 00 00 10 21 00 00 00 00 00 00 00 00 00 00 |.....!..........| +004004c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400510 00 00 00 00 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |....B.B.B.B.B.B.| +00400520 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00402200 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00802200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/12/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdx.hex (from r361935, head/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdx.hex Mon Jun 29 00:34:11 2020 (r362767, copy of r361935, head/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdx.hex) @@ -0,0 +1,72 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Jun 29 00:38:39 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 858F935A01E; Mon, 29 Jun 2020 00:38:39 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w7rv2tTwz45tB; Mon, 29 Jun 2020 00:38:39 +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 8AEDF1EC3E; Mon, 29 Jun 2020 00:31:24 +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 05T0VOIF047066; Mon, 29 Jun 2020 00:31:24 GMT (envelope-from chuck@FreeBSD.org) Received: (from chuck@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T0VOlI047065; Mon, 29 Jun 2020 00:31:24 GMT (envelope-from chuck@FreeBSD.org) Message-Id: <202006290031.05T0VOlI047065@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: chuck set sender to chuck@FreeBSD.org using -f From: Chuck Tuffli Date: Mon, 29 Jun 2020 00:31:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362748 - head/usr.sbin/bhyve X-SVN-Group: head X-SVN-Commit-Author: chuck X-SVN-Commit-Paths: head/usr.sbin/bhyve X-SVN-Commit-Revision: 362748 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 00:38:39 -0000 Author: chuck Date: Mon Jun 29 00:31:24 2020 New Revision: 362748 URL: https://svnweb.freebsd.org/changeset/base/362748 Log: bhyve: add locks around NVMe queue accesses The NVMe code attempted to ensure thread safety through a combination of using atomics and a "busy" flag. But this approach leads to unavoidable race conditions. Fix is to use per-queue mutex locks to ensure thread safety within the queue processing code. While in the neighborhood, move all the queue initialization code to a common function. Tested by: Jason Tubnor MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D19841 Modified: head/usr.sbin/bhyve/pci_nvme.c Modified: head/usr.sbin/bhyve/pci_nvme.c ============================================================================== --- head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:31:20 2020 (r362747) +++ head/usr.sbin/bhyve/pci_nvme.c Mon Jun 29 00:31:24 2020 (r362748) @@ -153,21 +153,21 @@ enum nvme_copy_dir { struct nvme_completion_queue { struct nvme_completion *qbase; + pthread_mutex_t mtx; uint32_t size; uint16_t tail; /* nvme progress */ uint16_t head; /* guest progress */ uint16_t intr_vec; uint32_t intr_en; - pthread_mutex_t mtx; }; struct nvme_submission_queue { struct nvme_command *qbase; + pthread_mutex_t mtx; uint32_t size; uint16_t head; /* nvme progress */ uint16_t tail; /* guest progress */ uint16_t cqid; /* completion queue id */ - int busy; /* queue is being processed */ int qpriority; }; @@ -339,7 +339,63 @@ pci_nvme_toggle_phase(uint16_t *status, int prev) *status |= NVME_STATUS_P; } +/* + * Initialize the requested number or IO Submission and Completion Queues. + * Admin queues are allocated implicitly. + */ static void +pci_nvme_init_queues(struct pci_nvme_softc *sc, uint32_t nsq, uint32_t ncq) +{ + uint32_t i; + + /* + * Allocate and initialize the Submission Queues + */ + if (nsq > NVME_QUEUES) { + WPRINTF("%s: clamping number of SQ from %u to %u", + __func__, nsq, NVME_QUEUES); + nsq = NVME_QUEUES; + } + + sc->num_squeues = nsq; + + sc->submit_queues = calloc(sc->num_squeues + 1, + sizeof(struct nvme_submission_queue)); + if (sc->submit_queues == NULL) { + WPRINTF("%s: SQ allocation failed", __func__); + sc->num_squeues = 0; + } else { + struct nvme_submission_queue *sq = sc->submit_queues; + + for (i = 0; i < sc->num_squeues; i++) + pthread_mutex_init(&sq[i].mtx, NULL); + } + + /* + * Allocate and initialize the Completion Queues + */ + if (ncq > NVME_QUEUES) { + WPRINTF("%s: clamping number of CQ from %u to %u", + __func__, ncq, NVME_QUEUES); + ncq = NVME_QUEUES; + } + + sc->num_cqueues = ncq; + + sc->compl_queues = calloc(sc->num_cqueues + 1, + sizeof(struct nvme_completion_queue)); + if (sc->compl_queues == NULL) { + WPRINTF("%s: CQ allocation failed", __func__); + sc->num_cqueues = 0; + } else { + struct nvme_completion_queue *cq = sc->compl_queues; + + for (i = 0; i < sc->num_cqueues; i++) + pthread_mutex_init(&cq[i].mtx, NULL); + } +} + +static void pci_nvme_init_ctrldata(struct pci_nvme_softc *sc) { struct nvme_controller_data *cd = &sc->ctrldata; @@ -498,6 +554,8 @@ pci_nvme_init_logpages(struct pci_nvme_softc *sc) static void pci_nvme_reset_locked(struct pci_nvme_softc *sc) { + uint32_t i; + DPRINTF("%s", __func__); sc->regs.cap_lo = (ZERO_BASED(sc->max_qentries) & NVME_CAP_LO_REG_MQES_MASK) | @@ -511,44 +569,23 @@ pci_nvme_reset_locked(struct pci_nvme_softc *sc) sc->regs.cc = 0; sc->regs.csts = 0; - sc->num_cqueues = sc->num_squeues = sc->max_queues; - if (sc->submit_queues != NULL) { - for (int i = 0; i < sc->num_squeues + 1; i++) { - /* - * The Admin Submission Queue is at index 0. - * It must not be changed at reset otherwise the - * emulation will be out of sync with the guest. - */ - if (i != 0) { - sc->submit_queues[i].qbase = NULL; - sc->submit_queues[i].size = 0; - sc->submit_queues[i].cqid = 0; - } - sc->submit_queues[i].tail = 0; - sc->submit_queues[i].head = 0; - sc->submit_queues[i].busy = 0; - } - } else - sc->submit_queues = calloc(sc->num_squeues + 1, - sizeof(struct nvme_submission_queue)); + assert(sc->submit_queues != NULL); - if (sc->compl_queues != NULL) { - for (int i = 0; i < sc->num_cqueues + 1; i++) { - /* See Admin Submission Queue note above */ - if (i != 0) { - sc->compl_queues[i].qbase = NULL; - sc->compl_queues[i].size = 0; - } + for (i = 0; i < sc->num_squeues + 1; i++) { + sc->submit_queues[i].qbase = NULL; + sc->submit_queues[i].size = 0; + sc->submit_queues[i].cqid = 0; + sc->submit_queues[i].tail = 0; + sc->submit_queues[i].head = 0; + } - sc->compl_queues[i].tail = 0; - sc->compl_queues[i].head = 0; - } - } else { - sc->compl_queues = calloc(sc->num_cqueues + 1, - sizeof(struct nvme_completion_queue)); + assert(sc->compl_queues != NULL); - for (int i = 0; i < sc->num_cqueues + 1; i++) - pthread_mutex_init(&sc->compl_queues[i].mtx, NULL); + for (i = 0; i < sc->num_cqueues + 1; i++) { + sc->compl_queues[i].qbase = NULL; + sc->compl_queues[i].size = 0; + sc->compl_queues[i].tail = 0; + sc->compl_queues[i].head = 0; } } @@ -1092,14 +1129,9 @@ pci_nvme_handle_admin_cmd(struct pci_nvme_softc* sc, u sq = &sc->submit_queues[0]; cq = &sc->compl_queues[0]; - sqhead = atomic_load_acq_short(&sq->head); + pthread_mutex_lock(&sq->mtx); - if (atomic_testandset_int(&sq->busy, 1)) { - DPRINTF("%s SQ busy, head %u, tail %u", - __func__, sqhead, sq->tail); - return; - } - + sqhead = sq->head; DPRINTF("sqhead %u, tail %u", sqhead, sq->tail); while (sqhead != atomic_load_acq_short(&sq->tail)) { @@ -1162,6 +1194,8 @@ pci_nvme_handle_admin_cmd(struct pci_nvme_softc* sc, u struct nvme_completion *cp; int phase; + pthread_mutex_lock(&cq->mtx); + cp = &(cq->qbase)[cq->tail]; cp->cdw0 = compl.cdw0; cp->sqid = 0; @@ -1173,16 +1207,18 @@ pci_nvme_handle_admin_cmd(struct pci_nvme_softc* sc, u pci_nvme_toggle_phase(&cp->status, phase); cq->tail = (cq->tail + 1) % cq->size; + + pthread_mutex_unlock(&cq->mtx); } } DPRINTF("setting sqhead %u", sqhead); - atomic_store_short(&sq->head, sqhead); - atomic_store_int(&sq->busy, 0); + sq->head = sqhead; if (cq->head != cq->tail) pci_generate_msix(sc->nsc_pi, 0); + pthread_mutex_unlock(&sq->mtx); } static int @@ -1272,7 +1308,7 @@ pci_nvme_append_iov_req(struct pci_nvme_softc *sc, str static void pci_nvme_set_completion(struct pci_nvme_softc *sc, struct nvme_submission_queue *sq, int sqid, uint16_t cid, - uint32_t cdw0, uint16_t status, int ignore_busy) + uint32_t cdw0, uint16_t status) { struct nvme_completion_queue *cq = &sc->compl_queues[sq->cqid]; struct nvme_completion *compl; @@ -1290,7 +1326,7 @@ pci_nvme_set_completion(struct pci_nvme_softc *sc, compl->cdw0 = cdw0; compl->sqid = sqid; - compl->sqhd = atomic_load_acq_short(&sq->head); + compl->sqhd = sq->head; compl->cid = cid; // toggle phase @@ -1375,7 +1411,7 @@ pci_nvme_io_done(struct blockif_req *br, int err) code = err ? NVME_SC_DATA_TRANSFER_ERROR : NVME_SC_SUCCESS; pci_nvme_status_genc(&status, code); - pci_nvme_set_completion(req->sc, sq, req->sqid, req->cid, 0, status, 0); + pci_nvme_set_completion(req->sc, sq, req->sqid, req->cid, 0, status); pci_nvme_release_ioreq(req->sc, req); } @@ -1575,7 +1611,7 @@ pci_nvme_dealloc_sm(struct blockif_req *br, int err) if (done) { pci_nvme_set_completion(sc, req->nvme_sq, req->sqid, - req->cid, 0, status, 0); + req->cid, 0, status); pci_nvme_release_ioreq(sc, req); } } @@ -1677,13 +1713,9 @@ pci_nvme_handle_io_cmd(struct pci_nvme_softc* sc, uint /* handle all submissions up to sq->tail index */ sq = &sc->submit_queues[idx]; - if (atomic_testandset_int(&sq->busy, 1)) { - DPRINTF("%s sqid %u busy", __func__, idx); - return; - } + pthread_mutex_lock(&sq->mtx); - sqhead = atomic_load_acq_short(&sq->head); - + sqhead = sq->head; DPRINTF("nvme_handle_io qid %u head %u tail %u cmdlist %p", idx, sqhead, sq->tail, sq->qbase); @@ -1750,14 +1782,15 @@ pci_nvme_handle_io_cmd(struct pci_nvme_softc* sc, uint complete: if (!pending) { pci_nvme_set_completion(sc, sq, idx, cmd->cid, 0, - status, 1); + status); if (req != NULL) pci_nvme_release_ioreq(sc, req); } } - atomic_store_short(&sq->head, sqhead); - atomic_store_int(&sq->busy, 0); + sq->head = sqhead; + + pthread_mutex_unlock(&sq->mtx); } static void @@ -1768,6 +1801,13 @@ pci_nvme_handle_doorbell(struct vmctx *ctx, struct pci idx, is_sq ? "SQ" : "CQ", value & 0xFFFF); if (is_sq) { + if (idx > sc->num_squeues) { + WPRINTF("%s queue index %lu overflow from " + "guest (max %u)", + __func__, idx, sc->num_squeues); + return; + } + atomic_store_short(&sc->submit_queues[idx].tail, (uint16_t)value); @@ -1791,7 +1831,8 @@ pci_nvme_handle_doorbell(struct vmctx *ctx, struct pci return; } - sc->compl_queues[idx].head = (uint16_t)value; + atomic_store_short(&sc->compl_queues[idx].head, + (uint16_t)value); } } @@ -2236,7 +2277,7 @@ pci_nvme_init(struct vmctx *ctx, struct pci_devinst *p pthread_mutex_init(&sc->mtx, NULL); sem_init(&sc->iosemlock, 0, sc->ioslots); - pci_nvme_reset(sc); + pci_nvme_init_queues(sc, sc->max_queues, sc->max_queues); /* * Controller data depends on Namespace data so initialize Namespace * data first. @@ -2244,6 +2285,8 @@ pci_nvme_init(struct vmctx *ctx, struct pci_devinst *p pci_nvme_init_nsdata(sc, &sc->nsdata, 1, &sc->nvstore); pci_nvme_init_ctrldata(sc); pci_nvme_init_logpages(sc); + + pci_nvme_reset(sc); pci_lintr_request(pi); From owner-svn-src-all@freebsd.org Mon Jun 29 00:41:12 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E69D935A19D; Mon, 29 Jun 2020 00:41:12 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ot1-f51.google.com (mail-ot1-f51.google.com [209.85.210.51]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w7vq6rjpz46DW; Mon, 29 Jun 2020 00:41:11 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-ot1-f51.google.com with SMTP id t18so1141541otq.5; Sun, 28 Jun 2020 17:41:11 -0700 (PDT) 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=RWYOuXaw1MtkZ6zi7huXSZgLxL4j4COiCmO4BkFbcCE=; b=CRm6druXcU0axa5OHFPOxW6tyxSwlhif9zlQhL3ytphvQsOt+pxFQEe4mjC2lxBh67 lOC+V+oMsE+tZ7sAWciS+pEHExmA7u+PC1gmtgWTE6lUxs1lHvbdpp5hYye0zlJKk+ux ZMNkr6TzY27vrQHHpecdkiBMlGJZTJnfrL+qUlMqWPhoxZHjwuKskKuCdmbG153x867X VQbKkLRasppi4RnnT7SCMRwRAv9nQcfQ/ZRXnSiqpo/rgNxr+PrX0sGmSHasbFoQ6why 6nNm0DRe95lCTlglVgPH6CBivJFypDUREZvTgTmrGquW075rd8GJRQQKLSQ0Esf3rFyQ 4DBA== X-Gm-Message-State: AOAM532ToJk4a2U4kEPnXRfu7buu7fNfXVPfdbDZPs0L/j8ZEiLS897U Ko26N6H2ym4M+ISxx1Qa35cV8h4mINvFbrgDl4sVFw== X-Google-Smtp-Source: ABdhPJwYeXRJqqjnVMg1Y4eXIYoa/G52mYjpBxSczJDfBVmkY+h88n4cB1CWJ8cr8kX6jjKnVAwxEXw32MQitvSlnZs= X-Received: by 2002:a9d:523:: with SMTP id 32mr11131971otw.291.1593391270570; Sun, 28 Jun 2020 17:41:10 -0700 (PDT) MIME-Version: 1.0 References: <201901021709.x02H9ZPM004185@repo.freebsd.org> In-Reply-To: <201901021709.x02H9ZPM004185@repo.freebsd.org> From: Alan Somers Date: Sun, 28 Jun 2020 18:40:59 -0600 Message-ID: Subject: Re: svn commit: r342699 - head/sbin/savecore To: Mark Johnston Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 49w7vq6rjpz46DW X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.210.51 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-1.13 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.65)[-0.652]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-0.40)[-0.401]; RWL_MAILSPIKE_GOOD(0.00)[209.85.210.51:from]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.08)[-0.078]; RCVD_IN_DNSWL_NONE(0.00)[209.85.210.51:from]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 00:41:13 -0000 On Wed, Jan 2, 2019 at 10:09 AM Mark Johnston wrote: > Author: markj > Date: Wed Jan 2 17:09:35 2019 > New Revision: 342699 > URL: https://svnweb.freebsd.org/changeset/base/342699 > > Log: > Capsicumize savecore(8). > > - Use cap_fileargs(3) to open dump devices after entering capability > mode, and use cap_syslog(3) to log messages. > - Use a relative directory fd to open output files. > - Use zdopen(3) to compress kernel dumps in capability mode. > > Reviewed by: cem, oshogbo > MFC after: 2 months > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D18458 > > Modified: > head/sbin/savecore/Makefile > head/sbin/savecore/savecore.c > > Modified: head/sbin/savecore/savecore.c > > ============================================================================== > --- head/sbin/savecore/savecore.c Wed Jan 2 16:42:07 2019 > (r342698) > +++ head/sbin/savecore/savecore.c Wed Jan 2 17:09:35 2019 > (r342699) > > +static char ** > +enum_dumpdevs(int *argcp) > +{ > + struct fstab *fsp; > + char **argv; > + int argc, n; > + > + /* > + * We cannot use getfsent(3) in capability mode, so we must > + * scan /etc/fstab and build up a list of candidate devices > + * before proceeding. > + */ > + argc = 0; > + n = 8; > + argv = malloc(n * sizeof(*argv)); > It looks like the memory allocated here > + if (argv == NULL) { > + logmsg(LOG_ERR, "malloc(): %m"); > + exit(1); > + } > + for (;;) { > + fsp = getfsent(); > + if (fsp == NULL) > + break; > + if (strcmp(fsp->fs_vfstype, "swap") != 0 && > + strcmp(fsp->fs_vfstype, "dump") != 0) > + continue; > + if (argc >= n) { > + n *= 2; > + argv = realloc(argv, n * sizeof(*argv)); > and here > + if (argv == NULL) { > + logmsg(LOG_ERR, "realloc(): %m"); > + exit(1); > + } > + } > + argv[argc] = strdup(fsp->fs_spec); > and here is leaked. I can't find any corresponding free. However, neither Valgrind nor Coverity complains. What am I missing? Does this memory sneakily get freed by a subroutine somewhere, or does Capsicum confuse our tools? -Alan From owner-svn-src-all@freebsd.org Mon Jun 29 00:46:46 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7951335A223 for ; Mon, 29 Jun 2020 00:46:46 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w82F1LFMz466g for ; Mon, 29 Jun 2020 00:46:45 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x742.google.com with SMTP id k18so13887020qke.4 for ; Sun, 28 Jun 2020 17:46:45 -0700 (PDT) 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=KH559yMG2AHTIPUMqqE8C/XkufDXw/E/lEG+GhV6a7k=; b=EYdETdSJUEiaDifuqdrfhs+v8cBB6MfIergt0t1G5MhEjbQTnQd0IlZ4hhhCKxv/mq 8KjIGHLn76LwjwwEM0LIoLhy+mDlImt6T1oE4GPYzW3x68hFfzr1rOuWIChTOv4lCoNz osdpgXFgKG4+g6Wzo+iB0gN/U+PiPy3N/Xid5h8odLZnRoI8zhxkd6F6zoBE0XRx15fY rVgue8AfWP5L5ldoHuolhV2uACvuDOPTP/5/P0B4+pylYuVNSSy6W/7BKT0ycn+4gjEC Q8zABCBUmPvzpjhKWrH6YPFa4lfkWA+F1kW2AruI3ffS19ixdFt4RuKFuvBh7VG2smyb AOnQ== 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=KH559yMG2AHTIPUMqqE8C/XkufDXw/E/lEG+GhV6a7k=; b=QHnHmKMCUg6+jI5kqjmnI1nxtVYhY6DGcGPXrpXh5EmczeUgUpeNYmBjLUQnXZSmMO atqnSRFYy8K086/QtRkLtpGC5ClkkNaAcDhRAPhWcAOeQEN0yDfGjKfOr0zkbOeQEygH LM0tS9EsUxg12ZPg+3UQeak95GigQAiH7O+dvyT+mCanhUSEarTG/r5363rKHuaFT0Gb KOHKgqfNIssyV7QFzWF7KKc4ZaCJEdZ3QQaqK9oyc8jMlJ4nLjAPx9UWgqOpHZ66YXUO zqA0Ej7x3pbRaXOD17gPk9F0cdrei3AJEzu7YWPwMydBr9N9D03Iu2VvLjYlumwzwSd6 Hpmg== X-Gm-Message-State: AOAM5327WT6kW23agD9VOXiR+q6oof6/3t5X29JCP2Iu2xrVhofVFYto ad553BRJY6wozRfA+7YfGD5aOhyO4YSDgQqY/9t1PA== X-Google-Smtp-Source: ABdhPJxbxiWkd6hd/U6RFVad+DYMln81EQWwXDdscZCRNkYCZiyZbKgKJ0XbW03iPBDJk9BXiVcCtCAQpMOZbGGBCnY= X-Received: by 2002:a37:67c8:: with SMTP id b191mr13052990qkc.60.1593391604307; Sun, 28 Jun 2020 17:46:44 -0700 (PDT) MIME-Version: 1.0 References: <201901021709.x02H9ZPM004185@repo.freebsd.org> In-Reply-To: From: Warner Losh Date: Sun, 28 Jun 2020 18:46:32 -0600 Message-ID: Subject: Re: svn commit: r342699 - head/sbin/savecore To: Alan Somers Cc: Mark Johnston , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 49w82F1LFMz466g X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=EYdETdSJ; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::742) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-1.64 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.85)[-0.853]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.09)[0.094]; NEURAL_HAM_LONG(-0.88)[-0.885]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::742:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 00:46:46 -0000 On Sun, Jun 28, 2020, 6:41 PM Alan Somers wrote: > On Wed, Jan 2, 2019 at 10:09 AM Mark Johnston wrote: > >> Author: markj >> Date: Wed Jan 2 17:09:35 2019 >> New Revision: 342699 >> URL: https://svnweb.freebsd.org/changeset/base/342699 >> >> Log: >> Capsicumize savecore(8). >> >> - Use cap_fileargs(3) to open dump devices after entering capability >> mode, and use cap_syslog(3) to log messages. >> - Use a relative directory fd to open output files. >> - Use zdopen(3) to compress kernel dumps in capability mode. >> >> Reviewed by: cem, oshogbo >> MFC after: 2 months >> Sponsored by: The FreeBSD Foundation >> Differential Revision: https://reviews.freebsd.org/D18458 >> >> Modified: >> head/sbin/savecore/Makefile >> head/sbin/savecore/savecore.c >> >> Modified: head/sbin/savecore/savecore.c >> >> ============================================================================== >> --- head/sbin/savecore/savecore.c Wed Jan 2 16:42:07 2019 >> (r342698) >> +++ head/sbin/savecore/savecore.c Wed Jan 2 17:09:35 2019 >> (r342699) >> >> +static char ** >> +enum_dumpdevs(int *argcp) >> +{ >> + struct fstab *fsp; >> + char **argv; >> + int argc, n; >> + >> + /* >> + * We cannot use getfsent(3) in capability mode, so we must >> + * scan /etc/fstab and build up a list of candidate devices >> + * before proceeding. >> + */ >> + argc = 0; >> + n = 8; >> + argv = malloc(n * sizeof(*argv)); >> > > It looks like the memory allocated here > > >> + if (argv == NULL) { >> + logmsg(LOG_ERR, "malloc(): %m"); >> + exit(1); >> + } >> + for (;;) { >> + fsp = getfsent(); >> + if (fsp == NULL) >> + break; >> + if (strcmp(fsp->fs_vfstype, "swap") != 0 && >> + strcmp(fsp->fs_vfstype, "dump") != 0) >> + continue; >> + if (argc >= n) { >> + n *= 2; >> + argv = realloc(argv, n * sizeof(*argv)); >> > > and here > > >> + if (argv == NULL) { >> + logmsg(LOG_ERR, "realloc(): %m"); >> + exit(1); >> + } >> + } >> + argv[argc] = strdup(fsp->fs_spec); >> > > and here is leaked. I can't find any corresponding free. However, > neither Valgrind nor Coverity complains. What am I missing? Does this > memory sneakily get freed by a subroutine somewhere, or does Capsicum > confuse our tools? > So the other spots adjusted large, but this one sets one of its elements. Help me understand how that is a leak? I'm sure I'm just confused. Warner > From owner-svn-src-all@freebsd.org Mon Jun 29 00:49:50 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6CC0335A513; Mon, 29 Jun 2020 00:49:50 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi1-f169.google.com (mail-oi1-f169.google.com [209.85.167.169]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w85n2FyYz46sg; Mon, 29 Jun 2020 00:49:48 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oi1-f169.google.com with SMTP id k4so13069238oik.2; Sun, 28 Jun 2020 17:49:48 -0700 (PDT) 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=1se5j/jegIz2sk9NM7GqTWB4Ppod3w2V1YbECNIbHFQ=; b=UNf3XwUOB6otK3fIBZqVNG26eZYmpHvGMQOR5yEPmOIDC+wXP6heVTfcDabIdlTwyC vlGwO+y4QVnTYUKWlPc8miONBPzXnH3zjzsgHKbZlIjD5duo/QVdM9Ne6oK9ktkqIXB9 gyBXtJpMOEX5sU6uvP7NFHUpkxmixzi7xyzxXHKOx4w+bCxMngRpOvu8XPJHQBdQb5WI NN56r/n5534YwjdNBj2bsWaTA2b0OfrKXRTKDljDH5aYtPVs2CyXoo5utzOxEh/lBZ6t iHQmBbFEPaIoL1mIn3byF1AyDR+6ViOA7NDrhCKnlTaZI6XkOD7bAGMbTOLYNhwcV6Fu 9nnA== X-Gm-Message-State: AOAM532svIEEsR0AjjWFgZU8pJ0ReUcqDU8AyJzH7QkozwB3TEDgnPj4 gyW6ow89dYvGU7ErTUWZZaD4kAZtZZSgd5Q4U5ABmw== X-Google-Smtp-Source: ABdhPJw4cAKLUZQZwqvvfA45Wb3bOUE+9hU3uqOFZD4mZebojN/m9J0MPIdr4P+sPFfEr/NOdSXMdZjaml2YqbxkrVo= X-Received: by 2002:aca:c391:: with SMTP id t139mr1921570oif.57.1593391787494; Sun, 28 Jun 2020 17:49:47 -0700 (PDT) MIME-Version: 1.0 References: <201901021709.x02H9ZPM004185@repo.freebsd.org> In-Reply-To: From: Alan Somers Date: Sun, 28 Jun 2020 18:49:36 -0600 Message-ID: Subject: Re: svn commit: r342699 - head/sbin/savecore To: Warner Losh Cc: Mark Johnston , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 49w85n2FyYz46sg X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.167.169 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-1.57 / 15.00]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; NEURAL_HAM_MEDIUM(-0.81)[-0.809]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; NEURAL_HAM_LONG(-0.70)[-0.698]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[freebsd.org]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.06)[-0.059]; RCVD_IN_DNSWL_NONE(0.00)[209.85.167.169:from]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.167.169:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; RCVD_TLS_ALL(0.00)[]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 00:49:50 -0000 On Sun, Jun 28, 2020 at 6:46 PM Warner Losh wrote: > > > On Sun, Jun 28, 2020, 6:41 PM Alan Somers wrote: > >> On Wed, Jan 2, 2019 at 10:09 AM Mark Johnston wrote: >> >>> Author: markj >>> Date: Wed Jan 2 17:09:35 2019 >>> New Revision: 342699 >>> URL: https://svnweb.freebsd.org/changeset/base/342699 >>> >>> Log: >>> Capsicumize savecore(8). >>> >>> - Use cap_fileargs(3) to open dump devices after entering capability >>> mode, and use cap_syslog(3) to log messages. >>> - Use a relative directory fd to open output files. >>> - Use zdopen(3) to compress kernel dumps in capability mode. >>> >>> Reviewed by: cem, oshogbo >>> MFC after: 2 months >>> Sponsored by: The FreeBSD Foundation >>> Differential Revision: https://reviews.freebsd.org/D18458 >>> >>> Modified: >>> head/sbin/savecore/Makefile >>> head/sbin/savecore/savecore.c >>> >>> Modified: head/sbin/savecore/savecore.c >>> >>> ============================================================================== >>> --- head/sbin/savecore/savecore.c Wed Jan 2 16:42:07 2019 >>> (r342698) >>> +++ head/sbin/savecore/savecore.c Wed Jan 2 17:09:35 2019 >>> (r342699) >>> >>> +static char ** >>> +enum_dumpdevs(int *argcp) >>> +{ >>> + struct fstab *fsp; >>> + char **argv; >>> + int argc, n; >>> + >>> + /* >>> + * We cannot use getfsent(3) in capability mode, so we must >>> + * scan /etc/fstab and build up a list of candidate devices >>> + * before proceeding. >>> + */ >>> + argc = 0; >>> + n = 8; >>> + argv = malloc(n * sizeof(*argv)); >>> >> >> It looks like the memory allocated here >> >> >>> + if (argv == NULL) { >>> + logmsg(LOG_ERR, "malloc(): %m"); >>> + exit(1); >>> + } >>> + for (;;) { >>> + fsp = getfsent(); >>> + if (fsp == NULL) >>> + break; >>> + if (strcmp(fsp->fs_vfstype, "swap") != 0 && >>> + strcmp(fsp->fs_vfstype, "dump") != 0) >>> + continue; >>> + if (argc >= n) { >>> + n *= 2; >>> + argv = realloc(argv, n * sizeof(*argv)); >>> >> >> and here >> >> >>> + if (argv == NULL) { >>> + logmsg(LOG_ERR, "realloc(): %m"); >>> + exit(1); >>> + } >>> + } >>> + argv[argc] = strdup(fsp->fs_spec); >>> >> >> and here is leaked. I can't find any corresponding free. However, >> neither Valgrind nor Coverity complains. What am I missing? Does this >> memory sneakily get freed by a subroutine somewhere, or does Capsicum >> confuse our tools? >> > > So the other spots adjusted large, but this one sets one of its elements. > Help me understand how that is a leak? I'm sure I'm just confused. > Because strdup itself allocates new memory. strdup's return value is always supposed to be freed. -Alan From owner-svn-src-all@freebsd.org Mon Jun 29 00:55:42 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9EEF735A4CD; Mon, 29 Jun 2020 00:55:42 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qv1-xf43.google.com (mail-qv1-xf43.google.com [IPv6:2607:f8b0:4864:20::f43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49w8DZ27Fpz47Jp; Mon, 29 Jun 2020 00:55:42 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qv1-xf43.google.com with SMTP id e3so637721qvo.10; Sun, 28 Jun 2020 17:55:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=5r054CQPN/H0oJAT5dMqeibmKxzzdMsA8/J10tRWwPo=; b=tkl7cHg1VSWyITWNTclATP3iaQg7FaxuKNGo0Zct9w7oMjFplby1QeUkfxaG9kZfVw ZQob2hHz/AP+vF05i9Jr8aVgtE2WM1e/++55kJvp2nuTWWdHRVWcgzN5a+qfN71Uge+2 4xSVDEloTHCEpjoLdrRlDhyKCjBv4DArh3j/eunwjCH+F6+U50ALxhG6ZBEc+T+pJMkx g4ccb5bdHiBTjIhVaMRcOvLdyVvb0/DeC7GwXtUNdTm1RW2XOXGv00k4B2mk5+btit6k dEafZhJsPjY8Q2xXsbE/IV46B66odoABuru/bH2QSloGujjCfRBE8fGEFavS9WgB2j95 RyfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=5r054CQPN/H0oJAT5dMqeibmKxzzdMsA8/J10tRWwPo=; b=gP6rsPHFE9Csxd4gCBzDVfxG1e9x/DhX1Ggu9ZRnmM9T+PWzy2SJyCLBn9gPbFxedK B3mzJf57UvlvS6A1c5ij728t5Y9b2XFfaAvGxm36RJvu/JsQdAkRark5c4WZG/jmEh2I vx1i4KjIbhS7G0lunOcuUhBJjRTgM8T+XEvJHIqXqQjtx1+WDB2o/vXkIkoiG/saPkxT pBvzQReVamKpmJoTEGQfzN8uBsE/DhBFtin8Fg672ZgLGzAdkltf9d+BEj+oDvbhExF3 Ydkq3gLUXdQcUXot3egVbSCFCb4tIziKG7pdKGjKbCoHcs6ASAtxp4hiPClXYySy2DS3 ZiMA== X-Gm-Message-State: AOAM530JPo2+ujyi9KM8CwY8SDPOGYCxiMnZ1XduwSCvbSgL3siHJrC7 qa0h9SJe1vf9dPxThowNDnwXYCTrCug= X-Google-Smtp-Source: ABdhPJw2QWVn2eED4tUOwJXpzTjNDfvuw4lkd9c3/16oxWHJPHK7xp2L24BOw+ajmVMdLe+3S9fQrA== X-Received: by 2002:a0c:8e8c:: with SMTP id x12mr12856860qvb.55.1593392140873; Sun, 28 Jun 2020 17:55:40 -0700 (PDT) Received: from raichu (bras-base-toroon0560w-grc-20-184-147-206-12.dsl.bell.ca. [184.147.206.12]) by smtp.gmail.com with ESMTPSA id q5sm14436871qtf.12.2020.06.28.17.55.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Jun 2020 17:55:40 -0700 (PDT) Sender: Mark Johnston Date: Sun, 28 Jun 2020 20:55:38 -0400 From: Mark Johnston To: Alan Somers Cc: src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r342699 - head/sbin/savecore Message-ID: <20200629005538.GB7202@raichu> References: <201901021709.x02H9ZPM004185@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 49w8DZ27Fpz47Jp X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 00:55:42 -0000 On Sun, Jun 28, 2020 at 06:40:59PM -0600, Alan Somers wrote: > On Wed, Jan 2, 2019 at 10:09 AM Mark Johnston wrote: > > > Author: markj > > Date: Wed Jan 2 17:09:35 2019 > > New Revision: 342699 > > URL: https://svnweb.freebsd.org/changeset/base/342699 > > > > Log: > > Capsicumize savecore(8). > > > > - Use cap_fileargs(3) to open dump devices after entering capability > > mode, and use cap_syslog(3) to log messages. > > - Use a relative directory fd to open output files. > > - Use zdopen(3) to compress kernel dumps in capability mode. > > > > Reviewed by: cem, oshogbo > > MFC after: 2 months > > Sponsored by: The FreeBSD Foundation > > Differential Revision: https://reviews.freebsd.org/D18458 > > > > Modified: > > head/sbin/savecore/Makefile > > head/sbin/savecore/savecore.c > > > > Modified: head/sbin/savecore/savecore.c > > > > ============================================================================== > > --- head/sbin/savecore/savecore.c Wed Jan 2 16:42:07 2019 > > (r342698) > > +++ head/sbin/savecore/savecore.c Wed Jan 2 17:09:35 2019 > > (r342699) > > > > +static char ** > > +enum_dumpdevs(int *argcp) > > +{ > > + struct fstab *fsp; > > + char **argv; > > + int argc, n; > > + > > + /* > > + * We cannot use getfsent(3) in capability mode, so we must > > + * scan /etc/fstab and build up a list of candidate devices > > + * before proceeding. > > + */ > > + argc = 0; > > + n = 8; > > + argv = malloc(n * sizeof(*argv)); > > > > It looks like the memory allocated here > > > > + if (argv == NULL) { > > + logmsg(LOG_ERR, "malloc(): %m"); > > + exit(1); > > + } > > + for (;;) { > > + fsp = getfsent(); > > + if (fsp == NULL) > > + break; > > + if (strcmp(fsp->fs_vfstype, "swap") != 0 && > > + strcmp(fsp->fs_vfstype, "dump") != 0) > > + continue; > > + if (argc >= n) { > > + n *= 2; > > + argv = realloc(argv, n * sizeof(*argv)); > > > > and here > > > > + if (argv == NULL) { > > + logmsg(LOG_ERR, "realloc(): %m"); > > + exit(1); > > + } > > + } > > + argv[argc] = strdup(fsp->fs_spec); > > > > and here is leaked. I can't find any corresponding free. However, neither > Valgrind nor Coverity complains. What am I missing? Does this memory > sneakily get freed by a subroutine somewhere, or does Capsicum confuse our > tools? I'm not sure why Capsicum would change anything. It would be worth testing devel/valgrind-devel with https://reviews.freebsd.org/D25452 applied, to see if it's able to detect that bug. From owner-svn-src-all@freebsd.org Mon Jun 29 03:09:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B9CC035C07B; Mon, 29 Jun 2020 03:09:16 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wCBh4MLMz4DRJ; Mon, 29 Jun 2020 03:09:16 +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 5B30320BCE; Mon, 29 Jun 2020 03:09:16 +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 05T39Gx5044867; Mon, 29 Jun 2020 03:09:16 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T39ETZ044859; Mon, 29 Jun 2020 03:09:14 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202006290309.05T39ETZ044859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 29 Jun 2020 03:09:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362769 - in head/sys: amd64/linux amd64/linux32 arm64/linux compat/linux i386/linux X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/sys: amd64/linux amd64/linux32 arm64/linux compat/linux i386/linux X-SVN-Commit-Revision: 362769 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 03:09:16 -0000 Author: kevans Date: Mon Jun 29 03:09:14 2020 New Revision: 362769 URL: https://svnweb.freebsd.org/changeset/base/362769 Log: linuxolator: implement memfd_create syscall This effectively mirrors our libc implementation, but with minor fudging -- name needs to be copied in from userspace, so we just copy it straight into stack-allocated memfd_name into the correct position rather than allocating memory that needs to be cleaned up. The sealing-related fcntl(2) commands, F_GET_SEALS and F_ADD_SEALS, have also been implemented now that we support them. Note that this implementation is still not quite at feature parity w.r.t. the actual Linux version; some caveats, from my foggy memory: - Need to implement SHM_GROW_ON_WRITE, default for memfd (in progress) - LTP wants the memfd name exposed to fdescfs - Linux allows open() of an fdescfs fd with O_TRUNC to truncate after dup. (?) Interested parties can install and run LTP from ports (devel/linux-ltp) to confirm any fixes. PR: 240874 Reviewed by: kib, trasz Differential Revision: https://reviews.freebsd.org/D21845 Modified: head/sys/amd64/linux/linux_dummy.c head/sys/amd64/linux32/linux32_dummy.c head/sys/arm64/linux/linux_dummy.c head/sys/compat/linux/linux.c head/sys/compat/linux/linux.h head/sys/compat/linux/linux_file.c head/sys/compat/linux/linux_file.h head/sys/i386/linux/linux_dummy.c Modified: head/sys/amd64/linux/linux_dummy.c ============================================================================== --- head/sys/amd64/linux/linux_dummy.c Mon Jun 29 02:32:07 2020 (r362768) +++ head/sys/amd64/linux/linux_dummy.c Mon Jun 29 03:09:14 2020 (r362769) @@ -138,7 +138,6 @@ DUMMY(sched_getattr); /* Linux 3.15: */ DUMMY(kexec_file_load); /* Linux 3.17: */ -DUMMY(memfd_create); DUMMY(seccomp); /* Linux 3.18: */ DUMMY(bpf); Modified: head/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- head/sys/amd64/linux32/linux32_dummy.c Mon Jun 29 02:32:07 2020 (r362768) +++ head/sys/amd64/linux32/linux32_dummy.c Mon Jun 29 03:09:14 2020 (r362769) @@ -133,7 +133,6 @@ DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); /* Linux 3.17: */ -DUMMY(memfd_create); DUMMY(seccomp); /* Linux 3.18: */ DUMMY(bpf); Modified: head/sys/arm64/linux/linux_dummy.c ============================================================================== --- head/sys/arm64/linux/linux_dummy.c Mon Jun 29 02:32:07 2020 (r362768) +++ head/sys/arm64/linux/linux_dummy.c Mon Jun 29 03:09:14 2020 (r362769) @@ -127,7 +127,6 @@ DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); /* Linux 3.17: */ -DUMMY(memfd_create); DUMMY(seccomp); /* Linux 3.18: */ DUMMY(bpf); Modified: head/sys/compat/linux/linux.c ============================================================================== --- head/sys/compat/linux/linux.c Mon Jun 29 02:32:07 2020 (r362768) +++ head/sys/compat/linux/linux.c Mon Jun 29 03:09:14 2020 (r362769) @@ -551,3 +551,79 @@ linux_dev_shm_destroy(void) destroy_dev(dev_shm_cdev); } + +int +bsd_to_linux_bits_(int value, struct bsd_to_linux_bitmap *bitmap, + size_t mapcnt, int no_value) +{ + int bsd_mask, bsd_value, linux_mask, linux_value; + int linux_ret; + size_t i; + bool applied; + + applied = false; + linux_ret = 0; + for (i = 0; i < mapcnt; ++i) { + bsd_mask = bitmap[i].bsd_mask; + bsd_value = bitmap[i].bsd_value; + if (bsd_mask == 0) + bsd_mask = bsd_value; + + linux_mask = bitmap[i].linux_mask; + linux_value = bitmap[i].linux_value; + if (linux_mask == 0) + linux_mask = linux_value; + + /* + * If a mask larger than just the value is set, we explicitly + * want to make sure that only this bit we mapped within that + * mask is set. + */ + if ((value & bsd_mask) == bsd_value) { + linux_ret = (linux_ret & ~linux_mask) | linux_value; + applied = true; + } + } + + if (!applied) + return (no_value); + return (linux_ret); +} + +int +linux_to_bsd_bits_(int value, struct bsd_to_linux_bitmap *bitmap, + size_t mapcnt, int no_value) +{ + int bsd_mask, bsd_value, linux_mask, linux_value; + int bsd_ret; + size_t i; + bool applied; + + applied = false; + bsd_ret = 0; + for (i = 0; i < mapcnt; ++i) { + bsd_mask = bitmap[i].bsd_mask; + bsd_value = bitmap[i].bsd_value; + if (bsd_mask == 0) + bsd_mask = bsd_value; + + linux_mask = bitmap[i].linux_mask; + linux_value = bitmap[i].linux_value; + if (linux_mask == 0) + linux_mask = linux_value; + + /* + * If a mask larger than just the value is set, we explicitly + * want to make sure that only this bit we mapped within that + * mask is set. + */ + if ((value & linux_mask) == linux_value) { + bsd_ret = (bsd_ret & ~bsd_mask) | bsd_value; + applied = true; + } + } + + if (!applied) + return (no_value); + return (bsd_ret); +} Modified: head/sys/compat/linux/linux.h ============================================================================== --- head/sys/compat/linux/linux.h Mon Jun 29 02:32:07 2020 (r362768) +++ head/sys/compat/linux/linux.h Mon Jun 29 03:09:14 2020 (r362769) @@ -148,4 +148,49 @@ extern struct mtx futex_mtx; void linux_dev_shm_create(void); void linux_dev_shm_destroy(void); +/* + * mask=0 is not sensible for this application, so it will be taken to mean + * a mask equivalent to the value. Otherwise, (word & mask) == value maps to + * (word & ~mask) | value in a bitfield for the platform we're converting to. + */ +struct bsd_to_linux_bitmap { + int bsd_mask; + int bsd_value; + int linux_mask; + int linux_value; +}; + +int bsd_to_linux_bits_(int value, struct bsd_to_linux_bitmap *bitmap, + size_t mapcnt, int no_value); +int linux_to_bsd_bits_(int value, struct bsd_to_linux_bitmap *bitmap, + size_t mapcnt, int no_value); + +#define bsd_to_linux_bits(_val, _bmap, _noval) \ + bsd_to_linux_bits_((_val), (_bmap), nitems((_bmap)), (_noval)) + +/* + * These functions are used for simplification of BSD <-> Linux bit conversions. + * Given `value`, a bit field, these functions will walk the given bitmap table + * and set the appropriate bits for the target platform. If any bits were + * successfully converted, then the return value is the equivalent of value + * represented with the bit values appropriate for the target platform. + * Otherwise, the value supplied as `no_value` is returned. + */ +#define linux_to_bsd_bits(_val, _bmap, _noval) \ + linux_to_bsd_bits_((_val), (_bmap), nitems((_bmap)), (_noval)) + +/* + * Easy mapping helpers. BITMAP_EASY_LINUX represents a single bit to be + * translated, and the FreeBSD and Linux values are supplied. BITMAP_1t1_LINUX + * is the extreme version of this, where not only is it a single bit, but the + * name of the macro used to represent the Linux version of a bit literally has + * LINUX_ prepended to the normal name. + */ +#define BITMAP_EASY_LINUX(_name, _linux_name) \ + { \ + .bsd_value = (_name), \ + .linux_value = (_linux_name), \ + } +#define BITMAP_1t1_LINUX(_name) BITMAP_EASY_LINUX(_name, LINUX_##_name) + #endif /* _LINUX_MI_H_ */ Modified: head/sys/compat/linux/linux_file.c ============================================================================== --- head/sys/compat/linux/linux_file.c Mon Jun 29 02:32:07 2020 (r362768) +++ head/sys/compat/linux/linux_file.c Mon Jun 29 03:09:14 2020 (r362769) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -68,6 +69,37 @@ __FBSDID("$FreeBSD$"); static int linux_common_open(struct thread *, int, char *, int, int); static int linux_getdents_error(struct thread *, int, int); +static struct bsd_to_linux_bitmap seal_bitmap[] = { + BITMAP_1t1_LINUX(F_SEAL_SEAL), + BITMAP_1t1_LINUX(F_SEAL_SHRINK), + BITMAP_1t1_LINUX(F_SEAL_GROW), + BITMAP_1t1_LINUX(F_SEAL_WRITE), +}; + +#define MFD_HUGETLB_ENTRY(_size) \ + { \ + .bsd_value = MFD_HUGE_##_size, \ + .linux_value = LINUX_HUGETLB_FLAG_ENCODE_##_size \ + } +static struct bsd_to_linux_bitmap mfd_bitmap[] = { + BITMAP_1t1_LINUX(MFD_CLOEXEC), + BITMAP_1t1_LINUX(MFD_ALLOW_SEALING), + BITMAP_1t1_LINUX(MFD_HUGETLB), + MFD_HUGETLB_ENTRY(64KB), + MFD_HUGETLB_ENTRY(512KB), + MFD_HUGETLB_ENTRY(1MB), + MFD_HUGETLB_ENTRY(2MB), + MFD_HUGETLB_ENTRY(8MB), + MFD_HUGETLB_ENTRY(16MB), + MFD_HUGETLB_ENTRY(32MB), + MFD_HUGETLB_ENTRY(256MB), + MFD_HUGETLB_ENTRY(512MB), + MFD_HUGETLB_ENTRY(1GB), + MFD_HUGETLB_ENTRY(2GB), + MFD_HUGETLB_ENTRY(16GB), +}; +#undef MFD_HUGETLB_ENTRY + #ifdef LINUX_LEGACY_SYSCALLS int linux_creat(struct thread *td, struct linux_creat_args *args) @@ -1371,6 +1403,21 @@ fcntl_common(struct thread *td, struct linux_fcntl_arg case LINUX_F_DUPFD_CLOEXEC: return (kern_fcntl(td, args->fd, F_DUPFD_CLOEXEC, args->arg)); + /* + * Our F_SEAL_* values match Linux one for maximum compatibility. So we + * only needed to account for different values for fcntl(2) commands. + */ + case LINUX_F_GET_SEALS: + error = kern_fcntl(td, args->fd, F_GET_SEALS, 0); + if (error != 0) + return (error); + td->td_retval[0] = bsd_to_linux_bits(td->td_retval[0], + seal_bitmap, 0); + return (0); + + case LINUX_F_ADD_SEALS: + return (kern_fcntl(td, args->fd, F_ADD_SEALS, + linux_to_bsd_bits(args->arg, seal_bitmap, 0))); default: linux_msg(td, "unsupported fcntl cmd %d\n", args->cmd); return (EINVAL); @@ -1676,3 +1723,46 @@ linux_copy_file_range(struct thread *td, struct linux_ return (error); } +#define LINUX_MEMFD_PREFIX "memfd:" + +int +linux_memfd_create(struct thread *td, struct linux_memfd_create_args *args) +{ + char memfd_name[LINUX_NAME_MAX + 1]; + int error, flags, shmflags, oflags; + + /* + * This is our clever trick to avoid the heap allocation to copy in the + * uname. We don't really need to go this far out of our way, but it + * does keep the rest of this function fairly clean as they don't have + * to worry about cleanup on the way out. + */ + error = copyinstr(args->uname_ptr, + memfd_name + sizeof(LINUX_MEMFD_PREFIX) - 1, + LINUX_NAME_MAX - sizeof(LINUX_MEMFD_PREFIX) - 1, NULL); + if (error != 0) { + if (error == ENAMETOOLONG) + error = EINVAL; + return (error); + } + + memcpy(memfd_name, LINUX_MEMFD_PREFIX, sizeof(LINUX_MEMFD_PREFIX) - 1); + flags = linux_to_bsd_bits(args->flags, mfd_bitmap, 0); + if ((flags & ~(MFD_CLOEXEC | MFD_ALLOW_SEALING | MFD_HUGETLB | + MFD_HUGE_MASK)) != 0) + return (EINVAL); + /* Size specified but no HUGETLB. */ + if ((flags & MFD_HUGE_MASK) != 0 && (flags & MFD_HUGETLB) == 0) + return (EINVAL); + /* We don't actually support HUGETLB. */ + if ((flags & MFD_HUGETLB) != 0) + return (ENOSYS); + oflags = O_RDWR; + shmflags = 0; + if ((flags & MFD_CLOEXEC) != 0) + oflags |= O_CLOEXEC; + if ((flags & MFD_ALLOW_SEALING) != 0) + shmflags |= SHM_ALLOW_SEALING; + return (kern_shm_open2(td, SHM_ANON, oflags, 0, shmflags, NULL, + memfd_name)); +} Modified: head/sys/compat/linux/linux_file.h ============================================================================== --- head/sys/compat/linux/linux_file.h Mon Jun 29 02:32:07 2020 (r362768) +++ head/sys/compat/linux/linux_file.h Mon Jun 29 03:09:14 2020 (r362769) @@ -118,6 +118,9 @@ #define LINUX_F_SETPIPE_SZ (LINUX_F_SPECIFIC_BASE + 7) #define LINUX_F_GETPIPE_SZ (LINUX_F_SPECIFIC_BASE + 8) +#define LINUX_F_ADD_SEALS (LINUX_F_SPECIFIC_BASE + 9) +#define LINUX_F_GET_SEALS (LINUX_F_SPECIFIC_BASE + 10) + #define LINUX_F_GETLKP 36 #define LINUX_F_SETLKP 37 #define LINUX_F_SETLKPW 38 @@ -145,5 +148,30 @@ #define LINUX_SYNC_FILE_RANGE_WAIT_BEFORE 1 #define LINUX_SYNC_FILE_RANGE_WRITE 2 #define LINUX_SYNC_FILE_RANGE_WAIT_AFTER 4 + +#define LINUX_F_SEAL_SEAL 0x0001 +#define LINUX_F_SEAL_SHRINK 0x0002 +#define LINUX_F_SEAL_GROW 0x0004 +#define LINUX_F_SEAL_WRITE 0x0008 + +#define LINUX_MFD_CLOEXEC 0x0001 +#define LINUX_MFD_ALLOW_SEALING 0x0002 +#define LINUX_MFD_HUGETLB 0x0004 + +#define LINUX_HUGETLB_FLAG_ENCODE_SHIFT 26 +#define LINUX_HUGETLB_FLAG_ENCODE_MASK 0x3f + +#define LINUX_HUGETLB_FLAG_ENCODE_64KB (16 << LINUX_HUGETLB_FLAG_ENCODE_SHIFT) +#define LINUX_HUGETLB_FLAG_ENCODE_512KB (19 << LINUX_HUGETLB_FLAG_ENCODE_SHIFT) +#define LINUX_HUGETLB_FLAG_ENCODE_1MB (20 << LINUX_HUGETLB_FLAG_ENCODE_SHIFT) +#define LINUX_HUGETLB_FLAG_ENCODE_2MB (21 << LINUX_HUGETLB_FLAG_ENCODE_SHIFT) +#define LINUX_HUGETLB_FLAG_ENCODE_8MB (23 << LINUX_HUGETLB_FLAG_ENCODE_SHIFT) +#define LINUX_HUGETLB_FLAG_ENCODE_16MB (24 << LINUX_HUGETLB_FLAG_ENCODE_SHIFT) +#define LINUX_HUGETLB_FLAG_ENCODE_32MB (25 << LINUX_HUGETLB_FLAG_ENCODE_SHIFT) +#define LINUX_HUGETLB_FLAG_ENCODE_256MB (28 << LINUX_HUGETLB_FLAG_ENCODE_SHIFT) +#define LINUX_HUGETLB_FLAG_ENCODE_512MB (29 << LINUX_HUGETLB_FLAG_ENCODE_SHIFT) +#define LINUX_HUGETLB_FLAG_ENCODE_1GB (30 << LINUX_HUGETLB_FLAG_ENCODE_SHIFT) +#define LINUX_HUGETLB_FLAG_ENCODE_2GB (31 << LINUX_HUGETLB_FLAG_ENCODE_SHIFT) +#define LINUX_HUGETLB_FLAG_ENCODE_16GB (34U << LINUX_HUGETLB_FLAG_ENCODE_SHIFT) #endif /* !_LINUX_FILE_H_ */ Modified: head/sys/i386/linux/linux_dummy.c ============================================================================== --- head/sys/i386/linux/linux_dummy.c Mon Jun 29 02:32:07 2020 (r362768) +++ head/sys/i386/linux/linux_dummy.c Mon Jun 29 03:09:14 2020 (r362769) @@ -129,7 +129,6 @@ DUMMY(finit_module); DUMMY(sched_setattr); DUMMY(sched_getattr); /* Linux 3.17: */ -DUMMY(memfd_create); DUMMY(seccomp); /* Linux 3.18: */ DUMMY(bpf); From owner-svn-src-all@freebsd.org Mon Jun 29 03:23:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 49C4E35C975; Mon, 29 Jun 2020 03:23:14 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wCVp1Zm7z4F4t; Mon, 29 Jun 2020 03:23:14 +0000 (UTC) (envelope-from hrs@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 F332A20FA9; Mon, 29 Jun 2020 03:23:13 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05T3NDu6056731; Mon, 29 Jun 2020 03:23:13 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T3NDIv056730; Mon, 29 Jun 2020 03:23:13 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <202006290323.05T3NDIv056730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Mon, 29 Jun 2020 03:23:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362770 - head/share/ctypedef X-SVN-Group: head X-SVN-Commit-Author: hrs X-SVN-Commit-Paths: head/share/ctypedef X-SVN-Commit-Revision: 362770 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 03:23:14 -0000 Author: hrs Date: Mon Jun 29 03:23:13 2020 New Revision: 362770 URL: https://svnweb.freebsd.org/changeset/base/362770 Log: Fix CTYPE for ja_JP.eucJP and ja_JP.SJIS. PR: 163168 MFC after: 3 days Modified: head/share/ctypedef/ja_JP.eucJP.src Modified: head/share/ctypedef/ja_JP.eucJP.src ============================================================================== --- head/share/ctypedef/ja_JP.eucJP.src Mon Jun 29 03:09:14 2020 (r362769) +++ head/share/ctypedef/ja_JP.eucJP.src Mon Jun 29 03:23:13 2020 (r362770) @@ -49,7 +49,6 @@ upper ;/ ;/ ;/ ;/ - ;/ ;/ ;/ ;/ @@ -73,7 +72,6 @@ upper ;/ ;/ ;/ ;/ - ;/ ;/ ;/ ;/ @@ -85,7 +83,6 @@ upper ;/ ;/ ;/ ;/ - ;/ ;/ ;/ ;/ @@ -101,7 +98,6 @@ upper ;/ ;/ ;/ ;/ - ;/ ;/ ;/ ;/ @@ -126,45 +122,6 @@ upper ;/ ;/ ;/ ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ ;/ ;/ ;/ @@ -173,293 +130,86 @@ upper ;/ ;/ ;/ ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ ;/ ;/ ;/ @@ -557,19 +307,16 @@ lower ;/ ;/ ;/ ;/ - ;/ ;/ ;/ ;/ ;/ ;/ ;/ - ;/ ;/ ;/ ;/ ;/ - ;/ ;/ ;/ ;/ @@ -587,7 +334,6 @@ lower ;/ ;/ ;/ ;/ - ;/ ;/ ;/ ;/ @@ -611,37 +357,6 @@ lower ;/ ;/ ;/ ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ ;/ ;/ ;/ @@ -650,667 +365,89 @@ lower ;/ ;/ ;/ ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Jun 29 05:03:06 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C6BE135E760; Mon, 29 Jun 2020 05:03:06 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wFk24PNhz4KMj; Mon, 29 Jun 2020 05:03:06 +0000 (UTC) (envelope-from gonzo@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 6166C223A0; Mon, 29 Jun 2020 05:03:06 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05T536pQ018396; Mon, 29 Jun 2020 05:03:06 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T5331q018378; Mon, 29 Jun 2020 05:03:03 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <202006290503.05T5331q018378@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 29 Jun 2020 05:03:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362771 - in stable/11/usr.bin/mkimg: . tests X-SVN-Group: stable-11 X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: in stable/11/usr.bin/mkimg: . tests X-SVN-Commit-Revision: 362771 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 05:03:06 -0000 Author: gonzo Date: Mon Jun 29 05:03:03 2020 New Revision: 362771 URL: https://svnweb.freebsd.org/changeset/base/362771 Log: MFC r361935: Add VHDX support to mkimg(1) VHDX is the successor of Microsoft's VHD file format. It increases maximum capacity of the virtual drive to 64TB and introduces features to better handle power/system failures. VHDX is the required format for 2nd generation Hyper-V VMs. Reviewed by: marcel Differential Revision: https://reviews.freebsd.org/D25184 Added: stable/11/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdx.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdx.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdx.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdx.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdx.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-apm.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-1x1-512-apm.vhdx.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdx.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdx.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdx.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdx.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-apm.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-63x255-4096-apm.vhdx.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhdx.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhdx.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdx.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhdx.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhdx.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-apm.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-63x255-512-apm.vhdx.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-bsd.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-63x255-512-bsd.vhdx.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-ebr.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-63x255-512-ebr.vhdx.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdx.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-mbr.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-63x255-512-mbr.vhdx.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhdx.hex - copied unchanged from r361935, head/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhdx.hex stable/11/usr.bin/mkimg/vhdx.c - copied, changed from r361935, head/usr.bin/mkimg/vhdx.c Modified: stable/11/usr.bin/mkimg/Makefile stable/11/usr.bin/mkimg/mkimg.1 stable/11/usr.bin/mkimg/tests/mkimg_test.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/mkimg/Makefile ============================================================================== --- stable/11/usr.bin/mkimg/Makefile Mon Jun 29 03:23:13 2020 (r362770) +++ stable/11/usr.bin/mkimg/Makefile Mon Jun 29 05:03:03 2020 (r362771) @@ -18,6 +18,7 @@ SRCS+= \ qcow.c \ raw.c \ vhd.c \ + vhdx.c \ vmdk.c # List of schemes to support Modified: stable/11/usr.bin/mkimg/mkimg.1 ============================================================================== --- stable/11/usr.bin/mkimg/mkimg.1 Mon Jun 29 03:23:13 2020 (r362770) +++ stable/11/usr.bin/mkimg/mkimg.1 Mon Jun 29 05:03:03 2020 (r362771) @@ -257,6 +257,16 @@ To create a fixed VHD file for use by Azure, specify .Fl f Ar vhdf on the command line. The preferred file extension is ".vhd". +.Ss Dynamic VHDX +Microsoft's "Virtual Hard Disk v2" file formats, the +successor to VHD. +VHDX is the required format for the 2nd generation Hyper-V VMs. +To have +.Nm +create a dynamic VHDX file, specify +.Fl f Ar vhdx +on the command line. +The preferred file extension is ".vhdx". .Ss VMDK VMware's "Virtual Machine Disk" file format. It's a sparse file format akin to QCOW and VHD and supported by many Copied: stable/11/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdx.hex (from r361935, head/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdx.hex Mon Jun 29 05:03:03 2020 (r362771, copy of r361935, head/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdx.hex) @@ -0,0 +1,79 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00210020 00 02 00 00 00 10 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400000 45 52 02 00 00 00 80 00 00 00 00 00 00 00 00 00 |ER..............| +00400010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400200 50 4d 00 00 00 00 00 03 00 00 00 01 00 00 00 03 |PM..............| +00400210 41 70 70 6c 65 00 00 00 00 00 00 00 00 00 00 00 |Apple...........| +00400220 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00400230 41 70 70 6c 65 5f 70 61 72 74 69 74 69 6f 6e 5f |Apple_partition_| +00400240 6d 61 70 00 00 00 00 00 00 00 00 00 00 00 00 00 |map.............| +00400250 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400400 50 4d 00 00 00 00 00 03 00 00 00 08 00 00 20 00 |PM............ .| +00400410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400430 46 72 65 65 42 53 44 2d 55 46 53 00 00 00 00 00 |FreeBSD-UFS.....| +00400440 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400600 50 4d 00 00 00 00 00 03 00 00 20 08 00 00 01 00 |PM........ .....| +00400610 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400630 46 72 65 65 42 53 44 2d 73 77 61 70 00 00 00 00 |FreeBSD-swap....| +00400640 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00401000 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00801000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/11/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdx.hex (from r361935, head/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdx.hex Mon Jun 29 05:03:03 2020 (r362771, copy of r361935, head/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdx.hex) @@ -0,0 +1,75 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00210020 00 02 00 00 00 10 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00400200 57 45 56 82 00 00 00 00 00 00 00 00 00 00 00 00 |WEV.............| +00400210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00400220 00 00 00 00 00 00 00 00 00 02 00 00 01 00 00 00 |................| +00400230 01 00 00 00 00 80 00 00 01 00 00 00 00 80 00 00 |................| +00400240 00 00 00 00 00 00 00 00 10 0e 00 00 00 00 00 00 |................| +00400250 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400280 00 00 00 00 57 45 56 82 1f ad 08 00 00 20 00 00 |....WEV...... ..| +00400290 00 00 00 00 00 20 00 00 10 00 00 00 00 00 00 00 |..... ..........| +004002a0 07 00 00 00 00 01 00 00 10 20 00 00 00 00 00 00 |......... ......| +004002b0 01 00 00 00 00 80 00 00 00 00 00 00 00 00 00 00 |................| +004002c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400310 00 00 00 00 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |....B.B.B.B.B.B.| +00400320 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00402000 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00802000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/11/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdx.hex (from r361935, head/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdx.hex Mon Jun 29 05:03:03 2020 (r362771, copy of r361935, head/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdx.hex) @@ -0,0 +1,80 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00210020 00 02 00 00 00 10 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +004001b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff |................| +004001c0 ff ff a5 ff ff ff 01 00 00 00 10 21 00 00 00 00 |...........!....| +004001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +004001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00400200 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00400400 57 45 56 82 00 00 00 00 00 00 00 00 00 00 00 00 |WEV.............| +00400410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00400420 00 00 00 00 00 00 00 00 00 02 00 00 01 00 00 00 |................| +00400430 01 00 00 00 10 21 00 00 01 00 00 00 10 21 00 00 |.....!.......!..| +00400440 00 00 00 00 00 00 00 00 10 0e 00 00 00 00 00 00 |................| +00400450 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400480 00 00 00 00 57 45 56 82 0f 0c 08 00 00 20 00 00 |....WEV...... ..| +00400490 00 00 00 00 00 20 00 00 10 00 00 00 00 00 00 00 |..... ..........| +004004a0 07 00 00 00 00 01 00 00 10 20 00 00 00 00 00 00 |......... ......| +004004b0 01 00 00 00 10 21 00 00 00 00 00 00 00 00 00 00 |.....!..........| +004004c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400510 00 00 00 00 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |....B.B.B.B.B.B.| +00400520 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00402200 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00802200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/11/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.hex (from r361935, head/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.hex Mon Jun 29 05:03:03 2020 (r362771, copy of r361935, head/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.hex) @@ -0,0 +1,100 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 |................| +00210020 00 02 00 00 00 10 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +004001b0 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 00 00 |B.B.B.B.B.B.B...| +004001c0 02 00 ee ff ff ff 01 00 00 00 ff 7f 00 00 00 00 |................| +004001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +004001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00400200 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 |EFI PART....\...| +00400210 74 bd 80 b6 00 00 00 00 01 00 00 00 00 00 00 00 |t...............| +00400220 ff 7f 00 00 00 00 00 00 03 00 00 00 00 00 00 00 |................| +00400230 fd 7f 00 00 00 00 00 00 03 03 03 03 03 03 03 03 |................| +00400240 03 03 03 03 03 03 03 03 02 00 00 00 00 00 00 00 |................| +00400250 04 00 00 00 80 00 00 00 b2 50 1a c4 00 00 00 00 |.........P......| +00400260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400400 b6 7c 6e 51 cf 6e d6 11 8f f8 00 02 2d 09 71 2b |.|nQ.n......-.q+| +00400410 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00400420 08 00 00 00 00 00 00 00 07 20 00 00 00 00 00 00 |......... ......| +00400430 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400480 b5 7c 6e 51 cf 6e d6 11 8f f8 00 02 2d 09 71 2b |.|nQ.n......-.q+| +00400490 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 |................| +004004a0 08 20 00 00 00 00 00 00 07 21 00 00 00 00 00 00 |. .......!......| +004004b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00401000 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00801000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +013ffc00 b6 7c 6e 51 cf 6e d6 11 8f f8 00 02 2d 09 71 2b |.|nQ.n......-.q+| +013ffc10 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +013ffc20 08 00 00 00 00 00 00 00 07 20 00 00 00 00 00 00 |......... ......| +013ffc30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +013ffc80 b5 7c 6e 51 cf 6e d6 11 8f f8 00 02 2d 09 71 2b |.|nQ.n......-.q+| +013ffc90 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 |................| +013ffca0 08 20 00 00 00 00 00 00 07 21 00 00 00 00 00 00 |. .......!......| +013ffcb0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +013ffe00 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 |EFI PART....\...| +013ffe10 87 87 ed 30 00 00 00 00 ff 7f 00 00 00 00 00 00 |...0............| +013ffe20 01 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 |................| +013ffe30 fd 7f 00 00 00 00 00 00 03 03 03 03 03 03 03 03 |................| +013ffe40 03 03 03 03 03 03 03 03 fe 7f 00 00 00 00 00 00 |................| +013ffe50 04 00 00 00 80 00 00 00 b2 50 1a c4 00 00 00 00 |.........P......| +013ffe60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/11/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdx.hex (from r361935, head/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdx.hex Mon Jun 29 05:03:03 2020 (r362771, copy of r361935, head/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdx.hex) @@ -0,0 +1,82 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00210020 00 02 00 00 00 10 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +004001b0 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 80 ff |B.B.B.B.B.B.B...| +004001c0 ff ff a5 ff ff ff 01 00 00 00 10 21 00 00 00 00 |...........!....| +004001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +004001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00400200 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00400400 57 45 56 82 00 00 00 00 00 00 00 00 00 00 00 00 |WEV.............| +00400410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00400420 00 00 00 00 00 00 00 00 00 02 00 00 01 00 00 00 |................| +00400430 01 00 00 00 10 21 00 00 01 00 00 00 10 21 00 00 |.....!.......!..| +00400440 00 00 00 00 00 00 00 00 10 0e 00 00 00 00 00 00 |................| +00400450 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400480 00 00 00 00 57 45 56 82 0f 0c 08 00 00 20 00 00 |....WEV...... ..| +00400490 00 00 00 00 00 20 00 00 10 00 00 00 00 00 00 00 |..... ..........| +004004a0 07 00 00 00 00 01 00 00 10 20 00 00 00 00 00 00 |......... ......| +004004b0 01 00 00 00 10 21 00 00 00 00 00 00 00 00 00 00 |.....!..........| +004004c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400510 00 00 00 00 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |....B.B.B.B.B.B.| +00400520 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00402200 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00802200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/11/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdx.hex (from r361935, head/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdx.hex Mon Jun 29 05:03:03 2020 (r362771, copy of r361935, head/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdx.hex) @@ -0,0 +1,72 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00210020 00 02 00 00 00 10 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400000 46 72 65 65 42 53 44 31 36 4d 00 00 00 00 00 00 |FreeBSD16M......| +00400010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400080 00 00 00 01 00 00 00 00 00 00 00 00 00 08 09 02 |................| +00400090 00 00 09 01 00 00 00 00 00 00 00 00 00 00 00 00 |................| +004000a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +004000b0 00 00 00 00 00 00 00 00 00 00 00 00 60 0d de ee |............`...| +004000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +004001a0 00 00 00 00 0e 10 80 00 00 00 00 00 00 00 00 00 |................| +004001b0 80 00 00 00 00 01 00 01 00 00 00 00 00 00 00 01 |................| +004001c0 00 00 20 00 00 00 20 01 00 00 01 00 00 00 00 00 |.. ... .........| +004001d0 00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +004001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +004001f0 00 00 00 00 00 00 00 00 00 00 00 00 da be f8 7f |................| +00400200 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00800200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/11/usr.bin/mkimg/tests/img-1x1-512-apm.vhdx.hex (from r361935, head/usr.bin/mkimg/tests/img-1x1-512-apm.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/usr.bin/mkimg/tests/img-1x1-512-apm.vhdx.hex Mon Jun 29 05:03:03 2020 (r362771, copy of r361935, head/usr.bin/mkimg/tests/img-1x1-512-apm.vhdx.hex) @@ -0,0 +1,79 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00210020 00 02 00 00 00 02 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400000 45 52 02 00 00 00 80 00 00 00 00 00 00 00 00 00 |ER..............| +00400010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400200 50 4d 00 00 00 00 00 03 00 00 00 01 00 00 00 03 |PM..............| +00400210 41 70 70 6c 65 00 00 00 00 00 00 00 00 00 00 00 |Apple...........| +00400220 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00400230 41 70 70 6c 65 5f 70 61 72 74 69 74 69 6f 6e 5f |Apple_partition_| +00400240 6d 61 70 00 00 00 00 00 00 00 00 00 00 00 00 00 |map.............| +00400250 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400400 50 4d 00 00 00 00 00 03 00 00 00 04 00 00 20 00 |PM............ .| +00400410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400430 46 72 65 65 42 53 44 2d 55 46 53 00 00 00 00 00 |FreeBSD-UFS.....| +00400440 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400600 50 4d 00 00 00 00 00 03 00 00 20 04 00 00 01 00 |PM........ .....| +00400610 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400630 46 72 65 65 42 53 44 2d 73 77 61 70 00 00 00 00 |FreeBSD-swap....| +00400640 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400800 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00800800 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/11/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdx.hex (from r361935, head/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdx.hex Mon Jun 29 05:03:03 2020 (r362771, copy of r361935, head/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdx.hex) @@ -0,0 +1,75 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00210020 00 02 00 00 00 02 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00400200 57 45 56 82 00 00 00 00 00 00 00 00 00 00 00 00 |WEV.............| +00400210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00400220 00 00 00 00 00 00 00 00 00 02 00 00 01 00 00 00 |................| +00400230 01 00 00 00 00 80 00 00 01 00 00 00 00 80 00 00 |................| +00400240 00 00 00 00 00 00 00 00 10 0e 00 00 00 00 00 00 |................| +00400250 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400280 00 00 00 00 57 45 56 82 1f ad 08 00 00 20 00 00 |....WEV...... ..| +00400290 00 00 00 00 00 20 00 00 10 00 00 00 00 00 00 00 |..... ..........| +004002a0 07 00 00 00 00 01 00 00 10 20 00 00 00 00 00 00 |......... ......| +004002b0 01 00 00 00 00 80 00 00 00 00 00 00 00 00 00 00 |................| +004002c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400310 00 00 00 00 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |....B.B.B.B.B.B.| +00400320 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00402000 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00802000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/11/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdx.hex (from r361935, head/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdx.hex Mon Jun 29 05:03:03 2020 (r362771, copy of r361935, head/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdx.hex) @@ -0,0 +1,80 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00210020 00 02 00 00 00 02 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +004001b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff |................| +004001c0 ff ff a5 ff ff ff 01 00 00 00 10 21 00 00 00 00 |...........!....| +004001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +004001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00400200 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00400400 57 45 56 82 00 00 00 00 00 00 00 00 00 00 00 00 |WEV.............| +00400410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00400420 00 00 00 00 00 00 00 00 00 02 00 00 01 00 00 00 |................| +00400430 01 00 00 00 10 21 00 00 01 00 00 00 10 21 00 00 |.....!.......!..| +00400440 00 00 00 00 00 00 00 00 10 0e 00 00 00 00 00 00 |................| +00400450 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400480 00 00 00 00 57 45 56 82 0f 0c 08 00 00 20 00 00 |....WEV...... ..| +00400490 00 00 00 00 00 20 00 00 10 00 00 00 00 00 00 00 |..... ..........| +004004a0 07 00 00 00 00 01 00 00 10 20 00 00 00 00 00 00 |......... ......| +004004b0 01 00 00 00 10 21 00 00 00 00 00 00 00 00 00 00 |.....!..........| +004004c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400510 00 00 00 00 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |....B.B.B.B.B.B.| +00400520 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00402200 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00802200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/11/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.hex (from r361935, head/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.hex Mon Jun 29 05:03:03 2020 (r362771, copy of r361935, head/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.hex) @@ -0,0 +1,100 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 |................| +00210020 00 02 00 00 00 02 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +004001b0 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 00 00 |B.B.B.B.B.B.B...| +004001c0 02 00 ee ff ff ff 01 00 00 00 ff 7f 00 00 00 00 |................| +004001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +004001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00400200 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 |EFI PART....\...| +00400210 71 3e 06 15 00 00 00 00 01 00 00 00 00 00 00 00 |q>..............| +00400220 ff 7f 00 00 00 00 00 00 03 00 00 00 00 00 00 00 |................| +00400230 fd 7f 00 00 00 00 00 00 03 03 03 03 03 03 03 03 |................| +00400240 03 03 03 03 03 03 03 03 02 00 00 00 00 00 00 00 |................| +00400250 04 00 00 00 80 00 00 00 45 45 ea fb 00 00 00 00 |........EE......| +00400260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400400 b6 7c 6e 51 cf 6e d6 11 8f f8 00 02 2d 09 71 2b |.|nQ.n......-.q+| +00400410 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00400420 03 00 00 00 00 00 00 00 02 20 00 00 00 00 00 00 |......... ......| +00400430 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400480 b5 7c 6e 51 cf 6e d6 11 8f f8 00 02 2d 09 71 2b |.|nQ.n......-.q+| +00400490 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 |................| +004004a0 03 20 00 00 00 00 00 00 02 21 00 00 00 00 00 00 |. .......!......| +004004b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400600 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00800600 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +013ffc00 b6 7c 6e 51 cf 6e d6 11 8f f8 00 02 2d 09 71 2b |.|nQ.n......-.q+| +013ffc10 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +013ffc20 03 00 00 00 00 00 00 00 02 20 00 00 00 00 00 00 |......... ......| +013ffc30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +013ffc80 b5 7c 6e 51 cf 6e d6 11 8f f8 00 02 2d 09 71 2b |.|nQ.n......-.q+| +013ffc90 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 |................| +013ffca0 03 20 00 00 00 00 00 00 02 21 00 00 00 00 00 00 |. .......!......| +013ffcb0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +013ffe00 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 |EFI PART....\...| +013ffe10 82 04 6b 93 00 00 00 00 ff 7f 00 00 00 00 00 00 |..k.............| +013ffe20 01 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 |................| +013ffe30 fd 7f 00 00 00 00 00 00 03 03 03 03 03 03 03 03 |................| +013ffe40 03 03 03 03 03 03 03 03 fe 7f 00 00 00 00 00 00 |................| +013ffe50 04 00 00 00 80 00 00 00 45 45 ea fb 00 00 00 00 |........EE......| +013ffe60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/11/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdx.hex (from r361935, head/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdx.hex Mon Jun 29 05:03:03 2020 (r362771, copy of r361935, head/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdx.hex) @@ -0,0 +1,82 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00210020 00 02 00 00 00 02 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +004001b0 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 80 ff |B.B.B.B.B.B.B...| +004001c0 ff ff a5 ff ff ff 01 00 00 00 10 21 00 00 00 00 |...........!....| +004001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +004001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00400200 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00400400 57 45 56 82 00 00 00 00 00 00 00 00 00 00 00 00 |WEV.............| +00400410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00400420 00 00 00 00 00 00 00 00 00 02 00 00 01 00 00 00 |................| +00400430 01 00 00 00 10 21 00 00 01 00 00 00 10 21 00 00 |.....!.......!..| +00400440 00 00 00 00 00 00 00 00 10 0e 00 00 00 00 00 00 |................| +00400450 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400480 00 00 00 00 57 45 56 82 0f 0c 08 00 00 20 00 00 |....WEV...... ..| +00400490 00 00 00 00 00 20 00 00 10 00 00 00 00 00 00 00 |..... ..........| +004004a0 07 00 00 00 00 01 00 00 10 20 00 00 00 00 00 00 |......... ......| +004004b0 01 00 00 00 10 21 00 00 00 00 00 00 00 00 00 00 |.....!..........| +004004c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400510 00 00 00 00 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |....B.B.B.B.B.B.| +00400520 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00402200 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00802200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/11/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdx.hex (from r361935, head/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdx.hex Mon Jun 29 05:03:03 2020 (r362771, copy of r361935, head/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdx.hex) @@ -0,0 +1,72 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Jun 29 05:39:05 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2269D35F445; Mon, 29 Jun 2020 05:39:05 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: from mail-yb1-f171.google.com (mail-yb1-f171.google.com [209.85.219.171]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wGWX5kHWz4MK0; Mon, 29 Jun 2020 05:39:04 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: by mail-yb1-f171.google.com with SMTP id d13so7824867ybk.8; Sun, 28 Jun 2020 22:39:04 -0700 (PDT) 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=sBGTT3NMd2yzK4vuw+s1/nPGwbZuzqvXFxEL/MEdL6s=; b=PsSHVNjxWp78oQvXJTOj2WLa8Na8USfJI8UTMJyW7+5vQ1vGtGwKQ9UXGPoFmqIQt+ XBEkRNwQSt8YJKHAZL+gqK+Scz0+e+gmwHK36IAz1prPYbL2SgL2r1E6Fvr5LYdp87AO 0KtfQaItF3zV3fslVqQ41vHPOk3fJ1Ygdd62ILIxmTviaMASapGfAHIDef2VdITqIvMc vlbXpPp4RTK1HfeK13UsaN55AIPpJYw3HELq8HiaTlD/W68629haOhJw/qLTC6/533RS BExQ6J09aAFDG4nYqJvORdraN+bM3Al8tLF8aQtfcm7yEzUw4uo6EFH5iryIJD1A+3nd d30A== X-Gm-Message-State: AOAM532c18k52dJ6n0RxAjwYVPuVrunV+LUVNWbViuj3G7MQMYRly3SX nqOxMiGxc7Vq0DNvfMduwa79BqTn4Z/e50V8TmR25QL1 X-Google-Smtp-Source: ABdhPJw2OwsG8GirGTCygjv4Z4oHpXFhM0PgmsoaDnedN1tymh/UYu5dRgYbFTNobw3Oa9+LB9TpzyGS0peEBQP/54c= X-Received: by 2002:a25:69d1:: with SMTP id e200mr23426115ybc.127.1593409143616; Sun, 28 Jun 2020 22:39:03 -0700 (PDT) MIME-Version: 1.0 References: <202006290034.05T0YBU7051105@repo.freebsd.org> In-Reply-To: <202006290034.05T0YBU7051105@repo.freebsd.org> From: Li-Wen Hsu Date: Mon, 29 Jun 2020 13:38:52 +0800 Message-ID: Subject: Re: svn commit: r362767 - in stable/12/usr.bin/mkimg: . tests To: Oleksandr Tymoshenko Cc: src-committers , svn-src-all , svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 49wGWX5kHWz4MK0 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 05:39:05 -0000 On Mon, Jun 29, 2020 at 8:36 AM Oleksandr Tymoshenko wrote: > > Author: gonzo > Date: Mon Jun 29 00:34:11 2020 > New Revision: 362767 > URL: https://svnweb.freebsd.org/changeset/base/362767 > > Log: > MFC r361935: > > Add VHDX support to mkimg(1) > > VHDX is the successor of Microsoft's VHD file format. It increases > maximum capacity of the virtual drive to 64TB and introduces features > to better handle power/system failures. > > VHDX is the required format for 2nd generation Hyper-V VMs. > > Reviewed by: marcel > Differential Revision: https://reviews.freebsd.org/D25184 Some mkimg(1) tests are failing after this merge: https://ci.freebsd.org/job/FreeBSD-stable-12-amd64-test/2484/ https://ci.freebsd.org/job/FreeBSD-stable-12-i386-test/2466/ Can you check if there are something related to tests also need merging? Thanks! Li-Wen From owner-svn-src-all@freebsd.org Mon Jun 29 06:19:44 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 761F635FDA9; Mon, 29 Jun 2020 06:19:44 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wHQS2mcwz4Nj5; Mon, 29 Jun 2020 06:19:44 +0000 (UTC) (envelope-from gonzo@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 416672301B; Mon, 29 Jun 2020 06:19:44 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05T6Ji9T062136; Mon, 29 Jun 2020 06:19:44 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T6Jdhs062110; Mon, 29 Jun 2020 06:19:39 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <202006290619.05T6Jdhs062110@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 29 Jun 2020 06:19:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362772 - stable/12/usr.bin/mkimg/tests X-SVN-Group: stable-12 X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: stable/12/usr.bin/mkimg/tests X-SVN-Commit-Revision: 362772 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 06:19:44 -0000 Author: gonzo Date: Mon Jun 29 06:19:39 2020 New Revision: 362772 URL: https://svnweb.freebsd.org/changeset/base/362772 Log: Fix test breakage after r362767 tests in stable/12 use different format for the reference images: .gz.uu instead of .hex Reported by: Li-Wen Hsu Added: stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdx.gz.uu (contents, props changed) stable/12/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdx.gz.uu (contents, props changed) stable/12/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdx.gz.uu (contents, props changed) stable/12/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.gz.uu (contents, props changed) stable/12/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdx.gz.uu (contents, props changed) stable/12/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdx.gz.uu (contents, props changed) stable/12/usr.bin/mkimg/tests/img-1x1-512-apm.vhdx.gz.uu (contents, props changed) stable/12/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdx.gz.uu (contents, props changed) stable/12/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdx.gz.uu (contents, props changed) stable/12/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.gz.uu (contents, props changed) stable/12/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdx.gz.uu (contents, props changed) stable/12/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdx.gz.uu (contents, props changed) stable/12/usr.bin/mkimg/tests/img-63x255-4096-apm.vhdx.gz.uu (contents, props changed) stable/12/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhdx.gz.uu (contents, props changed) stable/12/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhdx.gz.uu (contents, props changed) stable/12/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdx.gz.uu (contents, props changed) stable/12/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhdx.gz.uu (contents, props changed) stable/12/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhdx.gz.uu (contents, props changed) stable/12/usr.bin/mkimg/tests/img-63x255-512-apm.vhdx.gz.uu (contents, props changed) stable/12/usr.bin/mkimg/tests/img-63x255-512-bsd.vhdx.gz.uu (contents, props changed) stable/12/usr.bin/mkimg/tests/img-63x255-512-ebr.vhdx.gz.uu (contents, props changed) stable/12/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdx.gz.uu (contents, props changed) stable/12/usr.bin/mkimg/tests/img-63x255-512-mbr.vhdx.gz.uu (contents, props changed) stable/12/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhdx.gz.uu (contents, props changed) Deleted: stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-apm.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-apm.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-apm.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-bsd.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-ebr.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-mbr.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhdx.hex Added: stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdx.gz.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdx.gz.uu Mon Jun 29 06:19:39 2020 (r362772) @@ -0,0 +1,25 @@ +# $FreeBSD$ +begin 644 img-1x1-4096-apm.vhdx.gz +M'XL("&N%^5X``VEM9RTQ>#$M-#`Y-BUA<&TN=FAD>`"U5]MNU$@4?,]7E`1/ +M*W%P7VT+:079D*RX2%P$/"U1^P;1+I`-$>%A/IYSVG;&$X_##&H\+W#JR^?6R^=V?_M303&6WW+4, +M1S>.U<$?!Q$M\A-R#EX)11Y-A"G?@,_N[Y/K>]04T"U +M$V`/YY+RTW/]E('-T37H%#8HS_6CDQO\=&K]=%K]=&K]S/!\Z*A?+D^&K=$X +MF!;*,J!>`KQH/YP]HS\W^9E!/X^@D=5N5P]S]8P,2`'(<]0:NH$VZ+S<8C50-C$_ +M"JY%64F$;$!6,%QW1??N$!U20^^)GES#K;TU^['+MK)+ZZU-ZZU-ZZU-ZZU- +MZZU-ZZU-[*T>]C7?B+>Y';<.-5R/"&X.^*F]#$VX#%-^.N6^UL.)MR:7V`6% +M.L!X=)P3KLT-1\6@\C#L3X;`OUJT_%?.T"K_0.3IK^=$ANB(_AWAS,TB6DS9 +MV7W9B;?:2C""@^Z@*M2-=`F6$U'IF),&58NF@.&T6$DW5G-LN6,I#=H.M4%6HHU`=0[KK^'N/![0 +MCD>XG.'41+MI:G^!72%P+$X'JU!P[CJ$4MAP*4`5XN:KQ=Q0B.6\$"X(`O>( +MOD@9.!%KZ72$*\6*J;-V)W988!=X4@0I$(QXRC9RO'(E9Y0U:E:ME,KD-!PG +MT\%%[<33H_^/!.K52WH[PE5]4/9E=W>!79VT"`S-X_J_:@E0_12PAXM%0&T? +MRQ.+<&.!GVPTZI>6V\.9E.J9H83V)MK]`!_.^)G4KP9VX,?//$=U*F'Q,\#' +MK^;ZV=_`3\LTUSXNZ3?O,TOIXXG5B^=;^6GAQS6%ZQ6/_@5M%WZ/SL_7KVD3 +M.)UJN3VY%=J?GX>+R[/+LR^?3$@#<]!8C/YLZ>S;:X[HQ4>>[\X)S, +M\?<9X/%%VQZ^/KKWYOCU5#]K$_/S.^BG)_KU#\E4/TSY^=3Z^5OURXVTT?-L +LKO7[>M4'<>276#^5#?IE86+U@C8_/6`Q`*9BJ/KJ?/`#FKW9[6(2```` +` +end Added: stable/12/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdx.gz.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdx.gz.uu Mon Jun 29 06:19:39 2020 (r362772) @@ -0,0 +1,24 @@ +# $FreeBSD$ +begin 644 img-1x1-4096-bsd.vhdx.gz +M'XL("&N%^5X``VEM9RTQ>#$M-#`Y-BUB`"UEUMOTT`0A=_[*XY$ +MGY`8O!?;:R$A*"U%7"3@H7V":GUK*VX"JL)#?CPSMA/;<9PFU>)85I2U/YV= +M1I_>AT39\.73\=MGXZ=/U,]W[HIGZIO!FV0!G# +M5%"6@7H.^*NZO'Y+3\?Z3%>_!%XC+>!R9)'8D7G8',@=Z@IQBKB6A$VOV4Q=M5!?66QO66QO66QO66QO6 +M6QO66QO86]VM:TDIWJ9VN72H[ON2$$^!WZH;7_H;/]2G0ZYK+4Z\-:G$SBL4 +M'B9!S3GAWEQR5`SR!(;]B>#Y5XN*;^4,+=)+HH1>O",R1,?T98DSZTW4#=79 +M?=6)M]I*,'P,74/E*$K9)5A.1*Z;G)3(*Y0.AM-B)=U8'![18Z+;5T2?B)[T +MN,9;-ZNAL]$#;<"Y+Y9?+68ZYU8SA/AAB"XY_1# +MVL"I6$L72UPF5@R=M3NIPXPZSX-2$`=OQ%.VD>.5*KDB*U!PU3+I3+%&S,F, +M$3>U$T^/?QX+ZN,'.EOB\C8H^ZH[G%%7!&T"W>:QOU?-`=6=P!;7-`&U^9P? +MF,4M&_Q@H5'WFFZ+,R&K9[H6VIIH]P,^F^@SH?\:V$X?]ZC(;[C.#RR.:/Q9 +M`;4`>86V3>J=WE7A^MSC3=+?HPG:[TY2@=WZ\& +MN.D.<#Q=C''Y5F_W3E[0OBQ;T?4W8\=A1/(=TVO\P.+ +7]S3^M$#7`4-54+6][^`?;CD(/L`1```` +` +end Added: stable/12/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdx.gz.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdx.gz.uu Mon Jun 29 06:19:39 2020 (r362772) @@ -0,0 +1,25 @@ +# $FreeBSD$ +begin 644 img-1x1-4096-ebr.vhdx.gz +M'XL("&N%^5X``VEM9RTQ>#$M-#`Y-BUE8G(N=FAD>`"UETEOU$`0A>_Y%2]* +M3D@4[L6;D!"$A"`6"9!(3A"UMR1B$Q`%#O/CJ?(RML?CR4S4>%J.E79_>EVO +MNKH=!,T%Q!&B!)%%S'=^3A'EB$*`.]2VFNQU\!4L&'4/(Y6 +MKL7>@[V:5NL3<2$B)1*Y%1F"$+'9!+PJ75$0_1[I4_]!G^W'J7Z$&@+55L`& +M%WK5IZ?Q4P8V1E6@4AA)GL:/3E?T:=_QTW[CIWW'S[3K0]?QBV5EV!Q%"%-" +M60;J.>"O\O+Z#3T9ZS-M_"(XC3A'DB$-Q([4P69`EJ`J$<8(*\GPH$+"SI6U +M/FZG])KH_()IWSN<7LY*STUW??0PC9Z1!BD`<8Q<0Q?0!E4D0ZP&TJ+.'X6P +M1)I)"EF'(&%<]8<>'A`=44&?B5XM<;VW9C=UP5IU?KVU?KVU?KVU?KVU?KVU +M?KVUGKW5[;X6%>)M;+NM0[7/'2&<`K^5-ZYP-VZH3_O&MB23NGD#N8 +M"!7G"=?F@E/%((M@V)\`CO]K4?*KG$.+^)(HHN=OB0S1,7WI<&:UB"9#=797 +M=>*MMI(8+H2NH#+DA9P2+&=$INL\*9"5*!(8SA8KV8W%X1$](KI]2?2)Z'&/ +MJ[U-YM1%NZJ+N--E4%H"QR+*2#1Q.EL^L:0&987<($A1UJ`\AHV6N(.3EO:B +MP\6,4X/8#;/V'NH2P7%P*EB%A/.N@DM%#9<"9*[>?+68ZQ*QG"?"!4%PS^B' +ME(%3L98N.EPJ5@R=M5NIPXPZQYT2D`3.B*=L(Z=7K.2.-$?.44NE,H4:(6=F +MB+".G7AZ_/-84!_>TUF'RYI$V57=X8RZW&L1:`^/_;MJ#JCN!#:XN@BH]6V^ +M8Q;7%?C!1J/N-=T&9WQ&S[0EM#'1[@9\.M%G?'\:R':;[0RLJIGX"4ZRCU_@ +MQE6O>>#6)$=OC]Z0+/M#7.%[NM5NP#"4S6,5^+'3IV445_C`K;G/=RR.:/Q; +MZK,"Y/.-K6M&HK>=\/G)V3H[K,<=5W#Z+MQ2L-H&9P*L?K`L,V.^8]&G2?.W +MP]E-ZJ0HE#M-UNMI2H#)RKBASW*6#?)^5]=CX-)?]/K2J0P]FNX&?9A.5W:U +M(!Z_KP:XZ?EY/%V,<=E&;S>KVY^J\[JKR5%Y=65LN7(%,EZY#4[[+02ZKBR< +@@?S6]#[?L7A'XU\#3%J@KPBJ^KLOV/L'RM>ZCOX2```` +` +end Added: stable/12/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.gz.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.gz.uu Mon Jun 29 06:19:39 2020 (r362772) @@ -0,0 +1,29 @@ +# $FreeBSD$ +begin 644 img-1x1-4096-gpt.vhdx.gz +M'XL("&N%^5X``VEM9RTQ>#$M-#`Y-BUG<'0N=FAD>`"UF%MOVS88AN_S*]ZA +MO=I05CQ*PH!AS=)FAPY(BQUNVA64*+;%M@S=@FX7_O']/DJ*+5OTXH)U",$) +MS0,+J!U<`V=0TY/>MW`]G`5H14 +M'B?V7INSS\\2+>EC<19.LD1:H4-E4>MCP#>##T&(?Q;ZY"?09[;GY/:$W`7* +M.P%'G"VJ3QW:3VJ8&C$@2BPD']I/7.[I4Z7MI\K:3Y6VGY[R0R7[U9P9ID>P +MT`.D(:#*`?\>7K]]*KY:ZM.3_1R\0MVCZ=!6[([6PW1`UR`.L#5LY`BO(AKR +MW)#TT;H4/PCQZRNB7<\X=7LKE;ONNO5P:#W-"UP`ZAJ]@@I0&M'Q$:.`-J3X +MD;`#VHY#R'A4#>'BO^+!/2'.11"_"?']+6[K6WV:NFI575G?FK*^-65]:\KZ +MUI3UK2GK6U/8MVKJ:RZP;VLSMPXYO9\)]A#XYW#C@[_QN_I4R;XVXMBWNN:P +M\Q*]AW:(%"=4FP.%BD;GH,D_%3S]U6"@CU(,;>K70CCQS8]":"$NQ.\S3N\7 +MT697G3E5'?M6&0X,;Z$B9(<^\)1@*"(ZE>(DH!L0&FB*%L/1C,.D^;;)`&7K-/R8T47K7D)]H>/5FM +MY-@7*JNOL9=7W1(C`-C]O/RAQ0_B]P +MQ,DIF]96?B.+FPO\3J.1'W7=$:=+6D]/)71THCD-^/6!/EWZJX&9]%&-JOS* +M,[^Q.1?+GUN@[$X#S@J7N/'"C$OAG)P[#(AQ6F.T38?I]SK>P;^,"X7M)^-I +M0&NY&^T#?Y[UJ>0.R\76M%RSJ.Q3">1"8I;=R?:[^AX_^0Y7CY[_Q+`7V^LJ +M#A=JUUT`E=3.[:G+?G&Y6;>>XF0[M/:,TZI/#72UQKG#DF23#\9A,$S#WF/?%I,_(*2+65GXC9SVCMO/*RG7KE7%\>5TL<47K +M,@-YQ.AL,>NU4YE:6_F-K/7\:+UU(['UUE*7#$M-#`Y-BUM8G(N=FAD>`"UEUEOTT`4A=_[*T[5 +M/B%Q\2S>A(2@M!2Q2(!$^P35>&LK-@%5X2$_GGN]Q'8Q/9^XY +MOC,)@N8#Q!&B!)%%S&>^3A'EB$*`!]<>6-Q>%7^KZZ\EM9_%7@-3P8:GYG&T +M\EGL/=BK:;4^$1H_Z+/]D`<0Q<@U=0!M4D3QB-9`6=7X4 +MPA)I)A&R#D'"N.H//3P@.J*"/A.]6N)Z;\UNZH*UZOQZ:_UZ:_UZ:_UZ:_UZ +M:_UZ:SU[J]MU+2K$V]AV2X=JKSM".`5^*V]-!E4%H*QR+*2#1QG"WO6%*#LD)N$*0H:U`>PT9+W,%)2WO1 +MX6+&J4'MAJF]A[I$<%R<"E8AX=Q5<*FHX5:`S-6+KQ9S72*6\T2X(0CN&?V0 +M-G`JUM)%ATO%BJ&S=BMUF%'G>%`*DL`9\91MY'C%2LY(<^1"^O">SCI!;?5QCPK:K-?MF0"3E>>&/LOF.,C[;8(>`Y?^HM>73F7HT70W +MZ,-TNK),!O'X?C7`33?DX^EBC,LV>KM9W?Y4G==E4O;>JV_&EF^N0,9O;H/3 +F?AN!KCL+)Y#OFI[G!Q;O:/QM@$D+]%5!U2Q%>_\`)*95L$\3```` +` +end Added: stable/12/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdx.gz.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdx.gz.uu Mon Jun 29 06:19:39 2020 (r362772) @@ -0,0 +1,24 @@ +# $FreeBSD$ +begin 644 img-1x1-4096-vtoc8.vhdx.gz +M'XL("&N%^5X``VEM9RTQ>#$M-#`Y-BUV=&]C."YV:&1X`+6768_4.!2%W_M7 +M'`F>D+C$2QQ'2`B:AAXQ@\0BP1.+$SN`V#2`F'FH'\^]6;I22YJJEDE94:F2 +M?#J^Y^3:513#`50.SL-95'SF[S5<"U<"?''OP.KG^_A_]^%3HO%8G0PP55SR +MU#*.MH[5R8V3GM;K$W$EG!*)/&*#HD1E+@.^3R%&HN\;^M0?T&?7SZGU$VH. +M5`K9\RL!6ZB$YA0_)N_>A\2Y_.73^=MWXZ=_W,^'[HOGZ5O!FV +M12QA$I1EH%X"?DOO/OQ#=S;UF;%^#D&C:N$;U(7840?8!F@\NH2R0ME)PHL. +MGIU+O3X>Y_0WT7>#6WIKCU!5[U>7UUN;UUN;UUN;U +MUN;UUN;UUF;V5H_KFHOB;66GI4.-WR="N0O\G'Z$&'Z$N3Z=*MMA*,4$)W4`W:*+L$RXEH=)^3B"8A>AA.BY5T8W7]E&X1_?R+Z!71 +M[36N]]8OJ7/'JG-\,3106@K'(I(331QGRSN6VB!U:`V*&JD'M16LN\!=>S#2 +M'DZXBG%J5KMY:J^@S@N.B]/!*GC.78=0BQIN!6A"O_AJ,3=XL9PGP@U!O]KB"E]*O2B-) +M-EQU[JC<2_GH#M_-?;=KK80<7+W#;&J\TV90U*JH[%!?[];WSJ+IEG):G +A>(M1A#WGY0NK)[3Y&:+B1V"N[*FA49W\`IG(49-M$0`` +` +end Added: stable/12/usr.bin/mkimg/tests/img-1x1-512-apm.vhdx.gz.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-512-apm.vhdx.gz.uu Mon Jun 29 06:19:39 2020 (r362772) @@ -0,0 +1,25 @@ +# $FreeBSD$ +begin 644 img-1x1-512-apm.vhdx.gz +M'XL("&N%^5X``VEM9RTQ>#$M-3$R+6%P;2YV:&1X`+57VV[42!1\SU>4!$\K +M<7!?;0MI!=F0K+A(7`0\+5'[!M$ND`T1X6$^GG/:=L83C\,,:F9:EI,>E\I5 +MY>IVEO4?(/?P!;Q%SD<^+^%K>`?PY-:!U;>/S??N[+^6AL_JH`=3V2U7+#YTU"^7)\/6:!Q, +M"V494"\!7K0?SI[1GYO\S*"?1]#(:Q05RDSL*`-L!50%NA8NA^LDX5F'@IUK +M(S\>)_24Z-TIHWT>X?3U7>FEV]VN'N;J&1F0`LASU!JZ@3;HO%QB-5`V,3\* +MKD59281L0%8P7'=%]^X0'5)#[XF>7,.MO37[L',S1(MINSL +MONS$6VTE&,%!=U`5ZD9V"9834>F8DP95BZ:`X;1823=6=P_I/M&WOXG^(7JP +MAHO>%DOL_+[L/$^&"DJ+<$RB]<*)XVQYQU(:M!UJ@ZQ$&X'J'-9?P]UY/*`= +MCW`YPZF)=M/4_@*[0N!8G`Y6H>#<=0BEL.$J0!7BXJO%W%"(Y7PC7`@"]XB^ +M2`VN9(CRAHUJU9*,SD-Q\ET +M<%$[\?3H_R.!>O62WHYP51^4?=G=76!7)RV!8?.X_JU:`E0_!>SA8@FH[6-Y +M8A%N+/CI0J-_Y79[.)-2/3-4:&^BW0_PX8R?2?UJ8`=^_,QS5*<2%C\#?/QJ +MKI_]#?RT3'/W<:7?O,XLI8\G5B^>;^6GA1]W"O<5C_X%;1=^C\[/UZ]I$SB= +MZG9[.#-GQ\4FYRINLF3E+8^<$YF>._ +M9X#'%VU[^/KHWIOCUU/]K$W,S^^@GY[HUS\D4_TPY>=3Z^=OU2\WLHV>9W.M +JW]>K/H@CO]3Z%8-^6=AR7)Y8O:#-;P]8#("I&*J^G0]^`#*D#$M-3$R+6)S9"YV:&1X`+676V_30!"%W_LKCD2? +MD!B\%]MK(2$H+45<)."A?8)J?6LK;@*JPD-^/#.V$]MQG";5XEA6E+4_G9US +M/+N)HO8`T@2)0V*1\I6_9T@*)#'`@QM/+&ZORK_U]=>*NF-QT,)4M.6I>1RM +M'8N#AP<-K=$GXF(D2B3R6>:(8J1F&_"J\F5)]'ND3_T'?;9_3O5/J"%0[01L +M<7%0?7I:/V5@4]0E:H61Y&G]Z'1-GPY=/QVV?CIT_4SW?NBF?JF\&;9`&<-4 +M4):!>@[XJ[J\?DM/Q_I,5[\$7B,MX')DD=B1>=@CU"M=[:_93%VU4%]9;&]9;&]9;&]9;&]9; +M&]9;&]A;W:UK22G>IG:Y=*CN^Y(03X'?JAM?^AL_U*=#KFLM3KPUJ<3.*Q0> +M)D'-.>'>7')4#/($AOV)X/E7BXIOY0PMTDNBA%Z\(S)$Q_1EB3/K3=0-U=E] +MU8FWVDHP?`Q=0^4H2MDE6$Y$KIN9;HLS(:MGNA;:FFCW`SZ;Z#.A_QK83A_WJ,AON,X/+(YH_%D! +MM0!YA;9-ZIW>5>'YR=EDPK;Q)-B:(3A]%VXE6.V",]%D_^]ZW-S`+,YN4R<] +MM=IKLD'W`P)T:\\-?8;B)EWVZY(>`U?^HM>7367HT72WZ,-TNM*7HW1\OQK@ +MICO`\70QQN5;O=T[>4'[LFQ%U]^,'=]<@8S?W!:GPS8"W7063B#?-;W.#RS> +6T_C3`ET'#%5!U?:^@W]J6@JZP!$````` +` +end Added: stable/12/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdx.gz.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdx.gz.uu Mon Jun 29 06:19:39 2020 (r362772) @@ -0,0 +1,25 @@ +# $FreeBSD$ +begin 644 img-1x1-512-ebr.vhdx.gz +M'XL("&N%^5X``VEM9RTQ>#$M-3$R+65BE*PJBWR-]ZC_HL_TZU:]00Z#:"MC@ +M0J_Z]#1^RL#&J`I4"B/)T_C1Z8H^[3M^VF_\M._XF?;YT'7\8GDR;(XBA"FA +M+`/U'/!7>7G]AIZ,]9DV?A&<1IPCR9`&8D?J8#,@2U"5"&.$E61X4"%AY\I: +M'X]3>DUT?L&T[QU.+W>EY[:[/GJ81L_(@!2`.$:NH0MH@RJ2)58#:5'GCT)8 +M(LTDA:Q#D#"N^D,/#XB.J*#/1*^6N-Y;LYNZ8*TZO]Y:O]Y:O]Y:O]Y:O]Y: +MO]Y:S][JMJ]%A7@;VZYUJ/9W1PBGP&_EC2O<4<@<3 +MH>(\X=I<<*H89!$,^Q/`\7\M2KZ5YQ +MM;?)G+IH5W413[H,2DO@6$09B29.9\LGEM2@K)`;!"G*&I3'L-$2=W#2TEYT +MN)AQ:A"[8=;>0UTB.`Y.!:N0<-Y5<*FHX5*`S-7-5XNY+A'+>2-<$`3WC'Y( +M&3@5:^FBPZ5BQ=!9NY4ZS*AS/"D!2>",>,HV$]G76XK$F47=4=SJC+O1:!]O#8WZOF@.I.8(.KBX!:/^8G +M9G%=@1\V&GV?[38XXS-ZIBVAC8EV-^#3B3[C^]5`VFVV,["J9N(G.,D^OH$' +M5[WF!X\F.=KUO`6](5GVA[C"]W:KW8!A*,UC%?BQTZ=E%5?XP*VYSD\LCFC\ +M7>JS`N3SC:UK1J*WW?#YR=DZ.ZS'CBLX?1=N*5AM@S,!5E]8EIDQ/['HTZ3Y +MV^'L)G72D+,2[;Z.UF=?M3=5Z[FAR55Y^,+9]<@8R?W`:G_18"75<6 +ASD"^:WJ=GUB\H_&W`28MT%<$5?W>%^S]`U!U4R/^$@`` +` +end Added: stable/12/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.gz.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.gz.uu Mon Jun 29 06:19:39 2020 (r362772) @@ -0,0 +1,29 @@ +# $FreeBSD$ +begin 644 img-1x1-512-gpt.vhdx.gz +M'XL("&N%^5X``VEM9RTQ>#$M-3$R+6=P="YV:&1X`+676V\;113'W_,I_JA] +M`O6P<]N+D"H:D@8H2&W%Y06H9B_35H6@T*KPX`_?F[//SR(MZA-Q#J42B;SZ%H5#98X!7PV^[XG>+O2I_T&?W9Y3VQ-J%ZCN +M!!QQ+JL^?6@_96`KA!Y!82'YT'YTM:=/Y[:?SFL_G=M^9LH/'>U726;8#KV# +M&:`L`W4*^,_P\O4/]'"ISTSV*^$UJ@YUBZ80=S0>M@7:&F&`J^""1'@14+/G +MAJB/UQ4](?KU!=.N9YR^O95.77?=>CBTGI$%*0!5A4Y#]]`&H90C5@--'^-' +MP0UH6@DAZU'4C`O_TH-[1.?4TQ]$W]_BMKXUIZDK5M7E]:W-ZUN;U[F+E>C&YOXY?4GT_ENB +MWXF^VN*B;^N4NO)4=25O^A9*B^%8Q%"*)@YGRQ-+8S`$=`9%@R&"N@JVO,7= +MNYQHCV=!G?1QC2K\RC.] +ML3FGY?L6J-K3@+/")6Z\L.!B.$>'#@-"F-88;=-A_KL*=_"OX/K,]E/A-*!S +MTHWV@3_/^G1TAY-B:QNI65SVN01*(;'+[N2Z77V7C[_#TT?/?Q+8;]OK:@D7 +M+DP\C7$,*K>G+OG#Y>;A_G5'G"3;H;5GG#DEV00GR<934AJWMM(X>^Q4>A)- +MX=Q>VZ]W3XF/'`:/T"9PEY=+7)DY\JQL\XC#8S)/P-)G@GSH2YDL4'.:C!-" +MG%.Y=7(8:!E_:'/]C*Y'V`.Z^6+29]44$6LKO9&RGM7'(D)$?>2Z6.*RUF4! +MRHC1NFS6:Z8RM;;2&TGK^=%ZZT8246NIR[AY9/ELB6LS6Z^4;OB4?AO1E +7UW'YFGC$Y6SB:AR_SSX`D#^"8T,8```` +` +end Added: stable/12/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdx.gz.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdx.gz.uu Mon Jun 29 06:19:39 2020 (r362772) @@ -0,0 +1,25 @@ +# $FreeBSD$ +begin 644 img-1x1-512-mbr.vhdx.gz +M'XL("&N%^5X``VEM9RTQ>#$M-3$R+6UB>[W$=ARG234DEFMU[$]G[CF^ +M,PF"Y@/$$:($D47,9[Y.$>6(0H`'UQY8W%X5?ZOKKR6UG\5>`U/!AJ?F<;3R +M6>P]V*MIM3X1%R)2(I&/(D,0(C:;@%>E*PJBWR-]ZC_HL_USJG]"#8%J*V"# +M"[WJT]/Z*0,;HRI0*8PD3^M'IROZM._Z:;_UT[[K9]KW0]?UB^7-L#F*$*:$ +ML@S4<\!?Y>7U&WHRUF?:^D5P&G&.)$,:B!VI@\V`+$%5(HP15I+PH$+"SI6U +M/CY.Z371^073OG`X_]:E'PK9V@17Q)%]/PMD2$ZIB\=SJPVT62HSNZJ +M3KS55H+A0N@**D->R"[!>D0%:B2&`X+5;2C<7A$3TBNGU)](GH<8^K +MO4WFU$6[JHMXT&506@K'(LI(-'&<+>]84H.R0FX0I"AK4![#1DO]'A +M8L:I0>V&J;V'ND1P7)P*5B'AW%5PJ:CA5H#,U8NO%G-=(I;S1+@A".X9_9`V +M<"K6TD6'2\6*H;-V*W684>=X4`J2P!GQE&WD>,5*SDASY%RU5#I3J!%R,D.$ +M=>W$T^.?QX+Z\)[..ES6!&57=8EW#!Z;MP2\%J&YP)L/H+:)F, +M^8%%'Y/F;X>SF]3)$E?N-%FOVS,!)BO/#7V6S7&0]]L$/08N_46O+YW*T*/I +M;M"'Z71EF0SB\?UJ@)MNR,?3Q1B7;?1VL[K]J3JORZ3LO5??C"W?7(&,W]P& +GI_TV`EUW%DX@WS4]SP\LWM'XVP"3%NBK@JI9BO;^`?LS.Z%/$P`` +` +end Added: stable/12/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdx.gz.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdx.gz.uu Mon Jun 29 06:19:39 2020 (r362772) @@ -0,0 +1,24 @@ +# $FreeBSD$ +begin 644 img-1x1-512-vtoc8.vhdx.gz +M'XL("&N%^5X``VEM9RTQ>#$M-3$R+79T;V,X+G9H9'@`M9=9C]0X%(7?^U<< +M"9Z0N,1+'$=(")J&'C&#Q"+!$XL3.X#8-("8>:@?S[U9NE)+FJJ625E1J9)\ +M.K[GY-I5%,,!5`[.PUE4?.;O-5P+5P)\<>_`ZN?[^'_WX5.B\5B=##!57/+4 +M,HZVCM7)C9.>UNL3<26<$HD\8H.B1&4N`[Y/(4:B[QOZU!_09]?/J?43:@Y4 +M!P$'7)E5G]ZMGS*P%;J(3F%#\F[]Z'Q+G\Y=/YVW?CIW_ +MG4N]/A[G]#?1RS=,^S+A],6L]-)T]U<1JH(Y] +M?A3*A+J1"-F`PC.N^X]N7B,ZI4BOB1Y=X-;>FN/4%7O5Y?76YO76YO76YO76 +MYO76YO769O96C^N:B^)M9:>E0XW?)T*Y"_R+Q+=RAE;5.R)']Q\3&:(S^CCAS'83]7-U +M]EAUXJVV$HQ00G=0#=HHNP3+B6ATGY.()B%Z&$Z+E71C=?V4;A']_(OH%='M +M-:[WUB^I<\>JU%:R[P%U[,-(> +M3KB*<6I6NWEJKZ#."XZ+T\$J>,Y=AU"+&FX%:$*_^&HQ-WBQG"?"#4%P]^BK +MM(%SL9;>3+A:K)@[:P]2AP5U@2]*03R"$4_91HY7I>2,ND7+5:NE,Y4:)2>S +M1-G73CP]^_=,4,^>THL)UPQ!.5;=]05U;=8F,&X>U_>J):#Z+7#`]4U`[1_+ +M%Q9Q4X.?+S3Z*M,=<"9G]/-]6]QE\?% +MCJT@RW0'7',HCMMW$1&Y;ZDJF:[?NE^-YP7< +M4BL0W'JZ\[V>WL#M_%>;]GK8P<4+W+;&*TTV98V*Z@[%Q7Y][SRJ;AFGY2G> +@8A1ASWGYPNH);7Z&J/@1F"M[:FA4)[\`^&`&-&T1```` +` +end Added: stable/12/usr.bin/mkimg/tests/img-63x255-4096-apm.vhdx.gz.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-63x255-4096-apm.vhdx.gz.uu Mon Jun 29 06:19:39 2020 (r362772) @@ -0,0 +1,26 @@ +# $FreeBSD$ +begin 644 img-63x255-4096-apm.vhdx.gz +M'XL("&N%^5X``VEM9RTV,W@R-34M-#`Y-BUA<&TN=FAD>`"U5]MNU$@4?,]7 +ME`1/*W%P7VT+:079D*RX2%P$/"U1^P;1+I`-$>%A/IYSVG;&$X_##&H\+W#JR^?6R^=V?_M303&6W +MW+4,1S>.U<$?!Q$M\A-R#EX)11Y-A"G?@,_N[Y/K>]0 +M4T"U$V`/YY+RTW/]E('-T37H%#8HS_6CDQO\=&K]=%K]=&K]S/!\Z*A?+D^& +MK=$XF!;*,J!>`KQH/YP]HS\W^9E!/X^@D=5N5P]S]8P,2`'(<]0:NH$VZ+S<8C50 +M-C$_"JY%64F$;$!6,%QW1??N$!U20^^)GES#K;TU^['+MK)+ZZU-ZZU-ZZU- +MZZU-ZZU-ZZU-[*T>]C7?B+>Y';<.-5R/"&X.^*F]#$VX#%-^.N6^UL.)MR:7 +MV`6%.L!X=)P3KLT-1\6@\C#L3X;`OUJT_%?.T"K_0.3IK^=$ANB(_AWAS,TB +M6DS9V7W9B;?:2C""@^Z@*M2-=`F6$U'IF),&58NF@.&T6$DW5G-LN6,I#=H.M4%6HHU`=0[KK^'N +M/![0CD>XG.'41+MI:G^!72%P+$X'JU!P[CJ$4MAP*4`5XN:KQ=Q0B.6\$"X( +M`O>(OD@9.!%KZ72$*\6*J;-V)W988!=X4@0I$(QXRC9RO'(E9Y0U:E:ME,KD +M-!PGT\%%[<33H_^/!.K52WH[PE5]4/9E=W>!79VT"`S-X_J_:@E0_12PAXM% +M0&T?RQ.+<&.!GVPTZI>6V\.9E.J9H83V)MK]`!_.^)G4KP9VX,?//$=U*F'Q +M,\#'K^;ZV=_`3\LTUSXNZ3?O,TOIXXG5B^=;^6GAQS6%ZQ6/_@5M%WZ/SL_7 +MKVD3.)UJN3VY%=J?GX>+R[/+LR^?3$@#<]!8C/YLZ>S;:X[HQ4>>[\ +MX)S,\?<9X/%%VQZ^/KKWYOCU5#]K$_/S.^BG)_KU#\E4/TSY^=3Z^5OURXVT +MT?-LKO7[>M4'<>276#^5#?IE86+U@C8_/6`Q`*9BJ/KJ?/`#FKW9[6(2 +"```` +` +end Added: stable/12/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhdx.gz.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhdx.gz.uu Mon Jun 29 06:19:39 2020 (r362772) @@ -0,0 +1,24 @@ +# $FreeBSD$ +begin 644 img-63x255-4096-bsd.vhdx.gz +M'XL("&N%^5X``VEM9RTV,W@R-34M-#`Y-BUB`"UETEOU$`0A>_Y +M%4\B)R0*]V*[+:0`(2&(10(.R0FB]I9$;`*BP&%^/%5>9NSQ.)F)FAG+FJ3M +M3Z_K/5>WHZC]`&F"Q"&Q2/G,OS,D!9(8X,&-!Q8WE^7?^NIK1=UGL=?"5'3+ +M7?,X6OLL]A[N-;1&GXB+D2B1R$>9(XJ1FMN`EY4O2Z+?(WWJ/^BSJ_O4Z@XU +M!*JM@"TN#JI/3^NG#&R*ND2M,)(\K1^=K.G3H>NGP]9/AZZ?Z9X/W=0OE2?# +M%BACF`K*,E#/`7]5%U=OZ6"LSW3U2^`UT@(N1Q:)'9F'S8'IA6S\@!:0!IBD)#E]`&=2*W6`UD +M99,?A;A"EDN$K$?D&%?_H4XE;=F-W711G5AO;5AO;5AO;5A +MO;5AO;5AO;6!O=7=NI:4XFUJ^Z5#=;][0CP%?JNN?>FO_5"?#KFNM3CQUJ02 +M.Z]0>)@$->>$>W/)43'($QCV)X+G_UI4?"EG:)%>$"7TXAV1(3JB+SW.K#=1 +M-U1G=U4GWFHKP?`Q=`V5HRAEEV`Y$;ENNCEUR:[J$A[T.926PK&(*A%-'&?+.Y;,H*I1&$09J@94I+#)$O?@ +MN*.]['$IX]2@=L/4WD.=$QP7IX95<)R[&CX3-=P*D/MF\=5BKG=B.4^$&X+@ +MGM,/:0,G8BV=][A,K!@Z:[=2AQEUG@>E(`[>B*=L(\_3P2U,9Q=:V:`ZH[@2VN:0)J +M\S$_,(OK&_Q@H5'WFFZ+,R&K9[H6VIIH=P,^F^@SH5\-;*>/>U3D-YSG!Q:' +M-/XN@5J`O$+;)O5.;ZOP[/AT,F';>!)LS1";!F8G&W0_($"W=M_09VG8_%ZT7)?T&+CT%RM] +MV52&'DWW%GV83E?Z?C"V? +L7(&,G]P6I\,V`MUT%DX@7S4]SP\LWM/XVP)=!PQ50=7VOKU_1)0]<,`1```` +` +end Added: stable/12/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhdx.gz.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhdx.gz.uu Mon Jun 29 06:19:39 2020 (r362772) @@ -0,0 +1,26 @@ +# $FreeBSD$ +begin 644 img-63x255-4096-ebr.vhdx.gz +M'XL("&N%^5X``VEM9RTV,W@R-34M-#`Y-BUE8G(N=FAD>`"UE]N/E$H0QM_W +MK_@2?3(Y)7V!;F*RZKJZ)UX2-5&?U#0W->HQ>HSZ,'^\55QF8(#9'=,"2]AI +M^.7K^HJJ)DFZ#7`9,H_,PO&9KW-D);(4X,'%`YL?[ZM?S8=/-?7;YJ2#J>3` +M4^LXVMLV)S=.6EJK3\2ER)1(Y*,JD*1PYA#P?1VJBNC_B3[U%_39W7-J]X0: +M`]65@!TNC:I/S^.G#*Q#4Z%1F$B>QX\N]O3IV/'3<>.G8\?/].^';N/GY,VP +M):H4IH:R#-1KP&_UNP^/Z72JS_3QRQ`T7`E?($_$CCS`%D#AT=1('=)&,CQI +MX-FYNM7'QP4](GKUEFG_#3B]G95>F^YR]#"/GI$#4@"<0ZFA*VB#)I-'K`;R +MJLT?A;1&7D@*V8#$,Z[Y2?]<(SJCBMX0/=SB=MZ:X]0EB^KB>FOC>FOC>FOC +M>FOC>FOC>FLC>ZO[OI95XJVS0^M0_?5`2.?`S_7W4(7O8:Q/Q^QK'4Z\-4[2 +M+BB4`29#PWG"M;GB5#$H,ACV)T'@7RUJOI5S:./>$65T[PF1(3JGCP/.[!=1 +M/U9GCU4GWFHKB1%2Z`:J0%G)*L%R1A2ZS9,*18W*PW"V6,EN;*Z?T4VB'_\2 +MO2:ZM<.UWOHU==FQZC(>#`64EL"QB#H339S.EES#@'./4*';CK/T#=5YP')P&5L%SWC4(N:CA4H`BM,U7B[G!B^4\$2X( +M@KM+7Z0,7(BU]';`Y6+%V%E[)75841=X4`+B$8QXRC9R>CDE9^0E2HY:+I4I +MU4@Y,U.D;>S$T_.OYX)Z_HQ>#KBB2Y1CU5U?45=&+0+]XG%WKUH#JDN!':XM +M`FKY6!]8Q0T%?M1HU!]-M\.9F-$S?0GM3+3'`>_,])G8GP;2;HOC@6MV"*Y, +MA@5Q:!N#:>1?.6]QI9+5P5S?;=YY.QWCJMC3;8X#IJDTCWW@BT&?/BCC>'VN +MEF%N&4E8.*\/;,YHN@]`W^8?+YAL6X2\OJK"5_=?+OCK8[9PP>G+<(/@+H.6 +M<+='.'E[F]&=XZ(TR;OQ]0AWVOT-.'M(G529>FE@=;)1EV<"]'O/C7V&JN4S +M=;M,T%/@UE_L].5S&7HRW0/Z,)^NM,G$3>]7(]Q\03Z=+J:X8EM9%BR\)'JG +M`"UF%MOVS88AN_S +M*]ZAO=I05CQ*PH!AS=)FAPY(BQUNVA64*+;%M@S=@FX7_O']/DJ*+5OTXH)U +M",$)S0,+J!U<`V=0TY/>MW`]G`5H14'B?V7INSS\\2+>EC<19.LD1:H4-E4>MCP#>##T&(?Q;ZY"?09[;GY/:$ +MW`7*.P%'G"VJ3QW:3VJ8&C$@2BPD']I/7.[I4Z7MI\K:3Y6VGY[R0R7[U9P9 +MID>PT`.D(:#*`?\>7K]]*KY:ZM.3_1R\0MVCZ=!6[([6PW1`UR`.L#5LY`BO +M(AKRW)#TT;H4/PCQZRNB7<\X=7LKE;ONNO5P:#W-"UP`ZAJ]@@I0&M'Q$:.` +M-J3XD;`#VHY#R'A4#>'BO^+!/2'.11"_"?']+6[K6WV:NFI575G?FK*^-65] +M:\KZUI3UK2GK6U/8MVKJ:RZP;VLSMPXYO9\)]A#XYW#C@[_QN_I4R;XVXMBW +MNN:P\Q*]AW:(%"=4FP.%BD;GH,D_%3S]U6"@CU(,;>K70CCQS8]":"$NQ.\S +M3N\7T697G3E5'?M6&0X,;Z$B9(<^\)1@*"(ZE>(DH!L0&FB*%L/1C,.D^;;)`&7K-/R8T47K7D)]H> +M/5FMY-@7*JNOL9=7W1(C`-C]O/RAQ0 +M_B]PQ,DIF]96?B.+FPO\3J.1'W7=$:=+6D]/)71THCD-^/6!/EWZJX&9]%&- +MJOS*,[^Q.1?+GUN@[$X#S@J7N/'"C$OAG)P[#(AQ6F.T38?I]SK>P;^,"X7M +M)^-I0&NY&^T#?Y[UJ>0.R\76M%RSJ.Q3">1"8I;=R?:[^AX_^0Y7CY[_Q+`7 +MV^LJ#A=JUUT`E=3.[:G+?G&Y6;>>XF0[M/:,TZI/#72UQKG#DF23#\9A,$S#WF/?%I,_(*2+65GXC9SVCMO/*RG7KE7%\>5TL +M<47K,@-YQ.AL,>NU4YE:6_F-K/7\:+UU(['UUE*7`"UETEOU$`0A>_Y +M%4^"$Q*%>[&[+:0`(1#$(@$2Y`2HO0%B$XN`P_QXJKS,V./Q)!,U'L>:I.U/ +MK^L]5W>2I#L`ER'SR"P<7_E[CJQ$E@(\N//$ZO>'ZF_S\7--_;$ZZF`JV?/4 +M,HZVCM71C:.6UNH3<2DR)1+YK`HD*9S9!_Q0AZHB^CG1I_Z#/KMY3FV>4&.@ +MNA2PPZ51]>EY_92!=6@J-`H3R?/ZT=F6/AV[?CIN_73L^IG^_=!M_9R\&;9$ +ME<+44):!>@GXHW[_\2D=3_69OGX9@H8KX0ODB=B1!]@"*#R:&JE#VDC"DP:> +MG:M;?7R>T1.B\W=,^SK@]'I6>FFZNZN'>?6,G)`&X!Q*#5U!&S29/&(UD%=M +M?A32&GDA$;(!B6=<\X=N7B,ZH8K>$CU>XS;>FL/4)3O5Q?76QO76QO76QO76 +MQO76QO761O96]^M:5HFWS@Y+A^J_#X1T#OQ2_PI5^!7&^G3,=:W#B;?&2>R" +M0AE@,C2<$^[-%4?%H,A@V)\$@?]J4?.MG*&5>T^4T?UG1(;HE#X-.+/=1/U8 +MG3U4G7BKK00CI-`-5(&RDEV"Y404NLU)A:)&Y6$X+5;2C=7U$[I%]/L1T1NB +MVQM/ +MODD;.!-KZ=V`R\6*L;/V4NJPH"[PH!3$(QCQE&WD>#DE5^0E2JY:+ITIU4@Y +MF2G2MG;BZ>GW4T&]?$&O!US1!>50==<7U)51FT"_>=S/8QKAJLCU +M4\UAP#25U6@;^&K0I_?*.%R?JR/[Z]O`\`[,MEW-Z\LJ/'_P>A9HP47<$PA. +M7X0;!'<)VH6[,\)).VA&=XZ[W"1WX^\CW''W,^#L/G72MNI=`XN3C;K?$Z#? +M>F[L,U0M__>N]QUZ"ES[BXV^?"Y#3Z:[1Q_FTY5U-W'3^]4(-]_A3Z>+*:Y8 +M=Y8=%EY0O>.YNJCK+@/5]IMQR3=7(-,WM\/IN(T@;SL+)Y#OFE^7!U;/:?KI +3@+X'QJJ@ZM:VHW^KEZ)?H!,````` +` +end Added: stable/12/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhdx.gz.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhdx.gz.uu Mon Jun 29 06:19:39 2020 (r362772) @@ -0,0 +1,25 @@ +# $FreeBSD$ +begin 644 img-63x255-4096-vtoc8.vhdx.gz +M'XL("&N%^5X``VEM9RTV,W@R-34M-#`Y-BUV=&]C."YV:&1X`+6768_3,!2% +MW^=7'`F>D+C$2S8AL0P#@U@D%@F>6)S8!L0F%@$/_?'P!Z7)]6G=^NG#&R)Z!$5SDC>K1^=;NG3J>NGT]9/IZZ?&=X/W=6OE#?# +MMO`Y3("R#-1+P._AW8='=..L/C/4KX#3*%M4#>I,[*@=;`,T%6)`7B*/DO`L +MHF+G0J>/QRD])'KYAFE?1IQ>STHO37>^>MBMGI$!:0!EB59#>VB#6,@C5@.U +M[_*CD`?4C43(.F05X^)ONGJ)Z)@\O29ZL,9MO#6'JJDZ\U5:"X7+H"-6@];)+L)R(1GH*ON@:*"V%8Q&A$$T<9\L[EMH@1+0&68W0@=H2MECC+MT= +M:/=&7,DX-:G=-+474%<)CHL3814JSEV$JT4-MP(TKEM\M9CK*K&<)\(-07"W +MZ:NT@5.QEMZ,N%JLF#IK]U*'!76.+TI!*C@CGK*-'*]2R1EUBY:K5DMGRC5R +M3F:.O*N=>'KR[410SY[2BQ'7]$$Y5-WE!75MTB8P;!XW]ZHEH/XGL,=U34#- +MC^4+B[BQP4^^7EUHNCW.I*R>&5IH;Z*=`:XOJ!W@K0%U:ZW/I/YI8`=]_&H/ +M*W@N_2HWDF1^NV"4]-(YX+WO(1P_/S'J\:9^]G_HJ_9+7S\JZ1$[.=Z8;Q9;,7F*X: +MISMI>#'*V<0EW*05W-S&;::[O=?3?G"Z@F=_>N!<0"F4JC[SG?T%Q*Z +&E4N^$0`` +` +end Added: stable/12/usr.bin/mkimg/tests/img-63x255-512-apm.vhdx.gz.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-63x255-512-apm.vhdx.gz.uu Mon Jun 29 06:19:39 2020 (r362772) @@ -0,0 +1,25 @@ +# $FreeBSD$ +begin 644 img-63x255-512-apm.vhdx.gz +M'XL("&N%^5X``VEM9RTV,W@R-34M-3$R+6%P;2YV:&1X`+57VV[42!1\SU>4 +M!$\K<7!?;0MI!=F0K+A(7`0\+5'[!M$ND`T1X6$^GG/:=L83C\,,:F9:EI,> +ME\I5Y>IVEO4?(/?P!;Q%SD<^+^%K>`?PY-:!U;>/S??N[+^6AL_JH`=3V2U7 +M+#YTU"^7)\/6 +M:!Q,"V494"\!7K0?SI[1GYO\S*"?1]#(:Q05RDSL*`-L!50%NA8NA^LDX5F' +M@IUK(S\>)_24Z-TIHWT>X?3U7>FEV]VN'N;J&1F0`LASU!JZ@3;HO%QB-5`V +M,3\*KD59281L0%8P7'=%]^X0'5)#[XF>7,.MO37[L',S1(M +MINSLONS$6VTE&,%!=U`5ZD9V"9834>F8DP95BZ:`X;1823=6=P_I/M&WOXG^ +M(7JPAHO>%DOL_+[L/$^&"DJ+<$RB]<*)XVQYQU(:M!UJ@ZQ$&X'J'-9?P]UY +M/*`=CW`YPZF)=M/4_@*[0N!8G`Y6H>#<=0BEL.$J0!7BXJO%W%"(Y7PC7`@" +M]XB^2`VN9(CRAHUJU9*,SD- +MQ\ET<%$[\?3H_R.!>O62WHYP51^4?=G=76!7)RV!8?.X_JU:`E0_!>SA8@FH +M[6-Y8A%N+/CI0J-_Y79[.)-2/3-4:&^BW0_PX8R?2?UJ8`=^_,QS5*<2%C\# +M?/QJKI_]#?RT3'/W<:7?O,XLI8\G5B^>;^6GA1]W"O<5C_X%;1=^C\[/UZ]I +M$SB=ZG9[.#-GQ\4FYRINLF3E+8^<$Y +MF>._9X#'%VU[^/KHWIOCUU/]K$W,S^^@GY[HUS\D4_TPY>=3Z^=OU2\WLHV> +M9W.MW]>K/H@CO]3Z%8-^6=AR7)Y8O:#-;P]8#("I&*J^G0]^`#*DCJ/T`:8+$(;%(^7Y=_ZZFM%W6>QU\)4=,M= +M\SA:^RSV'NXUM$:?B(N1*)'(1YDCBI&:VX"7E2]+HM\C?>H_Z+.K^]3J#C4$ +MJJV`+2X.JD]/ZZ<,;(JZ1*TPDCRM'YVLZ=.AZZ?#UD^'KI_IG@_=U"^5)\,6 +M*&.8"LHR4,\!?U475V_I8*S/=/5+X#72`BY'%HD=F8?-@=RAKA"GB&M)>%3# +ML7-5HX^/$WI#=';.M.\]3B]GI>>FN[EZF%;/R`%I`&F*0D.7T`9U(K=8#61E +MDQ^%N$*62X2L1^085_^A1P^(#JFDST2OE[B5MV8W==%&=6&]M6&]M6&]M6&] +MM6&]M6&]M8&]U=VZEI3B;6K[I4-UOWM"/`5^JZY]Z:_]4)\.N:ZU./'6I!([ +MKU!XF`0UYX1[<\E1,<@3&/8G@N?_6E1\*6=HD5X0)?3B'9$A.J(O/:BO!\#%T#96C*&678#D1N6YR4B*O4#H83HN5=&.Q?TB/B6Y>$7TB +M>K+"-=ZZ.77)KNH2'O0YE);"L8@J$4T<9\L[ELR@JE$81!FJ!E2DL,D2]^"X +MH[WL<2GCU*!VP]3>0YT3'!>GAE5PG+L:/A,UW`J0^V;QU6*N=V(Y3X0;@N"> +MTP]I`R=B+9WWN$RL&#IKMU*'&76>!Z4@#MZ(IVPCQRM59;HLS(:MGNA;:FFAW`SZ;Z#.A7PULIX][5.0WG.<'%H6FT:F)ULT/V``-W:?4.?I6'S>]%R7=)CX-)?K/1E +M4QEZ--U;]&$Z7>G+43J^7@UPTQW@>+H8X_)H\FZWLG#WY`7MR[(577\RMGQR +L!3)^O +M^!)],CDE?8%N8K+JNKHG7A(U49_4-#OZBJHF2;H-O66:?\-.+V=E5Z;[G+T,(^>D0-2`)Q#J:$K:(,FDT>L!O*J +MS1^%M$9>2`K9@,0SKOE)_UPC.J.*WA`]W.)VWIKCU"6+ZN)Z:^-Z:^-Z:^-Z +M:^-Z:^-Z:R-[J_N^EE7BK;-#ZU#]]4!(Y\#/]?=0A>]AK$_'[&L=3KPU3M(N +M*)0!)D/#><*UN>)4,2@R&/8G0>!?+6J^E7-HX]X1973O"9$A.J>/`\[L%U$_ +M5F>/52?>:BN)$5+H!JI`6^C5UV;'J,AX,!926P+&(.A--G,Z65RRY0=V@-$ARU"VH=+#9%G?M +M?D][,.`-0BYJ.%2@"*TS5>+N<&+Y3P1+@B" +MNTM?I`QO6@.J2X$=KBT" +M:OE8'UC%#05^W&CTGTRWPYF8T3-]">U,M,.JV--MC@.FJ32/?>"+09\^*.-X?:Z6 +M86X925@XKP]LSFBZ#T#?YA\OF&Q;A+R^JL)7]U\N^.MCMG#!Z7N;T9WCHC3)N_'U"'?:_0TX>TB=M+AZ:6!ULE&79P+T>\^-?8:JY3-U +MNTS04^#67^STY7,9>C+=`_HPGZZTR<1-[UJ=S +M=5';)`/5_IMQQ3=7(-,WM\/IN(4@;RL+9R#?-3^O#VR>TG3O@+X'QHJ@:C\D ++DY/?T[@Q:$\3```` +` +end Added: stable/12/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdx.gz.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdx.gz.uu Mon Jun 29 06:19:39 2020 (r362772) @@ -0,0 +1,29 @@ +# $FreeBSD$ +begin 644 img-63x255-512-gpt.vhdx.gz +M'XL("&N%^5X``VEM9RTV,W@R-34M-3$R+6=P="YV:&1X`+676V\;113'W_,I +M_JA]`O6P<]N+D"H:D@8H2&W%Y06H9B_35H6@T*KPX`_?F[//SR(MZA-Q#J42B;SZ%H5#98X!7PV^[XG>+O2I_T&?W9Y3VQ-J +M%ZCN!!QQ+JL^?6@_96`KA!Y!82'YT'YTM:=/Y[:?SFL_G=M^9LH/'>U726;8 +M#KV#&:`L`W4*^,_P\O4/]'"ISTSV*^$UJ@YUBZ80=S0>M@7:&F&`J^""1'@1 +M4+/GAJB/UQ4](?KU!=.N9YR^O95.77?=>CBTGI$%*0!5A4Y#]]`&H90C5@-- +M'^-'P0UH6@DAZU'4C`O_TH-[1.?4TQ]$W]_BMKXUIZDK5M7E]:W-ZUN;U[F+E>C&YOXY?4GT +M_ENBWXF^VN*B;^N4NO)4=25O^A9*B^%8Q%"*)@YGRQ-+8S`$=`9%@R&"N@JV +MO,7=NYQHCV=!G?1QC2K\ +MRC.]L3FGY?L6J-K3@+/")6Z\L.!B.$>'#@-"F-88;=-A_KL*=_"OX/K,]E/A +M-*!STHWV@3_/^G1TAY-B:QNI65SVN01*(;'+[N2Z77V7C[_#TT?/?Q+8;]OK +M:@D7+DP\C7$,*K>G+OG#Y>;A_G5'G"3;H;5GG#DEV00GR<934AJWMM(X>^Q4 +M>A)-X=Q>VZ]W3XF/'`:/T"9PEY=+7)DY\JQL\XC#8S)/P-)G@GSH2YDL4'.: +MC!-"G%.Y=7(8:!E_:'/]C*Y'V`.Z^6+29]44$6LKO9&RGM7'(D)$?>2Z6.*R +MUF4!RHC1NFS6:Z8RM;;2&TGK^=%ZZT8246NIR[AY9/ELB6LS6Z^4;OB4? +:AO1EUW'YFGC$Y6SB:AR_SSX`D#^"8T,8```` +` +end Added: stable/12/usr.bin/mkimg/tests/img-63x255-512-mbr.vhdx.gz.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-63x255-512-mbr.vhdx.gz.uu Mon Jun 29 06:19:39 2020 (r362772) @@ -0,0 +1,26 @@ +# $FreeBSD$ +begin 644 img-63x255-512-mbr.vhdx.gz +M'XL("&N%^5X``VEM9RTV,W@R-34M-3$R+6UBQYJD[4^O +MZSU7=Y*D.P"7(?/(+!Q?^7N.K$26`CRX\\3J]X?J;_/QE9Z:;J[JX=Y]8R2$1L@&)9USSAVY>(SJABMX2/5[C-MZ:P]0E.]7%]=;&]=;&]=;&]=;& +M]=;&]=9&]E;WZUI6B;?.#DN'ZK\/A'0._%+_"E7X%<;Z=,QUK<.)M\9)[()" +M&6`R-)P3[LT51\6@RGP2!_VI1\ZV*NM!".DT`U4@;*278+E1!2ZS4F%HD;E83@M5M*-U?43ND7T^Q'1&Z+; +M&USKK5]2EQVJ+N/!4$!I*1R+J#/1Q'&VO&/)#>H&I4&2HVY!I8/-UKAK#WK: +MPP'G&*=&M1NG]@KJO."X.`VL@N?<-0BYJ.%6@"*TBZ\61X.257Y"5*KEHNG2G52#F9 +M*=*V=N+IZ?=30;U\0:\'7-$%Y5!UUQ?4E5&;0+]YW-RKEH#J0F"':YN`VGTN +M#RSBA@8_7FCT5:;;X4S,ZIF^A78FVL.`=V?Z3.Q_#6ROCWM4$G93'>//LRG*^MNXJ;WJQ%NOL.?3A=37+'N +M+#LLO*!ZQW-U4===!JKM-^.2;ZY`IF]NA]-Q&T'>=A9.(-\UORX/K)[3]-,! +3?0^,54'5K6U'_P!>R=ONH!,````` +` +end Added: stable/12/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhdx.gz.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhdx.gz.uu Mon Jun 29 06:19:39 2020 (r362772) @@ -0,0 +1,25 @@ +# $FreeBSD$ +begin 644 img-63x255-512-vtoc8.vhdx.gz +M'XL("&N%^5X``VEM9RTV,W@R-34M-3$R+79T;V,X+G9H9'@`M9=;;Q1'$(7? +M_2N.A)\B44Q?YB8D((ZQHP0D+A(\$>B9[@842!0'01[VQU,UE]W9W1E[UVG6 +MK='*/?/I=)V:T[U9UG^`LD!1H;`H^&]T-W +M]2OES;`M?`X3H"P#]1+P*KS_^(0>;.LS0_T*.(VR1=6@SL2.VL$V0%,A!N0E +M\B@=GD54[%SH]/&XI-^)7K]EVE\C3J]7I9>6.U\][%?/R(`$0%FBU=`>VB`6 +M\HC50.V[_E'(`^I&6L@Z9!7CXC>Z>X?HC#S]0?3;&K?QUARG+IM5E]9;F]9; +MF]9;F]9;F]9;F]9;F]A;/>QKA1=O2SMN'6KX/A+R?>#G\,5Y]\5-]>F4^UJ/ +M$V]-*6WG%%H'4R!RGW`V>VX5@Z:`87\R./ZO1>!;N8=6Y7NB@GYY2F2(SNG/ +M$6=V0[2:JK/'JA-OM97&<#ETA&K0>CDE6.Z(1G=]XM$$^`J&N\5*=V-U>D;W +MB+[^2O2&Z/X&UWE;+:DKCE57\*1KH+04CD6$0C1Q.UL^L=0&(:(UR&J$#M26 +ML,4:=^?Q0+L8<27CU*1VTZZ]A;I*<%R<"*M0<=]%N%K4Y`Z+*AS/"D%J>",>,HV(YO1IQ3=\HQZH[75#7)@V!X?"XN52U[E1CJ9WRX8)5DZ![RX"N'LY;E13S?ULS]"7W58]_6CDHQ@ +M^^?]M4,4##?7-^*N;Q<[1$&2Y?:XYE` Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CEEE435FED5; Mon, 29 Jun 2020 06:21:31 +0000 (UTC) (envelope-from gonzo@freebsd.org) Received: from id.bluezbox.com (id.bluezbox.com [45.55.20.155]) (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 49wHSW2KbLz4PB7; Mon, 29 Jun 2020 06:21:31 +0000 (UTC) (envelope-from gonzo@freebsd.org) Received: from localhost ([127.0.0.1] helo=id.bluezbox.com) by id.bluezbox.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92 (FreeBSD)) (envelope-from ) id 1jpnA2-000LiK-Bm; Sun, 28 Jun 2020 23:21:30 -0700 Received: (from gonzo@localhost) by id.bluezbox.com (8.15.2/8.15.2/Submit) id 05T6Kw6s083471; Sun, 28 Jun 2020 23:20:58 -0700 (PDT) (envelope-from gonzo@freebsd.org) X-Authentication-Warning: id.bluezbox.com: gonzo set sender to gonzo@freebsd.org using -f Date: Sun, 28 Jun 2020 23:20:57 -0700 From: Oleksandr Tymoshenko To: Li-Wen Hsu Cc: src-committers , svn-src-all , svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: Re: svn commit: r362767 - in stable/12/usr.bin/mkimg: . tests Message-ID: <20200629062057.GA82989@bluezbox.com> References: <202006290034.05T0YBU7051105@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD/11.2-RELEASE-p10 (amd64) User-Agent: Mutt/1.12.1 (2019-06-15) X-Spam-Level: -- X-Spam-Report: Spam detection software, running on the system "id.bluezbox.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: Li-Wen Hsu (lwhsu@freebsd.org) wrote: > On Mon, Jun 29, 2020 at 8:36 AM Oleksandr Tymoshenko wrote: > > > > Author: gonzo > > Date: Mon Jun 29 00:34:11 2020 > > New Revision: 36276 [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Rspamd-Queue-Id: 49wHSW2KbLz4PB7 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; ASN(0.00)[asn:14061, ipnet:45.55.0.0/19, country:US]; local_wl_from(0.00)[freebsd.org] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 06:21:31 -0000 Li-Wen Hsu (lwhsu@freebsd.org) wrote: > On Mon, Jun 29, 2020 at 8:36 AM Oleksandr Tymoshenko wrote: > > > > Author: gonzo > > Date: Mon Jun 29 00:34:11 2020 > > New Revision: 362767 > > URL: https://svnweb.freebsd.org/changeset/base/362767 > > > > Log: > > MFC r361935: > > > > Add VHDX support to mkimg(1) > > > > VHDX is the successor of Microsoft's VHD file format. It increases > > maximum capacity of the virtual drive to 64TB and introduces features > > to better handle power/system failures. > > > > VHDX is the required format for 2nd generation Hyper-V VMs. > > > > Reviewed by: marcel > > Differential Revision: https://reviews.freebsd.org/D25184 > > Some mkimg(1) tests are failing after this merge: > > https://ci.freebsd.org/job/FreeBSD-stable-12-amd64-test/2484/ > https://ci.freebsd.org/job/FreeBSD-stable-12-i386-test/2466/ > > Can you check if there are something related to tests also need merging? Ooops, sorry for the breakage. Should be fixed in 362772. The problem was different format for the reference images. I'll wait to check if the commit fixes the test suite on stable/12 for sure and commit fix for stable/11 then. -- gonzo From owner-svn-src-all@freebsd.org Mon Jun 29 06:27:15 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A77C935F8D9; Mon, 29 Jun 2020 06:27:15 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: from mail-yb1-f177.google.com (mail-yb1-f177.google.com [209.85.219.177]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wHb718d1z4P7C; Mon, 29 Jun 2020 06:27:14 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: by mail-yb1-f177.google.com with SMTP id o4so7901575ybp.0; Sun, 28 Jun 2020 23:27:14 -0700 (PDT) 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=54gxzyE57EN9FJHGmCGEXUjf9jg2ts0Ub1FjLutaCPU=; b=Oeyct/ut/zTFCpZOthsF+2s1rFeHlXYFVd9fHJZO8POGOxKcoxCu7LGcHdCCFjPd1q +mevVAW1ah73GGziSaueguvXi/bi4IR8wDfzPcevJul7GYNC+y40/X/BrF6Ak8eRXB/a G7k8LIxUT/YyLHH0Bzzt4xbyup3kHCdGlAFUy4Y9CHCr2byIyFJPY0QP2EbgTP2sMI4L ik3+HIroPUZ+RBHOgDH3XHnSnphb9Nc1tSJhEE3NRApCZ+tiwEXEOO4f1YvieXaOD63m tyxKu2apR5OifVf6sUlrnsnxUxlPcHo1yFENGX0tb1tkDFjGGGiRI5HLkgTYK6Ljah9x ay9A== X-Gm-Message-State: AOAM532qO5LZNfWUfz0RAI+RdF/2ARWG7FwYa463o3ETAxaPY64dZliq A+KlvpEpFa8BQ9Riqs/H2phF7qVXI0t1fg+MK21tDA== X-Google-Smtp-Source: ABdhPJwp0N2LNesJoltJXJBv488JhKPAAWDQ+fFLupUG+QmcblZG8WgzB8VsPfG8ekI3ZBH+LgREK0dVIy16rcgv7Es= X-Received: by 2002:a05:6902:4a2:: with SMTP id r2mr24443613ybs.176.1593412033945; Sun, 28 Jun 2020 23:27:13 -0700 (PDT) MIME-Version: 1.0 References: <202006290034.05T0YBU7051105@repo.freebsd.org> <20200629062057.GA82989@bluezbox.com> In-Reply-To: <20200629062057.GA82989@bluezbox.com> From: Li-Wen Hsu Date: Mon, 29 Jun 2020 14:27:02 +0800 Message-ID: Subject: Re: svn commit: r362767 - in stable/12/usr.bin/mkimg: . tests To: Oleksandr Tymoshenko Cc: src-committers , svn-src-all , svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 49wHb718d1z4P7C X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 06:27:15 -0000 On Mon, Jun 29, 2020 at 2:21 PM Oleksandr Tymoshenko wrote: > > Li-Wen Hsu (lwhsu@freebsd.org) wrote: > > On Mon, Jun 29, 2020 at 8:36 AM Oleksandr Tymoshenko wrote: > > > > > > Author: gonzo > > > Date: Mon Jun 29 00:34:11 2020 > > > New Revision: 362767 > > > URL: https://svnweb.freebsd.org/changeset/base/362767 > > > > > > Log: > > > MFC r361935: > > > > > > Add VHDX support to mkimg(1) > > > > > > VHDX is the successor of Microsoft's VHD file format. It increases > > > maximum capacity of the virtual drive to 64TB and introduces features > > > to better handle power/system failures. > > > > > > VHDX is the required format for 2nd generation Hyper-V VMs. > > > > > > Reviewed by: marcel > > > Differential Revision: https://reviews.freebsd.org/D25184 > > > > Some mkimg(1) tests are failing after this merge: > > > > https://ci.freebsd.org/job/FreeBSD-stable-12-amd64-test/2484/ > > https://ci.freebsd.org/job/FreeBSD-stable-12-i386-test/2466/ > > > > Can you check if there are something related to tests also need merging? > > Ooops, sorry for the breakage. Should be fixed in 362772. The problem > was different format for the reference images. I'll wait to check if > the commit fixes the test suite on stable/12 for sure and commit fix > for stable/11 then. Thank you for the quick analysis and fix. Perhaps mering the codes to process the new format of the reference images can easy the process of future update and MFH? Best, Li-Wen From owner-svn-src-all@freebsd.org Mon Jun 29 06:28:02 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5BB4535FDD9; Mon, 29 Jun 2020 06:28:02 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wHc21N4Qz4PZQ; Mon, 29 Jun 2020 06:28:02 +0000 (UTC) (envelope-from pstef@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 120D122DF1; Mon, 29 Jun 2020 06:28:02 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05T6S1o0068077; Mon, 29 Jun 2020 06:28:01 GMT (envelope-from pstef@FreeBSD.org) Received: (from pstef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T6S1CU068076; Mon, 29 Jun 2020 06:28:01 GMT (envelope-from pstef@FreeBSD.org) Message-Id: <202006290628.05T6S1CU068076@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pstef set sender to pstef@FreeBSD.org using -f From: Piotr Pawel Stefaniak Date: Mon, 29 Jun 2020 06:28:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362773 - in stable: 11/lib/libc/string 12/lib/libc/string X-SVN-Group: stable-12 X-SVN-Commit-Author: pstef X-SVN-Commit-Paths: in stable: 11/lib/libc/string 12/lib/libc/string X-SVN-Commit-Revision: 362773 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 06:28:02 -0000 Author: pstef Date: Mon Jun 29 06:28:01 2020 New Revision: 362773 URL: https://svnweb.freebsd.org/changeset/base/362773 Log: MFC r362495: strtok(3): make it easier to find the RETURN VALUES section Modified: stable/12/lib/libc/string/strtok.3 Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/lib/libc/string/strtok.3 Directory Properties: stable/11/ (props changed) Modified: stable/12/lib/libc/string/strtok.3 ============================================================================== --- stable/12/lib/libc/string/strtok.3 Mon Jun 29 06:19:39 2020 (r362772) +++ stable/12/lib/libc/string/strtok.3 Mon Jun 29 06:28:01 2020 (r362773) @@ -97,7 +97,7 @@ The function may also be used to nest two parsing loops within one another, as long as separate context pointers are used. -.Pp +.Sh RETURN VALUES The .Fn strtok and From owner-svn-src-all@freebsd.org Mon Jun 29 06:28:02 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 868BE34006F; Mon, 29 Jun 2020 06:28:02 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wHc235Wmz4PXG; Mon, 29 Jun 2020 06:28:02 +0000 (UTC) (envelope-from pstef@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 4DB402319E; Mon, 29 Jun 2020 06:28:02 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05T6S2c4068083; Mon, 29 Jun 2020 06:28:02 GMT (envelope-from pstef@FreeBSD.org) Received: (from pstef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T6S2dL068082; Mon, 29 Jun 2020 06:28:02 GMT (envelope-from pstef@FreeBSD.org) Message-Id: <202006290628.05T6S2dL068082@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pstef set sender to pstef@FreeBSD.org using -f From: Piotr Pawel Stefaniak Date: Mon, 29 Jun 2020 06:28:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362773 - in stable: 11/lib/libc/string 12/lib/libc/string X-SVN-Group: stable-11 X-SVN-Commit-Author: pstef X-SVN-Commit-Paths: in stable: 11/lib/libc/string 12/lib/libc/string X-SVN-Commit-Revision: 362773 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 06:28:02 -0000 Author: pstef Date: Mon Jun 29 06:28:01 2020 New Revision: 362773 URL: https://svnweb.freebsd.org/changeset/base/362773 Log: MFC r362495: strtok(3): make it easier to find the RETURN VALUES section Modified: stable/11/lib/libc/string/strtok.3 Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/lib/libc/string/strtok.3 Directory Properties: stable/12/ (props changed) Modified: stable/11/lib/libc/string/strtok.3 ============================================================================== --- stable/11/lib/libc/string/strtok.3 Mon Jun 29 06:19:39 2020 (r362772) +++ stable/11/lib/libc/string/strtok.3 Mon Jun 29 06:28:01 2020 (r362773) @@ -97,7 +97,7 @@ The function may also be used to nest two parsing loops within one another, as long as separate context pointers are used. -.Pp +.Sh RETURN VALUES The .Fn strtok and From owner-svn-src-all@freebsd.org Mon Jun 29 06:48:35 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3EC44340881; Mon, 29 Jun 2020 06:48:35 +0000 (UTC) (envelope-from gonzo@freebsd.org) Received: from id.bluezbox.com (id.bluezbox.com [45.55.20.155]) (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 49wJ3l0h0cz4Qbx; Mon, 29 Jun 2020 06:48:34 +0000 (UTC) (envelope-from gonzo@freebsd.org) Received: from localhost ([127.0.0.1] helo=id.bluezbox.com) by id.bluezbox.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92 (FreeBSD)) (envelope-from ) id 1jpnaj-000LrB-H6; Sun, 28 Jun 2020 23:48:34 -0700 Received: (from gonzo@localhost) by id.bluezbox.com (8.15.2/8.15.2/Submit) id 05T6mXhj084020; Sun, 28 Jun 2020 23:48:33 -0700 (PDT) (envelope-from gonzo@freebsd.org) X-Authentication-Warning: id.bluezbox.com: gonzo set sender to gonzo@freebsd.org using -f Date: Sun, 28 Jun 2020 23:48:33 -0700 From: Oleksandr Tymoshenko To: Li-Wen Hsu Cc: src-committers , svn-src-all , svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: Re: svn commit: r362767 - in stable/12/usr.bin/mkimg: . tests Message-ID: <20200629064833.GA83997@bluezbox.com> References: <202006290034.05T0YBU7051105@repo.freebsd.org> <20200629062057.GA82989@bluezbox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD/11.2-RELEASE-p10 (amd64) User-Agent: Mutt/1.12.1 (2019-06-15) X-Spam-Level: -- X-Spam-Report: Spam detection software, running on the system "id.bluezbox.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: Li-Wen Hsu (lwhsu@freebsd.org) wrote: > On Mon, Jun 29, 2020 at 2:21 PM Oleksandr Tymoshenko wrote: > > > > Li-Wen Hsu (lwhsu@freebsd.org) wrote: > > > On Mon, Jun 29, 2020 at 8:36 [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Rspamd-Queue-Id: 49wJ3l0h0cz4Qbx X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; ASN(0.00)[asn:14061, ipnet:45.55.0.0/19, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 06:48:35 -0000 Li-Wen Hsu (lwhsu@freebsd.org) wrote: > On Mon, Jun 29, 2020 at 2:21 PM Oleksandr Tymoshenko wrote: > > > > Li-Wen Hsu (lwhsu@freebsd.org) wrote: > > > On Mon, Jun 29, 2020 at 8:36 AM Oleksandr Tymoshenko wrote: > > > > > > > > Author: gonzo > > > > Date: Mon Jun 29 00:34:11 2020 > > > > New Revision: 362767 > > > > URL: https://svnweb.freebsd.org/changeset/base/362767 > > > > > > > > Log: > > > > MFC r361935: > > > > > > > > Add VHDX support to mkimg(1) > > > > > > > > VHDX is the successor of Microsoft's VHD file format. It increases > > > > maximum capacity of the virtual drive to 64TB and introduces features > > > > to better handle power/system failures. > > > > > > > > VHDX is the required format for 2nd generation Hyper-V VMs. > > > > > > > > Reviewed by: marcel > > > > Differential Revision: https://reviews.freebsd.org/D25184 > > > > > > Some mkimg(1) tests are failing after this merge: > > > > > > https://ci.freebsd.org/job/FreeBSD-stable-12-amd64-test/2484/ > > > https://ci.freebsd.org/job/FreeBSD-stable-12-i386-test/2466/ > > > > > > Can you check if there are something related to tests also need merging? > > > > Ooops, sorry for the breakage. Should be fixed in 362772. The problem > > was different format for the reference images. I'll wait to check if > > the commit fixes the test suite on stable/12 for sure and commit fix > > for stable/11 then. > > Thank you for the quick analysis and fix. Perhaps mering the codes to > process the new format of the reference images can easy the process of > future update and MFH? Good point. I assumed it was global change, but looks like it's just mkimg format change. I'll look into merging it both to stable/12 (and reverting current fix) and stable/11. -- gonzo From owner-svn-src-all@freebsd.org Mon Jun 29 07:50:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CAA88341D8B; Mon, 29 Jun 2020 07:50:57 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wKRj4Qyfz4TBd; Mon, 29 Jun 2020 07:50:57 +0000 (UTC) (envelope-from gonzo@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 7A55523F6F; Mon, 29 Jun 2020 07:50:57 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05T7ovbw021993; Mon, 29 Jun 2020 07:50:57 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T7ouvV021987; Mon, 29 Jun 2020 07:50:56 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <202006290750.05T7ouvV021987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 29 Jun 2020 07:50:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362774 - stable/11/usr.bin/mkimg/tests X-SVN-Group: stable-11 X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: stable/11/usr.bin/mkimg/tests X-SVN-Commit-Revision: 362774 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 07:50:57 -0000 Author: gonzo Date: Mon Jun 29 07:50:55 2020 New Revision: 362774 URL: https://svnweb.freebsd.org/changeset/base/362774 Log: MFC r344957: Don't compress and uuencode the "hexdump -C" output files. Just save them with the $FreeBSD$ tag prepended. Changes to these files are now a lot easier to comprehend, which makes diffs also reviewable. Added: stable/11/usr.bin/mkimg/tests/img-1x1-4096-apm.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.qcow.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-apm.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.qcow2.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-apm.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.raw.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-apm.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.vhd.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdf.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-apm.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.vmdk.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-bsd.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-bsd.qcow.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-bsd.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-bsd.qcow2.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-bsd.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-bsd.raw.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhd.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdf.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-bsd.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-bsd.vmdk.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-ebr.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-ebr.qcow.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-ebr.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-ebr.qcow2.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-ebr.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-ebr.raw.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhd.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdf.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-ebr.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-ebr.vmdk.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow2.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-gpt.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-gpt.raw.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhd.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdf.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-gpt.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-gpt.vmdk.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-mbr.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-mbr.qcow.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-mbr.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-mbr.qcow2.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-mbr.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-mbr.raw.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhd.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdf.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-mbr.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-mbr.vmdk.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.qcow.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.qcow2.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.raw.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhd.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdf.hex stable/11/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vmdk.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-apm.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-apm.qcow.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-apm.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-apm.qcow2.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-apm.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-apm.raw.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-apm.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-apm.vhd.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-apm.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-apm.vhdf.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-apm.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-apm.vmdk.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-bsd.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-bsd.qcow.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-bsd.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-bsd.qcow2.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-bsd.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-bsd.raw.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-bsd.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-bsd.vhd.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdf.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-bsd.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-bsd.vmdk.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-ebr.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-ebr.qcow.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-ebr.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-ebr.qcow2.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-ebr.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-ebr.raw.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-ebr.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-ebr.vhd.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdf.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-ebr.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-ebr.vmdk.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow2.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-gpt.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-gpt.raw.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-gpt.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-gpt.vhd.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdf.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-gpt.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-gpt.vmdk.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-mbr.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-mbr.qcow.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-mbr.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-mbr.qcow2.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-mbr.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-mbr.raw.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-mbr.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-mbr.vhd.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdf.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-mbr.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-mbr.vmdk.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-vtoc8.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-vtoc8.qcow.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-vtoc8.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-vtoc8.qcow2.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-vtoc8.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-vtoc8.raw.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhd.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdf.hex stable/11/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vmdk.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-apm.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-apm.qcow.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-apm.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-apm.qcow2.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-apm.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-apm.raw.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-apm.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-apm.vhd.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-apm.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-apm.vhdf.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-apm.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-apm.vmdk.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-bsd.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-bsd.qcow.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-bsd.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-bsd.qcow2.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-bsd.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-bsd.raw.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhd.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhdf.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-bsd.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-bsd.vmdk.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-ebr.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-ebr.qcow.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-ebr.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-ebr.qcow2.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-ebr.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-ebr.raw.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhd.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhdf.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-ebr.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-ebr.vmdk.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow2.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-gpt.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-gpt.raw.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhd.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdf.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-gpt.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-gpt.vmdk.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-mbr.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-mbr.qcow.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-mbr.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-mbr.qcow2.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-mbr.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-mbr.raw.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhd.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhdf.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-mbr.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-mbr.vmdk.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.qcow.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.qcow2.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.raw.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhd.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhdf.hex stable/11/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vmdk.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-apm.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-apm.qcow.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-apm.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-apm.qcow2.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-apm.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-apm.raw.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-apm.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-apm.vhd.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-apm.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-apm.vhdf.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-apm.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-apm.vmdk.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-bsd.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-bsd.qcow.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-bsd.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-bsd.qcow2.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-bsd.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-bsd.raw.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-bsd.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-bsd.vhd.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-bsd.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-bsd.vhdf.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-bsd.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-bsd.vmdk.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-ebr.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-ebr.qcow.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-ebr.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-ebr.qcow2.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-ebr.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-ebr.raw.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-ebr.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-ebr.vhd.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-ebr.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-ebr.vhdf.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-ebr.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-ebr.vmdk.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-gpt.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-gpt.qcow.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-gpt.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-gpt.qcow2.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-gpt.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-gpt.raw.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-gpt.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-gpt.vhd.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdf.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-gpt.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-gpt.vmdk.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-mbr.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-mbr.qcow.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-mbr.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-mbr.qcow2.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-mbr.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-mbr.raw.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-mbr.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-mbr.vhd.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-mbr.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-mbr.vhdf.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-mbr.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-mbr.vmdk.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-vtoc8.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-vtoc8.qcow.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-vtoc8.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-vtoc8.qcow2.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-vtoc8.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-vtoc8.raw.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhd.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhdf.hex stable/11/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vmdk.hex Deleted: stable/11/usr.bin/mkimg/tests/img-1x1-4096-apm.qcow.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-apm.qcow2.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-apm.raw.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-apm.vhd.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdf.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-apm.vmdk.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-bsd.qcow.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-bsd.qcow2.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-bsd.raw.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhd.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdf.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-bsd.vmdk.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-ebr.qcow.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-ebr.qcow2.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-ebr.raw.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhd.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdf.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-ebr.vmdk.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow2.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-gpt.raw.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhd.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdf.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-gpt.vmdk.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-mbr.qcow.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-mbr.qcow2.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-mbr.raw.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhd.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdf.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-mbr.vmdk.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.qcow.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.qcow2.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.raw.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhd.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdf.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vmdk.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-apm.qcow.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-apm.qcow2.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-apm.raw.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-apm.vhd.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-apm.vhdf.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-apm.vmdk.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-bsd.qcow.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-bsd.qcow2.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-bsd.raw.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-bsd.vhd.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdf.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-bsd.vmdk.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-ebr.qcow.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-ebr.qcow2.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-ebr.raw.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-ebr.vhd.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdf.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-ebr.vmdk.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow2.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-gpt.raw.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-gpt.vhd.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdf.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-gpt.vmdk.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-mbr.qcow.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-mbr.qcow2.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-mbr.raw.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-mbr.vhd.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdf.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-mbr.vmdk.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-vtoc8.qcow.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-vtoc8.qcow2.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-vtoc8.raw.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhd.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdf.gz.uu stable/11/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vmdk.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-apm.qcow.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-apm.qcow2.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-apm.raw.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-apm.vhd.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-apm.vhdf.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-apm.vmdk.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-bsd.qcow.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-bsd.qcow2.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-bsd.raw.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhd.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhdf.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-bsd.vmdk.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-ebr.qcow.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-ebr.qcow2.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-ebr.raw.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhd.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhdf.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-ebr.vmdk.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow2.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-gpt.raw.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhd.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdf.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-gpt.vmdk.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-mbr.qcow.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-mbr.qcow2.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-mbr.raw.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhd.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhdf.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-mbr.vmdk.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.qcow.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.qcow2.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.raw.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhd.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhdf.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vmdk.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-apm.qcow.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-apm.qcow2.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-apm.raw.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-apm.vhd.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-apm.vhdf.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-apm.vmdk.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-bsd.qcow.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-bsd.qcow2.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-bsd.raw.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-bsd.vhd.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-bsd.vhdf.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-bsd.vmdk.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-ebr.qcow.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-ebr.qcow2.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-ebr.raw.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-ebr.vhd.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-ebr.vhdf.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-ebr.vmdk.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-gpt.qcow.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-gpt.qcow2.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-gpt.raw.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-gpt.vhd.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdf.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-gpt.vmdk.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-mbr.qcow.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-mbr.qcow2.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-mbr.raw.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-mbr.vhd.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-mbr.vhdf.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-mbr.vmdk.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-vtoc8.qcow.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-vtoc8.qcow2.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-vtoc8.raw.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhd.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhdf.gz.uu stable/11/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vmdk.gz.uu Modified: stable/11/usr.bin/mkimg/tests/Makefile stable/11/usr.bin/mkimg/tests/mkimg_test.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/mkimg/tests/Makefile ============================================================================== --- stable/11/usr.bin/mkimg/tests/Makefile Mon Jun 29 06:28:01 2020 (r362773) +++ stable/11/usr.bin/mkimg/tests/Makefile Mon Jun 29 07:50:55 2020 (r362774) @@ -7,12 +7,12 @@ PACKAGE= tests _REBASE_SCRIPT= mkimg_test ATF_TESTS_SH= ${_REBASE_SCRIPT} -SOURCES!= cd ${.CURDIR}; echo *.uu -${PACKAGE}FILES+= ${SOURCES:S,.gz.uu,,g} +SOURCES!= cd ${.CURDIR}; echo *.hex +${PACKAGE}FILES+= ${SOURCES:S,.hex,,g} .for f in ${${PACKAGE}FILES} -$f: $f.gz.uu - uudecode -p ${.ALLSRC} | gunzip -c > ${.TARGET} +$f: $f.hex + sed -e '/^#.*/D' < ${.ALLSRC} > ${.TARGET} .endfor CLEANFILES+= ${${PACKAGE}FILES}} Copied: stable/11/usr.bin/mkimg/tests/img-1x1-4096-apm.qcow.hex (from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.qcow.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/usr.bin/mkimg/tests/img-1x1-4096-apm.qcow.hex Mon Jun 29 07:50:55 2020 (r362774, copy of r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.qcow.hex) @@ -0,0 +1,550 @@ +# $FreeBSD$ +00000000 51 46 49 fb 00 00 00 01 00 00 00 00 00 00 00 00 |QFI.............| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 42 10 00 |.............B..| +00000020 0c 09 00 00 00 00 00 00 00 00 00 00 00 00 10 00 |................| +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00001000 00 00 00 00 00 00 20 00 00 00 00 00 00 00 30 00 |...... .......0.| +00001010 00 00 00 00 00 00 40 00 00 00 00 00 00 00 00 00 |......@.........| +00001020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00002000 00 00 00 00 00 00 50 00 00 00 00 00 00 00 60 00 |......P.......`.| +00002010 00 00 00 00 00 00 70 00 00 00 00 00 00 00 80 00 |......p.........| +00002020 00 00 00 00 00 00 90 00 00 00 00 00 00 00 a0 00 |................| +00002030 00 00 00 00 00 00 b0 00 00 00 00 00 00 00 c0 00 |................| +00002040 00 00 00 00 00 00 d0 00 00 00 00 00 00 00 e0 00 |................| +00002050 00 00 00 00 00 00 f0 00 00 00 00 00 00 01 00 00 |................| +00002060 00 00 00 00 00 01 10 00 00 00 00 00 00 01 20 00 |.............. .| +00002070 00 00 00 00 00 01 30 00 00 00 00 00 00 01 40 00 |......0.......@.| +00002080 00 00 00 00 00 01 50 00 00 00 00 00 00 01 60 00 |......P.......`.| +00002090 00 00 00 00 00 01 70 00 00 00 00 00 00 01 80 00 |......p.........| +000020a0 00 00 00 00 00 01 90 00 00 00 00 00 00 01 a0 00 |................| +000020b0 00 00 00 00 00 01 b0 00 00 00 00 00 00 01 c0 00 |................| +000020c0 00 00 00 00 00 01 d0 00 00 00 00 00 00 01 e0 00 |................| +000020d0 00 00 00 00 00 01 f0 00 00 00 00 00 00 02 00 00 |................| +000020e0 00 00 00 00 00 02 10 00 00 00 00 00 00 02 20 00 |.............. .| +000020f0 00 00 00 00 00 02 30 00 00 00 00 00 00 02 40 00 |......0.......@.| +00002100 00 00 00 00 00 02 50 00 00 00 00 00 00 02 60 00 |......P.......`.| +00002110 00 00 00 00 00 02 70 00 00 00 00 00 00 02 80 00 |......p.........| +00002120 00 00 00 00 00 02 90 00 00 00 00 00 00 02 a0 00 |................| +00002130 00 00 00 00 00 02 b0 00 00 00 00 00 00 02 c0 00 |................| +00002140 00 00 00 00 00 02 d0 00 00 00 00 00 00 02 e0 00 |................| +00002150 00 00 00 00 00 02 f0 00 00 00 00 00 00 03 00 00 |................| +00002160 00 00 00 00 00 03 10 00 00 00 00 00 00 03 20 00 |.............. .| +00002170 00 00 00 00 00 03 30 00 00 00 00 00 00 03 40 00 |......0.......@.| +00002180 00 00 00 00 00 03 50 00 00 00 00 00 00 03 60 00 |......P.......`.| +00002190 00 00 00 00 00 03 70 00 00 00 00 00 00 03 80 00 |......p.........| +000021a0 00 00 00 00 00 03 90 00 00 00 00 00 00 03 a0 00 |................| +000021b0 00 00 00 00 00 03 b0 00 00 00 00 00 00 03 c0 00 |................| +000021c0 00 00 00 00 00 03 d0 00 00 00 00 00 00 03 e0 00 |................| +000021d0 00 00 00 00 00 03 f0 00 00 00 00 00 00 04 00 00 |................| +000021e0 00 00 00 00 00 04 10 00 00 00 00 00 00 04 20 00 |.............. .| +000021f0 00 00 00 00 00 04 30 00 00 00 00 00 00 04 40 00 |......0.......@.| +00002200 00 00 00 00 00 04 50 00 00 00 00 00 00 04 60 00 |......P.......`.| +00002210 00 00 00 00 00 04 70 00 00 00 00 00 00 04 80 00 |......p.........| +00002220 00 00 00 00 00 04 90 00 00 00 00 00 00 04 a0 00 |................| +00002230 00 00 00 00 00 04 b0 00 00 00 00 00 00 04 c0 00 |................| +00002240 00 00 00 00 00 04 d0 00 00 00 00 00 00 04 e0 00 |................| +00002250 00 00 00 00 00 04 f0 00 00 00 00 00 00 05 00 00 |................| +00002260 00 00 00 00 00 05 10 00 00 00 00 00 00 05 20 00 |.............. .| +00002270 00 00 00 00 00 05 30 00 00 00 00 00 00 05 40 00 |......0.......@.| +00002280 00 00 00 00 00 05 50 00 00 00 00 00 00 05 60 00 |......P.......`.| +00002290 00 00 00 00 00 05 70 00 00 00 00 00 00 05 80 00 |......p.........| +000022a0 00 00 00 00 00 05 90 00 00 00 00 00 00 05 a0 00 |................| +000022b0 00 00 00 00 00 05 b0 00 00 00 00 00 00 05 c0 00 |................| +000022c0 00 00 00 00 00 05 d0 00 00 00 00 00 00 05 e0 00 |................| +000022d0 00 00 00 00 00 05 f0 00 00 00 00 00 00 06 00 00 |................| +000022e0 00 00 00 00 00 06 10 00 00 00 00 00 00 06 20 00 |.............. .| +000022f0 00 00 00 00 00 06 30 00 00 00 00 00 00 06 40 00 |......0.......@.| +00002300 00 00 00 00 00 06 50 00 00 00 00 00 00 06 60 00 |......P.......`.| +00002310 00 00 00 00 00 06 70 00 00 00 00 00 00 06 80 00 |......p.........| +00002320 00 00 00 00 00 06 90 00 00 00 00 00 00 06 a0 00 |................| +00002330 00 00 00 00 00 06 b0 00 00 00 00 00 00 06 c0 00 |................| +00002340 00 00 00 00 00 06 d0 00 00 00 00 00 00 06 e0 00 |................| +00002350 00 00 00 00 00 06 f0 00 00 00 00 00 00 07 00 00 |................| +00002360 00 00 00 00 00 07 10 00 00 00 00 00 00 07 20 00 |.............. .| +00002370 00 00 00 00 00 07 30 00 00 00 00 00 00 07 40 00 |......0.......@.| +00002380 00 00 00 00 00 07 50 00 00 00 00 00 00 07 60 00 |......P.......`.| +00002390 00 00 00 00 00 07 70 00 00 00 00 00 00 07 80 00 |......p.........| +000023a0 00 00 00 00 00 07 90 00 00 00 00 00 00 07 a0 00 |................| +000023b0 00 00 00 00 00 07 b0 00 00 00 00 00 00 07 c0 00 |................| +000023c0 00 00 00 00 00 07 d0 00 00 00 00 00 00 07 e0 00 |................| +000023d0 00 00 00 00 00 07 f0 00 00 00 00 00 00 08 00 00 |................| +000023e0 00 00 00 00 00 08 10 00 00 00 00 00 00 08 20 00 |.............. .| +000023f0 00 00 00 00 00 08 30 00 00 00 00 00 00 08 40 00 |......0.......@.| +00002400 00 00 00 00 00 08 50 00 00 00 00 00 00 08 60 00 |......P.......`.| +00002410 00 00 00 00 00 08 70 00 00 00 00 00 00 08 80 00 |......p.........| +00002420 00 00 00 00 00 08 90 00 00 00 00 00 00 08 a0 00 |................| +00002430 00 00 00 00 00 08 b0 00 00 00 00 00 00 08 c0 00 |................| +00002440 00 00 00 00 00 08 d0 00 00 00 00 00 00 08 e0 00 |................| +00002450 00 00 00 00 00 08 f0 00 00 00 00 00 00 09 00 00 |................| +00002460 00 00 00 00 00 09 10 00 00 00 00 00 00 09 20 00 |.............. .| +00002470 00 00 00 00 00 09 30 00 00 00 00 00 00 09 40 00 |......0.......@.| +00002480 00 00 00 00 00 09 50 00 00 00 00 00 00 09 60 00 |......P.......`.| +00002490 00 00 00 00 00 09 70 00 00 00 00 00 00 09 80 00 |......p.........| +000024a0 00 00 00 00 00 09 90 00 00 00 00 00 00 09 a0 00 |................| +000024b0 00 00 00 00 00 09 b0 00 00 00 00 00 00 09 c0 00 |................| +000024c0 00 00 00 00 00 09 d0 00 00 00 00 00 00 09 e0 00 |................| +000024d0 00 00 00 00 00 09 f0 00 00 00 00 00 00 0a 00 00 |................| +000024e0 00 00 00 00 00 0a 10 00 00 00 00 00 00 0a 20 00 |.............. .| +000024f0 00 00 00 00 00 0a 30 00 00 00 00 00 00 0a 40 00 |......0.......@.| +00002500 00 00 00 00 00 0a 50 00 00 00 00 00 00 0a 60 00 |......P.......`.| +00002510 00 00 00 00 00 0a 70 00 00 00 00 00 00 0a 80 00 |......p.........| +00002520 00 00 00 00 00 0a 90 00 00 00 00 00 00 0a a0 00 |................| +00002530 00 00 00 00 00 0a b0 00 00 00 00 00 00 0a c0 00 |................| +00002540 00 00 00 00 00 0a d0 00 00 00 00 00 00 0a e0 00 |................| +00002550 00 00 00 00 00 0a f0 00 00 00 00 00 00 0b 00 00 |................| +00002560 00 00 00 00 00 0b 10 00 00 00 00 00 00 0b 20 00 |.............. .| +00002570 00 00 00 00 00 0b 30 00 00 00 00 00 00 0b 40 00 |......0.......@.| +00002580 00 00 00 00 00 0b 50 00 00 00 00 00 00 0b 60 00 |......P.......`.| +00002590 00 00 00 00 00 0b 70 00 00 00 00 00 00 0b 80 00 |......p.........| +000025a0 00 00 00 00 00 0b 90 00 00 00 00 00 00 0b a0 00 |................| +000025b0 00 00 00 00 00 0b b0 00 00 00 00 00 00 0b c0 00 |................| +000025c0 00 00 00 00 00 0b d0 00 00 00 00 00 00 0b e0 00 |................| +000025d0 00 00 00 00 00 0b f0 00 00 00 00 00 00 0c 00 00 |................| +000025e0 00 00 00 00 00 0c 10 00 00 00 00 00 00 0c 20 00 |.............. .| +000025f0 00 00 00 00 00 0c 30 00 00 00 00 00 00 0c 40 00 |......0.......@.| +00002600 00 00 00 00 00 0c 50 00 00 00 00 00 00 0c 60 00 |......P.......`.| +00002610 00 00 00 00 00 0c 70 00 00 00 00 00 00 0c 80 00 |......p.........| +00002620 00 00 00 00 00 0c 90 00 00 00 00 00 00 0c a0 00 |................| +00002630 00 00 00 00 00 0c b0 00 00 00 00 00 00 0c c0 00 |................| +00002640 00 00 00 00 00 0c d0 00 00 00 00 00 00 0c e0 00 |................| +00002650 00 00 00 00 00 0c f0 00 00 00 00 00 00 0d 00 00 |................| +00002660 00 00 00 00 00 0d 10 00 00 00 00 00 00 0d 20 00 |.............. .| +00002670 00 00 00 00 00 0d 30 00 00 00 00 00 00 0d 40 00 |......0.......@.| +00002680 00 00 00 00 00 0d 50 00 00 00 00 00 00 0d 60 00 |......P.......`.| +00002690 00 00 00 00 00 0d 70 00 00 00 00 00 00 0d 80 00 |......p.........| +000026a0 00 00 00 00 00 0d 90 00 00 00 00 00 00 0d a0 00 |................| +000026b0 00 00 00 00 00 0d b0 00 00 00 00 00 00 0d c0 00 |................| +000026c0 00 00 00 00 00 0d d0 00 00 00 00 00 00 0d e0 00 |................| +000026d0 00 00 00 00 00 0d f0 00 00 00 00 00 00 0e 00 00 |................| +000026e0 00 00 00 00 00 0e 10 00 00 00 00 00 00 0e 20 00 |.............. .| +000026f0 00 00 00 00 00 0e 30 00 00 00 00 00 00 0e 40 00 |......0.......@.| +00002700 00 00 00 00 00 0e 50 00 00 00 00 00 00 0e 60 00 |......P.......`.| +00002710 00 00 00 00 00 0e 70 00 00 00 00 00 00 0e 80 00 |......p.........| +00002720 00 00 00 00 00 0e 90 00 00 00 00 00 00 0e a0 00 |................| +00002730 00 00 00 00 00 0e b0 00 00 00 00 00 00 0e c0 00 |................| +00002740 00 00 00 00 00 0e d0 00 00 00 00 00 00 0e e0 00 |................| +00002750 00 00 00 00 00 0e f0 00 00 00 00 00 00 0f 00 00 |................| +00002760 00 00 00 00 00 0f 10 00 00 00 00 00 00 0f 20 00 |.............. .| +00002770 00 00 00 00 00 0f 30 00 00 00 00 00 00 0f 40 00 |......0.......@.| +00002780 00 00 00 00 00 0f 50 00 00 00 00 00 00 0f 60 00 |......P.......`.| +00002790 00 00 00 00 00 0f 70 00 00 00 00 00 00 0f 80 00 |......p.........| +000027a0 00 00 00 00 00 0f 90 00 00 00 00 00 00 0f a0 00 |................| +000027b0 00 00 00 00 00 0f b0 00 00 00 00 00 00 0f c0 00 |................| +000027c0 00 00 00 00 00 0f d0 00 00 00 00 00 00 0f e0 00 |................| +000027d0 00 00 00 00 00 0f f0 00 00 00 00 00 00 10 00 00 |................| +000027e0 00 00 00 00 00 10 10 00 00 00 00 00 00 10 20 00 |.............. .| +000027f0 00 00 00 00 00 10 30 00 00 00 00 00 00 10 40 00 |......0.......@.| +00002800 00 00 00 00 00 10 50 00 00 00 00 00 00 10 60 00 |......P.......`.| +00002810 00 00 00 00 00 10 70 00 00 00 00 00 00 10 80 00 |......p.........| +00002820 00 00 00 00 00 10 90 00 00 00 00 00 00 10 a0 00 |................| +00002830 00 00 00 00 00 10 b0 00 00 00 00 00 00 10 c0 00 |................| +00002840 00 00 00 00 00 10 d0 00 00 00 00 00 00 10 e0 00 |................| +00002850 00 00 00 00 00 10 f0 00 00 00 00 00 00 11 00 00 |................| +00002860 00 00 00 00 00 11 10 00 00 00 00 00 00 11 20 00 |.............. .| +00002870 00 00 00 00 00 11 30 00 00 00 00 00 00 11 40 00 |......0.......@.| +00002880 00 00 00 00 00 11 50 00 00 00 00 00 00 11 60 00 |......P.......`.| +00002890 00 00 00 00 00 11 70 00 00 00 00 00 00 11 80 00 |......p.........| +000028a0 00 00 00 00 00 11 90 00 00 00 00 00 00 11 a0 00 |................| +000028b0 00 00 00 00 00 11 b0 00 00 00 00 00 00 11 c0 00 |................| +000028c0 00 00 00 00 00 11 d0 00 00 00 00 00 00 11 e0 00 |................| +000028d0 00 00 00 00 00 11 f0 00 00 00 00 00 00 12 00 00 |................| +000028e0 00 00 00 00 00 12 10 00 00 00 00 00 00 12 20 00 |.............. .| +000028f0 00 00 00 00 00 12 30 00 00 00 00 00 00 12 40 00 |......0.......@.| +00002900 00 00 00 00 00 12 50 00 00 00 00 00 00 12 60 00 |......P.......`.| +00002910 00 00 00 00 00 12 70 00 00 00 00 00 00 12 80 00 |......p.........| +00002920 00 00 00 00 00 12 90 00 00 00 00 00 00 12 a0 00 |................| +00002930 00 00 00 00 00 12 b0 00 00 00 00 00 00 12 c0 00 |................| +00002940 00 00 00 00 00 12 d0 00 00 00 00 00 00 12 e0 00 |................| +00002950 00 00 00 00 00 12 f0 00 00 00 00 00 00 13 00 00 |................| +00002960 00 00 00 00 00 13 10 00 00 00 00 00 00 13 20 00 |.............. .| +00002970 00 00 00 00 00 13 30 00 00 00 00 00 00 13 40 00 |......0.......@.| +00002980 00 00 00 00 00 13 50 00 00 00 00 00 00 13 60 00 |......P.......`.| +00002990 00 00 00 00 00 13 70 00 00 00 00 00 00 13 80 00 |......p.........| +000029a0 00 00 00 00 00 13 90 00 00 00 00 00 00 13 a0 00 |................| +000029b0 00 00 00 00 00 13 b0 00 00 00 00 00 00 13 c0 00 |................| +000029c0 00 00 00 00 00 13 d0 00 00 00 00 00 00 13 e0 00 |................| +000029d0 00 00 00 00 00 13 f0 00 00 00 00 00 00 14 00 00 |................| +000029e0 00 00 00 00 00 14 10 00 00 00 00 00 00 14 20 00 |.............. .| +000029f0 00 00 00 00 00 14 30 00 00 00 00 00 00 14 40 00 |......0.......@.| +00002a00 00 00 00 00 00 14 50 00 00 00 00 00 00 14 60 00 |......P.......`.| +00002a10 00 00 00 00 00 14 70 00 00 00 00 00 00 14 80 00 |......p.........| +00002a20 00 00 00 00 00 14 90 00 00 00 00 00 00 14 a0 00 |................| +00002a30 00 00 00 00 00 14 b0 00 00 00 00 00 00 14 c0 00 |................| +00002a40 00 00 00 00 00 14 d0 00 00 00 00 00 00 14 e0 00 |................| +00002a50 00 00 00 00 00 14 f0 00 00 00 00 00 00 15 00 00 |................| +00002a60 00 00 00 00 00 15 10 00 00 00 00 00 00 15 20 00 |.............. .| +00002a70 00 00 00 00 00 15 30 00 00 00 00 00 00 15 40 00 |......0.......@.| +00002a80 00 00 00 00 00 15 50 00 00 00 00 00 00 15 60 00 |......P.......`.| +00002a90 00 00 00 00 00 15 70 00 00 00 00 00 00 15 80 00 |......p.........| +00002aa0 00 00 00 00 00 15 90 00 00 00 00 00 00 15 a0 00 |................| +00002ab0 00 00 00 00 00 15 b0 00 00 00 00 00 00 15 c0 00 |................| +00002ac0 00 00 00 00 00 15 d0 00 00 00 00 00 00 15 e0 00 |................| +00002ad0 00 00 00 00 00 15 f0 00 00 00 00 00 00 16 00 00 |................| +00002ae0 00 00 00 00 00 16 10 00 00 00 00 00 00 16 20 00 |.............. .| +00002af0 00 00 00 00 00 16 30 00 00 00 00 00 00 16 40 00 |......0.......@.| +00002b00 00 00 00 00 00 16 50 00 00 00 00 00 00 16 60 00 |......P.......`.| +00002b10 00 00 00 00 00 16 70 00 00 00 00 00 00 16 80 00 |......p.........| +00002b20 00 00 00 00 00 16 90 00 00 00 00 00 00 16 a0 00 |................| +00002b30 00 00 00 00 00 16 b0 00 00 00 00 00 00 16 c0 00 |................| +00002b40 00 00 00 00 00 16 d0 00 00 00 00 00 00 16 e0 00 |................| +00002b50 00 00 00 00 00 16 f0 00 00 00 00 00 00 17 00 00 |................| +00002b60 00 00 00 00 00 17 10 00 00 00 00 00 00 17 20 00 |.............. .| +00002b70 00 00 00 00 00 17 30 00 00 00 00 00 00 17 40 00 |......0.......@.| +00002b80 00 00 00 00 00 17 50 00 00 00 00 00 00 17 60 00 |......P.......`.| +00002b90 00 00 00 00 00 17 70 00 00 00 00 00 00 17 80 00 |......p.........| +00002ba0 00 00 00 00 00 17 90 00 00 00 00 00 00 17 a0 00 |................| +00002bb0 00 00 00 00 00 17 b0 00 00 00 00 00 00 17 c0 00 |................| +00002bc0 00 00 00 00 00 17 d0 00 00 00 00 00 00 17 e0 00 |................| +00002bd0 00 00 00 00 00 17 f0 00 00 00 00 00 00 18 00 00 |................| +00002be0 00 00 00 00 00 18 10 00 00 00 00 00 00 18 20 00 |.............. .| +00002bf0 00 00 00 00 00 18 30 00 00 00 00 00 00 18 40 00 |......0.......@.| +00002c00 00 00 00 00 00 18 50 00 00 00 00 00 00 18 60 00 |......P.......`.| +00002c10 00 00 00 00 00 18 70 00 00 00 00 00 00 18 80 00 |......p.........| +00002c20 00 00 00 00 00 18 90 00 00 00 00 00 00 18 a0 00 |................| +00002c30 00 00 00 00 00 18 b0 00 00 00 00 00 00 18 c0 00 |................| +00002c40 00 00 00 00 00 18 d0 00 00 00 00 00 00 18 e0 00 |................| +00002c50 00 00 00 00 00 18 f0 00 00 00 00 00 00 19 00 00 |................| +00002c60 00 00 00 00 00 19 10 00 00 00 00 00 00 19 20 00 |.............. .| +00002c70 00 00 00 00 00 19 30 00 00 00 00 00 00 19 40 00 |......0.......@.| +00002c80 00 00 00 00 00 19 50 00 00 00 00 00 00 19 60 00 |......P.......`.| +00002c90 00 00 00 00 00 19 70 00 00 00 00 00 00 19 80 00 |......p.........| +00002ca0 00 00 00 00 00 19 90 00 00 00 00 00 00 19 a0 00 |................| +00002cb0 00 00 00 00 00 19 b0 00 00 00 00 00 00 19 c0 00 |................| +00002cc0 00 00 00 00 00 19 d0 00 00 00 00 00 00 19 e0 00 |................| +00002cd0 00 00 00 00 00 19 f0 00 00 00 00 00 00 1a 00 00 |................| +00002ce0 00 00 00 00 00 1a 10 00 00 00 00 00 00 1a 20 00 |.............. .| +00002cf0 00 00 00 00 00 1a 30 00 00 00 00 00 00 1a 40 00 |......0.......@.| +00002d00 00 00 00 00 00 1a 50 00 00 00 00 00 00 1a 60 00 |......P.......`.| +00002d10 00 00 00 00 00 1a 70 00 00 00 00 00 00 1a 80 00 |......p.........| +00002d20 00 00 00 00 00 1a 90 00 00 00 00 00 00 1a a0 00 |................| +00002d30 00 00 00 00 00 1a b0 00 00 00 00 00 00 1a c0 00 |................| +00002d40 00 00 00 00 00 1a d0 00 00 00 00 00 00 1a e0 00 |................| +00002d50 00 00 00 00 00 1a f0 00 00 00 00 00 00 1b 00 00 |................| +00002d60 00 00 00 00 00 1b 10 00 00 00 00 00 00 1b 20 00 |.............. .| +00002d70 00 00 00 00 00 1b 30 00 00 00 00 00 00 1b 40 00 |......0.......@.| +00002d80 00 00 00 00 00 1b 50 00 00 00 00 00 00 1b 60 00 |......P.......`.| +00002d90 00 00 00 00 00 1b 70 00 00 00 00 00 00 1b 80 00 |......p.........| +00002da0 00 00 00 00 00 1b 90 00 00 00 00 00 00 1b a0 00 |................| +00002db0 00 00 00 00 00 1b b0 00 00 00 00 00 00 1b c0 00 |................| +00002dc0 00 00 00 00 00 1b d0 00 00 00 00 00 00 1b e0 00 |................| +00002dd0 00 00 00 00 00 1b f0 00 00 00 00 00 00 1c 00 00 |................| +00002de0 00 00 00 00 00 1c 10 00 00 00 00 00 00 1c 20 00 |.............. .| +00002df0 00 00 00 00 00 1c 30 00 00 00 00 00 00 1c 40 00 |......0.......@.| +00002e00 00 00 00 00 00 1c 50 00 00 00 00 00 00 1c 60 00 |......P.......`.| +00002e10 00 00 00 00 00 1c 70 00 00 00 00 00 00 1c 80 00 |......p.........| +00002e20 00 00 00 00 00 1c 90 00 00 00 00 00 00 1c a0 00 |................| +00002e30 00 00 00 00 00 1c b0 00 00 00 00 00 00 1c c0 00 |................| +00002e40 00 00 00 00 00 1c d0 00 00 00 00 00 00 1c e0 00 |................| +00002e50 00 00 00 00 00 1c f0 00 00 00 00 00 00 1d 00 00 |................| +00002e60 00 00 00 00 00 1d 10 00 00 00 00 00 00 1d 20 00 |.............. .| +00002e70 00 00 00 00 00 1d 30 00 00 00 00 00 00 1d 40 00 |......0.......@.| +00002e80 00 00 00 00 00 1d 50 00 00 00 00 00 00 1d 60 00 |......P.......`.| +00002e90 00 00 00 00 00 1d 70 00 00 00 00 00 00 1d 80 00 |......p.........| +00002ea0 00 00 00 00 00 1d 90 00 00 00 00 00 00 1d a0 00 |................| +00002eb0 00 00 00 00 00 1d b0 00 00 00 00 00 00 1d c0 00 |................| +00002ec0 00 00 00 00 00 1d d0 00 00 00 00 00 00 1d e0 00 |................| +00002ed0 00 00 00 00 00 1d f0 00 00 00 00 00 00 1e 00 00 |................| +00002ee0 00 00 00 00 00 1e 10 00 00 00 00 00 00 1e 20 00 |.............. .| +00002ef0 00 00 00 00 00 1e 30 00 00 00 00 00 00 1e 40 00 |......0.......@.| +00002f00 00 00 00 00 00 1e 50 00 00 00 00 00 00 1e 60 00 |......P.......`.| +00002f10 00 00 00 00 00 1e 70 00 00 00 00 00 00 1e 80 00 |......p.........| +00002f20 00 00 00 00 00 1e 90 00 00 00 00 00 00 1e a0 00 |................| +00002f30 00 00 00 00 00 1e b0 00 00 00 00 00 00 1e c0 00 |................| +00002f40 00 00 00 00 00 1e d0 00 00 00 00 00 00 1e e0 00 |................| +00002f50 00 00 00 00 00 1e f0 00 00 00 00 00 00 1f 00 00 |................| +00002f60 00 00 00 00 00 1f 10 00 00 00 00 00 00 1f 20 00 |.............. .| +00002f70 00 00 00 00 00 1f 30 00 00 00 00 00 00 1f 40 00 |......0.......@.| +00002f80 00 00 00 00 00 1f 50 00 00 00 00 00 00 1f 60 00 |......P.......`.| +00002f90 00 00 00 00 00 1f 70 00 00 00 00 00 00 1f 80 00 |......p.........| +00002fa0 00 00 00 00 00 1f 90 00 00 00 00 00 00 1f a0 00 |................| +00002fb0 00 00 00 00 00 1f b0 00 00 00 00 00 00 1f c0 00 |................| +00002fc0 00 00 00 00 00 1f d0 00 00 00 00 00 00 1f e0 00 |................| +00002fd0 00 00 00 00 00 1f f0 00 00 00 00 00 00 20 00 00 |............. ..| +00002fe0 00 00 00 00 00 20 10 00 00 00 00 00 00 20 20 00 |..... ....... .| +00002ff0 00 00 00 00 00 20 30 00 00 00 00 00 00 20 40 00 |..... 0...... @.| +00003000 00 00 00 00 00 20 50 00 00 00 00 00 00 20 60 00 |..... P...... `.| +00003010 00 00 00 00 00 20 70 00 00 00 00 00 00 20 80 00 |..... p...... ..| +00003020 00 00 00 00 00 20 90 00 00 00 00 00 00 20 a0 00 |..... ....... ..| +00003030 00 00 00 00 00 20 b0 00 00 00 00 00 00 20 c0 00 |..... ....... ..| +00003040 00 00 00 00 00 20 d0 00 00 00 00 00 00 20 e0 00 |..... ....... ..| +00003050 00 00 00 00 00 20 f0 00 00 00 00 00 00 21 00 00 |..... .......!..| +00003060 00 00 00 00 00 21 10 00 00 00 00 00 00 21 20 00 |.....!.......! .| +00003070 00 00 00 00 00 21 30 00 00 00 00 00 00 21 40 00 |.....!0......!@.| +00003080 00 00 00 00 00 21 50 00 00 00 00 00 00 21 60 00 |.....!P......!`.| +00003090 00 00 00 00 00 21 70 00 00 00 00 00 00 21 80 00 |.....!p......!..| +000030a0 00 00 00 00 00 21 90 00 00 00 00 00 00 21 a0 00 |.....!.......!..| +000030b0 00 00 00 00 00 21 b0 00 00 00 00 00 00 21 c0 00 |.....!.......!..| +000030c0 00 00 00 00 00 21 d0 00 00 00 00 00 00 21 e0 00 |.....!.......!..| +000030d0 00 00 00 00 00 21 f0 00 00 00 00 00 00 22 00 00 |.....!......."..| +000030e0 00 00 00 00 00 22 10 00 00 00 00 00 00 22 20 00 |....."......." .| +000030f0 00 00 00 00 00 22 30 00 00 00 00 00 00 22 40 00 |....."0......"@.| +00003100 00 00 00 00 00 22 50 00 00 00 00 00 00 22 60 00 |....."P......"`.| +00003110 00 00 00 00 00 22 70 00 00 00 00 00 00 22 80 00 |....."p......"..| +00003120 00 00 00 00 00 22 90 00 00 00 00 00 00 22 a0 00 |....."......."..| +00003130 00 00 00 00 00 22 b0 00 00 00 00 00 00 22 c0 00 |....."......."..| +00003140 00 00 00 00 00 22 d0 00 00 00 00 00 00 22 e0 00 |....."......."..| +00003150 00 00 00 00 00 22 f0 00 00 00 00 00 00 23 00 00 |.....".......#..| +00003160 00 00 00 00 00 23 10 00 00 00 00 00 00 23 20 00 |.....#.......# .| +00003170 00 00 00 00 00 23 30 00 00 00 00 00 00 23 40 00 |.....#0......#@.| +00003180 00 00 00 00 00 23 50 00 00 00 00 00 00 23 60 00 |.....#P......#`.| +00003190 00 00 00 00 00 23 70 00 00 00 00 00 00 23 80 00 |.....#p......#..| +000031a0 00 00 00 00 00 23 90 00 00 00 00 00 00 23 a0 00 |.....#.......#..| +000031b0 00 00 00 00 00 23 b0 00 00 00 00 00 00 23 c0 00 |.....#.......#..| +000031c0 00 00 00 00 00 23 d0 00 00 00 00 00 00 23 e0 00 |.....#.......#..| +000031d0 00 00 00 00 00 23 f0 00 00 00 00 00 00 24 00 00 |.....#.......$..| +000031e0 00 00 00 00 00 24 10 00 00 00 00 00 00 24 20 00 |.....$.......$ .| +000031f0 00 00 00 00 00 24 30 00 00 00 00 00 00 24 40 00 |.....$0......$@.| +00003200 00 00 00 00 00 24 50 00 00 00 00 00 00 24 60 00 |.....$P......$`.| +00003210 00 00 00 00 00 24 70 00 00 00 00 00 00 24 80 00 |.....$p......$..| +00003220 00 00 00 00 00 24 90 00 00 00 00 00 00 24 a0 00 |.....$.......$..| +00003230 00 00 00 00 00 24 b0 00 00 00 00 00 00 24 c0 00 |.....$.......$..| +00003240 00 00 00 00 00 24 d0 00 00 00 00 00 00 24 e0 00 |.....$.......$..| +00003250 00 00 00 00 00 24 f0 00 00 00 00 00 00 25 00 00 |.....$.......%..| +00003260 00 00 00 00 00 25 10 00 00 00 00 00 00 25 20 00 |.....%.......% .| +00003270 00 00 00 00 00 25 30 00 00 00 00 00 00 25 40 00 |.....%0......%@.| +00003280 00 00 00 00 00 25 50 00 00 00 00 00 00 25 60 00 |.....%P......%`.| +00003290 00 00 00 00 00 25 70 00 00 00 00 00 00 25 80 00 |.....%p......%..| +000032a0 00 00 00 00 00 25 90 00 00 00 00 00 00 25 a0 00 |.....%.......%..| +000032b0 00 00 00 00 00 25 b0 00 00 00 00 00 00 25 c0 00 |.....%.......%..| +000032c0 00 00 00 00 00 25 d0 00 00 00 00 00 00 25 e0 00 |.....%.......%..| +000032d0 00 00 00 00 00 25 f0 00 00 00 00 00 00 26 00 00 |.....%.......&..| +000032e0 00 00 00 00 00 26 10 00 00 00 00 00 00 26 20 00 |.....&.......& .| +000032f0 00 00 00 00 00 26 30 00 00 00 00 00 00 26 40 00 |.....&0......&@.| +00003300 00 00 00 00 00 26 50 00 00 00 00 00 00 26 60 00 |.....&P......&`.| +00003310 00 00 00 00 00 26 70 00 00 00 00 00 00 26 80 00 |.....&p......&..| +00003320 00 00 00 00 00 26 90 00 00 00 00 00 00 26 a0 00 |.....&.......&..| +00003330 00 00 00 00 00 26 b0 00 00 00 00 00 00 26 c0 00 |.....&.......&..| +00003340 00 00 00 00 00 26 d0 00 00 00 00 00 00 26 e0 00 |.....&.......&..| +00003350 00 00 00 00 00 26 f0 00 00 00 00 00 00 27 00 00 |.....&.......'..| +00003360 00 00 00 00 00 27 10 00 00 00 00 00 00 27 20 00 |.....'.......' .| +00003370 00 00 00 00 00 27 30 00 00 00 00 00 00 27 40 00 |.....'0......'@.| +00003380 00 00 00 00 00 27 50 00 00 00 00 00 00 27 60 00 |.....'P......'`.| +00003390 00 00 00 00 00 27 70 00 00 00 00 00 00 27 80 00 |.....'p......'..| +000033a0 00 00 00 00 00 27 90 00 00 00 00 00 00 27 a0 00 |.....'.......'..| +000033b0 00 00 00 00 00 27 b0 00 00 00 00 00 00 27 c0 00 |.....'.......'..| +000033c0 00 00 00 00 00 27 d0 00 00 00 00 00 00 27 e0 00 |.....'.......'..| +000033d0 00 00 00 00 00 27 f0 00 00 00 00 00 00 28 00 00 |.....'.......(..| +000033e0 00 00 00 00 00 28 10 00 00 00 00 00 00 28 20 00 |.....(.......( .| +000033f0 00 00 00 00 00 28 30 00 00 00 00 00 00 28 40 00 |.....(0......(@.| +00003400 00 00 00 00 00 28 50 00 00 00 00 00 00 28 60 00 |.....(P......(`.| +00003410 00 00 00 00 00 28 70 00 00 00 00 00 00 28 80 00 |.....(p......(..| +00003420 00 00 00 00 00 28 90 00 00 00 00 00 00 28 a0 00 |.....(.......(..| +00003430 00 00 00 00 00 28 b0 00 00 00 00 00 00 28 c0 00 |.....(.......(..| +00003440 00 00 00 00 00 28 d0 00 00 00 00 00 00 28 e0 00 |.....(.......(..| +00003450 00 00 00 00 00 28 f0 00 00 00 00 00 00 29 00 00 |.....(.......)..| +00003460 00 00 00 00 00 29 10 00 00 00 00 00 00 29 20 00 |.....).......) .| +00003470 00 00 00 00 00 29 30 00 00 00 00 00 00 29 40 00 |.....)0......)@.| +00003480 00 00 00 00 00 29 50 00 00 00 00 00 00 29 60 00 |.....)P......)`.| +00003490 00 00 00 00 00 29 70 00 00 00 00 00 00 29 80 00 |.....)p......)..| +000034a0 00 00 00 00 00 29 90 00 00 00 00 00 00 29 a0 00 |.....).......)..| +000034b0 00 00 00 00 00 29 b0 00 00 00 00 00 00 29 c0 00 |.....).......)..| +000034c0 00 00 00 00 00 29 d0 00 00 00 00 00 00 29 e0 00 |.....).......)..| +000034d0 00 00 00 00 00 29 f0 00 00 00 00 00 00 2a 00 00 |.....).......*..| +000034e0 00 00 00 00 00 2a 10 00 00 00 00 00 00 2a 20 00 |.....*.......* .| +000034f0 00 00 00 00 00 2a 30 00 00 00 00 00 00 2a 40 00 |.....*0......*@.| +00003500 00 00 00 00 00 2a 50 00 00 00 00 00 00 2a 60 00 |.....*P......*`.| +00003510 00 00 00 00 00 2a 70 00 00 00 00 00 00 2a 80 00 |.....*p......*..| +00003520 00 00 00 00 00 2a 90 00 00 00 00 00 00 2a a0 00 |.....*.......*..| +00003530 00 00 00 00 00 2a b0 00 00 00 00 00 00 2a c0 00 |.....*.......*..| +00003540 00 00 00 00 00 2a d0 00 00 00 00 00 00 2a e0 00 |.....*.......*..| +00003550 00 00 00 00 00 2a f0 00 00 00 00 00 00 2b 00 00 |.....*.......+..| +00003560 00 00 00 00 00 2b 10 00 00 00 00 00 00 2b 20 00 |.....+.......+ .| +00003570 00 00 00 00 00 2b 30 00 00 00 00 00 00 2b 40 00 |.....+0......+@.| +00003580 00 00 00 00 00 2b 50 00 00 00 00 00 00 2b 60 00 |.....+P......+`.| +00003590 00 00 00 00 00 2b 70 00 00 00 00 00 00 2b 80 00 |.....+p......+..| +000035a0 00 00 00 00 00 2b 90 00 00 00 00 00 00 2b a0 00 |.....+.......+..| +000035b0 00 00 00 00 00 2b b0 00 00 00 00 00 00 2b c0 00 |.....+.......+..| +000035c0 00 00 00 00 00 2b d0 00 00 00 00 00 00 2b e0 00 |.....+.......+..| +000035d0 00 00 00 00 00 2b f0 00 00 00 00 00 00 2c 00 00 |.....+.......,..| +000035e0 00 00 00 00 00 2c 10 00 00 00 00 00 00 2c 20 00 |.....,......., .| +000035f0 00 00 00 00 00 2c 30 00 00 00 00 00 00 2c 40 00 |.....,0......,@.| +00003600 00 00 00 00 00 2c 50 00 00 00 00 00 00 2c 60 00 |.....,P......,`.| +00003610 00 00 00 00 00 2c 70 00 00 00 00 00 00 2c 80 00 |.....,p......,..| +00003620 00 00 00 00 00 2c 90 00 00 00 00 00 00 2c a0 00 |.....,.......,..| +00003630 00 00 00 00 00 2c b0 00 00 00 00 00 00 2c c0 00 |.....,.......,..| +00003640 00 00 00 00 00 2c d0 00 00 00 00 00 00 2c e0 00 |.....,.......,..| +00003650 00 00 00 00 00 2c f0 00 00 00 00 00 00 2d 00 00 |.....,.......-..| +00003660 00 00 00 00 00 2d 10 00 00 00 00 00 00 2d 20 00 |.....-.......- .| +00003670 00 00 00 00 00 2d 30 00 00 00 00 00 00 2d 40 00 |.....-0......-@.| +00003680 00 00 00 00 00 2d 50 00 00 00 00 00 00 2d 60 00 |.....-P......-`.| +00003690 00 00 00 00 00 2d 70 00 00 00 00 00 00 2d 80 00 |.....-p......-..| +000036a0 00 00 00 00 00 2d 90 00 00 00 00 00 00 2d a0 00 |.....-.......-..| +000036b0 00 00 00 00 00 2d b0 00 00 00 00 00 00 2d c0 00 |.....-.......-..| +000036c0 00 00 00 00 00 2d d0 00 00 00 00 00 00 2d e0 00 |.....-.......-..| +000036d0 00 00 00 00 00 2d f0 00 00 00 00 00 00 2e 00 00 |.....-..........| +000036e0 00 00 00 00 00 2e 10 00 00 00 00 00 00 2e 20 00 |.............. .| +000036f0 00 00 00 00 00 2e 30 00 00 00 00 00 00 2e 40 00 |......0.......@.| +00003700 00 00 00 00 00 2e 50 00 00 00 00 00 00 2e 60 00 |......P.......`.| +00003710 00 00 00 00 00 2e 70 00 00 00 00 00 00 2e 80 00 |......p.........| +00003720 00 00 00 00 00 2e 90 00 00 00 00 00 00 2e a0 00 |................| +00003730 00 00 00 00 00 2e b0 00 00 00 00 00 00 2e c0 00 |................| +00003740 00 00 00 00 00 2e d0 00 00 00 00 00 00 2e e0 00 |................| +00003750 00 00 00 00 00 2e f0 00 00 00 00 00 00 2f 00 00 |............./..| +00003760 00 00 00 00 00 2f 10 00 00 00 00 00 00 2f 20 00 |...../......./ .| +00003770 00 00 00 00 00 2f 30 00 00 00 00 00 00 2f 40 00 |...../0....../@.| +00003780 00 00 00 00 00 2f 50 00 00 00 00 00 00 2f 60 00 |...../P....../`.| +00003790 00 00 00 00 00 2f 70 00 00 00 00 00 00 2f 80 00 |...../p....../..| +000037a0 00 00 00 00 00 2f 90 00 00 00 00 00 00 2f a0 00 |...../......./..| +000037b0 00 00 00 00 00 2f b0 00 00 00 00 00 00 2f c0 00 |...../......./..| +000037c0 00 00 00 00 00 2f d0 00 00 00 00 00 00 2f e0 00 |...../......./..| +000037d0 00 00 00 00 00 2f f0 00 00 00 00 00 00 30 00 00 |...../.......0..| +000037e0 00 00 00 00 00 30 10 00 00 00 00 00 00 30 20 00 |.....0.......0 .| +000037f0 00 00 00 00 00 30 30 00 00 00 00 00 00 30 40 00 |.....00......0@.| +00003800 00 00 00 00 00 30 50 00 00 00 00 00 00 30 60 00 |.....0P......0`.| +00003810 00 00 00 00 00 30 70 00 00 00 00 00 00 30 80 00 |.....0p......0..| +00003820 00 00 00 00 00 30 90 00 00 00 00 00 00 30 a0 00 |.....0.......0..| +00003830 00 00 00 00 00 30 b0 00 00 00 00 00 00 30 c0 00 |.....0.......0..| +00003840 00 00 00 00 00 30 d0 00 00 00 00 00 00 30 e0 00 |.....0.......0..| +00003850 00 00 00 00 00 30 f0 00 00 00 00 00 00 31 00 00 |.....0.......1..| +00003860 00 00 00 00 00 31 10 00 00 00 00 00 00 31 20 00 |.....1.......1 .| +00003870 00 00 00 00 00 31 30 00 00 00 00 00 00 31 40 00 |.....10......1@.| +00003880 00 00 00 00 00 31 50 00 00 00 00 00 00 31 60 00 |.....1P......1`.| +00003890 00 00 00 00 00 31 70 00 00 00 00 00 00 31 80 00 |.....1p......1..| +000038a0 00 00 00 00 00 31 90 00 00 00 00 00 00 31 a0 00 |.....1.......1..| +000038b0 00 00 00 00 00 31 b0 00 00 00 00 00 00 31 c0 00 |.....1.......1..| +000038c0 00 00 00 00 00 31 d0 00 00 00 00 00 00 31 e0 00 |.....1.......1..| +000038d0 00 00 00 00 00 31 f0 00 00 00 00 00 00 32 00 00 |.....1.......2..| +000038e0 00 00 00 00 00 32 10 00 00 00 00 00 00 32 20 00 |.....2.......2 .| +000038f0 00 00 00 00 00 32 30 00 00 00 00 00 00 32 40 00 |.....20......2@.| +00003900 00 00 00 00 00 32 50 00 00 00 00 00 00 32 60 00 |.....2P......2`.| +00003910 00 00 00 00 00 32 70 00 00 00 00 00 00 32 80 00 |.....2p......2..| +00003920 00 00 00 00 00 32 90 00 00 00 00 00 00 32 a0 00 |.....2.......2..| +00003930 00 00 00 00 00 32 b0 00 00 00 00 00 00 32 c0 00 |.....2.......2..| +00003940 00 00 00 00 00 32 d0 00 00 00 00 00 00 32 e0 00 |.....2.......2..| +00003950 00 00 00 00 00 32 f0 00 00 00 00 00 00 33 00 00 |.....2.......3..| +00003960 00 00 00 00 00 33 10 00 00 00 00 00 00 33 20 00 |.....3.......3 .| +00003970 00 00 00 00 00 33 30 00 00 00 00 00 00 33 40 00 |.....30......3@.| +00003980 00 00 00 00 00 33 50 00 00 00 00 00 00 33 60 00 |.....3P......3`.| +00003990 00 00 00 00 00 33 70 00 00 00 00 00 00 33 80 00 |.....3p......3..| +000039a0 00 00 00 00 00 33 90 00 00 00 00 00 00 33 a0 00 |.....3.......3..| +000039b0 00 00 00 00 00 33 b0 00 00 00 00 00 00 33 c0 00 |.....3.......3..| +000039c0 00 00 00 00 00 33 d0 00 00 00 00 00 00 33 e0 00 |.....3.......3..| +000039d0 00 00 00 00 00 33 f0 00 00 00 00 00 00 34 00 00 |.....3.......4..| +000039e0 00 00 00 00 00 34 10 00 00 00 00 00 00 34 20 00 |.....4.......4 .| +000039f0 00 00 00 00 00 34 30 00 00 00 00 00 00 34 40 00 |.....40......4@.| +00003a00 00 00 00 00 00 34 50 00 00 00 00 00 00 34 60 00 |.....4P......4`.| +00003a10 00 00 00 00 00 34 70 00 00 00 00 00 00 34 80 00 |.....4p......4..| +00003a20 00 00 00 00 00 34 90 00 00 00 00 00 00 34 a0 00 |.....4.......4..| +00003a30 00 00 00 00 00 34 b0 00 00 00 00 00 00 34 c0 00 |.....4.......4..| +00003a40 00 00 00 00 00 34 d0 00 00 00 00 00 00 34 e0 00 |.....4.......4..| +00003a50 00 00 00 00 00 34 f0 00 00 00 00 00 00 35 00 00 |.....4.......5..| +00003a60 00 00 00 00 00 35 10 00 00 00 00 00 00 35 20 00 |.....5.......5 .| +00003a70 00 00 00 00 00 35 30 00 00 00 00 00 00 35 40 00 |.....50......5@.| +00003a80 00 00 00 00 00 35 50 00 00 00 00 00 00 35 60 00 |.....5P......5`.| +00003a90 00 00 00 00 00 35 70 00 00 00 00 00 00 35 80 00 |.....5p......5..| +00003aa0 00 00 00 00 00 35 90 00 00 00 00 00 00 35 a0 00 |.....5.......5..| +00003ab0 00 00 00 00 00 35 b0 00 00 00 00 00 00 35 c0 00 |.....5.......5..| +00003ac0 00 00 00 00 00 35 d0 00 00 00 00 00 00 35 e0 00 |.....5.......5..| +00003ad0 00 00 00 00 00 35 f0 00 00 00 00 00 00 36 00 00 |.....5.......6..| +00003ae0 00 00 00 00 00 36 10 00 00 00 00 00 00 36 20 00 |.....6.......6 .| +00003af0 00 00 00 00 00 36 30 00 00 00 00 00 00 36 40 00 |.....60......6@.| +00003b00 00 00 00 00 00 36 50 00 00 00 00 00 00 36 60 00 |.....6P......6`.| +00003b10 00 00 00 00 00 36 70 00 00 00 00 00 00 36 80 00 |.....6p......6..| +00003b20 00 00 00 00 00 36 90 00 00 00 00 00 00 36 a0 00 |.....6.......6..| +00003b30 00 00 00 00 00 36 b0 00 00 00 00 00 00 36 c0 00 |.....6.......6..| +00003b40 00 00 00 00 00 36 d0 00 00 00 00 00 00 36 e0 00 |.....6.......6..| +00003b50 00 00 00 00 00 36 f0 00 00 00 00 00 00 37 00 00 |.....6.......7..| +00003b60 00 00 00 00 00 37 10 00 00 00 00 00 00 37 20 00 |.....7.......7 .| +00003b70 00 00 00 00 00 37 30 00 00 00 00 00 00 37 40 00 |.....70......7@.| +00003b80 00 00 00 00 00 37 50 00 00 00 00 00 00 37 60 00 |.....7P......7`.| +00003b90 00 00 00 00 00 37 70 00 00 00 00 00 00 37 80 00 |.....7p......7..| +00003ba0 00 00 00 00 00 37 90 00 00 00 00 00 00 37 a0 00 |.....7.......7..| +00003bb0 00 00 00 00 00 37 b0 00 00 00 00 00 00 37 c0 00 |.....7.......7..| +00003bc0 00 00 00 00 00 37 d0 00 00 00 00 00 00 37 e0 00 |.....7.......7..| +00003bd0 00 00 00 00 00 37 f0 00 00 00 00 00 00 38 00 00 |.....7.......8..| +00003be0 00 00 00 00 00 38 10 00 00 00 00 00 00 38 20 00 |.....8.......8 .| +00003bf0 00 00 00 00 00 38 30 00 00 00 00 00 00 38 40 00 |.....80......8@.| +00003c00 00 00 00 00 00 38 50 00 00 00 00 00 00 38 60 00 |.....8P......8`.| +00003c10 00 00 00 00 00 38 70 00 00 00 00 00 00 38 80 00 |.....8p......8..| +00003c20 00 00 00 00 00 38 90 00 00 00 00 00 00 38 a0 00 |.....8.......8..| +00003c30 00 00 00 00 00 38 b0 00 00 00 00 00 00 38 c0 00 |.....8.......8..| +00003c40 00 00 00 00 00 38 d0 00 00 00 00 00 00 38 e0 00 |.....8.......8..| +00003c50 00 00 00 00 00 38 f0 00 00 00 00 00 00 39 00 00 |.....8.......9..| +00003c60 00 00 00 00 00 39 10 00 00 00 00 00 00 39 20 00 |.....9.......9 .| +00003c70 00 00 00 00 00 39 30 00 00 00 00 00 00 39 40 00 |.....90......9@.| +00003c80 00 00 00 00 00 39 50 00 00 00 00 00 00 39 60 00 |.....9P......9`.| +00003c90 00 00 00 00 00 39 70 00 00 00 00 00 00 39 80 00 |.....9p......9..| +00003ca0 00 00 00 00 00 39 90 00 00 00 00 00 00 39 a0 00 |.....9.......9..| +00003cb0 00 00 00 00 00 39 b0 00 00 00 00 00 00 39 c0 00 |.....9.......9..| +00003cc0 00 00 00 00 00 39 d0 00 00 00 00 00 00 39 e0 00 |.....9.......9..| +00003cd0 00 00 00 00 00 39 f0 00 00 00 00 00 00 3a 00 00 |.....9.......:..| +00003ce0 00 00 00 00 00 3a 10 00 00 00 00 00 00 3a 20 00 |.....:.......: .| +00003cf0 00 00 00 00 00 3a 30 00 00 00 00 00 00 3a 40 00 |.....:0......:@.| +00003d00 00 00 00 00 00 3a 50 00 00 00 00 00 00 3a 60 00 |.....:P......:`.| +00003d10 00 00 00 00 00 3a 70 00 00 00 00 00 00 3a 80 00 |.....:p......:..| +00003d20 00 00 00 00 00 3a 90 00 00 00 00 00 00 3a a0 00 |.....:.......:..| +00003d30 00 00 00 00 00 3a b0 00 00 00 00 00 00 3a c0 00 |.....:.......:..| +00003d40 00 00 00 00 00 3a d0 00 00 00 00 00 00 3a e0 00 |.....:.......:..| +00003d50 00 00 00 00 00 3a f0 00 00 00 00 00 00 3b 00 00 |.....:.......;..| +00003d60 00 00 00 00 00 3b 10 00 00 00 00 00 00 3b 20 00 |.....;.......; .| +00003d70 00 00 00 00 00 3b 30 00 00 00 00 00 00 3b 40 00 |.....;0......;@.| +00003d80 00 00 00 00 00 3b 50 00 00 00 00 00 00 3b 60 00 |.....;P......;`.| +00003d90 00 00 00 00 00 3b 70 00 00 00 00 00 00 3b 80 00 |.....;p......;..| +00003da0 00 00 00 00 00 3b 90 00 00 00 00 00 00 3b a0 00 |.....;.......;..| +00003db0 00 00 00 00 00 3b b0 00 00 00 00 00 00 3b c0 00 |.....;.......;..| +00003dc0 00 00 00 00 00 3b d0 00 00 00 00 00 00 3b e0 00 |.....;.......;..| +00003dd0 00 00 00 00 00 3b f0 00 00 00 00 00 00 3c 00 00 |.....;.......<..| +00003de0 00 00 00 00 00 3c 10 00 00 00 00 00 00 3c 20 00 |.....<.......< .| +00003df0 00 00 00 00 00 3c 30 00 00 00 00 00 00 3c 40 00 |.....<0......<@.| +00003e00 00 00 00 00 00 3c 50 00 00 00 00 00 00 3c 60 00 |.......| +00003ee0 00 00 00 00 00 3e 10 00 00 00 00 00 00 3e 20 00 |.....>.......> .| +00003ef0 00 00 00 00 00 3e 30 00 00 00 00 00 00 3e 40 00 |.....>0......>@.| +00003f00 00 00 00 00 00 3e 50 00 00 00 00 00 00 3e 60 00 |.....>P......>`.| +00003f10 00 00 00 00 00 3e 70 00 00 00 00 00 00 3e 80 00 |.....>p......>..| +00003f20 00 00 00 00 00 3e 90 00 00 00 00 00 00 3e a0 00 |.....>.......>..| +00003f30 00 00 00 00 00 3e b0 00 00 00 00 00 00 3e c0 00 |.....>.......>..| +00003f40 00 00 00 00 00 3e d0 00 00 00 00 00 00 3e e0 00 |.....>.......>..| +00003f50 00 00 00 00 00 3e f0 00 00 00 00 00 00 3f 00 00 |.....>.......?..| +00003f60 00 00 00 00 00 3f 10 00 00 00 00 00 00 3f 20 00 |.....?.......? .| +00003f70 00 00 00 00 00 3f 30 00 00 00 00 00 00 3f 40 00 |.....?0......?@.| +00003f80 00 00 00 00 00 3f 50 00 00 00 00 00 00 3f 60 00 |.....?P......?`.| +00003f90 00 00 00 00 00 3f 70 00 00 00 00 00 00 3f 80 00 |.....?p......?..| +00003fa0 00 00 00 00 00 3f 90 00 00 00 00 00 00 3f a0 00 |.....?.......?..| +00003fb0 00 00 00 00 00 3f b0 00 00 00 00 00 00 3f c0 00 |.....?.......?..| +00003fc0 00 00 00 00 00 3f d0 00 00 00 00 00 00 3f e0 00 |.....?.......?..| +00003fd0 00 00 00 00 00 3f f0 00 00 00 00 00 00 40 00 00 |.....?.......@..| +00003fe0 00 00 00 00 00 40 10 00 00 00 00 00 00 40 20 00 |.....@.......@ .| +00003ff0 00 00 00 00 00 40 30 00 00 00 00 00 00 40 40 00 |.....@0......@@.| +00004000 00 00 00 00 00 40 50 00 00 00 00 00 00 00 00 00 |.....@P.........| +00004010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00005000 45 52 02 00 00 00 21 08 00 00 00 00 00 00 00 00 |ER....!.........| +00005010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00005200 50 4d 00 00 00 00 00 03 00 00 00 01 00 00 00 03 |PM..............| +00005210 41 70 70 6c 65 00 00 00 00 00 00 00 00 00 00 00 |Apple...........| +00005220 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00005230 41 70 70 6c 65 5f 70 61 72 74 69 74 69 6f 6e 5f |Apple_partition_| +00005240 6d 61 70 00 00 00 00 00 00 00 00 00 00 00 00 00 |map.............| +00005250 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00005400 50 4d 00 00 00 00 00 03 00 00 00 08 00 00 20 00 |PM............ .| +00005410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00005430 46 72 65 65 42 53 44 2d 55 46 53 00 00 00 00 00 |FreeBSD-UFS.....| +00005440 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00005600 50 4d 00 00 00 00 00 03 00 00 20 08 00 00 01 00 |PM........ .....| +00005610 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00005630 46 72 65 65 42 53 44 2d 73 77 61 70 00 00 00 00 |FreeBSD-swap....| +00005640 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00006000 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00406000 Copied: stable/11/usr.bin/mkimg/tests/img-1x1-4096-apm.qcow2.hex (from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.qcow2.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/usr.bin/mkimg/tests/img-1x1-4096-apm.qcow2.hex Mon Jun 29 07:50:55 2020 (r362774, copy of r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.qcow2.hex) @@ -0,0 +1,80 @@ +# $FreeBSD$ +00000000 51 46 49 fb 00 00 00 02 00 00 00 00 00 00 00 00 |QFI.............| +00000010 00 00 00 00 00 00 00 10 00 00 00 00 00 43 00 00 |.............C..| +00000020 00 00 00 00 00 00 00 01 00 00 00 00 00 01 00 00 |................| +00000030 00 00 00 00 00 02 00 00 00 00 00 01 00 00 00 00 |................| +00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 80 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 |................| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 00 00 00 00 00 04 00 00 00 00 00 00 00 00 00 00 |................| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 80 00 00 00 00 05 00 00 80 00 00 00 00 06 00 00 |................| +00030010 80 00 00 00 00 07 00 00 80 00 00 00 00 08 00 00 |................| +00030020 80 00 00 00 00 09 00 00 80 00 00 00 00 0a 00 00 |................| +00030030 80 00 00 00 00 0b 00 00 80 00 00 00 00 0c 00 00 |................| +00030040 80 00 00 00 00 0d 00 00 80 00 00 00 00 0e 00 00 |................| +00030050 80 00 00 00 00 0f 00 00 80 00 00 00 00 10 00 00 |................| +00030060 80 00 00 00 00 11 00 00 80 00 00 00 00 12 00 00 |................| +00030070 80 00 00 00 00 13 00 00 80 00 00 00 00 14 00 00 |................| +00030080 80 00 00 00 00 15 00 00 80 00 00 00 00 16 00 00 |................| +00030090 80 00 00 00 00 17 00 00 80 00 00 00 00 18 00 00 |................| +000300a0 80 00 00 00 00 19 00 00 80 00 00 00 00 1a 00 00 |................| +000300b0 80 00 00 00 00 1b 00 00 80 00 00 00 00 1c 00 00 |................| +000300c0 80 00 00 00 00 1d 00 00 80 00 00 00 00 1e 00 00 |................| +000300d0 80 00 00 00 00 1f 00 00 80 00 00 00 00 20 00 00 |............. ..| +000300e0 80 00 00 00 00 21 00 00 80 00 00 00 00 22 00 00 |.....!......."..| +000300f0 80 00 00 00 00 23 00 00 80 00 00 00 00 24 00 00 |.....#.......$..| +00030100 80 00 00 00 00 25 00 00 80 00 00 00 00 26 00 00 |.....%.......&..| +00030110 80 00 00 00 00 27 00 00 80 00 00 00 00 28 00 00 |.....'.......(..| +00030120 80 00 00 00 00 29 00 00 80 00 00 00 00 2a 00 00 |.....).......*..| +00030130 80 00 00 00 00 2b 00 00 80 00 00 00 00 2c 00 00 |.....+.......,..| +00030140 80 00 00 00 00 2d 00 00 80 00 00 00 00 2e 00 00 |.....-..........| +00030150 80 00 00 00 00 2f 00 00 80 00 00 00 00 30 00 00 |...../.......0..| +00030160 80 00 00 00 00 31 00 00 80 00 00 00 00 32 00 00 |.....1.......2..| +00030170 80 00 00 00 00 33 00 00 80 00 00 00 00 34 00 00 |.....3.......4..| +00030180 80 00 00 00 00 35 00 00 80 00 00 00 00 36 00 00 |.....5.......6..| +00030190 80 00 00 00 00 37 00 00 80 00 00 00 00 38 00 00 |.....7.......8..| +000301a0 80 00 00 00 00 39 00 00 80 00 00 00 00 3a 00 00 |.....9.......:..| +000301b0 80 00 00 00 00 3b 00 00 80 00 00 00 00 3c 00 00 |.....;.......<..| +000301c0 80 00 00 00 00 3d 00 00 80 00 00 00 00 3e 00 00 |.....=.......>..| +000301d0 80 00 00 00 00 3f 00 00 80 00 00 00 00 40 00 00 |.....?.......@..| +000301e0 80 00 00 00 00 41 00 00 80 00 00 00 00 42 00 00 |.....A.......B..| +000301f0 80 00 00 00 00 43 00 00 80 00 00 00 00 44 00 00 |.....C.......D..| +00030200 80 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 |.....E..........| +00030210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 00 01 00 01 00 01 00 01 00 01 00 01 00 01 00 01 |................| +* +00040080 00 01 00 01 00 01 00 01 00 01 00 01 00 00 00 00 |................| +00040090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00050000 45 52 02 00 00 00 21 80 00 00 00 00 00 00 00 00 |ER....!.........| +00050010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00050200 50 4d 00 00 00 00 00 03 00 00 00 01 00 00 00 03 |PM..............| +00050210 41 70 70 6c 65 00 00 00 00 00 00 00 00 00 00 00 |Apple...........| +00050220 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00050230 41 70 70 6c 65 5f 70 61 72 74 69 74 69 6f 6e 5f |Apple_partition_| +00050240 6d 61 70 00 00 00 00 00 00 00 00 00 00 00 00 00 |map.............| +00050250 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00050400 50 4d 00 00 00 00 00 03 00 00 00 08 00 00 20 00 |PM............ .| +00050410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00050430 46 72 65 65 42 53 44 2d 55 46 53 00 00 00 00 00 |FreeBSD-UFS.....| +00050440 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00050600 50 4d 00 00 00 00 00 03 00 00 20 08 00 00 01 00 |PM........ .....| +00050610 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00050630 46 72 65 65 42 53 44 2d 73 77 61 70 00 00 00 00 |FreeBSD-swap....| +00050640 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00051000 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00451000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00460000 Copied: stable/11/usr.bin/mkimg/tests/img-1x1-4096-apm.raw.hex (from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.raw.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/usr.bin/mkimg/tests/img-1x1-4096-apm.raw.hex Mon Jun 29 07:50:55 2020 (r362774, copy of r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.raw.hex) @@ -0,0 +1,28 @@ +# $FreeBSD$ +00000000 45 52 02 00 00 00 21 08 00 00 00 00 00 00 00 00 |ER....!.........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000200 50 4d 00 00 00 00 00 03 00 00 00 01 00 00 00 03 |PM..............| +00000210 41 70 70 6c 65 00 00 00 00 00 00 00 00 00 00 00 |Apple...........| +00000220 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00000230 41 70 70 6c 65 5f 70 61 72 74 69 74 69 6f 6e 5f |Apple_partition_| +00000240 6d 61 70 00 00 00 00 00 00 00 00 00 00 00 00 00 |map.............| +00000250 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000400 50 4d 00 00 00 00 00 03 00 00 00 08 00 00 20 00 |PM............ .| +00000410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000430 46 72 65 65 42 53 44 2d 55 46 53 00 00 00 00 00 |FreeBSD-UFS.....| +00000440 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000600 50 4d 00 00 00 00 00 03 00 00 20 08 00 00 01 00 |PM........ .....| +00000610 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000630 46 72 65 65 42 53 44 2d 73 77 61 70 00 00 00 00 |FreeBSD-swap....| +00000640 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00001000 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00401000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00421000 Copied: stable/11/usr.bin/mkimg/tests/img-1x1-4096-apm.vhd.hex (from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.vhd.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/usr.bin/mkimg/tests/img-1x1-4096-apm.vhd.hex Mon Jun 29 07:50:55 2020 (r362774, copy of r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.vhd.hex) @@ -0,0 +1,60 @@ +# $FreeBSD$ +00000000 63 6f 6e 65 63 74 69 78 00 00 00 02 00 01 00 00 |conectix........| +00000010 00 00 00 00 00 00 02 00 01 23 45 67 2a 69 6d 67 |.........#Eg*img| +00000020 00 02 00 00 57 69 32 6b 00 00 00 00 00 42 68 00 |....Wi2k.....Bh.| +00000030 00 00 00 00 00 42 68 00 00 7d 04 11 00 00 00 03 |.....Bh..}......| +00000040 ff ff f7 0e 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00000050 01 01 01 01 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00000060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000200 63 78 73 70 61 72 73 65 ff ff ff ff ff ff ff ff |cxsparse........| +00000210 00 00 00 00 00 00 06 00 00 01 00 00 00 00 00 03 |................| +00000220 00 20 00 00 ff ff f4 74 00 00 00 00 00 00 00 00 |. .....t........| +00000230 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000600 00 00 00 04 00 00 10 05 00 00 20 06 ff ff ff ff |.......... .....| +00000610 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| +* +00000a00 45 52 02 00 00 00 21 34 00 00 00 00 00 00 00 00 |ER....!4........| +00000a10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000c00 50 4d 00 00 00 00 00 03 00 00 00 01 00 00 00 03 |PM..............| +00000c10 41 70 70 6c 65 00 00 00 00 00 00 00 00 00 00 00 |Apple...........| +00000c20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00000c30 41 70 70 6c 65 5f 70 61 72 74 69 74 69 6f 6e 5f |Apple_partition_| +00000c40 6d 61 70 00 00 00 00 00 00 00 00 00 00 00 00 00 |map.............| +00000c50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000e00 50 4d 00 00 00 00 00 03 00 00 00 08 00 00 20 00 |PM............ .| +00000e10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000e30 46 72 65 65 42 53 44 2d 55 46 53 00 00 00 00 00 |FreeBSD-UFS.....| +00000e40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00001000 50 4d 00 00 00 00 00 03 00 00 20 08 00 00 01 00 |PM........ .....| +00001010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00001030 46 72 65 65 42 53 44 2d 73 77 61 70 00 00 00 00 |FreeBSD-swap....| +00001040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00001a00 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00200a00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| +* +00200c00 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00400c00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| +* +00400e00 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00401e00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00600e00 63 6f 6e 65 63 74 69 78 00 00 00 02 00 01 00 00 |conectix........| +00600e10 00 00 00 00 00 00 02 00 01 23 45 67 2a 69 6d 67 |.........#Eg*img| +00600e20 00 02 00 00 57 69 32 6b 00 00 00 00 00 42 68 00 |....Wi2k.....Bh.| +00600e30 00 00 00 00 00 42 68 00 00 7d 04 11 00 00 00 03 |.....Bh..}......| +00600e40 ff ff f7 0e 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00600e50 01 01 01 01 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00600e60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00601000 Copied: stable/11/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdf.hex (from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdf.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdf.hex Mon Jun 29 07:50:55 2020 (r362774, copy of r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdf.hex) @@ -0,0 +1,36 @@ +# $FreeBSD$ +00000000 45 52 02 00 00 00 28 00 00 00 00 00 00 00 00 00 |ER....(.........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000200 50 4d 00 00 00 00 00 03 00 00 00 01 00 00 00 03 |PM..............| +00000210 41 70 70 6c 65 00 00 00 00 00 00 00 00 00 00 00 |Apple...........| +00000220 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00000230 41 70 70 6c 65 5f 70 61 72 74 69 74 69 6f 6e 5f |Apple_partition_| +00000240 6d 61 70 00 00 00 00 00 00 00 00 00 00 00 00 00 |map.............| +00000250 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000400 50 4d 00 00 00 00 00 03 00 00 00 08 00 00 20 00 |PM............ .| +00000410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000430 46 72 65 65 42 53 44 2d 55 46 53 00 00 00 00 00 |FreeBSD-UFS.....| +00000440 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000600 50 4d 00 00 00 00 00 03 00 00 20 08 00 00 01 00 |PM........ .....| +00000610 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000630 46 72 65 65 42 53 44 2d 73 77 61 70 00 00 00 00 |FreeBSD-swap....| +00000640 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00001000 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00401000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00500000 63 6f 6e 65 63 74 69 78 00 00 00 02 00 01 00 00 |conectix........| +00500010 ff ff ff ff ff ff ff ff 01 23 45 67 2a 69 6d 67 |.........#Eg*img| +00500020 00 02 00 00 57 69 32 6b 00 00 00 00 00 50 00 00 |....Wi2k.....P..| +00500030 00 00 00 00 00 50 00 00 00 96 04 11 00 00 00 02 |.....P..........| +00500040 ff ff ef b4 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00500050 01 01 01 01 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00500060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00500200 Copied: stable/11/usr.bin/mkimg/tests/img-1x1-4096-apm.vmdk.hex (from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.vmdk.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/usr.bin/mkimg/tests/img-1x1-4096-apm.vmdk.hex Mon Jun 29 07:50:55 2020 (r362774, copy of r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.vmdk.hex) @@ -0,0 +1,322 @@ +# $FreeBSD$ +00000000 4b 44 4d 56 01 00 00 00 03 00 00 00 00 28 00 00 |KDMV.........(..| +00000010 00 00 00 00 10 00 00 00 00 00 00 00 01 00 00 00 |................| +00000020 00 00 00 00 01 00 00 00 00 00 00 00 00 02 00 00 |................| +00000030 0b 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 |................| +00000040 20 00 00 00 00 00 00 00 00 0a 20 0d 0a 00 00 00 | ......... .....| +00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000200 23 20 44 69 73 6b 20 44 65 73 63 72 69 70 74 6f |# Disk Descripto| +00000210 72 46 69 6c 65 0a 76 65 72 73 69 6f 6e 3d 31 0a |rFile.version=1.| +00000220 43 49 44 3d 30 30 30 30 30 30 30 30 0a 70 61 72 |CID=00000000.par| +00000230 65 6e 74 43 49 44 3d 66 66 66 66 66 66 66 66 0a |entCID=ffffffff.| +00000240 63 72 65 61 74 65 54 79 70 65 3d 22 6d 6f 6e 6f |createType="mono| +00000250 6c 69 74 68 69 63 53 70 61 72 73 65 22 0a 23 20 |lithicSparse".# | +00000260 45 78 74 65 6e 74 20 64 65 73 63 72 69 70 74 69 |Extent descripti| +00000270 6f 6e 0a 52 57 20 31 30 32 34 30 20 53 50 41 52 |on.RW 10240 SPAR| +00000280 53 45 20 22 22 0a 23 20 54 68 65 20 44 69 73 6b |SE "".# The Disk| +00000290 20 44 61 74 61 20 42 61 73 65 0a 23 44 44 42 0a | Data Base.#DDB.| +000002a0 64 64 62 2e 61 64 61 70 74 65 72 54 79 70 65 20 |ddb.adapterType | +000002b0 3d 20 22 69 64 65 22 0a 64 64 62 2e 67 65 6f 6d |= "ide".ddb.geom| +000002c0 65 74 72 79 2e 63 79 6c 69 6e 64 65 72 73 20 3d |etry.cylinders =| +000002d0 20 22 31 30 32 34 30 22 0a 64 64 62 2e 67 65 6f | "10240".ddb.geo| +000002e0 6d 65 74 72 79 2e 68 65 61 64 73 20 3d 20 22 31 |metry.heads = "1| +000002f0 22 0a 64 64 62 2e 67 65 6f 6d 65 74 72 79 2e 73 |".ddb.geometry.s| +00000300 65 63 74 6f 72 73 20 3d 20 22 31 22 0a 00 00 00 |ectors = "1"....| +00000310 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000400 03 00 00 00 07 00 00 00 00 00 00 00 00 00 00 00 |................| +00000410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000600 20 00 00 00 30 00 00 00 40 00 00 00 50 00 00 00 | ...0...@...P...| +00000610 60 00 00 00 70 00 00 00 80 00 00 00 90 00 00 00 |`...p...........| +00000620 a0 00 00 00 b0 00 00 00 c0 00 00 00 d0 00 00 00 |................| +00000630 e0 00 00 00 f0 00 00 00 00 01 00 00 10 01 00 00 |................| +00000640 20 01 00 00 30 01 00 00 40 01 00 00 50 01 00 00 | ...0...@...P...| +00000650 60 01 00 00 70 01 00 00 80 01 00 00 90 01 00 00 |`...p...........| +00000660 a0 01 00 00 b0 01 00 00 c0 01 00 00 d0 01 00 00 |................| +00000670 e0 01 00 00 f0 01 00 00 00 02 00 00 10 02 00 00 |................| +00000680 20 02 00 00 30 02 00 00 40 02 00 00 50 02 00 00 | ...0...@...P...| +00000690 60 02 00 00 70 02 00 00 80 02 00 00 90 02 00 00 |`...p...........| +000006a0 a0 02 00 00 b0 02 00 00 c0 02 00 00 d0 02 00 00 |................| +000006b0 e0 02 00 00 f0 02 00 00 00 03 00 00 10 03 00 00 |................| +000006c0 20 03 00 00 30 03 00 00 40 03 00 00 50 03 00 00 | ...0...@...P...| +000006d0 60 03 00 00 70 03 00 00 80 03 00 00 90 03 00 00 |`...p...........| +000006e0 a0 03 00 00 b0 03 00 00 c0 03 00 00 d0 03 00 00 |................| +000006f0 e0 03 00 00 f0 03 00 00 00 04 00 00 10 04 00 00 |................| +00000700 20 04 00 00 30 04 00 00 40 04 00 00 50 04 00 00 | ...0...@...P...| +00000710 60 04 00 00 70 04 00 00 80 04 00 00 90 04 00 00 |`...p...........| +00000720 a0 04 00 00 b0 04 00 00 c0 04 00 00 d0 04 00 00 |................| +00000730 e0 04 00 00 f0 04 00 00 00 05 00 00 10 05 00 00 |................| +00000740 20 05 00 00 30 05 00 00 40 05 00 00 50 05 00 00 | ...0...@...P...| +00000750 60 05 00 00 70 05 00 00 80 05 00 00 90 05 00 00 |`...p...........| +00000760 a0 05 00 00 b0 05 00 00 c0 05 00 00 d0 05 00 00 |................| +00000770 e0 05 00 00 f0 05 00 00 00 06 00 00 10 06 00 00 |................| +00000780 20 06 00 00 30 06 00 00 40 06 00 00 50 06 00 00 | ...0...@...P...| +00000790 60 06 00 00 70 06 00 00 80 06 00 00 90 06 00 00 |`...p...........| +000007a0 a0 06 00 00 b0 06 00 00 c0 06 00 00 d0 06 00 00 |................| +000007b0 e0 06 00 00 f0 06 00 00 00 07 00 00 10 07 00 00 |................| +000007c0 20 07 00 00 30 07 00 00 40 07 00 00 50 07 00 00 | ...0...@...P...| +000007d0 60 07 00 00 70 07 00 00 80 07 00 00 90 07 00 00 |`...p...........| +000007e0 a0 07 00 00 b0 07 00 00 c0 07 00 00 d0 07 00 00 |................| +000007f0 e0 07 00 00 f0 07 00 00 00 08 00 00 10 08 00 00 |................| +00000800 20 08 00 00 30 08 00 00 40 08 00 00 50 08 00 00 | ...0...@...P...| +00000810 60 08 00 00 70 08 00 00 80 08 00 00 90 08 00 00 |`...p...........| +00000820 a0 08 00 00 b0 08 00 00 c0 08 00 00 d0 08 00 00 |................| +00000830 e0 08 00 00 f0 08 00 00 00 09 00 00 10 09 00 00 |................| +00000840 20 09 00 00 30 09 00 00 40 09 00 00 50 09 00 00 | ...0...@...P...| +00000850 60 09 00 00 70 09 00 00 80 09 00 00 90 09 00 00 |`...p...........| +00000860 a0 09 00 00 b0 09 00 00 c0 09 00 00 d0 09 00 00 |................| +00000870 e0 09 00 00 f0 09 00 00 00 0a 00 00 10 0a 00 00 |................| +00000880 20 0a 00 00 30 0a 00 00 40 0a 00 00 50 0a 00 00 | ...0...@...P...| +00000890 60 0a 00 00 70 0a 00 00 80 0a 00 00 90 0a 00 00 |`...p...........| +000008a0 a0 0a 00 00 b0 0a 00 00 c0 0a 00 00 d0 0a 00 00 |................| +000008b0 e0 0a 00 00 f0 0a 00 00 00 0b 00 00 10 0b 00 00 |................| +000008c0 20 0b 00 00 30 0b 00 00 40 0b 00 00 50 0b 00 00 | ...0...@...P...| +000008d0 60 0b 00 00 70 0b 00 00 80 0b 00 00 90 0b 00 00 |`...p...........| +000008e0 a0 0b 00 00 b0 0b 00 00 c0 0b 00 00 d0 0b 00 00 |................| +000008f0 e0 0b 00 00 f0 0b 00 00 00 0c 00 00 10 0c 00 00 |................| +00000900 20 0c 00 00 30 0c 00 00 40 0c 00 00 50 0c 00 00 | ...0...@...P...| +00000910 60 0c 00 00 70 0c 00 00 80 0c 00 00 90 0c 00 00 |`...p...........| +00000920 a0 0c 00 00 b0 0c 00 00 c0 0c 00 00 d0 0c 00 00 |................| +00000930 e0 0c 00 00 f0 0c 00 00 00 0d 00 00 10 0d 00 00 |................| +00000940 20 0d 00 00 30 0d 00 00 40 0d 00 00 50 0d 00 00 | ...0...@...P...| +00000950 60 0d 00 00 70 0d 00 00 80 0d 00 00 90 0d 00 00 |`...p...........| +00000960 a0 0d 00 00 b0 0d 00 00 c0 0d 00 00 d0 0d 00 00 |................| +00000970 e0 0d 00 00 f0 0d 00 00 00 0e 00 00 10 0e 00 00 |................| +00000980 20 0e 00 00 30 0e 00 00 40 0e 00 00 50 0e 00 00 | ...0...@...P...| +00000990 60 0e 00 00 70 0e 00 00 80 0e 00 00 90 0e 00 00 |`...p...........| +000009a0 a0 0e 00 00 b0 0e 00 00 c0 0e 00 00 d0 0e 00 00 |................| +000009b0 e0 0e 00 00 f0 0e 00 00 00 0f 00 00 10 0f 00 00 |................| +000009c0 20 0f 00 00 30 0f 00 00 40 0f 00 00 50 0f 00 00 | ...0...@...P...| +000009d0 60 0f 00 00 70 0f 00 00 80 0f 00 00 90 0f 00 00 |`...p...........| +000009e0 a0 0f 00 00 b0 0f 00 00 c0 0f 00 00 d0 0f 00 00 |................| +000009f0 e0 0f 00 00 f0 0f 00 00 00 10 00 00 10 10 00 00 |................| +00000a00 20 10 00 00 30 10 00 00 40 10 00 00 50 10 00 00 | ...0...@...P...| +00000a10 60 10 00 00 70 10 00 00 80 10 00 00 90 10 00 00 |`...p...........| +00000a20 a0 10 00 00 b0 10 00 00 c0 10 00 00 d0 10 00 00 |................| +00000a30 e0 10 00 00 f0 10 00 00 00 11 00 00 10 11 00 00 |................| +00000a40 20 11 00 00 30 11 00 00 40 11 00 00 50 11 00 00 | ...0...@...P...| +00000a50 60 11 00 00 70 11 00 00 80 11 00 00 90 11 00 00 |`...p...........| +00000a60 a0 11 00 00 b0 11 00 00 c0 11 00 00 d0 11 00 00 |................| +00000a70 e0 11 00 00 f0 11 00 00 00 12 00 00 10 12 00 00 |................| +00000a80 20 12 00 00 30 12 00 00 40 12 00 00 50 12 00 00 | ...0...@...P...| +00000a90 60 12 00 00 70 12 00 00 80 12 00 00 90 12 00 00 |`...p...........| +00000aa0 a0 12 00 00 b0 12 00 00 c0 12 00 00 d0 12 00 00 |................| +00000ab0 e0 12 00 00 f0 12 00 00 00 13 00 00 10 13 00 00 |................| +00000ac0 20 13 00 00 30 13 00 00 40 13 00 00 50 13 00 00 | ...0...@...P...| +00000ad0 60 13 00 00 70 13 00 00 80 13 00 00 90 13 00 00 |`...p...........| +00000ae0 a0 13 00 00 b0 13 00 00 c0 13 00 00 d0 13 00 00 |................| +00000af0 e0 13 00 00 f0 13 00 00 00 14 00 00 10 14 00 00 |................| +00000b00 20 14 00 00 30 14 00 00 40 14 00 00 50 14 00 00 | ...0...@...P...| +00000b10 60 14 00 00 70 14 00 00 80 14 00 00 90 14 00 00 |`...p...........| +00000b20 a0 14 00 00 b0 14 00 00 c0 14 00 00 d0 14 00 00 |................| +00000b30 e0 14 00 00 f0 14 00 00 00 15 00 00 10 15 00 00 |................| +00000b40 20 15 00 00 30 15 00 00 40 15 00 00 50 15 00 00 | ...0...@...P...| +00000b50 60 15 00 00 70 15 00 00 80 15 00 00 90 15 00 00 |`...p...........| +00000b60 a0 15 00 00 b0 15 00 00 c0 15 00 00 d0 15 00 00 |................| +00000b70 e0 15 00 00 f0 15 00 00 00 16 00 00 10 16 00 00 |................| +00000b80 20 16 00 00 30 16 00 00 40 16 00 00 50 16 00 00 | ...0...@...P...| +00000b90 60 16 00 00 70 16 00 00 80 16 00 00 90 16 00 00 |`...p...........| +00000ba0 a0 16 00 00 b0 16 00 00 c0 16 00 00 d0 16 00 00 |................| +00000bb0 e0 16 00 00 f0 16 00 00 00 17 00 00 10 17 00 00 |................| +00000bc0 20 17 00 00 30 17 00 00 40 17 00 00 50 17 00 00 | ...0...@...P...| +00000bd0 60 17 00 00 70 17 00 00 80 17 00 00 90 17 00 00 |`...p...........| +00000be0 a0 17 00 00 b0 17 00 00 c0 17 00 00 d0 17 00 00 |................| +00000bf0 e0 17 00 00 f0 17 00 00 00 18 00 00 10 18 00 00 |................| +00000c00 20 18 00 00 30 18 00 00 40 18 00 00 50 18 00 00 | ...0...@...P...| +00000c10 60 18 00 00 70 18 00 00 80 18 00 00 90 18 00 00 |`...p...........| +00000c20 a0 18 00 00 b0 18 00 00 c0 18 00 00 d0 18 00 00 |................| +00000c30 e0 18 00 00 f0 18 00 00 00 19 00 00 10 19 00 00 |................| +00000c40 20 19 00 00 30 19 00 00 40 19 00 00 50 19 00 00 | ...0...@...P...| +00000c50 60 19 00 00 70 19 00 00 80 19 00 00 90 19 00 00 |`...p...........| +00000c60 a0 19 00 00 b0 19 00 00 c0 19 00 00 d0 19 00 00 |................| +00000c70 e0 19 00 00 f0 19 00 00 00 1a 00 00 10 1a 00 00 |................| +00000c80 20 1a 00 00 30 1a 00 00 40 1a 00 00 50 1a 00 00 | ...0...@...P...| +00000c90 60 1a 00 00 70 1a 00 00 80 1a 00 00 90 1a 00 00 |`...p...........| +00000ca0 a0 1a 00 00 b0 1a 00 00 c0 1a 00 00 d0 1a 00 00 |................| +00000cb0 e0 1a 00 00 f0 1a 00 00 00 1b 00 00 10 1b 00 00 |................| +00000cc0 20 1b 00 00 30 1b 00 00 40 1b 00 00 50 1b 00 00 | ...0...@...P...| +00000cd0 60 1b 00 00 70 1b 00 00 80 1b 00 00 90 1b 00 00 |`...p...........| +00000ce0 a0 1b 00 00 b0 1b 00 00 c0 1b 00 00 d0 1b 00 00 |................| +00000cf0 e0 1b 00 00 f0 1b 00 00 00 1c 00 00 10 1c 00 00 |................| +00000d00 20 1c 00 00 30 1c 00 00 40 1c 00 00 50 1c 00 00 | ...0...@...P...| +00000d10 60 1c 00 00 70 1c 00 00 80 1c 00 00 90 1c 00 00 |`...p...........| +00000d20 a0 1c 00 00 b0 1c 00 00 c0 1c 00 00 d0 1c 00 00 |................| +00000d30 e0 1c 00 00 f0 1c 00 00 00 1d 00 00 10 1d 00 00 |................| +00000d40 20 1d 00 00 30 1d 00 00 40 1d 00 00 50 1d 00 00 | ...0...@...P...| +00000d50 60 1d 00 00 70 1d 00 00 80 1d 00 00 90 1d 00 00 |`...p...........| +00000d60 a0 1d 00 00 b0 1d 00 00 c0 1d 00 00 d0 1d 00 00 |................| +00000d70 e0 1d 00 00 f0 1d 00 00 00 1e 00 00 10 1e 00 00 |................| +00000d80 20 1e 00 00 30 1e 00 00 40 1e 00 00 50 1e 00 00 | ...0...@...P...| +00000d90 60 1e 00 00 70 1e 00 00 80 1e 00 00 90 1e 00 00 |`...p...........| +00000da0 a0 1e 00 00 b0 1e 00 00 c0 1e 00 00 d0 1e 00 00 |................| +00000db0 e0 1e 00 00 f0 1e 00 00 00 1f 00 00 10 1f 00 00 |................| +00000dc0 20 1f 00 00 30 1f 00 00 40 1f 00 00 50 1f 00 00 | ...0...@...P...| +00000dd0 60 1f 00 00 70 1f 00 00 80 1f 00 00 90 1f 00 00 |`...p...........| +00000de0 a0 1f 00 00 b0 1f 00 00 c0 1f 00 00 d0 1f 00 00 |................| +00000df0 e0 1f 00 00 f0 1f 00 00 00 20 00 00 10 20 00 00 |......... ... ..| +00000e00 20 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ..............| +00000e10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00001600 0c 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 |................| +00001610 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00001800 20 00 00 00 30 00 00 00 40 00 00 00 50 00 00 00 | ...0...@...P...| +00001810 60 00 00 00 70 00 00 00 80 00 00 00 90 00 00 00 |`...p...........| +00001820 a0 00 00 00 b0 00 00 00 c0 00 00 00 d0 00 00 00 |................| +00001830 e0 00 00 00 f0 00 00 00 00 01 00 00 10 01 00 00 |................| +00001840 20 01 00 00 30 01 00 00 40 01 00 00 50 01 00 00 | ...0...@...P...| +00001850 60 01 00 00 70 01 00 00 80 01 00 00 90 01 00 00 |`...p...........| +00001860 a0 01 00 00 b0 01 00 00 c0 01 00 00 d0 01 00 00 |................| +00001870 e0 01 00 00 f0 01 00 00 00 02 00 00 10 02 00 00 |................| +00001880 20 02 00 00 30 02 00 00 40 02 00 00 50 02 00 00 | ...0...@...P...| +00001890 60 02 00 00 70 02 00 00 80 02 00 00 90 02 00 00 |`...p...........| +000018a0 a0 02 00 00 b0 02 00 00 c0 02 00 00 d0 02 00 00 |................| +000018b0 e0 02 00 00 f0 02 00 00 00 03 00 00 10 03 00 00 |................| +000018c0 20 03 00 00 30 03 00 00 40 03 00 00 50 03 00 00 | ...0...@...P...| +000018d0 60 03 00 00 70 03 00 00 80 03 00 00 90 03 00 00 |`...p...........| +000018e0 a0 03 00 00 b0 03 00 00 c0 03 00 00 d0 03 00 00 |................| +000018f0 e0 03 00 00 f0 03 00 00 00 04 00 00 10 04 00 00 |................| +00001900 20 04 00 00 30 04 00 00 40 04 00 00 50 04 00 00 | ...0...@...P...| +00001910 60 04 00 00 70 04 00 00 80 04 00 00 90 04 00 00 |`...p...........| +00001920 a0 04 00 00 b0 04 00 00 c0 04 00 00 d0 04 00 00 |................| +00001930 e0 04 00 00 f0 04 00 00 00 05 00 00 10 05 00 00 |................| +00001940 20 05 00 00 30 05 00 00 40 05 00 00 50 05 00 00 | ...0...@...P...| +00001950 60 05 00 00 70 05 00 00 80 05 00 00 90 05 00 00 |`...p...........| +00001960 a0 05 00 00 b0 05 00 00 c0 05 00 00 d0 05 00 00 |................| +00001970 e0 05 00 00 f0 05 00 00 00 06 00 00 10 06 00 00 |................| +00001980 20 06 00 00 30 06 00 00 40 06 00 00 50 06 00 00 | ...0...@...P...| +00001990 60 06 00 00 70 06 00 00 80 06 00 00 90 06 00 00 |`...p...........| +000019a0 a0 06 00 00 b0 06 00 00 c0 06 00 00 d0 06 00 00 |................| +000019b0 e0 06 00 00 f0 06 00 00 00 07 00 00 10 07 00 00 |................| +000019c0 20 07 00 00 30 07 00 00 40 07 00 00 50 07 00 00 | ...0...@...P...| +000019d0 60 07 00 00 70 07 00 00 80 07 00 00 90 07 00 00 |`...p...........| +000019e0 a0 07 00 00 b0 07 00 00 c0 07 00 00 d0 07 00 00 |................| +000019f0 e0 07 00 00 f0 07 00 00 00 08 00 00 10 08 00 00 |................| +00001a00 20 08 00 00 30 08 00 00 40 08 00 00 50 08 00 00 | ...0...@...P...| +00001a10 60 08 00 00 70 08 00 00 80 08 00 00 90 08 00 00 |`...p...........| +00001a20 a0 08 00 00 b0 08 00 00 c0 08 00 00 d0 08 00 00 |................| +00001a30 e0 08 00 00 f0 08 00 00 00 09 00 00 10 09 00 00 |................| +00001a40 20 09 00 00 30 09 00 00 40 09 00 00 50 09 00 00 | ...0...@...P...| +00001a50 60 09 00 00 70 09 00 00 80 09 00 00 90 09 00 00 |`...p...........| +00001a60 a0 09 00 00 b0 09 00 00 c0 09 00 00 d0 09 00 00 |................| +00001a70 e0 09 00 00 f0 09 00 00 00 0a 00 00 10 0a 00 00 |................| +00001a80 20 0a 00 00 30 0a 00 00 40 0a 00 00 50 0a 00 00 | ...0...@...P...| +00001a90 60 0a 00 00 70 0a 00 00 80 0a 00 00 90 0a 00 00 |`...p...........| +00001aa0 a0 0a 00 00 b0 0a 00 00 c0 0a 00 00 d0 0a 00 00 |................| +00001ab0 e0 0a 00 00 f0 0a 00 00 00 0b 00 00 10 0b 00 00 |................| +00001ac0 20 0b 00 00 30 0b 00 00 40 0b 00 00 50 0b 00 00 | ...0...@...P...| *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Jun 29 08:12:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B870434263F; Mon, 29 Jun 2020 08:12:04 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wKw440mFz4Vlg; Mon, 29 Jun 2020 08:12:04 +0000 (UTC) (envelope-from gonzo@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 6C17C2442F; Mon, 29 Jun 2020 08:12:04 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05T8C4xY035671; Mon, 29 Jun 2020 08:12:04 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T8C2ki035660; Mon, 29 Jun 2020 08:12:02 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <202006290812.05T8C2ki035660@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 29 Jun 2020 08:12:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362775 - stable/12/usr.bin/mkimg/tests X-SVN-Group: stable-12 X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: stable/12/usr.bin/mkimg/tests X-SVN-Commit-Revision: 362775 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 08:12:04 -0000 Author: gonzo Date: Mon Jun 29 08:12:01 2020 New Revision: 362775 URL: https://svnweb.freebsd.org/changeset/base/362775 Log: Revert r362772. The proper fix is to merge format change commit from the HEAD Added: stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdx.hex - copied unchanged from r362771, stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdx.hex - copied unchanged from r362771, stable/12/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdx.hex - copied unchanged from r362771, stable/12/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.hex - copied unchanged from r362771, stable/12/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdx.hex - copied unchanged from r362771, stable/12/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdx.hex - copied unchanged from r362771, stable/12/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-apm.vhdx.hex - copied unchanged from r362771, stable/12/usr.bin/mkimg/tests/img-1x1-512-apm.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdx.hex - copied unchanged from r362771, stable/12/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdx.hex - copied unchanged from r362771, stable/12/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.hex - copied unchanged from r362771, stable/12/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdx.hex - copied unchanged from r362771, stable/12/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdx.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdx.hex - copied unchanged from r362771, stable/12/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-apm.vhdx.hex - copied unchanged from r362771, stable/12/usr.bin/mkimg/tests/img-63x255-4096-apm.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhdx.hex - copied unchanged from r362771, stable/12/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhdx.hex - copied unchanged from r362771, stable/12/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdx.hex - copied unchanged from r362771, stable/12/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhdx.hex - copied unchanged from r362771, stable/12/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhdx.hex - copied unchanged from r362771, stable/12/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-apm.vhdx.hex - copied unchanged from r362771, stable/12/usr.bin/mkimg/tests/img-63x255-512-apm.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-bsd.vhdx.hex - copied unchanged from r362771, stable/12/usr.bin/mkimg/tests/img-63x255-512-bsd.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-ebr.vhdx.hex - copied unchanged from r362771, stable/12/usr.bin/mkimg/tests/img-63x255-512-ebr.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdx.hex - copied unchanged from r362771, stable/12/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-mbr.vhdx.hex - copied unchanged from r362771, stable/12/usr.bin/mkimg/tests/img-63x255-512-mbr.vhdx.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhdx.hex - copied unchanged from r362771, stable/12/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhdx.hex Deleted: stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdx.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdx.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdx.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdx.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdx.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-apm.vhdx.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdx.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdx.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdx.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdx.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-apm.vhdx.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhdx.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhdx.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdx.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhdx.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhdx.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-apm.vhdx.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-bsd.vhdx.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-ebr.vhdx.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdx.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-mbr.vhdx.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhdx.gz.uu Copied: stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdx.hex (from r362771, stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdx.hex Mon Jun 29 08:12:01 2020 (r362775, copy of r362771, stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdx.hex) @@ -0,0 +1,79 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00210020 00 02 00 00 00 10 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400000 45 52 02 00 00 00 80 00 00 00 00 00 00 00 00 00 |ER..............| +00400010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400200 50 4d 00 00 00 00 00 03 00 00 00 01 00 00 00 03 |PM..............| +00400210 41 70 70 6c 65 00 00 00 00 00 00 00 00 00 00 00 |Apple...........| +00400220 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00400230 41 70 70 6c 65 5f 70 61 72 74 69 74 69 6f 6e 5f |Apple_partition_| +00400240 6d 61 70 00 00 00 00 00 00 00 00 00 00 00 00 00 |map.............| +00400250 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400400 50 4d 00 00 00 00 00 03 00 00 00 08 00 00 20 00 |PM............ .| +00400410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400430 46 72 65 65 42 53 44 2d 55 46 53 00 00 00 00 00 |FreeBSD-UFS.....| +00400440 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400600 50 4d 00 00 00 00 00 03 00 00 20 08 00 00 01 00 |PM........ .....| +00400610 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400630 46 72 65 65 42 53 44 2d 73 77 61 70 00 00 00 00 |FreeBSD-swap....| +00400640 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00401000 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00801000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/12/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdx.hex (from r362771, stable/12/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdx.hex Mon Jun 29 08:12:01 2020 (r362775, copy of r362771, stable/12/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdx.hex) @@ -0,0 +1,75 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00210020 00 02 00 00 00 10 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00400200 57 45 56 82 00 00 00 00 00 00 00 00 00 00 00 00 |WEV.............| +00400210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00400220 00 00 00 00 00 00 00 00 00 02 00 00 01 00 00 00 |................| +00400230 01 00 00 00 00 80 00 00 01 00 00 00 00 80 00 00 |................| +00400240 00 00 00 00 00 00 00 00 10 0e 00 00 00 00 00 00 |................| +00400250 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400280 00 00 00 00 57 45 56 82 1f ad 08 00 00 20 00 00 |....WEV...... ..| +00400290 00 00 00 00 00 20 00 00 10 00 00 00 00 00 00 00 |..... ..........| +004002a0 07 00 00 00 00 01 00 00 10 20 00 00 00 00 00 00 |......... ......| +004002b0 01 00 00 00 00 80 00 00 00 00 00 00 00 00 00 00 |................| +004002c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400310 00 00 00 00 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |....B.B.B.B.B.B.| +00400320 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00402000 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00802000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/12/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdx.hex (from r362771, stable/12/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdx.hex Mon Jun 29 08:12:01 2020 (r362775, copy of r362771, stable/12/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdx.hex) @@ -0,0 +1,80 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00210020 00 02 00 00 00 10 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +004001b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff |................| +004001c0 ff ff a5 ff ff ff 01 00 00 00 10 21 00 00 00 00 |...........!....| +004001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +004001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00400200 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00400400 57 45 56 82 00 00 00 00 00 00 00 00 00 00 00 00 |WEV.............| +00400410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00400420 00 00 00 00 00 00 00 00 00 02 00 00 01 00 00 00 |................| +00400430 01 00 00 00 10 21 00 00 01 00 00 00 10 21 00 00 |.....!.......!..| +00400440 00 00 00 00 00 00 00 00 10 0e 00 00 00 00 00 00 |................| +00400450 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400480 00 00 00 00 57 45 56 82 0f 0c 08 00 00 20 00 00 |....WEV...... ..| +00400490 00 00 00 00 00 20 00 00 10 00 00 00 00 00 00 00 |..... ..........| +004004a0 07 00 00 00 00 01 00 00 10 20 00 00 00 00 00 00 |......... ......| +004004b0 01 00 00 00 10 21 00 00 00 00 00 00 00 00 00 00 |.....!..........| +004004c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400510 00 00 00 00 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |....B.B.B.B.B.B.| +00400520 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00402200 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00802200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/12/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.hex (from r362771, stable/12/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.hex Mon Jun 29 08:12:01 2020 (r362775, copy of r362771, stable/12/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdx.hex) @@ -0,0 +1,100 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 |................| +00210020 00 02 00 00 00 10 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +004001b0 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 00 00 |B.B.B.B.B.B.B...| +004001c0 02 00 ee ff ff ff 01 00 00 00 ff 7f 00 00 00 00 |................| +004001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +004001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00400200 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 |EFI PART....\...| +00400210 74 bd 80 b6 00 00 00 00 01 00 00 00 00 00 00 00 |t...............| +00400220 ff 7f 00 00 00 00 00 00 03 00 00 00 00 00 00 00 |................| +00400230 fd 7f 00 00 00 00 00 00 03 03 03 03 03 03 03 03 |................| +00400240 03 03 03 03 03 03 03 03 02 00 00 00 00 00 00 00 |................| +00400250 04 00 00 00 80 00 00 00 b2 50 1a c4 00 00 00 00 |.........P......| +00400260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400400 b6 7c 6e 51 cf 6e d6 11 8f f8 00 02 2d 09 71 2b |.|nQ.n......-.q+| +00400410 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00400420 08 00 00 00 00 00 00 00 07 20 00 00 00 00 00 00 |......... ......| +00400430 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400480 b5 7c 6e 51 cf 6e d6 11 8f f8 00 02 2d 09 71 2b |.|nQ.n......-.q+| +00400490 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 |................| +004004a0 08 20 00 00 00 00 00 00 07 21 00 00 00 00 00 00 |. .......!......| +004004b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00401000 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00801000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +013ffc00 b6 7c 6e 51 cf 6e d6 11 8f f8 00 02 2d 09 71 2b |.|nQ.n......-.q+| +013ffc10 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +013ffc20 08 00 00 00 00 00 00 00 07 20 00 00 00 00 00 00 |......... ......| +013ffc30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +013ffc80 b5 7c 6e 51 cf 6e d6 11 8f f8 00 02 2d 09 71 2b |.|nQ.n......-.q+| +013ffc90 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 |................| +013ffca0 08 20 00 00 00 00 00 00 07 21 00 00 00 00 00 00 |. .......!......| +013ffcb0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +013ffe00 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 |EFI PART....\...| +013ffe10 87 87 ed 30 00 00 00 00 ff 7f 00 00 00 00 00 00 |...0............| +013ffe20 01 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 |................| +013ffe30 fd 7f 00 00 00 00 00 00 03 03 03 03 03 03 03 03 |................| +013ffe40 03 03 03 03 03 03 03 03 fe 7f 00 00 00 00 00 00 |................| +013ffe50 04 00 00 00 80 00 00 00 b2 50 1a c4 00 00 00 00 |.........P......| +013ffe60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/12/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdx.hex (from r362771, stable/12/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdx.hex Mon Jun 29 08:12:01 2020 (r362775, copy of r362771, stable/12/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdx.hex) @@ -0,0 +1,82 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00210020 00 02 00 00 00 10 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +004001b0 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 80 ff |B.B.B.B.B.B.B...| +004001c0 ff ff a5 ff ff ff 01 00 00 00 10 21 00 00 00 00 |...........!....| +004001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +004001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00400200 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00400400 57 45 56 82 00 00 00 00 00 00 00 00 00 00 00 00 |WEV.............| +00400410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00400420 00 00 00 00 00 00 00 00 00 02 00 00 01 00 00 00 |................| +00400430 01 00 00 00 10 21 00 00 01 00 00 00 10 21 00 00 |.....!.......!..| +00400440 00 00 00 00 00 00 00 00 10 0e 00 00 00 00 00 00 |................| +00400450 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400480 00 00 00 00 57 45 56 82 0f 0c 08 00 00 20 00 00 |....WEV...... ..| +00400490 00 00 00 00 00 20 00 00 10 00 00 00 00 00 00 00 |..... ..........| +004004a0 07 00 00 00 00 01 00 00 10 20 00 00 00 00 00 00 |......... ......| +004004b0 01 00 00 00 10 21 00 00 00 00 00 00 00 00 00 00 |.....!..........| +004004c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400510 00 00 00 00 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |....B.B.B.B.B.B.| +00400520 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00402200 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00802200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/12/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdx.hex (from r362771, stable/12/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdx.hex Mon Jun 29 08:12:01 2020 (r362775, copy of r362771, stable/12/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdx.hex) @@ -0,0 +1,72 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00210020 00 02 00 00 00 10 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400000 46 72 65 65 42 53 44 31 36 4d 00 00 00 00 00 00 |FreeBSD16M......| +00400010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400080 00 00 00 01 00 00 00 00 00 00 00 00 00 08 09 02 |................| +00400090 00 00 09 01 00 00 00 00 00 00 00 00 00 00 00 00 |................| +004000a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +004000b0 00 00 00 00 00 00 00 00 00 00 00 00 60 0d de ee |............`...| +004000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +004001a0 00 00 00 00 0e 10 80 00 00 00 00 00 00 00 00 00 |................| +004001b0 80 00 00 00 00 01 00 01 00 00 00 00 00 00 00 01 |................| +004001c0 00 00 20 00 00 00 20 01 00 00 01 00 00 00 00 00 |.. ... .........| +004001d0 00 00 80 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +004001e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +004001f0 00 00 00 00 00 00 00 00 00 00 00 00 da be f8 7f |................| +00400200 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00800200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/12/usr.bin/mkimg/tests/img-1x1-512-apm.vhdx.hex (from r362771, stable/12/usr.bin/mkimg/tests/img-1x1-512-apm.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-512-apm.vhdx.hex Mon Jun 29 08:12:01 2020 (r362775, copy of r362771, stable/12/usr.bin/mkimg/tests/img-1x1-512-apm.vhdx.hex) @@ -0,0 +1,79 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00210020 00 02 00 00 00 02 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400000 45 52 02 00 00 00 80 00 00 00 00 00 00 00 00 00 |ER..............| +00400010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400200 50 4d 00 00 00 00 00 03 00 00 00 01 00 00 00 03 |PM..............| +00400210 41 70 70 6c 65 00 00 00 00 00 00 00 00 00 00 00 |Apple...........| +00400220 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00400230 41 70 70 6c 65 5f 70 61 72 74 69 74 69 6f 6e 5f |Apple_partition_| +00400240 6d 61 70 00 00 00 00 00 00 00 00 00 00 00 00 00 |map.............| +00400250 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400400 50 4d 00 00 00 00 00 03 00 00 00 04 00 00 20 00 |PM............ .| +00400410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400430 46 72 65 65 42 53 44 2d 55 46 53 00 00 00 00 00 |FreeBSD-UFS.....| +00400440 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400600 50 4d 00 00 00 00 00 03 00 00 20 04 00 00 01 00 |PM........ .....| +00400610 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400630 46 72 65 65 42 53 44 2d 73 77 61 70 00 00 00 00 |FreeBSD-swap....| +00400640 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400800 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00800800 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/12/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdx.hex (from r362771, stable/12/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdx.hex Mon Jun 29 08:12:01 2020 (r362775, copy of r362771, stable/12/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdx.hex) @@ -0,0 +1,75 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00210020 00 02 00 00 00 02 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00400200 57 45 56 82 00 00 00 00 00 00 00 00 00 00 00 00 |WEV.............| +00400210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00400220 00 00 00 00 00 00 00 00 00 02 00 00 01 00 00 00 |................| +00400230 01 00 00 00 00 80 00 00 01 00 00 00 00 80 00 00 |................| +00400240 00 00 00 00 00 00 00 00 10 0e 00 00 00 00 00 00 |................| +00400250 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400280 00 00 00 00 57 45 56 82 1f ad 08 00 00 20 00 00 |....WEV...... ..| +00400290 00 00 00 00 00 20 00 00 10 00 00 00 00 00 00 00 |..... ..........| +004002a0 07 00 00 00 00 01 00 00 10 20 00 00 00 00 00 00 |......... ......| +004002b0 01 00 00 00 00 80 00 00 00 00 00 00 00 00 00 00 |................| +004002c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400310 00 00 00 00 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |....B.B.B.B.B.B.| +00400320 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00402000 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00802000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/12/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdx.hex (from r362771, stable/12/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdx.hex Mon Jun 29 08:12:01 2020 (r362775, copy of r362771, stable/12/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdx.hex) @@ -0,0 +1,80 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00210020 00 02 00 00 00 02 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +004001b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff |................| +004001c0 ff ff a5 ff ff ff 01 00 00 00 10 21 00 00 00 00 |...........!....| +004001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +004001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00400200 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00400400 57 45 56 82 00 00 00 00 00 00 00 00 00 00 00 00 |WEV.............| +00400410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00400420 00 00 00 00 00 00 00 00 00 02 00 00 01 00 00 00 |................| +00400430 01 00 00 00 10 21 00 00 01 00 00 00 10 21 00 00 |.....!.......!..| +00400440 00 00 00 00 00 00 00 00 10 0e 00 00 00 00 00 00 |................| +00400450 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400480 00 00 00 00 57 45 56 82 0f 0c 08 00 00 20 00 00 |....WEV...... ..| +00400490 00 00 00 00 00 20 00 00 10 00 00 00 00 00 00 00 |..... ..........| +004004a0 07 00 00 00 00 01 00 00 10 20 00 00 00 00 00 00 |......... ......| +004004b0 01 00 00 00 10 21 00 00 00 00 00 00 00 00 00 00 |.....!..........| +004004c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400510 00 00 00 00 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |....B.B.B.B.B.B.| +00400520 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00402200 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00802200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/12/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.hex (from r362771, stable/12/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.hex Mon Jun 29 08:12:01 2020 (r362775, copy of r362771, stable/12/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdx.hex) @@ -0,0 +1,100 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 |................| +00210020 00 02 00 00 00 02 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +004001b0 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 00 00 |B.B.B.B.B.B.B...| +004001c0 02 00 ee ff ff ff 01 00 00 00 ff 7f 00 00 00 00 |................| +004001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +004001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00400200 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 |EFI PART....\...| +00400210 71 3e 06 15 00 00 00 00 01 00 00 00 00 00 00 00 |q>..............| +00400220 ff 7f 00 00 00 00 00 00 03 00 00 00 00 00 00 00 |................| +00400230 fd 7f 00 00 00 00 00 00 03 03 03 03 03 03 03 03 |................| +00400240 03 03 03 03 03 03 03 03 02 00 00 00 00 00 00 00 |................| +00400250 04 00 00 00 80 00 00 00 45 45 ea fb 00 00 00 00 |........EE......| +00400260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400400 b6 7c 6e 51 cf 6e d6 11 8f f8 00 02 2d 09 71 2b |.|nQ.n......-.q+| +00400410 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00400420 03 00 00 00 00 00 00 00 02 20 00 00 00 00 00 00 |......... ......| +00400430 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400480 b5 7c 6e 51 cf 6e d6 11 8f f8 00 02 2d 09 71 2b |.|nQ.n......-.q+| +00400490 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 |................| +004004a0 03 20 00 00 00 00 00 00 02 21 00 00 00 00 00 00 |. .......!......| +004004b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400600 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00800600 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +013ffc00 b6 7c 6e 51 cf 6e d6 11 8f f8 00 02 2d 09 71 2b |.|nQ.n......-.q+| +013ffc10 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +013ffc20 03 00 00 00 00 00 00 00 02 20 00 00 00 00 00 00 |......... ......| +013ffc30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +013ffc80 b5 7c 6e 51 cf 6e d6 11 8f f8 00 02 2d 09 71 2b |.|nQ.n......-.q+| +013ffc90 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 |................| +013ffca0 03 20 00 00 00 00 00 00 02 21 00 00 00 00 00 00 |. .......!......| +013ffcb0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +013ffe00 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 |EFI PART....\...| +013ffe10 82 04 6b 93 00 00 00 00 ff 7f 00 00 00 00 00 00 |..k.............| +013ffe20 01 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 |................| +013ffe30 fd 7f 00 00 00 00 00 00 03 03 03 03 03 03 03 03 |................| +013ffe40 03 03 03 03 03 03 03 03 fe 7f 00 00 00 00 00 00 |................| +013ffe50 04 00 00 00 80 00 00 00 45 45 ea fb 00 00 00 00 |........EE......| +013ffe60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/12/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdx.hex (from r362771, stable/12/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdx.hex Mon Jun 29 08:12:01 2020 (r362775, copy of r362771, stable/12/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdx.hex) @@ -0,0 +1,82 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00210020 00 02 00 00 00 02 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400000 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +004001b0 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 80 ff |B.B.B.B.B.B.B...| +004001c0 ff ff a5 ff ff ff 01 00 00 00 10 21 00 00 00 00 |...........!....| +004001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +004001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.| +00400200 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00400400 57 45 56 82 00 00 00 00 00 00 00 00 00 00 00 00 |WEV.............| +00400410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00400420 00 00 00 00 00 00 00 00 00 02 00 00 01 00 00 00 |................| +00400430 01 00 00 00 10 21 00 00 01 00 00 00 10 21 00 00 |.....!.......!..| +00400440 00 00 00 00 00 00 00 00 10 0e 00 00 00 00 00 00 |................| +00400450 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400480 00 00 00 00 57 45 56 82 0f 0c 08 00 00 20 00 00 |....WEV...... ..| +00400490 00 00 00 00 00 20 00 00 10 00 00 00 00 00 00 00 |..... ..........| +004004a0 07 00 00 00 00 01 00 00 10 20 00 00 00 00 00 00 |......... ......| +004004b0 01 00 00 00 10 21 00 00 00 00 00 00 00 00 00 00 |.....!..........| +004004c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400510 00 00 00 00 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |....B.B.B.B.B.B.| +00400520 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a 42 0a |B.B.B.B.B.B.B.B.| +* +00402200 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00802200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +01400000 Copied: stable/12/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdx.hex (from r362771, stable/12/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdx.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdx.hex Mon Jun 29 08:12:01 2020 (r362775, copy of r362771, stable/12/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdx.hex) @@ -0,0 +1,72 @@ +# $FreeBSD$ +00000000 76 68 64 78 66 69 6c 65 00 00 00 00 00 00 00 00 |vhdxfile........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 68 65 61 64 64 db 05 73 00 00 00 00 00 00 00 00 |headd..s........| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00010050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 68 65 61 64 13 47 fd f1 01 00 00 00 00 00 00 00 |head.G..........| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020040 00 00 01 00 00 00 10 00 00 00 10 00 00 00 00 00 |................| +00020050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00030010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00030020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00030030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00030040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00030050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 72 65 67 69 4c d5 3e 14 02 00 00 00 00 00 00 00 |regiL.>.........| +00040010 06 a2 7c 8b 90 47 9a 4b b8 fe 57 5f 05 0f 88 6e |..|..G.K..W_...n| +00040020 00 00 20 00 00 00 00 00 00 00 10 00 00 00 00 00 |.. .............| +00040030 66 77 c2 2d 23 f6 00 42 9d 64 11 5e 9b fd 4a 08 |fw.-#..B.d.^..J.| +00040040 00 00 30 00 00 00 00 00 00 00 10 00 00 00 00 00 |..0.............| +00040050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00200000 6d 65 74 61 64 61 74 61 00 00 05 00 00 00 00 00 |metadata........| +00200010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00200020 37 67 a1 ca 36 fa 43 4d b3 b6 33 f0 aa 44 e7 6b |7g..6.CM..3..D.k| +00200030 00 00 01 00 08 00 00 00 04 00 00 00 00 00 00 00 |................| +00200040 24 42 a5 2f 1b cd 76 48 b2 11 5d be d8 3b f4 b8 |$B./..vH..]..;..| +00200050 08 00 01 00 08 00 00 00 06 00 00 00 00 00 00 00 |................| +00200060 ab 12 ca be e6 b2 23 45 93 ef c3 09 e0 00 c7 46 |......#E.......F| +00200070 10 00 01 00 10 00 00 00 06 00 00 00 00 00 00 00 |................| +00200080 1d bf 41 81 6f a9 09 47 ba 47 f2 33 a8 fa ab 5f |..A.o..G.G.3..._| +00200090 20 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 | ...............| +002000a0 c7 48 a3 cd 5d 44 71 44 9c c9 e9 88 52 51 c5 56 |.H..]DqD....RQ.V| +002000b0 24 00 01 00 04 00 00 00 06 00 00 00 00 00 00 00 |$...............| +002000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00210000 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 |................| +00210010 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00210020 00 02 00 00 00 02 00 00 00 00 00 00 00 00 00 00 |................| +00210030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00300000 06 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 |..@.............| +00300010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400000 46 72 65 65 42 53 44 31 36 4d 00 00 00 00 00 00 |FreeBSD16M......| +00400010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00400080 00 00 00 01 00 00 00 00 00 00 00 00 00 08 09 02 |................| +00400090 00 00 09 01 00 00 00 00 00 00 00 00 00 00 00 00 |................| +004000a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +004000b0 00 00 00 00 00 00 00 00 00 00 00 00 60 0d de ee |............`...| +004000c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Jun 29 08:14:48 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 42708342353; Mon, 29 Jun 2020 08:14:48 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wKzD0LLLz4Vtk; Mon, 29 Jun 2020 08:14:48 +0000 (UTC) (envelope-from gonzo@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 DDDBF242DB; Mon, 29 Jun 2020 08:14:47 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05T8ElPa035838; Mon, 29 Jun 2020 08:14:47 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T8EkGv035831; Mon, 29 Jun 2020 08:14:46 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <202006290814.05T8EkGv035831@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 29 Jun 2020 08:14:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362776 - stable/12/usr.bin/mkimg/tests X-SVN-Group: stable-12 X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: stable/12/usr.bin/mkimg/tests X-SVN-Commit-Revision: 362776 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 08:14:48 -0000 Author: gonzo Date: Mon Jun 29 08:14:45 2020 New Revision: 362776 URL: https://svnweb.freebsd.org/changeset/base/362776 Log: MFC r344957: Don't compress and uuencode the "hexdump -C" output files. Just save them with the $FreeBSD$ tag prepended. Changes to these files are now a lot easier to comprehend, which makes diffs also reviewable. Added: stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.qcow.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.qcow2.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.raw.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.vhd.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdf.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.vmdk.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-bsd.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-bsd.qcow.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-bsd.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-bsd.qcow2.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-bsd.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-bsd.raw.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhd.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdf.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-bsd.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-bsd.vmdk.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-ebr.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-ebr.qcow.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-ebr.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-ebr.qcow2.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-ebr.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-ebr.raw.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhd.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdf.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-ebr.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-ebr.vmdk.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow2.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-gpt.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-gpt.raw.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhd.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdf.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-gpt.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-gpt.vmdk.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-mbr.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-mbr.qcow.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-mbr.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-mbr.qcow2.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-mbr.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-mbr.raw.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhd.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdf.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-mbr.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-mbr.vmdk.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.qcow.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.qcow2.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.raw.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhd.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdf.hex stable/12/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vmdk.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-apm.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-apm.qcow.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-apm.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-apm.qcow2.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-apm.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-apm.raw.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-apm.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-apm.vhd.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-apm.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-apm.vhdf.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-apm.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-apm.vmdk.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-bsd.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-bsd.qcow.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-bsd.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-bsd.qcow2.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-bsd.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-bsd.raw.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-bsd.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-bsd.vhd.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdf.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-bsd.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-bsd.vmdk.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-ebr.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-ebr.qcow.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-ebr.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-ebr.qcow2.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-ebr.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-ebr.raw.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-ebr.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-ebr.vhd.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdf.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-ebr.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-ebr.vmdk.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow2.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-gpt.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-gpt.raw.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-gpt.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-gpt.vhd.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdf.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-gpt.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-gpt.vmdk.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-mbr.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-mbr.qcow.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-mbr.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-mbr.qcow2.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-mbr.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-mbr.raw.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-mbr.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-mbr.vhd.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdf.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-mbr.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-mbr.vmdk.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-vtoc8.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-vtoc8.qcow.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-vtoc8.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-vtoc8.qcow2.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-vtoc8.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-vtoc8.raw.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhd.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdf.hex stable/12/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vmdk.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-apm.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-apm.qcow.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-apm.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-apm.qcow2.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-apm.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-apm.raw.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-apm.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-apm.vhd.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-apm.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-apm.vhdf.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-apm.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-apm.vmdk.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-bsd.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-bsd.qcow.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-bsd.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-bsd.qcow2.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-bsd.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-bsd.raw.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhd.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhdf.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-bsd.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-bsd.vmdk.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-ebr.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-ebr.qcow.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-ebr.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-ebr.qcow2.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-ebr.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-ebr.raw.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhd.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhdf.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-ebr.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-ebr.vmdk.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow2.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-gpt.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-gpt.raw.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhd.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdf.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-gpt.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-gpt.vmdk.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-mbr.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-mbr.qcow.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-mbr.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-mbr.qcow2.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-mbr.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-mbr.raw.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhd.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhdf.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-mbr.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-mbr.vmdk.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.qcow.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.qcow2.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.raw.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhd.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhdf.hex stable/12/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vmdk.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-apm.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-apm.qcow.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-apm.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-apm.qcow2.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-apm.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-apm.raw.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-apm.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-apm.vhd.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-apm.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-apm.vhdf.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-apm.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-apm.vmdk.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-bsd.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-bsd.qcow.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-bsd.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-bsd.qcow2.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-bsd.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-bsd.raw.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-bsd.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-bsd.vhd.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-bsd.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-bsd.vhdf.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-bsd.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-bsd.vmdk.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-ebr.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-ebr.qcow.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-ebr.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-ebr.qcow2.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-ebr.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-ebr.raw.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-ebr.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-ebr.vhd.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-ebr.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-ebr.vhdf.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-ebr.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-ebr.vmdk.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-gpt.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-gpt.qcow.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-gpt.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-gpt.qcow2.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-gpt.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-gpt.raw.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-gpt.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-gpt.vhd.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdf.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-gpt.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-gpt.vmdk.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-mbr.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-mbr.qcow.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-mbr.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-mbr.qcow2.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-mbr.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-mbr.raw.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-mbr.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-mbr.vhd.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-mbr.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-mbr.vhdf.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-mbr.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-mbr.vmdk.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-vtoc8.qcow.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-vtoc8.qcow.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-vtoc8.qcow2.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-vtoc8.qcow2.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-vtoc8.raw.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-vtoc8.raw.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhd.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhd.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhdf.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhdf.hex stable/12/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vmdk.hex - copied unchanged from r344957, head/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vmdk.hex Deleted: stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.qcow.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.qcow2.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.raw.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.vhd.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdf.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.vmdk.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-bsd.qcow.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-bsd.qcow2.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-bsd.raw.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhd.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdf.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-bsd.vmdk.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-ebr.qcow.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-ebr.qcow2.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-ebr.raw.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhd.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdf.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-ebr.vmdk.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow2.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-gpt.raw.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhd.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdf.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-gpt.vmdk.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-mbr.qcow.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-mbr.qcow2.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-mbr.raw.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhd.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdf.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-mbr.vmdk.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.qcow.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.qcow2.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.raw.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhd.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdf.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vmdk.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-apm.qcow.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-apm.qcow2.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-apm.raw.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-apm.vhd.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-apm.vhdf.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-apm.vmdk.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-bsd.qcow.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-bsd.qcow2.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-bsd.raw.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-bsd.vhd.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdf.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-bsd.vmdk.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-ebr.qcow.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-ebr.qcow2.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-ebr.raw.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-ebr.vhd.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdf.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-ebr.vmdk.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow2.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-gpt.raw.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-gpt.vhd.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-gpt.vhdf.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-gpt.vmdk.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-mbr.qcow.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-mbr.qcow2.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-mbr.raw.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-mbr.vhd.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-mbr.vhdf.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-mbr.vmdk.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-vtoc8.qcow.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-vtoc8.qcow2.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-vtoc8.raw.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhd.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vhdf.gz.uu stable/12/usr.bin/mkimg/tests/img-1x1-512-vtoc8.vmdk.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-apm.qcow.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-apm.qcow2.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-apm.raw.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-apm.vhd.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-apm.vhdf.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-apm.vmdk.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-bsd.qcow.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-bsd.qcow2.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-bsd.raw.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhd.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-bsd.vhdf.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-bsd.vmdk.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-ebr.qcow.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-ebr.qcow2.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-ebr.raw.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhd.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-ebr.vhdf.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-ebr.vmdk.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-gpt.qcow2.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-gpt.raw.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhd.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-gpt.vhdf.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-gpt.vmdk.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-mbr.qcow.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-mbr.qcow2.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-mbr.raw.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhd.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-mbr.vhdf.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-mbr.vmdk.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.qcow.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.qcow2.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.raw.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhd.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vhdf.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-4096-vtoc8.vmdk.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-apm.qcow.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-apm.qcow2.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-apm.raw.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-apm.vhd.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-apm.vhdf.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-apm.vmdk.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-bsd.qcow.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-bsd.qcow2.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-bsd.raw.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-bsd.vhd.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-bsd.vhdf.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-bsd.vmdk.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-ebr.qcow.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-ebr.qcow2.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-ebr.raw.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-ebr.vhd.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-ebr.vhdf.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-ebr.vmdk.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-gpt.qcow.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-gpt.qcow2.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-gpt.raw.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-gpt.vhd.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-gpt.vhdf.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-gpt.vmdk.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-mbr.qcow.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-mbr.qcow2.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-mbr.raw.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-mbr.vhd.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-mbr.vhdf.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-mbr.vmdk.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-vtoc8.qcow.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-vtoc8.qcow2.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-vtoc8.raw.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhd.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vhdf.gz.uu stable/12/usr.bin/mkimg/tests/img-63x255-512-vtoc8.vmdk.gz.uu Modified: stable/12/usr.bin/mkimg/tests/Makefile stable/12/usr.bin/mkimg/tests/mkimg_test.sh Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/mkimg/tests/Makefile ============================================================================== --- stable/12/usr.bin/mkimg/tests/Makefile Mon Jun 29 08:12:01 2020 (r362775) +++ stable/12/usr.bin/mkimg/tests/Makefile Mon Jun 29 08:14:45 2020 (r362776) @@ -7,12 +7,12 @@ PACKAGE= tests _REBASE_SCRIPT= mkimg_test ATF_TESTS_SH= ${_REBASE_SCRIPT} -SOURCES!= cd ${.CURDIR}; echo *.uu -${PACKAGE}FILES+= ${SOURCES:S,.gz.uu,,g} +SOURCES!= cd ${.CURDIR}; echo *.hex +${PACKAGE}FILES+= ${SOURCES:S,.hex,,g} .for f in ${${PACKAGE}FILES} -$f: $f.gz.uu - uudecode -p ${.ALLSRC} | gunzip -c > ${.TARGET} +$f: $f.hex + sed -e '/^#.*/D' < ${.ALLSRC} > ${.TARGET} .endfor CLEANFILES+= ${${PACKAGE}FILES}} Copied: stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.qcow.hex (from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.qcow.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.qcow.hex Mon Jun 29 08:14:45 2020 (r362776, copy of r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.qcow.hex) @@ -0,0 +1,550 @@ +# $FreeBSD$ +00000000 51 46 49 fb 00 00 00 01 00 00 00 00 00 00 00 00 |QFI.............| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 42 10 00 |.............B..| +00000020 0c 09 00 00 00 00 00 00 00 00 00 00 00 00 10 00 |................| +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00001000 00 00 00 00 00 00 20 00 00 00 00 00 00 00 30 00 |...... .......0.| +00001010 00 00 00 00 00 00 40 00 00 00 00 00 00 00 00 00 |......@.........| +00001020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00002000 00 00 00 00 00 00 50 00 00 00 00 00 00 00 60 00 |......P.......`.| +00002010 00 00 00 00 00 00 70 00 00 00 00 00 00 00 80 00 |......p.........| +00002020 00 00 00 00 00 00 90 00 00 00 00 00 00 00 a0 00 |................| +00002030 00 00 00 00 00 00 b0 00 00 00 00 00 00 00 c0 00 |................| +00002040 00 00 00 00 00 00 d0 00 00 00 00 00 00 00 e0 00 |................| +00002050 00 00 00 00 00 00 f0 00 00 00 00 00 00 01 00 00 |................| +00002060 00 00 00 00 00 01 10 00 00 00 00 00 00 01 20 00 |.............. .| +00002070 00 00 00 00 00 01 30 00 00 00 00 00 00 01 40 00 |......0.......@.| +00002080 00 00 00 00 00 01 50 00 00 00 00 00 00 01 60 00 |......P.......`.| +00002090 00 00 00 00 00 01 70 00 00 00 00 00 00 01 80 00 |......p.........| +000020a0 00 00 00 00 00 01 90 00 00 00 00 00 00 01 a0 00 |................| +000020b0 00 00 00 00 00 01 b0 00 00 00 00 00 00 01 c0 00 |................| +000020c0 00 00 00 00 00 01 d0 00 00 00 00 00 00 01 e0 00 |................| +000020d0 00 00 00 00 00 01 f0 00 00 00 00 00 00 02 00 00 |................| +000020e0 00 00 00 00 00 02 10 00 00 00 00 00 00 02 20 00 |.............. .| +000020f0 00 00 00 00 00 02 30 00 00 00 00 00 00 02 40 00 |......0.......@.| +00002100 00 00 00 00 00 02 50 00 00 00 00 00 00 02 60 00 |......P.......`.| +00002110 00 00 00 00 00 02 70 00 00 00 00 00 00 02 80 00 |......p.........| +00002120 00 00 00 00 00 02 90 00 00 00 00 00 00 02 a0 00 |................| +00002130 00 00 00 00 00 02 b0 00 00 00 00 00 00 02 c0 00 |................| +00002140 00 00 00 00 00 02 d0 00 00 00 00 00 00 02 e0 00 |................| +00002150 00 00 00 00 00 02 f0 00 00 00 00 00 00 03 00 00 |................| +00002160 00 00 00 00 00 03 10 00 00 00 00 00 00 03 20 00 |.............. .| +00002170 00 00 00 00 00 03 30 00 00 00 00 00 00 03 40 00 |......0.......@.| +00002180 00 00 00 00 00 03 50 00 00 00 00 00 00 03 60 00 |......P.......`.| +00002190 00 00 00 00 00 03 70 00 00 00 00 00 00 03 80 00 |......p.........| +000021a0 00 00 00 00 00 03 90 00 00 00 00 00 00 03 a0 00 |................| +000021b0 00 00 00 00 00 03 b0 00 00 00 00 00 00 03 c0 00 |................| +000021c0 00 00 00 00 00 03 d0 00 00 00 00 00 00 03 e0 00 |................| +000021d0 00 00 00 00 00 03 f0 00 00 00 00 00 00 04 00 00 |................| +000021e0 00 00 00 00 00 04 10 00 00 00 00 00 00 04 20 00 |.............. .| +000021f0 00 00 00 00 00 04 30 00 00 00 00 00 00 04 40 00 |......0.......@.| +00002200 00 00 00 00 00 04 50 00 00 00 00 00 00 04 60 00 |......P.......`.| +00002210 00 00 00 00 00 04 70 00 00 00 00 00 00 04 80 00 |......p.........| +00002220 00 00 00 00 00 04 90 00 00 00 00 00 00 04 a0 00 |................| +00002230 00 00 00 00 00 04 b0 00 00 00 00 00 00 04 c0 00 |................| +00002240 00 00 00 00 00 04 d0 00 00 00 00 00 00 04 e0 00 |................| +00002250 00 00 00 00 00 04 f0 00 00 00 00 00 00 05 00 00 |................| +00002260 00 00 00 00 00 05 10 00 00 00 00 00 00 05 20 00 |.............. .| +00002270 00 00 00 00 00 05 30 00 00 00 00 00 00 05 40 00 |......0.......@.| +00002280 00 00 00 00 00 05 50 00 00 00 00 00 00 05 60 00 |......P.......`.| +00002290 00 00 00 00 00 05 70 00 00 00 00 00 00 05 80 00 |......p.........| +000022a0 00 00 00 00 00 05 90 00 00 00 00 00 00 05 a0 00 |................| +000022b0 00 00 00 00 00 05 b0 00 00 00 00 00 00 05 c0 00 |................| +000022c0 00 00 00 00 00 05 d0 00 00 00 00 00 00 05 e0 00 |................| +000022d0 00 00 00 00 00 05 f0 00 00 00 00 00 00 06 00 00 |................| +000022e0 00 00 00 00 00 06 10 00 00 00 00 00 00 06 20 00 |.............. .| +000022f0 00 00 00 00 00 06 30 00 00 00 00 00 00 06 40 00 |......0.......@.| +00002300 00 00 00 00 00 06 50 00 00 00 00 00 00 06 60 00 |......P.......`.| +00002310 00 00 00 00 00 06 70 00 00 00 00 00 00 06 80 00 |......p.........| +00002320 00 00 00 00 00 06 90 00 00 00 00 00 00 06 a0 00 |................| +00002330 00 00 00 00 00 06 b0 00 00 00 00 00 00 06 c0 00 |................| +00002340 00 00 00 00 00 06 d0 00 00 00 00 00 00 06 e0 00 |................| +00002350 00 00 00 00 00 06 f0 00 00 00 00 00 00 07 00 00 |................| +00002360 00 00 00 00 00 07 10 00 00 00 00 00 00 07 20 00 |.............. .| +00002370 00 00 00 00 00 07 30 00 00 00 00 00 00 07 40 00 |......0.......@.| +00002380 00 00 00 00 00 07 50 00 00 00 00 00 00 07 60 00 |......P.......`.| +00002390 00 00 00 00 00 07 70 00 00 00 00 00 00 07 80 00 |......p.........| +000023a0 00 00 00 00 00 07 90 00 00 00 00 00 00 07 a0 00 |................| +000023b0 00 00 00 00 00 07 b0 00 00 00 00 00 00 07 c0 00 |................| +000023c0 00 00 00 00 00 07 d0 00 00 00 00 00 00 07 e0 00 |................| +000023d0 00 00 00 00 00 07 f0 00 00 00 00 00 00 08 00 00 |................| +000023e0 00 00 00 00 00 08 10 00 00 00 00 00 00 08 20 00 |.............. .| +000023f0 00 00 00 00 00 08 30 00 00 00 00 00 00 08 40 00 |......0.......@.| +00002400 00 00 00 00 00 08 50 00 00 00 00 00 00 08 60 00 |......P.......`.| +00002410 00 00 00 00 00 08 70 00 00 00 00 00 00 08 80 00 |......p.........| +00002420 00 00 00 00 00 08 90 00 00 00 00 00 00 08 a0 00 |................| +00002430 00 00 00 00 00 08 b0 00 00 00 00 00 00 08 c0 00 |................| +00002440 00 00 00 00 00 08 d0 00 00 00 00 00 00 08 e0 00 |................| +00002450 00 00 00 00 00 08 f0 00 00 00 00 00 00 09 00 00 |................| +00002460 00 00 00 00 00 09 10 00 00 00 00 00 00 09 20 00 |.............. .| +00002470 00 00 00 00 00 09 30 00 00 00 00 00 00 09 40 00 |......0.......@.| +00002480 00 00 00 00 00 09 50 00 00 00 00 00 00 09 60 00 |......P.......`.| +00002490 00 00 00 00 00 09 70 00 00 00 00 00 00 09 80 00 |......p.........| +000024a0 00 00 00 00 00 09 90 00 00 00 00 00 00 09 a0 00 |................| +000024b0 00 00 00 00 00 09 b0 00 00 00 00 00 00 09 c0 00 |................| +000024c0 00 00 00 00 00 09 d0 00 00 00 00 00 00 09 e0 00 |................| +000024d0 00 00 00 00 00 09 f0 00 00 00 00 00 00 0a 00 00 |................| +000024e0 00 00 00 00 00 0a 10 00 00 00 00 00 00 0a 20 00 |.............. .| +000024f0 00 00 00 00 00 0a 30 00 00 00 00 00 00 0a 40 00 |......0.......@.| +00002500 00 00 00 00 00 0a 50 00 00 00 00 00 00 0a 60 00 |......P.......`.| +00002510 00 00 00 00 00 0a 70 00 00 00 00 00 00 0a 80 00 |......p.........| +00002520 00 00 00 00 00 0a 90 00 00 00 00 00 00 0a a0 00 |................| +00002530 00 00 00 00 00 0a b0 00 00 00 00 00 00 0a c0 00 |................| +00002540 00 00 00 00 00 0a d0 00 00 00 00 00 00 0a e0 00 |................| +00002550 00 00 00 00 00 0a f0 00 00 00 00 00 00 0b 00 00 |................| +00002560 00 00 00 00 00 0b 10 00 00 00 00 00 00 0b 20 00 |.............. .| +00002570 00 00 00 00 00 0b 30 00 00 00 00 00 00 0b 40 00 |......0.......@.| +00002580 00 00 00 00 00 0b 50 00 00 00 00 00 00 0b 60 00 |......P.......`.| +00002590 00 00 00 00 00 0b 70 00 00 00 00 00 00 0b 80 00 |......p.........| +000025a0 00 00 00 00 00 0b 90 00 00 00 00 00 00 0b a0 00 |................| +000025b0 00 00 00 00 00 0b b0 00 00 00 00 00 00 0b c0 00 |................| +000025c0 00 00 00 00 00 0b d0 00 00 00 00 00 00 0b e0 00 |................| +000025d0 00 00 00 00 00 0b f0 00 00 00 00 00 00 0c 00 00 |................| +000025e0 00 00 00 00 00 0c 10 00 00 00 00 00 00 0c 20 00 |.............. .| +000025f0 00 00 00 00 00 0c 30 00 00 00 00 00 00 0c 40 00 |......0.......@.| +00002600 00 00 00 00 00 0c 50 00 00 00 00 00 00 0c 60 00 |......P.......`.| +00002610 00 00 00 00 00 0c 70 00 00 00 00 00 00 0c 80 00 |......p.........| +00002620 00 00 00 00 00 0c 90 00 00 00 00 00 00 0c a0 00 |................| +00002630 00 00 00 00 00 0c b0 00 00 00 00 00 00 0c c0 00 |................| +00002640 00 00 00 00 00 0c d0 00 00 00 00 00 00 0c e0 00 |................| +00002650 00 00 00 00 00 0c f0 00 00 00 00 00 00 0d 00 00 |................| +00002660 00 00 00 00 00 0d 10 00 00 00 00 00 00 0d 20 00 |.............. .| +00002670 00 00 00 00 00 0d 30 00 00 00 00 00 00 0d 40 00 |......0.......@.| +00002680 00 00 00 00 00 0d 50 00 00 00 00 00 00 0d 60 00 |......P.......`.| +00002690 00 00 00 00 00 0d 70 00 00 00 00 00 00 0d 80 00 |......p.........| +000026a0 00 00 00 00 00 0d 90 00 00 00 00 00 00 0d a0 00 |................| +000026b0 00 00 00 00 00 0d b0 00 00 00 00 00 00 0d c0 00 |................| +000026c0 00 00 00 00 00 0d d0 00 00 00 00 00 00 0d e0 00 |................| +000026d0 00 00 00 00 00 0d f0 00 00 00 00 00 00 0e 00 00 |................| +000026e0 00 00 00 00 00 0e 10 00 00 00 00 00 00 0e 20 00 |.............. .| +000026f0 00 00 00 00 00 0e 30 00 00 00 00 00 00 0e 40 00 |......0.......@.| +00002700 00 00 00 00 00 0e 50 00 00 00 00 00 00 0e 60 00 |......P.......`.| +00002710 00 00 00 00 00 0e 70 00 00 00 00 00 00 0e 80 00 |......p.........| +00002720 00 00 00 00 00 0e 90 00 00 00 00 00 00 0e a0 00 |................| +00002730 00 00 00 00 00 0e b0 00 00 00 00 00 00 0e c0 00 |................| +00002740 00 00 00 00 00 0e d0 00 00 00 00 00 00 0e e0 00 |................| +00002750 00 00 00 00 00 0e f0 00 00 00 00 00 00 0f 00 00 |................| +00002760 00 00 00 00 00 0f 10 00 00 00 00 00 00 0f 20 00 |.............. .| +00002770 00 00 00 00 00 0f 30 00 00 00 00 00 00 0f 40 00 |......0.......@.| +00002780 00 00 00 00 00 0f 50 00 00 00 00 00 00 0f 60 00 |......P.......`.| +00002790 00 00 00 00 00 0f 70 00 00 00 00 00 00 0f 80 00 |......p.........| +000027a0 00 00 00 00 00 0f 90 00 00 00 00 00 00 0f a0 00 |................| +000027b0 00 00 00 00 00 0f b0 00 00 00 00 00 00 0f c0 00 |................| +000027c0 00 00 00 00 00 0f d0 00 00 00 00 00 00 0f e0 00 |................| +000027d0 00 00 00 00 00 0f f0 00 00 00 00 00 00 10 00 00 |................| +000027e0 00 00 00 00 00 10 10 00 00 00 00 00 00 10 20 00 |.............. .| +000027f0 00 00 00 00 00 10 30 00 00 00 00 00 00 10 40 00 |......0.......@.| +00002800 00 00 00 00 00 10 50 00 00 00 00 00 00 10 60 00 |......P.......`.| +00002810 00 00 00 00 00 10 70 00 00 00 00 00 00 10 80 00 |......p.........| +00002820 00 00 00 00 00 10 90 00 00 00 00 00 00 10 a0 00 |................| +00002830 00 00 00 00 00 10 b0 00 00 00 00 00 00 10 c0 00 |................| +00002840 00 00 00 00 00 10 d0 00 00 00 00 00 00 10 e0 00 |................| +00002850 00 00 00 00 00 10 f0 00 00 00 00 00 00 11 00 00 |................| +00002860 00 00 00 00 00 11 10 00 00 00 00 00 00 11 20 00 |.............. .| +00002870 00 00 00 00 00 11 30 00 00 00 00 00 00 11 40 00 |......0.......@.| +00002880 00 00 00 00 00 11 50 00 00 00 00 00 00 11 60 00 |......P.......`.| +00002890 00 00 00 00 00 11 70 00 00 00 00 00 00 11 80 00 |......p.........| +000028a0 00 00 00 00 00 11 90 00 00 00 00 00 00 11 a0 00 |................| +000028b0 00 00 00 00 00 11 b0 00 00 00 00 00 00 11 c0 00 |................| +000028c0 00 00 00 00 00 11 d0 00 00 00 00 00 00 11 e0 00 |................| +000028d0 00 00 00 00 00 11 f0 00 00 00 00 00 00 12 00 00 |................| +000028e0 00 00 00 00 00 12 10 00 00 00 00 00 00 12 20 00 |.............. .| +000028f0 00 00 00 00 00 12 30 00 00 00 00 00 00 12 40 00 |......0.......@.| +00002900 00 00 00 00 00 12 50 00 00 00 00 00 00 12 60 00 |......P.......`.| +00002910 00 00 00 00 00 12 70 00 00 00 00 00 00 12 80 00 |......p.........| +00002920 00 00 00 00 00 12 90 00 00 00 00 00 00 12 a0 00 |................| +00002930 00 00 00 00 00 12 b0 00 00 00 00 00 00 12 c0 00 |................| +00002940 00 00 00 00 00 12 d0 00 00 00 00 00 00 12 e0 00 |................| +00002950 00 00 00 00 00 12 f0 00 00 00 00 00 00 13 00 00 |................| +00002960 00 00 00 00 00 13 10 00 00 00 00 00 00 13 20 00 |.............. .| +00002970 00 00 00 00 00 13 30 00 00 00 00 00 00 13 40 00 |......0.......@.| +00002980 00 00 00 00 00 13 50 00 00 00 00 00 00 13 60 00 |......P.......`.| +00002990 00 00 00 00 00 13 70 00 00 00 00 00 00 13 80 00 |......p.........| +000029a0 00 00 00 00 00 13 90 00 00 00 00 00 00 13 a0 00 |................| +000029b0 00 00 00 00 00 13 b0 00 00 00 00 00 00 13 c0 00 |................| +000029c0 00 00 00 00 00 13 d0 00 00 00 00 00 00 13 e0 00 |................| +000029d0 00 00 00 00 00 13 f0 00 00 00 00 00 00 14 00 00 |................| +000029e0 00 00 00 00 00 14 10 00 00 00 00 00 00 14 20 00 |.............. .| +000029f0 00 00 00 00 00 14 30 00 00 00 00 00 00 14 40 00 |......0.......@.| +00002a00 00 00 00 00 00 14 50 00 00 00 00 00 00 14 60 00 |......P.......`.| +00002a10 00 00 00 00 00 14 70 00 00 00 00 00 00 14 80 00 |......p.........| +00002a20 00 00 00 00 00 14 90 00 00 00 00 00 00 14 a0 00 |................| +00002a30 00 00 00 00 00 14 b0 00 00 00 00 00 00 14 c0 00 |................| +00002a40 00 00 00 00 00 14 d0 00 00 00 00 00 00 14 e0 00 |................| +00002a50 00 00 00 00 00 14 f0 00 00 00 00 00 00 15 00 00 |................| +00002a60 00 00 00 00 00 15 10 00 00 00 00 00 00 15 20 00 |.............. .| +00002a70 00 00 00 00 00 15 30 00 00 00 00 00 00 15 40 00 |......0.......@.| +00002a80 00 00 00 00 00 15 50 00 00 00 00 00 00 15 60 00 |......P.......`.| +00002a90 00 00 00 00 00 15 70 00 00 00 00 00 00 15 80 00 |......p.........| +00002aa0 00 00 00 00 00 15 90 00 00 00 00 00 00 15 a0 00 |................| +00002ab0 00 00 00 00 00 15 b0 00 00 00 00 00 00 15 c0 00 |................| +00002ac0 00 00 00 00 00 15 d0 00 00 00 00 00 00 15 e0 00 |................| +00002ad0 00 00 00 00 00 15 f0 00 00 00 00 00 00 16 00 00 |................| +00002ae0 00 00 00 00 00 16 10 00 00 00 00 00 00 16 20 00 |.............. .| +00002af0 00 00 00 00 00 16 30 00 00 00 00 00 00 16 40 00 |......0.......@.| +00002b00 00 00 00 00 00 16 50 00 00 00 00 00 00 16 60 00 |......P.......`.| +00002b10 00 00 00 00 00 16 70 00 00 00 00 00 00 16 80 00 |......p.........| +00002b20 00 00 00 00 00 16 90 00 00 00 00 00 00 16 a0 00 |................| +00002b30 00 00 00 00 00 16 b0 00 00 00 00 00 00 16 c0 00 |................| +00002b40 00 00 00 00 00 16 d0 00 00 00 00 00 00 16 e0 00 |................| +00002b50 00 00 00 00 00 16 f0 00 00 00 00 00 00 17 00 00 |................| +00002b60 00 00 00 00 00 17 10 00 00 00 00 00 00 17 20 00 |.............. .| +00002b70 00 00 00 00 00 17 30 00 00 00 00 00 00 17 40 00 |......0.......@.| +00002b80 00 00 00 00 00 17 50 00 00 00 00 00 00 17 60 00 |......P.......`.| +00002b90 00 00 00 00 00 17 70 00 00 00 00 00 00 17 80 00 |......p.........| +00002ba0 00 00 00 00 00 17 90 00 00 00 00 00 00 17 a0 00 |................| +00002bb0 00 00 00 00 00 17 b0 00 00 00 00 00 00 17 c0 00 |................| +00002bc0 00 00 00 00 00 17 d0 00 00 00 00 00 00 17 e0 00 |................| +00002bd0 00 00 00 00 00 17 f0 00 00 00 00 00 00 18 00 00 |................| +00002be0 00 00 00 00 00 18 10 00 00 00 00 00 00 18 20 00 |.............. .| +00002bf0 00 00 00 00 00 18 30 00 00 00 00 00 00 18 40 00 |......0.......@.| +00002c00 00 00 00 00 00 18 50 00 00 00 00 00 00 18 60 00 |......P.......`.| +00002c10 00 00 00 00 00 18 70 00 00 00 00 00 00 18 80 00 |......p.........| +00002c20 00 00 00 00 00 18 90 00 00 00 00 00 00 18 a0 00 |................| +00002c30 00 00 00 00 00 18 b0 00 00 00 00 00 00 18 c0 00 |................| +00002c40 00 00 00 00 00 18 d0 00 00 00 00 00 00 18 e0 00 |................| +00002c50 00 00 00 00 00 18 f0 00 00 00 00 00 00 19 00 00 |................| +00002c60 00 00 00 00 00 19 10 00 00 00 00 00 00 19 20 00 |.............. .| +00002c70 00 00 00 00 00 19 30 00 00 00 00 00 00 19 40 00 |......0.......@.| +00002c80 00 00 00 00 00 19 50 00 00 00 00 00 00 19 60 00 |......P.......`.| +00002c90 00 00 00 00 00 19 70 00 00 00 00 00 00 19 80 00 |......p.........| +00002ca0 00 00 00 00 00 19 90 00 00 00 00 00 00 19 a0 00 |................| +00002cb0 00 00 00 00 00 19 b0 00 00 00 00 00 00 19 c0 00 |................| +00002cc0 00 00 00 00 00 19 d0 00 00 00 00 00 00 19 e0 00 |................| +00002cd0 00 00 00 00 00 19 f0 00 00 00 00 00 00 1a 00 00 |................| +00002ce0 00 00 00 00 00 1a 10 00 00 00 00 00 00 1a 20 00 |.............. .| +00002cf0 00 00 00 00 00 1a 30 00 00 00 00 00 00 1a 40 00 |......0.......@.| +00002d00 00 00 00 00 00 1a 50 00 00 00 00 00 00 1a 60 00 |......P.......`.| +00002d10 00 00 00 00 00 1a 70 00 00 00 00 00 00 1a 80 00 |......p.........| +00002d20 00 00 00 00 00 1a 90 00 00 00 00 00 00 1a a0 00 |................| +00002d30 00 00 00 00 00 1a b0 00 00 00 00 00 00 1a c0 00 |................| +00002d40 00 00 00 00 00 1a d0 00 00 00 00 00 00 1a e0 00 |................| +00002d50 00 00 00 00 00 1a f0 00 00 00 00 00 00 1b 00 00 |................| +00002d60 00 00 00 00 00 1b 10 00 00 00 00 00 00 1b 20 00 |.............. .| +00002d70 00 00 00 00 00 1b 30 00 00 00 00 00 00 1b 40 00 |......0.......@.| +00002d80 00 00 00 00 00 1b 50 00 00 00 00 00 00 1b 60 00 |......P.......`.| +00002d90 00 00 00 00 00 1b 70 00 00 00 00 00 00 1b 80 00 |......p.........| +00002da0 00 00 00 00 00 1b 90 00 00 00 00 00 00 1b a0 00 |................| +00002db0 00 00 00 00 00 1b b0 00 00 00 00 00 00 1b c0 00 |................| +00002dc0 00 00 00 00 00 1b d0 00 00 00 00 00 00 1b e0 00 |................| +00002dd0 00 00 00 00 00 1b f0 00 00 00 00 00 00 1c 00 00 |................| +00002de0 00 00 00 00 00 1c 10 00 00 00 00 00 00 1c 20 00 |.............. .| +00002df0 00 00 00 00 00 1c 30 00 00 00 00 00 00 1c 40 00 |......0.......@.| +00002e00 00 00 00 00 00 1c 50 00 00 00 00 00 00 1c 60 00 |......P.......`.| +00002e10 00 00 00 00 00 1c 70 00 00 00 00 00 00 1c 80 00 |......p.........| +00002e20 00 00 00 00 00 1c 90 00 00 00 00 00 00 1c a0 00 |................| +00002e30 00 00 00 00 00 1c b0 00 00 00 00 00 00 1c c0 00 |................| +00002e40 00 00 00 00 00 1c d0 00 00 00 00 00 00 1c e0 00 |................| +00002e50 00 00 00 00 00 1c f0 00 00 00 00 00 00 1d 00 00 |................| +00002e60 00 00 00 00 00 1d 10 00 00 00 00 00 00 1d 20 00 |.............. .| +00002e70 00 00 00 00 00 1d 30 00 00 00 00 00 00 1d 40 00 |......0.......@.| +00002e80 00 00 00 00 00 1d 50 00 00 00 00 00 00 1d 60 00 |......P.......`.| +00002e90 00 00 00 00 00 1d 70 00 00 00 00 00 00 1d 80 00 |......p.........| +00002ea0 00 00 00 00 00 1d 90 00 00 00 00 00 00 1d a0 00 |................| +00002eb0 00 00 00 00 00 1d b0 00 00 00 00 00 00 1d c0 00 |................| +00002ec0 00 00 00 00 00 1d d0 00 00 00 00 00 00 1d e0 00 |................| +00002ed0 00 00 00 00 00 1d f0 00 00 00 00 00 00 1e 00 00 |................| +00002ee0 00 00 00 00 00 1e 10 00 00 00 00 00 00 1e 20 00 |.............. .| +00002ef0 00 00 00 00 00 1e 30 00 00 00 00 00 00 1e 40 00 |......0.......@.| +00002f00 00 00 00 00 00 1e 50 00 00 00 00 00 00 1e 60 00 |......P.......`.| +00002f10 00 00 00 00 00 1e 70 00 00 00 00 00 00 1e 80 00 |......p.........| +00002f20 00 00 00 00 00 1e 90 00 00 00 00 00 00 1e a0 00 |................| +00002f30 00 00 00 00 00 1e b0 00 00 00 00 00 00 1e c0 00 |................| +00002f40 00 00 00 00 00 1e d0 00 00 00 00 00 00 1e e0 00 |................| +00002f50 00 00 00 00 00 1e f0 00 00 00 00 00 00 1f 00 00 |................| +00002f60 00 00 00 00 00 1f 10 00 00 00 00 00 00 1f 20 00 |.............. .| +00002f70 00 00 00 00 00 1f 30 00 00 00 00 00 00 1f 40 00 |......0.......@.| +00002f80 00 00 00 00 00 1f 50 00 00 00 00 00 00 1f 60 00 |......P.......`.| +00002f90 00 00 00 00 00 1f 70 00 00 00 00 00 00 1f 80 00 |......p.........| +00002fa0 00 00 00 00 00 1f 90 00 00 00 00 00 00 1f a0 00 |................| +00002fb0 00 00 00 00 00 1f b0 00 00 00 00 00 00 1f c0 00 |................| +00002fc0 00 00 00 00 00 1f d0 00 00 00 00 00 00 1f e0 00 |................| +00002fd0 00 00 00 00 00 1f f0 00 00 00 00 00 00 20 00 00 |............. ..| +00002fe0 00 00 00 00 00 20 10 00 00 00 00 00 00 20 20 00 |..... ....... .| +00002ff0 00 00 00 00 00 20 30 00 00 00 00 00 00 20 40 00 |..... 0...... @.| +00003000 00 00 00 00 00 20 50 00 00 00 00 00 00 20 60 00 |..... P...... `.| +00003010 00 00 00 00 00 20 70 00 00 00 00 00 00 20 80 00 |..... p...... ..| +00003020 00 00 00 00 00 20 90 00 00 00 00 00 00 20 a0 00 |..... ....... ..| +00003030 00 00 00 00 00 20 b0 00 00 00 00 00 00 20 c0 00 |..... ....... ..| +00003040 00 00 00 00 00 20 d0 00 00 00 00 00 00 20 e0 00 |..... ....... ..| +00003050 00 00 00 00 00 20 f0 00 00 00 00 00 00 21 00 00 |..... .......!..| +00003060 00 00 00 00 00 21 10 00 00 00 00 00 00 21 20 00 |.....!.......! .| +00003070 00 00 00 00 00 21 30 00 00 00 00 00 00 21 40 00 |.....!0......!@.| +00003080 00 00 00 00 00 21 50 00 00 00 00 00 00 21 60 00 |.....!P......!`.| +00003090 00 00 00 00 00 21 70 00 00 00 00 00 00 21 80 00 |.....!p......!..| +000030a0 00 00 00 00 00 21 90 00 00 00 00 00 00 21 a0 00 |.....!.......!..| +000030b0 00 00 00 00 00 21 b0 00 00 00 00 00 00 21 c0 00 |.....!.......!..| +000030c0 00 00 00 00 00 21 d0 00 00 00 00 00 00 21 e0 00 |.....!.......!..| +000030d0 00 00 00 00 00 21 f0 00 00 00 00 00 00 22 00 00 |.....!......."..| +000030e0 00 00 00 00 00 22 10 00 00 00 00 00 00 22 20 00 |....."......." .| +000030f0 00 00 00 00 00 22 30 00 00 00 00 00 00 22 40 00 |....."0......"@.| +00003100 00 00 00 00 00 22 50 00 00 00 00 00 00 22 60 00 |....."P......"`.| +00003110 00 00 00 00 00 22 70 00 00 00 00 00 00 22 80 00 |....."p......"..| +00003120 00 00 00 00 00 22 90 00 00 00 00 00 00 22 a0 00 |....."......."..| +00003130 00 00 00 00 00 22 b0 00 00 00 00 00 00 22 c0 00 |....."......."..| +00003140 00 00 00 00 00 22 d0 00 00 00 00 00 00 22 e0 00 |....."......."..| +00003150 00 00 00 00 00 22 f0 00 00 00 00 00 00 23 00 00 |.....".......#..| +00003160 00 00 00 00 00 23 10 00 00 00 00 00 00 23 20 00 |.....#.......# .| +00003170 00 00 00 00 00 23 30 00 00 00 00 00 00 23 40 00 |.....#0......#@.| +00003180 00 00 00 00 00 23 50 00 00 00 00 00 00 23 60 00 |.....#P......#`.| +00003190 00 00 00 00 00 23 70 00 00 00 00 00 00 23 80 00 |.....#p......#..| +000031a0 00 00 00 00 00 23 90 00 00 00 00 00 00 23 a0 00 |.....#.......#..| +000031b0 00 00 00 00 00 23 b0 00 00 00 00 00 00 23 c0 00 |.....#.......#..| +000031c0 00 00 00 00 00 23 d0 00 00 00 00 00 00 23 e0 00 |.....#.......#..| +000031d0 00 00 00 00 00 23 f0 00 00 00 00 00 00 24 00 00 |.....#.......$..| +000031e0 00 00 00 00 00 24 10 00 00 00 00 00 00 24 20 00 |.....$.......$ .| +000031f0 00 00 00 00 00 24 30 00 00 00 00 00 00 24 40 00 |.....$0......$@.| +00003200 00 00 00 00 00 24 50 00 00 00 00 00 00 24 60 00 |.....$P......$`.| +00003210 00 00 00 00 00 24 70 00 00 00 00 00 00 24 80 00 |.....$p......$..| +00003220 00 00 00 00 00 24 90 00 00 00 00 00 00 24 a0 00 |.....$.......$..| +00003230 00 00 00 00 00 24 b0 00 00 00 00 00 00 24 c0 00 |.....$.......$..| +00003240 00 00 00 00 00 24 d0 00 00 00 00 00 00 24 e0 00 |.....$.......$..| +00003250 00 00 00 00 00 24 f0 00 00 00 00 00 00 25 00 00 |.....$.......%..| +00003260 00 00 00 00 00 25 10 00 00 00 00 00 00 25 20 00 |.....%.......% .| +00003270 00 00 00 00 00 25 30 00 00 00 00 00 00 25 40 00 |.....%0......%@.| +00003280 00 00 00 00 00 25 50 00 00 00 00 00 00 25 60 00 |.....%P......%`.| +00003290 00 00 00 00 00 25 70 00 00 00 00 00 00 25 80 00 |.....%p......%..| +000032a0 00 00 00 00 00 25 90 00 00 00 00 00 00 25 a0 00 |.....%.......%..| +000032b0 00 00 00 00 00 25 b0 00 00 00 00 00 00 25 c0 00 |.....%.......%..| +000032c0 00 00 00 00 00 25 d0 00 00 00 00 00 00 25 e0 00 |.....%.......%..| +000032d0 00 00 00 00 00 25 f0 00 00 00 00 00 00 26 00 00 |.....%.......&..| +000032e0 00 00 00 00 00 26 10 00 00 00 00 00 00 26 20 00 |.....&.......& .| +000032f0 00 00 00 00 00 26 30 00 00 00 00 00 00 26 40 00 |.....&0......&@.| +00003300 00 00 00 00 00 26 50 00 00 00 00 00 00 26 60 00 |.....&P......&`.| +00003310 00 00 00 00 00 26 70 00 00 00 00 00 00 26 80 00 |.....&p......&..| +00003320 00 00 00 00 00 26 90 00 00 00 00 00 00 26 a0 00 |.....&.......&..| +00003330 00 00 00 00 00 26 b0 00 00 00 00 00 00 26 c0 00 |.....&.......&..| +00003340 00 00 00 00 00 26 d0 00 00 00 00 00 00 26 e0 00 |.....&.......&..| +00003350 00 00 00 00 00 26 f0 00 00 00 00 00 00 27 00 00 |.....&.......'..| +00003360 00 00 00 00 00 27 10 00 00 00 00 00 00 27 20 00 |.....'.......' .| +00003370 00 00 00 00 00 27 30 00 00 00 00 00 00 27 40 00 |.....'0......'@.| +00003380 00 00 00 00 00 27 50 00 00 00 00 00 00 27 60 00 |.....'P......'`.| +00003390 00 00 00 00 00 27 70 00 00 00 00 00 00 27 80 00 |.....'p......'..| +000033a0 00 00 00 00 00 27 90 00 00 00 00 00 00 27 a0 00 |.....'.......'..| +000033b0 00 00 00 00 00 27 b0 00 00 00 00 00 00 27 c0 00 |.....'.......'..| +000033c0 00 00 00 00 00 27 d0 00 00 00 00 00 00 27 e0 00 |.....'.......'..| +000033d0 00 00 00 00 00 27 f0 00 00 00 00 00 00 28 00 00 |.....'.......(..| +000033e0 00 00 00 00 00 28 10 00 00 00 00 00 00 28 20 00 |.....(.......( .| +000033f0 00 00 00 00 00 28 30 00 00 00 00 00 00 28 40 00 |.....(0......(@.| +00003400 00 00 00 00 00 28 50 00 00 00 00 00 00 28 60 00 |.....(P......(`.| +00003410 00 00 00 00 00 28 70 00 00 00 00 00 00 28 80 00 |.....(p......(..| +00003420 00 00 00 00 00 28 90 00 00 00 00 00 00 28 a0 00 |.....(.......(..| +00003430 00 00 00 00 00 28 b0 00 00 00 00 00 00 28 c0 00 |.....(.......(..| +00003440 00 00 00 00 00 28 d0 00 00 00 00 00 00 28 e0 00 |.....(.......(..| +00003450 00 00 00 00 00 28 f0 00 00 00 00 00 00 29 00 00 |.....(.......)..| +00003460 00 00 00 00 00 29 10 00 00 00 00 00 00 29 20 00 |.....).......) .| +00003470 00 00 00 00 00 29 30 00 00 00 00 00 00 29 40 00 |.....)0......)@.| +00003480 00 00 00 00 00 29 50 00 00 00 00 00 00 29 60 00 |.....)P......)`.| +00003490 00 00 00 00 00 29 70 00 00 00 00 00 00 29 80 00 |.....)p......)..| +000034a0 00 00 00 00 00 29 90 00 00 00 00 00 00 29 a0 00 |.....).......)..| +000034b0 00 00 00 00 00 29 b0 00 00 00 00 00 00 29 c0 00 |.....).......)..| +000034c0 00 00 00 00 00 29 d0 00 00 00 00 00 00 29 e0 00 |.....).......)..| +000034d0 00 00 00 00 00 29 f0 00 00 00 00 00 00 2a 00 00 |.....).......*..| +000034e0 00 00 00 00 00 2a 10 00 00 00 00 00 00 2a 20 00 |.....*.......* .| +000034f0 00 00 00 00 00 2a 30 00 00 00 00 00 00 2a 40 00 |.....*0......*@.| +00003500 00 00 00 00 00 2a 50 00 00 00 00 00 00 2a 60 00 |.....*P......*`.| +00003510 00 00 00 00 00 2a 70 00 00 00 00 00 00 2a 80 00 |.....*p......*..| +00003520 00 00 00 00 00 2a 90 00 00 00 00 00 00 2a a0 00 |.....*.......*..| +00003530 00 00 00 00 00 2a b0 00 00 00 00 00 00 2a c0 00 |.....*.......*..| +00003540 00 00 00 00 00 2a d0 00 00 00 00 00 00 2a e0 00 |.....*.......*..| +00003550 00 00 00 00 00 2a f0 00 00 00 00 00 00 2b 00 00 |.....*.......+..| +00003560 00 00 00 00 00 2b 10 00 00 00 00 00 00 2b 20 00 |.....+.......+ .| +00003570 00 00 00 00 00 2b 30 00 00 00 00 00 00 2b 40 00 |.....+0......+@.| +00003580 00 00 00 00 00 2b 50 00 00 00 00 00 00 2b 60 00 |.....+P......+`.| +00003590 00 00 00 00 00 2b 70 00 00 00 00 00 00 2b 80 00 |.....+p......+..| +000035a0 00 00 00 00 00 2b 90 00 00 00 00 00 00 2b a0 00 |.....+.......+..| +000035b0 00 00 00 00 00 2b b0 00 00 00 00 00 00 2b c0 00 |.....+.......+..| +000035c0 00 00 00 00 00 2b d0 00 00 00 00 00 00 2b e0 00 |.....+.......+..| +000035d0 00 00 00 00 00 2b f0 00 00 00 00 00 00 2c 00 00 |.....+.......,..| +000035e0 00 00 00 00 00 2c 10 00 00 00 00 00 00 2c 20 00 |.....,......., .| +000035f0 00 00 00 00 00 2c 30 00 00 00 00 00 00 2c 40 00 |.....,0......,@.| +00003600 00 00 00 00 00 2c 50 00 00 00 00 00 00 2c 60 00 |.....,P......,`.| +00003610 00 00 00 00 00 2c 70 00 00 00 00 00 00 2c 80 00 |.....,p......,..| +00003620 00 00 00 00 00 2c 90 00 00 00 00 00 00 2c a0 00 |.....,.......,..| +00003630 00 00 00 00 00 2c b0 00 00 00 00 00 00 2c c0 00 |.....,.......,..| +00003640 00 00 00 00 00 2c d0 00 00 00 00 00 00 2c e0 00 |.....,.......,..| +00003650 00 00 00 00 00 2c f0 00 00 00 00 00 00 2d 00 00 |.....,.......-..| +00003660 00 00 00 00 00 2d 10 00 00 00 00 00 00 2d 20 00 |.....-.......- .| +00003670 00 00 00 00 00 2d 30 00 00 00 00 00 00 2d 40 00 |.....-0......-@.| +00003680 00 00 00 00 00 2d 50 00 00 00 00 00 00 2d 60 00 |.....-P......-`.| +00003690 00 00 00 00 00 2d 70 00 00 00 00 00 00 2d 80 00 |.....-p......-..| +000036a0 00 00 00 00 00 2d 90 00 00 00 00 00 00 2d a0 00 |.....-.......-..| +000036b0 00 00 00 00 00 2d b0 00 00 00 00 00 00 2d c0 00 |.....-.......-..| +000036c0 00 00 00 00 00 2d d0 00 00 00 00 00 00 2d e0 00 |.....-.......-..| +000036d0 00 00 00 00 00 2d f0 00 00 00 00 00 00 2e 00 00 |.....-..........| +000036e0 00 00 00 00 00 2e 10 00 00 00 00 00 00 2e 20 00 |.............. .| +000036f0 00 00 00 00 00 2e 30 00 00 00 00 00 00 2e 40 00 |......0.......@.| +00003700 00 00 00 00 00 2e 50 00 00 00 00 00 00 2e 60 00 |......P.......`.| +00003710 00 00 00 00 00 2e 70 00 00 00 00 00 00 2e 80 00 |......p.........| +00003720 00 00 00 00 00 2e 90 00 00 00 00 00 00 2e a0 00 |................| +00003730 00 00 00 00 00 2e b0 00 00 00 00 00 00 2e c0 00 |................| +00003740 00 00 00 00 00 2e d0 00 00 00 00 00 00 2e e0 00 |................| +00003750 00 00 00 00 00 2e f0 00 00 00 00 00 00 2f 00 00 |............./..| +00003760 00 00 00 00 00 2f 10 00 00 00 00 00 00 2f 20 00 |...../......./ .| +00003770 00 00 00 00 00 2f 30 00 00 00 00 00 00 2f 40 00 |...../0....../@.| +00003780 00 00 00 00 00 2f 50 00 00 00 00 00 00 2f 60 00 |...../P....../`.| +00003790 00 00 00 00 00 2f 70 00 00 00 00 00 00 2f 80 00 |...../p....../..| +000037a0 00 00 00 00 00 2f 90 00 00 00 00 00 00 2f a0 00 |...../......./..| +000037b0 00 00 00 00 00 2f b0 00 00 00 00 00 00 2f c0 00 |...../......./..| +000037c0 00 00 00 00 00 2f d0 00 00 00 00 00 00 2f e0 00 |...../......./..| +000037d0 00 00 00 00 00 2f f0 00 00 00 00 00 00 30 00 00 |...../.......0..| +000037e0 00 00 00 00 00 30 10 00 00 00 00 00 00 30 20 00 |.....0.......0 .| +000037f0 00 00 00 00 00 30 30 00 00 00 00 00 00 30 40 00 |.....00......0@.| +00003800 00 00 00 00 00 30 50 00 00 00 00 00 00 30 60 00 |.....0P......0`.| +00003810 00 00 00 00 00 30 70 00 00 00 00 00 00 30 80 00 |.....0p......0..| +00003820 00 00 00 00 00 30 90 00 00 00 00 00 00 30 a0 00 |.....0.......0..| +00003830 00 00 00 00 00 30 b0 00 00 00 00 00 00 30 c0 00 |.....0.......0..| +00003840 00 00 00 00 00 30 d0 00 00 00 00 00 00 30 e0 00 |.....0.......0..| +00003850 00 00 00 00 00 30 f0 00 00 00 00 00 00 31 00 00 |.....0.......1..| +00003860 00 00 00 00 00 31 10 00 00 00 00 00 00 31 20 00 |.....1.......1 .| +00003870 00 00 00 00 00 31 30 00 00 00 00 00 00 31 40 00 |.....10......1@.| +00003880 00 00 00 00 00 31 50 00 00 00 00 00 00 31 60 00 |.....1P......1`.| +00003890 00 00 00 00 00 31 70 00 00 00 00 00 00 31 80 00 |.....1p......1..| +000038a0 00 00 00 00 00 31 90 00 00 00 00 00 00 31 a0 00 |.....1.......1..| +000038b0 00 00 00 00 00 31 b0 00 00 00 00 00 00 31 c0 00 |.....1.......1..| +000038c0 00 00 00 00 00 31 d0 00 00 00 00 00 00 31 e0 00 |.....1.......1..| +000038d0 00 00 00 00 00 31 f0 00 00 00 00 00 00 32 00 00 |.....1.......2..| +000038e0 00 00 00 00 00 32 10 00 00 00 00 00 00 32 20 00 |.....2.......2 .| +000038f0 00 00 00 00 00 32 30 00 00 00 00 00 00 32 40 00 |.....20......2@.| +00003900 00 00 00 00 00 32 50 00 00 00 00 00 00 32 60 00 |.....2P......2`.| +00003910 00 00 00 00 00 32 70 00 00 00 00 00 00 32 80 00 |.....2p......2..| +00003920 00 00 00 00 00 32 90 00 00 00 00 00 00 32 a0 00 |.....2.......2..| +00003930 00 00 00 00 00 32 b0 00 00 00 00 00 00 32 c0 00 |.....2.......2..| +00003940 00 00 00 00 00 32 d0 00 00 00 00 00 00 32 e0 00 |.....2.......2..| +00003950 00 00 00 00 00 32 f0 00 00 00 00 00 00 33 00 00 |.....2.......3..| +00003960 00 00 00 00 00 33 10 00 00 00 00 00 00 33 20 00 |.....3.......3 .| +00003970 00 00 00 00 00 33 30 00 00 00 00 00 00 33 40 00 |.....30......3@.| +00003980 00 00 00 00 00 33 50 00 00 00 00 00 00 33 60 00 |.....3P......3`.| +00003990 00 00 00 00 00 33 70 00 00 00 00 00 00 33 80 00 |.....3p......3..| +000039a0 00 00 00 00 00 33 90 00 00 00 00 00 00 33 a0 00 |.....3.......3..| +000039b0 00 00 00 00 00 33 b0 00 00 00 00 00 00 33 c0 00 |.....3.......3..| +000039c0 00 00 00 00 00 33 d0 00 00 00 00 00 00 33 e0 00 |.....3.......3..| +000039d0 00 00 00 00 00 33 f0 00 00 00 00 00 00 34 00 00 |.....3.......4..| +000039e0 00 00 00 00 00 34 10 00 00 00 00 00 00 34 20 00 |.....4.......4 .| +000039f0 00 00 00 00 00 34 30 00 00 00 00 00 00 34 40 00 |.....40......4@.| +00003a00 00 00 00 00 00 34 50 00 00 00 00 00 00 34 60 00 |.....4P......4`.| +00003a10 00 00 00 00 00 34 70 00 00 00 00 00 00 34 80 00 |.....4p......4..| +00003a20 00 00 00 00 00 34 90 00 00 00 00 00 00 34 a0 00 |.....4.......4..| +00003a30 00 00 00 00 00 34 b0 00 00 00 00 00 00 34 c0 00 |.....4.......4..| +00003a40 00 00 00 00 00 34 d0 00 00 00 00 00 00 34 e0 00 |.....4.......4..| +00003a50 00 00 00 00 00 34 f0 00 00 00 00 00 00 35 00 00 |.....4.......5..| +00003a60 00 00 00 00 00 35 10 00 00 00 00 00 00 35 20 00 |.....5.......5 .| +00003a70 00 00 00 00 00 35 30 00 00 00 00 00 00 35 40 00 |.....50......5@.| +00003a80 00 00 00 00 00 35 50 00 00 00 00 00 00 35 60 00 |.....5P......5`.| +00003a90 00 00 00 00 00 35 70 00 00 00 00 00 00 35 80 00 |.....5p......5..| +00003aa0 00 00 00 00 00 35 90 00 00 00 00 00 00 35 a0 00 |.....5.......5..| +00003ab0 00 00 00 00 00 35 b0 00 00 00 00 00 00 35 c0 00 |.....5.......5..| +00003ac0 00 00 00 00 00 35 d0 00 00 00 00 00 00 35 e0 00 |.....5.......5..| +00003ad0 00 00 00 00 00 35 f0 00 00 00 00 00 00 36 00 00 |.....5.......6..| +00003ae0 00 00 00 00 00 36 10 00 00 00 00 00 00 36 20 00 |.....6.......6 .| +00003af0 00 00 00 00 00 36 30 00 00 00 00 00 00 36 40 00 |.....60......6@.| +00003b00 00 00 00 00 00 36 50 00 00 00 00 00 00 36 60 00 |.....6P......6`.| +00003b10 00 00 00 00 00 36 70 00 00 00 00 00 00 36 80 00 |.....6p......6..| +00003b20 00 00 00 00 00 36 90 00 00 00 00 00 00 36 a0 00 |.....6.......6..| +00003b30 00 00 00 00 00 36 b0 00 00 00 00 00 00 36 c0 00 |.....6.......6..| +00003b40 00 00 00 00 00 36 d0 00 00 00 00 00 00 36 e0 00 |.....6.......6..| +00003b50 00 00 00 00 00 36 f0 00 00 00 00 00 00 37 00 00 |.....6.......7..| +00003b60 00 00 00 00 00 37 10 00 00 00 00 00 00 37 20 00 |.....7.......7 .| +00003b70 00 00 00 00 00 37 30 00 00 00 00 00 00 37 40 00 |.....70......7@.| +00003b80 00 00 00 00 00 37 50 00 00 00 00 00 00 37 60 00 |.....7P......7`.| +00003b90 00 00 00 00 00 37 70 00 00 00 00 00 00 37 80 00 |.....7p......7..| +00003ba0 00 00 00 00 00 37 90 00 00 00 00 00 00 37 a0 00 |.....7.......7..| +00003bb0 00 00 00 00 00 37 b0 00 00 00 00 00 00 37 c0 00 |.....7.......7..| +00003bc0 00 00 00 00 00 37 d0 00 00 00 00 00 00 37 e0 00 |.....7.......7..| +00003bd0 00 00 00 00 00 37 f0 00 00 00 00 00 00 38 00 00 |.....7.......8..| +00003be0 00 00 00 00 00 38 10 00 00 00 00 00 00 38 20 00 |.....8.......8 .| +00003bf0 00 00 00 00 00 38 30 00 00 00 00 00 00 38 40 00 |.....80......8@.| +00003c00 00 00 00 00 00 38 50 00 00 00 00 00 00 38 60 00 |.....8P......8`.| +00003c10 00 00 00 00 00 38 70 00 00 00 00 00 00 38 80 00 |.....8p......8..| +00003c20 00 00 00 00 00 38 90 00 00 00 00 00 00 38 a0 00 |.....8.......8..| +00003c30 00 00 00 00 00 38 b0 00 00 00 00 00 00 38 c0 00 |.....8.......8..| +00003c40 00 00 00 00 00 38 d0 00 00 00 00 00 00 38 e0 00 |.....8.......8..| +00003c50 00 00 00 00 00 38 f0 00 00 00 00 00 00 39 00 00 |.....8.......9..| +00003c60 00 00 00 00 00 39 10 00 00 00 00 00 00 39 20 00 |.....9.......9 .| +00003c70 00 00 00 00 00 39 30 00 00 00 00 00 00 39 40 00 |.....90......9@.| +00003c80 00 00 00 00 00 39 50 00 00 00 00 00 00 39 60 00 |.....9P......9`.| +00003c90 00 00 00 00 00 39 70 00 00 00 00 00 00 39 80 00 |.....9p......9..| +00003ca0 00 00 00 00 00 39 90 00 00 00 00 00 00 39 a0 00 |.....9.......9..| +00003cb0 00 00 00 00 00 39 b0 00 00 00 00 00 00 39 c0 00 |.....9.......9..| +00003cc0 00 00 00 00 00 39 d0 00 00 00 00 00 00 39 e0 00 |.....9.......9..| +00003cd0 00 00 00 00 00 39 f0 00 00 00 00 00 00 3a 00 00 |.....9.......:..| +00003ce0 00 00 00 00 00 3a 10 00 00 00 00 00 00 3a 20 00 |.....:.......: .| +00003cf0 00 00 00 00 00 3a 30 00 00 00 00 00 00 3a 40 00 |.....:0......:@.| +00003d00 00 00 00 00 00 3a 50 00 00 00 00 00 00 3a 60 00 |.....:P......:`.| +00003d10 00 00 00 00 00 3a 70 00 00 00 00 00 00 3a 80 00 |.....:p......:..| +00003d20 00 00 00 00 00 3a 90 00 00 00 00 00 00 3a a0 00 |.....:.......:..| +00003d30 00 00 00 00 00 3a b0 00 00 00 00 00 00 3a c0 00 |.....:.......:..| +00003d40 00 00 00 00 00 3a d0 00 00 00 00 00 00 3a e0 00 |.....:.......:..| +00003d50 00 00 00 00 00 3a f0 00 00 00 00 00 00 3b 00 00 |.....:.......;..| +00003d60 00 00 00 00 00 3b 10 00 00 00 00 00 00 3b 20 00 |.....;.......; .| +00003d70 00 00 00 00 00 3b 30 00 00 00 00 00 00 3b 40 00 |.....;0......;@.| +00003d80 00 00 00 00 00 3b 50 00 00 00 00 00 00 3b 60 00 |.....;P......;`.| +00003d90 00 00 00 00 00 3b 70 00 00 00 00 00 00 3b 80 00 |.....;p......;..| +00003da0 00 00 00 00 00 3b 90 00 00 00 00 00 00 3b a0 00 |.....;.......;..| +00003db0 00 00 00 00 00 3b b0 00 00 00 00 00 00 3b c0 00 |.....;.......;..| +00003dc0 00 00 00 00 00 3b d0 00 00 00 00 00 00 3b e0 00 |.....;.......;..| +00003dd0 00 00 00 00 00 3b f0 00 00 00 00 00 00 3c 00 00 |.....;.......<..| +00003de0 00 00 00 00 00 3c 10 00 00 00 00 00 00 3c 20 00 |.....<.......< .| +00003df0 00 00 00 00 00 3c 30 00 00 00 00 00 00 3c 40 00 |.....<0......<@.| +00003e00 00 00 00 00 00 3c 50 00 00 00 00 00 00 3c 60 00 |.......| +00003ee0 00 00 00 00 00 3e 10 00 00 00 00 00 00 3e 20 00 |.....>.......> .| +00003ef0 00 00 00 00 00 3e 30 00 00 00 00 00 00 3e 40 00 |.....>0......>@.| +00003f00 00 00 00 00 00 3e 50 00 00 00 00 00 00 3e 60 00 |.....>P......>`.| +00003f10 00 00 00 00 00 3e 70 00 00 00 00 00 00 3e 80 00 |.....>p......>..| +00003f20 00 00 00 00 00 3e 90 00 00 00 00 00 00 3e a0 00 |.....>.......>..| +00003f30 00 00 00 00 00 3e b0 00 00 00 00 00 00 3e c0 00 |.....>.......>..| +00003f40 00 00 00 00 00 3e d0 00 00 00 00 00 00 3e e0 00 |.....>.......>..| +00003f50 00 00 00 00 00 3e f0 00 00 00 00 00 00 3f 00 00 |.....>.......?..| +00003f60 00 00 00 00 00 3f 10 00 00 00 00 00 00 3f 20 00 |.....?.......? .| +00003f70 00 00 00 00 00 3f 30 00 00 00 00 00 00 3f 40 00 |.....?0......?@.| +00003f80 00 00 00 00 00 3f 50 00 00 00 00 00 00 3f 60 00 |.....?P......?`.| +00003f90 00 00 00 00 00 3f 70 00 00 00 00 00 00 3f 80 00 |.....?p......?..| +00003fa0 00 00 00 00 00 3f 90 00 00 00 00 00 00 3f a0 00 |.....?.......?..| +00003fb0 00 00 00 00 00 3f b0 00 00 00 00 00 00 3f c0 00 |.....?.......?..| +00003fc0 00 00 00 00 00 3f d0 00 00 00 00 00 00 3f e0 00 |.....?.......?..| +00003fd0 00 00 00 00 00 3f f0 00 00 00 00 00 00 40 00 00 |.....?.......@..| +00003fe0 00 00 00 00 00 40 10 00 00 00 00 00 00 40 20 00 |.....@.......@ .| +00003ff0 00 00 00 00 00 40 30 00 00 00 00 00 00 40 40 00 |.....@0......@@.| +00004000 00 00 00 00 00 40 50 00 00 00 00 00 00 00 00 00 |.....@P.........| +00004010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00005000 45 52 02 00 00 00 21 08 00 00 00 00 00 00 00 00 |ER....!.........| +00005010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00005200 50 4d 00 00 00 00 00 03 00 00 00 01 00 00 00 03 |PM..............| +00005210 41 70 70 6c 65 00 00 00 00 00 00 00 00 00 00 00 |Apple...........| +00005220 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00005230 41 70 70 6c 65 5f 70 61 72 74 69 74 69 6f 6e 5f |Apple_partition_| +00005240 6d 61 70 00 00 00 00 00 00 00 00 00 00 00 00 00 |map.............| +00005250 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00005400 50 4d 00 00 00 00 00 03 00 00 00 08 00 00 20 00 |PM............ .| +00005410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00005430 46 72 65 65 42 53 44 2d 55 46 53 00 00 00 00 00 |FreeBSD-UFS.....| +00005440 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00005600 50 4d 00 00 00 00 00 03 00 00 20 08 00 00 01 00 |PM........ .....| +00005610 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00005630 46 72 65 65 42 53 44 2d 73 77 61 70 00 00 00 00 |FreeBSD-swap....| +00005640 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00006000 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00406000 Copied: stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.qcow2.hex (from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.qcow2.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.qcow2.hex Mon Jun 29 08:14:45 2020 (r362776, copy of r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.qcow2.hex) @@ -0,0 +1,80 @@ +# $FreeBSD$ +00000000 51 46 49 fb 00 00 00 02 00 00 00 00 00 00 00 00 |QFI.............| +00000010 00 00 00 00 00 00 00 10 00 00 00 00 00 43 00 00 |.............C..| +00000020 00 00 00 00 00 00 00 01 00 00 00 00 00 01 00 00 |................| +00000030 00 00 00 00 00 02 00 00 00 00 00 01 00 00 00 00 |................| +00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00010000 80 00 00 00 00 03 00 00 00 00 00 00 00 00 00 00 |................| +00010010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00020000 00 00 00 00 00 04 00 00 00 00 00 00 00 00 00 00 |................| +00020010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00030000 80 00 00 00 00 05 00 00 80 00 00 00 00 06 00 00 |................| +00030010 80 00 00 00 00 07 00 00 80 00 00 00 00 08 00 00 |................| +00030020 80 00 00 00 00 09 00 00 80 00 00 00 00 0a 00 00 |................| +00030030 80 00 00 00 00 0b 00 00 80 00 00 00 00 0c 00 00 |................| +00030040 80 00 00 00 00 0d 00 00 80 00 00 00 00 0e 00 00 |................| +00030050 80 00 00 00 00 0f 00 00 80 00 00 00 00 10 00 00 |................| +00030060 80 00 00 00 00 11 00 00 80 00 00 00 00 12 00 00 |................| +00030070 80 00 00 00 00 13 00 00 80 00 00 00 00 14 00 00 |................| +00030080 80 00 00 00 00 15 00 00 80 00 00 00 00 16 00 00 |................| +00030090 80 00 00 00 00 17 00 00 80 00 00 00 00 18 00 00 |................| +000300a0 80 00 00 00 00 19 00 00 80 00 00 00 00 1a 00 00 |................| +000300b0 80 00 00 00 00 1b 00 00 80 00 00 00 00 1c 00 00 |................| +000300c0 80 00 00 00 00 1d 00 00 80 00 00 00 00 1e 00 00 |................| +000300d0 80 00 00 00 00 1f 00 00 80 00 00 00 00 20 00 00 |............. ..| +000300e0 80 00 00 00 00 21 00 00 80 00 00 00 00 22 00 00 |.....!......."..| +000300f0 80 00 00 00 00 23 00 00 80 00 00 00 00 24 00 00 |.....#.......$..| +00030100 80 00 00 00 00 25 00 00 80 00 00 00 00 26 00 00 |.....%.......&..| +00030110 80 00 00 00 00 27 00 00 80 00 00 00 00 28 00 00 |.....'.......(..| +00030120 80 00 00 00 00 29 00 00 80 00 00 00 00 2a 00 00 |.....).......*..| +00030130 80 00 00 00 00 2b 00 00 80 00 00 00 00 2c 00 00 |.....+.......,..| +00030140 80 00 00 00 00 2d 00 00 80 00 00 00 00 2e 00 00 |.....-..........| +00030150 80 00 00 00 00 2f 00 00 80 00 00 00 00 30 00 00 |...../.......0..| +00030160 80 00 00 00 00 31 00 00 80 00 00 00 00 32 00 00 |.....1.......2..| +00030170 80 00 00 00 00 33 00 00 80 00 00 00 00 34 00 00 |.....3.......4..| +00030180 80 00 00 00 00 35 00 00 80 00 00 00 00 36 00 00 |.....5.......6..| +00030190 80 00 00 00 00 37 00 00 80 00 00 00 00 38 00 00 |.....7.......8..| +000301a0 80 00 00 00 00 39 00 00 80 00 00 00 00 3a 00 00 |.....9.......:..| +000301b0 80 00 00 00 00 3b 00 00 80 00 00 00 00 3c 00 00 |.....;.......<..| +000301c0 80 00 00 00 00 3d 00 00 80 00 00 00 00 3e 00 00 |.....=.......>..| +000301d0 80 00 00 00 00 3f 00 00 80 00 00 00 00 40 00 00 |.....?.......@..| +000301e0 80 00 00 00 00 41 00 00 80 00 00 00 00 42 00 00 |.....A.......B..| +000301f0 80 00 00 00 00 43 00 00 80 00 00 00 00 44 00 00 |.....C.......D..| +00030200 80 00 00 00 00 45 00 00 00 00 00 00 00 00 00 00 |.....E..........| +00030210 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00040000 00 01 00 01 00 01 00 01 00 01 00 01 00 01 00 01 |................| +* +00040080 00 01 00 01 00 01 00 01 00 01 00 01 00 00 00 00 |................| +00040090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00050000 45 52 02 00 00 00 21 80 00 00 00 00 00 00 00 00 |ER....!.........| +00050010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00050200 50 4d 00 00 00 00 00 03 00 00 00 01 00 00 00 03 |PM..............| +00050210 41 70 70 6c 65 00 00 00 00 00 00 00 00 00 00 00 |Apple...........| +00050220 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00050230 41 70 70 6c 65 5f 70 61 72 74 69 74 69 6f 6e 5f |Apple_partition_| +00050240 6d 61 70 00 00 00 00 00 00 00 00 00 00 00 00 00 |map.............| +00050250 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00050400 50 4d 00 00 00 00 00 03 00 00 00 08 00 00 20 00 |PM............ .| +00050410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00050430 46 72 65 65 42 53 44 2d 55 46 53 00 00 00 00 00 |FreeBSD-UFS.....| +00050440 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00050600 50 4d 00 00 00 00 00 03 00 00 20 08 00 00 01 00 |PM........ .....| +00050610 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00050630 46 72 65 65 42 53 44 2d 73 77 61 70 00 00 00 00 |FreeBSD-swap....| +00050640 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00051000 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00451000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00460000 Copied: stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.raw.hex (from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.raw.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.raw.hex Mon Jun 29 08:14:45 2020 (r362776, copy of r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.raw.hex) @@ -0,0 +1,28 @@ +# $FreeBSD$ +00000000 45 52 02 00 00 00 21 08 00 00 00 00 00 00 00 00 |ER....!.........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000200 50 4d 00 00 00 00 00 03 00 00 00 01 00 00 00 03 |PM..............| +00000210 41 70 70 6c 65 00 00 00 00 00 00 00 00 00 00 00 |Apple...........| +00000220 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00000230 41 70 70 6c 65 5f 70 61 72 74 69 74 69 6f 6e 5f |Apple_partition_| +00000240 6d 61 70 00 00 00 00 00 00 00 00 00 00 00 00 00 |map.............| +00000250 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000400 50 4d 00 00 00 00 00 03 00 00 00 08 00 00 20 00 |PM............ .| +00000410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000430 46 72 65 65 42 53 44 2d 55 46 53 00 00 00 00 00 |FreeBSD-UFS.....| +00000440 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000600 50 4d 00 00 00 00 00 03 00 00 20 08 00 00 01 00 |PM........ .....| +00000610 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000630 46 72 65 65 42 53 44 2d 73 77 61 70 00 00 00 00 |FreeBSD-swap....| +00000640 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00001000 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00401000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00421000 Copied: stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.vhd.hex (from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.vhd.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.vhd.hex Mon Jun 29 08:14:45 2020 (r362776, copy of r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.vhd.hex) @@ -0,0 +1,60 @@ +# $FreeBSD$ +00000000 63 6f 6e 65 63 74 69 78 00 00 00 02 00 01 00 00 |conectix........| +00000010 00 00 00 00 00 00 02 00 01 23 45 67 2a 69 6d 67 |.........#Eg*img| +00000020 00 02 00 00 57 69 32 6b 00 00 00 00 00 42 68 00 |....Wi2k.....Bh.| +00000030 00 00 00 00 00 42 68 00 00 7d 04 11 00 00 00 03 |.....Bh..}......| +00000040 ff ff f7 0e 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00000050 01 01 01 01 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00000060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000200 63 78 73 70 61 72 73 65 ff ff ff ff ff ff ff ff |cxsparse........| +00000210 00 00 00 00 00 00 06 00 00 01 00 00 00 00 00 03 |................| +00000220 00 20 00 00 ff ff f4 74 00 00 00 00 00 00 00 00 |. .....t........| +00000230 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000600 00 00 00 04 00 00 10 05 00 00 20 06 ff ff ff ff |.......... .....| +00000610 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| +* +00000a00 45 52 02 00 00 00 21 34 00 00 00 00 00 00 00 00 |ER....!4........| +00000a10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000c00 50 4d 00 00 00 00 00 03 00 00 00 01 00 00 00 03 |PM..............| +00000c10 41 70 70 6c 65 00 00 00 00 00 00 00 00 00 00 00 |Apple...........| +00000c20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00000c30 41 70 70 6c 65 5f 70 61 72 74 69 74 69 6f 6e 5f |Apple_partition_| +00000c40 6d 61 70 00 00 00 00 00 00 00 00 00 00 00 00 00 |map.............| +00000c50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000e00 50 4d 00 00 00 00 00 03 00 00 00 08 00 00 20 00 |PM............ .| +00000e10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000e30 46 72 65 65 42 53 44 2d 55 46 53 00 00 00 00 00 |FreeBSD-UFS.....| +00000e40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00001000 50 4d 00 00 00 00 00 03 00 00 20 08 00 00 01 00 |PM........ .....| +00001010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00001030 46 72 65 65 42 53 44 2d 73 77 61 70 00 00 00 00 |FreeBSD-swap....| +00001040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00001a00 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00200a00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| +* +00200c00 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00400c00 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| +* +00400e00 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00401e00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00600e00 63 6f 6e 65 63 74 69 78 00 00 00 02 00 01 00 00 |conectix........| +00600e10 00 00 00 00 00 00 02 00 01 23 45 67 2a 69 6d 67 |.........#Eg*img| +00600e20 00 02 00 00 57 69 32 6b 00 00 00 00 00 42 68 00 |....Wi2k.....Bh.| +00600e30 00 00 00 00 00 42 68 00 00 7d 04 11 00 00 00 03 |.....Bh..}......| +00600e40 ff ff f7 0e 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00600e50 01 01 01 01 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00600e60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00601000 Copied: stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdf.hex (from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdf.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdf.hex Mon Jun 29 08:14:45 2020 (r362776, copy of r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdf.hex) @@ -0,0 +1,36 @@ +# $FreeBSD$ +00000000 45 52 02 00 00 00 28 00 00 00 00 00 00 00 00 00 |ER....(.........| +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000200 50 4d 00 00 00 00 00 03 00 00 00 01 00 00 00 03 |PM..............| +00000210 41 70 70 6c 65 00 00 00 00 00 00 00 00 00 00 00 |Apple...........| +00000220 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00000230 41 70 70 6c 65 5f 70 61 72 74 69 74 69 6f 6e 5f |Apple_partition_| +00000240 6d 61 70 00 00 00 00 00 00 00 00 00 00 00 00 00 |map.............| +00000250 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000400 50 4d 00 00 00 00 00 03 00 00 00 08 00 00 20 00 |PM............ .| +00000410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000430 46 72 65 65 42 53 44 2d 55 46 53 00 00 00 00 00 |FreeBSD-UFS.....| +00000440 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000600 50 4d 00 00 00 00 00 03 00 00 20 08 00 00 01 00 |PM........ .....| +00000610 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000630 46 72 65 65 42 53 44 2d 73 77 61 70 00 00 00 00 |FreeBSD-swap....| +00000640 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00001000 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a 50 0a |P.P.P.P.P.P.P.P.| +* +00401000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00500000 63 6f 6e 65 63 74 69 78 00 00 00 02 00 01 00 00 |conectix........| +00500010 ff ff ff ff ff ff ff ff 01 23 45 67 2a 69 6d 67 |.........#Eg*img| +00500020 00 02 00 00 57 69 32 6b 00 00 00 00 00 50 00 00 |....Wi2k.....P..| +00500030 00 00 00 00 00 50 00 00 00 96 04 11 00 00 00 02 |.....P..........| +00500040 ff ff ef b4 01 01 01 01 01 01 01 01 01 01 01 01 |................| +00500050 01 01 01 01 00 00 00 00 00 00 00 00 00 00 00 00 |................| +00500060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00500200 Copied: stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.vmdk.hex (from r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.vmdk.hex) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/usr.bin/mkimg/tests/img-1x1-4096-apm.vmdk.hex Mon Jun 29 08:14:45 2020 (r362776, copy of r344957, head/usr.bin/mkimg/tests/img-1x1-4096-apm.vmdk.hex) @@ -0,0 +1,322 @@ +# $FreeBSD$ +00000000 4b 44 4d 56 01 00 00 00 03 00 00 00 00 28 00 00 |KDMV.........(..| +00000010 00 00 00 00 10 00 00 00 00 00 00 00 01 00 00 00 |................| +00000020 00 00 00 00 01 00 00 00 00 00 00 00 00 02 00 00 |................| +00000030 0b 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 |................| +00000040 20 00 00 00 00 00 00 00 00 0a 20 0d 0a 00 00 00 | ......... .....| +00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000200 23 20 44 69 73 6b 20 44 65 73 63 72 69 70 74 6f |# Disk Descripto| +00000210 72 46 69 6c 65 0a 76 65 72 73 69 6f 6e 3d 31 0a |rFile.version=1.| +00000220 43 49 44 3d 30 30 30 30 30 30 30 30 0a 70 61 72 |CID=00000000.par| +00000230 65 6e 74 43 49 44 3d 66 66 66 66 66 66 66 66 0a |entCID=ffffffff.| +00000240 63 72 65 61 74 65 54 79 70 65 3d 22 6d 6f 6e 6f |createType="mono| +00000250 6c 69 74 68 69 63 53 70 61 72 73 65 22 0a 23 20 |lithicSparse".# | +00000260 45 78 74 65 6e 74 20 64 65 73 63 72 69 70 74 69 |Extent descripti| +00000270 6f 6e 0a 52 57 20 31 30 32 34 30 20 53 50 41 52 |on.RW 10240 SPAR| +00000280 53 45 20 22 22 0a 23 20 54 68 65 20 44 69 73 6b |SE "".# The Disk| +00000290 20 44 61 74 61 20 42 61 73 65 0a 23 44 44 42 0a | Data Base.#DDB.| +000002a0 64 64 62 2e 61 64 61 70 74 65 72 54 79 70 65 20 |ddb.adapterType | +000002b0 3d 20 22 69 64 65 22 0a 64 64 62 2e 67 65 6f 6d |= "ide".ddb.geom| +000002c0 65 74 72 79 2e 63 79 6c 69 6e 64 65 72 73 20 3d |etry.cylinders =| +000002d0 20 22 31 30 32 34 30 22 0a 64 64 62 2e 67 65 6f | "10240".ddb.geo| +000002e0 6d 65 74 72 79 2e 68 65 61 64 73 20 3d 20 22 31 |metry.heads = "1| +000002f0 22 0a 64 64 62 2e 67 65 6f 6d 65 74 72 79 2e 73 |".ddb.geometry.s| +00000300 65 63 74 6f 72 73 20 3d 20 22 31 22 0a 00 00 00 |ectors = "1"....| +00000310 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000400 03 00 00 00 07 00 00 00 00 00 00 00 00 00 00 00 |................| +00000410 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00000600 20 00 00 00 30 00 00 00 40 00 00 00 50 00 00 00 | ...0...@...P...| +00000610 60 00 00 00 70 00 00 00 80 00 00 00 90 00 00 00 |`...p...........| +00000620 a0 00 00 00 b0 00 00 00 c0 00 00 00 d0 00 00 00 |................| +00000630 e0 00 00 00 f0 00 00 00 00 01 00 00 10 01 00 00 |................| +00000640 20 01 00 00 30 01 00 00 40 01 00 00 50 01 00 00 | ...0...@...P...| +00000650 60 01 00 00 70 01 00 00 80 01 00 00 90 01 00 00 |`...p...........| +00000660 a0 01 00 00 b0 01 00 00 c0 01 00 00 d0 01 00 00 |................| +00000670 e0 01 00 00 f0 01 00 00 00 02 00 00 10 02 00 00 |................| +00000680 20 02 00 00 30 02 00 00 40 02 00 00 50 02 00 00 | ...0...@...P...| +00000690 60 02 00 00 70 02 00 00 80 02 00 00 90 02 00 00 |`...p...........| +000006a0 a0 02 00 00 b0 02 00 00 c0 02 00 00 d0 02 00 00 |................| +000006b0 e0 02 00 00 f0 02 00 00 00 03 00 00 10 03 00 00 |................| +000006c0 20 03 00 00 30 03 00 00 40 03 00 00 50 03 00 00 | ...0...@...P...| +000006d0 60 03 00 00 70 03 00 00 80 03 00 00 90 03 00 00 |`...p...........| +000006e0 a0 03 00 00 b0 03 00 00 c0 03 00 00 d0 03 00 00 |................| +000006f0 e0 03 00 00 f0 03 00 00 00 04 00 00 10 04 00 00 |................| +00000700 20 04 00 00 30 04 00 00 40 04 00 00 50 04 00 00 | ...0...@...P...| +00000710 60 04 00 00 70 04 00 00 80 04 00 00 90 04 00 00 |`...p...........| +00000720 a0 04 00 00 b0 04 00 00 c0 04 00 00 d0 04 00 00 |................| +00000730 e0 04 00 00 f0 04 00 00 00 05 00 00 10 05 00 00 |................| +00000740 20 05 00 00 30 05 00 00 40 05 00 00 50 05 00 00 | ...0...@...P...| +00000750 60 05 00 00 70 05 00 00 80 05 00 00 90 05 00 00 |`...p...........| +00000760 a0 05 00 00 b0 05 00 00 c0 05 00 00 d0 05 00 00 |................| +00000770 e0 05 00 00 f0 05 00 00 00 06 00 00 10 06 00 00 |................| +00000780 20 06 00 00 30 06 00 00 40 06 00 00 50 06 00 00 | ...0...@...P...| +00000790 60 06 00 00 70 06 00 00 80 06 00 00 90 06 00 00 |`...p...........| +000007a0 a0 06 00 00 b0 06 00 00 c0 06 00 00 d0 06 00 00 |................| +000007b0 e0 06 00 00 f0 06 00 00 00 07 00 00 10 07 00 00 |................| +000007c0 20 07 00 00 30 07 00 00 40 07 00 00 50 07 00 00 | ...0...@...P...| +000007d0 60 07 00 00 70 07 00 00 80 07 00 00 90 07 00 00 |`...p...........| +000007e0 a0 07 00 00 b0 07 00 00 c0 07 00 00 d0 07 00 00 |................| +000007f0 e0 07 00 00 f0 07 00 00 00 08 00 00 10 08 00 00 |................| +00000800 20 08 00 00 30 08 00 00 40 08 00 00 50 08 00 00 | ...0...@...P...| +00000810 60 08 00 00 70 08 00 00 80 08 00 00 90 08 00 00 |`...p...........| +00000820 a0 08 00 00 b0 08 00 00 c0 08 00 00 d0 08 00 00 |................| +00000830 e0 08 00 00 f0 08 00 00 00 09 00 00 10 09 00 00 |................| +00000840 20 09 00 00 30 09 00 00 40 09 00 00 50 09 00 00 | ...0...@...P...| +00000850 60 09 00 00 70 09 00 00 80 09 00 00 90 09 00 00 |`...p...........| +00000860 a0 09 00 00 b0 09 00 00 c0 09 00 00 d0 09 00 00 |................| +00000870 e0 09 00 00 f0 09 00 00 00 0a 00 00 10 0a 00 00 |................| +00000880 20 0a 00 00 30 0a 00 00 40 0a 00 00 50 0a 00 00 | ...0...@...P...| +00000890 60 0a 00 00 70 0a 00 00 80 0a 00 00 90 0a 00 00 |`...p...........| +000008a0 a0 0a 00 00 b0 0a 00 00 c0 0a 00 00 d0 0a 00 00 |................| +000008b0 e0 0a 00 00 f0 0a 00 00 00 0b 00 00 10 0b 00 00 |................| +000008c0 20 0b 00 00 30 0b 00 00 40 0b 00 00 50 0b 00 00 | ...0...@...P...| +000008d0 60 0b 00 00 70 0b 00 00 80 0b 00 00 90 0b 00 00 |`...p...........| +000008e0 a0 0b 00 00 b0 0b 00 00 c0 0b 00 00 d0 0b 00 00 |................| +000008f0 e0 0b 00 00 f0 0b 00 00 00 0c 00 00 10 0c 00 00 |................| +00000900 20 0c 00 00 30 0c 00 00 40 0c 00 00 50 0c 00 00 | ...0...@...P...| +00000910 60 0c 00 00 70 0c 00 00 80 0c 00 00 90 0c 00 00 |`...p...........| +00000920 a0 0c 00 00 b0 0c 00 00 c0 0c 00 00 d0 0c 00 00 |................| +00000930 e0 0c 00 00 f0 0c 00 00 00 0d 00 00 10 0d 00 00 |................| +00000940 20 0d 00 00 30 0d 00 00 40 0d 00 00 50 0d 00 00 | ...0...@...P...| +00000950 60 0d 00 00 70 0d 00 00 80 0d 00 00 90 0d 00 00 |`...p...........| +00000960 a0 0d 00 00 b0 0d 00 00 c0 0d 00 00 d0 0d 00 00 |................| +00000970 e0 0d 00 00 f0 0d 00 00 00 0e 00 00 10 0e 00 00 |................| +00000980 20 0e 00 00 30 0e 00 00 40 0e 00 00 50 0e 00 00 | ...0...@...P...| +00000990 60 0e 00 00 70 0e 00 00 80 0e 00 00 90 0e 00 00 |`...p...........| +000009a0 a0 0e 00 00 b0 0e 00 00 c0 0e 00 00 d0 0e 00 00 |................| +000009b0 e0 0e 00 00 f0 0e 00 00 00 0f 00 00 10 0f 00 00 |................| +000009c0 20 0f 00 00 30 0f 00 00 40 0f 00 00 50 0f 00 00 | ...0...@...P...| +000009d0 60 0f 00 00 70 0f 00 00 80 0f 00 00 90 0f 00 00 |`...p...........| +000009e0 a0 0f 00 00 b0 0f 00 00 c0 0f 00 00 d0 0f 00 00 |................| +000009f0 e0 0f 00 00 f0 0f 00 00 00 10 00 00 10 10 00 00 |................| +00000a00 20 10 00 00 30 10 00 00 40 10 00 00 50 10 00 00 | ...0...@...P...| +00000a10 60 10 00 00 70 10 00 00 80 10 00 00 90 10 00 00 |`...p...........| +00000a20 a0 10 00 00 b0 10 00 00 c0 10 00 00 d0 10 00 00 |................| +00000a30 e0 10 00 00 f0 10 00 00 00 11 00 00 10 11 00 00 |................| +00000a40 20 11 00 00 30 11 00 00 40 11 00 00 50 11 00 00 | ...0...@...P...| +00000a50 60 11 00 00 70 11 00 00 80 11 00 00 90 11 00 00 |`...p...........| +00000a60 a0 11 00 00 b0 11 00 00 c0 11 00 00 d0 11 00 00 |................| +00000a70 e0 11 00 00 f0 11 00 00 00 12 00 00 10 12 00 00 |................| +00000a80 20 12 00 00 30 12 00 00 40 12 00 00 50 12 00 00 | ...0...@...P...| +00000a90 60 12 00 00 70 12 00 00 80 12 00 00 90 12 00 00 |`...p...........| +00000aa0 a0 12 00 00 b0 12 00 00 c0 12 00 00 d0 12 00 00 |................| +00000ab0 e0 12 00 00 f0 12 00 00 00 13 00 00 10 13 00 00 |................| +00000ac0 20 13 00 00 30 13 00 00 40 13 00 00 50 13 00 00 | ...0...@...P...| +00000ad0 60 13 00 00 70 13 00 00 80 13 00 00 90 13 00 00 |`...p...........| +00000ae0 a0 13 00 00 b0 13 00 00 c0 13 00 00 d0 13 00 00 |................| +00000af0 e0 13 00 00 f0 13 00 00 00 14 00 00 10 14 00 00 |................| +00000b00 20 14 00 00 30 14 00 00 40 14 00 00 50 14 00 00 | ...0...@...P...| +00000b10 60 14 00 00 70 14 00 00 80 14 00 00 90 14 00 00 |`...p...........| +00000b20 a0 14 00 00 b0 14 00 00 c0 14 00 00 d0 14 00 00 |................| +00000b30 e0 14 00 00 f0 14 00 00 00 15 00 00 10 15 00 00 |................| +00000b40 20 15 00 00 30 15 00 00 40 15 00 00 50 15 00 00 | ...0...@...P...| +00000b50 60 15 00 00 70 15 00 00 80 15 00 00 90 15 00 00 |`...p...........| +00000b60 a0 15 00 00 b0 15 00 00 c0 15 00 00 d0 15 00 00 |................| +00000b70 e0 15 00 00 f0 15 00 00 00 16 00 00 10 16 00 00 |................| +00000b80 20 16 00 00 30 16 00 00 40 16 00 00 50 16 00 00 | ...0...@...P...| +00000b90 60 16 00 00 70 16 00 00 80 16 00 00 90 16 00 00 |`...p...........| +00000ba0 a0 16 00 00 b0 16 00 00 c0 16 00 00 d0 16 00 00 |................| +00000bb0 e0 16 00 00 f0 16 00 00 00 17 00 00 10 17 00 00 |................| +00000bc0 20 17 00 00 30 17 00 00 40 17 00 00 50 17 00 00 | ...0...@...P...| +00000bd0 60 17 00 00 70 17 00 00 80 17 00 00 90 17 00 00 |`...p...........| +00000be0 a0 17 00 00 b0 17 00 00 c0 17 00 00 d0 17 00 00 |................| +00000bf0 e0 17 00 00 f0 17 00 00 00 18 00 00 10 18 00 00 |................| +00000c00 20 18 00 00 30 18 00 00 40 18 00 00 50 18 00 00 | ...0...@...P...| +00000c10 60 18 00 00 70 18 00 00 80 18 00 00 90 18 00 00 |`...p...........| +00000c20 a0 18 00 00 b0 18 00 00 c0 18 00 00 d0 18 00 00 |................| +00000c30 e0 18 00 00 f0 18 00 00 00 19 00 00 10 19 00 00 |................| +00000c40 20 19 00 00 30 19 00 00 40 19 00 00 50 19 00 00 | ...0...@...P...| +00000c50 60 19 00 00 70 19 00 00 80 19 00 00 90 19 00 00 |`...p...........| +00000c60 a0 19 00 00 b0 19 00 00 c0 19 00 00 d0 19 00 00 |................| +00000c70 e0 19 00 00 f0 19 00 00 00 1a 00 00 10 1a 00 00 |................| +00000c80 20 1a 00 00 30 1a 00 00 40 1a 00 00 50 1a 00 00 | ...0...@...P...| +00000c90 60 1a 00 00 70 1a 00 00 80 1a 00 00 90 1a 00 00 |`...p...........| +00000ca0 a0 1a 00 00 b0 1a 00 00 c0 1a 00 00 d0 1a 00 00 |................| +00000cb0 e0 1a 00 00 f0 1a 00 00 00 1b 00 00 10 1b 00 00 |................| +00000cc0 20 1b 00 00 30 1b 00 00 40 1b 00 00 50 1b 00 00 | ...0...@...P...| +00000cd0 60 1b 00 00 70 1b 00 00 80 1b 00 00 90 1b 00 00 |`...p...........| +00000ce0 a0 1b 00 00 b0 1b 00 00 c0 1b 00 00 d0 1b 00 00 |................| +00000cf0 e0 1b 00 00 f0 1b 00 00 00 1c 00 00 10 1c 00 00 |................| +00000d00 20 1c 00 00 30 1c 00 00 40 1c 00 00 50 1c 00 00 | ...0...@...P...| +00000d10 60 1c 00 00 70 1c 00 00 80 1c 00 00 90 1c 00 00 |`...p...........| +00000d20 a0 1c 00 00 b0 1c 00 00 c0 1c 00 00 d0 1c 00 00 |................| +00000d30 e0 1c 00 00 f0 1c 00 00 00 1d 00 00 10 1d 00 00 |................| +00000d40 20 1d 00 00 30 1d 00 00 40 1d 00 00 50 1d 00 00 | ...0...@...P...| +00000d50 60 1d 00 00 70 1d 00 00 80 1d 00 00 90 1d 00 00 |`...p...........| +00000d60 a0 1d 00 00 b0 1d 00 00 c0 1d 00 00 d0 1d 00 00 |................| +00000d70 e0 1d 00 00 f0 1d 00 00 00 1e 00 00 10 1e 00 00 |................| +00000d80 20 1e 00 00 30 1e 00 00 40 1e 00 00 50 1e 00 00 | ...0...@...P...| +00000d90 60 1e 00 00 70 1e 00 00 80 1e 00 00 90 1e 00 00 |`...p...........| +00000da0 a0 1e 00 00 b0 1e 00 00 c0 1e 00 00 d0 1e 00 00 |................| +00000db0 e0 1e 00 00 f0 1e 00 00 00 1f 00 00 10 1f 00 00 |................| +00000dc0 20 1f 00 00 30 1f 00 00 40 1f 00 00 50 1f 00 00 | ...0...@...P...| +00000dd0 60 1f 00 00 70 1f 00 00 80 1f 00 00 90 1f 00 00 |`...p...........| +00000de0 a0 1f 00 00 b0 1f 00 00 c0 1f 00 00 d0 1f 00 00 |................| +00000df0 e0 1f 00 00 f0 1f 00 00 00 20 00 00 10 20 00 00 |......... ... ..| +00000e00 20 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ..............| +00000e10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00001600 0c 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 |................| +00001610 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| +* +00001800 20 00 00 00 30 00 00 00 40 00 00 00 50 00 00 00 | ...0...@...P...| +00001810 60 00 00 00 70 00 00 00 80 00 00 00 90 00 00 00 |`...p...........| +00001820 a0 00 00 00 b0 00 00 00 c0 00 00 00 d0 00 00 00 |................| +00001830 e0 00 00 00 f0 00 00 00 00 01 00 00 10 01 00 00 |................| +00001840 20 01 00 00 30 01 00 00 40 01 00 00 50 01 00 00 | ...0...@...P...| +00001850 60 01 00 00 70 01 00 00 80 01 00 00 90 01 00 00 |`...p...........| +00001860 a0 01 00 00 b0 01 00 00 c0 01 00 00 d0 01 00 00 |................| +00001870 e0 01 00 00 f0 01 00 00 00 02 00 00 10 02 00 00 |................| +00001880 20 02 00 00 30 02 00 00 40 02 00 00 50 02 00 00 | ...0...@...P...| +00001890 60 02 00 00 70 02 00 00 80 02 00 00 90 02 00 00 |`...p...........| +000018a0 a0 02 00 00 b0 02 00 00 c0 02 00 00 d0 02 00 00 |................| +000018b0 e0 02 00 00 f0 02 00 00 00 03 00 00 10 03 00 00 |................| +000018c0 20 03 00 00 30 03 00 00 40 03 00 00 50 03 00 00 | ...0...@...P...| +000018d0 60 03 00 00 70 03 00 00 80 03 00 00 90 03 00 00 |`...p...........| +000018e0 a0 03 00 00 b0 03 00 00 c0 03 00 00 d0 03 00 00 |................| +000018f0 e0 03 00 00 f0 03 00 00 00 04 00 00 10 04 00 00 |................| +00001900 20 04 00 00 30 04 00 00 40 04 00 00 50 04 00 00 | ...0...@...P...| +00001910 60 04 00 00 70 04 00 00 80 04 00 00 90 04 00 00 |`...p...........| +00001920 a0 04 00 00 b0 04 00 00 c0 04 00 00 d0 04 00 00 |................| +00001930 e0 04 00 00 f0 04 00 00 00 05 00 00 10 05 00 00 |................| +00001940 20 05 00 00 30 05 00 00 40 05 00 00 50 05 00 00 | ...0...@...P...| +00001950 60 05 00 00 70 05 00 00 80 05 00 00 90 05 00 00 |`...p...........| +00001960 a0 05 00 00 b0 05 00 00 c0 05 00 00 d0 05 00 00 |................| +00001970 e0 05 00 00 f0 05 00 00 00 06 00 00 10 06 00 00 |................| +00001980 20 06 00 00 30 06 00 00 40 06 00 00 50 06 00 00 | ...0...@...P...| +00001990 60 06 00 00 70 06 00 00 80 06 00 00 90 06 00 00 |`...p...........| +000019a0 a0 06 00 00 b0 06 00 00 c0 06 00 00 d0 06 00 00 |................| +000019b0 e0 06 00 00 f0 06 00 00 00 07 00 00 10 07 00 00 |................| +000019c0 20 07 00 00 30 07 00 00 40 07 00 00 50 07 00 00 | ...0...@...P...| +000019d0 60 07 00 00 70 07 00 00 80 07 00 00 90 07 00 00 |`...p...........| +000019e0 a0 07 00 00 b0 07 00 00 c0 07 00 00 d0 07 00 00 |................| +000019f0 e0 07 00 00 f0 07 00 00 00 08 00 00 10 08 00 00 |................| +00001a00 20 08 00 00 30 08 00 00 40 08 00 00 50 08 00 00 | ...0...@...P...| +00001a10 60 08 00 00 70 08 00 00 80 08 00 00 90 08 00 00 |`...p...........| +00001a20 a0 08 00 00 b0 08 00 00 c0 08 00 00 d0 08 00 00 |................| +00001a30 e0 08 00 00 f0 08 00 00 00 09 00 00 10 09 00 00 |................| +00001a40 20 09 00 00 30 09 00 00 40 09 00 00 50 09 00 00 | ...0...@...P...| +00001a50 60 09 00 00 70 09 00 00 80 09 00 00 90 09 00 00 |`...p...........| +00001a60 a0 09 00 00 b0 09 00 00 c0 09 00 00 d0 09 00 00 |................| +00001a70 e0 09 00 00 f0 09 00 00 00 0a 00 00 10 0a 00 00 |................| +00001a80 20 0a 00 00 30 0a 00 00 40 0a 00 00 50 0a 00 00 | ...0...@...P...| +00001a90 60 0a 00 00 70 0a 00 00 80 0a 00 00 90 0a 00 00 |`...p...........| +00001aa0 a0 0a 00 00 b0 0a 00 00 c0 0a 00 00 d0 0a 00 00 |................| +00001ab0 e0 0a 00 00 f0 0a 00 00 00 0b 00 00 10 0b 00 00 |................| +00001ac0 20 0b 00 00 30 0b 00 00 40 0b 00 00 50 0b 00 00 | ...0...@...P...| *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Jun 29 09:08:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EC45E343F99; Mon, 29 Jun 2020 09:08:37 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wM9K5yT7z4Ybq; Mon, 29 Jun 2020 09:08:37 +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 9536B25015; Mon, 29 Jun 2020 09:08:37 +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 05T98bSG067075; Mon, 29 Jun 2020 09:08:37 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T98bBk067073; Mon, 29 Jun 2020 09:08:37 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202006290908.05T98bBk067073@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 29 Jun 2020 09:08:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362777 - in head/sys/arm64: arm64 include X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys/arm64: arm64 include X-SVN-Commit-Revision: 362777 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 09:08:38 -0000 Author: andrew Date: Mon Jun 29 09:08:36 2020 New Revision: 362777 URL: https://svnweb.freebsd.org/changeset/base/362777 Log: Create a kernel arm64 ID register view In preparation for using ifuncs in the kernel is is useful to have a common view of the arm64 ID registers across all CPUs. Add this and extract the logic for finding the lower value of two fields to a new helper function. Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D25463 Modified: head/sys/arm64/arm64/identcpu.c head/sys/arm64/include/undefined.h Modified: head/sys/arm64/arm64/identcpu.c ============================================================================== --- head/sys/arm64/arm64/identcpu.c Mon Jun 29 08:14:45 2020 (r362776) +++ head/sys/arm64/arm64/identcpu.c Mon Jun 29 09:08:36 2020 (r362777) @@ -134,6 +134,7 @@ struct cpu_desc { }; static struct cpu_desc cpu_desc[MAXCPU]; +static struct cpu_desc kern_cpu_desc; static struct cpu_desc user_cpu_desc; static u_int cpu_print_regs; #define PRINT_ID_AA64_AFR0 0x00000001 @@ -936,46 +937,109 @@ extract_user_id_field(u_int reg, u_int field_shift, ui return (false); } +bool +get_kernel_reg(u_int reg, uint64_t *val) +{ + int i; + + for (i = 0; i < nitems(user_regs); i++) { + if (user_regs[i].reg == reg) { + *val = CPU_DESC_FIELD(kern_cpu_desc, i); + return (true); + } + } + + return (false); +} + +static uint64_t +update_lower_register(uint64_t val, uint64_t new_val, u_int shift, + int width, bool sign) +{ + uint64_t mask; + uint64_t new_field, old_field; + bool update; + + KASSERT(width > 0 && width < 64, ("%s: Invalid width %d", __func__, + width)); + + mask = (1ul << width) - 1; + new_field = (new_val >> shift) & mask; + old_field = (val >> shift) & mask; + + update = false; + if (sign) { + /* + * The field is signed. Toggle the upper bit so the comparison + * works on unsigned values as this makes positive numbers, + * i.e. those with a 0 bit, larger than negative numbers, + * i.e. those with a 1 bit, in an unsigned comparison. + */ + if ((new_field ^ (1ul << (width - 1))) < + (old_field ^ (1ul << (width - 1)))) + update = true; + } else { + if (new_field < old_field) + update = true; + } + + if (update) { + val &= ~(mask << shift); + val |= new_field << shift; + } + + return (val); +} + static void -update_user_regs(u_int cpu) +update_special_regs(u_int cpu) { struct mrs_field *fields; - uint64_t cur, value; - int i, j, cur_field, new_field; + uint64_t user_reg, kern_reg, value; + int i, j; + if (cpu == 0) { + /* Create a user visible cpu description with safe values */ + memset(&user_cpu_desc, 0, sizeof(user_cpu_desc)); + /* Safe values for these registers */ + user_cpu_desc.id_aa64pfr0 = ID_AA64PFR0_AdvSIMD_NONE | + ID_AA64PFR0_FP_NONE | ID_AA64PFR0_EL1_64 | + ID_AA64PFR0_EL0_64; + user_cpu_desc.id_aa64dfr0 = ID_AA64DFR0_DebugVer_8; + } + for (i = 0; i < nitems(user_regs); i++) { value = CPU_DESC_FIELD(cpu_desc[cpu], i); - if (cpu == 0) - cur = value; - else - cur = CPU_DESC_FIELD(user_cpu_desc, i); + if (cpu == 0) { + kern_reg = value; + user_reg = value; + } else { + kern_reg = CPU_DESC_FIELD(kern_cpu_desc, i); + user_reg = CPU_DESC_FIELD(user_cpu_desc, i); + } fields = user_regs[i].fields; for (j = 0; fields[j].type != 0; j++) { switch (fields[j].type & MRS_TYPE_MASK) { case MRS_EXACT: - cur &= ~(0xfu << fields[j].shift); - cur |= + user_reg &= ~(0xfu << fields[j].shift); + user_reg |= (uint64_t)MRS_EXACT_FIELD(fields[j].type) << fields[j].shift; break; case MRS_LOWER: - new_field = (value >> fields[j].shift) & 0xf; - cur_field = (cur >> fields[j].shift) & 0xf; - if ((fields[j].sign && - (int)new_field < (int)cur_field) || - (!fields[j].sign && - (u_int)new_field < (u_int)cur_field)) { - cur &= ~(0xfu << fields[j].shift); - cur |= new_field << fields[j].shift; - } + user_reg = update_lower_register(user_reg, + value, fields[j].shift, 4, fields[j].sign); break; default: panic("Invalid field type: %d", fields[j].type); } + kern_reg = update_lower_register(kern_reg, value, + fields[j].shift, 4, fields[j].sign); } - CPU_DESC_FIELD(user_cpu_desc, i) = cur; + CPU_DESC_FIELD(kern_cpu_desc, i) = kern_reg; + CPU_DESC_FIELD(user_cpu_desc, i) = user_reg; } } @@ -997,13 +1061,6 @@ identify_cpu_sysinit(void *dummy __unused) u_long hwcap; bool dic, idc; - /* Create a user visible cpu description with safe values */ - memset(&user_cpu_desc, 0, sizeof(user_cpu_desc)); - /* Safe values for these registers */ - user_cpu_desc.id_aa64pfr0 = ID_AA64PFR0_AdvSIMD_NONE | - ID_AA64PFR0_FP_NONE | ID_AA64PFR0_EL1_64 | ID_AA64PFR0_EL0_64; - user_cpu_desc.id_aa64dfr0 = ID_AA64DFR0_DebugVer_8; - dic = (allow_dic != 0); idc = (allow_idc != 0); CPU_FOREACH(cpu) { @@ -1013,7 +1070,7 @@ identify_cpu_sysinit(void *dummy __unused) elf_hwcap = hwcap; else elf_hwcap &= hwcap; - update_user_regs(cpu); + update_special_regs(cpu); if (CTR_DIC_VAL(cpu_desc[cpu].ctr) == 0) dic = false; Modified: head/sys/arm64/include/undefined.h ============================================================================== --- head/sys/arm64/include/undefined.h Mon Jun 29 08:14:45 2020 (r362776) +++ head/sys/arm64/include/undefined.h Mon Jun 29 09:08:36 2020 (r362777) @@ -62,7 +62,10 @@ void undef_init(void); void *install_undef_handler(bool, undef_handler_t); void remove_undef_handler(void *); int undef_insn(u_int, struct trapframe *); + +/* Functions to read the sanitised view of the special registers */ bool extract_user_id_field(u_int, u_int, uint8_t *); +bool get_kernel_reg(u_int, uint64_t *); #endif /* _KERNEL */ From owner-svn-src-all@freebsd.org Mon Jun 29 09:37:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 860C534489D; Mon, 29 Jun 2020 09:37: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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wMpD2zrXz4Zrc; Mon, 29 Jun 2020 09:37: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 49D9124E65; Mon, 29 Jun 2020 09:37: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 05T9b82f085682; Mon, 29 Jun 2020 09:37:08 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05T9b8aA085681; Mon, 29 Jun 2020 09:37:08 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202006290937.05T9b8aA085681@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 29 Jun 2020 09:37:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362778 - 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: 362778 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 09:37:08 -0000 Author: andrew Date: Mon Jun 29 09:37:07 2020 New Revision: 362778 URL: https://svnweb.freebsd.org/changeset/base/362778 Log: Fix the spelling of identify in the arm64 identcpu code Sponsored by: Innovate UK Modified: head/sys/arm64/arm64/identcpu.c Modified: head/sys/arm64/arm64/identcpu.c ============================================================================== --- head/sys/arm64/arm64/identcpu.c Mon Jun 29 09:08:36 2020 (r362777) +++ head/sys/arm64/arm64/identcpu.c Mon Jun 29 09:37:07 2020 (r362778) @@ -1096,7 +1096,7 @@ identify_cpu_sysinit(void *dummy __unused) install_undef_handler(true, user_mrs_handler); } -SYSINIT(idenrity_cpu, SI_SUB_SMP, SI_ORDER_ANY, identify_cpu_sysinit, NULL); +SYSINIT(identify_cpu, SI_SUB_SMP, SI_ORDER_ANY, identify_cpu_sysinit, NULL); static u_long parse_cpu_features_hwcap(u_int cpu) From owner-svn-src-all@freebsd.org Mon Jun 29 10:30:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A450E345632; Mon, 29 Jun 2020 10:30:43 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wP033yJjz4crV; Mon, 29 Jun 2020 10:30:43 +0000 (UTC) (envelope-from gbe@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 6C65425F3C; Mon, 29 Jun 2020 10:30:43 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05TAUhCe017720; Mon, 29 Jun 2020 10:30:43 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05TAUhZU017719; Mon, 29 Jun 2020 10:30:43 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202006291030.05TAUhZU017719@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Mon, 29 Jun 2020 10:30:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362779 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 362779 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 10:30:43 -0000 Author: gbe (doc committer) Date: Mon Jun 29 10:30:43 2020 New Revision: 362779 URL: https://svnweb.freebsd.org/changeset/base/362779 Log: gre(4): Add a STANDARDS section Expand the mentioned RFC in the SEE ALSO section and reference RFC1701 and RFC1702. PR: 240250 Reviewed by: bcr (mentor) Approved by: bcr (mentor) Obtained from: OpenBSD MFC after: 7 days Differential Revision: https://reviews.freebsd.org/D25504 Modified: head/share/man/man4/gre.4 Modified: head/share/man/man4/gre.4 ============================================================================== --- head/share/man/man4/gre.4 Mon Jun 29 09:37:07 2020 (r362778) +++ head/share/man/man4/gre.4 Mon Jun 29 10:30:43 2020 (r362779) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 24, 2019 +.Dd June 29, 2020 .Dt GRE 4 .Os .Sh NAME @@ -219,8 +219,44 @@ variable to non-zero. .Xr protocols 5 , .Xr ifconfig 8 , .Xr sysctl 8 +.Sh STANDARDS +.Rs +.%A S. Hanks +.%A "T. Li" +.%A D. Farinacci +.%A P. Traina +.%D October 1994 +.%R RFC 1701 +.%T Generic Routing Encapsulation (GRE) +.Re .Pp -A description of GRE encapsulation can be found in RFC 2784 and RFC 2890. +.Rs +.%A S. Hanks +.%A "T. Li" +.%A D. Farinacci +.%A P. Traina +.%D October 1994 +.%R RFC 1702 +.%T Generic Routing Encapsulation over IPv4 networks +.Re +.Pp +.Rs +.%A D. Farinacci +.%A "T. Li" +.%A S. Hanks +.%A D. Meyer +.%A P. Traina +.%D March 2000 +.%R RFC 2784 +.%T Generic Routing Encapsulation (GRE) +.Re +.Pp +.Rs +.%A G. Dommety +.%D September 2000 +.%R RFC 2890 +.%T Key and Sequence Number Extensions to GRE +.Re .Sh AUTHORS .An Andrey V. Elsukov Aq Mt ae@FreeBSD.org .An Heiko W.Rupp Aq Mt hwr@pilhuhn.de From owner-svn-src-all@freebsd.org Mon Jun 29 12:59:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3214B349125; Mon, 29 Jun 2020 12:59:10 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wSHL0Y0gz3WHm; Mon, 29 Jun 2020 12:59:10 +0000 (UTC) (envelope-from br@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 EA04C27B98; Mon, 29 Jun 2020 12:59:09 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05TCx9YH007879; Mon, 29 Jun 2020 12:59:09 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05TCx939007877; Mon, 29 Jun 2020 12:59:09 GMT (envelope-from br@FreeBSD.org) Message-Id: <202006291259.05TCx939007877@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Mon, 29 Jun 2020 12:59:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362780 - head/sys/arm64/coresight X-SVN-Group: head X-SVN-Commit-Author: br X-SVN-Commit-Paths: head/sys/arm64/coresight X-SVN-Commit-Revision: 362780 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 12:59:10 -0000 Author: br Date: Mon Jun 29 12:59:09 2020 New Revision: 362780 URL: https://svnweb.freebsd.org/changeset/base/362780 Log: Coresight: provide device_attach method for FDT bus. Sponsored by: DARPA, AFRL Modified: head/sys/arm64/coresight/coresight_funnel_fdt.c head/sys/arm64/coresight/coresight_replicator_fdt.c Modified: head/sys/arm64/coresight/coresight_funnel_fdt.c ============================================================================== --- head/sys/arm64/coresight/coresight_funnel_fdt.c Mon Jun 29 10:30:43 2020 (r362779) +++ head/sys/arm64/coresight/coresight_funnel_fdt.c Mon Jun 29 12:59:09 2020 (r362780) @@ -93,6 +93,7 @@ funnel_fdt_attach(device_t dev) static device_method_t funnel_fdt_methods[] = { /* Device interface */ DEVMETHOD(device_probe, funnel_fdt_probe), + DEVMETHOD(device_attach, funnel_fdt_attach), DEVMETHOD_END }; Modified: head/sys/arm64/coresight/coresight_replicator_fdt.c ============================================================================== --- head/sys/arm64/coresight/coresight_replicator_fdt.c Mon Jun 29 10:30:43 2020 (r362779) +++ head/sys/arm64/coresight/coresight_replicator_fdt.c Mon Jun 29 12:59:09 2020 (r362780) @@ -68,7 +68,7 @@ replicator_fdt_probe(device_t dev) } static int -replicator_acpi_attach(device_t dev) +replicator_fdt_attach(device_t dev) { struct replicator_softc *sc; @@ -81,6 +81,7 @@ replicator_acpi_attach(device_t dev) static device_method_t replicator_fdt_methods[] = { /* Device interface */ DEVMETHOD(device_probe, replicator_fdt_probe), + DEVMETHOD(device_attach, replicator_fdt_attach), DEVMETHOD_END }; From owner-svn-src-all@freebsd.org Mon Jun 29 13:08:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 42177349379; Mon, 29 Jun 2020 13:08:41 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wSVK0pHLz3Wk8; Mon, 29 Jun 2020 13:08:41 +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 EEBBB27AD4; Mon, 29 Jun 2020 13:08:40 +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 05TD8eL8014020; Mon, 29 Jun 2020 13:08:40 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05TD8eTP014019; Mon, 29 Jun 2020 13:08:40 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202006291308.05TD8eTP014019@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 29 Jun 2020 13:08:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362781 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 362781 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 13:08:41 -0000 Author: hselasky Date: Mon Jun 29 13:08:40 2020 New Revision: 362781 URL: https://svnweb.freebsd.org/changeset/base/362781 Log: Implement is_signed(), type_max() and type_min() function macros in the LinuxKPI. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/kernel.h Modified: head/sys/compat/linuxkpi/common/include/linux/kernel.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/kernel.h Mon Jun 29 12:59:09 2020 (r362780) +++ head/sys/compat/linuxkpi/common/include/linux/kernel.h Mon Jun 29 13:08:40 2020 (r362781) @@ -564,4 +564,20 @@ linux_ratelimited(linux_ratelimit_t *rl) #define __is_constexpr(x) \ __builtin_constant_p(x) +#define is_signed(x) (((x)-1 / (x)2) == (x)0) + +#define type_max(x) ( \ + (sizeof(x) >= 8) ? (is_signed(x) ? INT64_MAX : UINT64_MAX) : \ + (sizeof(x) >= 4) ? (is_signed(x) ? INT32_MAX : UINT32_MAX) : \ + (sizeof(x) >= 2) ? (is_signed(x) ? INT16_MAX : UINT16_MAX) : \ + (is_signed(x) ? INT8_MAX : UINT8_MAX) \ +) + +#define type_min(x) ( \ + (sizeof(x) >= 8) ? (is_signed(x) ? INT64_MIN : 0) : \ + (sizeof(x) >= 4) ? (is_signed(x) ? INT32_MIN : 0) : \ + (sizeof(x) >= 2) ? (is_signed(x) ? INT16_MIN : 0) : \ + (is_signed(x) ? INT8_MIN : 0) \ +) + #endif /* _LINUX_KERNEL_H_ */ From owner-svn-src-all@freebsd.org Mon Jun 29 13:30:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 57A2D3499E9; Mon, 29 Jun 2020 13:30:49 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wSzs0qFSz3Y9k; Mon, 29 Jun 2020 13:30:49 +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 0038027FF7; Mon, 29 Jun 2020 13:30:49 +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 05TDUmlk027917; Mon, 29 Jun 2020 13:30:48 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05TDUmTZ027916; Mon, 29 Jun 2020 13:30:48 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202006291330.05TDUmTZ027916@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 29 Jun 2020 13:30:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362782 - head/contrib/file/magic/Magdir X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/file/magic/Magdir X-SVN-Commit-Revision: 362782 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 13:30:49 -0000 Author: emaste Date: Mon Jun 29 13:30:48 2020 New Revision: 362782 URL: https://svnweb.freebsd.org/changeset/base/362782 Log: Revert r362261, "Re-apply r333944 to unbreak ports" A file update in 2018 broke many ports as it misidentified shared libraries as PIE binaries. r333944 reverted part of the change, restoring ports builds but misidentifying objects in the opposite direction. Earlier this month file 5.39 was imported, and then the change originally from r333944 was recommitted as r362261. However, the issue was fixed upstream, so r362261 serves no purpose. PR: 246960, 247461 [exp-run] Sponsored by: The FreeBSD Foundation Modified: head/contrib/file/magic/Magdir/elf Modified: head/contrib/file/magic/Magdir/elf ============================================================================== --- head/contrib/file/magic/Magdir/elf Mon Jun 29 13:08:40 2020 (r362781) +++ head/contrib/file/magic/Magdir/elf Mon Jun 29 13:30:48 2020 (r362782) @@ -50,8 +50,9 @@ !:mime application/x-object >16 leshort 2 executable, !:mime application/x-executable ->16 leshort 3 shared object, -!:mime application/x-sharedlib +>16 leshort 3 ${x?pie executable:shared object}, + +!:mime application/x-${x?pie-executable:sharedlib} >16 leshort 4 core file, !:mime application/x-coredump # OS-specific From owner-svn-src-all@freebsd.org Mon Jun 29 15:15:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DE85334B9F8; Mon, 29 Jun 2020 15:15:14 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wWJL5VBrz3dmw; Mon, 29 Jun 2020 15:15:14 +0000 (UTC) (envelope-from fernape@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 A0DB09807; Mon, 29 Jun 2020 15:15:14 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05TFFES6094668; Mon, 29 Jun 2020 15:15:14 GMT (envelope-from fernape@FreeBSD.org) Received: (from fernape@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05TFFEdD094667; Mon, 29 Jun 2020 15:15:14 GMT (envelope-from fernape@FreeBSD.org) Message-Id: <202006291515.05TFFEdD094667@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fernape set sender to fernape@FreeBSD.org using -f From: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= Date: Mon, 29 Jun 2020 15:15:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362783 - head/usr.bin/hexdump X-SVN-Group: head X-SVN-Commit-Author: fernape X-SVN-Commit-Paths: head/usr.bin/hexdump X-SVN-Commit-Revision: 362783 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 15:15:14 -0000 Author: fernape (ports committer) Date: Mon Jun 29 15:15:14 2020 New Revision: 362783 URL: https://svnweb.freebsd.org/changeset/base/362783 Log: hexdump(1): Add EXAMPLES section * Add examples showing the use of -f, -C, -s, -n * Rework the two already present examples that were *format* examples * Remove .Tn suggested by mandoc(1) * Remove reference to gdb(1) since it is not present in current Approved by: manpages (gbe) Differential Revision: https://reviews.freebsd.org/D25406 Modified: head/usr.bin/hexdump/hexdump.1 Modified: head/usr.bin/hexdump/hexdump.1 ============================================================================== --- head/usr.bin/hexdump/hexdump.1 Mon Jun 29 13:30:48 2020 (r362782) +++ head/usr.bin/hexdump/hexdump.1 Mon Jun 29 15:15:14 2020 (r362783) @@ -28,7 +28,7 @@ .\" @(#)hexdump.1 8.2 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd October 29, 2014 +.Dd June 29, 2020 .Dt HEXDUMP 1 .Os .Sh NAME @@ -242,8 +242,7 @@ Output characters in the default character set. Nonprinting characters are displayed as a single .Dq Cm \&. . .It Cm _u -Output US -.Tn ASCII +Output US ASCII characters, with the exception that control characters are displayed using the following, lower-case, names. Characters greater than 0xff, hexadecimal, are displayed as hexadecimal @@ -330,18 +329,59 @@ option. .Sh EXIT STATUS .Ex -std hexdump hd .Sh EXAMPLES -Display the input in perusal format: +Dump input in canonical (hex+ASCII) form: .Bd -literal -offset indent +$ echo "FreeBSD: The power to serve" | hexdump -C +00000000 46 72 65 65 42 53 44 3a 20 54 68 65 20 70 6f 77 |FreeBSD: The pow| +00000010 65 72 20 74 6f 20 73 65 72 76 65 0a |er to serve.| +0000001c +.Ed +.Pp +Same as above but skipping the first 4 bytes of stdin and interpreting only 3 +bytes of input: +.Bd -literal -offset indent +$ echo "FreeBSD: The power to serve" | hexdump -C -s 4 -n 3 +00000004 42 53 44 |BSD| +00000007 +.Ed +.Pp +Assuming a format file named +.Pa format.txt +with the following contents that specify a perusal format: +.Bd -literal -offset indent "%06.6_ao " 12/1 "%3_u " "\et\et" "%_p " "\en" .Ed .Pp -Implement the \-x option: +Dump input in canonical form using the format in +.Pa format.txt : .Bd -literal -offset indent +$ echo "FreeBSD" | hexdump -f format.txt -C +000000 F r e e B S D lf F r e e B S D . +00000000 46 72 65 65 42 53 44 0a |FreeBSD.| +00000008 +.Ed +.Pp +Assuming a format file named +.Pa format.txt +with the following contents that simulate the +.Fl x +option: +.Bd -literal -offset indent "%07.7_Ax\en" "%07.7_ax " 8/2 "%04x " "\en" .Ed +.Pp +Dump input in canonical form using the format in +.Pa format.txt : +.Bd -literal -offset indent +$ echo "FreeBSD: The power to serve" | hexdump -f format.txt -C +0000000 7246 6565 5342 3a44 5420 6568 7020 776f +00000000 46 72 65 65 42 53 44 3a 20 54 68 65 20 70 6f 77 |FreeBSD: The pow| +0000010 7265 7420 206f 6573 7672 0a65 +00000010 65 72 20 74 6f 20 73 65 72 76 65 0a |er to serve.| +0000001c +.Ed .Sh SEE ALSO -.Xr gdb 1 , .Xr od 1 From owner-svn-src-all@freebsd.org Mon Jun 29 15:27:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2AD5634C178 for ; Mon, 29 Jun 2020 15:27:41 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wWZh1r8bz3f9M for ; Mon, 29 Jun 2020 15:27:39 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qk1-x742.google.com with SMTP id 145so13098226qke.9 for ; Mon, 29 Jun 2020 08:27:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=7UvSoQ1JTvo5C6z38ZNTRhGMNOoXVuXvCQGZA+UXWMw=; b=Sj0csJywE9tmP4Ua8oslNmjZ7zqTZKn5bN2ge/O+SuCGdKETBWoho3XPnXlWTr+xga GayD6ukTHwbvTyUq0SWPWOGB3QhlQ8OAUipKhTjhb0q6FMV7GcDJ9qnh/+sMJiT9Z/PD WQvDUFmsSqXuTw6tlfiS2v4epz7ug78/zHRErt1hlgLZaoUDsKMcYCZV9cluZHrwNAXC /J6qWnMeL8Lb4Ip96schS4vI89+zg3v9YJJi42bVDIfXsR7qPFBc2TiKbeGxzyoI/3ch VckckaP5BRLFQeS8eyVdmyujmZwXw5kyvLeI/VDMHAzS2I6Fiaw0fyFIbIvW0xU8Vj5e WELg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=7UvSoQ1JTvo5C6z38ZNTRhGMNOoXVuXvCQGZA+UXWMw=; b=awuRj60tHJ0v8f0tniOy1qkXiHVWCUPkrD887mi50YT6Aj2L+zR7XFn+J+itcG7+OQ 4BAnLBlvWLkyhtpgDDO1EBt4H4DXXSWcEgSL5ayON72Y5xZVV4l3bkIL5ecqk2RzRSTJ VjihXtVmD3tMbWeXPAzKSwJLObHLbXXqiBc2RWobRPikqPxb1D6AsH9JeZqKKQIgW3gz iCtnhLXBZAJ9jyF7Qq1XAWXmZ3jCytiE9kWvcPlE3Dde5STpqsUDKntd+uKLlH49g1AG N3nn1scIqR0Hoi/1PXp/ADJUzBBzCpyz3GKuPXLvF3dW3duyn0DTLyJZO7dKUMW90W7p Lcjg== X-Gm-Message-State: AOAM533HV3GTogjCtQCaig7NKT41uk+8t4dc28SpnasyWBegvDE0Z4z1 yqkSHs8ulcpKwG+l5RTnaVZVZQ== X-Google-Smtp-Source: ABdhPJyNmtiHLo5RqWnsDw0B/2pjxvW9N79axgBGO1J/fhuO1rIkcj69oXVg7g9h2EKDif14/83Gsw== X-Received: by 2002:a37:670a:: with SMTP id b10mr15031664qkc.314.1593444459214; Mon, 29 Jun 2020 08:27:39 -0700 (PDT) Received: from mutt-hbsd (75-148-2-186-WashingtonDC.hfc.comcastbusiness.net. [75.148.2.186]) by smtp.gmail.com with ESMTPSA id y40sm19406277qtc.29.2020.06.29.08.27.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jun 2020 08:27:38 -0700 (PDT) Date: Mon, 29 Jun 2020 11:27:17 -0400 From: Shawn Webb To: Kyle Evans Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362769 - in head/sys: amd64/linux amd64/linux32 arm64/linux compat/linux i386/linux Message-ID: <20200629152717.2ojwnipxkmjaoix2@mutt-hbsd> X-Operating-System: FreeBSD mutt-hbsd 13.0-CURRENT-HBSD FreeBSD 13.0-CURRENT-HBSD X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0xFF2E67A277F8E1FA References: <202006290309.05T39ETZ044859@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="34h5ghmb2n4ozvpj" Content-Disposition: inline In-Reply-To: <202006290309.05T39ETZ044859@repo.freebsd.org> X-Rspamd-Queue-Id: 49wWZh1r8bz3f9M X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hardenedbsd.org header.s=google header.b=Sj0csJyw; dmarc=none; spf=pass (mx1.freebsd.org: domain of shawn.webb@hardenedbsd.org designates 2607:f8b0:4864:20::742 as permitted sender) smtp.mailfrom=shawn.webb@hardenedbsd.org X-Spamd-Result: default: False [-4.37 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[hardenedbsd.org:s=google]; NEURAL_HAM_MEDIUM(-1.03)[-1.027]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; NEURAL_HAM_LONG(-0.99)[-0.987]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[hardenedbsd.org]; TO_DN_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[hardenedbsd.org:+]; NEURAL_HAM_SHORT(-0.26)[-0.261]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::742:from]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; MID_RHS_NOT_FQDN(0.50)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 15:27:41 -0000 --34h5ghmb2n4ozvpj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hey Kyle, On Mon, Jun 29, 2020 at 03:09:14AM +0000, Kyle Evans wrote: > Author: kevans > Date: Mon Jun 29 03:09:14 2020 > New Revision: 362769 > URL: https://svnweb.freebsd.org/changeset/base/362769 >=20 > Log: > linuxolator: implement memfd_create syscall > =20 > This effectively mirrors our libc implementation, but with minor fudgin= g -- > name needs to be copied in from userspace, so we just copy it straight = into > stack-allocated memfd_name into the correct position rather than alloca= ting > memory that needs to be cleaned up. > =20 > The sealing-related fcntl(2) commands, F_GET_SEALS and F_ADD_SEALS, have > also been implemented now that we support them. > =20 > Note that this implementation is still not quite at feature parity w.r.= t. > the actual Linux version; some caveats, from my foggy memory: > =20 > - Need to implement SHM_GROW_ON_WRITE, default for memfd (in progress) > - LTP wants the memfd name exposed to fdescfs > - Linux allows open() of an fdescfs fd with O_TRUNC to truncate after d= up. > (?) > =20 > Interested parties can install and run LTP from ports (devel/linux-ltp)= to > confirm any fixes. > =20 > PR: 240874 > Reviewed by: kib, trasz > Differential Revision: https://reviews.freebsd.org/D21845 RELNOTES? >=20 > Modified: > head/sys/amd64/linux/linux_dummy.c > head/sys/amd64/linux32/linux32_dummy.c > head/sys/arm64/linux/linux_dummy.c > head/sys/compat/linux/linux.c > head/sys/compat/linux/linux.h > head/sys/compat/linux/linux_file.c > head/sys/compat/linux/linux_file.h > head/sys/i386/linux/linux_dummy.c Should __FreeBSD_version be bumped? Thanks, --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD GPG Key ID: 0xFF2E67A277F8E1FA GPG Key Fingerprint: D206 BB45 15E0 9C49 0CF9 3633 C85B 0AF8 AB23 0FB2 https://git-01.md.hardenedbsd.org/HardenedBSD/pubkeys/src/branch/master/Sha= wn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --34h5ghmb2n4ozvpj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAl76CFAACgkQ/y5nonf4 4fqWNw//chzeoil4ezgEfetcfHXQifcGckup2OpFx002zqhHlCEG8ODHFI/+DchH kIbvBVBuuhv7tM4WL0ofLIDUSz2tTDy+o4/24Cn8RllQ4tmCNiBavzyNNYmCqmKE szJ6JgoHfx4eftxMp65/s0GtQ2t0m5t29zDCJCi9MboNPyyq7ECF5y+srTzeDaES hq3v1gvcaxWeQUBaOCX8zy295c7qG6MLuPWG+5f+/BDHid7uvOGY50XADqVWJ9ha Ev/aDWDcMdPhUisvBt1aQBKcl5MPtBTqjVS7Et7puyIp9E+L2UqOx9XOT0+UjZkv 5BZHBOqokcFGqPVR6OWrGgaqWG5VqeDAbd97ndm9abFKa+DV/zeLtcVkn2kfPlFx cl2TygmtpjS5KEzDCWfe8XZGVrZoFKoatDk6s93QoyBGNl3BdBXKu0UJ4yU3tvKl w6WGYYl7SVm0VSQN9ecv2nsVOcSOTIhdljxALz8TG1znj+MoTRzHnyw825/Cca4x 0n8s1q5acHUD5FytllboQ8zjnGG6M7CVvupS/+TqQsFCzeUsgYcESBgGyU/7VBn4 drpXRCc+z2K2p5SsLtMuUWGqedkxHyMurqOE0yFCnihnn75dkltqv87ynbJrUqB2 GEij8wV46SjF8XDNObC6cvNOj+r7BMxaqtNCe4BRowfBUiCLcAw= =2GjI -----END PGP SIGNATURE----- --34h5ghmb2n4ozvpj-- From owner-svn-src-all@freebsd.org Mon Jun 29 15:27:54 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3FECD34C302; Mon, 29 Jun 2020 15:27:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wWZy0tXYz3fZy; Mon, 29 Jun 2020 15:27:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-274.local (unknown [IPv6:2601:648:8203:2990:9cfd:9ca3:d76c:8d6]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 5933717818; Mon, 29 Jun 2020 15:27:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r362681 - in head: contrib/bc contrib/bc/gen contrib/bc/include contrib/bc/locales contrib/bc/manuals contrib/bc/src contrib/bc/src/bc contrib/bc/src/dc contrib/bc/src/history contrib/b... To: =?UTF-8?Q?Stefan_E=c3=9fer?= , Eric van Gyzen Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, emaste@FreeBSD.org References: <202006271202.05RC22oR085945@repo.freebsd.org> <2b7f0d0f-e243-9c9c-f1c0-e700e0bf6d48@FreeBSD.org> <577b1bd1-598a-d3f9-3c23-537b9747612a@vangyzen.net> <8670f956-1ed4-2b87-ee64-d04bc37d6810@freebsd.org> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: Date: Mon, 29 Jun 2020 08:27:51 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <8670f956-1ed4-2b87-ee64-d04bc37d6810@freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 15:27:54 -0000 On 6/28/20 1:28 AM, Stefan Eßer wrote: > I could delete what's currently in contrib/bc and use svn copy to make > the whole contents of vendor/bc/dist available in contrib/bc. The tests > require 1112 KB of space, while the rest of the sources takes up less > than 900 KB. > > I could revert the full import to contrib/bc, but that would also revert > changes to e.g. usr.bin/Makefile and I'd rather remove just what's now > in contrib/bc and then use svn copy to make vendor/bc/dist available > there. The sources from the dist directory can be used unmodified, the > reason for cherry-picking was just that I did not want to import more > than is used at this time ... I do not think you should do a full revert but just fixup contrib/bc. I think it would be good to get advice from emaste@ about what is most Git-conversion-friendly. You might be able to just do a 'svn merge --record-only' to bootstrap the merge info and commit that. Barring that, you might be able to svn rm contrib/bc and then 'svn cp' it from the vendor area. You'd probably have to do that as two separate commits to make use of a URL for the 'svn cp' though which would break the tree for one commit. I suspect just doing the 'merge --record-only' is the simplest method assuming Git handles it ok. I suspect since Git ignores mergeinfo this is fine, but it would be good for Ed to confirm. You can always restore the tests in the future in contrib/bc when you want to add them. -- John Baldwin From owner-svn-src-all@freebsd.org Mon Jun 29 15:46:45 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 57E3634CACE; Mon, 29 Jun 2020 15:46:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wX0j1h4lz3grs; Mon, 29 Jun 2020 15:46:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-274.local (unknown [IPv6:2601:648:8203:2990:58bb:fc02:3149:a222]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 9356217829; Mon, 29 Jun 2020 15:46:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r361720 - in head: etc etc/mail usr.sbin/mailwrapper To: Kyle Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006020238.0522cswW076778@repo.freebsd.org> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <475e0172-0a4a-0201-3e2f-9e231b75f3e9@FreeBSD.org> Date: Mon, 29 Jun 2020 08:46:43 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <202006020238.0522cswW076778@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 15:46:45 -0000 On 6/1/20 7:38 PM, Kyle Evans wrote: > Author: kevans > Date: Tue Jun 2 02:38:54 2020 > New Revision: 361720 > URL: https://svnweb.freebsd.org/changeset/base/361720 > > Log: > pkgbase: resolve mailer.conf conflict WITHOUT_SENDMAIL > > When WITHOUT_SENDMAIL is set, we end up with two different mailer.conf that > conflict, and hilarity ensues. There's currently three different places that > we might install mailer.conf: Something about this change has made etcupdate stop updating this file. Perhaps it is now a "plain" FILE instead of a config file, so 'installconfig' no longer installs it? Given that users do edit this file (e.g. if using postfix from ports), it does seem like this should be treated as a config file? -- John Baldwin From owner-svn-src-all@freebsd.org Mon Jun 29 16:52:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A340B34DFB9; Mon, 29 Jun 2020 16:52:21 +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 49wYSN72R8z43vR; Mon, 29 Jun 2020 16:52:20 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id px0zj5lWKYYpxpx10jbeto; Mon, 29 Jun 2020 10:52:19 -0600 X-Authority-Analysis: v=2.3 cv=OubUNx3t c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=nTHF0DUjJn0A:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=iUpnydi_MgWrUi0BTRUA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id 2DF0825C; Mon, 29 Jun 2020 09:52:16 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id 05TGqF9t005071; Mon, 29 Jun 2020 09:52:15 -0700 (PDT) (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 05TGqFvu005068; Mon, 29 Jun 2020 09:52:15 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202006291652.05TGqFvu005068@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.9.0 11/07/2018 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: John Baldwin cc: Kyle Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r361720 - in head: etc etc/mail usr.sbin/mailwrapper In-reply-to: <475e0172-0a4a-0201-3e2f-9e231b75f3e9@FreeBSD.org> References: <202006020238.0522cswW076778@repo.freebsd.org> <475e0172-0a4a-0201-3e2f-9e231b75f3e9@FreeBSD.org> Comments: In-reply-to John Baldwin message dated "Mon, 29 Jun 2020 08:46:43 -0700." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 29 Jun 2020 09:52:15 -0700 X-CMAE-Envelope: MS4wfEXHJm2v3M8lmyJm7T8P/QWP/cqJuB+zczE16VWkEnkKrvkC0VN2MLXR+AEIlIpL/ztQSUL96XkalqbXqzS0vM+gai3igfgv5cORBxBUtot32hTnn2dP h9O6vfB5GbYklN5arniJQOQhHxO38CdFMUquFkbMZWpGLOLhMYJvbaMJ73vhaHsavyPqf6CFMU8X89MXZJH4jwNChhF4nSzehM/5Whshk4NC/Sdmgn6MiBbz 69LJxsW6FhT7y+QbHSTZKos01TadF5dAOKiqOyMglTwRjtnpYEd4Tf5wJMRwlL3Xj8CRrxasdq/EYiEJu3XRtw== X-Rspamd-Queue-Id: 49wYSN72R8z43vR X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 16:52:21 -0000 In message <475e0172-0a4a-0201-3e2f-9e231b75f3e9@FreeBSD.org>, John Baldwin wri tes: > On 6/1/20 7:38 PM, Kyle Evans wrote: > > Author: kevans > > Date: Tue Jun 2 02:38:54 2020 > > New Revision: 361720 > > URL: https://svnweb.freebsd.org/changeset/base/361720 > > > > Log: > > pkgbase: resolve mailer.conf conflict WITHOUT_SENDMAIL > > > > When WITHOUT_SENDMAIL is set, we end up with two different mailer.conf th > at > > conflict, and hilarity ensues. There's currently three different places t > hat > > we might install mailer.conf: > > Something about this change has made etcupdate stop updating this file. > Perhaps it is now a "plain" FILE instead of a config file, so 'installconfig' > no longer installs it? Given that users do edit this file (e.g. if using > postfix from ports), it does seem like this should be treated as a config > file? Yes, plain file vs config file. There was a change a couple of months ago by someone else that changed config files to plain files which totally messed up /etc after etcupdate was run. It also affected mergemaster BTW. If pkgbase needs config files to be plain files we might need a knob to make it so when pkgbase is invoking make. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Mon Jun 29 16:54:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4F57E34E2EA; Mon, 29 Jun 2020 16:54:01 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wYVK1Pndz43yj; Mon, 29 Jun 2020 16:54:01 +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 147D2A5E7; Mon, 29 Jun 2020 16:54:01 +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 05TGs0U7060434; Mon, 29 Jun 2020 16:54:00 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05TGs0qK060433; Mon, 29 Jun 2020 16:54:00 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202006291654.05TGs0qK060433@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Mon, 29 Jun 2020 16:54:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362784 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 362784 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 16:54:01 -0000 Author: cem Date: Mon Jun 29 16:54:00 2020 New Revision: 362784 URL: https://svnweb.freebsd.org/changeset/base/362784 Log: vm: Add missing WITNESS warnings for M_WAITOK allocation vm_map_clip_{end,start} and lookup_clip_start allocate memory M_WAITOK for !system_map vm_maps. Add WITNESS warning annotation for !system_map callers who may be holding non-sleepable locks. Reviewed by: markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D25283 Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Mon Jun 29 15:15:14 2020 (r362783) +++ head/sys/vm/vm_map.c Mon Jun 29 16:54:00 2020 (r362784) @@ -2379,6 +2379,11 @@ vm_map_clip_start(vm_map_t map, vm_map_entry_t entry, { vm_map_entry_t new_entry; + if (!map->system_map) + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, + "%s: map %p entry %p start 0x%jx", __func__, map, entry, + (uintmax_t)start); + if (start <= entry->start) return; @@ -2409,6 +2414,11 @@ vm_map_lookup_clip_start(vm_map_t map, vm_offset_t sta { vm_map_entry_t entry; + if (!map->system_map) + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, + "%s: map %p start 0x%jx prev %p", __func__, map, + (uintmax_t)start, prev_entry); + if (vm_map_lookup_entry(map, start, prev_entry)) { entry = *prev_entry; vm_map_clip_start(map, entry, start); @@ -2430,6 +2440,11 @@ vm_map_clip_end(vm_map_t map, vm_map_entry_t entry, vm { vm_map_entry_t new_entry; + if (!map->system_map) + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, + "%s: map %p entry %p end 0x%jx", __func__, map, entry, + (uintmax_t)end); + if (end >= entry->end) return; @@ -3725,6 +3740,7 @@ vm_map_delete(vm_map_t map, vm_offset_t start, vm_offs vm_map_entry_t entry, next_entry; VM_MAP_ASSERT_LOCKED(map); + if (start == end) return (KERN_SUCCESS); From owner-svn-src-all@freebsd.org Mon Jun 29 17:00:30 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EAA0534E794; Mon, 29 Jun 2020 17:00:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wYdp5wTXz44b4; Mon, 29 Jun 2020 17:00:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-274.local (unknown [IPv6:2601:648:8203:2990:58bb:fc02:3149:a222]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 2C3EE18515; Mon, 29 Jun 2020 17:00:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r361720 - in head: etc etc/mail usr.sbin/mailwrapper To: Cy Schubert Cc: Kyle Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006020238.0522cswW076778@repo.freebsd.org> <475e0172-0a4a-0201-3e2f-9e231b75f3e9@FreeBSD.org> <202006291652.05TGqFvu005068@slippy.cwsent.com> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <4362d678-f62d-9e70-bced-8ade81223be9@FreeBSD.org> Date: Mon, 29 Jun 2020 10:00:28 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <202006291652.05TGqFvu005068@slippy.cwsent.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 17:00:31 -0000 On 6/29/20 9:52 AM, Cy Schubert wrote: > In message <475e0172-0a4a-0201-3e2f-9e231b75f3e9@FreeBSD.org>, John Baldwin > wri > tes: >> On 6/1/20 7:38 PM, Kyle Evans wrote: >>> Author: kevans >>> Date: Tue Jun 2 02:38:54 2020 >>> New Revision: 361720 >>> URL: https://svnweb.freebsd.org/changeset/base/361720 >>> >>> Log: >>> pkgbase: resolve mailer.conf conflict WITHOUT_SENDMAIL >>> >>> When WITHOUT_SENDMAIL is set, we end up with two different mailer.conf th >> at >>> conflict, and hilarity ensues. There's currently three different places t >> hat >>> we might install mailer.conf: >> >> Something about this change has made etcupdate stop updating this file. >> Perhaps it is now a "plain" FILE instead of a config file, so 'installconfig' >> no longer installs it? Given that users do edit this file (e.g. if using >> postfix from ports), it does seem like this should be treated as a config >> file? > > Yes, plain file vs config file. There was a change a couple of months ago > by someone else that changed config files to plain files which totally > messed up /etc after etcupdate was run. It also affected mergemaster BTW. > > If pkgbase needs config files to be plain files we might need a knob to > make it so when pkgbase is invoking make. pkgbase understands config files I believe, I think it was just a bug in this commit to not set a suitable Makefile variable so mailer.conf is a "config" file. -- John Baldwin From owner-svn-src-all@freebsd.org Mon Jun 29 17:10:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F2CC734EDDD; Mon, 29 Jun 2020 17:10:03 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mx.blih.net (mx.blih.net [212.83.155.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx.blih.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wYrn2j2xz458Z; Mon, 29 Jun 2020 17:10:00 +0000 (UTC) (envelope-from manu@bidouilliste.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bidouilliste.com; s=mx; t=1593450598; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=s+W/hGRub6ZRH0gNB7OaWQYidm48iycL9Ncbj9T1YXw=; b=hMVnezBre76XyIIprwOEPqvZ5emJCg7viFa5fn8Q5ut4F9Mgb/jw/iwfP9ikkAPVTFG/YT 0qsFLHaad8v274QeY8spCdYiS+yy+0mNXynRJMKKK4eJR53lcQcJArUb8G7Ms5zfZwGh3+ eht0ipAcFktmhh6Lbr5iQqt3tK40fto= Received: from amy.home (lfbn-idf2-1-900-181.w86-238.abo.wanadoo.fr [86.238.131.181]) by mx.blih.net (OpenSMTPD) with ESMTPSA id 70c2e2e3 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 29 Jun 2020 17:09:58 +0000 (UTC) Date: Mon, 29 Jun 2020 19:09:58 +0200 From: Emmanuel Vadot To: Cy Schubert Cc: John Baldwin , Kyle Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r361720 - in head: etc etc/mail usr.sbin/mailwrapper Message-Id: <20200629190958.56a010736905355abb924952@bidouilliste.com> In-Reply-To: <202006291652.05TGqFvu005068@slippy.cwsent.com> References: <202006020238.0522cswW076778@repo.freebsd.org> <475e0172-0a4a-0201-3e2f-9e231b75f3e9@FreeBSD.org> <202006291652.05TGqFvu005068@slippy.cwsent.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd13.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49wYrn2j2xz458Z X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bidouilliste.com header.s=mx header.b=hMVnezBr; dmarc=pass (policy=none) header.from=bidouilliste.com; spf=pass (mx1.freebsd.org: domain of manu@bidouilliste.com designates 212.83.155.74 as permitted sender) smtp.mailfrom=manu@bidouilliste.com X-Spamd-Result: default: False [-2.97 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bidouilliste.com:s=mx]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.01)[-1.010]; RCPT_COUNT_FIVE(0.00)[6]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bidouilliste.com:+]; DMARC_POLICY_ALLOW(-0.50)[bidouilliste.com,none]; NEURAL_HAM_SHORT(-0.42)[-0.422]; NEURAL_HAM_MEDIUM(-1.03)[-1.034]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:12876, ipnet:212.83.128.0/19, country:FR]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 17:10:04 -0000 On Mon, 29 Jun 2020 09:52:15 -0700 Cy Schubert wrote: > In message <475e0172-0a4a-0201-3e2f-9e231b75f3e9@FreeBSD.org>, John Baldwin > wri > tes: > > On 6/1/20 7:38 PM, Kyle Evans wrote: > > > Author: kevans > > > Date: Tue Jun 2 02:38:54 2020 > > > New Revision: 361720 > > > URL: https://svnweb.freebsd.org/changeset/base/361720 > > > > > > Log: > > > pkgbase: resolve mailer.conf conflict WITHOUT_SENDMAIL > > > > > > When WITHOUT_SENDMAIL is set, we end up with two different mailer.conf th > > at > > > conflict, and hilarity ensues. There's currently three different places t > > hat > > > we might install mailer.conf: > > > > Something about this change has made etcupdate stop updating this file. > > Perhaps it is now a "plain" FILE instead of a config file, so 'installconfig' > > no longer installs it? Given that users do edit this file (e.g. if using > > postfix from ports), it does seem like this should be treated as a config > > file? > > Yes, plain file vs config file. There was a change a couple of months ago > by someone else that changed config files to plain files which totally > messed up /etc after etcupdate was run. It also affected mergemaster BTW. This was https://svnweb.freebsd.org/base?view=revision&revision=359294 > If pkgbase needs config files to be plain files we might need a knob to > make it so when pkgbase is invoking make. It doesn't, pkg needs to know about config files, the problem with my commit is more an etcupdate/mergemaster problem than a pkgbase one. iirc etcupdate do a make distribution to find new files and diffs and switching a config file from a plain files will cause the file to be installed by installworld so etcupdate thinks that it was deleted. I've tried a bit to fix that in etcupdate but couldn't find a proper way to do it. And no we won't want a knob to have a "pkgbase build", this will cause more problems. > > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: https://FreeBSD.org > NTP: Web: https://nwtime.org > > The need of the many outweighs the greed of the few. > > -- Emmanuel Vadot From owner-svn-src-all@freebsd.org Mon Jun 29 17:13:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D903334EE5D; Mon, 29 Jun 2020 17:13:00 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wYwD5NNzz45XN; Mon, 29 Jun 2020 17:13:00 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qk1-f179.google.com (mail-qk1-f179.google.com [209.85.222.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 9BAC4187ED; Mon, 29 Jun 2020 17:13:00 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qk1-f179.google.com with SMTP id c139so15902253qkg.12; Mon, 29 Jun 2020 10:13:00 -0700 (PDT) X-Gm-Message-State: AOAM530HJvxYbvoUh5buze1WNbv6pdQ5nZPOLRCObN/WKCYIvtVk4nGe 20H/flvo88TBwVp/mgMCAyHgrztEjksOmuaF6oU= X-Google-Smtp-Source: ABdhPJwJv9IR6WuLbwCyEyCviDrK1bmSc1TDpTszvZucQkbUnbXHZXHkXYwbzMIDTkggSh1STNexanLXYgB+wRD+FOk= X-Received: by 2002:a37:bcb:: with SMTP id 194mr16572038qkl.103.1593450780156; Mon, 29 Jun 2020 10:13:00 -0700 (PDT) MIME-Version: 1.0 References: <202006020238.0522cswW076778@repo.freebsd.org> <475e0172-0a4a-0201-3e2f-9e231b75f3e9@FreeBSD.org> In-Reply-To: <475e0172-0a4a-0201-3e2f-9e231b75f3e9@FreeBSD.org> From: Kyle Evans Date: Mon, 29 Jun 2020 12:12:48 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r361720 - in head: etc etc/mail usr.sbin/mailwrapper To: John Baldwin Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 17:13:00 -0000 On Mon, Jun 29, 2020 at 10:46 AM John Baldwin wrote: > > On 6/1/20 7:38 PM, Kyle Evans wrote: > > Author: kevans > > Date: Tue Jun 2 02:38:54 2020 > > New Revision: 361720 > > URL: https://svnweb.freebsd.org/changeset/base/361720 > > > > Log: > > pkgbase: resolve mailer.conf conflict WITHOUT_SENDMAIL > > > > When WITHOUT_SENDMAIL is set, we end up with two different mailer.conf that > > conflict, and hilarity ensues. There's currently three different places that > > we might install mailer.conf: > > Something about this change has made etcupdate stop updating this file. > Perhaps it is now a "plain" FILE instead of a config file, so 'installconfig' > no longer installs it? Given that users do edit this file (e.g. if using > postfix from ports), it does seem like this should be treated as a config > file? Ah, whoops, this is my bad indeed. :-( I had noticed that the mailwrapper install used FILES instead of CONFS like dma(8), but I forgot to go back and correct the inconsistency. Will fix ASAP. Thanks, Kyle Evans From owner-svn-src-all@freebsd.org Mon Jun 29 17:19:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D983434EE7B; Mon, 29 Jun 2020 17:19:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wZ3J5NBqz45Mh; Mon, 29 Jun 2020 17:19:08 +0000 (UTC) (envelope-from jhb@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 9D3C7ACBF; Mon, 29 Jun 2020 17:19:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05THJ8ZW073183; Mon, 29 Jun 2020 17:19:08 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05THJ8rp073182; Mon, 29 Jun 2020 17:19:08 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202006291719.05THJ8rp073182@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 29 Jun 2020 17:19:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362785 - head/lib/csu/arm X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/lib/csu/arm X-SVN-Commit-Revision: 362785 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 17:19:08 -0000 Author: jhb Date: Mon Jun 29 17:19:08 2020 New Revision: 362785 URL: https://svnweb.freebsd.org/changeset/base/362785 Log: Stop using STATIC_CFLAGS. This was added in r293648 to pass -mlong-calls for crt1.o and gcrt1.o. The use of -mlong-calls was removed in r358851 for LLVM 10.0, leaving STATIC_CFLAGS empty. Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D25305 Modified: head/lib/csu/arm/Makefile Modified: head/lib/csu/arm/Makefile ============================================================================== --- head/lib/csu/arm/Makefile Mon Jun 29 16:54:00 2020 (r362784) +++ head/lib/csu/arm/Makefile Mon Jun 29 17:19:08 2020 (r362785) @@ -21,13 +21,13 @@ CLEANFILES= ${OBJS} crt1_c.o crt1_s.o gcrt1_c.o Scrt1_ CLEANFILES+= crtbrand.o ignore_init_note.o crt1_c.o: crt1_c.c - ${CC} ${CFLAGS} ${STATIC_CFLAGS} -c -o ${.TARGET} ${.CURDIR}/crt1_c.c + ${CC} ${CFLAGS} -c -o ${.TARGET} ${.CURDIR}/crt1_c.c crt1.o: crt1_c.o crt1_s.o crtbrand.o ignore_init_note.o ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} gcrt1_c.o: crt1_c.c - ${CC} ${CFLAGS} ${STATIC_CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c + ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c gcrt1.o: gcrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} From owner-svn-src-all@freebsd.org Mon Jun 29 17:30:05 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5903734F774; Mon, 29 Jun 2020 17:30:05 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.139]) (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 49wZHw1XYCz46M3; Mon, 29 Jun 2020 17:30:03 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id pxbSj67dOYYpxpxbUjbxJ7; Mon, 29 Jun 2020 11:30:02 -0600 X-Authority-Analysis: v=2.3 cv=OubUNx3t c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=nTHF0DUjJn0A:10 a=7ASnObcnAAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=RHjebqAHt0weKjOVJqwA:9 a=CjuIK1q_8ugA:10 a=pj5rz7AvTRnaHDIeLm0D:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id 1E7192EB; Mon, 29 Jun 2020 10:29:58 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id 05THTw8b005521; Mon, 29 Jun 2020 10:29:58 -0700 (PDT) (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 05THTves005518; Mon, 29 Jun 2020 10:29:57 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202006291729.05THTves005518@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.9.0 11/07/2018 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: Emmanuel Vadot cc: Cy Schubert , John Baldwin , Kyle Evans , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r361720 - in head: etc etc/mail usr.sbin/mailwrapper In-reply-to: <20200629190958.56a010736905355abb924952@bidouilliste.com> References: <202006020238.0522cswW076778@repo.freebsd.org> <475e0172-0a4a-0201-3e2f-9e231b75f3e9@FreeBSD.org> <202006291652.05TGqFvu005068@slippy.cwsent.com> <20200629190958.56a010736905355abb924952@bidouilliste.com> Comments: In-reply-to Emmanuel Vadot message dated "Mon, 29 Jun 2020 19:09:58 +0200." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 29 Jun 2020 10:29:57 -0700 X-CMAE-Envelope: MS4wfGhuPn4rCYc6GDIkAJIaY0pscCwMMJKGtUwCbB1STLwdpQj3bhAEapgDMLlFSX7p6met827wmz9aJpJDHblIU0OCcsldpRGkr1s9Z8CKWYWMYlF1KtKH jCPqaYAE6AvjZffm7KqvXwwlW6IMQkf3nCrzXDSfSTkPygUAAHjXSbPHcTCfNql+WVRdacLBEhJJxSDW84NGlfwnYYd3k7T2OmPsIUyqQge4SMk+/TbNplMD SjnfnWPnE/psBlL8tfJNHtX/kfI8HevlZx2rV4H1OpUApU4vfCl3z6wMCFge+rn8Gpsy2C7TG22Yz6vYAdnyYBJ6eQ8R8M1aVmEoQc1KHUua2OM1Ex6mehP4 bGf65VaG X-Rspamd-Queue-Id: 49wZHw1XYCz46M3 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.136.139) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [-0.10 / 15.00]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-0.85)[-0.851]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; ARC_NA(0.00)[]; AUTH_NA(1.00)[]; DMARC_NA(0.00)[cschubert.com: no valid DMARC record]; RECEIVED_SPAMHAUS_PBL(0.00)[70.67.125.17:received]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.13)[-0.131]; RCPT_COUNT_SEVEN(0.00)[7]; NEURAL_HAM_MEDIUM(-0.42)[-0.419]; R_SPF_NA(0.00)[no SPF record]; 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)[64.59.136.139:from] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 17:30:05 -0000 In message <20200629190958.56a010736905355abb924952@bidouilliste.com>, Emmanuel Vadot writes: > On Mon, 29 Jun 2020 09:52:15 -0700 > Cy Schubert wrote: > > > In message <475e0172-0a4a-0201-3e2f-9e231b75f3e9@FreeBSD.org>, John Baldwin > > > wri > > tes: > > > On 6/1/20 7:38 PM, Kyle Evans wrote: > > > > Author: kevans > > > > Date: Tue Jun 2 02:38:54 2020 > > > > New Revision: 361720 > > > > URL: https://svnweb.freebsd.org/changeset/base/361720 > > > > > > > > Log: > > > > pkgbase: resolve mailer.conf conflict WITHOUT_SENDMAIL > > > > > > > > When WITHOUT_SENDMAIL is set, we end up with two different mailer.con > f th > > > at > > > > conflict, and hilarity ensues. There's currently three different plac > es t > > > hat > > > > we might install mailer.conf: > > > > > > Something about this change has made etcupdate stop updating this file. > > > Perhaps it is now a "plain" FILE instead of a config file, so 'installcon > fig' > > > no longer installs it? Given that users do edit this file (e.g. if using > > > postfix from ports), it does seem like this should be treated as a config > > > file? > > > > Yes, plain file vs config file. There was a change a couple of months ago > > by someone else that changed config files to plain files which totally > > messed up /etc after etcupdate was run. It also affected mergemaster BTW. > > This was https://svnweb.freebsd.org/base?view=revision&revision=359294 > > > If pkgbase needs config files to be plain files we might need a knob to > > make it so when pkgbase is invoking make. > > It doesn't, pkg needs to know about config files, the problem with my > commit is more an etcupdate/mergemaster problem than a pkgbase one. > iirc etcupdate do a make distribution to find new files and diffs and > switching a config file from a plain files will cause the file to be > installed by installworld so etcupdate thinks that it was deleted. I've > tried a bit to fix that in etcupdate but couldn't find a proper way to > do it. Mergemaster also does make distribution. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Mon Jun 29 17:43:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 654993500A8; Mon, 29 Jun 2020 17:43:01 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wZZs263Nz47Qm; Mon, 29 Jun 2020 17:43:01 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com [209.85.160.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 27AF318B2E; Mon, 29 Jun 2020 17:43:01 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f178.google.com with SMTP id v19so13456276qtq.10; Mon, 29 Jun 2020 10:43:01 -0700 (PDT) X-Gm-Message-State: AOAM532iDus0sVz9z3hV4DZHZQZcV9thAEpVKG0mv0998v/lHG4NUsQy O2B10af9jdlJiILEfTwXaMRiHnq7Ec5Pojg9KCk= X-Google-Smtp-Source: ABdhPJw/8TJ4pk78leirkf+lMBOzNt4osz72RKXl4mNr1Z688bIqRnZ3m6hpEpEcUr9Vd5yLAeco3ir1YNYNlG+8z7Q= X-Received: by 2002:ac8:691:: with SMTP id f17mr16726262qth.60.1593452580615; Mon, 29 Jun 2020 10:43:00 -0700 (PDT) MIME-Version: 1.0 References: <202006290309.05T39ETZ044859@repo.freebsd.org> <20200629152717.2ojwnipxkmjaoix2@mutt-hbsd> In-Reply-To: <20200629152717.2ojwnipxkmjaoix2@mutt-hbsd> From: Kyle Evans Date: Mon, 29 Jun 2020 12:42:49 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r362769 - in head/sys: amd64/linux amd64/linux32 arm64/linux compat/linux i386/linux To: Shawn Webb Cc: src-committers , svn-src-all , svn-src-head , =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 17:43:01 -0000 On Mon, Jun 29, 2020 at 10:27 AM Shawn Webb wrote: > > Hey Kyle, > > On Mon, Jun 29, 2020 at 03:09:14AM +0000, Kyle Evans wrote: > > Author: kevans > > Date: Mon Jun 29 03:09:14 2020 > > New Revision: 362769 > > URL: https://svnweb.freebsd.org/changeset/base/362769 > > > > Log: > > linuxolator: implement memfd_create syscall > > > > This effectively mirrors our libc implementation, but with minor fudging -- > > name needs to be copied in from userspace, so we just copy it straight into > > stack-allocated memfd_name into the correct position rather than allocating > > memory that needs to be cleaned up. > > > > The sealing-related fcntl(2) commands, F_GET_SEALS and F_ADD_SEALS, have > > also been implemented now that we support them. > > > > Note that this implementation is still not quite at feature parity w.r.t. > > the actual Linux version; some caveats, from my foggy memory: > > > > - Need to implement SHM_GROW_ON_WRITE, default for memfd (in progress) > > - LTP wants the memfd name exposed to fdescfs > > - Linux allows open() of an fdescfs fd with O_TRUNC to truncate after dup. > > (?) > > > > Interested parties can install and run LTP from ports (devel/linux-ltp) to > > confirm any fixes. > > > > PR: 240874 > > Reviewed by: kib, trasz > > Differential Revision: https://reviews.freebsd.org/D21845 > > RELNOTES? > > > > > Modified: > > head/sys/amd64/linux/linux_dummy.c > > head/sys/amd64/linux32/linux32_dummy.c > > head/sys/arm64/linux/linux_dummy.c > > head/sys/compat/linux/linux.c > > head/sys/compat/linux/linux.h > > head/sys/compat/linux/linux_file.c > > head/sys/compat/linux/linux_file.h > > head/sys/i386/linux/linux_dummy.c > > Should __FreeBSD_version be bumped? > I'm roping in trasz@, because I'm unsure on either of these points -- I haven't paid attention and don't know if we typically include linux syscalls that we implement in relnotes, and given that this commit only really affects pre-compiled Linux binaries I'm not sure if there's any utility in bumping __FreeBSD_version; presumably ports folks can't do anything differently here, and binaries will work just the same. Thanks, Kyle Evans From owner-svn-src-all@freebsd.org Mon Jun 29 17:47:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 63F4534FFBA; Mon, 29 Jun 2020 17:47:01 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wZgT217Lz47mp; Mon, 29 Jun 2020 17:47:01 +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 28422B2E2; Mon, 29 Jun 2020 17:47:01 +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 05THl1pR091904; Mon, 29 Jun 2020 17:47:01 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05THl163091903; Mon, 29 Jun 2020 17:47:01 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202006291747.05THl163091903@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 29 Jun 2020 17:47:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362786 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 362786 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 17:47:01 -0000 Author: kevans Date: Mon Jun 29 17:47:00 2020 New Revision: 362786 URL: https://svnweb.freebsd.org/changeset/base/362786 Log: linux: reposition the comment for bsd_to_linux_bits/linux_to_bsd_bits rpokala notes that splitting the definitions like this is kind of silly, since the comment applies to both. Move the comment up (or the definition down, depending on your perspective on life) accordingly. Reported by: rpokala Modified: head/sys/compat/linux/linux.h Modified: head/sys/compat/linux/linux.h ============================================================================== --- head/sys/compat/linux/linux.h Mon Jun 29 17:19:08 2020 (r362785) +++ head/sys/compat/linux/linux.h Mon Jun 29 17:47:00 2020 (r362786) @@ -165,9 +165,6 @@ int bsd_to_linux_bits_(int value, struct bsd_to_linux_ int linux_to_bsd_bits_(int value, struct bsd_to_linux_bitmap *bitmap, size_t mapcnt, int no_value); -#define bsd_to_linux_bits(_val, _bmap, _noval) \ - bsd_to_linux_bits_((_val), (_bmap), nitems((_bmap)), (_noval)) - /* * These functions are used for simplification of BSD <-> Linux bit conversions. * Given `value`, a bit field, these functions will walk the given bitmap table @@ -176,6 +173,8 @@ int linux_to_bsd_bits_(int value, struct bsd_to_linux_ * represented with the bit values appropriate for the target platform. * Otherwise, the value supplied as `no_value` is returned. */ +#define bsd_to_linux_bits(_val, _bmap, _noval) \ + bsd_to_linux_bits_((_val), (_bmap), nitems((_bmap)), (_noval)) #define linux_to_bsd_bits(_val, _bmap, _noval) \ linux_to_bsd_bits_((_val), (_bmap), nitems((_bmap)), (_noval)) From owner-svn-src-all@freebsd.org Mon Jun 29 17:47:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2E0DC3500D9 for ; Mon, 29 Jun 2020 17:47:52 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wZhR3tTQz480k for ; Mon, 29 Jun 2020 17:47:51 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-qt1-x841.google.com with SMTP id u12so13481266qth.12 for ; Mon, 29 Jun 2020 10:47:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=H3UE1CsSLolUF//MIGaKxVN18uJC60taaK6CQOj7gpc=; b=UEbZkps+h6WY2bmt7d87tOsx9DutIF+Aj4qc1FuYqPZprNlc0ZJUNou+8RCj0k4wA7 dWtFwA38sbBE7PhuH8CYvYpHNuh/j2fCNaCnvo41Z2SbqT2aXlGqIQ1ECR2qxaY4ck0q 2dyQJ97jnUcf0YVZ04soBadkSJ+uNxzujlf1J2ANINldp7+mw7Vb72w19HpcpsXfRsLy 6rKicPyUiyA7IzsA1uKVwPulHlO+3lpA5zahyEJ+zm4Zcr8UZk7uoAgTR0XVOm5YIOKY DHTPGZgpb0S50qbTixhCB362pBazXb5UmYkiIO2f/DDlGmU+mo8U6la71+OIROAsLr/A md8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=H3UE1CsSLolUF//MIGaKxVN18uJC60taaK6CQOj7gpc=; b=o7s5uJwDe9E8v3jaUbJv8+aDGGf23HXrLJqDjQ13ZVECbH82P/FDoxfrgjG1V6I0nU 4P+9a0NzJeC0qtCXaqRF4d7pDa5VGiYmyCy/RBH9TDDMhHvRZvsjvuiDQunyWg8tFP2o JkWmDW9yYSX/jTfKm46Z0PVU2VrF4FpaBTOgootTwEicOMpKbfuqLa/GCIy8Q0KC9Tvd PCfl/7aRzfTy+hF85aUIkfA7XtPnGGEU1xMVbDzSNViftw5WEEAnnNvYTFaTnZtMQ/Zp WaVsKuDp/0dnB8OwV9d82ol8ZCCkwZDqUQAvnTaijV4oRg6A9iqO1xw4SNkYHwlXHscR ut2w== X-Gm-Message-State: AOAM53003dIxDaGMACntU+8GwnIhbgXdB2O3wtzcupWB5X9BY8E5Qjt8 4Pz5m4zlRR1elkLCpu9ItscTpQ== X-Google-Smtp-Source: ABdhPJzhKyI2MISBRB2VjTI8iv2CLxNjkffI3fbh0vAy07eK2MVkBFniqKgmBJWTZb3hJPFtQxYbnw== X-Received: by 2002:ac8:3981:: with SMTP id v1mr16848003qte.134.1593452870667; Mon, 29 Jun 2020 10:47:50 -0700 (PDT) Received: from mutt-hbsd (75-148-2-186-WashingtonDC.hfc.comcastbusiness.net. [75.148.2.186]) by smtp.gmail.com with ESMTPSA id j7sm388752qtd.53.2020.06.29.10.47.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jun 2020 10:47:50 -0700 (PDT) Date: Mon, 29 Jun 2020 13:47:28 -0400 From: Shawn Webb To: Kyle Evans Cc: src-committers , svn-src-all , svn-src-head , Edward Tomasz Napiera??a Subject: Re: svn commit: r362769 - in head/sys: amd64/linux amd64/linux32 arm64/linux compat/linux i386/linux Message-ID: <20200629174728.ln77pjbg65v3kxwf@mutt-hbsd> X-Operating-System: FreeBSD mutt-hbsd 13.0-CURRENT-HBSD FreeBSD 13.0-CURRENT-HBSD X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0xFF2E67A277F8E1FA References: <202006290309.05T39ETZ044859@repo.freebsd.org> <20200629152717.2ojwnipxkmjaoix2@mutt-hbsd> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2b2d3wgxtc4uresf" Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 49wZhR3tTQz480k X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=hardenedbsd.org header.s=google header.b=UEbZkps+; dmarc=none; spf=pass (mx1.freebsd.org: domain of shawn.webb@hardenedbsd.org designates 2607:f8b0:4864:20::841 as permitted sender) smtp.mailfrom=shawn.webb@hardenedbsd.org X-Spamd-Result: default: False [-4.22 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[hardenedbsd.org:s=google]; NEURAL_HAM_MEDIUM(-1.03)[-1.030]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; NEURAL_HAM_LONG(-0.99)[-0.994]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[hardenedbsd.org]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[hardenedbsd.org:+]; NEURAL_HAM_SHORT(-0.10)[-0.095]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::841:from]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; MID_RHS_NOT_FQDN(0.50)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 17:47:52 -0000 --2b2d3wgxtc4uresf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 29, 2020 at 12:42:49PM -0500, Kyle Evans wrote: > On Mon, Jun 29, 2020 at 10:27 AM Shawn Webb = wrote: > > > > Hey Kyle, > > > > On Mon, Jun 29, 2020 at 03:09:14AM +0000, Kyle Evans wrote: > > > Author: kevans > > > Date: Mon Jun 29 03:09:14 2020 > > > New Revision: 362769 > > > URL: https://svnweb.freebsd.org/changeset/base/362769 > > > > > > Log: > > > linuxolator: implement memfd_create syscall > > > > > > This effectively mirrors our libc implementation, but with minor fu= dging -- > > > name needs to be copied in from userspace, so we just copy it strai= ght into > > > stack-allocated memfd_name into the correct position rather than al= locating > > > memory that needs to be cleaned up. > > > > > > The sealing-related fcntl(2) commands, F_GET_SEALS and F_ADD_SEALS,= have > > > also been implemented now that we support them. > > > > > > Note that this implementation is still not quite at feature parity = w.r.t. > > > the actual Linux version; some caveats, from my foggy memory: > > > > > > - Need to implement SHM_GROW_ON_WRITE, default for memfd (in progre= ss) > > > - LTP wants the memfd name exposed to fdescfs > > > - Linux allows open() of an fdescfs fd with O_TRUNC to truncate aft= er dup. > > > (?) > > > > > > Interested parties can install and run LTP from ports (devel/linux-= ltp) to > > > confirm any fixes. > > > > > > PR: 240874 > > > Reviewed by: kib, trasz > > > Differential Revision: https://reviews.freebsd.org/D21845 > > > > RELNOTES? > > > > > > > > Modified: > > > head/sys/amd64/linux/linux_dummy.c > > > head/sys/amd64/linux32/linux32_dummy.c > > > head/sys/arm64/linux/linux_dummy.c > > > head/sys/compat/linux/linux.c > > > head/sys/compat/linux/linux.h > > > head/sys/compat/linux/linux_file.c > > > head/sys/compat/linux/linux_file.h > > > head/sys/i386/linux/linux_dummy.c > > > > Should __FreeBSD_version be bumped? > > >=20 > I'm roping in trasz@, because I'm unsure on either of these points -- > I haven't paid attention and don't know if we typically include linux > syscalls that we implement in relnotes, and given that this commit > only really affects pre-compiled Linux binaries I'm not sure if > there's any utility in bumping __FreeBSD_version; presumably ports > folks can't do anything differently here, and binaries will work just > the same. Hey Kyle, I assumed as much, but I wasn't entirely sure. I thought I'd just ask anyways. Thanks for the clarification. :) --=20 Shawn Webb Cofounder / Security Engineer HardenedBSD GPG Key ID: 0xFF2E67A277F8E1FA GPG Key Fingerprint: D206 BB45 15E0 9C49 0CF9 3633 C85B 0AF8 AB23 0FB2 https://git-01.md.hardenedbsd.org/HardenedBSD/pubkeys/src/branch/master/Sha= wn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc --2b2d3wgxtc4uresf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAl76KSsACgkQ/y5nonf4 4foVHw/+M7P2PtbrYgTpYcuieXRoHk0M3V8OUFP9v5l/Eof94f+sSvBQqzF5279j 045OkhvaXNeCKpXUxOAy/D0HXQQWNMB4JenMAQHkVEJ/fAnnXmFdtMgzUjEZHPB2 Ka3SyByuwCBarZFQymDpquLFsU8N6IG+yHYPmedXhQnYBchAlHr7oMUfoDLiwF8X SCJCASu5hrKwv1XMWa7HB9xTAmUiG4Qo2Lc8PAQaNVcIWQJJraDJIoI7PylfDi1M mMoVulM90P8GbpkiuxASr9459O5kCk0cVmfvZrtCC0Mc8PwnuF6WLBiSIP9rJMAz I8gDhXTCU62Ds88r7B0JXE+5DzZvTyDKdLDgqTc3+EtzAbIDzy+Tu818XfnBMvAI PrjuTvOdeZBbX09yT+ECKZYlwvJZDdQ5jT2fZbQUH+lVaw66dPNwJrjHJ8IRc9mr IW/ZwFTnqqBSNeOBx2ll/YxEnmG193RuZ9Ikv+d/Ku5LYW7uMOI1vorWnOo+HqFz RUflmxi4N2Iuswq7IRmif9/U4p7L43PjZsPIGguSOop+V6XSj2FaomEDgtV/PoJw 4rJVQRTnYsgmbw3EfkgOMp9ir+jrLwcdnxVRKEbpMokwhL4dpo9Uo6d5V2hyoqHb EiyS7mmQDibV1d87MHxmZPyuTS4+aCKHZ2q+hYg4WU2uVc0XD1U= =dOHS -----END PGP SIGNATURE----- --2b2d3wgxtc4uresf-- From owner-svn-src-all@freebsd.org Mon Jun 29 18:06:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4A6DD35007E; Mon, 29 Jun 2020 18:06:01 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wb5P13tZz48yR; Mon, 29 Jun 2020 18:06:01 +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 07CBBB59E; Mon, 29 Jun 2020 18:06:01 +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 05TI60S2004536; Mon, 29 Jun 2020 18:06:00 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05TI60UM004535; Mon, 29 Jun 2020 18:06:00 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202006291806.05TI60UM004535@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 29 Jun 2020 18:06:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362787 - head/usr.sbin/mailwrapper X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.sbin/mailwrapper X-SVN-Commit-Revision: 362787 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 18:06:01 -0000 Author: kevans Date: Mon Jun 29 18:06:00 2020 New Revision: 362787 URL: https://svnweb.freebsd.org/changeset/base/362787 Log: mailwrapper: switch mailer.conf to CONFS This matches what was already being done in dma(8), and should again make this merge with etcupdate/mergemaster. Reported by: jhb Modified: head/usr.sbin/mailwrapper/Makefile Modified: head/usr.sbin/mailwrapper/Makefile ============================================================================== --- head/usr.sbin/mailwrapper/Makefile Mon Jun 29 17:47:00 2020 (r362786) +++ head/usr.sbin/mailwrapper/Makefile Mon Jun 29 18:06:00 2020 (r362787) @@ -31,9 +31,9 @@ SYMLINKS+= ..${BINDIR}/mailwrapper /bin/rmail # dma(8) are installed and simply provide a default that can be changed for an # alternative in ports. .if ${MK_SENDMAIL} != "no" || ${MK_DMAGENT} == "no" -FILES= ${SRCTOP}/etc/mail/mailer.conf -FILESDIR= /etc/mail -FILESMODE= 644 +CONFS= ${SRCTOP}/etc/mail/mailer.conf +CONFSDIR= /etc/mail +CONFSMODE= 644 .endif .endif From owner-svn-src-all@freebsd.org Mon Jun 29 18:09:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 14AFE350898; Mon, 29 Jun 2020 18:09:41 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f49.google.com (mail-io1-f49.google.com [209.85.166.49]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wb9c5Hphz491J; Mon, 29 Jun 2020 18:09:40 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f49.google.com with SMTP id c16so18167173ioi.9; Mon, 29 Jun 2020 11:09:40 -0700 (PDT) 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=MejSuKe3AmvNTNKsMFcqGWoZXcTRclrEvATJNZXssGw=; b=YXfTKHV5/B7+c0xYTnQROcVZBeQXWnu+4bjs6hPbqw3qIopxge2bpn25pYLJVOVfE8 WVNBxg19bxpvWMZz0cdijRfYm5jbgfqCY8UdgYjaZ4ytF43vB1R4Z6Tlbfp1tGUwHxrH yn7zE4x//ZpdQeHeV31d+heO0lWm/CSCdeYBF7VTe4s71T972s3BeyR37+kaG147f1HC F5DBNbCSgNzownbouaePizLKbPJ/ZkWRi1jExULyelIwM6LflNw7o1ayqnnKxgQPMFqq jvxeJYDqz/SZzaOVI/aMx42YBMwJdoGxjDImsqEHsm7CbhQ0FYboA6vZbp7K1BOBjGwH NMwg== X-Gm-Message-State: AOAM532mam4yU5K7IUAGgxg/8ne7FCQKxP8GQc861TvacNB8zm9yt0h7 Zmhb7ZfAK/1PNgyGYjbK66T3in1kn3qDzHI1aExW+g== X-Google-Smtp-Source: ABdhPJwNQcM5gMuhjHSeVK3lgXBfq3Eg3E/V+9/aIQJbIfwGKrwnYCeJ2o32BQiokZHLW+53+ACn8RSQoAwc+DmLlAY= X-Received: by 2002:a5d:9a97:: with SMTP id c23mr6705792iom.179.1593454178659; Mon, 29 Jun 2020 11:09:38 -0700 (PDT) MIME-Version: 1.0 References: <202006271202.05RC22oR085945@repo.freebsd.org> <2b7f0d0f-e243-9c9c-f1c0-e700e0bf6d48@FreeBSD.org> <577b1bd1-598a-d3f9-3c23-537b9747612a@vangyzen.net> <8670f956-1ed4-2b87-ee64-d04bc37d6810@freebsd.org> In-Reply-To: From: Ed Maste Date: Mon, 29 Jun 2020 14:09:27 -0400 Message-ID: Subject: Re: svn commit: r362681 - in head: contrib/bc contrib/bc/gen contrib/bc/include contrib/bc/locales contrib/bc/manuals contrib/bc/src contrib/bc/src/bc contrib/bc/src/dc contrib/bc/src/history contrib/b... To: John Baldwin Cc: =?UTF-8?B?U3RlZmFuIEXDn2Vy?= , Eric van Gyzen , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 49wb9c5Hphz491J X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 18:09:41 -0000 On Mon, 29 Jun 2020 at 11:27, John Baldwin wrote: > > I suspect just doing the 'merge --record-only' is the simplest method > assuming Git handles it ok. I suspect since Git ignores mergeinfo this > is fine, but it would be good for Ed to confirm. You can always restore > the tests in the future in contrib/bc when you want to add them. I think a --record-only merge is the best approach; in any case we have a number of these in the tree already and Git will have to deal with them. From owner-svn-src-all@freebsd.org Mon Jun 29 19:30:36 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 251F2353989; Mon, 29 Jun 2020 19:30:36 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wcz00ByFz4J41; Mon, 29 Jun 2020 19:30:36 +0000 (UTC) (envelope-from mhorne@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 DE809C1F1; Mon, 29 Jun 2020 19:30:35 +0000 (UTC) (envelope-from mhorne@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05TJUZpT054088; Mon, 29 Jun 2020 19:30:35 GMT (envelope-from mhorne@FreeBSD.org) Received: (from mhorne@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05TJUZEt054087; Mon, 29 Jun 2020 19:30:35 GMT (envelope-from mhorne@FreeBSD.org) Message-Id: <202006291930.05TJUZEt054087@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mhorne set sender to mhorne@FreeBSD.org using -f From: Mitchell Horne Date: Mon, 29 Jun 2020 19:30:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362788 - head/lib/libc/riscv X-SVN-Group: head X-SVN-Commit-Author: mhorne X-SVN-Commit-Paths: head/lib/libc/riscv X-SVN-Commit-Revision: 362788 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 19:30:36 -0000 Author: mhorne Date: Mon Jun 29 19:30:35 2020 New Revision: 362788 URL: https://svnweb.freebsd.org/changeset/base/362788 Log: Fix printf(3) output of long doubles on RISC-V When the RISC-V port was initially committed to FreeBSD, GCC would generate 64-bit long doubles, and the definitions in _fpmath.h reflected that. This was changed to 128-bit in GCC later that year [1], but the definitions were never updated, despite the documented workaround. This causes printf(3) and friends to interpret only the low 64-bits of a long double in ldtoa, thereby printing incorrect values. Update the definitions now that both clang and GCC generate 128-bit long doubles. [1] https://github.com/riscv/riscv-gcc/commit/54b21fc5ae83cefec44bc2caed4a8c664c274ba0 PR: 242067 Reported by: Dennis Clarke MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25420 Modified: head/lib/libc/riscv/_fpmath.h Modified: head/lib/libc/riscv/_fpmath.h ============================================================================== --- head/lib/libc/riscv/_fpmath.h Mon Jun 29 18:06:00 2020 (r362787) +++ head/lib/libc/riscv/_fpmath.h Mon Jun 29 19:30:35 2020 (r362788) @@ -46,19 +46,6 @@ union IEEEl2bits { #define LDBL_IMPLICIT_NBIT #define mask_nbit_l(u) ((void)0) -#define LDBL_MANH_SIZE 20 -#define LDBL_MANL_SIZE 32 - -#define LDBL_TO_ARRAY32(u, a) do { \ - (a)[0] = (uint32_t)(u).bits.manl; \ - (a)[1] = (uint32_t)(u).bits.manh; \ -} while(0) - -/* - * TODO: Due to compiler problem we are temporary using - * LDBL_PREC == 53. Use code below for LDBL_PREC == 113 - */ -#if 0 #define LDBL_MANH_SIZE 48 #define LDBL_MANL_SIZE 64 @@ -68,4 +55,3 @@ union IEEEl2bits { (a)[2] = (uint32_t)(u).bits.manh; \ (a)[3] = (uint32_t)((u).bits.manh >> 32); \ } while(0) -#endif From owner-svn-src-all@freebsd.org Mon Jun 29 20:15:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 46680354506; Mon, 29 Jun 2020 20:15:03 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wdyH1DYqz4L8Y; Mon, 29 Jun 2020 20:15:03 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [172.17.133.71] (unknown [12.202.168.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id 9370E19D32; Mon, 29 Jun 2020 20:15:02 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/16.38.20061401 Date: Mon, 29 Jun 2020 13:14:59 -0700 Subject: Re: svn commit: r362781 - head/sys/compat/linuxkpi/common/include/linux From: Ravi Pokala To: Hans Petter Selasky , , , Message-ID: Thread-Topic: svn commit: r362781 - head/sys/compat/linuxkpi/common/include/linux References: <202006291308.05TD8eTP014019@repo.freebsd.org> In-Reply-To: <202006291308.05TD8eTP014019@repo.freebsd.org> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 20:15:03 -0000 -----Original Message----- From: on behalf of Hans Petter Selasky Date: 2020-06-29, Monday at 06:08 To: , , Subject: svn commit: r362781 - head/sys/compat/linuxkpi/common/include/linux Author: hselasky Date: Mon Jun 29 13:08:40 2020 New Revision: 362781 URL: https://svnweb.freebsd.org/changeset/base/362781 Log: Implement is_signed(), type_max() and type_min() function macros in the LinuxKPI. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/kernel.h Modified: head/sys/compat/linuxkpi/common/include/linux/kernel.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/kernel.h Mon Jun 29 12:59:09 2020 (r362780) +++ head/sys/compat/linuxkpi/common/include/linux/kernel.h Mon Jun 29 13:08:40 2020 (r362781) @@ -564,4 +564,20 @@ linux_ratelimited(linux_ratelimit_t *rl) #define __is_constexpr(x) \ __builtin_constant_p(x) Hi Hans, +#define is_signed(x) (((x)-1 / (x)2) == (x)0) It took me several reads to understand this, until I figured out that 'x' is not a variable, it's the name of a *type*. If 'x' is a variable, then '(x)-1' is subtraction, but '(x)2' and '(x)0' are nonsensical. If 'x' is a *type*, then '(x)-1' is typecasting '-1', and similarly for '(x)2' and '(x)0'. So, perhaps a comment, or a better name for 'x'? Thanks, Ravi (rpokala@) +#define type_max(x) ( \ + (sizeof(x) >= 8) ? (is_signed(x) ? INT64_MAX : UINT64_MAX) : \ + (sizeof(x) >= 4) ? (is_signed(x) ? INT32_MAX : UINT32_MAX) : \ + (sizeof(x) >= 2) ? (is_signed(x) ? INT16_MAX : UINT16_MAX) : \ + (is_signed(x) ? INT8_MAX : UINT8_MAX) \ +) + +#define type_min(x) ( \ + (sizeof(x) >= 8) ? (is_signed(x) ? INT64_MIN : 0) : \ + (sizeof(x) >= 4) ? (is_signed(x) ? INT32_MIN : 0) : \ + (sizeof(x) >= 2) ? (is_signed(x) ? INT16_MIN : 0) : \ + (is_signed(x) ? INT8_MIN : 0) \ +) + #endif /* _LINUX_KERNEL_H_ */ From owner-svn-src-all@freebsd.org Mon Jun 29 20:26:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2C17E353FDE for ; Mon, 29 Jun 2020 20:26:59 +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.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wfD225ZLz4M39 for ; Mon, 29 Jun 2020 20:26:58 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x830.google.com with SMTP id h23so13970954qtr.0 for ; Mon, 29 Jun 2020 13:26:58 -0700 (PDT) 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=Rmy7dZwkTK1bYLQg/Pld80RFXvuLEQQ2YYkZrrodFn8=; b=ZHIL2eONoPmq4TfX5Vaa7hJrPvBe6+yWIPV4XEtrttGaMl+iell1kCI3ZBX8un2zlw fic3sLYOK87PbbAB9ak3G/WP0C0w/LyVhzgp5zLNNAgrbAyL8gBWjLvMrh7uG0JxW0e9 Y7EqBv2NywddRN9+WBJckFql7im/HfRwRO5ADr8OagMRTIuHHfn89e3TYizjA1WUmhlO U+uYogIDoUbH4OF4rNz/BRWywfn19L9zhgWRM7SHqiLNihhkOSLlcZckOb/GBPv2+JRx p42yj4jS0my1Q2PfaKJ1i7wEchHSk34UoOm8uX+P+vgxBtsoSC/aMHSXwVaCvP9KXWtm 70jw== 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=Rmy7dZwkTK1bYLQg/Pld80RFXvuLEQQ2YYkZrrodFn8=; b=hPJZjmjCfkD2XNyEG23bQtjtk6lobLTwcls8xicerQBKA/Ri4zYo5zTurb2orJBl8l xeU/ozZTMEIRCnDdXX1gPlCyM3IRGQBi8OIwa41Uq+zGqDpMOz3BThePu/Ze+2W9M2iY yIQlVSaYtpG0ocBWqv8YliF0j4C//qVnrEcqBU8VJSsOUlGl84trn1ZDO4sGJp/x3qg8 z5R53VNCozqkYrVojfpTamu2xwpvbpfxJQvt7ikQWylW+TffsjNuHL3e/Dg+OU3OlYU6 TOJxBG6jxEYk2WAF6ptdN4mCQ99Q8BI7ECgrlk8ZqP/oP7BFWmsJVRtIZ0MdY86Fa7jE DvqQ== X-Gm-Message-State: AOAM533yseKtrRmNonRbJKcmsR0uG7HC3qGNPHYt3+PH0qa1Qdt33EV8 CCHtVlfztaWsuCOsfNVbKKfhsidCANU7zOndwSlWgA== X-Google-Smtp-Source: ABdhPJzlKKyNgHS/3h3L04hLNrqYilp5a1tRIdf0toT+hWVGxP9sqLOVxAugC6llE5QNDrsfKu0QNc5gKK8r5yiuL50= X-Received: by 2002:ac8:34e8:: with SMTP id x37mr18184850qtb.291.1593462417047; Mon, 29 Jun 2020 13:26:57 -0700 (PDT) MIME-Version: 1.0 References: <202006291308.05TD8eTP014019@repo.freebsd.org> In-Reply-To: From: Warner Losh Date: Mon, 29 Jun 2020 14:26:45 -0600 Message-ID: Subject: Re: svn commit: r362781 - head/sys/compat/linuxkpi/common/include/linux To: Ravi Pokala Cc: Hans Petter Selasky , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 49wfD225ZLz4M39 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=ZHIL2eON; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::830) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.64 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.97)[-0.970]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-0.99)[-0.995]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.67)[-0.671]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::830:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 20:26:59 -0000 On Mon, Jun 29, 2020, 2:15 PM Ravi Pokala wrote: > -----Original Message----- > From: on behalf of Hans Petter Selasky > > Date: 2020-06-29, Monday at 06:08 > To: , , < > svn-src-head@freebsd.org> > Subject: svn commit: r362781 - > head/sys/compat/linuxkpi/common/include/linux > > Author: hselasky > Date: Mon Jun 29 13:08:40 2020 > New Revision: 362781 > URL: https://svnweb.freebsd.org/changeset/base/362781 > > Log: > Implement is_signed(), type_max() and type_min() function macros in > the > LinuxKPI. > > MFC after: 1 week > Sponsored by: Mellanox Technologies > > Modified: > head/sys/compat/linuxkpi/common/include/linux/kernel.h > > Modified: head/sys/compat/linuxkpi/common/include/linux/kernel.h > > ============================================================================== > --- head/sys/compat/linuxkpi/common/include/linux/kernel.h Mon Jun 29 > 12:59:09 2020 (r362780) > +++ head/sys/compat/linuxkpi/common/include/linux/kernel.h Mon Jun 29 > 13:08:40 2020 (r362781) > @@ -564,4 +564,20 @@ linux_ratelimited(linux_ratelimit_t *rl) > #define __is_constexpr(x) \ > __builtin_constant_p(x) > > Hi Hans, > > +#define is_signed(x) (((x)-1 / (x)2) == (x)0) > > It took me several reads to understand this, until I figured out that 'x' > is not a variable, it's the name of a *type*. > > If 'x' is a variable, then '(x)-1' is subtraction, but '(x)2' and '(x)0' > are nonsensical. > > If 'x' is a *type*, then '(x)-1' is typecasting '-1', and similarly for > '(x)2' and '(x)0'. > > So, perhaps a comment, or a better name for 'x'? > I had similar thoughts. Maybe 't' instead? Warner Thanks, > > Ravi (rpokala@) > > +#define type_max(x) ( > \ > + (sizeof(x) >= 8) ? (is_signed(x) ? INT64_MAX : UINT64_MAX) : \ > + (sizeof(x) >= 4) ? (is_signed(x) ? INT32_MAX : UINT32_MAX) : \ > + (sizeof(x) >= 2) ? (is_signed(x) ? INT16_MAX : UINT16_MAX) : \ > + (is_signed(x) ? INT8_MAX : UINT8_MAX) \ > +) > + > +#define type_min(x) ( \ > + (sizeof(x) >= 8) ? (is_signed(x) ? INT64_MIN : 0) : \ > + (sizeof(x) >= 4) ? (is_signed(x) ? INT32_MIN : 0) : \ > + (sizeof(x) >= 2) ? (is_signed(x) ? INT16_MIN : 0) : \ > + (is_signed(x) ? INT8_MIN : 0) \ > +) > + > #endif /* _LINUX_KERNEL_H_ */ > > > From owner-svn-src-all@freebsd.org Mon Jun 29 20:30:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6AEAD353FF0; Mon, 29 Jun 2020 20:30:04 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wfHc25XQz4MNP; Mon, 29 Jun 2020 20:30:04 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [172.17.133.71] (unknown [12.202.168.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id 63CA619F7E; Mon, 29 Jun 2020 20:30:03 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/16.38.20061401 Date: Mon, 29 Jun 2020 13:30:00 -0700 Subject: Re: svn commit: r362781 - head/sys/compat/linuxkpi/common/include/linux From: Ravi Pokala To: Warner Losh , Ravi Pokala CC: Hans Petter Selasky , src-committers , , Message-ID: Thread-Topic: svn commit: r362781 - head/sys/compat/linuxkpi/common/include/linux References: <202006291308.05TD8eTP014019@repo.freebsd.org> In-Reply-To: Mime-version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 20:30:04 -0000 From: on behalf of Warner Losh Date: 2020-06-29, Monday at 13:26 To: Ravi Pokala Cc: Hans Petter Selasky , src-committers , , Subject: Re: svn commit: r362781 - head/sys/compat/linuxkpi/common/include/linux On Mon, Jun 29, 2020, 2:15 PM Ravi Pokala wrote: -----Original Message----- From: on behalf of Hans Petter Selasky Date: 2020-06-29, Monday at 06:08 To: , , Subject: svn commit: r362781 - head/sys/compat/linuxkpi/common/include/linux Author: hselasky Date: Mon Jun 29 13:08:40 2020 New Revision: 362781 URL: https://svnweb.freebsd.org/changeset/base/362781 Log: Implement is_signed(), type_max() and type_min() function macros in the LinuxKPI. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/kernel.h Modified: head/sys/compat/linuxkpi/common/include/linux/kernel.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/kernel.h Mon Jun 29 12:59:09 2020 (r362780) +++ head/sys/compat/linuxkpi/common/include/linux/kernel.h Mon Jun 29 13:08:40 2020 (r362781) @@ -564,4 +564,20 @@ linux_ratelimited(linux_ratelimit_t *rl) #define __is_constexpr(x) \ __builtin_constant_p(x) Hi Hans, +#define is_signed(x) (((x)-1 / (x)2) == (x)0) It took me several reads to understand this, until I figured out that 'x' is not a variable, it's the name of a *type*. If 'x' is a variable, then '(x)-1' is subtraction, but '(x)2' and '(x)0' are nonsensical. If 'x' is a *type*, then '(x)-1' is typecasting '-1', and similarly for '(x)2' and '(x)0'. So, perhaps a comment, or a better name for 'x'? I had similar thoughts. Maybe 't' instead? Letters are cheap now, Warner; we can afford to spell out "type". :-) -Ravi (rpokala@) Warner Thanks, Ravi (rpokala@) +#define type_max(x) ( \ + (sizeof(x) >= 8) ? (is_signed(x) ? INT64_MAX : UINT64_MAX) : \ + (sizeof(x) >= 4) ? (is_signed(x) ? INT32_MAX : UINT32_MAX) : \ + (sizeof(x) >= 2) ? (is_signed(x) ? INT16_MAX : UINT16_MAX) : \ + (is_signed(x) ? INT8_MAX : UINT8_MAX) \ +) + +#define type_min(x) ( \ + (sizeof(x) >= 8) ? (is_signed(x) ? INT64_MIN : 0) : \ + (sizeof(x) >= 4) ? (is_signed(x) ? INT32_MIN : 0) : \ + (sizeof(x) >= 2) ? (is_signed(x) ? INT16_MIN : 0) : \ + (is_signed(x) ? INT8_MIN : 0) \ +) + #endif /* _LINUX_KERNEL_H_ */ From owner-svn-src-all@freebsd.org Mon Jun 29 20:32:31 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6F081354E0C for ; Mon, 29 Jun 2020 20:32:31 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2k.ore.mailhop.org (outbound2k.ore.mailhop.org [54.148.219.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49wfLR15q2z4Mpm for ; Mon, 29 Jun 2020 20:32:30 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1593462749; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=kQGK021NYgzVKtbDaycNEgCT7+YWzHQjc+mGzJo7L2mLR4f8qqQbfOMOmCEI1/BKaxeQ6GlHsNFYW QAogdY6vrNeCu7uiBkuZJFRnDCaQMWUxO8Hv91nZdNxaVk7Ghp50PQZggTucy6iH6zoZZGyAobwJhK rOi/V7nMAbMuHUsJ3JRH16fPJSLe5Pdxc+GLRaYWu+ulG9hiyNVWRWBSkYp5QX+kqUycKgJ1im8kNy y66DJHVdl70b+OYnisul0Y8ee4rwOBClc0mMDAvJ5+UMtU4gavDl5ibIXew0JbPwiwX8aK2JrGeX+Y rr+LaXSntW+p1kUDGzFpkCiTcJng6BQ== 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=edzlQBa0SjdUnmITYOE26dMd8XfwDac11RHPxZ1jW/Q=; b=r4o9ykDWlnqld1vIBkchcK4vQkiveFRCKAsHE+2xNXx9XOtroh0gO7NNNC+qqgJHYowg75ijpACUO ysFCqz8XTgET8PnxF0iZPMGLlwlY7eWd8Os0c6KIO4ky22EZLSMooNs7O8v5r5Fg96XIDYx8/pXFO9 iep89xrcvNwZvIOUbi7A/AADWRGXy7Q06XBb4GVp9Pw3+s1KmABEtbKPNCzeUX+jXJ5clGjAuVbrN0 KIFeJ2qb0FV2J7zYUubs/fh+whAquOVrHXwCzW4/Ce2+ZqBq3JPRswgC6z91JwcM5ogFOcF0v9Hkxr x3WG3jINAJudwDCZDu5MBwR9Zi5GaTA== ARC-Authentication-Results: i=1; outbound4.ore.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=edzlQBa0SjdUnmITYOE26dMd8XfwDac11RHPxZ1jW/Q=; b=hv9mh6sQF8LIkhIhVJp/hDuR+b63G0HJIf4vDmOtJiifv1JMDZpRnIWRIayIZOYJRtlFGsIbXzBvW 65Uxomud4BpELP08GjQQcCfEA6bdxC4Z4HSoe64wMNSYfZJnFuqjgUeBBKR2gFAr+MUhQeNx3bf8or hH0I/v7umPNqkqLLFK3Yj/hreJbSmVBzaEEqOsfJukxdlZHQghtkH6Gn64V5P9eJhh1VwHfp1vKS13 LgQJWFLLwk87AnilbiBDrfAVk87PiEGsIvdjyQAhkczxQ5h0RFXTdN/A+/0jfTdXqlazGcKiVJU+j8 JAvHWsw5tpyUnmkn3ja0Pq595gkqidw== X-MHO-RoutePath: aGlwcGll X-MHO-User: a5703780-ba47-11ea-b630-6b8aa7872eb8 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 (c-67-177-211-60.hsd1.co.comcast.net [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id a5703780-ba47-11ea-b630-6b8aa7872eb8; Mon, 29 Jun 2020 20:32:28 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 05TKWQb1085970; Mon, 29 Jun 2020 14:32:26 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <24a300c54e94be8e6915c588a25a641ca0620200.camel@freebsd.org> Subject: Re: svn commit: r362781 - head/sys/compat/linuxkpi/common/include/linux From: Ian Lepore To: Warner Losh , Ravi Pokala Cc: Hans Petter Selasky , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Mon, 29 Jun 2020 14:32:26 -0600 In-Reply-To: References: <202006291308.05TD8eTP014019@repo.freebsd.org> Content-Type: text/plain; charset="ASCII" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49wfLR15q2z4Mpm X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 20:32:31 -0000 On Mon, 2020-06-29 at 14:26 -0600, Warner Losh wrote: > On Mon, Jun 29, 2020, 2:15 PM Ravi Pokala > wrote: > > > -----Original Message----- > > From: on behalf of Hans Petter > > Selasky > > > > Date: 2020-06-29, Monday at 06:08 > > To: , , < > > svn-src-head@freebsd.org> > > Subject: svn commit: r362781 - > > head/sys/compat/linuxkpi/common/include/linux > > > > Author: hselasky > > Date: Mon Jun 29 13:08:40 2020 > > New Revision: 362781 > > URL: https://svnweb.freebsd.org/changeset/base/362781 > > > > Log: > > Implement is_signed(), type_max() and type_min() function > > macros in > > the > > LinuxKPI. > > > > MFC after: 1 week > > Sponsored by: Mellanox Technologies > > > > Modified: > > head/sys/compat/linuxkpi/common/include/linux/kernel.h > > > > Modified: > > head/sys/compat/linuxkpi/common/include/linux/kernel.h > > > > =================================================================== > > =========== > > --- head/sys/compat/linuxkpi/common/include/linux/kernel.h Mon > > Jun 29 > > 12:59:09 2020 (r362780) > > +++ head/sys/compat/linuxkpi/common/include/linux/kernel.h Mon > > Jun 29 > > 13:08:40 2020 (r362781) > > @@ -564,4 +564,20 @@ linux_ratelimited(linux_ratelimit_t *rl) > > #define __is_constexpr(x) \ > > __builtin_constant_p(x) > > > > Hi Hans, > > > > +#define is_signed(x) (((x)-1 / (x)2) == (x)0) > > > > It took me several reads to understand this, until I figured out > > that 'x' > > is not a variable, it's the name of a *type*. > > > > If 'x' is a variable, then '(x)-1' is subtraction, but '(x)2' and > > '(x)0' > > are nonsensical. > > > > If 'x' is a *type*, then '(x)-1' is typecasting '-1', and similarly > > for > > '(x)2' and '(x)0'. > > > > So, perhaps a comment, or a better name for 'x'? > > > > I had similar thoughts. Maybe 't' instead? > Or maybe since there's no one-character restriction on macro variable names, something actually descriptive like 'datatype'. -- Ian > Warner > > Thanks, > > > > Ravi (rpokala@) > > > > +#define type_max(x) ( > > \ > > + (sizeof(x) >= 8) ? (is_signed(x) ? INT64_MAX : UINT64_MAX) > > : \ > > + (sizeof(x) >= 4) ? (is_signed(x) ? INT32_MAX : UINT32_MAX) > > : \ > > + (sizeof(x) >= 2) ? (is_signed(x) ? INT16_MAX : UINT16_MAX) > > : \ > > + (is_signed(x) ? INT8_MAX : UINT8_MAX) \ > > +) > > + > > +#define type_min(x) > > ( \ > > + (sizeof(x) >= 8) ? (is_signed(x) ? INT64_MIN : 0) : \ > > + (sizeof(x) >= 4) ? (is_signed(x) ? INT32_MIN : 0) : \ > > + (sizeof(x) >= 2) ? (is_signed(x) ? INT16_MIN : 0) : \ > > + (is_signed(x) ? INT8_MIN : 0) \ > > +) > > + > > #endif /* _LINUX_KERNEL_H_ */ > > > > > > From owner-svn-src-all@freebsd.org Mon Jun 29 21:11:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3389835569F; Mon, 29 Jun 2020 21:11:21 +0000 (UTC) (envelope-from se@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wgCF0fYqz4R1W; Mon, 29 Jun 2020 21:11:21 +0000 (UTC) (envelope-from se@freebsd.org) Received: from Stefans-MBP-WLAN.fritz.box (p200300cd5f203300d89053a09d7151ef.dip0.t-ipconnect.de [IPv6:2003:cd:5f20:3300:d890:53a0:9d71:51ef]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 27BA419FA4; Mon, 29 Jun 2020 21:11:20 +0000 (UTC) (envelope-from se@freebsd.org) Subject: Re: svn commit: r362681 - in head: contrib/bc contrib/bc/gen contrib/bc/include contrib/bc/locales contrib/bc/manuals contrib/bc/src contrib/bc/src/bc contrib/bc/src/dc contrib/bc/src/history contrib/b... To: Ed Maste , John Baldwin Cc: Eric van Gyzen , src-committers , svn-src-all , svn-src-head References: <202006271202.05RC22oR085945@repo.freebsd.org> <2b7f0d0f-e243-9c9c-f1c0-e700e0bf6d48@FreeBSD.org> <577b1bd1-598a-d3f9-3c23-537b9747612a@vangyzen.net> <8670f956-1ed4-2b87-ee64-d04bc37d6810@freebsd.org> From: =?UTF-8?Q?Stefan_E=c3=9fer?= Autocrypt: addr=se@freebsd.org; keydata= mQENBFVxiRIBCADOLNOZBsqlplHUQ3tG782FNtVT33rQli9EjNt2fhFERHIo4NxHlWBpHLnU b0s4L/eItx7au0i7Gegv01A9LUMwOnAc9EFAm4EW3Wmoa6MYrcP7xDClohg/Y69f7SNpEs3x YATBy+L6NzWZbJjZXD4vqPgZSDuMcLU7BEdJf0f+6h1BJPnGuwHpsSdnnMrZeIM8xQ8PPUVQ L0GZkVojHgNUngJH6e21qDrud0BkdiBcij0M3TCP4GQrJ/YMdurfc8mhueLpwGR2U1W8TYB7 4UY+NLw0McThOCLCxXflIeF/Y7jSB0zxzvb/H3LWkodUTkV57yX9IbUAGA5RKRg9zsUtABEB AAG0J1N0ZWZhbiBFw59lciAoRnJlZUJTRCkgPHNlQGZyZWVic2Qub3JnPokBVAQTAQoAPgIb AwULCQgHAwUVCgkICwUWAwIBAAIeAQIXgBYhBKNx6mWcC+zIK3FTE0frte9a/fVEBQJa8u+q BQkLJQETAAoJEEfrte9a/fVEOeMH/icmdK1eZQvB3U8quJo9VMaZsaTuCMbUE4NThyfsIvIm MCd+rb/yULmMYwqNfjyKB1x4ikR4x+94l+yJoz7K0Usks+eNKDmMGJM6pWWssTigaJubFdVd hVVC+C1QJi7JshYSib08uONoPmO4lv5Az0TDYGtsMzsES2sIlc62c9go5WPGYhQFRbX3Lk6y V6m8OHh+G9XGSj3oPO4UteRwu+SzTdOLunZBWG1wu34+IeZm663D+2gOppQLWpLa2qaTerqw THu377ayZ2B2LPJ5JkvkZeHYPkwDQ+b5PGn0UhfkxPnDVYki5F7qKxvQ5uq1/q9YaCX7mmOl H2yO7tgVsrW5AQ0EVXGJEgEIALEj9qCXMZVucjpcd3QxM/TlUr98m5viEd1z4tCnPUyRWcIC EVtj2h5xMH+2iB0q1+KWhq+NsWtvScmEmfHnsr7dJ1K677OdpDhKVaJk61eeRulFY1R4yb6C 1MMxK+WgYB+vvpG0UeyR0M4uBewcPvRsq4yGUHFQKtLAbMdoPTSryJA+ElnmK1vdY+rPcHgi OIMBZM7ahsPXC0C9K4e5SP9clGyIoMpbfHXdx9q+Rp3zVtlbhyk3BS/xccu/+9pk9ICXL6GR js2sNnJ0wxdU1DsAlC59a5MnSruwiZFwRnkQhr3x6wk97Lg7sLS9jjTnCN7LGlVmSmpOEMy6 uq1AWfUAEQEAAYkBPAQYAQoAJgIbDBYhBKNx6mWcC+zIK3FTE0frte9a/fVEBQJa8u+rBQkL JQEZAAoJEEfrte9a/fVEuesH/2DNxGWnHvWwMyiyhlQtafvDKwEn/wAgR8gHJFodB7emf8rA TnukH7MVttCoHtjN5lvv9RSBHjNTZls5wR/ANlwdRuPQHd8ZGxLe3S6IuUB3zDSwFltLGurO N2kOMhs5mTGyypSa+uw3rtQbUAVYf1oPbiR4FLtiM8FLyEvE95hX5fPq9Qvx9FmN79kmCIEw jDKPqDaUf/OR2fEF0LSIbXHEk4tNqCEwx5DIJ0fp5/z5UzICUAmwxyRs5O/Hre1jzPsMVyud Ml9t7UTOJGKVWwRory1PMnOFxN+iz5/d4FhYSKXF7kfMiFgol4LuWaxJRwbBrr71VGBrRy2a L1nw6Bc= Message-ID: Date: Mon, 29 Jun 2020 23:11:11 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 21:11:21 -0000 Am 29.06.20 um 20:09 schrieb Ed Maste: > On Mon, 29 Jun 2020 at 11:27, John Baldwin wrote: >> >> I suspect just doing the 'merge --record-only' is the simplest method >> assuming Git handles it ok. I suspect since Git ignores mergeinfo this >> is fine, but it would be good for Ed to confirm. You can always restore >> the tests in the future in contrib/bc when you want to add them. > > I think a --record-only merge is the best approach; in any case we > have a number of these in the tree already and Git will have to deal > with them. Thank you for this advice. There is a new version, which differs only in the man-pages. These used to mention optional features (of which only NLS support is actually optional in the version built on FreeBSD, all other are always compiled in, and I had mentioned to the author that this might irritate FreeBSD users). I have suggested to the author to add SPDX BSD-2-Clause tags, which would change a large fraction of the currently committed files. Is it required to perform the --record-only merge, then? Or would it be OK to import the new release into the vendor branch and then svn copy that version completely (including the tests and other files that I had omitted in the initial import) to contrib? I expect the svn copy without prior svn merge --record-only to result in the same repository state after the conversion to Git, but I do not really know ... Regards, STefan From owner-svn-src-all@freebsd.org Mon Jun 29 21:17:05 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 878B3355BE8; Mon, 29 Jun 2020 21:17:05 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wgKs35LRz4Rwn; Mon, 29 Jun 2020 21:17:05 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-274.local (unknown [IPv6:2601:648:8203:2990:b1a7:8995:c1d3:29df]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id A8E3F19CA4; Mon, 29 Jun 2020 21:17:04 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Subject: Re: svn commit: r362681 - in head: contrib/bc contrib/bc/gen contrib/bc/include contrib/bc/locales contrib/bc/manuals contrib/bc/src contrib/bc/src/bc contrib/bc/src/dc contrib/bc/src/history contrib/b... To: =?UTF-8?Q?Stefan_E=c3=9fer?= , Ed Maste Cc: Eric van Gyzen , src-committers , svn-src-all , svn-src-head References: <202006271202.05RC22oR085945@repo.freebsd.org> <2b7f0d0f-e243-9c9c-f1c0-e700e0bf6d48@FreeBSD.org> <577b1bd1-598a-d3f9-3c23-537b9747612a@vangyzen.net> <8670f956-1ed4-2b87-ee64-d04bc37d6810@freebsd.org> From: John Baldwin Autocrypt: addr=jhb@FreeBSD.org; keydata= mQGiBETQ+XcRBADMFybiq69u+fJRy/0wzqTNS8jFfWaBTs5/OfcV7wWezVmf9sgwn8TW0Dk0 c9MBl0pz+H01dA2ZSGZ5fXlmFIsee1WEzqeJzpiwd/pejPgSzXB9ijbLHZ2/E0jhGBcVy5Yo /Tw5+U/+laeYKu2xb0XPvM0zMNls1ah5OnP9a6Ql6wCgupaoMySb7DXm2LHD1Z9jTsHcAQMD /1jzh2BoHriy/Q2s4KzzjVp/mQO5DSm2z14BvbQRcXU48oAosHA1u3Wrov6LfPY+0U1tG47X 1BGfnQH+rNAaH0livoSBQ0IPI/8WfIW7ub4qV6HYwWKVqkDkqwcpmGNDbz3gfaDht6nsie5Z pcuCcul4M9CW7Md6zzyvktjnbz61BADGDCopfZC4of0Z3Ka0u8Wik6UJOuqShBt1WcFS8ya1 oB4rc4tXfSHyMF63aPUBMxHR5DXeH+EO2edoSwViDMqWk1jTnYza51rbGY+pebLQOVOxAY7k do5Ordl3wklBPMVEPWoZ61SdbcjhHVwaC5zfiskcxj5wwXd2E9qYlBqRg7QeSm9obiBCYWxk d2luIDxqaGJARnJlZUJTRC5vcmc+iGAEExECACAFAkTQ+awCGwMGCwkIBwMCBBUCCAMEFgID AQIeAQIXgAAKCRBy3lIGd+N/BI6RAJ9S97fvbME+3hxzE3JUyUZ6vTewDACdE1stFuSfqMvM jomvZdYxIYyTUpC5Ag0ERND5ghAIAPwsO0B7BL+bz8sLlLoQktGxXwXQfS5cInvL17Dsgnr3 1AKa94j9EnXQyPEj7u0d+LmEe6CGEGDh1OcGFTMVrof2ZzkSy4+FkZwMKJpTiqeaShMh+Goj XlwIMDxyADYvBIg3eN5YdFKaPQpfgSqhT+7El7w+wSZZD8pPQuLAnie5iz9C8iKy4/cMSOrH YUK/tO+Nhw8Jjlw94Ik0T80iEhI2t+XBVjwdfjbq3HrJ0ehqdBwukyeJRYKmbn298KOFQVHO EVbHA4rF/37jzaMadK43FgJ0SAhPPF5l4l89z5oPu0b/+5e2inA3b8J3iGZxywjM+Csq1tqz hltEc7Q+E08AAwUIAL+15XH8bPbjNJdVyg2CMl10JNW2wWg2Q6qdljeaRqeR6zFus7EZTwtX sNzs5bP8y51PSUDJbeiy2RNCNKWFMndM22TZnk3GNG45nQd4OwYK0RZVrikalmJY5Q6m7Z16 4yrZgIXFdKj2t8F+x613/SJW1lIr9/bDp4U9tw0V1g3l2dFtD3p3ZrQ3hpoDtoK70ioIAjjH aIXIAcm3FGZFXy503DOA0KaTWwvOVdYCFLm3zWuSOmrX/GsEc7ovasOWwjPn878qVjbUKWwx Q4QkF4OhUV9zPtf9tDSAZ3x7QSwoKbCoRCZ/xbyTUPyQ1VvNy/mYrBcYlzHodsaqUDjHuW+I SQQYEQIACQUCRND5ggIbDAAKCRBy3lIGd+N/BCO8AJ9j1dWVQWxw/YdTbEyrRKOY8YZNwwCf afMAg8QvmOWnHx3wl8WslCaXaE8= Message-ID: <4aa7a1c9-177c-07e3-1cac-70e5ba995363@FreeBSD.org> Date: Mon, 29 Jun 2020 14:17:03 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 21:17:05 -0000 On 6/29/20 2:11 PM, Stefan Eßer wrote: > Am 29.06.20 um 20:09 schrieb Ed Maste: >> On Mon, 29 Jun 2020 at 11:27, John Baldwin wrote: >>> >>> I suspect just doing the 'merge --record-only' is the simplest method >>> assuming Git handles it ok. I suspect since Git ignores mergeinfo this >>> is fine, but it would be good for Ed to confirm. You can always restore >>> the tests in the future in contrib/bc when you want to add them. >> >> I think a --record-only merge is the best approach; in any case we >> have a number of these in the tree already and Git will have to deal >> with them. > > Thank you for this advice. > > There is a new version, which differs only in the man-pages. These > used to mention optional features (of which only NLS support is > actually optional in the version built on FreeBSD, all other are > always compiled in, and I had mentioned to the author that this > might irritate FreeBSD users). > > I have suggested to the author to add SPDX BSD-2-Clause tags, which > would change a large fraction of the currently committed files. > > > Is it required to perform the --record-only merge, then? > > Or would it be OK to import the new release into the vendor branch > and then svn copy that version completely (including the tests and > other files that I had omitted in the initial import) to contrib? > > I expect the svn copy without prior svn merge --record-only to > result in the same repository state after the conversion to Git, > but I do not really know ... You can do a --record-only merge now, and then use 'svn merge' to merge in the new version via the normal workflow. -- John Baldwin From owner-svn-src-all@freebsd.org Mon Jun 29 21:35:51 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0DC94355DF7; Mon, 29 Jun 2020 21:35:51 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wglV6fyvz4SlW; Mon, 29 Jun 2020 21:35:50 +0000 (UTC) (envelope-from gallatin@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 C7EE4DE1A; Mon, 29 Jun 2020 21:35:50 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05TLZoAL034399; Mon, 29 Jun 2020 21:35:50 GMT (envelope-from gallatin@FreeBSD.org) Received: (from gallatin@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05TLZo2d034398; Mon, 29 Jun 2020 21:35:50 GMT (envelope-from gallatin@FreeBSD.org) Message-Id: <202006292135.05TLZo2d034398@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gallatin set sender to gallatin@FreeBSD.org using -f From: Andrew Gallatin Date: Mon, 29 Jun 2020 21:35:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362789 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: gallatin X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 362789 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 21:35:51 -0000 Author: gallatin Date: Mon Jun 29 21:35:50 2020 New Revision: 362789 URL: https://svnweb.freebsd.org/changeset/base/362789 Log: Fix a panic when unloading firmware LIST_FOREACH_SAFE() is not safe in the presence of other threads removing list entries when a mutex is released. This is not in the critical path, so just restart the scan each time we drop the lock, rather than using a marker. Reviewed by: jhb, markj Sponsored by: Netflix Modified: head/sys/kern/subr_firmware.c Modified: head/sys/kern/subr_firmware.c ============================================================================== --- head/sys/kern/subr_firmware.c Mon Jun 29 19:30:35 2020 (r362788) +++ head/sys/kern/subr_firmware.c Mon Jun 29 21:35:50 2020 (r362789) @@ -394,14 +394,12 @@ EVENTHANDLER_DEFINE(mountroot, firmware_mountroot, NUL static void unloadentry(void *unused1, int unused2) { - struct priv_fw *fp, *tmp; + struct priv_fw *fp; int err; - bool changed; mtx_lock(&firmware_mtx); - changed = false; restart: - LIST_FOREACH_SAFE(fp, &firmware_table, link, tmp) { + LIST_FOREACH(fp, &firmware_table, link) { if (fp->file == NULL || fp->refcnt != 0 || (fp->flags & FW_UNLOAD) == 0) continue; @@ -412,7 +410,6 @@ restart: * 2. clear FW_UNLOAD so we don't try this entry again. * 3. release the lock while trying to unload the module. */ - changed = true; fp->flags &= ~FW_UNLOAD; /* do not try again */ /* @@ -422,9 +419,11 @@ restart: mtx_unlock(&firmware_mtx); err = linker_release_module(NULL, NULL, fp->file); mtx_lock(&firmware_mtx); - } - if (changed) { - changed = false; + + /* + * When we dropped the lock, another thread could have + * removed an element, so we must restart the scan. + */ goto restart; } mtx_unlock(&firmware_mtx); From owner-svn-src-all@freebsd.org Mon Jun 29 22:12:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1104C356F61; Mon, 29 Jun 2020 22:12:24 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49whYg6fPVz4WKJ; Mon, 29 Jun 2020 22:12:23 +0000 (UTC) (envelope-from asomers@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 C862CE802; Mon, 29 Jun 2020 22:12:23 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05TMCNU8058761; Mon, 29 Jun 2020 22:12:23 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05TMCNYx058759; Mon, 29 Jun 2020 22:12:23 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <202006292212.05TMCNYx058759@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Mon, 29 Jun 2020 22:12:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362790 - in head: sbin/savecore share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in head: sbin/savecore share/man/man5 X-SVN-Commit-Revision: 362790 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 22:12:24 -0000 Author: asomers Date: Mon Jun 29 22:12:23 2020 New Revision: 362790 URL: https://svnweb.freebsd.org/changeset/base/362790 Log: savecore: accept device names without the /dev/ prefix dumpon has accepted device names without the prefix ever since r291207. Since dumpon and savecore are always paired, they ought to accept the same arguments. Prior to this change, specifying 'dumpdev="da3"' in /etc/rc.conf, for example, would result in dumpon working just fine but savecore complaining that "Dump device does not exist". PR: 247618 Reviewed by: cem, bcr MFC after: 2 weeks Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D25500 Modified: head/sbin/savecore/savecore.c head/share/man/man5/rc.conf.5 Modified: head/sbin/savecore/savecore.c ============================================================================== --- head/sbin/savecore/savecore.c Mon Jun 29 21:35:50 2020 (r362789) +++ head/sbin/savecore/savecore.c Mon Jun 29 22:12:23 2020 (r362790) @@ -973,7 +973,45 @@ closefd: close(fddev); } +/* Prepend "/dev/" to any arguments that don't already have it */ static char ** +devify(int argc, char **argv) +{ + char **devs; + int i, l; + + devs = malloc(argc * sizeof(*argv)); + if (devs == NULL) { + logmsg(LOG_ERR, "malloc(): %m"); + exit(1); + } + for (i = 0; i < argc; i++) { + if (strncmp(argv[i], _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0) + devs[i] = strdup(argv[i]); + else { + char *fullpath; + + fullpath = malloc(PATH_MAX); + if (fullpath == NULL) { + logmsg(LOG_ERR, "malloc(): %m"); + exit(1); + } + l = snprintf(fullpath, PATH_MAX, "%s%s", _PATH_DEV, + argv[i]); + if (l < 0) { + logmsg(LOG_ERR, "snprintf(): %m"); + exit(1); + } else if (l >= PATH_MAX) { + logmsg(LOG_ERR, "device name too long"); + exit(1); + } + devs[i] = fullpath; + } + } + return (devs); +} + +static char ** enum_dumpdevs(int *argcp) { struct fstab *fsp; @@ -1069,6 +1107,7 @@ main(int argc, char **argv) { cap_rights_t rights; const char *savedir; + char **devs; int i, ch, error, savedirfd; checkfor = compress = clear = force = keep = verbose = 0; @@ -1132,7 +1171,9 @@ main(int argc, char **argv) argv++; } if (argc == 0) - argv = enum_dumpdevs(&argc); + devs = enum_dumpdevs(&argc); + else + devs = devify(argc, argv); savedirfd = open(savedir, O_RDONLY | O_DIRECTORY); if (savedirfd < 0) { @@ -1148,10 +1189,10 @@ main(int argc, char **argv) } /* Enter capability mode. */ - init_caps(argc, argv); + init_caps(argc, devs); for (i = 0; i < argc; i++) - DoFile(savedir, savedirfd, argv[i]); + DoFile(savedir, savedirfd, devs[i]); /* Emit minimal output. */ if (nfound == 0) { Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Mon Jun 29 21:35:50 2020 (r362789) +++ head/share/man/man5/rc.conf.5 Mon Jun 29 22:12:23 2020 (r362790) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 23, 2020 +.Dd June 28, 2020 .Dt RC.CONF 5 .Os .Sh NAME @@ -3469,7 +3469,9 @@ the first suitable swap device listed in .Pa /etc/fstab will be used as dump device. Otherwise, the value of this variable is passed as the argument to -.Xr dumpon 8 . +.Xr dumpon 8 +and +.Xr savecore 8 . To disable crash dumps, set this variable to .Dq Li NO . .It Va dumpon_flags From owner-svn-src-all@freebsd.org Mon Jun 29 22:21:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AE053356FCE; Mon, 29 Jun 2020 22:21:16 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49whlw40CJz4Wlr; Mon, 29 Jun 2020 22:21:16 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from [192.168.0.5] (unknown [181.52.72.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: pfg) by smtp.freebsd.org (Postfix) with ESMTPSA id B68B81A96B; Mon, 29 Jun 2020 22:21:15 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Subject: Re: svn commit: r362681 - in head: contrib/bc contrib/bc/gen contrib/bc/include contrib/bc/locales contrib/bc/manuals contrib/bc/src contrib/bc/src/bc contrib/bc/src/dc contrib/bc/src/history contrib/b... To: =?UTF-8?Q?Stefan_E=c3=9fer?= , Ed Maste , John Baldwin Cc: Eric van Gyzen , src-committers , svn-src-all , svn-src-head References: <202006271202.05RC22oR085945@repo.freebsd.org> <2b7f0d0f-e243-9c9c-f1c0-e700e0bf6d48@FreeBSD.org> <577b1bd1-598a-d3f9-3c23-537b9747612a@vangyzen.net> <8670f956-1ed4-2b87-ee64-d04bc37d6810@freebsd.org> From: Pedro Giffuni Organization: FreeBSD Message-ID: <0307b190-136c-59d1-bbde-976e6b181868@FreeBSD.org> Date: Mon, 29 Jun 2020 17:21:13 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jun 2020 22:21:16 -0000 On 29/06/2020 16:11, Stefan Eßer wrote: > Am 29.06.20 um 20:09 schrieb Ed Maste: >> On Mon, 29 Jun 2020 at 11:27, John Baldwin wrote: >>> I suspect just doing the 'merge --record-only' is the simplest method >>> assuming Git handles it ok. I suspect since Git ignores mergeinfo this >>> is fine, but it would be good for Ed to confirm. You can always restore >>> the tests in the future in contrib/bc when you want to add them. >> I think a --record-only merge is the best approach; in any case we >> have a number of these in the tree already and Git will have to deal >> with them. > Thank you for this advice. > > There is a new version, which differs only in the man-pages. These > used to mention optional features (of which only NLS support is > actually optional in the version built on FreeBSD, all other are > always compiled in, and I had mentioned to the author that this > might irritate FreeBSD users). FWIW, since it was rewritten it would have been actually nice to have it in modern C++. > I have suggested to the author to add SPDX BSD-2-Clause tags, which > would change a large fraction of the currently committed files. We only use the SPDX tags for internal software. For stuff from contrib it is not necessary. > > Is it required to perform the --record-only merge, then? Since you are going to bring it through the vendor area you should keep the merge information yes. > Or would it be OK to import the new release into the vendor branch > and then svn copy that version completely (including the tests and > other files that I had omitted in the initial import) to contrib? > > I expect the svn copy without prior svn merge --record-only to > result in the same repository state after the conversion to Git, > but I do not really know ... It is likely git won't care. cheers, Pedro. From owner-svn-src-all@freebsd.org Tue Jun 30 00:11:33 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2E01D359196; Tue, 30 Jun 2020 00:11:33 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oo1-f68.google.com (mail-oo1-f68.google.com [209.85.161.68]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wlC83Rcyz4cw1; Tue, 30 Jun 2020 00:11:32 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oo1-f68.google.com with SMTP id c4so228724oou.6; Mon, 29 Jun 2020 17:11:32 -0700 (PDT) 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=yqk1f22U/vatzVGSxSzkVo6fVwY3l789/x7F7fQe98M=; b=ekoPO0eOLB6qLg/unVTbD263yeW15Wp3PNNq4b2E1ef+dJ8PuMnhAEqzAWDQqoc1FC y7VCk+hnu7elP5lcQaOd60K99UeO/Rwz7lxlLlqHyWVk+JauV+uePv4vNCnvn1jN2XH8 qsgVdIN1wZifk1dD63Irf+xEfQE/iHj4h7DSqjgxJ+ijZePuROxEhDj8Fcf85HEr2uWI idsMkQnHPCFdp0Q2hw4l52c82HtiMCIamRVdsaSc+0ut1B+y1OEVtDjEQnwxxZeJ9Tbx xc01y/HliYWV7abfroXweMmN+9fL/heynan/C/898c/WGJ1q3L4BCm5oBPLieJew7QCk 7/kg== X-Gm-Message-State: AOAM532V8joL+q9f4trwMgLMTGDw19l7AVATycO+Asx4bA5OTfdSh9hV M4S6M4hyloT0fukvN64un74YB0iDeFdcUrjcmWhXZU1/ X-Google-Smtp-Source: ABdhPJxcXZdix7Yy4yvZsEek0bKPdiWQQAxqzw0aUrM/3tlkpzLHCch7EPsxIwgpEGprHhiJGP+ulrFIVEtXL1Or0gU= X-Received: by 2002:a4a:b181:: with SMTP id c1mr4514111ooo.74.1593475890765; Mon, 29 Jun 2020 17:11:30 -0700 (PDT) MIME-Version: 1.0 References: <201901021709.x02H9ZPM004185@repo.freebsd.org> <20200629005538.GB7202@raichu> In-Reply-To: <20200629005538.GB7202@raichu> From: Alan Somers Date: Mon, 29 Jun 2020 18:11:19 -0600 Message-ID: Subject: Re: svn commit: r342699 - head/sbin/savecore To: Mark Johnston Cc: src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 49wlC83Rcyz4cw1 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 00:11:33 -0000 On Sun, Jun 28, 2020 at 6:55 PM Mark Johnston wrote: > On Sun, Jun 28, 2020 at 06:40:59PM -0600, Alan Somers wrote: > > On Wed, Jan 2, 2019 at 10:09 AM Mark Johnston wrote: > > > > > Author: markj > > > Date: Wed Jan 2 17:09:35 2019 > > > New Revision: 342699 > > > URL: https://svnweb.freebsd.org/changeset/base/342699 > > > > > > Log: > > > Capsicumize savecore(8). > > > > > > - Use cap_fileargs(3) to open dump devices after entering capability > > > mode, and use cap_syslog(3) to log messages. > > > - Use a relative directory fd to open output files. > > > - Use zdopen(3) to compress kernel dumps in capability mode. > > > > > > Reviewed by: cem, oshogbo > > > MFC after: 2 months > > > Sponsored by: The FreeBSD Foundation > > > Differential Revision: https://reviews.freebsd.org/D18458 > > > > > > Modified: > > > head/sbin/savecore/Makefile > > > head/sbin/savecore/savecore.c > > > > > > Modified: head/sbin/savecore/savecore.c > > > > > > > ============================================================================== > > > --- head/sbin/savecore/savecore.c Wed Jan 2 16:42:07 2019 > > > (r342698) > > > +++ head/sbin/savecore/savecore.c Wed Jan 2 17:09:35 2019 > > > (r342699) > > > > > > +static char ** > > > +enum_dumpdevs(int *argcp) > > > +{ > > > + struct fstab *fsp; > > > + char **argv; > > > + int argc, n; > > > + > > > + /* > > > + * We cannot use getfsent(3) in capability mode, so we must > > > + * scan /etc/fstab and build up a list of candidate devices > > > + * before proceeding. > > > + */ > > > + argc = 0; > > > + n = 8; > > > + argv = malloc(n * sizeof(*argv)); > > > > > > > It looks like the memory allocated here > > > > > > > + if (argv == NULL) { > > > + logmsg(LOG_ERR, "malloc(): %m"); > > > + exit(1); > > > + } > > > + for (;;) { > > > + fsp = getfsent(); > > > + if (fsp == NULL) > > > + break; > > > + if (strcmp(fsp->fs_vfstype, "swap") != 0 && > > > + strcmp(fsp->fs_vfstype, "dump") != 0) > > > + continue; > > > + if (argc >= n) { > > > + n *= 2; > > > + argv = realloc(argv, n * sizeof(*argv)); > > > > > > > and here > > > > > > > + if (argv == NULL) { > > > + logmsg(LOG_ERR, "realloc(): %m"); > > > + exit(1); > > > + } > > > + } > > > + argv[argc] = strdup(fsp->fs_spec); > > > > > > > and here is leaked. I can't find any corresponding free. However, > neither > > Valgrind nor Coverity complains. What am I missing? Does this memory > > sneakily get freed by a subroutine somewhere, or does Capsicum confuse > our > > tools? > > I'm not sure why Capsicum would change anything. It would be worth > testing devel/valgrind-devel with https://reviews.freebsd.org/D25452 > applied, to see if it's able to detect that bug. > Using that new valgrind-devel did not find the leaks. However, it _did_ print a helpful error message explaining why Capsicum interferes. Commenting out caph_enter_casper allowed valgrind to find the leaks. It also found two more than I didn't know about. Thanks for the tip. https://www.valgrind.org/docs/manual/manual-core-adv.html#manual-core-adv.clientreq -Alan From owner-svn-src-all@freebsd.org Tue Jun 30 06:14:34 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E542F35F94E; Tue, 30 Jun 2020 06:14:34 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wvG25mh8z3xZh; Tue, 30 Jun 2020 06:14:34 +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 AA209139FB; Tue, 30 Jun 2020 06:14:34 +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 05U6EYqD056375; Tue, 30 Jun 2020 06:14:34 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05U6EYES056374; Tue, 30 Jun 2020 06:14:34 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <202006300614.05U6EYES056374@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Tue, 30 Jun 2020 06:14:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362791 - head/release/tools X-SVN-Group: head X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: head/release/tools X-SVN-Commit-Revision: 362791 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 06:14:35 -0000 Author: cperciva Date: Tue Jun 30 06:14:34 2020 New Revision: 362791 URL: https://svnweb.freebsd.org/changeset/base/362791 Log: Make EC2 AMIs use portsnap and freebsd-update mirrors hosted in AWS This adjusts freebsd-update.conf and portsnap.conf files in EC2 AMIs to point at the new AWS-hosted mirror network. Approved by: re (delphij) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D25498 Modified: head/release/tools/ec2.conf Modified: head/release/tools/ec2.conf ============================================================================== --- head/release/tools/ec2.conf Mon Jun 29 22:12:23 2020 (r362790) +++ head/release/tools/ec2.conf Tue Jun 30 06:14:34 2020 (r362791) @@ -108,6 +108,12 @@ vm_extra_pre_umount() { 's/^#ChallengeResponseAuthentication yes/ChallengeResponseAuthentication no/' \ ${DESTDIR}/etc/ssh/sshd_config + # Use FreeBSD Update and Portsnap mirrors hosted in AWS + sed -i '' -e 's/update.FreeBSD.org/aws.update.FreeBSD.org/' \ + ${DESTDIR}/etc/freebsd-update.conf + sed -i '' -e 's/portsnap.FreeBSD.org/aws.portsnap.FreeBSD.org/' \ + ${DESTDIR}/etc/portsnap.conf + # Use the NTP service provided by Amazon sed -i '' -e 's/^pool/#pool/' \ -e '1,/^#server/s/^#server.*/server 169.254.169.123 iburst/' \ From owner-svn-src-all@freebsd.org Tue Jun 30 07:30:31 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 49F0E360F7C; Tue, 30 Jun 2020 07:30:31 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49wwxf6ZfHz42C0; Tue, 30 Jun 2020 07:30:30 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [178.17.145.105]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id DE5F82602DF; Tue, 30 Jun 2020 09:30:27 +0200 (CEST) Subject: Re: svn commit: r362781 - head/sys/compat/linuxkpi/common/include/linux To: Ian Lepore , Warner Losh , Ravi Pokala Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006291308.05TD8eTP014019@repo.freebsd.org> <24a300c54e94be8e6915c588a25a641ca0620200.camel@freebsd.org> From: Hans Petter Selasky Message-ID: <5516059a-0168-f1cd-742e-bb7d7a108f67@selasky.org> Date: Tue, 30 Jun 2020 09:30:06 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <24a300c54e94be8e6915c588a25a641ca0620200.camel@freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49wwxf6ZfHz42C0 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 07:30:31 -0000 On 2020-06-29 22:32, Ian Lepore wrote: > On Mon, 2020-06-29 at 14:26 -0600, Warner Losh wrote: >> On Mon, Jun 29, 2020, 2:15 PM Ravi Pokala >> wrote: >> >>> -----Original Message----- >>> From: on behalf of Hans Petter >>> Selasky >>> >>> Date: 2020-06-29, Monday at 06:08 >>> To: , , < >>> svn-src-head@freebsd.org> >>> Subject: svn commit: r362781 - >>> head/sys/compat/linuxkpi/common/include/linux >>> >>> Author: hselasky >>> Date: Mon Jun 29 13:08:40 2020 >>> New Revision: 362781 >>> URL: https://svnweb.freebsd.org/changeset/base/362781 >>> >>> Log: >>> Implement is_signed(), type_max() and type_min() function >>> macros in >>> the >>> LinuxKPI. >>> >>> MFC after: 1 week >>> Sponsored by: Mellanox Technologies >>> >>> Modified: >>> head/sys/compat/linuxkpi/common/include/linux/kernel.h >>> >>> Modified: >>> head/sys/compat/linuxkpi/common/include/linux/kernel.h >>> >>> =================================================================== >>> =========== >>> --- head/sys/compat/linuxkpi/common/include/linux/kernel.h Mon >>> Jun 29 >>> 12:59:09 2020 (r362780) >>> +++ head/sys/compat/linuxkpi/common/include/linux/kernel.h Mon >>> Jun 29 >>> 13:08:40 2020 (r362781) >>> @@ -564,4 +564,20 @@ linux_ratelimited(linux_ratelimit_t *rl) >>> #define __is_constexpr(x) \ >>> __builtin_constant_p(x) >>> >>> Hi Hans, >>> >>> +#define is_signed(x) (((x)-1 / (x)2) == (x)0) >>> >>> It took me several reads to understand this, until I figured out >>> that 'x' >>> is not a variable, it's the name of a *type*. >>> >>> If 'x' is a variable, then '(x)-1' is subtraction, but '(x)2' and >>> '(x)0' >>> are nonsensical. >>> >>> If 'x' is a *type*, then '(x)-1' is typecasting '-1', and similarly >>> for >>> '(x)2' and '(x)0'. >>> >>> So, perhaps a comment, or a better name for 'x'? >>> >> >> I had similar thoughts. Maybe 't' instead? >> > > Or maybe since there's no one-character restriction on macro variable > names, something actually descriptive like 'datatype'. > > -- Ian > >> Warner >> >> Thanks, >>> >>> Ravi (rpokala@) >>> Thanks for the feedback. I'll have a look at using a more descriptive name there for the macro argument. --HPS From owner-svn-src-all@freebsd.org Tue Jun 30 08:41:34 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B23B7362ADF; Tue, 30 Jun 2020 08:41:34 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49wyWf4Kl0z46MZ; Tue, 30 Jun 2020 08:41:34 +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 55AEA157A3; Tue, 30 Jun 2020 08:41:34 +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 05U8fYxT044990; Tue, 30 Jun 2020 08:41:34 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05U8fYMe044989; Tue, 30 Jun 2020 08:41:34 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202006300841.05U8fYMe044989@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 30 Jun 2020 08:41:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362794 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/include/linux X-SVN-Commit-Revision: 362794 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 08:41:34 -0000 Author: hselasky Date: Tue Jun 30 08:41:33 2020 New Revision: 362794 URL: https://svnweb.freebsd.org/changeset/base/362794 Log: Document the is_signed(), type_max() and type_min() function macros in the LinuxKPI. Try to make the function argument more readable. Suggested by: several MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/kernel.h Modified: head/sys/compat/linuxkpi/common/include/linux/kernel.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/kernel.h Tue Jun 30 07:37:24 2020 (r362793) +++ head/sys/compat/linuxkpi/common/include/linux/kernel.h Tue Jun 30 08:41:33 2020 (r362794) @@ -564,20 +564,33 @@ linux_ratelimited(linux_ratelimit_t *rl) #define __is_constexpr(x) \ __builtin_constant_p(x) -#define is_signed(x) (((x)-1 / (x)2) == (x)0) +/* + * The is_signed() macro below returns true if the passed data type is + * signed. Else false is returned. + */ +#define is_signed(datatype) (((datatype)-1 / (datatype)2) == (datatype)0) -#define type_max(x) ( \ - (sizeof(x) >= 8) ? (is_signed(x) ? INT64_MAX : UINT64_MAX) : \ - (sizeof(x) >= 4) ? (is_signed(x) ? INT32_MAX : UINT32_MAX) : \ - (sizeof(x) >= 2) ? (is_signed(x) ? INT16_MAX : UINT16_MAX) : \ - (is_signed(x) ? INT8_MAX : UINT8_MAX) \ +/* + * The type_max() macro below returns the maxium positive value the + * passed data type can hold. + */ +#define type_max(datatype) ( \ + (sizeof(datatype) >= 8) ? (is_signed(datatype) ? INT64_MAX : UINT64_MAX) : \ + (sizeof(datatype) >= 4) ? (is_signed(datatype) ? INT32_MAX : UINT32_MAX) : \ + (sizeof(datatype) >= 2) ? (is_signed(datatype) ? INT16_MAX : UINT16_MAX) : \ + (is_signed(datatype) ? INT8_MAX : UINT8_MAX) \ ) -#define type_min(x) ( \ - (sizeof(x) >= 8) ? (is_signed(x) ? INT64_MIN : 0) : \ - (sizeof(x) >= 4) ? (is_signed(x) ? INT32_MIN : 0) : \ - (sizeof(x) >= 2) ? (is_signed(x) ? INT16_MIN : 0) : \ - (is_signed(x) ? INT8_MIN : 0) \ +/* + * The type_min() macro below returns the minimum value the passed + * data type can hold. For unsigned types the minimum value is always + * zero. For signed types it may vary. + */ +#define type_min(datatype) ( \ + (sizeof(datatype) >= 8) ? (is_signed(datatype) ? INT64_MIN : 0) : \ + (sizeof(datatype) >= 4) ? (is_signed(datatype) ? INT32_MIN : 0) : \ + (sizeof(datatype) >= 2) ? (is_signed(datatype) ? INT16_MIN : 0) : \ + (is_signed(datatype) ? INT8_MIN : 0) \ ) #endif /* _LINUX_KERNEL_H_ */ From owner-svn-src-all@freebsd.org Tue Jun 30 11:46:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0A910366745; Tue, 30 Jun 2020 11:46:41 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49x2dD6bnyz4Hx7; Tue, 30 Jun 2020 11:46:40 +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 C2D41174FF; Tue, 30 Jun 2020 11:46:40 +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 05UBkeXm062457; Tue, 30 Jun 2020 11:46:40 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05UBkejd062456; Tue, 30 Jun 2020 11:46:40 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202006301146.05UBkejd062456@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, 30 Jun 2020 11:46:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362795 - stable/12/usr.sbin/service X-SVN-Group: stable-12 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/12/usr.sbin/service X-SVN-Commit-Revision: 362795 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 11:46:41 -0000 Author: 0mp (doc,ports committer) Date: Tue Jun 30 11:46:40 2020 New Revision: 362795 URL: https://svnweb.freebsd.org/changeset/base/362795 Log: MFC 362538: Fix a typo and sort options Modified: stable/12/usr.sbin/service/service.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/service/service.8 ============================================================================== --- stable/12/usr.sbin/service/service.8 Tue Jun 30 08:41:33 2020 (r362794) +++ stable/12/usr.sbin/service/service.8 Tue Jun 30 11:46:40 2020 (r362795) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 31, 2018 +.Dd June 23, 2020 .Dt SERVICE 8 .Os .Sh NAME @@ -92,14 +92,14 @@ this is usually .Pa /usr/local/etc/rc.d . All files will be listed whether they are an actual rc.d script or not. +.It Fl R +Restart all enabled local services. .It Fl r Generate the .Xr rcorder 8 as in .Fl e above, but list all of the files, not just what is enabled. -.It Fl R -Restart all enabled local services. .It Fl v Be slightly more verbose. .El @@ -129,7 +129,7 @@ service -j dns named status service -rv .Ed .Pp -The following programmable completion entry can be use in +The following programmable completion entry can be used in .Xr bash 1 for the names of the rc.d scripts: .Bd -literal -offset -ident From owner-svn-src-all@freebsd.org Tue Jun 30 11:47:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A8307366C01; Tue, 30 Jun 2020 11:47:18 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49x2dy405Nz4J0G; Tue, 30 Jun 2020 11:47:18 +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 6BC7F17455; Tue, 30 Jun 2020 11:47:18 +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 05UBlI3o062537; Tue, 30 Jun 2020 11:47:18 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05UBlI4a062536; Tue, 30 Jun 2020 11:47:18 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202006301147.05UBlI4a062536@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, 30 Jun 2020 11:47:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362796 - stable/11/usr.sbin/service X-SVN-Group: stable-11 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/11/usr.sbin/service X-SVN-Commit-Revision: 362796 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 11:47:18 -0000 Author: 0mp (doc,ports committer) Date: Tue Jun 30 11:47:18 2020 New Revision: 362796 URL: https://svnweb.freebsd.org/changeset/base/362796 Log: MFC 362538: Fix a typo and sort options Modified: stable/11/usr.sbin/service/service.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/service/service.8 ============================================================================== --- stable/11/usr.sbin/service/service.8 Tue Jun 30 11:46:40 2020 (r362795) +++ stable/11/usr.sbin/service/service.8 Tue Jun 30 11:47:18 2020 (r362796) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 31, 2018 +.Dd June 23, 2020 .Dt SERVICE 8 .Os .Sh NAME @@ -92,14 +92,14 @@ this is usually .Pa /usr/local/etc/rc.d . All files will be listed whether they are an actual rc.d script or not. +.It Fl R +Restart all enabled local services. .It Fl r Generate the .Xr rcorder 8 as in .Fl e above, but list all of the files, not just what is enabled. -.It Fl R -Restart all enabled local services. .It Fl v Be slightly more verbose. .El @@ -129,7 +129,7 @@ service -j dns named status service -rv .Ed .Pp -The following programmable completion entry can be use in +The following programmable completion entry can be used in .Xr bash 1 for the names of the rc.d scripts: .Bd -literal -offset -ident From owner-svn-src-all@freebsd.org Tue Jun 30 11:50:53 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 78A8C366A57; Tue, 30 Jun 2020 11:50: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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49x2k52YHDz4JRx; Tue, 30 Jun 2020 11:50:53 +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 3C215178D4; Tue, 30 Jun 2020 11:50:53 +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 05UBornk063471; Tue, 30 Jun 2020 11:50:53 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05UBoq2q063470; Tue, 30 Jun 2020 11:50:52 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202006301150.05UBoq2q063470@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, 30 Jun 2020 11:50:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362797 - stable/12/share/man/man4 X-SVN-Group: stable-12 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/12/share/man/man4 X-SVN-Commit-Revision: 362797 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 11:50:53 -0000 Author: 0mp (doc,ports committer) Date: Tue Jun 30 11:50:52 2020 New Revision: 362797 URL: https://svnweb.freebsd.org/changeset/base/362797 Log: MFC 362684, 362675: ixl.4: Use a -bullet list instead of -item Now the list looks like a list. Using -item only makes sense if the list is meant to be a list of terms and definitions. Fix a typo, use Lk for links and use HTTPS where applicable Modified: stable/12/share/man/man4/ixl.4 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/ixl.4 ============================================================================== --- stable/12/share/man/man4/ixl.4 Tue Jun 30 11:47:18 2020 (r362796) +++ stable/12/share/man/man4/ixl.4 Tue Jun 30 11:50:52 2020 (r362797) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 30, 2019 +.Dd June 27, 2020 .Dt IXL 4 .Os .Sh NAME @@ -76,7 +76,7 @@ tag insertion/extraction, VLAN checksum offload, VLAN Receive Side Steering (RSS), all for both IPv4 and IPv6. For further hardware information and questions related to hardware requirements, see -.Pa http://support.intel.com/ . +.Lk http://support.intel.com/ . .Pp Support for Jumbo Frames is provided via the interface MTU setting. Selecting an MTU larger than 1500 bytes with the @@ -94,9 +94,9 @@ For more information on configuring this device, see There are additional tools available from Intel to help configure and update the adapters covered by this driver. These tools can be downloaded directly from Intel at -.Pa downloadcenter.intel.com , +.Lk https://downloadcenter.intel.com , by searching for their names, or by installing certain packages: -.Bl -item +.Bl -bullet .It To change the behavior of the QSFP+ ports on XL710 adapters, use the Intel QCU (QSFP+ configuration utility); installed by the @@ -263,7 +263,7 @@ with the -S option. .Sh SUPPORT For general information and support, go to the Intel support website at: -.Pa http://support.intel.com/ . +.Lk http://support.intel.com/ . .Pp If an issue is identified with this driver with a supported adapter, email all the specific information related to the issue to @@ -271,6 +271,7 @@ email all the specific information related to the issu .Sh SEE ALSO .Xr arp 4 , .Xr iavf 4 , +.Xr iflib 4 , .Xr netintro 4 , .Xr vlan 4 , .Xr ifconfig 8 , From owner-svn-src-all@freebsd.org Tue Jun 30 14:56:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 41D1834D0F1 for ; Tue, 30 Jun 2020 14:56:37 +0000 (UTC) (envelope-from noreply@pros.njediffusion.com) Received: from pros.njediffusion.com (pros.njediffusion.com [185.41.30.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49x6rJ3zHJz4Vvc for ; Tue, 30 Jun 2020 14:56:30 +0000 (UTC) (envelope-from noreply@pros.njediffusion.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=com20.nje-diffusion.fr; q=dns/txt; s=mail; bh=8BSXYOzfRYknPmXP8nmsjXwf2wB4Qeg1XQfTOSLRvwA=; h=from:reply-to:subject:date:mime-version:content-type:list-id:list-unsubscribe:x-csa-complaints:list-unsubscribe-post; b=lCINeO0ycBiwAtmjGnTzlUq7fdJjDTIvMRV11CHyGoVZ8hUlglVtqOTg7QrivDBtiRPWGmWdcz9N v9qc4rRgrwy0UwB6yXZKd+7W9mRdvFRUEpaTUilDsgreO08XTQ3zJALKmVID4UbuXs6yc1+y/CC9 5Rxc5v6HFR3UYB6aaGI= To: Subject: =?utf-8?q?Fichiers_d'entreprises_en_t=C3=A9l=C3=A9chargement_imm=C3=A9dia?= =?utf-8?q?t?= Date: Tue, 30 Jun 2020 14:45:28 +0000 Feedback-ID: 185.41.30.236:19012_1575:19012:Sendinblue From: Fichier-entreprises List-Unsubscribe-Post: List-Unsubscribe=One-Click MIME-Version: 1.0 Message-Id: <202030061445.b03dwaow1qwg1nj@pros.njediffusion.com> Precedence: bulk Reply-To: dif.10v1@com20.nje-diffusion.fr X-Csa-Complaints: whitelist-complaints@eco.de X-Mailer: Sendinblue X-Mailin-Campaign: 1575 X-Mailin-Client: 19012 X-sib-id: hmGXVVBY8-065Vyw5kAhXQo2idpUyPFutqRQXmO8EOtnev1EGlue-r9hF3dS2OatUQ0jH9F8tiF84hu4nUKwn1LPJU0jCZNYUtqnuRzWYhGrODm3eZT_-W2_lAOXbnABvZvN7yFzpd_5jSPthr08KZDGbA9k7EVyWRSZXmDHuBBrfZzK X-Rspamd-Queue-Id: 49x6rJ3zHJz4Vvc X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=com20.nje-diffusion.fr header.s=mail header.b=lCINeO0y; dmarc=pass (policy=none) header.from=com20.nje-diffusion.fr; spf=pass (mx1.freebsd.org: domain of noreply@pros.njediffusion.com designates 185.41.30.236 as permitted sender) smtp.mailfrom=noreply@pros.njediffusion.com X-Spamd-Result: default: False [3.42 / 15.00]; HAS_REPLYTO(0.00)[dif.10v1@com20.nje-diffusion.fr]; XM_UA_NO_VERSION(0.01)[]; ZERO_FONT(1.00)[13]; R_SPF_ALLOW(-0.20)[+ip4:185.41.28.0/22]; REPLYTO_ADDR_EQ_FROM(0.00)[]; TO_DN_NONE(0.00)[]; URI_COUNT_ODD(1.00)[11]; DKIM_TRACE(0.00)[com20.nje-diffusion.fr:+]; DMARC_POLICY_ALLOW(-0.50)[com20.nje-diffusion.fr,none]; NEURAL_HAM_SHORT(-0.27)[-0.275]; FORGED_SENDER(0.30)[dif.10v1@com20.nje-diffusion.fr,noreply@pros.njediffusion.com]; RCVD_COUNT_ZERO(0.00)[0]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:200484, ipnet:185.41.28.0/22, country:FR]; FROM_NEQ_ENVFROM(0.00)[dif.10v1@com20.nje-diffusion.fr,noreply@pros.njediffusion.com]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[com20.nje-diffusion.fr:s=mail]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; PRECEDENCE_BULK(0.00)[]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; HTML_SHORT_LINK_IMG_1(2.00)[]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-0.91)[-0.906]; MANY_INVISIBLE_PARTS(1.00)[10]; NEURAL_SPAM_MEDIUM(0.30)[0.304]; GREYLIST(0.00)[pass,body] Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 14:56:37 -0000 [DEFAULT_HEADER][ ]( http://r.pros.njediffusion.com/mk/cl/f/OdYhtTgPrku3ne= 2_XX_l7O4NkWC5KpUix_qyx7ZFjNP6BGahVv8iMjfUxWgXs9F0zjE5a5XPA6pA1sE2D25K8uOk8= 2q8p2-DxZp2r0XL_jzMF61rvrqf_4PpGUPFpL8YieGPc9gRG-jgctr3KbjVit_UI3OXnzFLdecw= INeZhD8KJTHCdg ) Nos conseillers vous r=C3=A9pondent du lundi au vendredi de 9h00 =C3=A0 19h= 00 01 86 95 05 95 ACHAT DE FICHIERS D'ENTREPRISES T=C3=89L=C3=89CHARGEMENT IMM=C3=89DIAT 24h/24 et 7j/7 Composez et t=C3=A9l=C3=A9chargez imm=C3=A9diatement votre fichier email en= treprises en quelques clics ! [ ]( http://r.pros.njediffusion.com/mk/cl/f/Pkbe4MkMOoJQwLWQA3CdYc3x4ACSvJ= p3qrenEOaskkv39s2uAQsJCCimtU6W_VkE_k03wYxK95y6TVOz6ag8UXjGwdn1rzNetjTU9Yghj= OW7p7xFPsIGImwBK2XDqrUGni7j7nLh2l3DbkujZ7B1gBWXfbGzfsIOWdMcfiFjA0ConhTKZQ ) Commandez vos fichiers de prospection e-mail B2B Obtenez imm=C3=A9diatement le nombre de contacts disponibles ainsi que le p= rix de votre fichier En conformit=C3=A9 avec le RGPD Fichier livr=C3=A9 en t=C3=A9l=C3=A9chargement au format Excel (.xls) T=C3=89L=C3=89CHARGEMENT IMM=C3=89DIAT 24h/24 & 7j/7 [ ]( http://r.pros.njediffusion.com/mk/cl/f/Mjsb6i_990NzDUCD1wj_3P9KNzd8OA= tIpnvJX-rLVot4pmwxNd5Jw_B6dWo731HyXbevzMfncKrKmUbCV5lrspjETp9lF7Y7voWwfFgs1= NFTQ7I_Mxegui0ceiX7cogN78vTOvxXt9dW2pJGz0IZq2e_tfK5Sg1zL2EcPkj-zDX2_rzP4g ) COMPOSEZ VOTRE FICHIER SUR-MESURE [ ]( http://r.pros.njediffusion.com/mk/cl/f/SfN7MKgmudKB3Zh7s28Qnf8Kp3YK7h= -TFf6OBbD8VTVr32yRIilMPUVpMAkiKcE-zgM64o5vxIxhkUu_leAfpuDjFM6PmMaZX7-81GVdg= QwCctVcGObenNt_1JQ3JAoUdMscJcrhYlQEMH69S6-pf05j14uHeiqSP_ouEhqsLn5u-rL0cA ) Ciblez les entreprises gr=C3=A2ce =C3=A0 nos nombreux crit=C3=A8res de s=C3= =A9lection - G=C3=A9olocalisation - Secteurs d'activit=C3=A9s - Effectifs - Chiffre d'affaire - Forme juridique [ ]( http://r.pros.njediffusion.com/mk/cl/f/Saxy6ENBj6efuVbTwz4Fs3NKuWGEyl= gmEMqxKMhXmRWwt1Ipv-heaaJWc6Oj1uIBPGpay96s_Mr8bs8HsCTNbIoRbVxpU8d0uzEe2NOb1= C7yWogN9vMTz_7XwizM5ahfSNkqwd3pL8c7mhXrF7n8kp3gcWirHaiNJ7yBBHJonUuYcSO3Qg ) =C2=A92019 fichier-entreprises.com =C2=A0[DEFAULT_FOOTER] From owner-svn-src-all@freebsd.org Tue Jun 30 15:53:53 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 21F0934EC48; Tue, 30 Jun 2020 15:53:53 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49x86T08Jyz4Z7b; Tue, 30 Jun 2020 15:53:53 +0000 (UTC) (envelope-from dim@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 DD7861AA8D; Tue, 30 Jun 2020 15:53:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05UFrqHT015924; Tue, 30 Jun 2020 15:53:52 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05UFrqHK015923; Tue, 30 Jun 2020 15:53:52 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202006301553.05UFrqHK015923@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 30 Jun 2020 15:53:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362800 - in stable: 10/lib/libkvm 11/lib/libkvm 12/lib/libkvm 7/lib/libkvm 8/lib/libkvm 9/lib/libkvm X-SVN-Group: stable-11 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/lib/libkvm 11/lib/libkvm 12/lib/libkvm 7/lib/libkvm 8/lib/libkvm 9/lib/libkvm X-SVN-Commit-Revision: 362800 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 15:53:53 -0000 Author: dim Date: Tue Jun 30 15:53:52 2020 New Revision: 362800 URL: https://svnweb.freebsd.org/changeset/base/362800 Log: MFC r362623: Fix copy/paste mistake in kvm_getswapinfo(3) It seems this manpage was copied from kvm_getloadavg(3), but the DIAGNOSTICS section was not updated completely. Update the section with correct information about a return value of -1. Modified: stable/11/lib/libkvm/kvm_getswapinfo.3 Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/lib/libkvm/kvm_getswapinfo.3 stable/12/lib/libkvm/kvm_getswapinfo.3 stable/7/lib/libkvm/kvm_getswapinfo.3 stable/8/lib/libkvm/kvm_getswapinfo.3 stable/9/lib/libkvm/kvm_getswapinfo.3 Directory Properties: stable/10/ (props changed) stable/12/ (props changed) stable/7/ (props changed) stable/7/lib/ (props changed) stable/7/lib/libkvm/ (props changed) stable/8/ (props changed) stable/8/lib/ (props changed) stable/8/lib/libkvm/ (props changed) stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libkvm/ (props changed) Modified: stable/11/lib/libkvm/kvm_getswapinfo.3 ============================================================================== --- stable/11/lib/libkvm/kvm_getswapinfo.3 Tue Jun 30 15:47:11 2020 (r362799) +++ stable/11/lib/libkvm/kvm_getswapinfo.3 Tue Jun 30 15:53:52 2020 (r362800) @@ -101,8 +101,8 @@ You may call the function with .Dv NULL to clear the cache. .Sh DIAGNOSTICS -If the load average was unobtainable, \-1 is returned; otherwise, -the number of swap devices actually retrieved is returned. +If the swap summary information was unobtainable, \-1 is returned; +otherwise, the number of swap devices actually retrieved is returned. .Pp If the name of the swap device does not fit in the static char buffer in the structure, it is truncated. From owner-svn-src-all@freebsd.org Tue Jun 30 15:53:54 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 232A034F080; Tue, 30 Jun 2020 15:53:54 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49x86V0CVFz4Z1P; Tue, 30 Jun 2020 15:53:54 +0000 (UTC) (envelope-from dim@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 DDCE11AB08; Tue, 30 Jun 2020 15:53:53 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05UFrrU8015942; Tue, 30 Jun 2020 15:53:53 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05UFrred015941; Tue, 30 Jun 2020 15:53:53 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202006301553.05UFrred015941@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 30 Jun 2020 15:53:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r362800 - in stable: 10/lib/libkvm 11/lib/libkvm 12/lib/libkvm 7/lib/libkvm 8/lib/libkvm 9/lib/libkvm X-SVN-Group: stable-10 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/lib/libkvm 11/lib/libkvm 12/lib/libkvm 7/lib/libkvm 8/lib/libkvm 9/lib/libkvm X-SVN-Commit-Revision: 362800 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 15:53:54 -0000 Author: dim Date: Tue Jun 30 15:53:52 2020 New Revision: 362800 URL: https://svnweb.freebsd.org/changeset/base/362800 Log: MFC r362623: Fix copy/paste mistake in kvm_getswapinfo(3) It seems this manpage was copied from kvm_getloadavg(3), but the DIAGNOSTICS section was not updated completely. Update the section with correct information about a return value of -1. Modified: stable/10/lib/libkvm/kvm_getswapinfo.3 Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/lib/libkvm/kvm_getswapinfo.3 stable/12/lib/libkvm/kvm_getswapinfo.3 stable/7/lib/libkvm/kvm_getswapinfo.3 stable/8/lib/libkvm/kvm_getswapinfo.3 stable/9/lib/libkvm/kvm_getswapinfo.3 Directory Properties: stable/11/ (props changed) stable/12/ (props changed) stable/7/ (props changed) stable/7/lib/ (props changed) stable/7/lib/libkvm/ (props changed) stable/8/ (props changed) stable/8/lib/ (props changed) stable/8/lib/libkvm/ (props changed) stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libkvm/ (props changed) Modified: stable/10/lib/libkvm/kvm_getswapinfo.3 ============================================================================== --- stable/10/lib/libkvm/kvm_getswapinfo.3 Tue Jun 30 15:47:11 2020 (r362799) +++ stable/10/lib/libkvm/kvm_getswapinfo.3 Tue Jun 30 15:53:52 2020 (r362800) @@ -101,8 +101,8 @@ You may call the function with .Dv NULL to clear the cache. .Sh DIAGNOSTICS -If the load average was unobtainable, \-1 is returned; otherwise, -the number of swap devices actually retrieved is returned. +If the swap summary information was unobtainable, \-1 is returned; +otherwise, the number of swap devices actually retrieved is returned. .Pp If the name of the swap device does not fit in the static char buffer in the structure, it is truncated. From owner-svn-src-all@freebsd.org Tue Jun 30 15:53:54 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BE1E634F01F; Tue, 30 Jun 2020 15:53:54 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49x86V36Zxz4Z04; Tue, 30 Jun 2020 15:53:54 +0000 (UTC) (envelope-from dim@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 316B21AA17; Tue, 30 Jun 2020 15:53:54 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05UFrsM8015948; Tue, 30 Jun 2020 15:53:54 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05UFrs1o015947; Tue, 30 Jun 2020 15:53:54 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202006301553.05UFrs1o015947@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 30 Jun 2020 15:53:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r362800 - in stable: 10/lib/libkvm 11/lib/libkvm 12/lib/libkvm 7/lib/libkvm 8/lib/libkvm 9/lib/libkvm X-SVN-Group: stable-9 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/lib/libkvm 11/lib/libkvm 12/lib/libkvm 7/lib/libkvm 8/lib/libkvm 9/lib/libkvm X-SVN-Commit-Revision: 362800 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 15:54:00 -0000 Author: dim Date: Tue Jun 30 15:53:52 2020 New Revision: 362800 URL: https://svnweb.freebsd.org/changeset/base/362800 Log: MFC r362623: Fix copy/paste mistake in kvm_getswapinfo(3) It seems this manpage was copied from kvm_getloadavg(3), but the DIAGNOSTICS section was not updated completely. Update the section with correct information about a return value of -1. Modified: stable/9/lib/libkvm/kvm_getswapinfo.3 Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libkvm/ (props changed) Changes in other areas also in this revision: Modified: stable/10/lib/libkvm/kvm_getswapinfo.3 stable/11/lib/libkvm/kvm_getswapinfo.3 stable/12/lib/libkvm/kvm_getswapinfo.3 stable/7/lib/libkvm/kvm_getswapinfo.3 stable/8/lib/libkvm/kvm_getswapinfo.3 Directory Properties: stable/10/ (props changed) stable/11/ (props changed) stable/12/ (props changed) stable/7/ (props changed) stable/7/lib/ (props changed) stable/7/lib/libkvm/ (props changed) stable/8/ (props changed) stable/8/lib/ (props changed) stable/8/lib/libkvm/ (props changed) Modified: stable/9/lib/libkvm/kvm_getswapinfo.3 ============================================================================== --- stable/9/lib/libkvm/kvm_getswapinfo.3 Tue Jun 30 15:47:11 2020 (r362799) +++ stable/9/lib/libkvm/kvm_getswapinfo.3 Tue Jun 30 15:53:52 2020 (r362800) @@ -101,8 +101,8 @@ You may call the function with .Dv NULL to clear the cache. .Sh DIAGNOSTICS -If the load average was unobtainable, \-1 is returned; otherwise, -the number of swap devices actually retrieved is returned. +If the swap summary information was unobtainable, \-1 is returned; +otherwise, the number of swap devices actually retrieved is returned. .Pp If the name of the swap device does not fit in the static char buffer in the structure, it is truncated. From owner-svn-src-all@freebsd.org Tue Jun 30 15:53:53 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BD5E734ECD6; Tue, 30 Jun 2020 15:53:53 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49x86T4jPqz4Z03; Tue, 30 Jun 2020 15:53:53 +0000 (UTC) (envelope-from dim@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 83F5B1A678; Tue, 30 Jun 2020 15:53:53 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05UFrrDl015936; Tue, 30 Jun 2020 15:53:53 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05UFrrsi015935; Tue, 30 Jun 2020 15:53:53 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202006301553.05UFrrsi015935@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 30 Jun 2020 15:53:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r362800 - in stable: 10/lib/libkvm 11/lib/libkvm 12/lib/libkvm 7/lib/libkvm 8/lib/libkvm 9/lib/libkvm X-SVN-Group: stable-8 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/lib/libkvm 11/lib/libkvm 12/lib/libkvm 7/lib/libkvm 8/lib/libkvm 9/lib/libkvm X-SVN-Commit-Revision: 362800 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 15:53:53 -0000 Author: dim Date: Tue Jun 30 15:53:52 2020 New Revision: 362800 URL: https://svnweb.freebsd.org/changeset/base/362800 Log: MFC r362623: Fix copy/paste mistake in kvm_getswapinfo(3) It seems this manpage was copied from kvm_getloadavg(3), but the DIAGNOSTICS section was not updated completely. Update the section with correct information about a return value of -1. Modified: stable/8/lib/libkvm/kvm_getswapinfo.3 Directory Properties: stable/8/ (props changed) stable/8/lib/ (props changed) stable/8/lib/libkvm/ (props changed) Changes in other areas also in this revision: Modified: stable/10/lib/libkvm/kvm_getswapinfo.3 stable/11/lib/libkvm/kvm_getswapinfo.3 stable/12/lib/libkvm/kvm_getswapinfo.3 stable/7/lib/libkvm/kvm_getswapinfo.3 stable/9/lib/libkvm/kvm_getswapinfo.3 Directory Properties: stable/10/ (props changed) stable/11/ (props changed) stable/12/ (props changed) stable/7/ (props changed) stable/7/lib/ (props changed) stable/7/lib/libkvm/ (props changed) stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libkvm/ (props changed) Modified: stable/8/lib/libkvm/kvm_getswapinfo.3 ============================================================================== --- stable/8/lib/libkvm/kvm_getswapinfo.3 Tue Jun 30 15:47:11 2020 (r362799) +++ stable/8/lib/libkvm/kvm_getswapinfo.3 Tue Jun 30 15:53:52 2020 (r362800) @@ -101,8 +101,8 @@ You may call the function with .Dv NULL to clear the cache. .Sh DIAGNOSTICS -If the load average was unobtainable, \-1 is returned; otherwise, -the number of swap devices actually retrieved is returned. +If the swap summary information was unobtainable, \-1 is returned; +otherwise, the number of swap devices actually retrieved is returned. .Pp If the name of the swap device does not fit in the static char buffer in the structure, it is truncated. From owner-svn-src-all@freebsd.org Tue Jun 30 15:53:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E3FB034ECD4; Tue, 30 Jun 2020 15:53:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49x86S5lMFz4Z01; Tue, 30 Jun 2020 15:53:52 +0000 (UTC) (envelope-from dim@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 A96E11A9CF; Tue, 30 Jun 2020 15:53:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05UFrqNF015918; Tue, 30 Jun 2020 15:53:52 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05UFrq5Z015917; Tue, 30 Jun 2020 15:53:52 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202006301553.05UFrq5Z015917@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 30 Jun 2020 15:53:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362800 - in stable: 10/lib/libkvm 11/lib/libkvm 12/lib/libkvm 7/lib/libkvm 8/lib/libkvm 9/lib/libkvm X-SVN-Group: stable-12 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/lib/libkvm 11/lib/libkvm 12/lib/libkvm 7/lib/libkvm 8/lib/libkvm 9/lib/libkvm X-SVN-Commit-Revision: 362800 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 15:53:53 -0000 Author: dim Date: Tue Jun 30 15:53:52 2020 New Revision: 362800 URL: https://svnweb.freebsd.org/changeset/base/362800 Log: MFC r362623: Fix copy/paste mistake in kvm_getswapinfo(3) It seems this manpage was copied from kvm_getloadavg(3), but the DIAGNOSTICS section was not updated completely. Update the section with correct information about a return value of -1. Modified: stable/12/lib/libkvm/kvm_getswapinfo.3 Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/10/lib/libkvm/kvm_getswapinfo.3 stable/11/lib/libkvm/kvm_getswapinfo.3 stable/7/lib/libkvm/kvm_getswapinfo.3 stable/8/lib/libkvm/kvm_getswapinfo.3 stable/9/lib/libkvm/kvm_getswapinfo.3 Directory Properties: stable/10/ (props changed) stable/11/ (props changed) stable/7/ (props changed) stable/7/lib/ (props changed) stable/7/lib/libkvm/ (props changed) stable/8/ (props changed) stable/8/lib/ (props changed) stable/8/lib/libkvm/ (props changed) stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libkvm/ (props changed) Modified: stable/12/lib/libkvm/kvm_getswapinfo.3 ============================================================================== --- stable/12/lib/libkvm/kvm_getswapinfo.3 Tue Jun 30 15:47:11 2020 (r362799) +++ stable/12/lib/libkvm/kvm_getswapinfo.3 Tue Jun 30 15:53:52 2020 (r362800) @@ -101,8 +101,8 @@ You may call the function with .Dv NULL to clear the cache. .Sh DIAGNOSTICS -If the load average was unobtainable, \-1 is returned; otherwise, -the number of swap devices actually retrieved is returned. +If the swap summary information was unobtainable, \-1 is returned; +otherwise, the number of swap devices actually retrieved is returned. .Pp If the name of the swap device does not fit in the static char buffer in the structure, it is truncated. From owner-svn-src-all@freebsd.org Tue Jun 30 15:53:53 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6D42D34EE96; Tue, 30 Jun 2020 15:53:53 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49x86T2NLyz4ZDv; Tue, 30 Jun 2020 15:53:53 +0000 (UTC) (envelope-from dim@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 35FA41A677; Tue, 30 Jun 2020 15:53:53 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05UFrrqK015930; Tue, 30 Jun 2020 15:53:53 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05UFrrF7015929; Tue, 30 Jun 2020 15:53:53 GMT (envelope-from dim@FreeBSD.org) Message-Id: <202006301553.05UFrrF7015929@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 30 Jun 2020 15:53:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r362800 - in stable: 10/lib/libkvm 11/lib/libkvm 12/lib/libkvm 7/lib/libkvm 8/lib/libkvm 9/lib/libkvm X-SVN-Group: stable-7 X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in stable: 10/lib/libkvm 11/lib/libkvm 12/lib/libkvm 7/lib/libkvm 8/lib/libkvm 9/lib/libkvm X-SVN-Commit-Revision: 362800 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 15:53:53 -0000 Author: dim Date: Tue Jun 30 15:53:52 2020 New Revision: 362800 URL: https://svnweb.freebsd.org/changeset/base/362800 Log: MFC r362623: Fix copy/paste mistake in kvm_getswapinfo(3) It seems this manpage was copied from kvm_getloadavg(3), but the DIAGNOSTICS section was not updated completely. Update the section with correct information about a return value of -1. Modified: stable/7/lib/libkvm/kvm_getswapinfo.3 Directory Properties: stable/7/ (props changed) stable/7/lib/ (props changed) stable/7/lib/libkvm/ (props changed) Changes in other areas also in this revision: Modified: stable/10/lib/libkvm/kvm_getswapinfo.3 stable/11/lib/libkvm/kvm_getswapinfo.3 stable/12/lib/libkvm/kvm_getswapinfo.3 stable/8/lib/libkvm/kvm_getswapinfo.3 stable/9/lib/libkvm/kvm_getswapinfo.3 Directory Properties: stable/10/ (props changed) stable/11/ (props changed) stable/12/ (props changed) stable/8/ (props changed) stable/8/lib/ (props changed) stable/8/lib/libkvm/ (props changed) stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libkvm/ (props changed) Modified: stable/7/lib/libkvm/kvm_getswapinfo.3 ============================================================================== --- stable/7/lib/libkvm/kvm_getswapinfo.3 Tue Jun 30 15:47:11 2020 (r362799) +++ stable/7/lib/libkvm/kvm_getswapinfo.3 Tue Jun 30 15:53:52 2020 (r362800) @@ -101,8 +101,8 @@ You may call the function with .Dv NULL to clear the cache. .Sh DIAGNOSTICS -If the load average was unobtainable, \-1 is returned; otherwise, -the number of swap devices actually retrieved is returned. +If the swap summary information was unobtainable, \-1 is returned; +otherwise, the number of swap devices actually retrieved is returned. .Pp If the name of the swap device does not fit in the static char buffer in the structure, it is truncated. From owner-svn-src-all@freebsd.org Tue Jun 30 15:56:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D06C434EFFC; Tue, 30 Jun 2020 15:56:55 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49x89z5B6Wz4Zm9; Tue, 30 Jun 2020 15:56:55 +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 920591A3E3; Tue, 30 Jun 2020 15:56:55 +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 05UFutR5016164; Tue, 30 Jun 2020 15:56:55 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05UFutOK016162; Tue, 30 Jun 2020 15:56:55 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202006301556.05UFutOK016162@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 30 Jun 2020 15:56:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362801 - head/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/opencrypto X-SVN-Commit-Revision: 362801 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 15:56:55 -0000 Author: markj Date: Tue Jun 30 15:56:54 2020 New Revision: 362801 URL: https://svnweb.freebsd.org/changeset/base/362801 Log: Remove CRYPTO_TIMING. It was added a very long time ago. It is single-threaded, so only really useful for basic measurements, and in the meantime we've gotten some more sophisticated profiling tools. Reviewed by: cem, delphij, jhb Sponsored by: Rubicon Communications, LLC (Netgate) Differential Revision: https://reviews.freebsd.org/D25464 Modified: head/sys/opencrypto/crypto.c head/sys/opencrypto/cryptodev.h Modified: head/sys/opencrypto/crypto.c ============================================================================== --- head/sys/opencrypto/crypto.c Tue Jun 30 15:53:52 2020 (r362800) +++ head/sys/opencrypto/crypto.c Tue Jun 30 15:56:54 2020 (r362801) @@ -54,8 +54,6 @@ __FBSDID("$FreeBSD$"); * PURPOSE. */ -#define CRYPTO_TIMING /* enable timing support */ - #include "opt_compat.h" #include "opt_ddb.h" @@ -238,12 +236,6 @@ static struct cryptostats cryptostats; SYSCTL_STRUCT(_kern_crypto, OID_AUTO, stats, CTLFLAG_RW, &cryptostats, cryptostats, "Crypto system statistics"); -#ifdef CRYPTO_TIMING -static int crypto_timing = 0; -SYSCTL_INT(_debug, OID_AUTO, crypto_timing, CTLFLAG_RW, - &crypto_timing, 0, "Enable/disable crypto timing support"); -#endif - /* Try to avoid directly exposing the key buffer as a symbol */ static struct keybuf *keybuf; @@ -1409,11 +1401,6 @@ crypto_dispatch(struct cryptop *crp) cryptostats.cs_ops++; -#ifdef CRYPTO_TIMING - if (crypto_timing) - binuptime(&crp->crp_tstamp); -#endif - crp->crp_retw_id = ((uintptr_t)crp->crp_session) % crypto_workers_num; if (CRYPTOP_ASYNC(crp)) { @@ -1647,33 +1634,7 @@ crypto_kinvoke(struct cryptkop *krp) return (0); } -#ifdef CRYPTO_TIMING static void -crypto_tstat(struct cryptotstat *ts, struct bintime *bt) -{ - struct bintime now, delta; - struct timespec t; - uint64_t u; - - binuptime(&now); - u = now.frac; - delta.frac = now.frac - bt->frac; - delta.sec = now.sec - bt->sec; - if (u < delta.frac) - delta.sec--; - bintime2timespec(&delta, &t); - timespecadd(&ts->acc, &t, &ts->acc); - if (timespeccmp(&t, &ts->min, <)) - ts->min = t; - if (timespeccmp(&t, &ts->max, >)) - ts->max = t; - ts->count++; - - *bt = now; -} -#endif - -static void crypto_task_invoke(void *ctx, int pending) { struct cryptocap *cap; @@ -1700,10 +1661,6 @@ crypto_invoke(struct cryptocap *cap, struct cryptop *c KASSERT(crp->crp_session != NULL, ("%s: crp->crp_session == NULL", __func__)); -#ifdef CRYPTO_TIMING - if (crypto_timing) - crypto_tstat(&cryptostats.cs_invoke, &crp->crp_tstamp); -#endif if (cap->cc_flags & CRYPTOCAP_F_CLEANUP) { struct crypto_session_params csp; crypto_session_t nses; @@ -1811,10 +1768,7 @@ crypto_done(struct cryptop *crp) crp->crp_flags |= CRYPTO_F_DONE; if (crp->crp_etype != 0) cryptostats.cs_errs++; -#ifdef CRYPTO_TIMING - if (crypto_timing) - crypto_tstat(&cryptostats.cs_done, &crp->crp_tstamp); -#endif + /* * CBIMM means unconditionally do the callback immediately; * CBIFSYNC means do the callback immediately only if the @@ -1831,20 +1785,7 @@ crypto_done(struct cryptop *crp) * callback routine does very little (e.g. the * /dev/crypto callback method just does a wakeup). */ -#ifdef CRYPTO_TIMING - if (crypto_timing) { - /* - * NB: We must copy the timestamp before - * doing the callback as the cryptop is - * likely to be reclaimed. - */ - struct bintime t = crp->crp_tstamp; - crypto_tstat(&cryptostats.cs_cb, &t); - crp->crp_callback(crp); - crypto_tstat(&cryptostats.cs_finis, &t); - } else -#endif - crp->crp_callback(crp); + crp->crp_callback(crp); } else { struct crypto_ret_worker *ret_worker; bool wake; @@ -2144,22 +2085,8 @@ crypto_ret_proc(struct crypto_ret_worker *ret_worker) /* * Run callbacks unlocked. */ - if (crpt != NULL) { -#ifdef CRYPTO_TIMING - if (crypto_timing) { - /* - * NB: We must copy the timestamp before - * doing the callback as the cryptop is - * likely to be reclaimed. - */ - struct bintime t = crpt->crp_tstamp; - crypto_tstat(&cryptostats.cs_cb, &t); - crpt->crp_callback(crpt); - crypto_tstat(&cryptostats.cs_finis, &t); - } else -#endif - crpt->crp_callback(crpt); - } + if (crpt != NULL) + crpt->crp_callback(crpt); if (krpt != NULL) krpt->krp_callback(krpt); CRYPTO_RETW_LOCK(ret_worker); Modified: head/sys/opencrypto/cryptodev.h ============================================================================== --- head/sys/opencrypto/cryptodev.h Tue Jun 30 15:53:52 2020 (r362800) +++ head/sys/opencrypto/cryptodev.h Tue Jun 30 15:56:54 2020 (r362801) @@ -326,13 +326,6 @@ struct crypt_kop { #define CIOCFINDDEV _IOWR('c', 108, struct crypt_find_op) #define CIOCCRYPTAEAD _IOWR('c', 109, struct crypt_aead) -struct cryptotstat { - struct timespec acc; /* total accumulated time */ - struct timespec min; /* min time */ - struct timespec max; /* max time */ - u_int32_t count; /* number of observations */ -}; - struct cryptostats { u_int32_t cs_ops; /* symmetric crypto ops submitted */ u_int32_t cs_errs; /* symmetric crypto ops that failed */ @@ -342,16 +335,6 @@ struct cryptostats { u_int32_t cs_rets; /* crypto return thread activations */ u_int32_t cs_blocks; /* symmetric op driver block */ u_int32_t cs_kblocks; /* symmetric op driver block */ - /* - * When CRYPTO_TIMING is defined at compile time and the - * sysctl debug.crypto is set to 1, the crypto system will - * accumulate statistics about how long it takes to process - * crypto requests at various points during processing. - */ - struct cryptotstat cs_invoke; /* crypto_dipsatch -> crypto_invoke */ - struct cryptotstat cs_done; /* crypto_invoke -> crypto_done */ - struct cryptotstat cs_cb; /* crypto_done -> callback */ - struct cryptotstat cs_finis; /* callback -> callback return */ }; #ifdef _KERNEL From owner-svn-src-all@freebsd.org Tue Jun 30 15:57:12 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 41E7934F0E7; Tue, 30 Jun 2020 15:57:12 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49x8BJ0qCtz4ZvH; Tue, 30 Jun 2020 15:57:12 +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 00C201A9D7; Tue, 30 Jun 2020 15:57:12 +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 05UFvBLr016222; Tue, 30 Jun 2020 15:57:11 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05UFvBPT016221; Tue, 30 Jun 2020 15:57:11 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202006301557.05UFvBPT016221@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 30 Jun 2020 15:57:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362802 - head/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/opencrypto X-SVN-Commit-Revision: 362802 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 15:57:12 -0000 Author: markj Date: Tue Jun 30 15:57:11 2020 New Revision: 362802 URL: https://svnweb.freebsd.org/changeset/base/362802 Log: Remove unused 32-bit compatibility structures from cryptodev. The counters are exported by a sysctl and have the same width on all platforms anyway. Reviewed by: cem, delphij, jhb Sponsored by: Rubicon Communications, LLC (Netgate) Differential Revision: https://reviews.freebsd.org/D25465 Modified: head/sys/opencrypto/cryptodev.c Modified: head/sys/opencrypto/cryptodev.c ============================================================================== --- head/sys/opencrypto/cryptodev.c Tue Jun 30 15:56:54 2020 (r362801) +++ head/sys/opencrypto/cryptodev.c Tue Jun 30 15:57:11 2020 (r362802) @@ -117,28 +117,6 @@ struct crypt_kop32 { struct crparam32 crk_param[CRK_MAXPARAM]; }; -struct cryptotstat32 { - struct timespec32 acc; - struct timespec32 min; - struct timespec32 max; - u_int32_t count; -}; - -struct cryptostats32 { - u_int32_t cs_ops; - u_int32_t cs_errs; - u_int32_t cs_kops; - u_int32_t cs_kerrs; - u_int32_t cs_intrs; - u_int32_t cs_rets; - u_int32_t cs_blocks; - u_int32_t cs_kblocks; - struct cryptotstat32 cs_invoke; - struct cryptotstat32 cs_done; - struct cryptotstat32 cs_cb; - struct cryptotstat32 cs_finis; -}; - #define CIOCGSESSION32 _IOWR('c', 101, struct session_op32) #define CIOCCRYPT32 _IOWR('c', 103, struct crypt_op32) #define CIOCKEY32 _IOWR('c', 104, struct crypt_kop32) From owner-svn-src-all@freebsd.org Tue Jun 30 15:58:31 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5813434F4AA; Tue, 30 Jun 2020 15:58: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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49x8Cq0nVCz4bF9; Tue, 30 Jun 2020 15:58:31 +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 E42991A3E6; Tue, 30 Jun 2020 15:58: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 05UFwU9X016481; Tue, 30 Jun 2020 15:58:30 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05UFwTfJ016476; Tue, 30 Jun 2020 15:58:29 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202006301558.05UFwTfJ016476@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 30 Jun 2020 15:58:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362803 - in head/sys: conf dev/usb/controller mips/mediatek X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys: conf dev/usb/controller mips/mediatek X-SVN-Commit-Revision: 362803 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 15:58:31 -0000 Author: andrew Date: Tue Jun 30 15:58:29 2020 New Revision: 362803 URL: https://svnweb.freebsd.org/changeset/base/362803 Log: Add dwc_otg_acpi Create an acpi attachment for the DWC USB OTG device. This is present in the Raspberry Pi 4 in the USB-C port normally used to power the board. Some firmware presents the kernel with ACPI tables rather than FDT so we need an ACPI attachment. Submitted by: Greg V Approved by: hselasky (removal of All rights reserved) Differential Revision: https://reviews.freebsd.org/D25203 Added: head/sys/dev/usb/controller/dwc_otg_acpi.c (contents, props changed) Modified: head/sys/conf/files head/sys/dev/usb/controller/dwc_otg.c head/sys/dev/usb/controller/dwc_otg_fdt.c head/sys/mips/mediatek/mtk_dotg.c Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Jun 30 15:57:11 2020 (r362802) +++ head/sys/conf/files Tue Jun 30 15:58:29 2020 (r362803) @@ -3189,6 +3189,7 @@ dev/uart/uart_tty.c optional uart dev/usb/controller/musb_otg.c optional musb dev/usb/controller/dwc_otg.c optional dwcotg dev/usb/controller/dwc_otg_fdt.c optional dwcotg fdt +dev/usb/controller/dwc_otg_acpi.c optional dwcotg acpi dev/usb/controller/ehci.c optional ehci dev/usb/controller/ehci_msm.c optional ehci_msm fdt dev/usb/controller/ehci_pci.c optional ehci pci Modified: head/sys/dev/usb/controller/dwc_otg.c ============================================================================== --- head/sys/dev/usb/controller/dwc_otg.c Tue Jun 30 15:57:11 2020 (r362802) +++ head/sys/dev/usb/controller/dwc_otg.c Tue Jun 30 15:58:29 2020 (r362803) @@ -66,6 +66,7 @@ #include #include #include +#include #include #include @@ -3873,12 +3874,40 @@ int dwc_otg_init(struct dwc_otg_softc *sc) { uint32_t temp; + int err; DPRINTF("start\n"); + sc->sc_io_tag = rman_get_bustag(sc->sc_io_res); + sc->sc_io_hdl = rman_get_bushandle(sc->sc_io_res); + sc->sc_io_size = rman_get_size(sc->sc_io_res); + /* set up the bus structure */ + sc->sc_bus.devices = sc->sc_devices; + sc->sc_bus.devices_max = DWC_OTG_MAX_DEVICES; + sc->sc_bus.dma_bits = 32; sc->sc_bus.usbrev = USB_REV_2_0; sc->sc_bus.methods = &dwc_otg_bus_methods; + + /* get all DMA memory */ + if (usb_bus_mem_alloc_all(&sc->sc_bus, + USB_GET_DMA_TAG(sc->sc_bus.parent), NULL)) { + return (ENOMEM); + } + + sc->sc_bus.bdev = device_add_child(sc->sc_bus.parent, "usbus", -1); + if (sc->sc_bus.bdev == NULL) + return (ENXIO); + + device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus); + + err = bus_setup_intr(sc->sc_bus.parent, sc->sc_irq_res, + INTR_TYPE_TTY | INTR_MPSAFE, &dwc_otg_filter_interrupt, + &dwc_otg_interrupt, sc, &sc->sc_intr_hdl); + if (err) { + sc->sc_intr_hdl = NULL; + return (ENXIO); + } usb_callout_init_mtx(&sc->sc_timer, &sc->sc_bus.bus_mtx, 0); Added: head/sys/dev/usb/controller/dwc_otg_acpi.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/usb/controller/dwc_otg_acpi.c Tue Jun 30 15:58:29 2020 (r362803) @@ -0,0 +1,184 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2012 Hans Petter Selasky. + * + * 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 "opt_acpi.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include + +static device_probe_t dwc_otg_probe; +static device_attach_t dwc_otg_attach; +static device_attach_t dwc_otg_detach; + +static char *dwc_otg_ids[] = { + "BCM2848", + NULL +}; + +static int +dwc_otg_probe(device_t dev) +{ + int rv; + + if (acpi_disabled("dwc_otg")) + return (ENXIO); + + rv = ACPI_ID_PROBE(device_get_parent(dev), dev, dwc_otg_ids, NULL); + if (rv > 0) + return (rv); + + device_set_desc(dev, "DWC OTG 2.0 integrated USB controller"); + + return (BUS_PROBE_DEFAULT); +} + +static int +dwc_otg_attach(device_t dev) +{ + struct dwc_otg_softc *sc = device_get_softc(dev); + int err; + int rid; + + sc->sc_bus.parent = dev; + + /* assume device mode (this is only used for the Raspberry Pi 4's + * USB-C port, which only works in device mode) */ + sc->sc_mode = DWC_MODE_DEVICE; + + rid = 0; + sc->sc_io_res = + bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); + + if (sc->sc_io_res == NULL) + goto error; + + rid = 0; + sc->sc_irq_res = + bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); + if (sc->sc_irq_res == NULL) + goto error; + + err = dwc_otg_init(sc); + if (err == 0) { + err = device_probe_and_attach(sc->sc_bus.bdev); + } + if (err) + goto error; + + return (0); + +error: + dwc_otg_detach(dev); + return (ENXIO); +} + +static int +dwc_otg_detach(device_t dev) +{ + struct dwc_otg_softc *sc = device_get_softc(dev); + + /* during module unload there are lots of children leftover */ + device_delete_children(dev); + + if (sc->sc_irq_res && sc->sc_intr_hdl) { + /* + * only call dwc_otg_uninit() after dwc_otg_init() + */ + dwc_otg_uninit(sc); + + bus_teardown_intr(dev, sc->sc_irq_res, + sc->sc_intr_hdl); + sc->sc_intr_hdl = NULL; + } + /* free IRQ channel, if any */ + if (sc->sc_irq_res) { + bus_release_resource(dev, SYS_RES_IRQ, 0, + sc->sc_irq_res); + sc->sc_irq_res = NULL; + } + /* free memory resource, if any */ + if (sc->sc_io_res) { + bus_release_resource(dev, SYS_RES_MEMORY, 0, + sc->sc_io_res); + sc->sc_io_res = NULL; + } + usb_bus_mem_free_all(&sc->sc_bus, NULL); + + return (0); +} + +static device_method_t dwc_otg_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, dwc_otg_probe), + DEVMETHOD(device_attach, dwc_otg_attach), + DEVMETHOD(device_detach, dwc_otg_detach), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + + DEVMETHOD_END +}; + +static driver_t dwc_otg_driver = { + .name = "dwcotg", + .methods = dwc_otg_methods, + .size = sizeof(struct dwc_otg_softc), +}; + +static devclass_t dwc_otg_devclass; + +DRIVER_MODULE(dwcotg, acpi, dwc_otg_driver, dwc_otg_devclass, 0, 0); +MODULE_DEPEND(dwcotg, usb, 1, 1, 1); Modified: head/sys/dev/usb/controller/dwc_otg_fdt.c ============================================================================== --- head/sys/dev/usb/controller/dwc_otg_fdt.c Tue Jun 30 15:57:11 2020 (r362802) +++ head/sys/dev/usb/controller/dwc_otg_fdt.c Tue Jun 30 15:58:29 2020 (r362803) @@ -1,7 +1,7 @@ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * - * Copyright (c) 2012 Hans Petter Selasky. All rights reserved. + * Copyright (c) 2012 Hans Petter Selasky. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -102,11 +102,7 @@ dwc_otg_attach(device_t dev) int err; int rid; - /* initialise some bus fields */ sc->sc_otg.sc_bus.parent = dev; - sc->sc_otg.sc_bus.devices = sc->sc_otg.sc_devices; - sc->sc_otg.sc_bus.devices_max = DWC_OTG_MAX_DEVICES; - sc->sc_otg.sc_bus.dma_bits = 32; /* get USB mode, if any */ if (OF_getprop(ofw_bus_get_node(dev), "dr_mode", @@ -125,24 +121,13 @@ dwc_otg_attach(device_t dev) } } - /* get all DMA memory */ - if (usb_bus_mem_alloc_all(&sc->sc_otg.sc_bus, - USB_GET_DMA_TAG(dev), NULL)) { - return (ENOMEM); - } rid = 0; sc->sc_otg.sc_io_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); - if (!(sc->sc_otg.sc_io_res)) { - err = ENOMEM; + if (!(sc->sc_otg.sc_io_res)) goto error; - } - sc->sc_otg.sc_io_tag = rman_get_bustag(sc->sc_otg.sc_io_res); - sc->sc_otg.sc_io_hdl = rman_get_bushandle(sc->sc_otg.sc_io_res); - sc->sc_otg.sc_io_size = rman_get_size(sc->sc_otg.sc_io_res); - /* * brcm,bcm2708-usb FDT provides two interrupts, we need only the USB * interrupt (VC_USB). The latest FDT for it provides an @@ -163,21 +148,12 @@ dwc_otg_attach(device_t dev) if (sc->sc_otg.sc_bus.bdev == NULL) goto error; - device_set_ivars(sc->sc_otg.sc_bus.bdev, &sc->sc_otg.sc_bus); - - err = bus_setup_intr(dev, sc->sc_otg.sc_irq_res, INTR_TYPE_TTY | INTR_MPSAFE, - &dwc_otg_filter_interrupt, &dwc_otg_interrupt, sc, &sc->sc_otg.sc_intr_hdl); - if (err) { - sc->sc_otg.sc_intr_hdl = NULL; - goto error; - } err = dwc_otg_init(&sc->sc_otg); if (err == 0) { err = device_probe_and_attach(sc->sc_otg.sc_bus.bdev); } if (err) goto error; - return (0); Modified: head/sys/mips/mediatek/mtk_dotg.c ============================================================================== --- head/sys/mips/mediatek/mtk_dotg.c Tue Jun 30 15:57:11 2020 (r362802) +++ head/sys/mips/mediatek/mtk_dotg.c Tue Jun 30 15:58:29 2020 (r362803) @@ -96,16 +96,7 @@ dotg_fdt_attach(device_t dev) /* initialise some bus fields */ sc->sc_mode = DWC_MODE_HOST; sc->sc_bus.parent = dev; - sc->sc_bus.devices = sc->sc_devices; - sc->sc_bus.devices_max = DWC_OTG_MAX_DEVICES; - sc->sc_bus.dma_bits = 32; - /* get all DMA memory */ - if (usb_bus_mem_alloc_all(&sc->sc_bus, - USB_GET_DMA_TAG(dev), NULL)) { - printf("No mem\n"); - return (ENOMEM); - } rid = 0; sc->sc_io_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); @@ -113,9 +104,6 @@ dotg_fdt_attach(device_t dev) printf("Can`t alloc MEM\n"); goto error; } - sc->sc_io_tag = rman_get_bustag(sc->sc_io_res); - sc->sc_io_hdl = rman_get_bushandle(sc->sc_io_res); - sc->sc_io_size = rman_get_size(sc->sc_io_res); rid = 0; sc->sc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, @@ -131,15 +119,6 @@ dotg_fdt_attach(device_t dev) goto error; } device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus); - - err = bus_setup_intr(dev, sc->sc_irq_res, - INTR_TYPE_TTY | INTR_MPSAFE, dwc_otg_filter_interrupt, - dwc_otg_interrupt, sc, &sc->sc_intr_hdl); - if (err) { - sc->sc_intr_hdl = NULL; - printf("Can`t set IRQ handle\n"); - goto error; - } err = dwc_otg_init(sc); if (err) printf("dotg_init fail\n"); From owner-svn-src-all@freebsd.org Tue Jun 30 16:18:09 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EE54034F953; Tue, 30 Jun 2020 16:18:09 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49x8fT601Rz4cr3; Tue, 30 Jun 2020 16:18:09 +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 B0E591AAEB; Tue, 30 Jun 2020 16:18:09 +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 05UGI9Wv029467; Tue, 30 Jun 2020 16:18:09 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05UGI9xB029466; Tue, 30 Jun 2020 16:18:09 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202006301618.05UGI9xB029466@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 30 Jun 2020 16:18:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362804 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 362804 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 16:18:10 -0000 Author: trasz Date: Tue Jun 30 16:18:09 2020 New Revision: 362804 URL: https://svnweb.freebsd.org/changeset/base/362804 Log: Make linux(4) ignore SA_INTERRUPT. The zsh(1) binary from Bionic uses it. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25499 Modified: head/sys/compat/linux/linux_signal.c Modified: head/sys/compat/linux/linux_signal.c ============================================================================== --- head/sys/compat/linux/linux_signal.c Tue Jun 30 15:58:29 2020 (r362803) +++ head/sys/compat/linux/linux_signal.c Tue Jun 30 16:18:09 2020 (r362804) @@ -102,6 +102,10 @@ linux_to_bsd_sigaction(l_sigaction_t *lsa, struct siga flags &= ~LINUX_SA_RESTART; bsa->sa_flags |= SA_RESTART; } + if (lsa->lsa_flags & LINUX_SA_INTERRUPT) { + flags &= ~LINUX_SA_INTERRUPT; + /* Documented to be a "historical no-op". */ + } if (lsa->lsa_flags & LINUX_SA_ONESHOT) { flags &= ~LINUX_SA_ONESHOT; bsa->sa_flags |= SA_RESETHAND; From owner-svn-src-all@freebsd.org Tue Jun 30 16:23:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DCB6F34FB6B; Tue, 30 Jun 2020 16:23:52 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49x8n45N7vz4dBW; Tue, 30 Jun 2020 16:23: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 9B9DF1B018; Tue, 30 Jun 2020 16:23: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 05UGNqDK035220; Tue, 30 Jun 2020 16:23:52 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05UGNq1T035218; Tue, 30 Jun 2020 16:23:52 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202006301623.05UGNq1T035218@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, 30 Jun 2020 16:23:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362805 - in head/share/man: man5 man9 X-SVN-Group: head X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: in head/share/man: man5 man9 X-SVN-Commit-Revision: 362805 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 16:23:52 -0000 Author: 0mp (doc,ports committer) Date: Tue Jun 30 16:23:51 2020 New Revision: 362805 URL: https://svnweb.freebsd.org/changeset/base/362805 Log: Cross-reference style(9) and style.mdoc(5) Suggested by: yuripv MFC after: 3 days Modified: head/share/man/man5/style.mdoc.5 head/share/man/man9/style.9 Modified: head/share/man/man5/style.mdoc.5 ============================================================================== --- head/share/man/man5/style.mdoc.5 Tue Jun 30 16:18:09 2020 (r362804) +++ head/share/man/man5/style.mdoc.5 Tue Jun 30 16:23:51 2020 (r362805) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 10, 2019 +.Dd June 30, 2020 .Dt STYLE.MDOC 5 .Os .Sh NAME @@ -242,7 +242,8 @@ that would be rendered as: .Sh SEE ALSO .Xr man 1 , .Xr mandoc 1 , -.Xr mdoc 7 +.Xr mdoc 7 , +.Xr style 9 .Sh HISTORY This manual page first appeared in .Fx 13.0 . Modified: head/share/man/man9/style.9 ============================================================================== --- head/share/man/man9/style.9 Tue Jun 30 16:18:09 2020 (r362804) +++ head/share/man/man9/style.9 Tue Jun 30 16:23:51 2020 (r362805) @@ -25,7 +25,7 @@ .\" From: @(#)style 1.14 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd January 10, 2020 +.Dd June 30, 2020 .Dt STYLE 9 .Os .Sh NAME @@ -916,6 +916,7 @@ indentation rules. .Xr err 3 , .Xr warn 3 , .Xr style.Makefile 5 , +.Xr style.mdoc 5 , .Xr style.lua 9 .Sh HISTORY This manual page is largely based on the From owner-svn-src-all@freebsd.org Tue Jun 30 16:24:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3811534FD5A; Tue, 30 Jun 2020 16:24: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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49x8nn0jxgz4d6g; Tue, 30 Jun 2020 16:24:29 +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 F0ED51B08E; Tue, 30 Jun 2020 16:24: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 05UGOSWq035294; Tue, 30 Jun 2020 16:24:28 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05UGOS9F035293; Tue, 30 Jun 2020 16:24:28 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202006301624.05UGOS9F035293@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 30 Jun 2020 16:24:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362806 - head/sys/compat/linprocfs X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/compat/linprocfs X-SVN-Commit-Revision: 362806 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 16:24:29 -0000 Author: trasz Date: Tue Jun 30 16:24:28 2020 New Revision: 362806 URL: https://svnweb.freebsd.org/changeset/base/362806 Log: Make linprocfs(5) create the /proc//task/ directores. This is to silence down some Chromium assertions. PR: kern/240991 Analyzed by: Alex S MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25256 Modified: head/sys/compat/linprocfs/linprocfs.c Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Tue Jun 30 16:23:51 2020 (r362805) +++ head/sys/compat/linprocfs/linprocfs.c Tue Jun 30 16:24:28 2020 (r362806) @@ -1620,6 +1620,28 @@ out: } /* + * The point of the following two functions is to work around + * an assertion in Chromium; see kern/240991 for details. + */ +static int +linprocfs_dotaskattr(PFS_ATTR_ARGS) +{ + + vap->va_nlink = 3; + return (0); +} + +/* + * Filler function for proc//task/.dummy + */ +static int +linprocfs_dotaskdummy(PFS_FILL_ARGS) +{ + + return (0); +} + +/* * Filler function for proc/sys/kernel/random/uuid */ static int @@ -1758,6 +1780,11 @@ linprocfs_init(PFS_INIT_ARGS) pfs_create_file(dir, "auxv", &linprocfs_doauxv, NULL, &procfs_candebug, NULL, PFS_RD|PFS_RAWRD); pfs_create_file(dir, "limits", &linprocfs_doproclimits, + NULL, NULL, NULL, PFS_RD); + + /* /proc//task/... */ + dir = pfs_create_dir(dir, "task", linprocfs_dotaskattr, NULL, NULL, 0); + pfs_create_file(dir, ".dummy", &linprocfs_dotaskdummy, NULL, NULL, NULL, PFS_RD); /* /proc/scsi/... */ From owner-svn-src-all@freebsd.org Tue Jun 30 16:28:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3CD6A350301; Tue, 30 Jun 2020 16:28:41 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49x8tc3LVRz4dV6; Tue, 30 Jun 2020 16:28:40 +0000 (UTC) (envelope-from mpp302@gmail.com) Received: by mail-ed1-f49.google.com with SMTP id b15so16807796edy.7; Tue, 30 Jun 2020 09:28:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=OIveqn01hp3MZ8rH1Sl0c4FB/QT0VUAFsYZAIm2Zqo8=; b=W3ZIj29SaiP/B5F/98N3jkhXSuViAtkqrOzlcaT445u7wuWSnE+wnC6QkeeRSJEu0H wEfMMoPO6N3TqlREDph7T7xBJQ7k81NRHCVB7Wy/tkT8XCs0qiDJoPEj2f2yq3VkMoEu xabPoiavSh4QP+Y8UOqHc9Sy6FkVbXdp4mzYpti9bWnU63UumgQPjaSK7X1xMFlrpqRR fAD34LxPFEp+jqPh2TAkzwVyaM31mv8YNihkoOdsQu8rWUMssmCEGgGUWlHAGnkx7n49 GRXcmi3gu55/qJXNutuDV4PV3A5gtpGOPfvDxbwBadM9GAnJ62JmDVoK+MDkQOhJNRus 1K7g== X-Gm-Message-State: AOAM532IBi0yRr8z9Uw6vd9XhC+rlMLTJUIJnTnCv+ZzeL6pxOL7moYT q9EVGZs/64ZC8FOOAP70EAICy8Li X-Google-Smtp-Source: ABdhPJyvnlrZPC/SpNCj0qcrvBzXGi+u5nsJyzzldVYwGjy/qfMyfb5vCPGsfJX4ndmoeNRhI5B6Lg== X-Received: by 2002:a05:6402:22f0:: with SMTP id dn16mr24239488edb.83.1593534517538; Tue, 30 Jun 2020 09:28:37 -0700 (PDT) Received: from ?IPv6:2a02:8109:98c0:1bc0:5e5f:67ff:fef4:ffd8? ([2a02:8109:98c0:1bc0:5e5f:67ff:fef4:ffd8]) by smtp.gmail.com with ESMTPSA id v3sm3342816edj.89.2020.06.30.09.28.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Jun 2020 09:28:36 -0700 (PDT) Subject: Re: svn commit: r362806 - head/sys/compat/linprocfs To: Edward Tomasz Napierala , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006301624.05UGOS9F035293@repo.freebsd.org> From: Mateusz Piotrowski <0mp@FreeBSD.org> Message-ID: <526e3180-bc4a-b609-b601-80dfa6e3d918@FreeBSD.org> Date: Tue, 30 Jun 2020 18:28:29 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <202006301624.05UGOS9F035293@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Rspamd-Queue-Id: 49x8tc3LVRz4dV6 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of mpp302@gmail.com designates 209.85.208.49 as permitted sender) smtp.mailfrom=mpp302@gmail.com X-Spamd-Result: default: False [-1.80 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; ARC_NA(0.00)[]; DMARC_NA(0.00)[FreeBSD.org]; NEURAL_HAM_LONG(-0.99)[-0.994]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_MEDIUM(-0.90)[-0.899]; NEURAL_SPAM_SHORT(0.10)[0.097]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.49:from]; FORGED_SENDER(0.30)[0mp@FreeBSD.org,mpp302@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.49:from]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; RCVD_TLS_ALL(0.00)[]; FROM_NEQ_ENVFROM(0.00)[0mp@FreeBSD.org,mpp302@gmail.com] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 16:28:41 -0000 Hi, On 6/30/20 6:24 PM, Edward Tomasz Napierala wrote: > Author: trasz > Date: Tue Jun 30 16:24:28 2020 > New Revision: 362806 > URL: https://svnweb.freebsd.org/changeset/base/362806 > > Log: > Make linprocfs(5) create the /proc//task/ directores. > This is to silence down some Chromium assertions. > > PR: kern/240991 > Analyzed by: Alex S > MFC after: 2 weeks > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D25256 Hmm, could something similar be done to the following warning which is being printed when service fahclient is started (from the biology/linux-foldingathome port): 16:25:39:WARNING:Exception: Failed to open '/proc/bus/pci/devices': Failed to open '/proc/bus/pci/devices': No such file or directory: No such file or directory Cheers! Mateusz From owner-svn-src-all@freebsd.org Tue Jun 30 16:49:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EBD8A35056A; Tue, 30 Jun 2020 16:49:43 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49x9Lv5vRNz4fqy; Tue, 30 Jun 2020 16:49:43 +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 ADDE11B581; Tue, 30 Jun 2020 16:49:43 +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 05UGnhha048282; Tue, 30 Jun 2020 16:49:43 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05UGnhMV048281; Tue, 30 Jun 2020 16:49:43 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202006301649.05UGnhMV048281@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 30 Jun 2020 16:49:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362807 - head/usr.sbin/sesutil X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/usr.sbin/sesutil X-SVN-Commit-Revision: 362807 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 16:49:44 -0000 Author: trasz Date: Tue Jun 30 16:49:43 2020 New Revision: 362807 URL: https://svnweb.freebsd.org/changeset/base/362807 Log: Fix misplaced voltages/temperatures labels in 'sesutil show'. PR: bin/247384 Reported by: brd MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D25353 Modified: head/usr.sbin/sesutil/sesutil.c Modified: head/usr.sbin/sesutil/sesutil.c ============================================================================== --- head/usr.sbin/sesutil/sesutil.c Tue Jun 30 16:24:28 2020 (r362806) +++ head/usr.sbin/sesutil/sesutil.c Tue Jun 30 16:49:43 2020 (r362807) @@ -831,7 +831,7 @@ show(int argc, char **argv __unused) break; case ELMTYP_THERM: if (e_ptr[j].elm_type != prev_type) - xo_emit("\nVoltages: "); + xo_emit("\nTemperatures: "); else xo_emit(", "); prev_type = e_ptr[j].elm_type; @@ -839,7 +839,7 @@ show(int argc, char **argv __unused) break; case ELMTYP_VOM: if (e_ptr[j].elm_type != prev_type) - xo_emit("\nTemperatures: "); + xo_emit("\nVoltages: "); else xo_emit(", "); prev_type = e_ptr[j].elm_type; From owner-svn-src-all@freebsd.org Tue Jun 30 17:16:02 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D40D935142A; Tue, 30 Jun 2020 17:16:02 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49x9xG5DDFz3Ssw; Tue, 30 Jun 2020 17:16:02 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [192.168.1.10] (c-98-207-126-143.hsd1.ca.comcast.net [98.207.126.143]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: rpokala) by smtp.freebsd.org (Postfix) with ESMTPSA id EDC9223297; Tue, 30 Jun 2020 17:16:01 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/16.38.20061401 Date: Tue, 30 Jun 2020 10:15:57 -0700 Subject: Re: svn commit: r362794 - head/sys/compat/linuxkpi/common/include/linux From: Ravi Pokala To: Hans Petter Selasky , , , Message-ID: <644D442D-18C4-402E-B0F2-ED45D7900538@panasas.com> Thread-Topic: svn commit: r362794 - head/sys/compat/linuxkpi/common/include/linux References: <202006300841.05U8fYMe044989@repo.freebsd.org> In-Reply-To: <202006300841.05U8fYMe044989@repo.freebsd.org> Mime-version: 1.0 Content-type: text/plain; charset="UTF-8" Content-transfer-encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 17:16:02 -0000 Thank you! -Ravi (rpokala@) =EF=BB=BF-----Original Message----- From: on behalf of Hans Petter Selasky <= hselasky@FreeBSD.org> Date: 2020-06-30, Tuesday at 01:41 To: , , Subject: svn commit: r362794 - head/sys/compat/linuxkpi/common/include/linu= x Author: hselasky Date: Tue Jun 30 08:41:33 2020 New Revision: 362794 URL: https://svnweb.freebsd.org/changeset/base/362794 Log: Document the is_signed(), type_max() and type_min() function macros i= n the LinuxKPI. Try to make the function argument more readable. Suggested by: several MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/kernel.h Modified: head/sys/compat/linuxkpi/common/include/linux/kernel.h =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/sys/compat/linuxkpi/common/include/linux/kernel.h Tue Jun 30 0= 7:37:24 2020 (r362793) +++ head/sys/compat/linuxkpi/common/include/linux/kernel.h Tue Jun 30 0= 8:41:33 2020 (r362794) @@ -564,20 +564,33 @@ linux_ratelimited(linux_ratelimit_t *rl) #define __is_constexpr(x) \ __builtin_constant_p(x) -#define is_signed(x) (((x)-1 / (x)2) =3D=3D (x)0) +/* + * The is_signed() macro below returns true if the passed data type is + * signed. Else false is returned. + */ +#define is_signed(datatype) (((datatype)-1 / (datatype)2) =3D=3D (datatype= )0) -#define type_max(x) ( \ - (sizeof(x) >=3D 8) ? (is_signed(x) ? INT64_MAX : UINT64_MAX) : \ - (sizeof(x) >=3D 4) ? (is_signed(x) ? INT32_MAX : UINT32_MAX) : \ - (sizeof(x) >=3D 2) ? (is_signed(x) ? INT16_MAX : UINT16_MAX) : \ - (is_signed(x) ? INT8_MAX : UINT8_MAX) \ +/* + * The type_max() macro below returns the maxium positive value the + * passed data type can hold. + */ +#define type_max(datatype) ( \ + (sizeof(datatype) >=3D 8) ? (is_signed(datatype) ? INT64_MAX : UINT64_= MAX) : \ + (sizeof(datatype) >=3D 4) ? (is_signed(datatype) ? INT32_MAX : UINT32_= MAX) : \ + (sizeof(datatype) >=3D 2) ? (is_signed(datatype) ? INT16_MAX : UINT16_= MAX) : \ + (is_signed(datatype) ? INT8_MAX : UINT8_MAX) \ ) -#define type_min(x) ( \ - (sizeof(x) >=3D 8) ? (is_signed(x) ? INT64_MIN : 0) : \ - (sizeof(x) >=3D 4) ? (is_signed(x) ? INT32_MIN : 0) : \ - (sizeof(x) >=3D 2) ? (is_signed(x) ? INT16_MIN : 0) : \ - (is_signed(x) ? INT8_MIN : 0) \ +/* + * The type_min() macro below returns the minimum value the passed + * data type can hold. For unsigned types the minimum value is always + * zero. For signed types it may vary. + */ +#define type_min(datatype) ( \ + (sizeof(datatype) >=3D 8) ? (is_signed(datatype) ? INT64_MIN : 0) : \ + (sizeof(datatype) >=3D 4) ? (is_signed(datatype) ? INT32_MIN : 0) : \ + (sizeof(datatype) >=3D 2) ? (is_signed(datatype) ? INT16_MIN : 0) : \ + (is_signed(datatype) ? INT8_MIN : 0) \ ) #endif /* _LINUX_KERNEL_H_ */ From owner-svn-src-all@freebsd.org Tue Jun 30 17:21:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 006743510FA; Tue, 30 Jun 2020 17:21:29 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xB3X6Jjmz3TNQ; Tue, 30 Jun 2020 17:21:28 +0000 (UTC) (envelope-from gbe@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 BC5941BC82; Tue, 30 Jun 2020 17:21:28 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05UHLShs068692; Tue, 30 Jun 2020 17:21:28 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05UHLSE7068690; Tue, 30 Jun 2020 17:21:28 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202006301721.05UHLSE7068690@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Tue, 30 Jun 2020 17:21:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362808 - head/usr.sbin/iovctl X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/usr.sbin/iovctl X-SVN-Commit-Revision: 362808 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 17:21:29 -0000 Author: gbe (doc committer) Date: Tue Jun 30 17:21:28 2020 New Revision: 362808 URL: https://svnweb.freebsd.org/changeset/base/362808 Log: iovctl(8): Correct a typo in the manpage and correct the SYNOPSIS PR: 246831 Submitted by: Jose Luis Duran Reviewed by: bcr (mentor) Approved by: bcr (mentor) MFC after: 7 days Modified: head/usr.sbin/iovctl/iovctl.8 head/usr.sbin/iovctl/iovctl.conf.5 Modified: head/usr.sbin/iovctl/iovctl.8 ============================================================================== --- head/usr.sbin/iovctl/iovctl.8 Tue Jun 30 16:49:43 2020 (r362807) +++ head/usr.sbin/iovctl/iovctl.8 Tue Jun 30 17:21:28 2020 (r362808) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 8, 2015 +.Dd May 31, 2020 .Dt IOVCTL 8 .Os .Sh NAME @@ -34,7 +34,7 @@ .Sh SYNOPSIS .Nm .Fl C -.Op Fl f Ar config-file +.Fl f Ar config-file .Op Fl n .Nm .Fl D Modified: head/usr.sbin/iovctl/iovctl.conf.5 ============================================================================== --- head/usr.sbin/iovctl/iovctl.conf.5 Tue Jun 30 16:49:43 2020 (r362807) +++ head/usr.sbin/iovctl/iovctl.conf.5 Tue Jun 30 17:21:28 2020 (r362808) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 8, 2015 +.Dd May 29, 2020 .Dt IOVCTL.CONF 5 .Os .Sh NAME @@ -43,7 +43,7 @@ device. To configure SR-IOV on multiple PF devices, use one configuration file for each PF. The locations of all -.Xr iovctl 9 +.Xr iovctl 8 configuration files are specified in .Xr rc.conf 5 . .Pp From owner-svn-src-all@freebsd.org Tue Jun 30 18:09:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2864835276D; Tue, 30 Jun 2020 18:09:00 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xC6N0LClz3Wn6; Tue, 30 Jun 2020 18:09:00 +0000 (UTC) (envelope-from gbe@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 DEE521C2A5; Tue, 30 Jun 2020 18:08:59 +0000 (UTC) (envelope-from gbe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05UI8x2F098193; Tue, 30 Jun 2020 18:08:59 GMT (envelope-from gbe@FreeBSD.org) Received: (from gbe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05UI8xHC098191; Tue, 30 Jun 2020 18:08:59 GMT (envelope-from gbe@FreeBSD.org) Message-Id: <202006301808.05UI8xHC098191@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gbe set sender to gbe@FreeBSD.org using -f From: Gordon Bergling Date: Tue, 30 Jun 2020 18:08:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362809 - head/contrib/mandoc X-SVN-Group: head X-SVN-Commit-Author: gbe X-SVN-Commit-Paths: head/contrib/mandoc X-SVN-Commit-Revision: 362809 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 18:09:00 -0000 Author: gbe (doc committer) Date: Tue Jun 30 18:08:59 2020 New Revision: 362809 URL: https://svnweb.freebsd.org/changeset/base/362809 Log: Mention FreeBSD in the HISTORY sections of apropos(1) and makewhatis(8). PR: 223520, 223521 Reviewed by: bcr (mentor) Approved by: bcr (mentor) Differential Revision: https://reviews.freebsd.org/D25521 Modified: head/contrib/mandoc/apropos.1 head/contrib/mandoc/makewhatis.8 Modified: head/contrib/mandoc/apropos.1 ============================================================================== --- head/contrib/mandoc/apropos.1 Tue Jun 30 17:21:28 2020 (r362808) +++ head/contrib/mandoc/apropos.1 Tue Jun 30 18:08:59 2020 (r362809) @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: November 22 2018 $ +.Dd $Mdocdate: June 30 2020 $ .Dt APROPOS 1 .Os .Sh NAME @@ -493,6 +493,12 @@ The options .Fl acfhIKklOTWw appeared in .Ox 5.7 . +.Pp +The +.Nm +utility was integrated into +.Fx 11.1 +as part of the switch to mandoc. .Sh AUTHORS .An -nosplit .An Bill Joy Modified: head/contrib/mandoc/makewhatis.8 ============================================================================== --- head/contrib/mandoc/makewhatis.8 Tue Jun 30 17:21:28 2020 (r362808) +++ head/contrib/mandoc/makewhatis.8 Tue Jun 30 18:08:59 2020 (r362809) @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: May 17 2017 $ +.Dd $Mdocdate: June 30 2020 $ .Dt MAKEWHATIS 8 .Os .Sh NAME @@ -211,6 +211,12 @@ and the options .Fl aCDnQT in .Ox 5.6 . +.Pp +The +.Nm +utility was integrated into +.Fx 11.1 +as part of the switch to mandoc. .Sh AUTHORS .An -nosplit .An Bill Joy From owner-svn-src-all@freebsd.org Tue Jun 30 19:34:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A637D3544F0; Tue, 30 Jun 2020 19:34:37 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xF1941qXz3ccg; Tue, 30 Jun 2020 19:34:37 +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 6D6031D1C5; Tue, 30 Jun 2020 19:34:37 +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 05UJYbs4053129; Tue, 30 Jun 2020 19:34:37 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05UJYbSp053128; Tue, 30 Jun 2020 19:34:37 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202006301934.05UJYbSp053128@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Tue, 30 Jun 2020 19:34:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362810 - stable/12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/12/sys/net X-SVN-Commit-Revision: 362810 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 19:34:37 -0000 Author: vmaffione Date: Tue Jun 30 19:34:36 2020 New Revision: 362810 URL: https://svnweb.freebsd.org/changeset/base/362810 Log: MFC r362553 iflib: netmap: fix rsync index overrun In the current iflib_netmap_rxsync, there is nothing that prevents kring->nr_hwtail to overrun kring->nr_hwcur during the descriptor import phase. This may cause errors in netmap applications, such as: em1 RX0: fail 'head < kring->nr_hwcur || head > kring->nr_hwtail' h 795 c 795 t 282 rh 795 rc 795 rt 282 hc 282 ht 282 Reviewed by: gallatin Differential Revision: https://reviews.freebsd.org/D25252 Modified: stable/12/sys/net/iflib.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/iflib.c ============================================================================== --- stable/12/sys/net/iflib.c Tue Jun 30 18:08:59 2020 (r362809) +++ stable/12/sys/net/iflib.c Tue Jun 30 19:34:36 2020 (r362810) @@ -1104,6 +1104,7 @@ iflib_netmap_rxsync(struct netmap_kring *kring, int fl * rxr->next_check is set to 0 on a ring reinit */ if (netmap_no_pendintr || force_update) { + uint32_t hwtail_lim = nm_prev(kring->nr_hwcur, lim); int crclen = iflib_crcstrip ? 0 : 4; int error, avail; @@ -1113,7 +1114,7 @@ iflib_netmap_rxsync(struct netmap_kring *kring, int fl nm_i = netmap_idx_n2k(kring, nic_i); avail = ctx->isc_rxd_available(ctx->ifc_softc, rxq->ifr_id, nic_i, USHRT_MAX); - for (n = 0; avail > 0; n++, avail--) { + for (n = 0; avail > 0 && nm_i != hwtail_lim; n++, avail--) { rxd_info_zero(&ri); ri.iri_frags = rxq->ifr_frags; ri.iri_qsidx = kring->ring_id; From owner-svn-src-all@freebsd.org Tue Jun 30 20:01:35 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CBE9B354F98; Tue, 30 Jun 2020 20:01:35 +0000 (UTC) (envelope-from se@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xFcH515Vz3dlN; Tue, 30 Jun 2020 20:01:35 +0000 (UTC) (envelope-from se@freebsd.org) Received: from Stefans-MBP-WLAN.fritz.box (p200300cd5f203300c91db44f1fdc4079.dip0.t-ipconnect.de [IPv6:2003:cd:5f20:3300:c91d:b44f:1fdc:4079]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id BA7A724812; Tue, 30 Jun 2020 20:01:34 +0000 (UTC) (envelope-from se@freebsd.org) Subject: Re: svn commit: r362681 - in head: contrib/bc contrib/bc/gen contrib/bc/include contrib/bc/locales contrib/bc/manuals contrib/bc/src contrib/bc/src/bc contrib/bc/src/dc contrib/bc/src/history contrib/b... To: Ed Maste , John Baldwin Cc: Eric van Gyzen , src-committers , svn-src-all , svn-src-head References: <202006271202.05RC22oR085945@repo.freebsd.org> <2b7f0d0f-e243-9c9c-f1c0-e700e0bf6d48@FreeBSD.org> <577b1bd1-598a-d3f9-3c23-537b9747612a@vangyzen.net> <8670f956-1ed4-2b87-ee64-d04bc37d6810@freebsd.org> From: =?UTF-8?Q?Stefan_E=c3=9fer?= Autocrypt: addr=se@freebsd.org; keydata= mQENBFVxiRIBCADOLNOZBsqlplHUQ3tG782FNtVT33rQli9EjNt2fhFERHIo4NxHlWBpHLnU b0s4L/eItx7au0i7Gegv01A9LUMwOnAc9EFAm4EW3Wmoa6MYrcP7xDClohg/Y69f7SNpEs3x YATBy+L6NzWZbJjZXD4vqPgZSDuMcLU7BEdJf0f+6h1BJPnGuwHpsSdnnMrZeIM8xQ8PPUVQ L0GZkVojHgNUngJH6e21qDrud0BkdiBcij0M3TCP4GQrJ/YMdurfc8mhueLpwGR2U1W8TYB7 4UY+NLw0McThOCLCxXflIeF/Y7jSB0zxzvb/H3LWkodUTkV57yX9IbUAGA5RKRg9zsUtABEB AAG0J1N0ZWZhbiBFw59lciAoRnJlZUJTRCkgPHNlQGZyZWVic2Qub3JnPokBVAQTAQoAPgIb AwULCQgHAwUVCgkICwUWAwIBAAIeAQIXgBYhBKNx6mWcC+zIK3FTE0frte9a/fVEBQJa8u+q BQkLJQETAAoJEEfrte9a/fVEOeMH/icmdK1eZQvB3U8quJo9VMaZsaTuCMbUE4NThyfsIvIm MCd+rb/yULmMYwqNfjyKB1x4ikR4x+94l+yJoz7K0Usks+eNKDmMGJM6pWWssTigaJubFdVd hVVC+C1QJi7JshYSib08uONoPmO4lv5Az0TDYGtsMzsES2sIlc62c9go5WPGYhQFRbX3Lk6y V6m8OHh+G9XGSj3oPO4UteRwu+SzTdOLunZBWG1wu34+IeZm663D+2gOppQLWpLa2qaTerqw THu377ayZ2B2LPJ5JkvkZeHYPkwDQ+b5PGn0UhfkxPnDVYki5F7qKxvQ5uq1/q9YaCX7mmOl H2yO7tgVsrW5AQ0EVXGJEgEIALEj9qCXMZVucjpcd3QxM/TlUr98m5viEd1z4tCnPUyRWcIC EVtj2h5xMH+2iB0q1+KWhq+NsWtvScmEmfHnsr7dJ1K677OdpDhKVaJk61eeRulFY1R4yb6C 1MMxK+WgYB+vvpG0UeyR0M4uBewcPvRsq4yGUHFQKtLAbMdoPTSryJA+ElnmK1vdY+rPcHgi OIMBZM7ahsPXC0C9K4e5SP9clGyIoMpbfHXdx9q+Rp3zVtlbhyk3BS/xccu/+9pk9ICXL6GR js2sNnJ0wxdU1DsAlC59a5MnSruwiZFwRnkQhr3x6wk97Lg7sLS9jjTnCN7LGlVmSmpOEMy6 uq1AWfUAEQEAAYkBPAQYAQoAJgIbDBYhBKNx6mWcC+zIK3FTE0frte9a/fVEBQJa8u+rBQkL JQEZAAoJEEfrte9a/fVEuesH/2DNxGWnHvWwMyiyhlQtafvDKwEn/wAgR8gHJFodB7emf8rA TnukH7MVttCoHtjN5lvv9RSBHjNTZls5wR/ANlwdRuPQHd8ZGxLe3S6IuUB3zDSwFltLGurO N2kOMhs5mTGyypSa+uw3rtQbUAVYf1oPbiR4FLtiM8FLyEvE95hX5fPq9Qvx9FmN79kmCIEw jDKPqDaUf/OR2fEF0LSIbXHEk4tNqCEwx5DIJ0fp5/z5UzICUAmwxyRs5O/Hre1jzPsMVyud Ml9t7UTOJGKVWwRory1PMnOFxN+iz5/d4FhYSKXF7kfMiFgol4LuWaxJRwbBrr71VGBrRy2a L1nw6Bc= Message-ID: <54915302-fad6-730c-8ce7-01c70e97fb6a@freebsd.org> Date: Tue, 30 Jun 2020 22:01:31 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 20:01:35 -0000 Am 29.06.20 um 20:09 schrieb Ed Maste: > On Mon, 29 Jun 2020 at 11:27, John Baldwin wrote: >> >> I suspect just doing the 'merge --record-only' is the simplest method >> assuming Git handles it ok. I suspect since Git ignores mergeinfo this >> is fine, but it would be good for Ed to confirm. You can always restore >> the tests in the future in contrib/bc when you want to add them. > > I think a --record-only merge is the best approach; in any case we > have a number of these in the tree already and Git will have to deal > with them. $ cd /usr/svn/base/head/contrib/bc $ svn merge --record-only ^/vendor/bc/dist svn: E195016: 'svn+ssh://repo.freebsd.org/base/vendor/bc/dist@362810' must be ancestrally related to 'svn+ssh://repo.freebsd.org/base/head/contrib/bc@362810' Adding the option --ignore-ancestry to the merge command does not help. I have performed a clean check-out of base/head and base/vendor, but the error message stays the same ... SVN info for the relevant directories involved in the merge attempt: $ svn info /usr/svn/base/head/contrib/bc /usr/svn/base/vendor/bc/dist Path: usr/svn/base/head/contrib/bc Working Copy Root Path: /usr/svn/base URL: svn+ssh://repo.freebsd.org/base/head/contrib/bc Relative URL: ^/head/contrib/bc Repository Root: svn+ssh://repo.freebsd.org/base Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f Revision: 362810 Node Kind: directory Schedule: normal Last Changed Author: se Last Changed Rev: 362681 Last Changed Date: 2020-06-27 14:02:01 +0200 (Sat, 27 Jun 2020) Path: usr/svn/base/vendor/bc/dist Working Copy Root Path: /usr/svn/base URL: svn+ssh://repo.freebsd.org/base/vendor/bc/dist Relative URL: ^/vendor/bc/dist Repository Root: svn+ssh://repo.freebsd.org/base Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f Revision: 362810 Node Kind: directory Schedule: normal Last Changed Author: se Last Changed Rev: 362697 Last Changed Date: 2020-06-27 17:03:19 +0200 (Sat, 27 Jun 2020) Any idea how to merge from the vendor area in this situation? Regards, STefan From owner-svn-src-all@freebsd.org Tue Jun 30 21:29:48 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BCB2F356441; Tue, 30 Jun 2020 21:29:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xHZ44djmz405c; Tue, 30 Jun 2020 21:29:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (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)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 67F2E24DDE; Tue, 30 Jun 2020 21:29:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [10.10.156.45] (unknown [45.85.81.142]) (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 42F873ED49; Tue, 30 Jun 2020 23:29:46 +0200 (CEST) From: Dimitry Andric Message-Id: <41B27C33-D023-453B-9DED-5776BE059F56@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_C8D930B8-E2F6-4776-A006-22D57730CC9F"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) Subject: Re: svn commit: r362681 - in head: contrib/bc contrib/bc/gen contrib/bc/include contrib/bc/locales contrib/bc/manuals contrib/bc/src contrib/bc/src/bc contrib/bc/src/dc contrib/bc/src/history contrib/b... Date: Tue, 30 Jun 2020 23:29:38 +0200 In-Reply-To: <54915302-fad6-730c-8ce7-01c70e97fb6a@freebsd.org> Cc: Ed Maste , John Baldwin , Eric van Gyzen , src-committers , svn-src-all , svn-src-head To: =?utf-8?Q?Stefan_E=C3=9Fer?= References: <202006271202.05RC22oR085945@repo.freebsd.org> <2b7f0d0f-e243-9c9c-f1c0-e700e0bf6d48@FreeBSD.org> <577b1bd1-598a-d3f9-3c23-537b9747612a@vangyzen.net> <8670f956-1ed4-2b87-ee64-d04bc37d6810@freebsd.org> <54915302-fad6-730c-8ce7-01c70e97fb6a@freebsd.org> X-Mailer: Apple Mail (2.3445.104.14) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 21:29:48 -0000 --Apple-Mail=_C8D930B8-E2F6-4776-A006-22D57730CC9F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On 30 Jun 2020, at 22:01, Stefan E=C3=9Fer wrote: >=20 > Am 29.06.20 um 20:09 schrieb Ed Maste: >> On Mon, 29 Jun 2020 at 11:27, John Baldwin wrote: >>>=20 >>> I suspect just doing the 'merge --record-only' is the simplest = method >>> assuming Git handles it ok. I suspect since Git ignores mergeinfo = this >>> is fine, but it would be good for Ed to confirm. You can always = restore >>> the tests in the future in contrib/bc when you want to add them. >>=20 >> I think a --record-only merge is the best approach; in any case we >> have a number of these in the tree already and Git will have to deal >> with them. >=20 > $ cd /usr/svn/base/head/contrib/bc >=20 > $ svn merge --record-only ^/vendor/bc/dist > svn: E195016: 'svn+ssh://repo.freebsd.org/base/vendor/bc/dist@362810' > must be ancestrally related to > 'svn+ssh://repo.freebsd.org/base/head/contrib/bc@362810' This is because you are supposed to commit stuff to ^/base/vendor/xxx first, then svn cp it to ^/head/contrib/xxx, at least from Subversion 1.8 onwards. The 'cp' action establishes the ancestral relation. Some of our older contrib areas were imported using cvs2svn, and these also suffer the same problem, i.e. Subversion complains that the vendor and contrib areas are not ancestrally related. > Adding the option --ignore-ancestry to the merge command does not = help. ... > Any idea how to merge from the vendor area in this situation? As far as I know, you have these alternatives: * Delete the contrib/bc tree, and do a fresh svn cp from the vendor area. You will have to apply any customizations on top again. I did something like this to fixup contrib/libc++ in https://svnweb.freebsd.org/base?view=3Drevision&revision=3D287679 * Figure out the right value of the svn:mergeinfo property, and apply that by hand, using svn propset. This will be tricky, and has to be re-done manually every time you want to merge again. * Merge with Subversion 1.7 or earlier. * Ignore all this, merge patches by hand and wait for the Git transition to be completed. -Dimitry --Apple-Mail=_C8D930B8-E2F6-4776-A006-22D57730CC9F 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 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCXvuuwgAKCRCwXqMKLiCW o0/nAKC8wDBpcrn8hEK5ngW9G+xQoaI4QQCfUMIlHiagagOueHflQU9O7oKbLLQ= =HtSP -----END PGP SIGNATURE----- --Apple-Mail=_C8D930B8-E2F6-4776-A006-22D57730CC9F-- From owner-svn-src-all@freebsd.org Tue Jun 30 21:40:35 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EC35F3566E3; Tue, 30 Jun 2020 21:40:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xHpW5xPHz40sD; Tue, 30 Jun 2020 21:40:35 +0000 (UTC) (envelope-from mav@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 966E81EA89; Tue, 30 Jun 2020 21:40:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05ULeZik026931; Tue, 30 Jun 2020 21:40:35 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05ULeZOE026929; Tue, 30 Jun 2020 21:40:35 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202006302140.05ULeZOE026929@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 30 Jun 2020 21:40:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362811 - head/usr.sbin/acpi/acpidump X-SVN-Group: head X-SVN-Commit-Author: mav X-SVN-Commit-Paths: head/usr.sbin/acpi/acpidump X-SVN-Commit-Revision: 362811 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 21:40:36 -0000 Author: mav Date: Tue Jun 30 21:40:34 2020 New Revision: 362811 URL: https://svnweb.freebsd.org/changeset/base/362811 Log: Decode APEI tables (BERT, EINJ, ERST, HEST). MFC after: 2 weeks Modified: head/usr.sbin/acpi/acpidump/acpi.c head/usr.sbin/acpi/acpidump/acpidump.8 Modified: head/usr.sbin/acpi/acpidump/acpi.c ============================================================================== --- head/usr.sbin/acpi/acpidump/acpi.c Tue Jun 30 19:34:36 2020 (r362810) +++ head/usr.sbin/acpi/acpidump/acpi.c Tue Jun 30 21:40:34 2020 (r362811) @@ -3,6 +3,7 @@ * * Copyright (c) 1998 Doug Rabson * Copyright (c) 2000 Mitsuru IWASAKI + * Copyright (c) 2020 Alexander Motin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -177,23 +178,17 @@ acpi_print_gas(ACPI_GENERIC_ADDRESS *gas) { switch(gas->SpaceId) { case ACPI_GAS_MEMORY: - if (gas->BitWidth <= 32) - printf("0x%08x:%u[%u] (Memory)", - (u_int)gas->Address, gas->BitOffset, - gas->BitWidth); - else - printf("0x%016jx:%u[%u] (Memory)", - (uintmax_t)gas->Address, gas->BitOffset, - gas->BitWidth); + printf("0x%016jx:%u[%u] (Memory)", (uintmax_t)gas->Address, + gas->BitOffset, gas->BitWidth); break; case ACPI_GAS_IO: - printf("0x%02x:%u[%u] (IO)", (u_int)gas->Address, + printf("0x%02jx:%u[%u] (IO)", (uintmax_t)gas->Address, gas->BitOffset, gas->BitWidth); break; case ACPI_GAS_PCI: - printf("%x:%x+0x%x (PCI)", (uint16_t)(gas->Address >> 32), + printf("%x:%x+0x%x:%u[%u] (PCI)", (uint16_t)(gas->Address >> 32), (uint16_t)((gas->Address >> 16) & 0xffff), - (uint16_t)gas->Address); + (uint16_t)gas->Address, gas->BitOffset, gas->BitWidth); break; /* XXX How to handle these below? */ case ACPI_GAS_EMBEDDED: @@ -594,6 +589,269 @@ acpi_handle_madt(ACPI_TABLE_HEADER *sdp) } static void +acpi_handle_bert(ACPI_TABLE_HEADER *sdp) +{ + ACPI_TABLE_BERT *bert; + + printf(BEGIN_COMMENT); + acpi_print_sdt(sdp); + bert = (ACPI_TABLE_BERT *)sdp; + printf("\tRegionLength=%d\n", bert->RegionLength); + printf("\tAddress=0x%016jx\n", bert->Address); + printf(END_COMMENT); +} + +static void +acpi_print_whea(ACPI_WHEA_HEADER *w) +{ + + printf("\n\tAction=%d\n", w->Action); + printf("\tInstruction=%d\n", w->Instruction); + printf("\tFlags=%02x\n", w->Flags); + printf("\tRegisterRegion="); + acpi_print_gas(&w->RegisterRegion); + printf("\n\tValue=0x%016jx\n", w->Value); + printf("\tMask=0x%016jx\n", w->Mask); +} + +static void +acpi_handle_einj(ACPI_TABLE_HEADER *sdp) +{ + ACPI_TABLE_EINJ *einj; + ACPI_WHEA_HEADER *w; + u_int i; + + printf(BEGIN_COMMENT); + acpi_print_sdt(sdp); + einj = (ACPI_TABLE_EINJ *)sdp; + printf("\tHeaderLength=%d\n", einj->HeaderLength); + printf("\tFlags=0x%02x\n", einj->Flags); + printf("\tEntries=%d\n", einj->Entries); + w = (ACPI_WHEA_HEADER *)(einj + 1); + for (i = 0; i < MIN(einj->Entries, (sdp->Length - + sizeof(ACPI_TABLE_EINJ)) / sizeof(ACPI_WHEA_HEADER)); i++) + acpi_print_whea(w + i); + printf(END_COMMENT); +} + +static void +acpi_handle_erst(ACPI_TABLE_HEADER *sdp) +{ + ACPI_TABLE_ERST *erst; + ACPI_WHEA_HEADER *w; + u_int i; + + printf(BEGIN_COMMENT); + acpi_print_sdt(sdp); + erst = (ACPI_TABLE_ERST *)sdp; + printf("\tHeaderLength=%d\n", erst->HeaderLength); + printf("\tEntries=%d\n", erst->Entries); + w = (ACPI_WHEA_HEADER *)(erst + 1); + for (i = 0; i < MIN(erst->Entries, (sdp->Length - + sizeof(ACPI_TABLE_ERST)) / sizeof(ACPI_WHEA_HEADER)); i++) + acpi_print_whea(w + i); + printf(END_COMMENT); +} + +static void +acpi_print_hest_bank(ACPI_HEST_IA_ERROR_BANK *b) +{ + + printf("\tBank:\n"); + printf("\t\tBankNumber=%d\n", b->BankNumber); + printf("\t\tClearStatusOnInit=%d\n", b->ClearStatusOnInit); + printf("\t\tStatusFormat=%d\n", b->StatusFormat); + printf("\t\tControlRegister=%x\n", b->ControlRegister); + printf("\t\tControlData=%jx\n", b->ControlData); + printf("\t\tStatusRegister=%x\n", b->StatusRegister); + printf("\t\tAddressRegister=%x\n", b->AddressRegister); + printf("\t\tMiscRegister=%x\n", b->MiscRegister); +} + +static void +acpi_print_hest_notify(ACPI_HEST_NOTIFY *n) +{ + + printf("\t\tType=%d\n", n->Type); + printf("\t\tLength=%d\n", n->Length); + printf("\t\tConfigWriteEnable=%04x\n", n->ConfigWriteEnable); + printf("\t\tPollInterval=%d\n", n->PollInterval); + printf("\t\tVector=%d\n", n->Vector); + printf("\t\tPollingThresholdValue=%d\n", n->PollingThresholdValue); + printf("\t\tPollingThresholdWindow=%d\n", n->PollingThresholdWindow); + printf("\t\tErrorThresholdValue=%d\n", n->ErrorThresholdValue); + printf("\t\tErrorThresholdWindow=%d\n", n->ErrorThresholdWindow); +} + +static void +acpi_print_hest_aer(ACPI_HEST_AER_COMMON *a) +{ + + printf("\tFlags=%02x\n", a->Flags); + printf("\tEnabled=%d\n", a->Enabled); + printf("\tRecordsToPreallocate=%d\n", a->RecordsToPreallocate); + printf("\tMaxSectionsPerRecord=%d\n", a->MaxSectionsPerRecord); + printf("\tBus=%d\n", a->Bus); + printf("\tDevice=%d\n", a->Device); + printf("\tFunction=%d\n", a->Function); + printf("\tDeviceControl=%d\n", a->DeviceControl); + printf("\tUncorrectableMask=%d\n", a->UncorrectableMask); + printf("\tUncorrectableSeverity=%d\n", a->UncorrectableSeverity); + printf("\tCorrectableMask=%d\n", a->CorrectableMask); + printf("\tAdvancedCapabilities=%d\n", a->AdvancedCapabilities); +} + +static int +acpi_handle_hest_structure(void *addr, int remaining) +{ + ACPI_HEST_HEADER *hdr = addr; + int i; + + if (remaining < (int)sizeof(ACPI_HEST_HEADER)) + return (-1); + + printf("\n\tType=%d\n", hdr->Type); + printf("\tSourceId=%d\n", hdr->SourceId); + switch (hdr->Type) { + case ACPI_HEST_TYPE_IA32_CHECK: { + ACPI_HEST_IA_MACHINE_CHECK *s = addr; + printf("\tFlags=%02x\n", s->Flags); + printf("\tEnabled=%d\n", s->Enabled); + printf("\tRecordsToPreallocate=%d\n", s->RecordsToPreallocate); + printf("\tMaxSectionsPerRecord=%d\n", s->MaxSectionsPerRecord); + printf("\tGlobalCapabilityData=%jd\n", s->GlobalCapabilityData); + printf("\tGlobalControlData=%jd\n", s->GlobalControlData); + printf("\tNumHardwareBanks=%d\n", s->NumHardwareBanks); + for (i = 0; i < s->NumHardwareBanks; i++) { + acpi_print_hest_bank((ACPI_HEST_IA_ERROR_BANK *) + (s + 1) + i); + } + return (sizeof(*s) + s->NumHardwareBanks * + sizeof(ACPI_HEST_IA_ERROR_BANK)); + } + case ACPI_HEST_TYPE_IA32_CORRECTED_CHECK: { + ACPI_HEST_IA_CORRECTED *s = addr; + printf("\tFlags=%02x\n", s->Flags); + printf("\tEnabled=%d\n", s->Enabled); + printf("\tRecordsToPreallocate=%d\n", s->RecordsToPreallocate); + printf("\tMaxSectionsPerRecord=%d\n", s->MaxSectionsPerRecord); + printf("\tNotify:\n"); + acpi_print_hest_notify(&s->Notify); + printf("\tNumHardwareBanks=%d\n", s->NumHardwareBanks); + for (i = 0; i < s->NumHardwareBanks; i++) { + acpi_print_hest_bank((ACPI_HEST_IA_ERROR_BANK *) + (s + 1) + i); + } + return (sizeof(*s) + s->NumHardwareBanks * + sizeof(ACPI_HEST_IA_ERROR_BANK)); + } + case ACPI_HEST_TYPE_IA32_NMI: { + ACPI_HEST_IA_NMI *s = addr; + printf("\tRecordsToPreallocate=%d\n", s->RecordsToPreallocate); + printf("\tMaxSectionsPerRecord=%d\n", s->MaxSectionsPerRecord); + printf("\tMaxRawDataLength=%d\n", s->MaxRawDataLength); + return (sizeof(*s)); + } + case ACPI_HEST_TYPE_AER_ROOT_PORT: { + ACPI_HEST_AER_ROOT *s = addr; + acpi_print_hest_aer(&s->Aer); + printf("\tRootErrorCommand=%d\n", s->RootErrorCommand); + return (sizeof(*s)); + } + case ACPI_HEST_TYPE_AER_ENDPOINT: { + ACPI_HEST_AER *s = addr; + acpi_print_hest_aer(&s->Aer); + return (sizeof(*s)); + } + case ACPI_HEST_TYPE_AER_BRIDGE: { + ACPI_HEST_AER_BRIDGE *s = addr; + acpi_print_hest_aer(&s->Aer); + printf("\tUncorrectableMask2=%d\n", s->UncorrectableMask2); + printf("\tUncorrectableSeverity2=%d\n", s->UncorrectableSeverity2); + printf("\tAdvancedCapabilities2=%d\n", s->AdvancedCapabilities2); + return (sizeof(*s)); + } + case ACPI_HEST_TYPE_GENERIC_ERROR: { + ACPI_HEST_GENERIC *s = addr; + printf("\tRelatedSourceId=%d\n", s->RelatedSourceId); + printf("\tEnabled=%d\n", s->Enabled); + printf("\tRecordsToPreallocate=%d\n", s->RecordsToPreallocate); + printf("\tMaxSectionsPerRecord=%d\n", s->MaxSectionsPerRecord); + printf("\tMaxRawDataLength=%d\n", s->MaxRawDataLength); + printf("\tErrorStatusAddress="); + acpi_print_gas(&s->ErrorStatusAddress); + printf("\n"); + printf("\tNotify:\n"); + acpi_print_hest_notify(&s->Notify); + printf("\tErrorBlockLength=%d\n", s->ErrorBlockLength); + return (sizeof(*s)); + } + case ACPI_HEST_TYPE_GENERIC_ERROR_V2: { + ACPI_HEST_GENERIC_V2 *s = addr; + printf("\tRelatedSourceId=%d\n", s->RelatedSourceId); + printf("\tEnabled=%d\n", s->Enabled); + printf("\tRecordsToPreallocate=%d\n", s->RecordsToPreallocate); + printf("\tMaxSectionsPerRecord=%d\n", s->MaxSectionsPerRecord); + printf("\tMaxRawDataLength=%d\n", s->MaxRawDataLength); + printf("\tErrorStatusAddress="); + acpi_print_gas(&s->ErrorStatusAddress); + printf("\n"); + printf("\tNotify:\n"); + acpi_print_hest_notify(&s->Notify); + printf("\tErrorBlockLength=%d\n", s->ErrorBlockLength); + printf("\tReadAckRegister="); + acpi_print_gas(&s->ReadAckRegister); + printf("\n"); + printf("\tReadAckPreserve=%jd\n", s->ReadAckPreserve); + printf("\tReadAckWrite=%jd\n", s->ReadAckWrite); + return (sizeof(*s)); + } + case ACPI_HEST_TYPE_IA32_DEFERRED_CHECK: { + ACPI_HEST_IA_DEFERRED_CHECK *s = addr; + printf("\tFlags=%02x\n", s->Flags); + printf("\tEnabled=%d\n", s->Enabled); + printf("\tRecordsToPreallocate=%d\n", s->RecordsToPreallocate); + printf("\tMaxSectionsPerRecord=%d\n", s->MaxSectionsPerRecord); + printf("\tNotify:\n"); + acpi_print_hest_notify(&s->Notify); + printf("\tNumHardwareBanks=%d\n", s->NumHardwareBanks); + for (i = 0; i < s->NumHardwareBanks; i++) { + acpi_print_hest_bank((ACPI_HEST_IA_ERROR_BANK *) + (s + 1) + i); + } + return (sizeof(*s) + s->NumHardwareBanks * + sizeof(ACPI_HEST_IA_ERROR_BANK)); + } + default: + return (-1); + } +} + +static void +acpi_handle_hest(ACPI_TABLE_HEADER *sdp) +{ + char *cp; + int remaining, consumed; + ACPI_TABLE_HEST *hest; + + printf(BEGIN_COMMENT); + acpi_print_sdt(sdp); + hest = (ACPI_TABLE_HEST *)sdp; + printf("\tErrorSourceCount=%d\n", hest->ErrorSourceCount); + + remaining = sdp->Length - sizeof(ACPI_TABLE_HEST); + while (remaining > 0) { + cp = (char *)sdp + sdp->Length - remaining; + consumed = acpi_handle_hest_structure(cp, remaining); + if (consumed <= 0) + break; + else + remaining -= consumed; + } + printf(END_COMMENT); +} + +static void acpi_handle_hpet(ACPI_TABLE_HEADER *sdp) { ACPI_TABLE_HPET *hpet; @@ -604,7 +862,7 @@ acpi_handle_hpet(ACPI_TABLE_HEADER *sdp) printf("\tHPET Number=%d\n", hpet->Sequence); printf("\tADDR="); acpi_print_gas(&hpet->Address); - printf("\tHW Rev=0x%x\n", hpet->Id & ACPI_HPET_ID_HARDWARE_REV_ID); + printf("\n\tHW Rev=0x%x\n", hpet->Id & ACPI_HPET_ID_HARDWARE_REV_ID); printf("\tComparators=%d\n", (hpet->Id & ACPI_HPET_ID_COMPARATORS) >> 8); printf("\tCounter Size=%d\n", hpet->Id & ACPI_HPET_ID_COUNT_SIZE_CAP ? @@ -727,13 +985,14 @@ acpi_print_native_lpit(ACPI_LPIT_NATIVE *nl) { printf("\tEntryTrigger="); acpi_print_gas(&nl->EntryTrigger); - printf("\tResidency=%u\n", nl->Residency); + printf("\n\tResidency=%u\n", nl->Residency); printf("\tLatency=%u\n", nl->Latency); if (nl->Header.Flags & ACPI_LPIT_NO_COUNTER) printf("\tResidencyCounter=Not Present"); else { printf("\tResidencyCounter="); acpi_print_gas(&nl->ResidencyCounter); + printf("\n"); } if (nl->CounterFrequency) printf("\tCounterFrequency=%ju\n", nl->CounterFrequency); @@ -1762,10 +2021,18 @@ acpi_handle_rsdt(ACPI_TABLE_HEADER *rsdp) sdp->Signature); continue; } - if (!memcmp(sdp->Signature, ACPI_SIG_FADT, 4)) + if (!memcmp(sdp->Signature, ACPI_SIG_BERT, 4)) + acpi_handle_bert(sdp); + else if (!memcmp(sdp->Signature, ACPI_SIG_EINJ, 4)) + acpi_handle_einj(sdp); + else if (!memcmp(sdp->Signature, ACPI_SIG_ERST, 4)) + acpi_handle_erst(sdp); + else if (!memcmp(sdp->Signature, ACPI_SIG_FADT, 4)) acpi_handle_fadt(sdp); else if (!memcmp(sdp->Signature, ACPI_SIG_MADT, 4)) acpi_handle_madt(sdp); + else if (!memcmp(sdp->Signature, ACPI_SIG_HEST, 4)) + acpi_handle_hest(sdp); else if (!memcmp(sdp->Signature, ACPI_SIG_HPET, 4)) acpi_handle_hpet(sdp); else if (!memcmp(sdp->Signature, ACPI_SIG_ECDT, 4)) Modified: head/usr.sbin/acpi/acpidump/acpidump.8 ============================================================================== --- head/usr.sbin/acpi/acpidump/acpidump.8 Tue Jun 30 19:34:36 2020 (r362810) +++ head/usr.sbin/acpi/acpidump/acpidump.8 Tue Jun 30 21:40:34 2020 (r362811) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 10, 2018 +.Dd June 29, 2020 .Dt ACPIDUMP 8 .Os .Sh NAME @@ -97,11 +97,15 @@ flag, the utility dumps contents of the following tables: .Pp .Bl -tag -offset indent -width 12345 -compact +.It BERT .It DMAR .It DSDT .It ECDT +.It EINJ +.It ERST .It FACS .It FADT +.It HEST .It HPET .It LPIT .It MADT @@ -109,6 +113,10 @@ utility dumps contents of the following tables: .It NFIT .It RSD PTR .It RSDT +.It SLIT +.It SRAT +.It TCPA +.It TPM2 .It WDDT .El .Pp From owner-svn-src-all@freebsd.org Tue Jun 30 21:48:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ABFA8356E67; Tue, 30 Jun 2020 21:48:59 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xJ0C49Xkz41Dx; Tue, 30 Jun 2020 21:48:59 +0000 (UTC) (envelope-from tsoome@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 594DD1E9B0; Tue, 30 Jun 2020 21:48:59 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05ULmxf3033113; Tue, 30 Jun 2020 21:48:59 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05ULmxOR033112; Tue, 30 Jun 2020 21:48:59 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202006302148.05ULmxOR033112@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Tue, 30 Jun 2020 21:48:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362812 - head/stand/efi/boot1 X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/efi/boot1 X-SVN-Commit-Revision: 362812 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 21:48:59 -0000 Author: tsoome Date: Tue Jun 30 21:48:58 2020 New Revision: 362812 URL: https://svnweb.freebsd.org/changeset/base/362812 Log: boot1.efi: use malloc family from libsa The zfs reader development did reach to the point where linking boot1, we will get errors about duplicate symbols Malloc, Free, Calloc. We can just use libsa version, just as loader.efi does. The only concern is, libsa zalloc is using fixed size heap region, I did pick 64MB as other stage instances are using, but this size is likely not optimal. In any case, with limited memory setups, we should boot loader.efi directly. Sponsored by: Netflix, Klara Inc. Modified: head/stand/efi/boot1/boot1.c Modified: head/stand/efi/boot1/boot1.c ============================================================================== --- head/stand/efi/boot1/boot1.c Tue Jun 30 21:40:34 2020 (r362811) +++ head/stand/efi/boot1/boot1.c Tue Jun 30 21:48:58 2020 (r362812) @@ -53,43 +53,9 @@ static EFI_GUID DevicePathGUID = DEVICE_PATH_PROTOCOL; static EFI_GUID LoadedImageGUID = LOADED_IMAGE_PROTOCOL; static EFI_GUID ConsoleControlGUID = EFI_CONSOLE_CONTROL_PROTOCOL_GUID; -/* - * Provide Malloc / Free / Calloc backed by EFIs AllocatePool / FreePool which ensures - * memory is correctly aligned avoiding EFI_INVALID_PARAMETER returns from - * EFI methods. - */ +static EFI_PHYSICAL_ADDRESS heap; +static UINTN heapsize; -void * -Malloc(size_t len, const char *file __unused, int line __unused) -{ - void *out; - - if (BS->AllocatePool(EfiLoaderData, len, &out) == EFI_SUCCESS) - return (out); - - return (NULL); -} - -void -Free(void *buf, const char *file __unused, int line __unused) -{ - if (buf != NULL) - (void)BS->FreePool(buf); -} - -void * -Calloc(size_t n1, size_t n2, const char *file, int line) -{ - size_t bytes; - void *res; - - bytes = n1 * n2; - if ((res = Malloc(bytes, file, line)) != NULL) - bzero(res, bytes); - - return (res); -} - /* * try_boot only returns if it fails to load the loader. If it succeeds * it simply boots, otherwise it returns the status of last EFI call. @@ -201,6 +167,18 @@ efi_main(EFI_HANDLE Ximage, EFI_SYSTEM_TABLE *Xsystab) BS = ST->BootServices; RS = ST->RuntimeServices; + heapsize = 64 * 1024 * 1024; + status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, + EFI_SIZE_TO_PAGES(heapsize), &heap); + if (status != EFI_SUCCESS) { + ST->ConOut->OutputString(ST->ConOut, + __DECONST(CHAR16 *, + L"Failed to allocate memory for heap.\r\n")); + BS->Exit(IH, status, 0, NULL); + } + + setheap((void *)(uintptr_t)heap, (void *)(uintptr_t)(heap + heapsize)); + /* Set up the console, so printf works. */ status = BS->LocateProtocol(&ConsoleControlGUID, NULL, (VOID **)&ConsoleControl); @@ -296,6 +274,8 @@ add_device(dev_info_t **devinfop, dev_info_t *devinfo) void efi_exit(EFI_STATUS s) { + + BS->FreePages(heap, EFI_SIZE_TO_PAGES(heapsize)); BS->Exit(IH, s, 0, NULL); } From owner-svn-src-all@freebsd.org Tue Jun 30 21:50:06 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 27D593570A8; Tue, 30 Jun 2020 21:50:06 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xJ1V0GBZz41nJ; Tue, 30 Jun 2020 21:50:06 +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 E08261ECA5; Tue, 30 Jun 2020 21:50:05 +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 05ULo5Ll033261; Tue, 30 Jun 2020 21:50:05 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05ULo5kI033260; Tue, 30 Jun 2020 21:50:05 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202006302150.05ULo5kI033260@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 30 Jun 2020 21:50:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362813 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 362813 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 21:50:06 -0000 Author: tuexen Date: Tue Jun 30 21:50:05 2020 New Revision: 362813 URL: https://svnweb.freebsd.org/changeset/base/362813 Log: Fix a bug introduced in https://svnweb.freebsd.org/changeset/base/362173 Reported by: syzbot+f3a6fccfa6ae9d3ded29@syzkaller.appspotmail.com MFC after: 1 week Modified: head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Tue Jun 30 21:48:58 2020 (r362812) +++ head/sys/netinet/sctputil.c Tue Jun 30 21:50:05 2020 (r362813) @@ -5247,7 +5247,11 @@ sctp_find_ifa_in_ep(struct sctp_inpcb *inp, struct soc if (holds_lock == 0) { SCTP_INP_RUNLOCK(inp); } - return (laddr->ifa); + if (laddr != NULL) { + return (laddr->ifa); + } else { + return (NULL); + } } uint32_t From owner-svn-src-all@freebsd.org Tue Jun 30 22:01:22 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 99A1B3572A1; Tue, 30 Jun 2020 22:01:22 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xJGV3bDLz42TG; Tue, 30 Jun 2020 22:01:22 +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 5E8BD1EDC9; Tue, 30 Jun 2020 22:01:22 +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 05UM1MFn040903; Tue, 30 Jun 2020 22:01:22 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05UM1MiH040901; Tue, 30 Jun 2020 22:01:22 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202006302201.05UM1MiH040901@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 30 Jun 2020 22:01:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362814 - head/sys/opencrypto X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/opencrypto X-SVN-Commit-Revision: 362814 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 22:01:22 -0000 Author: markj Date: Tue Jun 30 22:01:21 2020 New Revision: 362814 URL: https://svnweb.freebsd.org/changeset/base/362814 Log: Convert cryptostats to a counter_u64 array. The global counters were not SMP-friendly. Use per-CPU counters instead. Reviewed by: jhb Sponsored by: Rubicon Communications, LLC (Netgate) Differential Revision: https://reviews.freebsd.org/D25466 Modified: head/sys/opencrypto/crypto.c head/sys/opencrypto/cryptodev.h Modified: head/sys/opencrypto/crypto.c ============================================================================== --- head/sys/opencrypto/crypto.c Tue Jun 30 21:50:05 2020 (r362813) +++ head/sys/opencrypto/crypto.c Tue Jun 30 22:01:21 2020 (r362814) @@ -59,7 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include #include #include @@ -232,10 +232,32 @@ static int crypto_kinvoke(struct cryptkop *krp); static void crypto_task_invoke(void *ctx, int pending); static void crypto_batch_enqueue(struct cryptop *crp); -static struct cryptostats cryptostats; -SYSCTL_STRUCT(_kern_crypto, OID_AUTO, stats, CTLFLAG_RW, &cryptostats, - cryptostats, "Crypto system statistics"); +static counter_u64_t cryptostats[sizeof(struct cryptostats) / sizeof(uint64_t)]; +SYSCTL_COUNTER_U64_ARRAY(_kern_crypto, OID_AUTO, stats, CTLFLAG_RW, + cryptostats, nitems(cryptostats), + "Crypto system statistics"); +#define CRYPTOSTAT_INC(stat) do { \ + counter_u64_add( \ + cryptostats[offsetof(struct cryptostats, stat) / sizeof(uint64_t)],\ + 1); \ +} while (0) + +static void +cryptostats_init(void *arg __unused) +{ + COUNTER_ARRAY_ALLOC(cryptostats, nitems(cryptostats), M_WAITOK); +} +SYSINIT(cryptostats_init, SI_SUB_COUNTER, SI_ORDER_ANY, cryptostats_init, NULL); + +static void +cryptostats_fini(void *arg __unused) +{ + COUNTER_ARRAY_FREE(cryptostats, nitems(cryptostats)); +} +SYSUNINIT(cryptostats_fini, SI_SUB_COUNTER, SI_ORDER_ANY, cryptostats_fini, + NULL); + /* Try to avoid directly exposing the key buffer as a symbol */ static struct keybuf *keybuf; @@ -1399,7 +1421,7 @@ crypto_dispatch(struct cryptop *crp) crp_sanity(crp); #endif - cryptostats.cs_ops++; + CRYPTOSTAT_INC(cs_ops); crp->crp_retw_id = ((uintptr_t)crp->crp_session) % crypto_workers_num; @@ -1460,7 +1482,7 @@ crypto_kdispatch(struct cryptkop *krp) { int error; - cryptostats.cs_kops++; + CRYPTOSTAT_INC(cs_kops); krp->krp_cap = NULL; error = crypto_kinvoke(krp); @@ -1767,7 +1789,7 @@ crypto_done(struct cryptop *crp) ("crypto_done: op already done, flags 0x%x", crp->crp_flags)); crp->crp_flags |= CRYPTO_F_DONE; if (crp->crp_etype != 0) - cryptostats.cs_errs++; + CRYPTOSTAT_INC(cs_errs); /* * CBIMM means unconditionally do the callback immediately; @@ -1839,7 +1861,7 @@ crypto_kdone(struct cryptkop *krp) struct cryptocap *cap; if (krp->krp_status != 0) - cryptostats.cs_kerrs++; + CRYPTOSTAT_INC(cs_kerrs); CRYPTO_DRIVER_LOCK(); cap = krp->krp_cap; KASSERT(cap->cc_koperations > 0, ("cc_koperations == 0")); @@ -1979,7 +2001,7 @@ crypto_proc(void) */ cap->cc_qblocked = 1; TAILQ_INSERT_HEAD(&crp_q, submit, crp_next); - cryptostats.cs_blocks++; + CRYPTOSTAT_INC(cs_blocks); } } @@ -2016,7 +2038,7 @@ crypto_proc(void) */ krp->krp_cap->cc_kqblocked = 1; TAILQ_INSERT_HEAD(&crp_kq, krp, krp_next); - cryptostats.cs_kblocks++; + CRYPTOSTAT_INC(cs_kblocks); } } @@ -2038,7 +2060,7 @@ crypto_proc(void) crp_sleep = 0; if (cryptoproc == NULL) break; - cryptostats.cs_intrs++; + CRYPTOSTAT_INC(cs_intrs); } } CRYPTO_Q_UNLOCK(); @@ -2099,7 +2121,7 @@ crypto_ret_proc(struct crypto_ret_worker *ret_worker) "crypto_ret_wait", 0); if (ret_worker->cryptoretproc == NULL) break; - cryptostats.cs_rets++; + CRYPTOSTAT_INC(cs_rets); } } CRYPTO_RETW_UNLOCK(ret_worker); Modified: head/sys/opencrypto/cryptodev.h ============================================================================== --- head/sys/opencrypto/cryptodev.h Tue Jun 30 21:50:05 2020 (r362813) +++ head/sys/opencrypto/cryptodev.h Tue Jun 30 22:01:21 2020 (r362814) @@ -327,14 +327,14 @@ struct crypt_kop { #define CIOCCRYPTAEAD _IOWR('c', 109, struct crypt_aead) struct cryptostats { - u_int32_t cs_ops; /* symmetric crypto ops submitted */ - u_int32_t cs_errs; /* symmetric crypto ops that failed */ - u_int32_t cs_kops; /* asymetric/key ops submitted */ - u_int32_t cs_kerrs; /* asymetric/key ops that failed */ - u_int32_t cs_intrs; /* crypto swi thread activations */ - u_int32_t cs_rets; /* crypto return thread activations */ - u_int32_t cs_blocks; /* symmetric op driver block */ - u_int32_t cs_kblocks; /* symmetric op driver block */ + uint64_t cs_ops; /* symmetric crypto ops submitted */ + uint64_t cs_errs; /* symmetric crypto ops that failed */ + uint64_t cs_kops; /* asymetric/key ops submitted */ + uint64_t cs_kerrs; /* asymetric/key ops that failed */ + uint64_t cs_intrs; /* crypto swi thread activations */ + uint64_t cs_rets; /* crypto return thread activations */ + uint64_t cs_blocks; /* symmetric op driver block */ + uint64_t cs_kblocks; /* symmetric op driver block */ }; #ifdef _KERNEL From owner-svn-src-all@freebsd.org Tue Jun 30 22:03:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D2E973575DA; Tue, 30 Jun 2020 22:03:41 +0000 (UTC) (envelope-from se@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xJK95DDRz42bC; Tue, 30 Jun 2020 22:03:41 +0000 (UTC) (envelope-from se@freebsd.org) Received: from Stefans-MBP-WLAN.fritz.box (p200300cd5f203300c91db44f1fdc4079.dip0.t-ipconnect.de [IPv6:2003:cd:5f20:3300:c91d:b44f:1fdc:4079]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id DFAE525AC7; Tue, 30 Jun 2020 22:03:40 +0000 (UTC) (envelope-from se@freebsd.org) Subject: Re: svn commit: r362681 - in head: contrib/bc contrib/bc/gen contrib/bc/include contrib/bc/locales contrib/bc/manuals contrib/bc/src contrib/bc/src/bc contrib/bc/src/dc contrib/bc/src/history contrib/b... To: Dimitry Andric Cc: src-committers , svn-src-all , svn-src-head References: <202006271202.05RC22oR085945@repo.freebsd.org> <2b7f0d0f-e243-9c9c-f1c0-e700e0bf6d48@FreeBSD.org> <577b1bd1-598a-d3f9-3c23-537b9747612a@vangyzen.net> <8670f956-1ed4-2b87-ee64-d04bc37d6810@freebsd.org> <54915302-fad6-730c-8ce7-01c70e97fb6a@freebsd.org> <41B27C33-D023-453B-9DED-5776BE059F56@FreeBSD.org> From: =?UTF-8?Q?Stefan_E=c3=9fer?= Autocrypt: addr=se@freebsd.org; keydata= mQENBFVxiRIBCADOLNOZBsqlplHUQ3tG782FNtVT33rQli9EjNt2fhFERHIo4NxHlWBpHLnU b0s4L/eItx7au0i7Gegv01A9LUMwOnAc9EFAm4EW3Wmoa6MYrcP7xDClohg/Y69f7SNpEs3x YATBy+L6NzWZbJjZXD4vqPgZSDuMcLU7BEdJf0f+6h1BJPnGuwHpsSdnnMrZeIM8xQ8PPUVQ L0GZkVojHgNUngJH6e21qDrud0BkdiBcij0M3TCP4GQrJ/YMdurfc8mhueLpwGR2U1W8TYB7 4UY+NLw0McThOCLCxXflIeF/Y7jSB0zxzvb/H3LWkodUTkV57yX9IbUAGA5RKRg9zsUtABEB AAG0J1N0ZWZhbiBFw59lciAoRnJlZUJTRCkgPHNlQGZyZWVic2Qub3JnPokBVAQTAQoAPgIb AwULCQgHAwUVCgkICwUWAwIBAAIeAQIXgBYhBKNx6mWcC+zIK3FTE0frte9a/fVEBQJa8u+q BQkLJQETAAoJEEfrte9a/fVEOeMH/icmdK1eZQvB3U8quJo9VMaZsaTuCMbUE4NThyfsIvIm MCd+rb/yULmMYwqNfjyKB1x4ikR4x+94l+yJoz7K0Usks+eNKDmMGJM6pWWssTigaJubFdVd hVVC+C1QJi7JshYSib08uONoPmO4lv5Az0TDYGtsMzsES2sIlc62c9go5WPGYhQFRbX3Lk6y V6m8OHh+G9XGSj3oPO4UteRwu+SzTdOLunZBWG1wu34+IeZm663D+2gOppQLWpLa2qaTerqw THu377ayZ2B2LPJ5JkvkZeHYPkwDQ+b5PGn0UhfkxPnDVYki5F7qKxvQ5uq1/q9YaCX7mmOl H2yO7tgVsrW5AQ0EVXGJEgEIALEj9qCXMZVucjpcd3QxM/TlUr98m5viEd1z4tCnPUyRWcIC EVtj2h5xMH+2iB0q1+KWhq+NsWtvScmEmfHnsr7dJ1K677OdpDhKVaJk61eeRulFY1R4yb6C 1MMxK+WgYB+vvpG0UeyR0M4uBewcPvRsq4yGUHFQKtLAbMdoPTSryJA+ElnmK1vdY+rPcHgi OIMBZM7ahsPXC0C9K4e5SP9clGyIoMpbfHXdx9q+Rp3zVtlbhyk3BS/xccu/+9pk9ICXL6GR js2sNnJ0wxdU1DsAlC59a5MnSruwiZFwRnkQhr3x6wk97Lg7sLS9jjTnCN7LGlVmSmpOEMy6 uq1AWfUAEQEAAYkBPAQYAQoAJgIbDBYhBKNx6mWcC+zIK3FTE0frte9a/fVEBQJa8u+rBQkL JQEZAAoJEEfrte9a/fVEuesH/2DNxGWnHvWwMyiyhlQtafvDKwEn/wAgR8gHJFodB7emf8rA TnukH7MVttCoHtjN5lvv9RSBHjNTZls5wR/ANlwdRuPQHd8ZGxLe3S6IuUB3zDSwFltLGurO N2kOMhs5mTGyypSa+uw3rtQbUAVYf1oPbiR4FLtiM8FLyEvE95hX5fPq9Qvx9FmN79kmCIEw jDKPqDaUf/OR2fEF0LSIbXHEk4tNqCEwx5DIJ0fp5/z5UzICUAmwxyRs5O/Hre1jzPsMVyud Ml9t7UTOJGKVWwRory1PMnOFxN+iz5/d4FhYSKXF7kfMiFgol4LuWaxJRwbBrr71VGBrRy2a L1nw6Bc= Message-ID: Date: Wed, 1 Jul 2020 00:03:39 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <41B27C33-D023-453B-9DED-5776BE059F56@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 22:03:41 -0000 Am 30.06.20 um 23:29 schrieb Dimitry Andric: > On 30 Jun 2020, at 22:01, Stefan Eßer wrote: >> >> Am 29.06.20 um 20:09 schrieb Ed Maste: >>> On Mon, 29 Jun 2020 at 11:27, John Baldwin wrote: >>>> >>>> I suspect just doing the 'merge --record-only' is the simplest method >>>> assuming Git handles it ok. I suspect since Git ignores mergeinfo this >>>> is fine, but it would be good for Ed to confirm. You can always restore >>>> the tests in the future in contrib/bc when you want to add them. >>> >>> I think a --record-only merge is the best approach; in any case we >>> have a number of these in the tree already and Git will have to deal >>> with them. >> >> $ cd /usr/svn/base/head/contrib/bc >> >> $ svn merge --record-only ^/vendor/bc/dist >> svn: E195016: 'svn+ssh://repo.freebsd.org/base/vendor/bc/dist@362810' >> must be ancestrally related to >> 'svn+ssh://repo.freebsd.org/base/head/contrib/bc@362810' > > This is because you are supposed to commit stuff to ^/base/vendor/xxx > first, then svn cp it to ^/head/contrib/xxx, at least from Subversion > 1.8 onwards. The 'cp' action establishes the ancestral relation. Yes, I thought so - the problem I want to fix is the premature import to /contrib and I had been hoping that it was possible to use the --record-only merge to edit the merge history (as suggested by John Baldwin and Ed Maste). > Some of our older contrib areas were imported using cvs2svn, and these > also suffer the same problem, i.e. Subversion complains that the vendor > and contrib areas are not ancestrally related. I see. >> Adding the option --ignore-ancestry to the merge command does not help. > ... >> Any idea how to merge from the vendor area in this situation? > > As far as I know, you have these alternatives: > > * Delete the contrib/bc tree, and do a fresh svn cp from the vendor > area. You will have to apply any customizations on top again. I did > something like this to fixup contrib/libc++ in > https://svnweb.freebsd.org/base?view=revision&revision=287679 Yes, I could delete the files in contrib/bc and then immediately svn copy over the contents of vendor/bc/dist - and I guess that is the only real "clean" way forward. > * Figure out the right value of the svn:mergeinfo property, and apply > that by hand, using svn propset. This will be tricky, and has to be > re-done manually every time you want to merge again. Not my preferred approach ... > * Merge with Subversion 1.7 or earlier. If this would result in a sane state of the repository I might give it a try. > * Ignore all this, merge patches by hand and wait for the Git > transition to be completed. I want to upgrade to the next release and I'm wondering whether it would be possible to just svn copy that new version over from the vendor directory to the contrib directory. The import to the vendor area and the contrib directory have very similar commit messages and thus there would be no loss of commit history. If this is possible and does not cause problems for the SVN repo or the Git conversion, this might be the simplest solution. Thank you for your reply and the clarification of the situation! Best regards, STefan From owner-svn-src-all@freebsd.org Tue Jun 30 22:56:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A313B3583C9; Tue, 30 Jun 2020 22:56:25 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 49xKV06PN1z44nC; Tue, 30 Jun 2020 22:56:24 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 05UMuHRI053766; Tue, 30 Jun 2020 15:56:17 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 05UMuHZY053765; Tue, 30 Jun 2020 15:56:17 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202006302256.05UMuHZY053765@gndrsh.dnsmgr.net> Subject: Re: svn commit: r362809 - head/contrib/mandoc In-Reply-To: <202006301808.05UI8xHC098191@repo.freebsd.org> To: Gordon Bergling Date: Tue, 30 Jun 2020 15:56:17 -0700 (PDT) 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: 49xKV06PN1z44nC X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jun 2020 22:56:25 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: gbe (doc committer) > Date: Tue Jun 30 18:08:59 2020 > New Revision: 362809 > URL: https://svnweb.freebsd.org/changeset/base/362809 > > Log: > Mention FreeBSD in the HISTORY sections of apropos(1) and makewhatis(8). > > PR: 223520, 223521 > Reviewed by: bcr (mentor) > Approved by: bcr (mentor) > Differential Revision: https://reviews.freebsd.org/D25521 > > Modified: > head/contrib/mandoc/apropos.1 > head/contrib/mandoc/makewhatis.8 > > Modified: head/contrib/mandoc/apropos.1 > ============================================================================== > --- head/contrib/mandoc/apropos.1 Tue Jun 30 17:21:28 2020 (r362808) > +++ head/contrib/mandoc/apropos.1 Tue Jun 30 18:08:59 2020 (r362809) > @@ -15,7 +15,7 @@ > .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF > .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. > .\" > -.Dd $Mdocdate: November 22 2018 $ > +.Dd $Mdocdate: June 30 2020 $ > .Dt APROPOS 1 > .Os > .Sh NAME > @@ -493,6 +493,12 @@ The options > .Fl acfhIKklOTWw > appeared in > .Ox 5.7 . > +.Pp > +The > +.Nm > +utility was integrated into > +.Fx 11.1 > +as part of the switch to mandoc. Huh? FreeBSD has had apropos since 1.0 and my 5.4 system clearly has it: freebsd {110}% uname -a FreeBSD pdx.rh.CN85.dnsmgr.net 5.4-RELEASE-p8 FreeBSD 5.4-RELEASE-p8 #1: Mon Jul 1 17:58:50 PDT 2019 root@pdx.rh.CN85.dnsmgr.net:/usr/src/sys/i386/compile/PDXMXPIE i386 pdx.rh.CN85.dnsmgr.net:freebsd {111}% which apropos /usr/bin/apropos And a man page for it too: APROPOS(1) FreeBSD General Commands Manual APROPOS(1) NAME apropos, whatis -- search the whatis database SYNOPSIS apropos keyword ... whatis keyword ... DESCRIPTION apropos searches a set of database files containing short descriptions of system commands for keywords and displays the result on the standard out- put. whatis displays only complete word matches. keyword really is an extended regular expression, please read grep(1) manual page for more information about its format. DIAGNOSTICS The apropos utility exits 0 on success, and 1 if no keyword matched. SEE ALSO grep(1), makewhatis(1), man(1) FreeBSD 5.4 January 15, 1991 FreeBSD 5.4 > .Sh AUTHORS > .An -nosplit > .An Bill Joy > > Modified: head/contrib/mandoc/makewhatis.8 > ============================================================================== > --- head/contrib/mandoc/makewhatis.8 Tue Jun 30 17:21:28 2020 (r362808) > +++ head/contrib/mandoc/makewhatis.8 Tue Jun 30 18:08:59 2020 (r362809) > @@ -15,7 +15,7 @@ > .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF > .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. > .\" > -.Dd $Mdocdate: May 17 2017 $ > +.Dd $Mdocdate: June 30 2020 $ > .Dt MAKEWHATIS 8 > .Os > .Sh NAME > @@ -211,6 +211,12 @@ and the options > .Fl aCDnQT > in > .Ox 5.6 . > +.Pp > +The > +.Nm > +utility was integrated into > +.Fx 11.1 > +as part of the switch to mandoc. Ditto > .Sh AUTHORS > .An -nosplit > .An Bill Joy > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Wed Jul 1 00:23:51 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 979DA3595AE; Wed, 1 Jul 2020 00:23:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xMQv3sMdz47Th; Wed, 1 Jul 2020 00:23:51 +0000 (UTC) (envelope-from adrian@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 68B592064F; Wed, 1 Jul 2020 00:23:51 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0610Npqm031545; Wed, 1 Jul 2020 00:23:51 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0610Nn4w031533; Wed, 1 Jul 2020 00:23:49 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <202007010023.0610Nn4w031533@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 1 Jul 2020 00:23:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362815 - head/sys/net80211 X-SVN-Group: head X-SVN-Commit-Author: adrian X-SVN-Commit-Paths: head/sys/net80211 X-SVN-Commit-Revision: 362815 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 00:23:51 -0000 Author: adrian Date: Wed Jul 1 00:23:49 2020 New Revision: 362815 URL: https://svnweb.freebsd.org/changeset/base/362815 Log: [net80211] Migrate HT/legacy protection mode and preamble calculation to per-VAP flags The later firmware devices (including iwn!) support multiple configuration contexts for a lot of things, leaving it up to the firmware to decide which channel and vap is active. This allows for things like off-channel p2p sta/ap operation and other weird things. However, net80211 is still focused on a "net80211 drives all" when it comes to driving the NIC, and as part of this history a lot of these options are global and not per-VAP. This is fine when net80211 drives things and all VAPs share a single channel - these parameters importantly really reflect the state of the channel! - but it will increasingly be not fine when we start supporting more weird configurations and more recent NICs. Yeah, recent like iwn/iwm. Anyway - so, migrate all of the HT protection, legacy protection and preamble stuff to be per-VAP. The global flags are still there; they're now calculated in a deferred taskqueue that mirrors the old behaviour. Firmware based drivers which have per-VAP configuration of these parameters can now just listen to the per-VAP options. What do I mean by per-channel? Well, the above configuration parameters really are about interoperation with other devices on the same channel. Eg, HT protection mode will flip to legacy/mixed if it hears ANY BSS that supports non-HT stations or indicates it has non-HT stations associated. So, these flags really should be per-channel rather than per-VAP, and then for things like "do i need short preamble or long preamble?" turn into a "do I need it for this current operating channel". Then any VAP using it can query the channel that it's on, reflecting the real required state. This patch does none of the above paragraph just yet. I'm also cheating a bit - I'm currently not using separate taskqueues for the beacon updates and the per-VAP configuration updates. I can always further split it later if I need to but I didn't think it was SUPER important here. So: * Create vap taskqueue entries for ERP/protection, HT protection and short/long preamble; * Migrate the HT station count, short/long slot station count, etc - into per-VAP variables rather than global; * Fix a bug with my WME work from a while ago which made it per-VAP - do the WME beacon update /after/ the WME update taskqueue runs, not before; * Any time the HT protmode configuration changes or the ERP protection mode config changes - schedule the task, which will call the driver without the net80211 lock held and all correctly serialised; * Use the global flags for beacon IEs and VAP flags for probe responses and other IE situations. The primary consumer of this is ath10k. iwn could use it when sending RXON, but we don't support IBSS or AP modes on it yet, and I'm not yet sure whether it's required in STA mode (ie whether the firmware parses beacons to change protection mode or whether we need to.) Tested: * AR9280, STA/AP * AR9380, DWDS STA+STA/AP * ath10k work, STA/AP * Intel 6235, STA * Various rtwn / run NICs, DWDS STA and STA configurations Modified: head/sys/net80211/ieee80211_ddb.c head/sys/net80211/ieee80211_hostap.c head/sys/net80211/ieee80211_ht.c head/sys/net80211/ieee80211_ioctl.c head/sys/net80211/ieee80211_node.c head/sys/net80211/ieee80211_node.h head/sys/net80211/ieee80211_output.c head/sys/net80211/ieee80211_power.c head/sys/net80211/ieee80211_proto.c head/sys/net80211/ieee80211_proto.h head/sys/net80211/ieee80211_sta.c head/sys/net80211/ieee80211_var.h Modified: head/sys/net80211/ieee80211_ddb.c ============================================================================== --- head/sys/net80211/ieee80211_ddb.c Tue Jun 30 22:01:21 2020 (r362814) +++ head/sys/net80211/ieee80211_ddb.c Wed Jul 1 00:23:49 2020 (r362815) @@ -483,6 +483,17 @@ _db_show_vap(const struct ieee80211vap *vap, int showm if (vap->iv_tdma != NULL) _db_show_tdma("\t", vap->iv_tdma, showprocs); #endif /* IEEE80211_SUPPORT_TDMA */ + + db_printf("\tsta_assoc %u", vap->iv_sta_assoc); + db_printf(" ht_sta_assoc %u", vap->iv_ht_sta_assoc); + db_printf(" ht40_sta_assoc %u", vap->iv_ht40_sta_assoc); + db_printf("\n"); + db_printf(" nonerpsta %u", vap->iv_nonerpsta); + db_printf(" longslotsta %u", vap->iv_longslotsta); + db_printf(" lastnonerp %d", vap->iv_lastnonerp); + db_printf(" lastnonht %d", vap->iv_lastnonht); + db_printf("\n"); + if (showprocs) { DB_PRINTSYM("\t", "iv_key_alloc", vap->iv_key_alloc); DB_PRINTSYM("\t", "iv_key_delete", vap->iv_key_delete); @@ -608,17 +619,8 @@ _db_show_com(const struct ieee80211com *ic, int showva _db_show_node_table("\t", &ic->ic_sta); db_printf("\tprotmode %d", ic->ic_protmode); - db_printf(" nonerpsta %u", ic->ic_nonerpsta); - db_printf(" longslotsta %u", ic->ic_longslotsta); - db_printf(" lastnonerp %d", ic->ic_lastnonerp); - db_printf("\n"); - db_printf("\tsta_assoc %u", ic->ic_sta_assoc); - db_printf(" ht_sta_assoc %u", ic->ic_ht_sta_assoc); - db_printf(" ht40_sta_assoc %u", ic->ic_ht40_sta_assoc); - db_printf("\n"); db_printf("\tcurhtprotmode 0x%x", ic->ic_curhtprotmode); db_printf(" htprotmode %d", ic->ic_htprotmode); - db_printf(" lastnonht %d", ic->ic_lastnonht); db_printf("\n"); db_printf("\tsuperg %p\n", ic->ic_superg); Modified: head/sys/net80211/ieee80211_hostap.c ============================================================================== --- head/sys/net80211/ieee80211_hostap.c Tue Jun 30 22:01:21 2020 (r362814) +++ head/sys/net80211/ieee80211_hostap.c Wed Jul 1 00:23:49 2020 (r362815) @@ -206,8 +206,9 @@ hostap_newstate(struct ieee80211vap *vap, enum ieee802 * state and the timeout routines check if the flag * is set before doing anything so this is sufficient. */ - ic->ic_flags_ext &= ~IEEE80211_FEXT_NONERP_PR; - ic->ic_flags_ht &= ~IEEE80211_FHT_NONHT_PR; + vap->iv_flags_ext &= ~IEEE80211_FEXT_NONERP_PR; + vap->iv_flags_ht &= ~IEEE80211_FHT_NONHT_PR; + /* XXX TODO: schedule deferred update? */ /* fall thru... */ case IEEE80211_S_CAC: /* @@ -1812,10 +1813,13 @@ hostap_recv_mgmt(struct ieee80211_node *ni, struct mbu scan.status == 0 && /* NB: on-channel */ ((scan.erp & 0x100) == 0 || /* NB: no ERP, 11b sta*/ (scan.erp & IEEE80211_ERP_NON_ERP_PRESENT))) { - ic->ic_lastnonerp = ticks; - ic->ic_flags_ext |= IEEE80211_FEXT_NONERP_PR; - if (ic->ic_protmode != IEEE80211_PROT_NONE && - (ic->ic_flags & IEEE80211_F_USEPROT) == 0) { + vap->iv_lastnonerp = ticks; + vap->iv_flags_ext |= IEEE80211_FEXT_NONERP_PR; + /* + * XXX TODO: this may need to check all VAPs? + */ + if (vap->iv_protmode != IEEE80211_PROT_NONE && + (vap->iv_flags & IEEE80211_F_USEPROT) == 0) { IEEE80211_NOTE_FRAME(vap, IEEE80211_MSG_ASSOC, wh, "non-ERP present on channel %d " @@ -1823,8 +1827,8 @@ hostap_recv_mgmt(struct ieee80211_node *ni, struct mbu "enable use of protection", ic->ic_curchan->ic_ieee, scan.erp, scan.chan); - ic->ic_flags |= IEEE80211_F_USEPROT; - ieee80211_notify_erp(ic); + vap->iv_flags |= IEEE80211_F_USEPROT; + ieee80211_vap_update_erp_protmode(vap); } } /* @@ -1844,12 +1848,12 @@ hostap_recv_mgmt(struct ieee80211_node *ni, struct mbu break; } if (scan.htinfo == NULL) { - ieee80211_htprot_update(ic, + ieee80211_htprot_update(vap, IEEE80211_HTINFO_OPMODE_PROTOPT | IEEE80211_HTINFO_NONHT_PRESENT); } else if (ishtmixed(scan.htinfo)) { /* XXX? take NONHT_PRESENT from beacon? */ - ieee80211_htprot_update(ic, + ieee80211_htprot_update(vap, IEEE80211_HTINFO_OPMODE_MIXED | IEEE80211_HTINFO_NONHT_PRESENT); } Modified: head/sys/net80211/ieee80211_ht.c ============================================================================== --- head/sys/net80211/ieee80211_ht.c Tue Jun 30 22:01:21 2020 (r362814) +++ head/sys/net80211/ieee80211_ht.c Wed Jul 1 00:23:49 2020 (r362815) @@ -270,6 +270,9 @@ ieee80211_ht_vattach(struct ieee80211vap *vap) vap->iv_ampdu_mintraffic[WME_AC_VO] = 32; vap->iv_ampdu_mintraffic[WME_AC_VI] = 32; + vap->iv_htprotmode = IEEE80211_PROT_RTSCTS; + vap->iv_curhtprotmode = IEEE80211_HTINFO_OPMODE_PURE; + if (vap->iv_htcaps & IEEE80211_HTC_HT) { /* * Device is HT capable; enable all HT-related @@ -1509,38 +1512,36 @@ ieee80211_ht_wds_init(struct ieee80211_node *ni) } /* - * Notify hostap vaps of a change in the HTINFO ie. + * Notify a VAP of a change in the HTINFO ie if it's a hostap VAP. + * + * This is to be called from the deferred HT protection update + * task once the flags are updated. */ -static void -htinfo_notify(struct ieee80211com *ic) +void +ieee80211_htinfo_notify(struct ieee80211vap *vap) { - struct ieee80211vap *vap; - int first = 1; - IEEE80211_LOCK_ASSERT(ic); + IEEE80211_LOCK_ASSERT(vap->iv_ic); - TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) { - if (vap->iv_opmode != IEEE80211_M_HOSTAP) - continue; - if (vap->iv_state != IEEE80211_S_RUN || - !IEEE80211_IS_CHAN_HT(vap->iv_bss->ni_chan)) - continue; - if (first) { - IEEE80211_NOTE(vap, - IEEE80211_MSG_ASSOC | IEEE80211_MSG_11N, - vap->iv_bss, - "HT bss occupancy change: %d sta, %d ht, " - "%d ht40%s, HT protmode now 0x%x" - , ic->ic_sta_assoc - , ic->ic_ht_sta_assoc - , ic->ic_ht40_sta_assoc - , (ic->ic_flags_ht & IEEE80211_FHT_NONHT_PR) ? - ", non-HT sta present" : "" - , ic->ic_curhtprotmode); - first = 0; - } - ieee80211_beacon_notify(vap, IEEE80211_BEACON_HTINFO); - } + if (vap->iv_opmode != IEEE80211_M_HOSTAP) + return; + if (vap->iv_state != IEEE80211_S_RUN || + !IEEE80211_IS_CHAN_HT(vap->iv_bss->ni_chan)) + return; + + IEEE80211_NOTE(vap, + IEEE80211_MSG_ASSOC | IEEE80211_MSG_11N, + vap->iv_bss, + "HT bss occupancy change: %d sta, %d ht, " + "%d ht40%s, HT protmode now 0x%x" + , vap->iv_sta_assoc + , vap->iv_ht_sta_assoc + , vap->iv_ht40_sta_assoc + , (vap->iv_flags_ht & IEEE80211_FHT_NONHT_PR) ? + ", non-HT sta present" : "" + , vap->iv_curhtprotmode); + + ieee80211_beacon_notify(vap, IEEE80211_BEACON_HTINFO); } /* @@ -1548,26 +1549,28 @@ htinfo_notify(struct ieee80211com *ic) * state and handle updates. */ static void -htinfo_update(struct ieee80211com *ic) +htinfo_update(struct ieee80211vap *vap) { + struct ieee80211com *ic = vap->iv_ic; uint8_t protmode; - if (ic->ic_sta_assoc != ic->ic_ht_sta_assoc) { + if (vap->iv_sta_assoc != vap->iv_ht_sta_assoc) { protmode = IEEE80211_HTINFO_OPMODE_MIXED | IEEE80211_HTINFO_NONHT_PRESENT; - } else if (ic->ic_flags_ht & IEEE80211_FHT_NONHT_PR) { + } else if (vap->iv_flags_ht & IEEE80211_FHT_NONHT_PR) { protmode = IEEE80211_HTINFO_OPMODE_PROTOPT | IEEE80211_HTINFO_NONHT_PRESENT; } else if (ic->ic_bsschan != IEEE80211_CHAN_ANYC && IEEE80211_IS_CHAN_HT40(ic->ic_bsschan) && - ic->ic_sta_assoc != ic->ic_ht40_sta_assoc) { + vap->iv_sta_assoc != vap->iv_ht40_sta_assoc) { protmode = IEEE80211_HTINFO_OPMODE_HT20PR; } else { protmode = IEEE80211_HTINFO_OPMODE_PURE; } - if (protmode != ic->ic_curhtprotmode) { - ic->ic_curhtprotmode = protmode; - htinfo_notify(ic); + if (protmode != vap->iv_curhtprotmode) { + vap->iv_curhtprotmode = protmode; + /* Update VAP with new protection mode */ + ieee80211_vap_update_ht_protmode(vap); } } @@ -1577,16 +1580,16 @@ htinfo_update(struct ieee80211com *ic) void ieee80211_ht_node_join(struct ieee80211_node *ni) { - struct ieee80211com *ic = ni->ni_ic; + struct ieee80211vap *vap = ni->ni_vap; - IEEE80211_LOCK_ASSERT(ic); + IEEE80211_LOCK_ASSERT(vap->iv_ic); if (ni->ni_flags & IEEE80211_NODE_HT) { - ic->ic_ht_sta_assoc++; + vap->iv_ht_sta_assoc++; if (ni->ni_chw == 40) - ic->ic_ht40_sta_assoc++; + vap->iv_ht40_sta_assoc++; } - htinfo_update(ic); + htinfo_update(vap); } /* @@ -1595,16 +1598,16 @@ ieee80211_ht_node_join(struct ieee80211_node *ni) void ieee80211_ht_node_leave(struct ieee80211_node *ni) { - struct ieee80211com *ic = ni->ni_ic; + struct ieee80211vap *vap = ni->ni_vap; - IEEE80211_LOCK_ASSERT(ic); + IEEE80211_LOCK_ASSERT(vap->iv_ic); if (ni->ni_flags & IEEE80211_NODE_HT) { - ic->ic_ht_sta_assoc--; + vap->iv_ht_sta_assoc--; if (ni->ni_chw == 40) - ic->ic_ht40_sta_assoc--; + vap->iv_ht40_sta_assoc--; } - htinfo_update(ic); + htinfo_update(vap); } /* @@ -1618,25 +1621,27 @@ ieee80211_ht_node_leave(struct ieee80211_node *ni) * a higher precedence than PROTOPT (i.e. we will not change * change PROTOPT -> MIXED; only MIXED -> PROTOPT). This * corresponds to how we handle things in htinfo_update. + * */ void -ieee80211_htprot_update(struct ieee80211com *ic, int protmode) +ieee80211_htprot_update(struct ieee80211vap *vap, int protmode) { + struct ieee80211com *ic = vap->iv_ic; #define OPMODE(x) SM(x, IEEE80211_HTINFO_OPMODE) IEEE80211_LOCK(ic); /* track non-HT station presence */ KASSERT(protmode & IEEE80211_HTINFO_NONHT_PRESENT, ("protmode 0x%x", protmode)); - ic->ic_flags_ht |= IEEE80211_FHT_NONHT_PR; - ic->ic_lastnonht = ticks; + vap->iv_flags_ht |= IEEE80211_FHT_NONHT_PR; + vap->iv_lastnonht = ticks; - if (protmode != ic->ic_curhtprotmode && - (OPMODE(ic->ic_curhtprotmode) != IEEE80211_HTINFO_OPMODE_MIXED || + if (protmode != vap->iv_curhtprotmode && + (OPMODE(vap->iv_curhtprotmode) != IEEE80211_HTINFO_OPMODE_MIXED || OPMODE(protmode) == IEEE80211_HTINFO_OPMODE_PROTOPT)) { - /* push beacon update */ - ic->ic_curhtprotmode = protmode; - htinfo_notify(ic); + vap->iv_curhtprotmode = protmode; + /* Update VAP with new protection mode */ + ieee80211_vap_update_ht_protmode(vap); } IEEE80211_UNLOCK(ic); #undef OPMODE @@ -1651,18 +1656,17 @@ ieee80211_htprot_update(struct ieee80211com *ic, int p * gone we time out this condition. */ void -ieee80211_ht_timeout(struct ieee80211com *ic) +ieee80211_ht_timeout(struct ieee80211vap *vap) { - IEEE80211_LOCK_ASSERT(ic); - if ((ic->ic_flags_ht & IEEE80211_FHT_NONHT_PR) && - ieee80211_time_after(ticks, ic->ic_lastnonht + IEEE80211_NONHT_PRESENT_AGE)) { -#if 0 - IEEE80211_NOTE(vap, IEEE80211_MSG_11N, ni, + IEEE80211_LOCK_ASSERT(vap->iv_ic); + + if ((vap->iv_flags_ht & IEEE80211_FHT_NONHT_PR) && + ieee80211_time_after(ticks, vap->iv_lastnonht + IEEE80211_NONHT_PRESENT_AGE)) { + IEEE80211_DPRINTF(vap, IEEE80211_MSG_11N, "%s", "time out non-HT STA present on channel"); -#endif - ic->ic_flags_ht &= ~IEEE80211_FHT_NONHT_PR; - htinfo_update(ic); + vap->iv_flags_ht &= ~IEEE80211_FHT_NONHT_PR; + htinfo_update(vap); } } @@ -3507,6 +3511,12 @@ ieee80211_ht_update_beacon(struct ieee80211vap *vap, ht->hi_byte1 |= IEEE80211_HTINFO_TXWIDTH_2040; /* protection mode */ + /* + * XXX TODO: this uses the global flag, not the per-VAP flag. + * Eventually (once the protection modes are done per-channel + * rather than per-VAP) we can flip this over to be per-VAP but + * using the channel protection mode. + */ ht->hi_byte2 = (ht->hi_byte2 &~ PROTMODE) | ic->ic_curhtprotmode; ieee80211_free_node(ni); @@ -3547,7 +3557,11 @@ ieee80211_add_htinfo_body(uint8_t *frm, struct ieee802 if (IEEE80211_IS_CHAN_HT40(ni->ni_chan)) frm[0] |= IEEE80211_HTINFO_TXWIDTH_2040; - frm[1] = ic->ic_curhtprotmode; + /* + * Add current protection mode. Unlike for beacons, + * this will respect the per-VAP flags. + */ + frm[1] = vap->iv_curhtprotmode; frm += 5; Modified: head/sys/net80211/ieee80211_ioctl.c ============================================================================== --- head/sys/net80211/ieee80211_ioctl.c Tue Jun 30 22:01:21 2020 (r362814) +++ head/sys/net80211/ieee80211_ioctl.c Wed Jul 1 00:23:49 2020 (r362815) @@ -851,7 +851,7 @@ ieee80211_ioctl_get80211(struct ieee80211vap *vap, u_l ireq->i_val = vap->iv_rtsthreshold; break; case IEEE80211_IOC_PROTMODE: - ireq->i_val = ic->ic_protmode; + ireq->i_val = vap->iv_protmode; break; case IEEE80211_IOC_TXPOWER: /* @@ -1097,7 +1097,7 @@ ieee80211_ioctl_get80211(struct ieee80211vap *vap, u_l error = ieee80211_ioctl_getdevcaps(ic, ireq); break; case IEEE80211_IOC_HTPROTMODE: - ireq->i_val = ic->ic_htprotmode; + ireq->i_val = vap->iv_htprotmode; break; case IEEE80211_IOC_HTCONF: if (vap->iv_flags_ht & IEEE80211_FHT_HT) { @@ -2912,11 +2912,13 @@ ieee80211_ioctl_set80211(struct ieee80211vap *vap, u_l case IEEE80211_IOC_PROTMODE: if (ireq->i_val > IEEE80211_PROT_RTSCTS) return EINVAL; - ic->ic_protmode = (enum ieee80211_protmode)ireq->i_val; + vap->iv_protmode = (enum ieee80211_protmode)ireq->i_val; /* NB: if not operating in 11g this can wait */ if (ic->ic_bsschan != IEEE80211_CHAN_ANYC && IEEE80211_IS_CHAN_ANYG(ic->ic_bsschan)) error = ERESTART; + /* driver callback for protection mode update */ + ieee80211_vap_update_erp_protmode(vap); break; case IEEE80211_IOC_TXPOWER: if ((ic->ic_caps & IEEE80211_C_TXPMGT) == 0) @@ -3384,11 +3386,13 @@ ieee80211_ioctl_set80211(struct ieee80211vap *vap, u_l case IEEE80211_IOC_HTPROTMODE: if (ireq->i_val > IEEE80211_PROT_RTSCTS) return EINVAL; - ic->ic_htprotmode = ireq->i_val ? + vap->iv_htprotmode = ireq->i_val ? IEEE80211_PROT_RTSCTS : IEEE80211_PROT_NONE; /* NB: if not operating in 11n this can wait */ if (isvapht(vap)) error = ERESTART; + /* Notify driver layer of HT protmode changes */ + ieee80211_vap_update_ht_protmode(vap); break; case IEEE80211_IOC_STA_VLAN: error = ieee80211_ioctl_setstavlan(vap, ireq); Modified: head/sys/net80211/ieee80211_node.c ============================================================================== --- head/sys/net80211/ieee80211_node.c Tue Jun 30 22:01:21 2020 (r362814) +++ head/sys/net80211/ieee80211_node.c Wed Jul 1 00:23:49 2020 (r362815) @@ -99,7 +99,7 @@ static void ieee80211_node_table_init(struct ieee80211 static void ieee80211_node_table_reset(struct ieee80211_node_table *, struct ieee80211vap *); static void ieee80211_node_table_cleanup(struct ieee80211_node_table *nt); -static void ieee80211_erp_timeout(struct ieee80211com *); +static void ieee80211_vap_erp_timeout(struct ieee80211vap *); MALLOC_DEFINE(M_80211_NODE, "80211node", "802.11 node state"); MALLOC_DEFINE(M_80211_NODE_IE, "80211nodeie", "802.11 node ie"); @@ -674,7 +674,6 @@ ieee80211_ibss_merge(struct ieee80211_node *ni) { #ifdef IEEE80211_DEBUG struct ieee80211vap *vap = ni->ni_vap; - struct ieee80211com *ic = ni->ni_ic; #endif if (! ieee80211_ibss_merge_check(ni)) @@ -683,9 +682,9 @@ ieee80211_ibss_merge(struct ieee80211_node *ni) IEEE80211_DPRINTF(vap, IEEE80211_MSG_ASSOC, "%s: new bssid %s: %s preamble, %s slot time%s\n", __func__, ether_sprintf(ni->ni_bssid), - ic->ic_flags&IEEE80211_F_SHPREAMBLE ? "short" : "long", + vap->iv_flags&IEEE80211_F_SHPREAMBLE ? "short" : "long", vap->iv_flags&IEEE80211_F_SHSLOT ? "short" : "long", - ic->ic_flags&IEEE80211_F_USEPROT ? ", protection" : "" + vap->iv_flags&IEEE80211_F_USEPROT ? ", protection" : "" ); return ieee80211_sta_join1(ieee80211_ref_node(ni)); } @@ -2508,12 +2507,27 @@ ieee80211_drain(struct ieee80211com *ic) } /* + * Per-ieee80211vap inactivity timer callback. + */ +static void +ieee80211_vap_timeout(struct ieee80211vap *vap) +{ + + IEEE80211_LOCK_ASSERT(vap->iv_ic); + + ieee80211_vap_erp_timeout(vap); + ieee80211_ht_timeout(vap); + ieee80211_vht_timeout(vap); +} + +/* * Per-ieee80211com inactivity timer callback. */ void ieee80211_node_timeout(void *arg) { struct ieee80211com *ic = arg; + struct ieee80211vap *vap; /* * Defer timeout processing if a channel switch is pending. @@ -2530,9 +2544,8 @@ ieee80211_node_timeout(void *arg) ieee80211_ageq_age(&ic->ic_stageq, IEEE80211_INACT_WAIT); IEEE80211_LOCK(ic); - ieee80211_erp_timeout(ic); - ieee80211_ht_timeout(ic); - ieee80211_vht_timeout(ic); + TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) + ieee80211_vap_timeout(vap); IEEE80211_UNLOCK(ic); } callout_reset(&ic->ic_inact, IEEE80211_INACT_WAIT*hz, @@ -2645,7 +2658,12 @@ ieee80211_dump_nodes(struct ieee80211_node_table *nt) (ieee80211_iter_func *) ieee80211_dump_node, nt); } -static void +/* + * Iterate over the VAPs and update their ERP beacon IEs. + * + * Note this must be called from the deferred ERP update task paths. + */ +void ieee80211_notify_erp_locked(struct ieee80211com *ic) { struct ieee80211vap *vap; @@ -2657,14 +2675,6 @@ ieee80211_notify_erp_locked(struct ieee80211com *ic) ieee80211_beacon_notify(vap, IEEE80211_BEACON_ERP); } -void -ieee80211_notify_erp(struct ieee80211com *ic) -{ - IEEE80211_LOCK(ic); - ieee80211_notify_erp_locked(ic); - IEEE80211_UNLOCK(ic); -} - /* * Handle a station joining an 11g network. */ @@ -2684,10 +2694,13 @@ ieee80211_node_join_11g(struct ieee80211_node *ni) * next beacon transmission (per sec. 7.3.1.4 of 11g). */ if ((ni->ni_capinfo & IEEE80211_CAPINFO_SHORT_SLOTTIME) == 0) { - ic->ic_longslotsta++; + vap->iv_longslotsta++; IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_ASSOC, ni, "station needs long slot time, count %d", - ic->ic_longslotsta); + vap->iv_longslotsta); + /* + * XXX TODO: this may need all VAPs checked! + */ if (!IEEE80211_IS_CHAN_108G(ic->ic_bsschan)) { /* * Don't force slot time when switched to turbo @@ -2703,10 +2716,10 @@ ieee80211_node_join_11g(struct ieee80211_node *ni) * if configured. */ if (!ieee80211_iserp_rateset(&ni->ni_rates)) { - ic->ic_nonerpsta++; + vap->iv_nonerpsta++; IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_ASSOC, ni, "station is !ERP, %d non-ERP stations associated", - ic->ic_nonerpsta); + vap->iv_nonerpsta); /* * If station does not support short preamble * then we must enable use of Barker preamble. @@ -2714,20 +2727,21 @@ ieee80211_node_join_11g(struct ieee80211_node *ni) if ((ni->ni_capinfo & IEEE80211_CAPINFO_SHORT_PREAMBLE) == 0) { IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_ASSOC, ni, "%s", "station needs long preamble"); - ic->ic_flags |= IEEE80211_F_USEBARKER; - ic->ic_flags &= ~IEEE80211_F_SHPREAMBLE; + vap->iv_flags |= IEEE80211_F_USEBARKER; + vap->iv_flags &= ~IEEE80211_F_SHPREAMBLE; + ieee80211_vap_update_preamble(vap); } /* * If protection is configured and this is the first * indication we should use protection, enable it. */ - if (ic->ic_protmode != IEEE80211_PROT_NONE && - ic->ic_nonerpsta == 1 && - (ic->ic_flags_ext & IEEE80211_FEXT_NONERP_PR) == 0) { + if (vap->iv_protmode != IEEE80211_PROT_NONE && + vap->iv_nonerpsta == 1 && + (vap->iv_flags_ext & IEEE80211_FEXT_NONERP_PR) == 0) { IEEE80211_DPRINTF(ni->ni_vap, IEEE80211_MSG_ASSOC, "%s: enable use of protection\n", __func__); - ic->ic_flags |= IEEE80211_F_USEPROT; - ieee80211_notify_erp_locked(ic); + vap->iv_flags |= IEEE80211_F_USEPROT; + ieee80211_vap_update_erp_protmode(vap); } } else ni->ni_flags |= IEEE80211_NODE_ERP; @@ -2762,7 +2776,6 @@ ieee80211_node_join(struct ieee80211_node *ni, int res IEEE80211_LOCK(ic); IEEE80211_AID_SET(vap, ni->ni_associd); vap->iv_sta_assoc++; - ic->ic_sta_assoc++; if (IEEE80211_IS_CHAN_HT(ic->ic_bsschan)) ieee80211_ht_node_join(ni); @@ -2783,9 +2796,9 @@ ieee80211_node_join(struct ieee80211_node *ni, int res IEEE80211_NOTE(vap, IEEE80211_MSG_ASSOC | IEEE80211_MSG_DEBUG, ni, "station associated at aid %d: %s preamble, %s slot time%s%s%s%s%s%s%s%s%s", IEEE80211_NODE_AID(ni), - ic->ic_flags & IEEE80211_F_SHPREAMBLE ? "short" : "long", + vap->iv_flags & IEEE80211_F_SHPREAMBLE ? "short" : "long", vap->iv_flags & IEEE80211_F_SHSLOT ? "short" : "long", - ic->ic_flags & IEEE80211_F_USEPROT ? ", protection" : "", + vap->iv_flags & IEEE80211_F_USEPROT ? ", protection" : "", ni->ni_flags & IEEE80211_NODE_QOS ? ", QoS" : "", /* XXX update for VHT string */ ni->ni_flags & IEEE80211_NODE_HT ? @@ -2815,20 +2828,23 @@ ieee80211_node_join(struct ieee80211_node *ni, int res } static void -disable_protection(struct ieee80211com *ic) +disable_protection(struct ieee80211vap *vap) { - KASSERT(ic->ic_nonerpsta == 0 && - (ic->ic_flags_ext & IEEE80211_FEXT_NONERP_PR) == 0, - ("%d non ERP stations, flags 0x%x", ic->ic_nonerpsta, - ic->ic_flags_ext)); + struct ieee80211com *ic = vap->iv_ic; - ic->ic_flags &= ~IEEE80211_F_USEPROT; + KASSERT(vap->iv_nonerpsta == 0 && + (vap->iv_flags_ext & IEEE80211_FEXT_NONERP_PR) == 0, + ("%d non ERP stations, flags 0x%x", vap->iv_nonerpsta, + vap->iv_flags_ext)); + + vap->iv_flags &= ~IEEE80211_F_USEPROT; /* XXX verify mode? */ if (ic->ic_caps & IEEE80211_C_SHPREAMBLE) { - ic->ic_flags |= IEEE80211_F_SHPREAMBLE; - ic->ic_flags &= ~IEEE80211_F_USEBARKER; + vap->iv_flags |= IEEE80211_F_SHPREAMBLE; + vap->iv_flags &= ~IEEE80211_F_USEBARKER; } - ieee80211_notify_erp_locked(ic); + ieee80211_vap_update_erp_protmode(vap); + ieee80211_vap_update_preamble(vap); } /* @@ -2850,13 +2866,16 @@ ieee80211_node_leave_11g(struct ieee80211_node *ni) * If a long slot station do the slot time bookkeeping. */ if ((ni->ni_capinfo & IEEE80211_CAPINFO_SHORT_SLOTTIME) == 0) { - KASSERT(ic->ic_longslotsta > 0, - ("bogus long slot station count %d", ic->ic_longslotsta)); - ic->ic_longslotsta--; + KASSERT(vap->iv_longslotsta > 0, + ("bogus long slot station count %d", vap->iv_longslotsta)); + vap->iv_longslotsta--; IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_ASSOC, ni, "long slot time station leaves, count now %d", - ic->ic_longslotsta); - if (ic->ic_longslotsta == 0) { + vap->iv_longslotsta); + /* + * XXX TODO: this may need all VAPs checked! + */ + if (vap->iv_longslotsta == 0) { /* * Re-enable use of short slot time if supported * and not operating in IBSS mode (per spec). @@ -2875,18 +2894,18 @@ ieee80211_node_leave_11g(struct ieee80211_node *ni) * If a non-ERP station do the protection-related bookkeeping. */ if ((ni->ni_flags & IEEE80211_NODE_ERP) == 0) { - KASSERT(ic->ic_nonerpsta > 0, - ("bogus non-ERP station count %d", ic->ic_nonerpsta)); - ic->ic_nonerpsta--; + KASSERT(vap->iv_nonerpsta > 0, + ("bogus non-ERP station count %d", vap->iv_nonerpsta)); + vap->iv_nonerpsta--; IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_ASSOC, ni, - "non-ERP station leaves, count now %d%s", ic->ic_nonerpsta, - (ic->ic_flags_ext & IEEE80211_FEXT_NONERP_PR) ? + "non-ERP station leaves, count now %d%s", vap->iv_nonerpsta, + (vap->iv_flags_ext & IEEE80211_FEXT_NONERP_PR) ? " (non-ERP sta present)" : ""); - if (ic->ic_nonerpsta == 0 && - (ic->ic_flags_ext & IEEE80211_FEXT_NONERP_PR) == 0) { + if (vap->iv_nonerpsta == 0 && + (vap->iv_flags_ext & IEEE80211_FEXT_NONERP_PR) == 0) { IEEE80211_DPRINTF(ni->ni_vap, IEEE80211_MSG_ASSOC, "%s: disable use of protection\n", __func__); - disable_protection(ic); + disable_protection(vap); } } } @@ -2900,20 +2919,18 @@ ieee80211_node_leave_11g(struct ieee80211_node *ni) * condition. */ static void -ieee80211_erp_timeout(struct ieee80211com *ic) +ieee80211_vap_erp_timeout(struct ieee80211vap *vap) { - IEEE80211_LOCK_ASSERT(ic); + IEEE80211_LOCK_ASSERT(vap->iv_ic); - if ((ic->ic_flags_ext & IEEE80211_FEXT_NONERP_PR) && - ieee80211_time_after(ticks, ic->ic_lastnonerp + IEEE80211_NONERP_PRESENT_AGE)) { -#if 0 - IEEE80211_NOTE(vap, IEEE80211_MSG_ASSOC, ni, + if ((vap->iv_flags_ext & IEEE80211_FEXT_NONERP_PR) && + ieee80211_time_after(ticks, vap->iv_lastnonerp + IEEE80211_NONERP_PRESENT_AGE)) { + IEEE80211_DPRINTF(vap, IEEE80211_MSG_ASSOC, "%s", "age out non-ERP sta present on channel"); -#endif - ic->ic_flags_ext &= ~IEEE80211_FEXT_NONERP_PR; - if (ic->ic_nonerpsta == 0) - disable_protection(ic); + vap->iv_flags_ext &= ~IEEE80211_FEXT_NONERP_PR; + if (vap->iv_nonerpsta == 0) + disable_protection(vap); } } @@ -2952,7 +2969,6 @@ ieee80211_node_leave(struct ieee80211_node *ni) IEEE80211_LOCK(ic); IEEE80211_AID_CLR(vap, ni->ni_associd); vap->iv_sta_assoc--; - ic->ic_sta_assoc--; if (IEEE80211_IS_CHAN_VHT(ic->ic_bsschan)) ieee80211_vht_node_leave(ni); Modified: head/sys/net80211/ieee80211_node.h ============================================================================== --- head/sys/net80211/ieee80211_node.h Tue Jun 30 22:01:21 2020 (r362814) +++ head/sys/net80211/ieee80211_node.h Wed Jul 1 00:23:49 2020 (r362815) @@ -479,7 +479,7 @@ int ieee80211_iterate_nodes_vap(struct ieee80211_node_ void ieee80211_iterate_nodes(struct ieee80211_node_table *, ieee80211_iter_func *, void *); -void ieee80211_notify_erp(struct ieee80211com *); +void ieee80211_notify_erp_locked(struct ieee80211com *); void ieee80211_dump_node(struct ieee80211_node_table *, struct ieee80211_node *); void ieee80211_dump_nodes(struct ieee80211_node_table *); Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Tue Jun 30 22:01:21 2020 (r362814) +++ head/sys/net80211/ieee80211_output.c Wed Jul 1 00:23:49 2020 (r362815) @@ -2100,15 +2100,34 @@ ieee80211_add_ssid(uint8_t *frm, const uint8_t *ssid, * Add an erp element to a frame. */ static uint8_t * -ieee80211_add_erp(uint8_t *frm, struct ieee80211com *ic) +ieee80211_add_erp(uint8_t *frm, struct ieee80211vap *vap) { + struct ieee80211com *ic = vap->iv_ic; uint8_t erp; *frm++ = IEEE80211_ELEMID_ERP; *frm++ = 1; erp = 0; - if (ic->ic_nonerpsta != 0) + + /* + * TODO: This uses the global flags for now because + * the per-VAP flags are fine for per-VAP, but don't + * take into account which VAPs share the same channel + * and which are on different channels. + * + * ERP and HT/VHT protection mode is a function of + * how many stations are on a channel, not specifically + * the VAP or global. But, until we grow that status, + * the global flag will have to do. + */ + if (ic->ic_flags_ext & IEEE80211_FEXT_NONERP_PR) erp |= IEEE80211_ERP_NON_ERP_PRESENT; + + /* + * TODO: same as above; these should be based not + * on the vap or ic flags, but instead on a combination + * of per-VAP and channels. + */ if (ic->ic_flags & IEEE80211_F_USEPROT) erp |= IEEE80211_ERP_USE_PROTECTION; if (ic->ic_flags & IEEE80211_F_USEBARKER) @@ -2569,7 +2588,6 @@ ieee80211_send_probereq(struct ieee80211_node *ni, uint16_t ieee80211_getcapinfo(struct ieee80211vap *vap, struct ieee80211_channel *chan) { - struct ieee80211com *ic = vap->iv_ic; uint16_t capinfo; KASSERT(vap->iv_opmode != IEEE80211_M_STA, ("station mode")); @@ -2582,7 +2600,7 @@ ieee80211_getcapinfo(struct ieee80211vap *vap, struct capinfo = 0; if (vap->iv_flags & IEEE80211_F_PRIVACY) capinfo |= IEEE80211_CAPINFO_PRIVACY; - if ((ic->ic_flags & IEEE80211_F_SHPREAMBLE) && + if ((vap->iv_flags & IEEE80211_F_SHPREAMBLE) && IEEE80211_IS_CHAN_2GHZ(chan)) capinfo |= IEEE80211_CAPINFO_SHORT_PREAMBLE; if (vap->iv_flags & IEEE80211_F_SHSLOT) @@ -2761,7 +2779,7 @@ ieee80211_send_mgmt(struct ieee80211_node *ni, int typ * NB: Some 11a AP's reject the request when * short preamble is set. */ - if ((ic->ic_flags & IEEE80211_F_SHPREAMBLE) && + if ((vap->iv_flags & IEEE80211_F_SHPREAMBLE) && IEEE80211_IS_CHAN_2GHZ(ic->ic_curchan)) capinfo |= IEEE80211_CAPINFO_SHORT_PREAMBLE; if (IEEE80211_IS_CHAN_ANYG(ic->ic_curchan) && @@ -3098,7 +3116,7 @@ ieee80211_alloc_proberesp(struct ieee80211_node *bss, } } if (IEEE80211_IS_CHAN_ANYG(bss->ni_chan)) - frm = ieee80211_add_erp(frm, ic); + frm = ieee80211_add_erp(frm, vap); frm = ieee80211_add_xrates(frm, rs); frm = ieee80211_add_rsn(frm, vap); /* @@ -3268,6 +3286,7 @@ ieee80211_alloc_prot(struct ieee80211_node *ni, const uint8_t rate, int prot) { struct ieee80211com *ic = ni->ni_ic; + struct ieee80211vap *vap = ni->ni_vap; const struct ieee80211_frame *wh; struct mbuf *mprot; uint16_t dur; @@ -3279,7 +3298,7 @@ ieee80211_alloc_prot(struct ieee80211_node *ni, const wh = mtod(m, const struct ieee80211_frame *); pktlen = m->m_pkthdr.len + IEEE80211_CRC_LEN; - isshort = (ic->ic_flags & IEEE80211_F_SHPREAMBLE) != 0; + isshort = (vap->iv_flags & IEEE80211_F_SHPREAMBLE) != 0; dur = ieee80211_compute_duration(ic->ic_rt, pktlen, rate, isshort) + ieee80211_ack_duration(ic->ic_rt, rate, isshort); @@ -3288,7 +3307,7 @@ ieee80211_alloc_prot(struct ieee80211_node *ni, const dur += ieee80211_ack_duration(ic->ic_rt, rate, isshort); mprot = ieee80211_alloc_rts(ic, wh->i_addr1, wh->i_addr2, dur); } else - mprot = ieee80211_alloc_cts(ic, ni->ni_vap->iv_myaddr, dur); + mprot = ieee80211_alloc_cts(ic, vap->iv_myaddr, dur); return (mprot); } @@ -3496,7 +3515,7 @@ ieee80211_beacon_construct(struct mbuf *m, uint8_t *fr if (IEEE80211_IS_CHAN_ANYG(ni->ni_chan)) { bo->bo_erp = frm; - frm = ieee80211_add_erp(frm, ic); + frm = ieee80211_add_erp(frm, vap); } frm = ieee80211_add_xrates(frm, rs); frm = ieee80211_add_rsn(frm, vap); @@ -3981,7 +4000,7 @@ ieee80211_beacon_update(struct ieee80211_node *ni, str /* * ERP element needs updating. */ - (void) ieee80211_add_erp(bo->bo_erp, ic); + (void) ieee80211_add_erp(bo->bo_erp, vap); clrbit(bo->bo_flags, IEEE80211_BEACON_ERP); } #ifdef IEEE80211_SUPPORT_SUPERG Modified: head/sys/net80211/ieee80211_power.c ============================================================================== --- head/sys/net80211/ieee80211_power.c Tue Jun 30 22:01:21 2020 (r362814) +++ head/sys/net80211/ieee80211_power.c Wed Jul 1 00:23:49 2020 (r362815) @@ -335,7 +335,7 @@ ieee80211_pwrsave(struct ieee80211_node *ni, struct mb if (psq->psq_len >= psq->psq_maxlen) { psq->psq_drops++; IEEE80211_PSQ_UNLOCK(psq); - IEEE80211_NOTE(vap, IEEE80211_MSG_ANY, ni, + IEEE80211_NOTE(vap, IEEE80211_MSG_POWER, ni, "pwr save q overflow, drops %d (size %d)", psq->psq_drops, psq->psq_len); #ifdef IEEE80211_DEBUG Modified: head/sys/net80211/ieee80211_proto.c ============================================================================== --- head/sys/net80211/ieee80211_proto.c Tue Jun 30 22:01:21 2020 (r362814) +++ head/sys/net80211/ieee80211_proto.c Wed Jul 1 00:23:49 2020 (r362815) @@ -246,6 +246,9 @@ static void update_chw(void *, int); static void vap_update_wme(void *, int); static void vap_update_slot(void *, int); static void restart_vaps(void *, int); +static void vap_update_erp_protmode(void *, int); +static void vap_update_preamble(void *, int); +static void vap_update_ht_protmode(void *, int); static void ieee80211_newstate_cb(void *, int); static int @@ -275,7 +278,7 @@ ieee80211_proto_attach(struct ieee80211com *ic) max_hdr = max_linkhdr + max_protohdr; max_datalen = MHLEN - max_hdr; } - ic->ic_protmode = IEEE80211_PROT_CTSONLY; + //ic->ic_protmode = IEEE80211_PROT_CTSONLY; TASK_INIT(&ic->ic_parent_task, 0, parent_updown, ic); TASK_INIT(&ic->ic_mcast_task, 0, update_mcast, ic); @@ -342,6 +345,9 @@ ieee80211_proto_vattach(struct ieee80211vap *vap) TASK_INIT(&vap->iv_swbmiss_task, 0, beacon_swmiss, vap); TASK_INIT(&vap->iv_wme_task, 0, vap_update_wme, vap); TASK_INIT(&vap->iv_slot_task, 0, vap_update_slot, vap); + TASK_INIT(&vap->iv_erp_protmode_task, 0, vap_update_erp_protmode, vap); + TASK_INIT(&vap->iv_ht_protmode_task, 0, vap_update_ht_protmode, vap); + TASK_INIT(&vap->iv_preamble_task, 0, vap_update_preamble, vap); /* * Install default tx rate handling: no fixed rate, lowest * supported rate for mgmt and multicast frames. Default @@ -388,6 +394,7 @@ ieee80211_proto_vattach(struct ieee80211vap *vap) vap->iv_update_beacon = null_update_beacon; vap->iv_deliver_data = ieee80211_deliver_data; + vap->iv_protmode = IEEE80211_PROT_CTSONLY; /* attach support for operating mode */ ic->ic_vattach[vap->iv_opmode](vap); @@ -763,7 +770,23 @@ ieee80211_vap_reset_erp(struct ieee80211vap *vap) { struct ieee80211com *ic = vap->iv_ic; + vap->iv_nonerpsta = 0; + vap->iv_longslotsta = 0; + + vap->iv_flags &= ~IEEE80211_F_USEPROT; /* + * Set short preamble and ERP barker-preamble flags. + */ + if (IEEE80211_IS_CHAN_A(ic->ic_curchan) || + (vap->iv_caps & IEEE80211_C_SHPREAMBLE)) { + vap->iv_flags |= IEEE80211_F_SHPREAMBLE; + vap->iv_flags &= ~IEEE80211_F_USEBARKER; + } else { + vap->iv_flags &= ~IEEE80211_F_SHPREAMBLE; + vap->iv_flags |= IEEE80211_F_USEBARKER; + } + + /* * Short slot time is enabled only when operating in 11g * and not in an IBSS. We must also honor whether or not * the driver is capable of doing it. @@ -778,13 +801,15 @@ ieee80211_vap_reset_erp(struct ieee80211vap *vap) /* * Reset 11g-related state. + * + * Note this resets the global state and a caller should schedule + * a re-check of all the VAPs after setup to update said state. */ void ieee80211_reset_erp(struct ieee80211com *ic) { +#if 0 ic->ic_flags &= ~IEEE80211_F_USEPROT; - ic->ic_nonerpsta = 0; - ic->ic_longslotsta = 0; /* * Set short preamble and ERP barker-preamble flags. */ @@ -796,6 +821,8 @@ ieee80211_reset_erp(struct ieee80211com *ic) ic->ic_flags &= ~IEEE80211_F_SHPREAMBLE; ic->ic_flags |= IEEE80211_F_USEBARKER; } +#endif + /* XXX TODO: schedule a new per-VAP ERP calculation */ } /* @@ -812,6 +839,9 @@ ieee80211_reset_erp(struct ieee80211com *ic) * If the per-VAP method is not called then the global flags will be * flipped into sync with the VAPs; ic_flags IEEE80211_F_SHSLOT will * be set only if all of the vaps will have it set. + * + * Look at the comments for vap_update_erp_protmode() for more + * background; this assumes all VAPs are on the same channel. */ static void vap_update_slot(void *arg, int npending) @@ -848,7 +878,6 @@ vap_update_slot(void *arg, int npending) else num_lgslot++; } - IEEE80211_UNLOCK(ic); /* * It looks backwards but - if the number of short slot VAPs @@ -860,6 +889,7 @@ vap_update_slot(void *arg, int npending) ic->ic_flags &= ~IEEE80211_F_SHSLOT; else if (num_lgslot == 0) ic->ic_flags |= IEEE80211_F_SHSLOT; + IEEE80211_UNLOCK(ic); /* * Call the driver with our new global slot time flags. @@ -869,6 +899,293 @@ vap_update_slot(void *arg, int npending) } /* + * Deferred ERP protmode update. + * + * This currently calculates the global ERP protection mode flag + * based on each of the VAPs. Any VAP with it enabled is enough + * for the global flag to be enabled. All VAPs with it disabled + * is enough for it to be disabled. + * + * This may make sense right now for the supported hardware where + * net80211 is controlling the single channel configuration, but + * offload firmware that's doing channel changes (eg off-channel + * TDLS, off-channel STA, off-channel P2P STA/AP) may get some + * silly looking flag updates. + * + * Ideally the protection mode calculation is done based on the + * channel, and all VAPs using that channel will inherit it. + * But until that's what net80211 does, this wil have to do. + */ +static void +vap_update_erp_protmode(void *arg, int npending) +{ + struct ieee80211vap *vap = arg; + struct ieee80211com *ic = vap->iv_ic; + struct ieee80211vap *iv; + int enable_protmode = 0; + int non_erp_present = 0; + + /* + * Iterate over all of the VAPs to calculate the overlapping + * ERP protection mode configuration and ERP present math. + * + * For now we assume that if a driver can handle this per-VAP + * then it'll ignore the ic->ic_protmode variant and instead + * will look at the vap related flags. + */ + IEEE80211_LOCK(ic); + TAILQ_FOREACH(iv, &ic->ic_vaps, iv_next) { + if (iv->iv_flags & IEEE80211_F_USEPROT) + enable_protmode = 1; + if (iv->iv_flags_ext & IEEE80211_FEXT_NONERP_PR) + non_erp_present = 1; + } + + if (enable_protmode) + ic->ic_flags |= IEEE80211_F_USEPROT; + else + ic->ic_flags &= ~IEEE80211_F_USEPROT; + + if (non_erp_present) + ic->ic_flags_ext |= IEEE80211_FEXT_NONERP_PR; + else + ic->ic_flags_ext &= ~IEEE80211_FEXT_NONERP_PR; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Jul 1 00:24:56 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E5DD8359899; Wed, 1 Jul 2020 00:24:56 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xMS85pQlz47vg; Wed, 1 Jul 2020 00:24:56 +0000 (UTC) (envelope-from adrian@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 AA6C1208C4; Wed, 1 Jul 2020 00:24:56 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0610OuSg031637; Wed, 1 Jul 2020 00:24:56 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0610Ou1V031633; Wed, 1 Jul 2020 00:24:56 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <202007010024.0610Ou1V031633@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 1 Jul 2020 00:24:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362816 - head/sys/net80211 X-SVN-Group: head X-SVN-Commit-Author: adrian X-SVN-Commit-Paths: head/sys/net80211 X-SVN-Commit-Revision: 362816 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 00:24:57 -0000 Author: adrian Date: Wed Jul 1 00:24:55 2020 New Revision: 362816 URL: https://svnweb.freebsd.org/changeset/base/362816 Log: [net80211] Commit files missing in the previous commit These belong to my previous commit, but apparently I typed ieee80211_vhf.[ch] and forgot ht.h. Le oops. Modified: head/sys/net80211/ieee80211_ht.h head/sys/net80211/ieee80211_vht.c head/sys/net80211/ieee80211_vht.h Modified: head/sys/net80211/ieee80211_ht.h ============================================================================== --- head/sys/net80211/ieee80211_ht.h Wed Jul 1 00:23:49 2020 (r362815) +++ head/sys/net80211/ieee80211_ht.h Wed Jul 1 00:24:55 2020 (r362816) @@ -210,8 +210,8 @@ struct ieee80211_channel *ieee80211_ht_adjust_channel( void ieee80211_ht_wds_init(struct ieee80211_node *); void ieee80211_ht_node_join(struct ieee80211_node *); void ieee80211_ht_node_leave(struct ieee80211_node *); -void ieee80211_htprot_update(struct ieee80211com *, int protmode); -void ieee80211_ht_timeout(struct ieee80211com *); +void ieee80211_htprot_update(struct ieee80211vap *, int protmode); +void ieee80211_ht_timeout(struct ieee80211vap *); void ieee80211_parse_htcap(struct ieee80211_node *, const uint8_t *); void ieee80211_parse_htinfo(struct ieee80211_node *, const uint8_t *); void ieee80211_ht_updateparams(struct ieee80211_node *, const uint8_t *, @@ -241,5 +241,6 @@ void ieee80211_ampdu_rx_stop_ext(struct ieee80211_node int ieee80211_ampdu_tx_request_ext(struct ieee80211_node *ni, int tid); int ieee80211_ampdu_tx_request_active_ext(struct ieee80211_node *ni, int tid, int status); +void ieee80211_htinfo_notify(struct ieee80211vap *vap); #endif /* _NET80211_IEEE80211_HT_H_ */ Modified: head/sys/net80211/ieee80211_vht.c ============================================================================== --- head/sys/net80211/ieee80211_vht.c Wed Jul 1 00:23:49 2020 (r362815) +++ head/sys/net80211/ieee80211_vht.c Wed Jul 1 00:24:55 2020 (r362816) @@ -312,7 +312,7 @@ ieee80211_setup_vht_rates(struct ieee80211_node *ni, } void -ieee80211_vht_timeout(struct ieee80211com *ic) +ieee80211_vht_timeout(struct ieee80211vap *vap) { } Modified: head/sys/net80211/ieee80211_vht.h ============================================================================== --- head/sys/net80211/ieee80211_vht.h Wed Jul 1 00:23:49 2020 (r362815) +++ head/sys/net80211/ieee80211_vht.h Wed Jul 1 00:24:55 2020 (r362816) @@ -45,7 +45,7 @@ int ieee80211_vht_updateparams(struct ieee80211_node * void ieee80211_setup_vht_rates(struct ieee80211_node *, const uint8_t *, const uint8_t *); -void ieee80211_vht_timeout(struct ieee80211com *ic); +void ieee80211_vht_timeout(struct ieee80211vap *vap); void ieee80211_vht_node_join(struct ieee80211_node *ni); void ieee80211_vht_node_leave(struct ieee80211_node *ni); From owner-svn-src-all@freebsd.org Wed Jul 1 00:33:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B7199359D49; Wed, 1 Jul 2020 00:33:18 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xMdp498Yz48Rk; Wed, 1 Jul 2020 00:33:18 +0000 (UTC) (envelope-from gonzo@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 7214120B9B; Wed, 1 Jul 2020 00:33:18 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0610XINM037438; Wed, 1 Jul 2020 00:33:18 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0610XGUm037426; Wed, 1 Jul 2020 00:33:16 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <202007010033.0610XGUm037426@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Wed, 1 Jul 2020 00:33:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362817 - in head/sys: arm/freescale/imx arm64/conf arm64/freescale arm64/freescale/imx arm64/freescale/imx/clk conf dev/ffec dev/uart modules/dtb/imx8 X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: in head/sys: arm/freescale/imx arm64/conf arm64/freescale arm64/freescale/imx arm64/freescale/imx/clk conf dev/ffec dev/uart modules/dtb/imx8 X-SVN-Commit-Revision: 362817 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 00:33:18 -0000 Author: gonzo Date: Wed Jul 1 00:33:16 2020 New Revision: 362817 URL: https://svnweb.freebsd.org/changeset/base/362817 Log: Add i.MX 8M Quad support - Add CCM driver and clocks implementations for i.MX 8M - Add GPC driver for iMX8 - Add clock tree for i.MX 8M Quad - Add clocks support and new compat strings (where required) for existing i.MX 6 UART, I2C, and GPIO drivers - Enable aarch64-compatible drivers form i.MX 6 in arm64 GENERIC kernel config - Add dtb/imx8 kernel module with DTBs for Nitrogen8M and iMX8MQ EVK With this patch both Nitrogen8M and iMX8MQ EVK boot with NFS root up to multiuser login prompt Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D25274 Added: head/sys/arm64/freescale/ head/sys/arm64/freescale/imx/ head/sys/arm64/freescale/imx/clk/ head/sys/arm64/freescale/imx/clk/imx_clk_composite.c (contents, props changed) head/sys/arm64/freescale/imx/clk/imx_clk_composite.h (contents, props changed) head/sys/arm64/freescale/imx/clk/imx_clk_frac_pll.c (contents, props changed) head/sys/arm64/freescale/imx/clk/imx_clk_frac_pll.h (contents, props changed) head/sys/arm64/freescale/imx/clk/imx_clk_gate.c (contents, props changed) head/sys/arm64/freescale/imx/clk/imx_clk_gate.h (contents, props changed) head/sys/arm64/freescale/imx/clk/imx_clk_mux.c (contents, props changed) head/sys/arm64/freescale/imx/clk/imx_clk_mux.h (contents, props changed) head/sys/arm64/freescale/imx/clk/imx_clk_sscg_pll.c (contents, props changed) head/sys/arm64/freescale/imx/clk/imx_clk_sscg_pll.h (contents, props changed) head/sys/arm64/freescale/imx/imx7gpc.c (contents, props changed) head/sys/arm64/freescale/imx/imx8mq_ccm.c (contents, props changed) head/sys/arm64/freescale/imx/imx8mq_ccm.h (contents, props changed) head/sys/arm64/freescale/imx/imx_ccm_clk.h (contents, props changed) head/sys/modules/dtb/imx8/ head/sys/modules/dtb/imx8/Makefile (contents, props changed) Modified: head/sys/arm/freescale/imx/imx_gpio.c head/sys/arm/freescale/imx/imx_i2c.c head/sys/arm/freescale/imx/imx_iomux.c head/sys/arm64/conf/GENERIC head/sys/conf/files head/sys/conf/files.arm64 head/sys/conf/options.arm64 head/sys/dev/ffec/if_ffec.c head/sys/dev/uart/uart_dev_imx.c Modified: head/sys/arm/freescale/imx/imx_gpio.c ============================================================================== --- head/sys/arm/freescale/imx/imx_gpio.c Wed Jul 1 00:24:55 2020 (r362816) +++ head/sys/arm/freescale/imx/imx_gpio.c Wed Jul 1 00:33:16 2020 (r362817) @@ -57,6 +57,14 @@ __FBSDID("$FreeBSD$"); #include #include +#if defined(EXT_RESOURCES) && defined(__aarch64__) +#define IMX_ENABLE_CLOCKS +#endif + +#ifdef IMX_ENABLE_CLOCKS +#include +#endif + #include "gpio_if.h" #ifdef INTRNG @@ -119,13 +127,17 @@ struct imx51_gpio_softc { #ifdef INTRNG struct gpio_irqsrc gpio_pic_irqsrc[NGPIO]; #endif +#ifdef IMX_ENABLE_CLOCKS + clk_t clk; +#endif }; static struct ofw_compat_data compat_data[] = { - {"fsl,imx6q-gpio", 1}, - {"fsl,imx53-gpio", 1}, - {"fsl,imx51-gpio", 1}, - {NULL, 0} + {"fsl,imx8mq-gpio", 1}, + {"fsl,imx6q-gpio", 1}, + {"fsl,imx53-gpio", 1}, + {"fsl,imx51-gpio", 1}, + {NULL, 0} }; static struct resource_spec imx_gpio_spec[] = { @@ -788,6 +800,9 @@ imx51_gpio_attach(device_t dev) { struct imx51_gpio_softc *sc; int i, irq, unit; +#ifdef IMX_ENABLE_CLOCKS + int err; +#endif sc = device_get_softc(dev); sc->dev = dev; @@ -795,6 +810,19 @@ imx51_gpio_attach(device_t dev) mtx_init(&sc->sc_mtx, device_get_nameunit(sc->dev), NULL, MTX_SPIN); +#ifdef IMX_ENABLE_CLOCKS + if (clk_get_by_ofw_index(sc->dev, 0, 0, &sc->clk) != 0) { + device_printf(dev, "could not get clock"); + return (ENOENT); + } + + err = clk_enable(sc->clk); + if (err != 0) { + device_printf(sc->dev, "could not enable ipg clock\n"); + return (err); + } +#endif + if (bus_alloc_resources(dev, imx_gpio_spec, sc->sc_res)) { device_printf(dev, "could not allocate resources\n"); bus_release_resources(dev, imx_gpio_spec, sc->sc_res); @@ -850,8 +878,19 @@ imx51_gpio_detach(device_t dev) { int irq; struct imx51_gpio_softc *sc; +#ifdef IMX_ENABLE_CLOCKS + int error; +#endif sc = device_get_softc(dev); + +#ifdef IMX_ENABLE_CLOCKS + error = clk_disable(sc->clk); + if (error != 0) { + device_printf(sc->dev, "could not disable ipg clock\n"); + return (error); + } +#endif gpiobus_detach_bus(dev); for (irq = 0; irq < NUM_IRQRES; irq++) { Modified: head/sys/arm/freescale/imx/imx_i2c.c ============================================================================== --- head/sys/arm/freescale/imx/imx_i2c.c Wed Jul 1 00:24:55 2020 (r362816) +++ head/sys/arm/freescale/imx/imx_i2c.c Wed Jul 1 00:33:16 2020 (r362817) @@ -73,6 +73,14 @@ __FBSDID("$FreeBSD$"); #include #include +#if defined(EXT_RESOURCES) && defined(__aarch64__) +#define IMX_ENABLE_CLOCKS +#endif + +#ifdef IMX_ENABLE_CLOCKS +#include +#endif + #define I2C_ADDR_REG 0x00 /* I2C slave address register */ #define I2C_FDR_REG 0x04 /* I2C frequency divider register */ #define I2C_CONTROL_REG 0x08 /* I2C control register */ @@ -125,6 +133,7 @@ static struct clkdiv clkdiv_table[] = { }; static struct ofw_compat_data compat_data[] = { + {"fsl,imx21-i2c", 1}, {"fsl,imx6q-i2c", 1}, {"fsl,imx-i2c", 1}, {NULL, 0} @@ -141,6 +150,9 @@ struct i2c_softc { gpio_pin_t rb_sdapin; u_int debug; u_int slave; +#ifdef IMX_ENABLE_CLOCKS + clk_t ipgclk; +#endif }; #define DEVICE_DEBUGF(sc, lvl, fmt, args...) \ @@ -385,6 +397,19 @@ i2c_attach(device_t dev) sc->dev = dev; sc->rid = 0; +#ifdef IMX_ENABLE_CLOCKS + if (clk_get_by_ofw_index(sc->dev, 0, 0, &sc->ipgclk) != 0) { + device_printf(dev, "could not get ipg clock"); + return (ENOENT); + } + + err = clk_enable(sc->ipgclk); + if (err != 0) { + device_printf(sc->dev, "could not enable ipg clock\n"); + return (err); + } +#endif + sc->res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->rid, RF_ACTIVE); if (sc->res == NULL) { @@ -459,6 +484,14 @@ i2c_detach(device_t dev) sc = device_get_softc(dev); +#ifdef IMX_ENABLE_CLOCKS + error = clk_disable(sc->ipgclk); + if (error != 0) { + device_printf(sc->dev, "could not disable ipg clock\n"); + return (error); + } +#endif + if ((error = bus_generic_detach(sc->dev)) != 0) { device_printf(sc->dev, "cannot detach child devices\n"); return (error); @@ -571,6 +604,10 @@ i2c_reset(device_t dev, u_char speed, u_char addr, u_c { struct i2c_softc *sc; u_int busfreq, div, i, ipgfreq; +#ifdef IMX_ENABLE_CLOCKS + int err; + uint64_t freq; +#endif sc = device_get_softc(dev); @@ -580,7 +617,16 @@ i2c_reset(device_t dev, u_char speed, u_char addr, u_c * Look up the divisor that gives the nearest speed that doesn't exceed * the configured value for the bus. */ +#ifdef IMX_ENABLE_CLOCKS + err = clk_get_freq(sc->ipgclk, &freq); + if (err != 0) { + device_printf(sc->dev, "cannot get frequency\n"); + return (err); + } + ipgfreq = (int32_t)freq; +#else ipgfreq = imx_ccm_ipg_hz(); +#endif busfreq = IICBUS_GET_FREQUENCY(sc->iicbus, speed); div = howmany(ipgfreq, busfreq); for (i = 0; i < nitems(clkdiv_table); i++) { Modified: head/sys/arm/freescale/imx/imx_iomux.c ============================================================================== --- head/sys/arm/freescale/imx/imx_iomux.c Wed Jul 1 00:24:55 2020 (r362816) +++ head/sys/arm/freescale/imx/imx_iomux.c Wed Jul 1 00:33:16 2020 (r362817) @@ -76,6 +76,7 @@ struct iomux_softc { static struct iomux_softc *iomux_sc; static struct ofw_compat_data compat_data[] = { + {"fsl,imx8mq-iomuxc", true}, {"fsl,imx6dl-iomuxc", true}, {"fsl,imx6q-iomuxc", true}, {"fsl,imx6sl-iomuxc", true}, Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Wed Jul 1 00:24:55 2020 (r362816) +++ head/sys/arm64/conf/GENERIC Wed Jul 1 00:33:16 2020 (r362817) @@ -113,6 +113,7 @@ options SOC_ALLWINNER_A64 options SOC_ALLWINNER_H5 options SOC_ALLWINNER_H6 options SOC_CAVM_THUNDERX +options SOC_FREESCALE_IMX8 options SOC_HISI_HI6220 options SOC_INTEL_STRATIX10 options SOC_BRCM_BCM2837 @@ -172,6 +173,7 @@ device al_eth # Annapurna Alpine Ethernet NIC device dwc_rk # Rockchip Designware device dwc_socfpga # Altera SOCFPGA Ethernet MAC device genet # Broadcom on RPi4 +device ffec # iMX FFEC # Etherswitch devices device etherswitch # Enable etherswitch support @@ -205,6 +207,7 @@ device rk_emmcphy # Serial (COM) ports device uart # Generic UART driver +device uart_imx # iMX8 UART device uart_msm # Qualcomm MSM UART driver device uart_mu # RPI3 aux port device uart_mvebu # Armada 3700 UART driver @@ -265,6 +268,7 @@ device rk_i2c # RockChip I2C controller device syr827 # Silergy SYR827 PMIC device sy8106a # SY8106A Buck Regulator device vf_i2c # Freescale Vybrid I2C controller +device fsliic # Freescale iMX I2C controller # Clock and reset controllers device aw_ccu # Allwinner clock controller @@ -352,4 +356,4 @@ options FDT device acpi # DTBs -makeoptions MODULES_EXTRA="dtb/allwinner dtb/mv dtb/rockchip dtb/rpi" +makeoptions MODULES_EXTRA="dtb/allwinner dtb/imx8 dtb/mv dtb/rockchip dtb/rpi" Added: head/sys/arm64/freescale/imx/clk/imx_clk_composite.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/freescale/imx/clk/imx_clk_composite.c Wed Jul 1 00:33:16 2020 (r362817) @@ -0,0 +1,309 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Emmanuel Vadot + * + * 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 ``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. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include + +#include + +#include "clkdev_if.h" + +#define TARGET_ROOT_ENABLE (1 << 28) +#define TARGET_ROOT_MUX(n) ((n) << 24) +#define TARGET_ROOT_MUX_MASK (7 << 24) +#define TARGET_ROOT_MUX_SHIFT 24 +#define TARGET_ROOT_PRE_PODF(n) ((((n) - 1) & 0x7) << 16) +#define TARGET_ROOT_PRE_PODF_MASK (0x7 << 16) +#define TARGET_ROOT_PRE_PODF_SHIFT 16 +#define TARGET_ROOT_PRE_PODF_MAX 7 +#define TARGET_ROOT_POST_PODF(n) ((((n) - 1) & 0x3f) << 0) +#define TARGET_ROOT_POST_PODF_MASK (0x3f << 0) +#define TARGET_ROOT_POST_PODF_SHIFT 0 +#define TARGET_ROOT_POST_PODF_MAX 0x3f + +struct imx_clk_composite_sc { + uint32_t offset; + uint32_t flags; +}; + +#define WRITE4(_clk, off, val) \ + CLKDEV_WRITE_4(clknode_get_device(_clk), off, val) +#define READ4(_clk, off, val) \ + CLKDEV_READ_4(clknode_get_device(_clk), off, val) +#define DEVICE_LOCK(_clk) \ + CLKDEV_DEVICE_LOCK(clknode_get_device(_clk)) +#define DEVICE_UNLOCK(_clk) \ + CLKDEV_DEVICE_UNLOCK(clknode_get_device(_clk)) + +#define IMX_CLK_COMPOSITE_MASK_SHIFT 16 + +#if 0 +#define dprintf(format, arg...) \ + printf("%s:(%s)" format, __func__, clknode_get_name(clk), arg) +#else +#define dprintf(format, arg...) +#endif + +static int +imx_clk_composite_init(struct clknode *clk, device_t dev) +{ + struct imx_clk_composite_sc *sc; + uint32_t val, idx; + + sc = clknode_get_softc(clk); + + DEVICE_LOCK(clk); + READ4(clk, sc->offset, &val); + DEVICE_UNLOCK(clk); + idx = (val & TARGET_ROOT_MUX_MASK) >> TARGET_ROOT_MUX_SHIFT; + + clknode_init_parent_idx(clk, idx); + + return (0); +} + +static int +imx_clk_composite_set_gate(struct clknode *clk, bool enable) +{ + struct imx_clk_composite_sc *sc; + uint32_t val = 0; + + sc = clknode_get_softc(clk); + + dprintf("%sabling gate\n", enable ? "En" : "Dis"); + DEVICE_LOCK(clk); + READ4(clk, sc->offset, &val); + if (enable) + val |= TARGET_ROOT_ENABLE; + else + val &= ~(TARGET_ROOT_ENABLE); + WRITE4(clk, sc->offset, val); + DEVICE_UNLOCK(clk); + + return (0); +} + +static int +imx_clk_composite_set_mux(struct clknode *clk, int index) +{ + struct imx_clk_composite_sc *sc; + uint32_t val = 0; + + sc = clknode_get_softc(clk); + + dprintf("Set mux to %d\n", index); + DEVICE_LOCK(clk); + READ4(clk, sc->offset, &val); + val &= ~(TARGET_ROOT_MUX_MASK); + val |= TARGET_ROOT_MUX(index); + WRITE4(clk, sc->offset, val); + DEVICE_UNLOCK(clk); + + return (0); +} + +static int +imx_clk_composite_recalc(struct clknode *clk, uint64_t *freq) +{ + struct imx_clk_composite_sc *sc; + uint32_t reg, pre_div, post_div; + + sc = clknode_get_softc(clk); + + DEVICE_LOCK(clk); + READ4(clk, sc->offset, ®); + DEVICE_UNLOCK(clk); + + pre_div = ((reg & TARGET_ROOT_PRE_PODF_MASK) + >> TARGET_ROOT_PRE_PODF_SHIFT) + 1; + post_div = ((reg & TARGET_ROOT_POST_PODF_MASK) + >> TARGET_ROOT_POST_PODF_SHIFT) + 1; + + dprintf("parent_freq=%ju, div=%u\n", *freq, div); + *freq = *freq / pre_div / post_div; + dprintf("Final freq=%ju\n", *freq); + return (0); +} + +static int +imx_clk_composite_find_best(uint64_t fparent, uint64_t ftarget, + uint32_t *pre_div, uint32_t *post_div, int flags) +{ + uint32_t prediv, postdiv, best_prediv, best_postdiv; + int64_t diff, best_diff; + uint64_t cur; + + best_diff = INT64_MAX; + for (prediv = 1; prediv <= TARGET_ROOT_PRE_PODF_MAX + 1; prediv++) { + for (postdiv = 1; postdiv <= TARGET_ROOT_POST_PODF_MAX + 1; postdiv++) { + cur= fparent / prediv / postdiv; + diff = (int64_t)ftarget - (int64_t)cur; + if (flags & CLK_SET_ROUND_DOWN) { + if (diff >= 0 && diff < best_diff) { + best_diff = diff; + best_prediv = prediv; + best_postdiv = postdiv; + } + } + else if (flags & CLK_SET_ROUND_UP) { + if (diff <= 0 && abs(diff) < best_diff) { + best_diff = diff; + best_prediv = prediv; + best_postdiv = postdiv; + } + } + else { + if (abs(diff) < best_diff) { + best_diff = abs(diff); + best_prediv = prediv; + best_postdiv = postdiv; + } + } + } + } + + if (best_diff == INT64_MAX) + return (ERANGE); + + *pre_div = best_prediv; + *post_div = best_postdiv; + + return (0); +} + +static int +imx_clk_composite_set_freq(struct clknode *clk, uint64_t fparent, uint64_t *fout, + int flags, int *stop) +{ + struct imx_clk_composite_sc *sc; + struct clknode *p_clk; + const char **p_names; + int p_idx, best_parent; + int64_t best_diff, diff; + int32_t best_pre_div, best_post_div, pre_div, post_div; + uint64_t cur, best; + uint32_t val; + + sc = clknode_get_softc(clk); + dprintf("Finding best parent/div for target freq of %ju\n", *fout); + p_names = clknode_get_parent_names(clk); + + best_diff = 0; + + for (p_idx = 0; p_idx != clknode_get_parents_num(clk); p_idx++) { + p_clk = clknode_find_by_name(p_names[p_idx]); + clknode_get_freq(p_clk, &fparent); + dprintf("Testing with parent %s (%d) at freq %ju\n", + clknode_get_name(p_clk), p_idx, fparent); + + if (!imx_clk_composite_find_best(fparent, *fout, &pre_div, &post_div, sc->flags)) + continue; + cur = fparent / pre_div / post_div; + diff = abs((int64_t)*fout - (int64_t)cur); + if (diff < best_diff) { + best = cur; + best_diff = diff; + best_pre_div = pre_div; + best_post_div = pre_div; + best_parent = p_idx; + dprintf("Best parent so far %s (%d) with best freq at " + "%ju\n", clknode_get_name(p_clk), p_idx, best); + } + } + + *stop = 1; + if (best_diff == INT64_MAX) + return (ERANGE); + + if ((flags & CLK_SET_DRYRUN) != 0) { + *fout = best; + return (0); + } + + p_idx = clknode_get_parent_idx(clk); + if (p_idx != best_parent) { + dprintf("Switching parent index from %d to %d\n", p_idx, + best_parent); + clknode_set_parent_by_idx(clk, best_parent); + } + + dprintf("Setting dividers to pre=%d, post=%d\n", best_pre_div, best_post_div); + + DEVICE_LOCK(clk); + READ4(clk, sc->offset, &val); + val &= ~(TARGET_ROOT_PRE_PODF_MASK | TARGET_ROOT_POST_PODF_MASK); + val |= TARGET_ROOT_PRE_PODF(pre_div); + val |= TARGET_ROOT_POST_PODF(post_div); + DEVICE_UNLOCK(clk); + + *fout = best; + return (0); +} + +static clknode_method_t imx_clk_composite_clknode_methods[] = { + /* Device interface */ + CLKNODEMETHOD(clknode_init, imx_clk_composite_init), + CLKNODEMETHOD(clknode_set_gate, imx_clk_composite_set_gate), + CLKNODEMETHOD(clknode_set_mux, imx_clk_composite_set_mux), + CLKNODEMETHOD(clknode_recalc_freq, imx_clk_composite_recalc), + CLKNODEMETHOD(clknode_set_freq, imx_clk_composite_set_freq), + CLKNODEMETHOD_END +}; + +DEFINE_CLASS_1(imx_clk_composite_clknode, imx_clk_composite_clknode_class, + imx_clk_composite_clknode_methods, sizeof(struct imx_clk_composite_sc), + clknode_class); + +int +imx_clk_composite_register(struct clkdom *clkdom, + struct imx_clk_composite_def *clkdef) +{ + struct clknode *clk; + struct imx_clk_composite_sc *sc; + + clk = clknode_create(clkdom, &imx_clk_composite_clknode_class, + &clkdef->clkdef); + if (clk == NULL) + return (1); + + sc = clknode_get_softc(clk); + + sc->offset = clkdef->offset; + sc->flags = clkdef->flags; + + clknode_register(clkdom, clk); + + return (0); +} Added: head/sys/arm64/freescale/imx/clk/imx_clk_composite.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/freescale/imx/clk/imx_clk_composite.h Wed Jul 1 00:33:16 2020 (r362817) @@ -0,0 +1,45 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright 2018 Emmanuel Vadot + * + * 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 _IMX_CLK_COMPOSITE_H_ +#define _IMX_CLK_COMPOSITE_H_ + +#include + +struct imx_clk_composite_def { + struct clknode_init_def clkdef; + + uint32_t offset; + uint32_t flags; +}; + +int imx_clk_composite_register(struct clkdom *clkdom, + struct imx_clk_composite_def *clkdef); + +#endif /* _IMX_CLK_COMPOSITE_H_ */ Added: head/sys/arm64/freescale/imx/clk/imx_clk_frac_pll.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/freescale/imx/clk/imx_clk_frac_pll.c Wed Jul 1 00:33:16 2020 (r362817) @@ -0,0 +1,177 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2020 Oleksandr Tymoshenko + * + * 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 ``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. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include + +#include + +#include "clkdev_if.h" + +struct imx_clk_frac_pll_sc { + uint32_t offset; +}; + +#define WRITE4(_clk, off, val) \ + CLKDEV_WRITE_4(clknode_get_device(_clk), off, val) +#define READ4(_clk, off, val) \ + CLKDEV_READ_4(clknode_get_device(_clk), off, val) +#define DEVICE_LOCK(_clk) \ + CLKDEV_DEVICE_LOCK(clknode_get_device(_clk)) +#define DEVICE_UNLOCK(_clk) \ + CLKDEV_DEVICE_UNLOCK(clknode_get_device(_clk)) + +#define CFG0 0 +#define CFG0_PLL_LOCK (1 << 31) +#define CFG0_PD (1 << 19) +#define CFG0_BYPASS (1 << 14) +#define CFG0_NEWDIV_VAL (1 << 12) +#define CFG0_NEWDIV_ACK (1 << 11) +#define CFG0_OUTPUT_DIV_MASK (0x1f << 0) +#define CFG0_OUTPUT_DIV_SHIFT 0 +#define CFG1 4 +#define CFG1_FRAC_DIV_MASK (0xffffff << 7) +#define CFG1_FRAC_DIV_SHIFT 7 +#define CFG1_INT_DIV_MASK (0x7f << 0) +#define CFG1_INT_DIV_SHIFT 0 + +#if 0 +#define dprintf(format, arg...) \ + printf("%s:(%s)" format, __func__, clknode_get_name(clk), arg) +#else +#define dprintf(format, arg...) +#endif + +static int +imx_clk_frac_pll_init(struct clknode *clk, device_t dev) +{ + + clknode_init_parent_idx(clk, 0); + return (0); +} + +static int +imx_clk_frac_pll_set_gate(struct clknode *clk, bool enable) +{ + struct imx_clk_frac_pll_sc *sc; + uint32_t cfg0; + int timeout; + + sc = clknode_get_softc(clk); + + DEVICE_LOCK(clk); + READ4(clk, sc->offset + CFG0, &cfg0); + if (enable) + cfg0 &= ~(CFG0_PD); + else + cfg0 |= CFG0_PD; + WRITE4(clk, sc->offset + CFG0, cfg0); + + /* Wait for PLL to lock */ + if (enable && ((cfg0 & CFG0_BYPASS) == 0)) { + for (timeout = 1000; timeout; timeout--) { + READ4(clk, sc->offset + CFG0, &cfg0); + if (cfg0 & CFG0_PLL_LOCK) + break; + DELAY(1); + } + } + + DEVICE_UNLOCK(clk); + + return (0); +} + +static int +imx_clk_frac_pll_recalc(struct clknode *clk, uint64_t *freq) +{ + struct imx_clk_frac_pll_sc *sc; + uint32_t cfg0, cfg1; + uint64_t div, divfi, divff, divf_val; + + sc = clknode_get_softc(clk); + + DEVICE_LOCK(clk); + READ4(clk, sc->offset + CFG0, &cfg0); + READ4(clk, sc->offset + CFG1, &cfg1); + DEVICE_UNLOCK(clk); + + div = (cfg0 & CFG0_OUTPUT_DIV_MASK) >> CFG0_OUTPUT_DIV_SHIFT; + div = (div + 1) * 2; + divff = (cfg1 & CFG1_FRAC_DIV_MASK) >> CFG1_FRAC_DIV_SHIFT; + divfi = (cfg1 & CFG1_INT_DIV_MASK) >> CFG1_INT_DIV_SHIFT; + + /* PLL is bypassed */ + if (cfg0 & CFG0_BYPASS) + return (0); + + divf_val = 1 + divfi + (divff/0x1000000); + *freq = *freq * 8 * divf_val / div; + + return (0); +} + +static clknode_method_t imx_clk_frac_pll_clknode_methods[] = { + /* Device interface */ + CLKNODEMETHOD(clknode_init, imx_clk_frac_pll_init), + CLKNODEMETHOD(clknode_set_gate, imx_clk_frac_pll_set_gate), + CLKNODEMETHOD(clknode_recalc_freq, imx_clk_frac_pll_recalc), + CLKNODEMETHOD_END +}; + +DEFINE_CLASS_1(imx_clk_frac_pll_clknode, imx_clk_frac_pll_clknode_class, + imx_clk_frac_pll_clknode_methods, sizeof(struct imx_clk_frac_pll_sc), + clknode_class); + +int +imx_clk_frac_pll_register(struct clkdom *clkdom, + struct imx_clk_frac_pll_def *clkdef) +{ + struct clknode *clk; + struct imx_clk_frac_pll_sc *sc; + + clk = clknode_create(clkdom, &imx_clk_frac_pll_clknode_class, + &clkdef->clkdef); + if (clk == NULL) + return (1); + + sc = clknode_get_softc(clk); + + sc->offset = clkdef->offset; + + clknode_register(clkdom, clk); + + return (0); +} Added: head/sys/arm64/freescale/imx/clk/imx_clk_frac_pll.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/freescale/imx/clk/imx_clk_frac_pll.h Wed Jul 1 00:33:16 2020 (r362817) @@ -0,0 +1,42 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2020 Oleksandr Tymoshenko + * + * 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 _IMX_CLK_FRAC_PLL_H_ +#define _IMX_CLK_FRAC_PLL_H_ + +#include + +struct imx_clk_frac_pll_def { + struct clknode_init_def clkdef; + uint32_t offset; +}; + +int imx_clk_frac_pll_register(struct clkdom *clkdom, struct imx_clk_frac_pll_def *clkdef); + +#endif /* _IMX_CLK_FRAC_PLL_H_ */ Added: head/sys/arm64/freescale/imx/clk/imx_clk_gate.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/freescale/imx/clk/imx_clk_gate.c Wed Jul 1 00:33:16 2020 (r362817) @@ -0,0 +1,117 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright 2016 Michal Meloun + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include + +#include + +#include "clkdev_if.h" + +#define WR4(_clk, off, val) \ + CLKDEV_WRITE_4(clknode_get_device(_clk), off, val) +#define RD4(_clk, off, val) \ + CLKDEV_READ_4(clknode_get_device(_clk), off, val) +#define MD4(_clk, off, clr, set ) \ + CLKDEV_MODIFY_4(clknode_get_device(_clk), off, clr, set) +#define DEVICE_LOCK(_clk) \ + CLKDEV_DEVICE_LOCK(clknode_get_device(_clk)) +#define DEVICE_UNLOCK(_clk) \ + CLKDEV_DEVICE_UNLOCK(clknode_get_device(_clk)) + +static int imx_clk_gate_init(struct clknode *clk, device_t dev); +static int imx_clk_gate_set_gate(struct clknode *clk, bool enable); +struct imx_clk_gate_sc { + uint32_t offset; + uint32_t shift; + uint32_t mask; + int gate_flags; +}; + +static clknode_method_t imx_clk_gate_methods[] = { + /* Device interface */ + CLKNODEMETHOD(clknode_init, imx_clk_gate_init), + CLKNODEMETHOD(clknode_set_gate, imx_clk_gate_set_gate), + CLKNODEMETHOD_END +}; +DEFINE_CLASS_1(imx_clk_gate, imx_clk_gate_class, imx_clk_gate_methods, + sizeof(struct imx_clk_gate_sc), clknode_class); + +static int +imx_clk_gate_init(struct clknode *clk, device_t dev) +{ + + clknode_init_parent_idx(clk, 0); + return(0); +} + +static int +imx_clk_gate_set_gate(struct clknode *clk, bool enable) +{ + uint32_t reg; + struct imx_clk_gate_sc *sc; + int rv; + + sc = clknode_get_softc(clk); + DEVICE_LOCK(clk); + rv = MD4(clk, sc->offset, sc->mask << sc->shift, + (enable ? sc->mask : 0) << sc->shift); + if (rv != 0) { + DEVICE_UNLOCK(clk); + return (rv); + } + RD4(clk, sc->offset, ®); + DEVICE_UNLOCK(clk); + return(0); +} + +int +imx_clk_gate_register(struct clkdom *clkdom, struct imx_clk_gate_def *clkdef) +{ + struct clknode *clk; + struct imx_clk_gate_sc *sc; + + clk = clknode_create(clkdom, &imx_clk_gate_class, &clkdef->clkdef); + if (clk == NULL) + return (1); + + sc = clknode_get_softc(clk); + sc->offset = clkdef->offset; + sc->shift = clkdef->shift; + sc->mask = clkdef->mask; + sc->gate_flags = clkdef->gate_flags; + + clknode_register(clkdom, clk); + return (0); +} Added: head/sys/arm64/freescale/imx/clk/imx_clk_gate.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/freescale/imx/clk/imx_clk_gate.h Wed Jul 1 00:33:16 2020 (r362817) @@ -0,0 +1,45 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright 2018 Emmanuel Vadot + * + * 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 _IMX_CLK_GATE_H_ +#define _IMX_CLK_GATE_H_ + +#include + +struct imx_clk_gate_def { + struct clknode_init_def clkdef; + uint32_t offset; + uint32_t shift; + uint32_t mask; + int gate_flags; +}; + +int imx_clk_gate_register(struct clkdom *clkdom, struct imx_clk_gate_def *clkdef); + +#endif /* _IMX_CLK_GATE_H_ */ Added: head/sys/arm64/freescale/imx/clk/imx_clk_mux.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/freescale/imx/clk/imx_clk_mux.c Wed Jul 1 00:33:16 2020 (r362817) @@ -0,0 +1,138 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright 2016 Michal Meloun + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Jul 1 00:59:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3963A359BD4; Wed, 1 Jul 2020 00:59:29 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xND10TG6z48yD; Wed, 1 Jul 2020 00:59:29 +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 E435720B6E; Wed, 1 Jul 2020 00:59:28 +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 0610xSnJ050329; Wed, 1 Jul 2020 00:59:28 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0610xSZL050327; Wed, 1 Jul 2020 00:59:28 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202007010059.0610xSZL050327@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 1 Jul 2020 00:59:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362818 - in head/secure/lib: libcrypto libssl X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/secure/lib: libcrypto libssl X-SVN-Commit-Revision: 362818 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 00:59:29 -0000 Author: cem Date: Wed Jul 1 00:59:28 2020 New Revision: 362818 URL: https://svnweb.freebsd.org/changeset/base/362818 Log: Replace OPENSSL_NO_SSL3_METHODs with dummies SSLv3 has been deprecated since 2015 (and broken since 2014: "POODLE"); it should not have shipped in FreeBSD 11 (2016) or 12 (2018). No one should use it, and if they must, they can use some implementation outside of base. There are three symbols removed with OPENSSL_NO_SSL3_METHOD: SSLv3_client_method SSLv3_method SSLv3_server_method These symbols exist to request an explicit SSLv3 connection to a server. There is no good reason for an application to link or invoke these symbols instead of TLS_method(), et al (née SSLv23_method, et al). Applications that do so have broken cryptography. Define these symbols for some pedantic definition of ABI stability, but remove the functionality again (r361392) after r362620. Reviewed by: gordon, jhb (earlier-but-equivalent version both) Discussed with: bjk, kib Differential Revision: https://reviews.freebsd.org/D25493 Added: head/secure/lib/libssl/dummy_abi.c (contents, props changed) Modified: head/secure/lib/libcrypto/opensslconf.h.in head/secure/lib/libssl/Makefile Modified: head/secure/lib/libcrypto/opensslconf.h.in ============================================================================== --- head/secure/lib/libcrypto/opensslconf.h.in Wed Jul 1 00:33:16 2020 (r362817) +++ head/secure/lib/libcrypto/opensslconf.h.in Wed Jul 1 00:59:28 2020 (r362818) @@ -79,6 +79,9 @@ extern "C" { #ifndef OPENSSL_NO_SSL3 # define OPENSSL_NO_SSL3 #endif +#ifndef OPENSSL_NO_SSL3_METHOD +# define OPENSSL_NO_SSL3_METHOD +#endif #ifndef OPENSSL_NO_UBSAN # define OPENSSL_NO_UBSAN #endif Modified: head/secure/lib/libssl/Makefile ============================================================================== --- head/secure/lib/libssl/Makefile Wed Jul 1 00:33:16 2020 (r362817) +++ head/secure/lib/libssl/Makefile Wed Jul 1 00:59:28 2020 (r362818) @@ -22,6 +22,8 @@ SRCS+= ssl3_record.c ssl3_record_tls13.c SRCS+= extensions.c extensions_clnt.c extensions_cust.c extensions_srvr.c SRCS+= statem.c statem_clnt.c statem_dtls.c statem_lib.c statem_srvr.c +SRCS+= dummy_abi.c + LIBADD= crypto CFLAGS+= -I${LCRYPTO_SRC}/ssl Added: head/secure/lib/libssl/dummy_abi.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/secure/lib/libssl/dummy_abi.c Wed Jul 1 00:59:28 2020 (r362818) @@ -0,0 +1,46 @@ +/* This file is in the public domain. */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#include + +static inline void +__SSLv3_dummy_method_impl(void) +{ + static const char warning[] = "SSLv3 use is deprecated.\n"; + static bool once = false; + + if (once) + return; + + once = true; + write(STDERR_FILENO, warning, sizeof(warning) - 1); +} + +const SSL_METHOD * +__SSLv3_method_fbsd12(void) +{ + __SSLv3_dummy_method_impl(); + return (NULL); +} +__sym_compat(SSLv3_method, __SSLv3_method_fbsd12, OPENSSL_1_1_0); + +const SSL_METHOD * +__SSLv3_client_method_fbsd12(void) +{ + __SSLv3_dummy_method_impl(); + return (NULL); +} +__sym_compat(SSLv3_client_method, __SSLv3_client_method_fbsd12, OPENSSL_1_1_0); + +const SSL_METHOD * +__SSLv3_server_method_fbsd12(void) +{ + __SSLv3_dummy_method_impl(); + return (NULL); +} +__sym_compat(SSLv3_server_method, __SSLv3_server_method_fbsd12, OPENSSL_1_1_0); From owner-svn-src-all@freebsd.org Wed Jul 1 01:12:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4FF2C35A40B; Wed, 1 Jul 2020 01:12:25 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xNVx1SXBz49vx; Wed, 1 Jul 2020 01:12:25 +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 F0FAD20DDC; Wed, 1 Jul 2020 01:12:24 +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 0611COUM062197; Wed, 1 Jul 2020 01:12:24 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0611COO2062193; Wed, 1 Jul 2020 01:12:24 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202007010112.0611COO2062193@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 1 Jul 2020 01:12:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362819 - in stable/12/sys: dev/acpica dev/xen/control kern X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/12/sys: dev/acpica dev/xen/control kern X-SVN-Commit-Revision: 362819 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 01:12:25 -0000 Author: kib Date: Wed Jul 1 01:12:23 2020 New Revision: 362819 URL: https://svnweb.freebsd.org/changeset/base/362819 Log: MFC r362033: Remove double-calls to tc_get_timecount() to warm timecounters Modified: stable/12/sys/dev/acpica/acpi.c stable/12/sys/dev/acpica/acpi_timer.c stable/12/sys/dev/xen/control/control.c stable/12/sys/kern/kern_tc.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/acpica/acpi.c ============================================================================== --- stable/12/sys/dev/acpica/acpi.c Wed Jul 1 00:59:28 2020 (r362818) +++ stable/12/sys/dev/acpica/acpi.c Wed Jul 1 01:12:23 2020 (r362819) @@ -3195,7 +3195,6 @@ acpi_resync_clock(struct acpi_softc *sc) * Warm up timecounter again and reset system clock. */ (void)timecounter->tc_get_timecount(timecounter); - (void)timecounter->tc_get_timecount(timecounter); inittodr(time_second + sc->acpi_sleep_delay); } Modified: stable/12/sys/dev/acpica/acpi_timer.c ============================================================================== --- stable/12/sys/dev/acpica/acpi_timer.c Wed Jul 1 00:59:28 2020 (r362818) +++ stable/12/sys/dev/acpica/acpi_timer.c Wed Jul 1 01:12:23 2020 (r362819) @@ -274,7 +274,6 @@ acpi_timer_resume_handler(struct timecounter *newtc) "restoring timecounter, %s -> %s\n", tc->tc_name, newtc->tc_name); (void)newtc->tc_get_timecount(newtc); - (void)newtc->tc_get_timecount(newtc); timecounter = newtc; } } Modified: stable/12/sys/dev/xen/control/control.c ============================================================================== --- stable/12/sys/dev/xen/control/control.c Wed Jul 1 00:59:28 2020 (r362818) +++ stable/12/sys/dev/xen/control/control.c Wed Jul 1 01:12:23 2020 (r362819) @@ -303,7 +303,6 @@ xctrl_suspend() * Warm up timecounter again and reset system clock. */ timecounter->tc_get_timecount(timecounter); - timecounter->tc_get_timecount(timecounter); inittodr(time_second); #ifdef EARLY_AP_STARTUP Modified: stable/12/sys/kern/kern_tc.c ============================================================================== --- stable/12/sys/kern/kern_tc.c Wed Jul 1 00:59:28 2020 (r362818) +++ stable/12/sys/kern/kern_tc.c Wed Jul 1 01:12:23 2020 (r362819) @@ -1201,7 +1201,6 @@ tc_init(struct timecounter *tc) tc->tc_frequency < timecounter->tc_frequency) return; (void)tc->tc_get_timecount(tc); - (void)tc->tc_get_timecount(tc); timecounter = tc; } @@ -1464,7 +1463,6 @@ sysctl_kern_timecounter_hardware(SYSCTL_HANDLER_ARGS) /* Warm up new timecounter. */ (void)newtc->tc_get_timecount(newtc); - (void)newtc->tc_get_timecount(newtc); timecounter = newtc; @@ -1955,7 +1953,6 @@ inittimecounter(void *dummy) #endif /* warm up new timecounter (again) and get rolling. */ - (void)timecounter->tc_get_timecount(timecounter); (void)timecounter->tc_get_timecount(timecounter); mtx_lock_spin(&tc_setclock_mtx); tc_windup(NULL); From owner-svn-src-all@freebsd.org Wed Jul 1 02:13:09 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2C03435AE36; Wed, 1 Jul 2020 02:13:09 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xPs10df1z4DN2; Wed, 1 Jul 2020 02:13:09 +0000 (UTC) (envelope-from sjg@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 ED7AA21FA0; Wed, 1 Jul 2020 02:13:08 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0612D8FX099720; Wed, 1 Jul 2020 02:13:08 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0612D5Zp099698; Wed, 1 Jul 2020 02:13:05 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <202007010213.0612D5Zp099698@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Wed, 1 Jul 2020 02:13:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r362821 - in vendor/NetBSD/bmake/dist: . mk mk/sys unit-tests X-SVN-Group: vendor X-SVN-Commit-Author: sjg X-SVN-Commit-Paths: in vendor/NetBSD/bmake/dist: . mk mk/sys unit-tests X-SVN-Commit-Revision: 362821 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 02:13:09 -0000 Author: sjg Date: Wed Jul 1 02:13:04 2020 New Revision: 362821 URL: https://svnweb.freebsd.org/changeset/base/362821 Log: Import bmake-20200629 from ChangeLog: o cond.c: do not eval unnecessary terms of conditionals. o meta.c: report error if lseek in filemon_read fails o str.c: performance improvement for Str_Match for multiple '*' o dieQuietly: supress the failure output from make when failing node is a sub-make or a sibling failed. This cuts down greatly on unhelpful noise at the end of build log. Disabled by -dj or .MAKE.DIE_QUIETLY=no o unit test for :Or Added: vendor/NetBSD/bmake/dist/LICENSE vendor/NetBSD/bmake/dist/unit-tests/cond-short.exp vendor/NetBSD/bmake/dist/unit-tests/cond-short.mk (contents, props changed) Modified: vendor/NetBSD/bmake/dist/ChangeLog vendor/NetBSD/bmake/dist/FILES vendor/NetBSD/bmake/dist/VERSION vendor/NetBSD/bmake/dist/cond.c vendor/NetBSD/bmake/dist/job.c vendor/NetBSD/bmake/dist/main.c vendor/NetBSD/bmake/dist/make.h vendor/NetBSD/bmake/dist/meta.c vendor/NetBSD/bmake/dist/mk/ChangeLog vendor/NetBSD/bmake/dist/mk/FILES vendor/NetBSD/bmake/dist/mk/gendirdeps.mk vendor/NetBSD/bmake/dist/mk/install-mk vendor/NetBSD/bmake/dist/mk/mkopt.sh vendor/NetBSD/bmake/dist/mk/sys/AIX.mk vendor/NetBSD/bmake/dist/mk/sys/Darwin.mk vendor/NetBSD/bmake/dist/mk/sys/Generic.mk vendor/NetBSD/bmake/dist/mk/sys/HP-UX.mk vendor/NetBSD/bmake/dist/mk/sys/IRIX.mk vendor/NetBSD/bmake/dist/mk/sys/Linux.mk vendor/NetBSD/bmake/dist/mk/sys/NetBSD.mk vendor/NetBSD/bmake/dist/mk/sys/OSF1.mk vendor/NetBSD/bmake/dist/mk/sys/OpenBSD.mk vendor/NetBSD/bmake/dist/mk/sys/SunOS.mk vendor/NetBSD/bmake/dist/mk/sys/UnixWare.mk vendor/NetBSD/bmake/dist/str.c vendor/NetBSD/bmake/dist/unit-tests/Makefile vendor/NetBSD/bmake/dist/unit-tests/modmatch.mk vendor/NetBSD/bmake/dist/unit-tests/modorder.exp vendor/NetBSD/bmake/dist/unit-tests/modorder.mk Modified: vendor/NetBSD/bmake/dist/ChangeLog ============================================================================== --- vendor/NetBSD/bmake/dist/ChangeLog Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/ChangeLog Wed Jul 1 02:13:04 2020 (r362821) @@ -1,3 +1,42 @@ +2020-06-29 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20200629 + Merge with NetBSD make, pick up + o cond.c: do not eval unnecessary terms of conditionals. + +2020-06-25 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20200625 + Merge with NetBSD make, pick up + o meta.c: report error if lseek in filemon_read fails + +2020-06-22 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20200622 + Merge with NetBSD make, pick up + o dieQuietly: ignore OP_SUBMAKE as too aggressive + +2020-06-19 Simon J Gerraty + + * VERSION (_MAKE_VERSION): 20200619 + Merge with NetBSD make, pick up + o str.c: performance improvement for Str_Match for multiple '*' + o dieQuietly: supress the failure output from make + when failing node is a sub-make or a sibling failed. + This cuts down greatly on unhelpful noise at the end of + build log. Disabled by -dj or .MAKE.DIE_QUIETLY=no + +2020-06-10 Simon J Gerraty + + * FILES: add LICENSE to appease some packagers. + This is an attempt to fairly represent the license on almost + 200 files, which are almost all BSD-3-Clause + The few exceptions being more liberal. + + * VERSION (_MAKE_VERSION): 20200610 + Merge with NetBSD make, pick up + o unit test for :Or + 2020-06-06 Simon J Gerraty * VERSION (_MAKE_VERSION): 20200606 Modified: vendor/NetBSD/bmake/dist/FILES ============================================================================== --- vendor/NetBSD/bmake/dist/FILES Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/FILES Wed Jul 1 02:13:04 2020 (r362821) @@ -1,5 +1,6 @@ ChangeLog FILES +LICENSE Makefile Makefile.config.in PSD.doc/Makefile @@ -107,6 +108,8 @@ unit-tests/cond2.exp unit-tests/cond2.mk unit-tests/cond-late.mk unit-tests/cond-late.exp +unit-tests/cond-short.mk +unit-tests/cond-short.exp unit-tests/dollar.exp unit-tests/dollar.mk unit-tests/doterror.exp Added: vendor/NetBSD/bmake/dist/LICENSE ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/NetBSD/bmake/dist/LICENSE Wed Jul 1 02:13:04 2020 (r362821) @@ -0,0 +1,59 @@ +The individual files in this distribution are copyright their +original contributors or assignees. +Including: + + Copyright (c) 1993-2020, Simon J Gerraty + Copyright (c) 2009-2016, Juniper Networks, Inc. + Copyright (c) 2009, John Birrell. + Copyright (c) 1997-2020 The NetBSD Foundation, Inc. + Copyright (c) 1998 Todd C. Miller + Copyright (c) 1989 by Berkeley Softworks + Copyright (c) 1988, 1989, 1990, 1992, 1993 + The Regents of the University of California. + Copyright (c) 1988, 1989 by Adam de Boor + +With the exception of the GNU configure script, which states: + + # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. + # + # This configure script is free software; the Free Software Foundation + # gives unlimited permission to copy, distribute and modify it. + +The license for this distribution is considered to be: + + SPDX-License-Identifier: BSD-3-Clause + +example (from https://opensource.org/licenses/BSD-3-Clause): + + Copyright + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + 3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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. + Modified: vendor/NetBSD/bmake/dist/VERSION ============================================================================== --- vendor/NetBSD/bmake/dist/VERSION Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/VERSION Wed Jul 1 02:13:04 2020 (r362821) @@ -1,2 +1,2 @@ # keep this compatible with sh and make -_MAKE_VERSION=20200606 +_MAKE_VERSION=20200629 Modified: vendor/NetBSD/bmake/dist/cond.c ============================================================================== --- vendor/NetBSD/bmake/dist/cond.c Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/cond.c Wed Jul 1 02:13:04 2020 (r362821) @@ -1,4 +1,4 @@ -/* $NetBSD: cond.c,v 1.75 2017/04/16 20:59:04 riastradh Exp $ */ +/* $NetBSD: cond.c,v 1.76 2020/06/28 11:06:26 rillig Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: cond.c,v 1.75 2017/04/16 20:59:04 riastradh Exp $"; +static char rcsid[] = "$NetBSD: cond.c,v 1.76 2020/06/28 11:06:26 rillig Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)cond.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: cond.c,v 1.75 2017/04/16 20:59:04 riastradh Exp $"); +__RCSID("$NetBSD: cond.c,v 1.76 2020/06/28 11:06:26 rillig Exp $"); #endif #endif /* not lint */ #endif @@ -146,7 +146,7 @@ typedef enum { * last two fields are stored in condInvert and condDefProc, respectively. */ static void CondPushBack(Token); -static int CondGetArg(char **, char **, const char *); +static int CondGetArg(Boolean, char **, char **, const char *); static Boolean CondDoDefined(int, const char *); static int CondStrMatch(const void *, const void *); static Boolean CondDoMake(int, const char *); @@ -225,9 +225,6 @@ CondPushBack(Token t) * CondGetArg -- * Find the argument of a built-in function. * - * Input: - * parens TRUE if arg should be bounded by parens - * * Results: * The length of the argument and the address of the argument. * @@ -238,7 +235,7 @@ CondPushBack(Token t) *----------------------------------------------------------------------- */ static int -CondGetArg(char **linePtr, char **argPtr, const char *func) +CondGetArg(Boolean doEval, char **linePtr, char **argPtr, const char *func) { char *cp; int argLen; @@ -290,7 +287,8 @@ CondGetArg(char **linePtr, char **argPtr, const char * int len; void *freeIt; - cp2 = Var_Parse(cp, VAR_CMD, VARF_UNDEFERR|VARF_WANTRES, + cp2 = Var_Parse(cp, VAR_CMD, VARF_UNDEFERR| + (doEval ? VARF_WANTRES : 0), &len, &freeIt); Buf_AddBytes(&buf, strlen(cp2), cp2); free(freeIt); @@ -577,7 +575,7 @@ CondGetString(Boolean doEval, Boolean *quoted, void ** /* if we are in quotes, then an undefined variable is ok */ str = Var_Parse(condExpr, VAR_CMD, ((!qt && doEval) ? VARF_UNDEFERR : 0) | - VARF_WANTRES, &len, freeIt); + (doEval ? VARF_WANTRES : 0), &len, freeIt); if (str == var_Error) { if (*freeIt) { free(*freeIt); @@ -813,7 +811,7 @@ done: } static int -get_mpt_arg(char **linePtr, char **argPtr, const char *func MAKE_ATTR_UNUSED) +get_mpt_arg(Boolean doEval, char **linePtr, char **argPtr, const char *func MAKE_ATTR_UNUSED) { /* * Use Var_Parse to parse the spec in parens and return @@ -827,7 +825,7 @@ get_mpt_arg(char **linePtr, char **argPtr, const char /* We do all the work here and return the result as the length */ *argPtr = NULL; - val = Var_Parse(cp - 1, VAR_CMD, VARF_WANTRES, &length, &freeIt); + val = Var_Parse(cp - 1, VAR_CMD, doEval ? VARF_WANTRES : 0, &length, &freeIt); /* * Advance *linePtr to beyond the closing ). Note that * we subtract one because 'length' is calculated from 'cp - 1'. @@ -864,7 +862,7 @@ compare_function(Boolean doEval) static const struct fn_def { const char *fn_name; int fn_name_len; - int (*fn_getarg)(char **, char **, const char *); + int (*fn_getarg)(Boolean, char **, char **, const char *); Boolean (*fn_proc)(int, const char *); } fn_defs[] = { { "defined", 7, CondGetArg, CondDoDefined }, @@ -892,7 +890,7 @@ compare_function(Boolean doEval) if (*cp != '(') break; - arglen = fn_def->fn_getarg(&cp, &arg, fn_def->fn_name); + arglen = fn_def->fn_getarg(doEval, &cp, &arg, fn_def->fn_name); if (arglen <= 0) { condExpr = cp; return arglen < 0 ? TOK_ERROR : TOK_FALSE; @@ -917,7 +915,7 @@ compare_function(Boolean doEval) * would be invalid if we did "defined(a)" - so instead treat as an * expression. */ - arglen = CondGetArg(&cp, &arg, NULL); + arglen = CondGetArg(doEval, &cp, &arg, NULL); for (cp1 = cp; isspace(*(unsigned char *)cp1); cp1++) continue; if (*cp1 == '=' || *cp1 == '!') Modified: vendor/NetBSD/bmake/dist/job.c ============================================================================== --- vendor/NetBSD/bmake/dist/job.c Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/job.c Wed Jul 1 02:13:04 2020 (r362821) @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.197 2020/02/06 01:13:19 sjg Exp $ */ +/* $NetBSD: job.c,v 1.198 2020/06/19 21:17:48 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: job.c,v 1.197 2020/02/06 01:13:19 sjg Exp $"; +static char rcsid[] = "$NetBSD: job.c,v 1.198 2020/06/19 21:17:48 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: job.c,v 1.197 2020/02/06 01:13:19 sjg Exp $"); +__RCSID("$NetBSD: job.c,v 1.198 2020/06/19 21:17:48 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -1058,10 +1058,11 @@ JobFinish (Job *job, WAIT_T status) meta_job_error(job, job->node, job->flags, WEXITSTATUS(status)); } #endif - (void)printf("*** [%s] Error code %d%s\n", - job->node->name, - WEXITSTATUS(status), - (job->flags & JOB_IGNERR) ? " (ignored)" : ""); + if (!dieQuietly(job->node, -1)) + (void)printf("*** [%s] Error code %d%s\n", + job->node->name, + WEXITSTATUS(status), + (job->flags & JOB_IGNERR) ? " (ignored)" : ""); if (job->flags & JOB_IGNERR) { WAIT_STATUS(status) = 0; } else { @@ -3039,6 +3040,8 @@ Job_TokenWithdraw(void) /* And put the stopper back */ while (write(tokenWaitJob.outPipe, &tok, 1) == -1 && errno == EAGAIN) continue; + if (dieQuietly(NULL, 1)) + exit(2); Fatal("A failure has been detected in another branch of the parallel make"); } Modified: vendor/NetBSD/bmake/dist/main.c ============================================================================== --- vendor/NetBSD/bmake/dist/main.c Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/main.c Wed Jul 1 02:13:04 2020 (r362821) @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.274 2020/03/30 02:41:06 sjg Exp $ */ +/* $NetBSD: main.c,v 1.276 2020/06/22 20:15:25 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.274 2020/03/30 02:41:06 sjg Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.276 2020/06/22 20:15:25 sjg Exp $"; #else #include #ifndef lint @@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.274 2020/03/30 02:41:06 sjg Exp $"); +__RCSID("$NetBSD: main.c,v 1.276 2020/06/22 20:15:25 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -1889,6 +1889,8 @@ void Finish(int errors) /* number of errors encountered in Make_Make */ { + if (dieQuietly(NULL, -1)) + exit(2); Fatal("%d error%s", errors, errors == 1 ? "" : "s"); } @@ -2041,12 +2043,37 @@ addErrorCMD(void *cmdp, void *gnp MAKE_ATTR_UNUSED) return 0; } +/* + * Return true if we should die without noise. + * For example our failing child was a sub-make + * or failure happend elsewhere. + */ +int +dieQuietly(GNode *gn, int bf) +{ + static int quietly = -1; + + if (quietly < 0) { + if (DEBUG(JOB) || getBoolean(".MAKE.DIE_QUIETLY", 1) == 0) + quietly = 0; + else if (bf >= 0) + quietly = bf; + else + quietly = (gn) ? ((gn->type & (OP_MAKE)) != 0) : 0; + } + return quietly; +} + void PrintOnError(GNode *gn, const char *s) { static GNode *en = NULL; char tmp[64]; char *cp; + + /* we generally want to keep quiet if a sub-make died */ + if (dieQuietly(gn, -1)) + return; if (s) printf("%s", s); Modified: vendor/NetBSD/bmake/dist/make.h ============================================================================== --- vendor/NetBSD/bmake/dist/make.h Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/make.h Wed Jul 1 02:13:04 2020 (r362821) @@ -1,4 +1,4 @@ -/* $NetBSD: make.h,v 1.107 2020/04/03 03:35:16 sjg Exp $ */ +/* $NetBSD: make.h,v 1.108 2020/06/19 21:17:48 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -503,6 +503,7 @@ void Make_DoAllVar(GNode *); Boolean Make_Run(Lst); char * Check_Cwd_Cmd(const char *); void Check_Cwd(const char **); +int dieQuietly(GNode *, int); void PrintOnError(GNode *, const char *); void Main_ExportMAKEFLAGS(Boolean); Boolean Main_SetObjdir(const char *, ...) MAKE_ATTR_PRINTFLIKE(1, 2); Modified: vendor/NetBSD/bmake/dist/meta.c ============================================================================== --- vendor/NetBSD/bmake/dist/meta.c Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/meta.c Wed Jul 1 02:13:04 2020 (r362821) @@ -1,4 +1,4 @@ -/* $NetBSD: meta.c,v 1.81 2020/04/03 03:32:28 sjg Exp $ */ +/* $NetBSD: meta.c,v 1.82 2020/06/25 15:45:37 sjg Exp $ */ /* * Implement 'meta' mode. @@ -174,14 +174,18 @@ filemon_read(FILE *mfp, int fd) return 0; } /* rewind */ - (void)lseek(fd, (off_t)0, SEEK_SET); + if (lseek(fd, (off_t)0, SEEK_SET) < 0) { + error = errno; + warn("Could not rewind filemon"); + fprintf(mfp, "\n"); + } else { + error = 0; + fprintf(mfp, "\n-- filemon acquired metadata --\n"); - error = 0; - fprintf(mfp, "\n-- filemon acquired metadata --\n"); - - while ((n = read(fd, buf, sizeof(buf))) > 0) { - if ((int)fwrite(buf, 1, n, mfp) < n) - error = EIO; + while ((n = read(fd, buf, sizeof(buf))) > 0) { + if ((int)fwrite(buf, 1, n, mfp) < n) + error = EIO; + } } fflush(mfp); if (close(fd) < 0) Modified: vendor/NetBSD/bmake/dist/mk/ChangeLog ============================================================================== --- vendor/NetBSD/bmake/dist/mk/ChangeLog Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/mk/ChangeLog Wed Jul 1 02:13:04 2020 (r362821) @@ -1,3 +1,20 @@ +2020-06-28 Simon J Gerraty + + * sys/*.mk: make it easier for local*sys.mk to customize by + using ?= + +2020-06-22 Simon J Gerraty + + * gendirdeps.mk (LOCAL_DEPENDS_GUARD): if we don't build at level 0 + it is much safer to guard local depends with a simple check for + .MAKE.LEVEL > 0 + +2020-06-10 Simon J Gerraty + + * install-mk (MK_VERSION): 20200610 + + * mkopt.sh: this needs posix shell so #!/bin/sh should be ok + 2020-06-06 Simon J Gerraty * install-mk (MK_VERSION): 20200606 Modified: vendor/NetBSD/bmake/dist/mk/FILES ============================================================================== --- vendor/NetBSD/bmake/dist/mk/FILES Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/mk/FILES Wed Jul 1 02:13:04 2020 (r362821) @@ -1,5 +1,6 @@ ChangeLog FILES +LICENSE README auto.obj.mk autoconf.mk Modified: vendor/NetBSD/bmake/dist/mk/gendirdeps.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/gendirdeps.mk Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/mk/gendirdeps.mk Wed Jul 1 02:13:04 2020 (r362821) @@ -1,4 +1,4 @@ -# $Id: gendirdeps.mk,v 1.42 2020/05/16 23:21:48 sjg Exp $ +# $Id: gendirdeps.mk,v 1.44 2020/06/23 04:21:51 sjg Exp $ # Copyright (c) 2011-2020, Simon J. Gerraty # Copyright (c) 2010-2018, Juniper Networks, Inc. @@ -51,7 +51,7 @@ all: _CURDIR ?= ${.CURDIR} _OBJDIR ?= ${.OBJDIR} _OBJTOP ?= ${OBJTOP} -_OBJROOT ?= ${OBJROOT:U${_OBJTOP}} +_OBJROOT ?= ${OBJROOT:U${_OBJTOP:H}} .if ${_OBJROOT:M*/} _slash=/ .else @@ -339,6 +339,12 @@ CAT_DEPEND ?= .depend .PHONY: ${_DEPENDFILE} .endif +.if ${BUILD_AT_LEVEL0:Uno:tl} == "no" +LOCAL_DEPENDS_GUARD ?= _{.MAKE.LEVEL} > 0 +.else +LOCAL_DEPENDS_GUARD ?= _{DEP_RELDIR} == _{_DEP_RELDIR} +.endif + # 'cat .depend' should suffice, but if we are mixing build modes # .depend may contain things we don't want. # The sed command at the end of the stream, allows for the filters @@ -350,7 +356,7 @@ ${_DEPENDFILE}: .NOMETA ${CAT_DEPEND:M.depend} ${META_ ${_include_src_dirdeps} \ echo '.include '; \ echo; \ - echo '.if $${DEP_RELDIR} == $${_DEP_RELDIR}'; \ + echo '.if ${LOCAL_DEPENDS_GUARD}'; \ echo '# local dependencies - needed for -jN in clean tree'; \ [ -s ${CAT_DEPEND} ] && { grep : ${CAT_DEPEND} | grep -v '[/\\]'; }; \ echo '.endif' ) | sed 's,_\([{(]\),$$\1,g' > $@.new${.MAKE.PID} Modified: vendor/NetBSD/bmake/dist/mk/install-mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/install-mk Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/mk/install-mk Wed Jul 1 02:13:04 2020 (r362821) @@ -55,7 +55,7 @@ # Simon J. Gerraty # RCSid: -# $Id: install-mk,v 1.172 2020/06/06 22:41:15 sjg Exp $ +# $Id: install-mk,v 1.173 2020/06/23 04:16:35 sjg Exp $ # # @(#) Copyright (c) 1994 Simon J. Gerraty # @@ -70,7 +70,7 @@ # sjg@crufty.net # -MK_VERSION=20200606 +MK_VERSION=20200622 OWNER= GROUP= MODE=444 Modified: vendor/NetBSD/bmake/dist/mk/mkopt.sh ============================================================================== --- vendor/NetBSD/bmake/dist/mk/mkopt.sh Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/mk/mkopt.sh Wed Jul 1 02:13:04 2020 (r362821) @@ -1,7 +1,8 @@ -: -# $Id: mkopt.sh,v 1.11 2017/03/18 21:36:42 sjg Exp $ +#!/bin/sh + +# $Id: mkopt.sh,v 1.12 2020/06/23 04:16:35 sjg Exp $ # -# @(#) Copyright (c) 2014, Simon J. Gerraty +# @(#) Copyright (c) 2014, 2020, Simon J. Gerraty # # This file is provided in the hope that it will # be of use. There is absolutely NO WARRANTY. Modified: vendor/NetBSD/bmake/dist/mk/sys/AIX.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/sys/AIX.mk Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/mk/sys/AIX.mk Wed Jul 1 02:13:04 2020 (r362821) @@ -1,80 +1,80 @@ # $NetBSD: sys.mk,v 1.19.2.1 1994/07/26 19:58:31 cgd Exp $ # @(#)sys.mk 5.11 (Berkeley) 3/13/91 -OS= AIX -unix= We run ${OS}. -ROOT_GROUP= system +OS ?= AIX +unix ?= We run ${OS}. +ROOT_GROUP ?= system # This needs a lot of work yet... -NOPIC=no # no shared libs? +NOPIC ?=no # no shared libs? .SUFFIXES: .out .a .ln .o .c ${CXX_SUFFIXES} .F .f .r .y .l .s .S .cl .p .h .sh .m4 .LIBS: .a -AR= ar -ARFLAGS= rl -RANLIB= ranlib +AR ?= ar +ARFLAGS ?= rl +RANLIB ?= ranlib -AS= as +AS ?= as AFLAGS= -COMPILE.s= ${AS} ${AFLAGS} -LINK.s= ${CC} ${AFLAGS} ${LDFLAGS} -COMPILE.S= ${CC} ${AFLAGS} ${CPPFLAGS} -c -LINK.S= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS} +COMPILE.s ?= ${AS} ${AFLAGS} +LINK.s ?= ${CC} ${AFLAGS} ${LDFLAGS} +COMPILE.S ?= ${CC} ${AFLAGS} ${CPPFLAGS} -c +LINK.S ?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS} .if exists(/usr/local/bin/gcc) -CC= gcc -DBG= -O -g -STATIC?= -static +CC ?= gcc +DBG ?= -O -g +STATIC ?= -static .else -CC= cc -DBG= -g -STATIC= +CC ?= cc +DBG ?= -g +STATIC ?= .endif -CFLAGS= ${DBG} -COMPILE.c= ${CC} ${CFLAGS} ${CPPFLAGS} -c -LINK.c= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} +CFLAGS ?= ${DBG} +COMPILE.c ?= ${CC} ${CFLAGS} ${CPPFLAGS} -c +LINK.c ?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -CXX= g++ -CXXFLAGS= ${CFLAGS} -COMPILE.cc= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c -LINK.cc= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} +CXX ?= g++ +CXXFLAGS ?= ${CFLAGS} +COMPILE.cc ?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c +LINK.cc ?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} -CPP= cpp +CPP ?= cpp .if defined(DESTDIR) CPPFLAGS+= -nostdinc -idirafter ${DESTDIR}/usr/include .endif -MK_DEP= mkdeps.sh -N -FC= f77 -FFLAGS= -O +MK_DEP ?= mkdeps.sh -N +FC ?= f77 +FFLAGS ?= -O RFLAGS= -COMPILE.f= ${FC} ${FFLAGS} -c -LINK.f= ${FC} ${FFLAGS} ${LDFLAGS} -COMPILE.F= ${FC} ${FFLAGS} ${CPPFLAGS} -c -LINK.F= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS} -COMPILE.r= ${FC} ${FFLAGS} ${RFLAGS} -c -LINK.r= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS} +COMPILE.f ?= ${FC} ${FFLAGS} -c +LINK.f ?= ${FC} ${FFLAGS} ${LDFLAGS} +COMPILE.F ?= ${FC} ${FFLAGS} ${CPPFLAGS} -c +LINK.F ?= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS} +COMPILE.r ?= ${FC} ${FFLAGS} ${RFLAGS} -c +LINK.r ?= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS} -LEX= lex +LEX ?= lex LFLAGS= -LEX.l= ${LEX} ${LFLAGS} +LEX.l ?= ${LEX} ${LFLAGS} -LD= ld +LD ?= ld LDFLAGS= -LINT= lint -LINTFLAGS= -chapbx +LINT ?= lint +LINTFLAGS ?= -chapbx -PC= pc +PC ?= pc PFLAGS= -COMPILE.p= ${PC} ${PFLAGS} ${CPPFLAGS} -c -LINK.p= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS} +COMPILE.p ?= ${PC} ${PFLAGS} ${CPPFLAGS} -c +LINK.p ?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS} -YACC= yacc -YFLAGS= -d -YACC.y= ${YACC} ${YFLAGS} +YACC ?= yacc +YFLAGS ?= -d +YACC.y ?= ${YACC} ${YFLAGS} # C .c: Modified: vendor/NetBSD/bmake/dist/mk/sys/Darwin.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/sys/Darwin.mk Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/mk/sys/Darwin.mk Wed Jul 1 02:13:04 2020 (r362821) @@ -1,108 +1,108 @@ # $NetBSD: Darwin.sys.mk,v 1.3 2003/02/16 09:44:41 grant Exp $ # @(#)sys.mk 8.2 (Berkeley) 3/21/94 -OS= Darwin -unix?= We run ${OS}. +OS ?= Darwin +unix ?= We run ${OS}. .SUFFIXES: .out .a .ln .o .s .S .c .m ${CXX_SUFFIXES} .F .f .r .y .l .cl .p .h .SUFFIXES: .sh .m4 .dylib .LIBS: .a .dylib -SHLIBEXT = .dylib -HOST_LIBEXT = .dylib -DSHLIBEXT = .dylib +SHLIBEXT ?= .dylib +HOST_LIBEXT ?= .dylib +DSHLIBEXT ?= .dylib -AR?= ar -ARFLAGS?= rl +AR ?= ar +ARFLAGS ?= rl RANLIB = -AS?= as -AFLAGS?= -COMPILE.s?= ${AS} ${AFLAGS} -LINK.s?= ${CC} ${AFLAGS} ${LDFLAGS} -COMPILE.S?= ${CC} ${AFLAGS} ${CPPFLAGS} -c -LINK.S?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS} +AS ?= as +AFLAGS ?= +COMPILE.s ?= ${AS} ${AFLAGS} +LINK.s ?= ${CC} ${AFLAGS} ${LDFLAGS} +COMPILE.S ?= ${CC} ${AFLAGS} ${CPPFLAGS} -c +LINK.S ?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS} -PIPE?= -pipe +PIPE ?= -pipe .if exists(/usr/bin/clang) -CC?= cc ${PIPE} -CXX?= c++ +CC ?= cc ${PIPE} +CXX ?= c++ .elif exists(/usr/bin/gcc) -CC?= gcc ${PIPE} +CC ?= gcc ${PIPE} .else -CC?= cc ${PIPE} +CC ?= cc ${PIPE} .endif -DBG?= -O2 -CFLAGS?= ${DBG} -COMPILE.c?= ${CC} ${CFLAGS} ${CPPFLAGS} -c -LINK.c?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} +DBG ?= -O2 +CFLAGS ?= ${DBG} +COMPILE.c ?= ${CC} ${CFLAGS} ${CPPFLAGS} -c +LINK.c ?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} .if exists(/usr/bin/g++) -CXX?= g++ +CXX ?= g++ .else -CXX?= c++ +CXX ?= c++ .endif -CXXFLAGS?= ${CFLAGS} -COMPILE.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c -LINK.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} +CXXFLAGS ?= ${CFLAGS} +COMPILE.cc ?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c +LINK.cc ?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} -OBJC?= ${CC} -OBJCFLAGS?= ${CFLAGS} -COMPILE.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c -LINK.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} ${LDFLAGS} +OBJC ?= ${CC} +OBJCFLAGS ?= ${CFLAGS} +COMPILE.m ?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c +LINK.m ?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} ${LDFLAGS} -CPP?= cpp -NOLINT= 1 -CPPFLAGS?= +CPP ?= cpp +NOLINT ?= 1 +CPPFLAGS ?= -MK_DEP?= mkdep +MK_DEP ?= mkdep -FC?= f77 -FFLAGS?= -O -RFLAGS?= -COMPILE.f?= ${FC} ${FFLAGS} -c -LINK.f?= ${FC} ${FFLAGS} ${LDFLAGS} -COMPILE.F?= ${FC} ${FFLAGS} ${CPPFLAGS} -c -LINK.F?= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS} -COMPILE.r?= ${FC} ${FFLAGS} ${RFLAGS} -c -LINK.r?= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS} +FC ?= f77 +FFLAGS ?= -O +RFLAGS ?= +COMPILE.f ?= ${FC} ${FFLAGS} -c +LINK.f ?= ${FC} ${FFLAGS} ${LDFLAGS} +COMPILE.F ?= ${FC} ${FFLAGS} ${CPPFLAGS} -c +LINK.F ?= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS} +COMPILE.r ?= ${FC} ${FFLAGS} ${RFLAGS} -c +LINK.r ?= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS} -INSTALL?= install +INSTALL ?= install -LEX?= lex -LFLAGS?= -LEX.l?= ${LEX} ${LFLAGS} +LEX ?= lex +LFLAGS ?= +LEX.l ?= ${LEX} ${LFLAGS} -LD?= ld -LDFLAGS?= +LD ?= ld +LDFLAGS ?= -SHLIB_TEENY = 0 -SHLIB_MINOR = 0 +SHLIB_TEENY ?= 0 +SHLIB_MINOR ?= 0 -MKPICLIB = no -LIBEXT = .dylib +MKPICLIB ?= no +LIBEXT ?= .dylib -LINT?= lint -LINTFLAGS?= -chapbx +LINT ?= lint +LINTFLAGS ?= -chapbx -LORDER?= lorder +LORDER ?= lorder -NM?= nm +NM ?= nm -PC?= pc -PFLAGS?= -COMPILE.p?= ${PC} ${PFLAGS} ${CPPFLAGS} -c -LINK.p?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS} +PC ?= pc +PFLAGS ?= +COMPILE.p ?= ${PC} ${PFLAGS} ${CPPFLAGS} -c +LINK.p ?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS} -SIZE?= size +SIZE ?= size -TSORT?= tsort -q +TSORT ?= tsort -q -YACC?= bison -y -YFLAGS?= -d -YACC.y?= ${YACC} ${YFLAGS} +YACC ?= bison -y +YFLAGS ?= -d +YACC.y ?= ${YACC} ${YFLAGS} # C .c: Modified: vendor/NetBSD/bmake/dist/mk/sys/Generic.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/sys/Generic.mk Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/mk/sys/Generic.mk Wed Jul 1 02:13:04 2020 (r362821) @@ -1,4 +1,4 @@ -# $Id: Generic.mk,v 1.14 2020/04/17 21:08:17 sjg Exp $ +# $Id: Generic.mk,v 1.16 2020/06/29 14:34:42 sjg Exp $ # # some reasonable defaults @@ -7,7 +7,7 @@ .LIBS: .a -tools = \ +tools ?= \ ar \ lorder \ ranlib \ @@ -27,71 +27,71 @@ MACHINE_ARCH = ${MACHINE_ARCH.${MACHINE}} TSORT += -q .endif -ARFLAGS?= rl +ARFLAGS ?= rl -AS?= as -AFLAGS?= +AS ?= as +AFLAGS ?= .if ${MACHINE_ARCH} == "sparc64" AFLAGS+= -Wa,-Av9a .endif -COMPILE.s?= ${CC} ${AFLAGS} -c -LINK.s?= ${CC} ${AFLAGS} ${LDFLAGS} -COMPILE.S?= ${CC} ${AFLAGS} ${CPPFLAGS} -c -traditional-cpp -LINK.S?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS} +COMPILE.s ?= ${CC} ${AFLAGS} -c +LINK.s ?= ${CC} ${AFLAGS} ${LDFLAGS} +COMPILE.S ?= ${CC} ${AFLAGS} ${CPPFLAGS} -c -traditional-cpp +LINK.S ?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS} -CC?= cc -DBG?= -O2 -CFLAGS?= ${DBG} -COMPILE.c?= ${CC} ${CFLAGS} ${CPPFLAGS} -c -LINK.c?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} +CC ?= cc +DBG ?= -O2 +CFLAGS ?= ${DBG} +COMPILE.c ?= ${CC} ${CFLAGS} ${CPPFLAGS} -c +LINK.c ?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -CXX?= c++ -CXXFLAGS?= ${CFLAGS} -COMPILE.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c -LINK.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} +CXX ?= c++ +CXXFLAGS ?= ${CFLAGS} +COMPILE.cc ?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c +LINK.cc ?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS} -OBJC?= ${CC} -OBJCFLAGS?= ${CFLAGS} -COMPILE.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c -LINK.m?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} ${LDFLAGS} +OBJC ?= ${CC} +OBJCFLAGS ?= ${CFLAGS} +COMPILE.m ?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} -c +LINK.m ?= ${OBJC} ${OBJCFLAGS} ${CPPFLAGS} ${LDFLAGS} -CPP?= cpp -CPPFLAGS?= +CPP ?= cpp +CPPFLAGS ?= -FC?= f77 -FFLAGS?= -O -RFLAGS?= -COMPILE.f?= ${FC} ${FFLAGS} -c -LINK.f?= ${FC} ${FFLAGS} ${LDFLAGS} -COMPILE.F?= ${FC} ${FFLAGS} ${CPPFLAGS} -c -LINK.F?= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS} -COMPILE.r?= ${FC} ${FFLAGS} ${RFLAGS} -c -LINK.r?= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS} +FC ?= f77 +FFLAGS ?= -O +RFLAGS ?= +COMPILE.f ?= ${FC} ${FFLAGS} -c +LINK.f ?= ${FC} ${FFLAGS} ${LDFLAGS} +COMPILE.F ?= ${FC} ${FFLAGS} ${CPPFLAGS} -c +LINK.F ?= ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS} +COMPILE.r ?= ${FC} ${FFLAGS} ${RFLAGS} -c +LINK.r ?= ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS} -INSTALL?= install +INSTALL ?= install -LEX?= lex -LFLAGS?= -LEX.l?= ${LEX} ${LFLAGS} +LEX ?= lex +LFLAGS ?= +LEX.l ?= ${LEX} ${LFLAGS} -LD?= ld -LDFLAGS?= +LD ?= ld +LDFLAGS ?= -LINT?= lint -LINTFLAGS?= -chapbxzF +LINT ?= lint +LINTFLAGS ?= -chapbxzF -NM?= nm +NM ?= nm -PC?= pc -PFLAGS?= -COMPILE.p?= ${PC} ${PFLAGS} ${CPPFLAGS} -c -LINK.p?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS} +PC ?= pc +PFLAGS ?= +COMPILE.p ?= ${PC} ${PFLAGS} ${CPPFLAGS} -c +LINK.p ?= ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS} -SIZE?= size +SIZE ?= size -YACC?= yacc -YFLAGS?= -YACC.y?= ${YACC} ${YFLAGS} +YACC ?= yacc +YFLAGS ?= +YACC.y ?= ${YACC} ${YFLAGS} # C .c: Modified: vendor/NetBSD/bmake/dist/mk/sys/HP-UX.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/sys/HP-UX.mk Wed Jul 1 02:11:15 2020 (r362820) +++ vendor/NetBSD/bmake/dist/mk/sys/HP-UX.mk Wed Jul 1 02:13:04 2020 (r362821) @@ -1,122 +1,122 @@ -# $Id: HP-UX.mk,v 1.12 2020/04/17 21:08:17 sjg Exp $ +# $Id: HP-UX.mk,v 1.14 2020/06/29 14:34:42 sjg Exp $ # $NetBSD: sys.mk,v 1.19.2.1 1994/07/26 19:58:31 cgd Exp $ # @(#)sys.mk 5.11 (Berkeley) 3/13/91 -OS= HP-UX -ROOT_GROUP= root -unix?= We run ${OS}. +OS ?= HP-UX +ROOT_GROUP ?= root +unix ?= We run ${OS}. # HP-UX's cc does not provide any clues as to wether this is 9.x or 10.x # nor does sys/param.h, so we'll use the existence of /hp-ux .if exists("/hp-ux") -OSMAJOR?=9 +OSMAJOR ?=9 .endif -OSMAJOR?=10 -__HPUX_VERSION?=${OSMAJOR} +OSMAJOR ?=10 +__HPUX_VERSION ?=${OSMAJOR} .SUFFIXES: .out .a .ln .o .c ${CXX_SUFFIXES} .F .f .r .y .l .s .S .cl .p .h .sh .m4 -LIBMODE= 755 -LIBCRT0= /lib/crt0.o *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Jul 1 02:13:19 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3A15035AF64; Wed, 1 Jul 2020 02:13:19 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xPsB4TcJz4D3Y; Wed, 1 Jul 2020 02:13:18 +0000 (UTC) (envelope-from sjg@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 A365422025; Wed, 1 Jul 2020 02:13:16 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0612DGMx099771; Wed, 1 Jul 2020 02:13:16 GMT (envelope-from sjg@FreeBSD.org) Received: (from sjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0612DG51099770; Wed, 1 Jul 2020 02:13:16 GMT (envelope-from sjg@FreeBSD.org) Message-Id: <202007010213.0612DG51099770@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sjg set sender to sjg@FreeBSD.org using -f From: "Simon J. Gerraty" Date: Wed, 1 Jul 2020 02:13:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r362822 - vendor/NetBSD/bmake/20200629 X-SVN-Group: vendor X-SVN-Commit-Author: sjg X-SVN-Commit-Paths: vendor/NetBSD/bmake/20200629 X-SVN-Commit-Revision: 362822 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 02:13:19 -0000 Author: sjg Date: Wed Jul 1 02:13:16 2020 New Revision: 362822 URL: https://svnweb.freebsd.org/changeset/base/362822 Log: tag bmake-20200629 Added: vendor/NetBSD/bmake/20200629/ - copied from r362821, vendor/NetBSD/bmake/dist/ From owner-svn-src-all@freebsd.org Wed Jul 1 02:16:38 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9271D35ACF6; Wed, 1 Jul 2020 02:16:38 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xPx23Mxjz4DMX; Wed, 1 Jul 2020 02:16:38 +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 39AAE21C5D; Wed, 1 Jul 2020 02:16:38 +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 0612GcCg000116; Wed, 1 Jul 2020 02:16:38 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0612Gb1U000111; Wed, 1 Jul 2020 02:16:37 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202007010216.0612Gb1U000111@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Wed, 1 Jul 2020 02:16:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362823 - in head/sys: amd64/conf conf geom/part i386/conf X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys: amd64/conf conf geom/part i386/conf X-SVN-Commit-Revision: 362823 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 02:16:38 -0000 Author: cem Date: Wed Jul 1 02:16:36 2020 New Revision: 362823 URL: https://svnweb.freebsd.org/changeset/base/362823 Log: geom(4): Kill GEOM_PART_EBR_COMPAT option Take advantage of Warner's nice new real GEOM aliasing system and use it for aliased partition names that actually work. Our canonical EBR partition name is the weird, not-default-on-x86-prior-to- this-revision "da1p4+00001234." However, if compatibility mode (tunable kern.geom.part.ebr.compat_aliases) is enabled (1, default), we continue to provide the alias names like "da1p5" in addition to the weird canonical names. Naming partition providers was just one aspect of the COMPAT knob; in addition it limited mutability, in part because it did not preserve existing EBR header content aside from that of LBA 0. This change saves the EBR header for LBA 0, as well as for every EBR partition encountered. That way, when we write out the EBR partition table on modification, we can restore any bootloader or other metadata in both LBA0 (the first data-containing EBR may start after 0) as well as every logical EBR we read from the disk, and only update the geometry metadata and linked list pointers that describe the actual partitioning. (This change does not add support for the 'bootcode' verb to EBR.) PR: 232463 Reported by: Manish Jain Discussed with: ae (no objection) Relnotes: maybe Differential Revision: https://reviews.freebsd.org/D24939 Modified: head/sys/amd64/conf/DEFAULTS head/sys/conf/NOTES head/sys/conf/options head/sys/geom/part/g_part_ebr.c head/sys/i386/conf/DEFAULTS Modified: head/sys/amd64/conf/DEFAULTS ============================================================================== --- head/sys/amd64/conf/DEFAULTS Wed Jul 1 02:13:16 2020 (r362822) +++ head/sys/amd64/conf/DEFAULTS Wed Jul 1 02:16:36 2020 (r362823) @@ -18,7 +18,6 @@ device uart_ns8250 # Default partitioning schemes options GEOM_PART_BSD options GEOM_PART_EBR -options GEOM_PART_EBR_COMPAT options GEOM_PART_MBR options GEOM_PART_GPT Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Wed Jul 1 02:13:16 2020 (r362822) +++ head/sys/conf/NOTES Wed Jul 1 02:16:36 2020 (r362823) @@ -171,7 +171,6 @@ options GEOM_PART_APM # Apple partitioning options GEOM_PART_BSD # BSD disklabel options GEOM_PART_BSD64 # BSD disklabel64 options GEOM_PART_EBR # Extended Boot Records -options GEOM_PART_EBR_COMPAT # Backward compatible partition names options GEOM_PART_GPT # GPT partitioning options GEOM_PART_LDM # Logical Disk Manager options GEOM_PART_MBR # MBR partitioning Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Wed Jul 1 02:13:16 2020 (r362822) +++ head/sys/conf/options Wed Jul 1 02:16:36 2020 (r362823) @@ -125,7 +125,6 @@ GEOM_PART_APM opt_geom.h GEOM_PART_BSD opt_geom.h GEOM_PART_BSD64 opt_geom.h GEOM_PART_EBR opt_geom.h -GEOM_PART_EBR_COMPAT opt_geom.h GEOM_PART_GPT opt_geom.h GEOM_PART_LDM opt_geom.h GEOM_PART_MBR opt_geom.h Modified: head/sys/geom/part/g_part_ebr.c ============================================================================== --- head/sys/geom/part/g_part_ebr.c Wed Jul 1 02:13:16 2020 (r362822) +++ head/sys/geom/part/g_part_ebr.c Wed Jul 1 02:16:36 2020 (r362823) @@ -52,40 +52,48 @@ __FBSDID("$FreeBSD$"); FEATURE(geom_part_ebr, "GEOM partitioning class for extended boot records support"); -#if defined(GEOM_PART_EBR_COMPAT) FEATURE(geom_part_ebr_compat, "GEOM EBR partitioning class: backward-compatible partition names"); -#endif +SYSCTL_DECL(_kern_geom_part); +static SYSCTL_NODE(_kern_geom_part, OID_AUTO, ebr, CTLFLAG_RW | CTLFLAG_MPSAFE, + 0, "GEOM_PART_EBR Extended Boot Record"); + +static bool compat_aliases = true; +SYSCTL_BOOL(_kern_geom_part_ebr, OID_AUTO, compat_aliases, + CTLFLAG_RDTUN, &compat_aliases, 0, + "Set non-zero to enable EBR compatibility alias names (e.g., ada0p5)"); + +#define EBRNAMFMT "+%08u" #define EBRSIZE 512 struct g_part_ebr_table { struct g_part_table base; -#ifndef GEOM_PART_EBR_COMPAT - u_char ebr[EBRSIZE]; -#endif + u_char lba0_ebr[EBRSIZE]; }; struct g_part_ebr_entry { struct g_part_entry base; struct dos_partition ent; + u_char ebr[EBRSIZE]; + u_int ebr_compat_idx; }; static int g_part_ebr_add(struct g_part_table *, struct g_part_entry *, struct g_part_parms *); +static void g_part_ebr_add_alias(struct g_part_table *, struct g_provider *, + struct g_part_entry *, const char *); static int g_part_ebr_create(struct g_part_table *, struct g_part_parms *); static int g_part_ebr_destroy(struct g_part_table *, struct g_part_parms *); static void g_part_ebr_dumpconf(struct g_part_table *, struct g_part_entry *, struct sbuf *, const char *); static int g_part_ebr_dumpto(struct g_part_table *, struct g_part_entry *); -#if defined(GEOM_PART_EBR_COMPAT) -static void g_part_ebr_fullname(struct g_part_table *, struct g_part_entry *, - struct sbuf *, const char *); -#endif static int g_part_ebr_modify(struct g_part_table *, struct g_part_entry *, struct g_part_parms *); static const char *g_part_ebr_name(struct g_part_table *, struct g_part_entry *, char *, size_t); +static struct g_provider *g_part_ebr_new_provider(struct g_part_table *, + struct g_geom *, struct g_part_entry *, const char *); static int g_part_ebr_precheck(struct g_part_table *, enum g_part_ctl, struct g_part_parms *); static int g_part_ebr_probe(struct g_part_table *, struct g_consumer *); @@ -100,15 +108,14 @@ static int g_part_ebr_resize(struct g_part_table *, st static kobj_method_t g_part_ebr_methods[] = { KOBJMETHOD(g_part_add, g_part_ebr_add), + KOBJMETHOD(g_part_add_alias, g_part_ebr_add_alias), KOBJMETHOD(g_part_create, g_part_ebr_create), KOBJMETHOD(g_part_destroy, g_part_ebr_destroy), KOBJMETHOD(g_part_dumpconf, g_part_ebr_dumpconf), KOBJMETHOD(g_part_dumpto, g_part_ebr_dumpto), -#if defined(GEOM_PART_EBR_COMPAT) - KOBJMETHOD(g_part_fullname, g_part_ebr_fullname), -#endif KOBJMETHOD(g_part_modify, g_part_ebr_modify), KOBJMETHOD(g_part_name, g_part_ebr_name), + KOBJMETHOD(g_part_new_provider, g_part_ebr_new_provider), KOBJMETHOD(g_part_precheck, g_part_ebr_precheck), KOBJMETHOD(g_part_probe, g_part_ebr_probe), KOBJMETHOD(g_part_read, g_part_ebr_read), @@ -171,7 +178,7 @@ ebr_entry_link(struct g_part_table *table, uint32_t st buf[0] = 0 /* dp_flag */; ebr_set_chs(table, start, &buf[3] /* dp_scyl */, &buf[1] /* dp_shd */, &buf[2] /* dp_ssect */); - buf[4] = 5 /* dp_typ */; + buf[4] = DOSPTYP_EXT /* dp_typ */; ebr_set_chs(table, end, &buf[7] /* dp_ecyl */, &buf[5] /* dp_ehd */, &buf[6] /* dp_esect */); le32enc(buf + 8, start); @@ -249,7 +256,9 @@ g_part_ebr_add(struct g_part_table *basetable, struct { struct g_provider *pp; struct g_part_ebr_entry *entry; + struct g_part_entry *iter; uint32_t start, size; + u_int idx; if (gpp->gpp_parms & G_PART_PARM_LABEL) return (EINVAL); @@ -276,9 +285,48 @@ g_part_ebr_add(struct g_part_table *basetable, struct &entry->ent.dp_shd, &entry->ent.dp_ssect); ebr_set_chs(basetable, baseentry->gpe_end, &entry->ent.dp_ecyl, &entry->ent.dp_ehd, &entry->ent.dp_esect); + + if (compat_aliases) { + idx = 5; + LIST_FOREACH(iter, &basetable->gpt_entry, gpe_entry) + idx++; + entry->ebr_compat_idx = idx; + } return (ebr_parse_type(gpp->gpp_type, &entry->ent.dp_typ)); } +static void +g_part_ebr_add_alias(struct g_part_table *table, struct g_provider *pp, + struct g_part_entry *baseentry, const char *pfx) +{ + struct g_part_ebr_entry *entry; + + g_provider_add_alias(pp, "%s%s" EBRNAMFMT, pfx, g_part_separator, + baseentry->gpe_index); + if (compat_aliases) { + entry = (struct g_part_ebr_entry *)baseentry; + g_provider_add_alias(pp, "%.*s%u", (int)strlen(pfx) - 1, pfx, + entry->ebr_compat_idx); + } +} + +static struct g_provider * +g_part_ebr_new_provider(struct g_part_table *table, struct g_geom *gp, + struct g_part_entry *baseentry, const char *pfx) +{ + struct g_part_ebr_entry *entry; + struct g_provider *pp; + + pp = g_new_providerf(gp, "%s%s" EBRNAMFMT, pfx, g_part_separator, + baseentry->gpe_index); + if (compat_aliases) { + entry = (struct g_part_ebr_entry *)baseentry; + g_provider_add_alias(pp, "%.*s%u", (int)strlen(pfx) - 1, pfx, + entry->ebr_compat_idx); + } + return (pp); +} + static int g_part_ebr_create(struct g_part_table *basetable, struct g_part_parms *gpp) { @@ -358,24 +406,6 @@ g_part_ebr_dumpto(struct g_part_table *table, struct g entry->ent.dp_typ == DOSPTYP_LINSWP) ? 1 : 0); } -#if defined(GEOM_PART_EBR_COMPAT) -static void -g_part_ebr_fullname(struct g_part_table *table, struct g_part_entry *entry, - struct sbuf *sb, const char *pfx) -{ - struct g_part_entry *iter; - u_int idx; - - idx = 5; - LIST_FOREACH(iter, &table->gpt_entry, gpe_entry) { - if (iter == entry) - break; - idx++; - } - sbuf_printf(sb, "%.*s%u", (int)strlen(pfx) - 1, pfx, idx); -} -#endif - static int g_part_ebr_modify(struct g_part_table *basetable, struct g_part_entry *baseentry, struct g_part_parms *gpp) @@ -409,8 +439,7 @@ static const char * g_part_ebr_name(struct g_part_table *table, struct g_part_entry *entry, char *buf, size_t bufsz) { - - snprintf(buf, bufsz, "+%08u", entry->gpe_index); + snprintf(buf, bufsz, EBRNAMFMT, entry->gpe_index); return (buf); } @@ -418,11 +447,6 @@ static int g_part_ebr_precheck(struct g_part_table *table, enum g_part_ctl req, struct g_part_parms *gpp) { -#if defined(GEOM_PART_EBR_COMPAT) - if (req == G_PART_CTL_DESTROY) - return (0); - return (ECANCELED); -#else /* * The index is a function of the start of the partition. * This is not something the user can override, nor is it @@ -432,7 +456,6 @@ g_part_ebr_precheck(struct g_part_table *table, enum g if (req == G_PART_CTL_ADD) gpp->gpp_index = (gpp->gpp_start / table->gpt_sectors) + 1; return (0); -#endif } static int @@ -501,9 +524,10 @@ g_part_ebr_read(struct g_part_table *basetable, struct struct g_part_ebr_entry *entry; u_char *buf; off_t ofs, msize; - u_int lba; + u_int lba, idx; int error, index; + idx = 5; pp = cp->provider; table = (struct g_part_ebr_table *)basetable; msize = MIN(pp->mediasize / pp->sectorsize, UINT32_MAX); @@ -525,18 +549,21 @@ g_part_ebr_read(struct g_part_table *basetable, struct printf("GEOM: %s: invalid entries in the EBR ignored.\n", pp->name); } -#ifndef GEOM_PART_EBR_COMPAT - /* Save the first EBR, it can contain a boot code */ + /* + * Preserve EBR, it can contain boot code or other metadata we + * are ignorant of. + */ if (lba == 0) - bcopy(buf, table->ebr, sizeof(table->ebr)); -#endif - g_free(buf); + memcpy(table->lba0_ebr, buf, sizeof(table->lba0_ebr)); - if (ent[0].dp_typ == 0) + if (ent[0].dp_typ == 0) { + g_free(buf); break; + } if (ent[0].dp_typ == 5 && ent[1].dp_typ == 0) { lba = ent[0].dp_start; + g_free(buf); continue; } @@ -547,6 +574,10 @@ g_part_ebr_read(struct g_part_table *basetable, struct pp->sectorsize; entry = (struct g_part_ebr_entry *)baseentry; entry->ent = ent[0]; + memcpy(entry->ebr, buf, sizeof(entry->ebr)); + if (compat_aliases) + entry->ebr_compat_idx = idx++; + g_free(buf); if (ent[1].dp_typ == 0) break; @@ -618,9 +649,7 @@ g_part_ebr_type(struct g_part_table *basetable, struct static int g_part_ebr_write(struct g_part_table *basetable, struct g_consumer *cp) { -#ifndef GEOM_PART_EBR_COMPAT struct g_part_ebr_table *table; -#endif struct g_provider *pp; struct g_part_entry *baseentry, *next; struct g_part_ebr_entry *entry; @@ -630,10 +659,10 @@ g_part_ebr_write(struct g_part_table *basetable, struc pp = cp->provider; buf = g_malloc(pp->sectorsize, M_WAITOK | M_ZERO); -#ifndef GEOM_PART_EBR_COMPAT table = (struct g_part_ebr_table *)basetable; - bcopy(table->ebr, buf, DOSPARTOFF); -#endif + + _Static_assert(DOSPARTOFF <= sizeof(table->lba0_ebr), ""); + memcpy(buf, table->lba0_ebr, DOSPARTOFF); le16enc(buf + DOSMAGICOFFSET, DOSMAGIC); baseentry = LIST_FIRST(&basetable->gpt_entry); @@ -661,6 +690,9 @@ g_part_ebr_write(struct g_part_table *basetable, struc do { entry = (struct g_part_ebr_entry *)baseentry; + _Static_assert(DOSPARTOFF <= sizeof(entry->ebr), ""); + memcpy(buf, entry->ebr, DOSPARTOFF); + p = buf + DOSPARTOFF; p[0] = entry->ent.dp_flag; p[1] = entry->ent.dp_shd; @@ -686,10 +718,6 @@ g_part_ebr_write(struct g_part_table *basetable, struc error = g_write_data(cp, baseentry->gpe_start * pp->sectorsize, buf, pp->sectorsize); -#ifndef GEOM_PART_EBR_COMPAT - if (baseentry->gpe_start == 0) - bzero(buf, DOSPARTOFF); -#endif baseentry = next; } while (!error && baseentry != NULL); Modified: head/sys/i386/conf/DEFAULTS ============================================================================== --- head/sys/i386/conf/DEFAULTS Wed Jul 1 02:13:16 2020 (r362822) +++ head/sys/i386/conf/DEFAULTS Wed Jul 1 02:16:36 2020 (r362823) @@ -19,7 +19,6 @@ device uart_ns8250 # Default partitioning schemes options GEOM_PART_BSD options GEOM_PART_EBR -options GEOM_PART_EBR_COMPAT options GEOM_PART_MBR options GEOM_PART_GPT From owner-svn-src-all@freebsd.org Wed Jul 1 02:32:42 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E637435B45F; Wed, 1 Jul 2020 02:32:42 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xQHZ5rQTz4FYs; Wed, 1 Jul 2020 02:32:42 +0000 (UTC) (envelope-from freqlabs@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 AC9172230C; Wed, 1 Jul 2020 02:32:42 +0000 (UTC) (envelope-from freqlabs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0612Wg6L012325; Wed, 1 Jul 2020 02:32:42 GMT (envelope-from freqlabs@FreeBSD.org) Received: (from freqlabs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0612WfAp012320; Wed, 1 Jul 2020 02:32:41 GMT (envelope-from freqlabs@FreeBSD.org) Message-Id: <202007010232.0612WfAp012320@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: freqlabs set sender to freqlabs@FreeBSD.org using -f From: Ryan Moeller Date: Wed, 1 Jul 2020 02:32:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362824 - in head: lib/libifconfig sbin/ifconfig sys/net X-SVN-Group: head X-SVN-Commit-Author: freqlabs X-SVN-Commit-Paths: in head: lib/libifconfig sbin/ifconfig sys/net X-SVN-Commit-Revision: 362824 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 02:32:43 -0000 Author: freqlabs Date: Wed Jul 1 02:32:41 2020 New Revision: 362824 URL: https://svnweb.freebsd.org/changeset/base/362824 Log: libifconfig: Add function to get bridge status The new function operates similarly to ifconfig_lagg_get_lagg_status and likewise is accompanied by a function to free the bridge status data structure. I have included in this patch the relocation of some strings describing STP parameters and the PV2ID macro from ifconfig into net/if_bridgevar.h as they are useful for consumers of libifconfig. Reviewed by: kp, melifaro, mmacy Approved by: mmacy (mentor) MFC after: 1 week Relnotes: yes Differential Revision: https://reviews.freebsd.org/D25460 Added: head/lib/libifconfig/libifconfig_bridge.c (contents, props changed) Modified: head/lib/libifconfig/Makefile head/lib/libifconfig/libifconfig.h head/sbin/ifconfig/ifbridge.c head/sys/net/if_bridgevar.h Modified: head/lib/libifconfig/Makefile ============================================================================== --- head/lib/libifconfig/Makefile Wed Jul 1 02:16:36 2020 (r362823) +++ head/lib/libifconfig/Makefile Wed Jul 1 02:32:41 2020 (r362824) @@ -6,9 +6,14 @@ INTERNALLIB= true SHLIBDIR?= /lib SHLIB_MAJOR= 1 -SRCS= libifconfig.c libifconfig_carp.c libifconfig_inet.c -SRCS+= libifconfig_inet6.c libifconfig_internal.c libifconfig_lagg.c -SRCS+= libifconfig_media.c +SRCS= libifconfig.c \ + libifconfig_bridge.c \ + libifconfig_carp.c \ + libifconfig_inet.c \ + libifconfig_inet6.c \ + libifconfig_internal.c \ + libifconfig_lagg.c \ + libifconfig_media.c # If libifconfig become public uncomment those two lines #INCSDIR= ${INCLUDEDIR} Modified: head/lib/libifconfig/libifconfig.h ============================================================================== --- head/lib/libifconfig/libifconfig.h Wed Jul 1 02:16:36 2020 (r362823) +++ head/lib/libifconfig/libifconfig.h Wed Jul 1 02:32:41 2020 (r362824) @@ -49,12 +49,23 @@ typedef struct ifconfig_handle ifconfig_handle_t; struct carpreq; struct ifaddrs; +struct ifbropreq; +struct ifbreq; struct in6_ndireq; struct lagg_reqall; struct lagg_reqflags; struct lagg_reqopts; struct lagg_reqport; +/** Stores extra info associated with a bridge(4) interface */ +struct ifconfig_bridge_status { + struct ifbropreq *params; /**< current operational parameters */ + struct ifbreq *members; /**< list of bridge members */ + size_t members_count; /**< how many member interfaces */ + uint32_t cache_size; /**< size of address cache */ + uint32_t cache_lifetime; /**< address cache entry lifetime */ +}; + struct ifconfig_capabilities { /** Current capabilities (ifconfig prints this as 'options')*/ int curcap; @@ -217,6 +228,16 @@ int ifconfig_inet_get_addrinfo(ifconfig_handle_t *h, int ifconfig_inet6_get_addrinfo(ifconfig_handle_t *h, const char *name, struct ifaddrs *ifa, struct ifconfig_inet6_addr *addr); +/** Retrieve additional information about a bridge(4) interface */ +int ifconfig_bridge_get_bridge_status(ifconfig_handle_t *h, + const char *name, struct ifconfig_bridge_status **bridge); + +/** Frees the structure returned by ifconfig_bridge_get_bridge_status. Does + * nothing if the argument is NULL + * @param bridge Pointer to the structure to free + */ +void ifconfig_bridge_free_bridge_status(struct ifconfig_bridge_status *bridge); + /** Retrieve additional information about a lagg(4) interface */ int ifconfig_lagg_get_lagg_status(ifconfig_handle_t *h, const char *name, struct ifconfig_lagg_status **lagg_status); @@ -225,8 +246,8 @@ int ifconfig_lagg_get_lagg_status(ifconfig_handle_t *h int ifconfig_lagg_get_laggport_status(ifconfig_handle_t *h, const char *name, struct lagg_reqport *rp); -/** Frees the structure returned by ifconfig_lagg_get_status. Does nothing if - * the argument is NULL +/** Frees the structure returned by ifconfig_lagg_get_lagg_status. Does + * nothing if the argument is NULL * @param laggstat Pointer to the structure to free */ void ifconfig_lagg_free_lagg_status(struct ifconfig_lagg_status *laggstat); Added: head/lib/libifconfig/libifconfig_bridge.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libifconfig/libifconfig_bridge.c Wed Jul 1 02:32:41 2020 (r362824) @@ -0,0 +1,142 @@ +/* + * Copyright (c) 2020, Ryan Moeller + * + * 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 REGENTS 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 REGENTS 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 +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "libifconfig.h" +#include "libifconfig_internal.h" + +/* Internal structure used for allocations and frees */ +struct _ifconfig_bridge_status { + struct ifconfig_bridge_status inner; /* wrapped bridge status */ + struct ifbropreq params; /* operational parameters */ +}; + +static int +ifconfig_bridge_ioctlwrap(ifconfig_handle_t *h, const char *name, + unsigned long cmd, void *arg, size_t arglen, bool set) +{ + struct ifdrv ifd = { 0 }; + unsigned long req = set ? SIOCSDRVSPEC : SIOCGDRVSPEC; + + strlcpy(ifd.ifd_name, name, sizeof(ifd.ifd_name)); + ifd.ifd_cmd = cmd; + ifd.ifd_data = arg; + ifd.ifd_len = arglen; + + return (ifconfig_ioctlwrap(h, AF_LOCAL, req, &ifd)); +} + +int +ifconfig_bridge_get_bridge_status(ifconfig_handle_t *h, + const char *name, struct ifconfig_bridge_status **bridgep) +{ + struct ifbifconf members; + struct ifbrparam cache_param; + struct _ifconfig_bridge_status *bridge; + char *buf; + + *bridgep = NULL; + + bridge = calloc(1, sizeof(struct _ifconfig_bridge_status)); + if (bridge == NULL) { + h->error.errtype = OTHER; + h->error.errcode = ENOMEM; + return (-1); + } + bridge->inner.params = &bridge->params; + + if (ifconfig_bridge_ioctlwrap(h, name, BRDGGCACHE, + &cache_param, sizeof(cache_param), false) != 0) { + free(bridge); + return (-1); + } + bridge->inner.cache_size = cache_param.ifbrp_csize; + + if (ifconfig_bridge_ioctlwrap(h, name, BRDGGTO, + &cache_param, sizeof(cache_param), false) != 0) { + free(bridge); + return (-1); + } + bridge->inner.cache_lifetime = cache_param.ifbrp_ctime; + + if (ifconfig_bridge_ioctlwrap(h, name, BRDGPARAM, + &bridge->params, sizeof(bridge->params), false) != 0) { + free(bridge); + return (-1); + } + + members.ifbic_buf = NULL; + for (size_t len = 8192; + (buf = realloc(members.ifbic_buf, len)) != NULL; + len *= 2) { + members.ifbic_buf = buf; + members.ifbic_len = len; + if (ifconfig_bridge_ioctlwrap(h, name, BRDGGIFS, + &members, sizeof(members), false) != 0) { + free(buf); + free(bridge); + return (-1); + } + if (members.ifbic_len <= len) + break; + } + if (buf == NULL) { + free(members.ifbic_buf); + free(bridge); + h->error.errtype = OTHER; + h->error.errcode = ENOMEM; + return (-1); + } + bridge->inner.members = members.ifbic_req; + bridge->inner.members_count = + members.ifbic_len / sizeof(*members.ifbic_req); + + *bridgep = &bridge->inner; + + return (0); +} + +void +ifconfig_bridge_free_bridge_status(struct ifconfig_bridge_status *bridge) +{ + if (bridge != NULL) { + free(bridge->members); + free(bridge); + } +} Modified: head/sbin/ifconfig/ifbridge.c ============================================================================== --- head/sbin/ifconfig/ifbridge.c Wed Jul 1 02:16:36 2020 (r362823) +++ head/sbin/ifconfig/ifbridge.c Wed Jul 1 02:32:41 2020 (r362824) @@ -63,36 +63,9 @@ static const char rcsid[] = #include "ifconfig.h" -#define PV2ID(pv, epri, eaddr) do { \ - epri = pv >> 48; \ - eaddr[0] = pv >> 40; \ - eaddr[1] = pv >> 32; \ - eaddr[2] = pv >> 24; \ - eaddr[3] = pv >> 16; \ - eaddr[4] = pv >> 8; \ - eaddr[5] = pv >> 0; \ -} while (0) - -static const char *stpstates[] = { - "disabled", - "listening", - "learning", - "forwarding", - "blocking", - "discarding" -}; -static const char *stpproto[] = { - "stp", - "-", - "rstp" -}; -static const char *stproles[] = { - "disabled", - "root", - "designated", - "alternate", - "backup" -}; +static const char *stpstates[] = { STP_STATES }; +static const char *stpproto[] = { STP_PROTOS }; +static const char *stproles[] = { STP_ROLES }; static int get_val(const char *cp, u_long *valp) Modified: head/sys/net/if_bridgevar.h ============================================================================== --- head/sys/net/if_bridgevar.h Wed Jul 1 02:16:36 2020 (r362823) +++ head/sys/net/if_bridgevar.h Wed Jul 1 02:32:41 2020 (r362824) @@ -269,6 +269,36 @@ struct ifbpstpconf { #define ifbpstp_req ifbpstp_ifbpstpu.ifbpstpu_req }; +#define STP_STATES \ + "disabled", \ + "listening", \ + "learning", \ + "forwarding", \ + "blocking", \ + "discarding" + +#define STP_PROTOS \ + "stp" \ + "-" \ + "rstp" + +#define STP_ROLES \ + "disabled" \ + "root" \ + "designated" \ + "alternate" \ + "backup" + +#define PV2ID(pv, epri, eaddr) do { \ + epri = pv >> 48; \ + eaddr[0] = pv >> 40; \ + eaddr[1] = pv >> 32; \ + eaddr[2] = pv >> 24; \ + eaddr[3] = pv >> 16; \ + eaddr[4] = pv >> 8; \ + eaddr[5] = pv >> 0; \ +} while (0) + #ifdef _KERNEL #define BRIDGE_INPUT(_ifp, _m) do { \ From owner-svn-src-all@freebsd.org Wed Jul 1 03:47:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 076DA35C46D; Wed, 1 Jul 2020 03:47:00 +0000 (UTC) (envelope-from csjp@ion.sqrt.ca) Received: from ion.sqrt.ca (ion.sqrt.ca [192.73.242.220]) by mx1.freebsd.org (Postfix) with ESMTP id 49xRxG5c1Fz4JBy; Wed, 1 Jul 2020 03:46:58 +0000 (UTC) (envelope-from csjp@ion.sqrt.ca) Received: by ion.sqrt.ca (Postfix, from userid 1000) id 8EFCA81A16; Tue, 30 Jun 2020 20:46:52 -0700 (PDT) Date: Tue, 30 Jun 2020 20:46:52 -0700 From: csjp@ion.sqrt.ca To: "Piotr P. Stefaniak" Cc: "Christian S.J. Peron" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r358181 - head/usr.sbin/pstat Message-ID: <20200701034652.GA1094@ion.sqrt.ca> References: <202002202112.01KLCAKx000852@repo.freebsd.org> <20200622215315.GC28243@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200622215315.GC28243@freefall.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Rspamd-Queue-Id: 49xRxG5c1Fz4JBy X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of csjp@ion.sqrt.ca has no SPF policy when checking 192.73.242.220) smtp.mailfrom=csjp@ion.sqrt.ca X-Spamd-Result: default: False [3.08 / 15.00]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.42)[0.416]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[sqrt.ca]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.92)[0.921]; RCPT_COUNT_FIVE(0.00)[5]; NEURAL_SPAM_LONG(0.85)[0.848]; FROM_NO_DN(0.00)[]; R_SPF_NA(0.00)[no SPF record]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:36236, ipnet:192.73.242.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 03:47:00 -0000 Piotr, Thanks for the heads up. I will fix this shortly. On Mon, Jun 22, 2020 at 11:53:15PM +0200, Piotr P. Stefaniak wrote: > On 2020-02-20 21:12:10, Christian S.J. Peron wrote: > >Author: csjp > >Date: Thu Feb 20 21:12:10 2020 > >New Revision: 358181 > >URL: https://svnweb.freebsd.org/changeset/base/358181 > > > >Log: > > - Implement -h (human readable) for the size of the underlying block disk. > > Currently, the size of the swap device is unconditionally reported using > > blocks, even if -h has been used. > > - While here, switch to CONVERT_BLOCKS() instead of CONVERT() which will > > avoid overflowing size counters (in human readable form see: r196244) > > - Update the column headers to reflect that a size is being reported instead > > of the block size units being used > > > > Before: > > > > $ swapinfo > > Device 1K-blocks Used Avail Capacity > > /dev/gpt/swapfs 1048576 0 1048576 0% > > In the above, the "1K-blocks" and "1048576" line up because both the > header and the value have field width of hlen which is always set by > getbsize(&hlen, &blocksize). In other words, the header name sets the > width for the column. It is especially apparent when you compare output > with BLOCKSIZE=1000000000 and BLOCKSIZE=1K. > > > After: > > > > $ swapinfo -h > > Device Size Used Avail Capacity > > /dev/gpt/swapfs 1.0G 0B 1.0G 0% > > Here the width for the header is sizeof "Size" and the width for values > of the size is 8, so the header and the values don't make up a column. > > Since field width for all values of Size, Used, and Avail are hardcoded > to 8 as well as the column headers, I think the best suggestion I can > give is to change it like this: > > @@ -475,7 +475,7 @@ print_swap_header(void) > if (humanflag) { > header = SIZEHDR; > - hlen = sizeof(SIZEHDR); > + hlen = 8; /* as the hardcoded field width of values */ > } else { > header = getbsize(&hlen, &blocksize); > } > > Although 8 seems to me a bit high. And too bad that humanize_number() is > locale-agnostic. > > > Differential Revision: https://reviews.freebsd.org/D23758 > > Reviewed by: kevans > > MFC after: 3 weeks > > > >Modified: > > head/usr.sbin/pstat/pstat.c From owner-svn-src-all@freebsd.org Wed Jul 1 04:00:55 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7BC8C35CEFA; Wed, 1 Jul 2020 04:00:55 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xSFM2jFsz4JqY; Wed, 1 Jul 2020 04:00:55 +0000 (UTC) (envelope-from takawata@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 40DBC22E7F; Wed, 1 Jul 2020 04:00:55 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06140tqF063882; Wed, 1 Jul 2020 04:00:55 GMT (envelope-from takawata@FreeBSD.org) Received: (from takawata@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06140tZb063881; Wed, 1 Jul 2020 04:00:55 GMT (envelope-from takawata@FreeBSD.org) Message-Id: <202007010400.06140tZb063881@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: takawata set sender to takawata@FreeBSD.org using -f From: Takanori Watanabe Date: Wed, 1 Jul 2020 04:00:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362825 - head/sys/netgraph/bluetooth/socket X-SVN-Group: head X-SVN-Commit-Author: takawata X-SVN-Commit-Paths: head/sys/netgraph/bluetooth/socket X-SVN-Commit-Revision: 362825 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 04:00:55 -0000 Author: takawata Date: Wed Jul 1 04:00:54 2020 New Revision: 362825 URL: https://svnweb.freebsd.org/changeset/base/362825 Log: Allow some Bluetooth LE related HCI request to non-root user. PR: 247588 Reported by: Greg V (greg@unrelenting.technology) Reviewed by: emax Differential Revision: https://reviews.freebsd.org/D25516 Modified: head/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c Modified: head/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c ============================================================================== --- head/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c Wed Jul 1 02:32:41 2020 (r362824) +++ head/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c Wed Jul 1 04:00:54 2020 (r362825) @@ -861,6 +861,7 @@ ng_btsocket_hci_raw_init(void) bit_set(f, NG_HCI_OCF_READ_IAC_LAP - 1); bit_set(f, NG_HCI_OCF_READ_PAGE_SCAN_PERIOD - 1); bit_set(f, NG_HCI_OCF_READ_PAGE_SCAN - 1); + bit_set(f, NG_HCI_OCF_READ_LE_HOST_SUPPORTED -1); /* Commands - Informational */ f = ng_btsocket_hci_raw_sec_filter->commands[NG_HCI_OGF_INFO - 1]; @@ -881,6 +882,11 @@ ng_btsocket_hci_raw_init(void) bit_set(f, NG_HCI_OCF_READ_LOOPBACK_MODE - 1); /*Commands - LE*/ f = ng_btsocket_hci_raw_sec_filter->commands[NG_HCI_OGF_LE -1]; + bit_set(f, NG_HCI_OCF_LE_SET_SCAN_ENABLE - 1); + bit_set(f, NG_HCI_OCF_LE_SET_SCAN_PARAMETERS - 1); + bit_set(f, NG_HCI_OCF_LE_READ_LOCAL_SUPPORTED_FEATURES - 1); + bit_set(f, NG_HCI_OCF_LE_READ_BUFFER_SIZE - 1); + bit_set(f, NG_HCI_OCF_LE_READ_WHITE_LIST_SIZE - 1); } /* ng_btsocket_hci_raw_init */ From owner-svn-src-all@freebsd.org Wed Jul 1 05:56:30 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0823A362FE9; Wed, 1 Jul 2020 05:56:30 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xVpj6Jqfz3y2Q; Wed, 1 Jul 2020 05:56:29 +0000 (UTC) (envelope-from mjg@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 B7A2D24B04; Wed, 1 Jul 2020 05:56:29 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0615uTe8036133; Wed, 1 Jul 2020 05:56:29 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0615uTEb036131; Wed, 1 Jul 2020 05:56:29 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202007010556.0615uTEb036131@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 1 Jul 2020 05:56:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362827 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 362827 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 05:56:30 -0000 Author: mjg Date: Wed Jul 1 05:56:29 2020 New Revision: 362827 URL: https://svnweb.freebsd.org/changeset/base/362827 Log: vfs: protect vnodes with smr vget_prep_smr and vhold_smr can be used to ref a vnode while within vfs_smr section, allowing consumers to get away without locking. See vhold_smr and vdropl for comments explaining caveats. Reviewed by: kib Testec by: pho Differential Revision: https://reviews.freebsd.org/D23913 Modified: head/sys/kern/vfs_subr.c head/sys/sys/vnode.h Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Wed Jul 1 04:12:41 2020 (r362826) +++ head/sys/kern/vfs_subr.c Wed Jul 1 05:56:29 2020 (r362827) @@ -76,6 +76,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -238,6 +239,8 @@ static uma_zone_t buf_trie_zone; static uma_zone_t vnode_zone; static uma_zone_t vnodepoll_zone; +__read_frequently smr_t vfs_smr; + /* * The workitem queue. * @@ -661,7 +664,8 @@ vntblinit(void *dummy __unused) vnode_list_reclaim_marker = vn_alloc_marker(NULL); TAILQ_INSERT_HEAD(&vnode_list, vnode_list_reclaim_marker, v_vnodelist); vnode_zone = uma_zcreate("VNODE", sizeof (struct vnode), NULL, NULL, - vnode_init, vnode_fini, UMA_ALIGN_PTR, 0); + vnode_init, vnode_fini, UMA_ALIGN_PTR, UMA_ZONE_SMR); + vfs_smr = uma_zone_get_smr(vnode_zone); vnodepoll_zone = uma_zcreate("VNODEPOLL", sizeof (struct vpollinfo), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); /* @@ -1603,7 +1607,7 @@ alloc: if (vnlru_under(rnumvnodes, vlowat)) vnlru_kick(); mtx_unlock(&vnode_list_mtx); - return (uma_zalloc(vnode_zone, M_WAITOK)); + return (uma_zalloc_smr(vnode_zone, M_WAITOK)); } static struct vnode * @@ -1619,7 +1623,7 @@ vn_alloc(struct mount *mp) return (vn_alloc_hard(mp)); } - return (uma_zalloc(vnode_zone, M_WAITOK)); + return (uma_zalloc_smr(vnode_zone, M_WAITOK)); } static void @@ -1627,7 +1631,7 @@ vn_free(struct vnode *vp) { atomic_subtract_long(&numvnodes, 1); - uma_zfree(vnode_zone, vp); + uma_zfree_smr(vnode_zone, vp); } /* @@ -1758,7 +1762,7 @@ freevnode(struct vnode *vp) CTR2(KTR_VFS, "%s: destroying the vnode %p", __func__, vp); bo = &vp->v_bufobj; VNASSERT(vp->v_data == NULL, vp, ("cleaned vnode isn't")); - VNASSERT(vp->v_holdcnt == 0, vp, ("Non-zero hold count")); + VNPASS(vp->v_holdcnt == VHOLD_NO_SMR, vp); VNASSERT(vp->v_usecount == 0, vp, ("Non-zero use count")); VNASSERT(vp->v_writecount == 0, vp, ("Non-zero write count")); VNASSERT(bo->bo_numoutput == 0, vp, ("Clean vnode has pending I/O's")); @@ -2848,8 +2852,30 @@ v_decr_devcount(struct vnode *vp) * * holdcnt can be manipulated using atomics without holding any locks, * except when transitioning 1<->0, in which case the interlock is held. + * + * Consumers which don't guarantee liveness of the vnode can use SMR to + * try to get a reference. Note this operation can fail since the vnode + * may be awaiting getting freed by the time they get to it. */ enum vgetstate +vget_prep_smr(struct vnode *vp) +{ + enum vgetstate vs; + + VFS_SMR_ASSERT_ENTERED(); + + if (refcount_acquire_if_not_zero(&vp->v_usecount)) { + vs = VGET_USECOUNT; + } else { + if (vhold_smr(vp)) + vs = VGET_HOLDCNT; + else + vs = VGET_NONE; + } + return (vs); +} + +enum vgetstate vget_prep(struct vnode *vp) { enum vgetstate vs; @@ -2919,6 +2945,7 @@ vget_finish(struct vnode *vp, int flags, enum vgetstat ASSERT_VI_LOCKED(vp, __func__); else ASSERT_VI_UNLOCKED(vp, __func__); + VNPASS(vs == VGET_HOLDCNT || vs == VGET_USECOUNT, vp); VNPASS(vp->v_holdcnt > 0, vp); VNPASS(vs == VGET_HOLDCNT || vp->v_usecount > 0, vp); @@ -3380,7 +3407,8 @@ vhold(struct vnode *vp) CTR2(KTR_VFS, "%s: vp %p", __func__, vp); old = atomic_fetchadd_int(&vp->v_holdcnt, 1); - VNASSERT(old >= 0, vp, ("%s: wrong hold count %d", __func__, old)); + VNASSERT(old >= 0 && (old & VHOLD_ALL_FLAGS) == 0, vp, + ("%s: wrong hold count %d", __func__, old)); if (old != 0) return; critical_enter(); @@ -3405,12 +3433,40 @@ vholdnz(struct vnode *vp) CTR2(KTR_VFS, "%s: vp %p", __func__, vp); #ifdef INVARIANTS int old = atomic_fetchadd_int(&vp->v_holdcnt, 1); - VNASSERT(old > 0, vp, ("%s: wrong hold count %d", __func__, old)); + VNASSERT(old > 0 && (old & VHOLD_ALL_FLAGS) == 0, vp, + ("%s: wrong hold count %d", __func__, old)); #else atomic_add_int(&vp->v_holdcnt, 1); #endif } +/* + * Grab a hold count as long as the vnode is not getting freed. + * + * Only use this routine if vfs smr is the only protection you have against + * freeing the vnode. + */ +bool +vhold_smr(struct vnode *vp) +{ + int count; + + VFS_SMR_ASSERT_ENTERED(); + + count = atomic_load_int(&vp->v_holdcnt); + for (;;) { + if (count & VHOLD_NO_SMR) { + VNASSERT((count & ~VHOLD_NO_SMR) == 0, vp, + ("non-zero hold count with flags %d\n", count)); + return (false); + } + + VNASSERT(count >= 0, vp, ("invalid hold count %d\n", count)); + if (atomic_fcmpset_int(&vp->v_holdcnt, &count, count + 1)) + return (true); + } +} + static void __noinline vdbatch_process(struct vdbatch *vd) { @@ -3581,11 +3637,25 @@ vdropl(struct vnode *vp) VI_UNLOCK(vp); return; } - if (VN_IS_DOOMED(vp)) { - freevnode(vp); + if (!VN_IS_DOOMED(vp)) { + vdrop_deactivate(vp); return; } - vdrop_deactivate(vp); + /* + * We may be racing against vhold_smr. + * + * If they win we can just pretend we never got this far, they will + * vdrop later. + */ + if (!atomic_cmpset_int(&vp->v_holdcnt, 0, VHOLD_NO_SMR)) { + /* + * We lost the aforementioned race. Note that any subsequent + * access is invalid as they might have managed to vdropl on + * their own. + */ + return; + } + freevnode(vp); } /* @@ -4041,20 +4111,25 @@ static const char * const typename[] = {"VNON", "VREG", "VDIR", "VBLK", "VCHR", "VLNK", "VSOCK", "VFIFO", "VBAD", "VMARKER"}; +_Static_assert((VHOLD_ALL_FLAGS & ~VHOLD_NO_SMR) == 0, + "new hold count flag not added to vn_printf"); + void vn_printf(struct vnode *vp, const char *fmt, ...) { va_list ap; char buf[256], buf2[16]; u_long flags; + u_int holdcnt; va_start(ap, fmt); vprintf(fmt, ap); va_end(ap); printf("%p: ", (void *)vp); printf("type %s\n", typename[vp->v_type]); + holdcnt = atomic_load_int(&vp->v_holdcnt); printf(" usecount %d, writecount %d, refcount %d", - vp->v_usecount, vp->v_writecount, vp->v_holdcnt); + vp->v_usecount, vp->v_writecount, holdcnt & ~VHOLD_ALL_FLAGS); switch (vp->v_type) { case VDIR: printf(" mountedhere %p\n", vp->v_mountedhere); @@ -4072,6 +4147,12 @@ vn_printf(struct vnode *vp, const char *fmt, ...) printf("\n"); break; } + buf[0] = '\0'; + buf[1] = '\0'; + if (holdcnt & VHOLD_NO_SMR) + strlcat(buf, "|VHOLD_NO_SMR", sizeof(buf)); + printf(" hold count flags (%s)\n", buf + 1); + buf[0] = '\0'; buf[1] = '\0'; if (vp->v_irflag & VIRF_DOOMED) Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Wed Jul 1 04:12:41 2020 (r362826) +++ head/sys/sys/vnode.h Wed Jul 1 05:56:29 2020 (r362827) @@ -58,7 +58,7 @@ enum vtype { VNON, VREG, VDIR, VBLK, VCHR, VLNK, VSOCK, VFIFO, VBAD, VMARKER }; -enum vgetstate { VGET_HOLDCNT, VGET_USECOUNT }; +enum vgetstate { VGET_NONE, VGET_HOLDCNT, VGET_USECOUNT }; /* * Each underlying filesystem allocates its own private area and hangs * it from v_data. If non-null, this area is freed in getnewvnode(). @@ -236,6 +236,9 @@ struct xvnode { * VIRF_DOOMED is doubly protected by the interlock and vnode lock. Both * are required for writing but the status may be checked with either. */ +#define VHOLD_NO_SMR (1<<29) /* Disable vhold_smr */ +#define VHOLD_ALL_FLAGS (VHOLD_NO_SMR) + #define VIRF_DOOMED 0x0001 /* This vnode is being recycled */ #define VI_TEXT_REF 0x0001 /* Text ref grabbed use ref */ @@ -657,12 +660,14 @@ void vdrop(struct vnode *); void vdropl(struct vnode *); int vflush(struct mount *mp, int rootrefs, int flags, struct thread *td); int vget(struct vnode *vp, int flags, struct thread *td); +enum vgetstate vget_prep_smr(struct vnode *vp); enum vgetstate vget_prep(struct vnode *vp); int vget_finish(struct vnode *vp, int flags, enum vgetstate vs); void vgone(struct vnode *vp); void vhold(struct vnode *); void vholdl(struct vnode *); void vholdnz(struct vnode *); +bool vhold_smr(struct vnode *); void vinactive(struct vnode *vp); int vinvalbuf(struct vnode *vp, int save, int slpflag, int slptimeo); int vtruncbuf(struct vnode *vp, off_t length, int blksize); @@ -973,6 +978,16 @@ int vn_dir_check_exec(struct vnode *vp, struct compone #define VFS_VOP_VECTOR_REGISTER(vnodeops) \ SYSINIT(vfs_vector_##vnodeops##_f, SI_SUB_VFS, SI_ORDER_ANY, \ vfs_vector_op_register, &vnodeops) + +#define VFS_SMR_DECLARE \ + extern smr_t vfs_smr + +#define VFS_SMR() vfs_smr +#define vfs_smr_enter() smr_enter(VFS_SMR()) +#define vfs_smr_exit() smr_exit(VFS_SMR()) +#define VFS_SMR_ASSERT_ENTERED() SMR_ASSERT_ENTERED(VFS_SMR()) +#define VFS_SMR_ASSERT_NOT_ENTERED() SMR_ASSERT_NOT_ENTERED(VFS_SMR()) +#define VFS_SMR_ZONE_SET(zone) uma_zone_set_smr((zone), VFS_SMR()) #endif /* _KERNEL */ From owner-svn-src-all@freebsd.org Wed Jul 1 05:59:09 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 94C283633B9; Wed, 1 Jul 2020 05:59:09 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xVsn3Gcqz3y2G; Wed, 1 Jul 2020 05:59:09 +0000 (UTC) (envelope-from mjg@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 536A4244E0; Wed, 1 Jul 2020 05:59:09 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0615x94R036297; Wed, 1 Jul 2020 05:59:09 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0615x9Da036296; Wed, 1 Jul 2020 05:59:09 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202007010559.0615x9Da036296@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 1 Jul 2020 05:59:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362828 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 362828 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 05:59:09 -0000 Author: mjg Date: Wed Jul 1 05:59:08 2020 New Revision: 362828 URL: https://svnweb.freebsd.org/changeset/base/362828 Log: cache: lockless forward lookup with smr This eliminates the need to take bucket locks in the common case. Concurrent lookup utilizng the same vnodes is still bottlenecked on referencing and locking path components, this will be taken care of separately. Reviewed by: kib Tested by: pho Differential Revision: https://reviews.freebsd.org/D23913 Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Wed Jul 1 05:56:29 2020 (r362827) +++ head/sys/kern/vfs_cache.c Wed Jul 1 05:59:08 2020 (r362828) @@ -56,11 +56,13 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include #include #include +#include #ifdef KTRACE #include #endif @@ -104,7 +106,7 @@ SDT_PROBE_DEFINE2(vfs, namecache, shrink_negative, don */ struct namecache { - LIST_ENTRY(namecache) nc_hash; /* hash chain */ + CK_LIST_ENTRY(namecache) nc_hash;/* hash chain */ LIST_ENTRY(namecache) nc_src; /* source vnode list */ TAILQ_ENTRY(namecache) nc_dst; /* destination vnode list */ struct vnode *nc_dvp; /* vnode of parent of name */ @@ -143,7 +145,26 @@ struct namecache_ts { #define NCF_DVDROP 0x10 #define NCF_NEGATIVE 0x20 #define NCF_HOTNEGATIVE 0x40 +#define NCF_INVALID 0x80 +static bool +cache_ncp_invalid(struct namecache *ncp) +{ + + atomic_thread_fence_acq(); + return ((ncp->nc_flag & NCF_INVALID) != 0); +} + +static void +cache_ncp_invalidate(struct namecache *ncp) +{ + + atomic_thread_fence_rel(); + KASSERT((ncp->nc_flag & NCF_INVALID) == 0, + ("%s: entry %p already invalid", __func__, ncp)); + ncp->nc_flag |= NCF_INVALID; +} + /* * Name caching works as follows: * @@ -192,12 +213,14 @@ struct namecache_ts { * the first node, locking everything in order and revalidating the state. */ +VFS_SMR_DECLARE; + /* * Structures associated with name caching. */ #define NCHHASH(hash) \ (&nchashtbl[(hash) & nchash]) -static __read_mostly LIST_HEAD(nchashhead, namecache) *nchashtbl;/* Hash Table */ +static __read_mostly CK_LIST_HEAD(nchashhead, namecache) *nchashtbl;/* Hash Table */ static u_long __read_mostly nchash; /* size of hash table */ SYSCTL_ULONG(_debug, OID_AUTO, nchash, CTLFLAG_RD, &nchash, 0, "Size of namecache hash table"); @@ -275,15 +298,15 @@ cache_alloc(int len, int ts) if (__predict_false(ts)) { if (len <= CACHE_PATH_CUTOFF) - ncp_ts = uma_zalloc(cache_zone_small_ts, M_WAITOK); + ncp_ts = uma_zalloc_smr(cache_zone_small_ts, M_WAITOK); else - ncp_ts = uma_zalloc(cache_zone_large_ts, M_WAITOK); + ncp_ts = uma_zalloc_smr(cache_zone_large_ts, M_WAITOK); ncp = &ncp_ts->nc_nc; } else { if (len <= CACHE_PATH_CUTOFF) - ncp = uma_zalloc(cache_zone_small, M_WAITOK); + ncp = uma_zalloc_smr(cache_zone_small, M_WAITOK); else - ncp = uma_zalloc(cache_zone_large, M_WAITOK); + ncp = uma_zalloc_smr(cache_zone_large, M_WAITOK); } return (ncp); } @@ -300,14 +323,14 @@ cache_free(struct namecache *ncp) if (__predict_false(ncp->nc_flag & NCF_TS)) { ncp_ts = __containerof(ncp, struct namecache_ts, nc_nc); if (ncp->nc_nlen <= CACHE_PATH_CUTOFF) - uma_zfree(cache_zone_small_ts, ncp_ts); + uma_zfree_smr(cache_zone_small_ts, ncp_ts); else - uma_zfree(cache_zone_large_ts, ncp_ts); + uma_zfree_smr(cache_zone_large_ts, ncp_ts); } else { if (ncp->nc_nlen <= CACHE_PATH_CUTOFF) - uma_zfree(cache_zone_small, ncp); + uma_zfree_smr(cache_zone_small, ncp); else - uma_zfree(cache_zone_large, ncp); + uma_zfree_smr(cache_zone_large, ncp); } } @@ -606,7 +629,7 @@ retry: } /* Scan hash tables counting entries */ for (ncpp = nchashtbl, i = 0; i < n_nchash; ncpp++, i++) - LIST_FOREACH(ncp, ncpp, nc_hash) + CK_LIST_FOREACH(ncp, ncpp, nc_hash) cntbuf[i]++; cache_unlock_all_buckets(); for (error = 0, i = 0; i < n_nchash; i++) @@ -639,7 +662,7 @@ sysctl_debug_hashstat_nchash(SYSCTL_HANDLER_ARGS) /* Scan hash tables for applicable entries */ for (ncpp = nchashtbl; n_nchash > 0; n_nchash--, ncpp++) { count = 0; - LIST_FOREACH(ncp, ncpp, nc_hash) { + CK_LIST_FOREACH(ncp, ncpp, nc_hash) { count++; } if (count) @@ -860,7 +883,10 @@ cache_zap_locked(struct namecache *ncp, bool neg_locke CTR2(KTR_VFS, "cache_zap(%p) vp %p", ncp, (ncp->nc_flag & NCF_NEGATIVE) ? NULL : ncp->nc_vp); - LIST_REMOVE(ncp, nc_hash); + + cache_ncp_invalidate(ncp); + + CK_LIST_REMOVE(ncp, nc_hash); if (!(ncp->nc_flag & NCF_NEGATIVE)) { SDT_PROBE3(vfs, namecache, zap, done, ncp->nc_dvp, ncp->nc_name, ncp->nc_vp); @@ -1013,7 +1039,7 @@ cache_zap_unlocked_bucket(struct namecache *ncp, struc cache_sort_vnodes(&dvlp, &vlp); cache_lock_vnodes(dvlp, vlp); rw_wlock(blp); - LIST_FOREACH(rncp, (NCHHASH(hash)), nc_hash) { + CK_LIST_FOREACH(rncp, (NCHHASH(hash)), nc_hash) { if (rncp == ncp && rncp->nc_dvp == dvp && rncp->nc_nlen == cnp->cn_namelen && !bcmp(rncp->nc_name, cnp->cn_nameptr, rncp->nc_nlen)) @@ -1225,12 +1251,12 @@ retry_dotdot: hash = cache_get_hash(cnp->cn_nameptr, cnp->cn_namelen, dvp); blp = HASH2BUCKETLOCK(hash); retry: - if (LIST_EMPTY(NCHHASH(hash))) + if (CK_LIST_EMPTY(NCHHASH(hash))) goto out_no_entry; rw_wlock(blp); - LIST_FOREACH(ncp, (NCHHASH(hash)), nc_hash) { + CK_LIST_FOREACH(ncp, (NCHHASH(hash)), nc_hash) { counter_u64_add(numchecks, 1); if (ncp->nc_dvp == dvp && ncp->nc_nlen == cnp->cn_namelen && !bcmp(ncp->nc_name, cnp->cn_nameptr, ncp->nc_nlen)) @@ -1305,6 +1331,7 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, st uint32_t hash; enum vgetstate vs; int error, ltype; + bool try_smr, doing_smr; #ifdef DEBUG_CACHE if (__predict_false(!doingcache)) { @@ -1321,7 +1348,11 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, st if ((cnp->cn_flags & MAKEENTRY) == 0) return (cache_lookup_nomakeentry(dvp, vpp, cnp, tsp, ticksp)); + try_smr = true; + if (cnp->cn_nameiop == CREATE) + try_smr = false; retry: + doing_smr = false; blp = NULL; dvlp = NULL; error = 0; @@ -1361,10 +1392,17 @@ retry: } hash = cache_get_hash(cnp->cn_nameptr, cnp->cn_namelen, dvp); - blp = HASH2BUCKETLOCK(hash); - rw_rlock(blp); +retry_hashed: + if (try_smr) { + vfs_smr_enter(); + doing_smr = true; + try_smr = false; + } else { + blp = HASH2BUCKETLOCK(hash); + rw_rlock(blp); + } - LIST_FOREACH(ncp, (NCHHASH(hash)), nc_hash) { + CK_LIST_FOREACH(ncp, (NCHHASH(hash)), nc_hash) { counter_u64_add(numchecks, 1); if (ncp->nc_dvp == dvp && ncp->nc_nlen == cnp->cn_namelen && !bcmp(ncp->nc_name, cnp->cn_nameptr, ncp->nc_nlen)) @@ -1373,7 +1411,10 @@ retry: /* We failed to find an entry */ if (__predict_false(ncp == NULL)) { - rw_runlock(blp); + if (doing_smr) + vfs_smr_exit(); + else + rw_runlock(blp); SDT_PROBE3(vfs, namecache, lookup, miss, dvp, cnp->cn_nameptr, NULL); counter_u64_add(nummiss, 1); @@ -1402,8 +1443,22 @@ success: ltype = VOP_ISLOCKED(dvp); VOP_UNLOCK(dvp); } - vs = vget_prep(*vpp); - cache_lookup_unlock(blp, dvlp); + if (doing_smr) { + if (cache_ncp_invalid(ncp)) { + vfs_smr_exit(); + *vpp = NULL; + goto retry; + } + vs = vget_prep_smr(*vpp); + vfs_smr_exit(); + if (vs == VGET_NONE) { + *vpp = NULL; + goto retry; + } + } else { + vs = vget_prep(*vpp); + cache_lookup_unlock(blp, dvlp); + } error = vget_finish(*vpp, cnp->cn_lkflags, vs); if (cnp->cn_flags & ISDOTDOT) { vn_lock(dvp, ltype | LK_RETRY); @@ -1427,21 +1482,37 @@ success: negative_success: /* We found a negative match, and want to create it, so purge */ if (cnp->cn_nameiop == CREATE) { + MPASS(!doing_smr); counter_u64_add(numnegzaps, 1); goto zap_and_exit; } + if (doing_smr) { + if ((ncp->nc_flag & NCF_HOTNEGATIVE) == 0) { + /* + * We need to take locks to promote the entry. + */ + vfs_smr_exit(); + doing_smr = false; + goto retry_hashed; + } + } else { + cache_negative_hit(ncp); + } counter_u64_add(numneghits, 1); - cache_negative_hit(ncp); if (ncp->nc_flag & NCF_WHITE) cnp->cn_flags |= ISWHITEOUT; SDT_PROBE2(vfs, namecache, lookup, hit__negative, dvp, ncp->nc_name); cache_out_ts(ncp, tsp, ticksp); - cache_lookup_unlock(blp, dvlp); + if (doing_smr) + vfs_smr_exit(); + else + cache_lookup_unlock(blp, dvlp); return (ENOENT); zap_and_exit: + MPASS(!doing_smr); if (blp != NULL) error = cache_zap_rlocked_bucket(ncp, cnp, hash, blp); else @@ -1775,7 +1846,7 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, * the same path name. */ ncpp = NCHHASH(hash); - LIST_FOREACH(n2, ncpp, nc_hash) { + CK_LIST_FOREACH(n2, ncpp, nc_hash) { if (n2->nc_dvp == dvp && n2->nc_nlen == cnp->cn_namelen && !bcmp(n2->nc_name, cnp->cn_nameptr, n2->nc_nlen)) { @@ -1840,12 +1911,6 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, } /* - * Insert the new namecache entry into the appropriate chain - * within the cache entries table. - */ - LIST_INSERT_HEAD(ncpp, ncp, nc_hash); - - /* * If the entry is "negative", we place it into the * "negative" cache queue, otherwise, we place it into the * destination vnode's cache entries queue. @@ -1861,6 +1926,14 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, SDT_PROBE2(vfs, namecache, enter_negative, done, dvp, ncp->nc_name); } + + atomic_thread_fence_rel(); + /* + * Insert the new namecache entry into the appropriate chain + * within the cache entries table. + */ + CK_LIST_INSERT_HEAD(ncpp, ncp, nc_hash); + cache_enter_unlock(&cel); if (numneg * ncnegfactor > lnumcache) cache_negative_zap_one(); @@ -1908,6 +1981,11 @@ nchinit(void *dummy __unused) NULL, NULL, NULL, NULL, UMA_ALIGNOF(struct namecache_ts), UMA_ZONE_ZINIT); + VFS_SMR_ZONE_SET(cache_zone_small); + VFS_SMR_ZONE_SET(cache_zone_small_ts); + VFS_SMR_ZONE_SET(cache_zone_large); + VFS_SMR_ZONE_SET(cache_zone_large_ts); + ncsize = desiredvnodes * ncsizefactor; nchashtbl = hashinit(desiredvnodes * 2, M_VFSCACHE, &nchash); ncbuckethash = cache_roundup_2(mp_ncpus * mp_ncpus) - 1; @@ -1973,11 +2051,11 @@ cache_changesize(u_long newmaxvnodes) nchashtbl = new_nchashtbl; nchash = new_nchash; for (i = 0; i <= old_nchash; i++) { - while ((ncp = LIST_FIRST(&old_nchashtbl[i])) != NULL) { + while ((ncp = CK_LIST_FIRST(&old_nchashtbl[i])) != NULL) { hash = cache_get_hash(ncp->nc_name, ncp->nc_nlen, ncp->nc_dvp); - LIST_REMOVE(ncp, nc_hash); - LIST_INSERT_HEAD(NCHHASH(hash), ncp, nc_hash); + CK_LIST_REMOVE(ncp, nc_hash); + CK_LIST_INSERT_HEAD(NCHHASH(hash), ncp, nc_hash); } } ncsize = newncsize; @@ -2091,7 +2169,7 @@ cache_purgevfs(struct mount *mp, bool force) for (j = i; j < n_nchash; j += numbucketlocks) { retry: bucket = &nchashtbl[j]; - LIST_FOREACH_SAFE(ncp, bucket, nc_hash, nnp) { + CK_LIST_FOREACH_SAFE(ncp, bucket, nc_hash, nnp) { cache_assert_bucket_locked(ncp, RA_WLOCKED); if (ncp->nc_dvp->v_mount != mp) continue; From owner-svn-src-all@freebsd.org Wed Jul 1 06:43:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EF1FD364AE9; Wed, 1 Jul 2020 06:43:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xWrb62fRz417v; Wed, 1 Jul 2020 06:43:11 +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)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 9A483297F1; Wed, 1 Jul 2020 06:43:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [10.10.156.45] (unknown [45.85.81.142]) (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 907F73EBF1; Wed, 1 Jul 2020 08:43:09 +0200 (CEST) From: Dimitry Andric Message-Id: Content-Type: multipart/signed; boundary="Apple-Mail=_3C88A624-DCD5-40D9-914D-7ED2C75C30C5"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) Subject: Re: svn commit: r362681 - in head: contrib/bc contrib/bc/gen contrib/bc/include contrib/bc/locales contrib/bc/manuals contrib/bc/src contrib/bc/src/bc contrib/bc/src/dc contrib/bc/src/history contrib/b... Date: Wed, 1 Jul 2020 08:43:01 +0200 In-Reply-To: Cc: src-committers , svn-src-all , svn-src-head To: =?utf-8?Q?Stefan_E=C3=9Fer?= References: <202006271202.05RC22oR085945@repo.freebsd.org> <2b7f0d0f-e243-9c9c-f1c0-e700e0bf6d48@FreeBSD.org> <577b1bd1-598a-d3f9-3c23-537b9747612a@vangyzen.net> <8670f956-1ed4-2b87-ee64-d04bc37d6810@freebsd.org> <54915302-fad6-730c-8ce7-01c70e97fb6a@freebsd.org> <41B27C33-D023-453B-9DED-5776BE059F56@FreeBSD.org> X-Mailer: Apple Mail (2.3445.104.14) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 06:43:12 -0000 --Apple-Mail=_3C88A624-DCD5-40D9-914D-7ED2C75C30C5 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On 1 Jul 2020, at 00:03, Stefan E=C3=9Fer wrote: >=20 > Am 30.06.20 um 23:29 schrieb Dimitry Andric: ... >> This is because you are supposed to commit stuff to ^/base/vendor/xxx >> first, then svn cp it to ^/head/contrib/xxx, at least from Subversion >> 1.8 onwards. The 'cp' action establishes the ancestral relation. >=20 > Yes, I thought so - the problem I want to fix is the premature import > to /contrib and I had been hoping that it was possible to use the > --record-only merge to edit the merge history (as suggested by John > Baldwin and Ed Maste). I have never been able to find a way to 'force' the ancestral relation after the fact. Subversion does not seem to expose this as a user-manipulable property. The --record-only option does what it says, i.e. not actually merging but only updating the svn:mergeinfo property, but it will still only work on ancestrally related objects. > I want to upgrade to the next release and I'm wondering whether it > would be possible to just svn copy that new version over from the > vendor directory to the contrib directory. The import to the vendor > area and the contrib directory have very similar commit messages and > thus there would be no loss of commit history. If you don't have many (or no) customizations, then indeed it will be fairly easy. In one commit, you can svn rm the old version, and svn cp the new version from the vendor area. Subversion will later show the directory to have been "Replaced". There are lots of examples of this in the tree, and I would hope the Git converter can handle it, or there will be much more trouble. :) -Dimitry --Apple-Mail=_3C88A624-DCD5-40D9-914D-7ED2C75C30C5 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 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCXvwwdQAKCRCwXqMKLiCW oxLDAKDAtnHYXklpnJnWzDsOL1G0M0392ACfUvf+NS6GVg7/qr+O6OotJwIucKI= =nynS -----END PGP SIGNATURE----- --Apple-Mail=_3C88A624-DCD5-40D9-914D-7ED2C75C30C5-- From owner-svn-src-all@freebsd.org Wed Jul 1 07:49:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 08125366090; Wed, 1 Jul 2020 07:49:23 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xYJy6TvBz4498; Wed, 1 Jul 2020 07:49:22 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from localhost (p548612f6.dip0.t-ipconnect.de [84.134.18.246]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gbe) by smtp.freebsd.org (Postfix) with ESMTPSA id 6542529B93; Wed, 1 Jul 2020 07:49:22 +0000 (UTC) (envelope-from gbe@freebsd.org) Date: Wed, 1 Jul 2020 09:49:20 +0200 From: Gordon Bergling To: rgrimes@freebsd.org Cc: Gordon Bergling , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362809 - head/contrib/mandoc Message-ID: <20200701074920.GB72275@lion.0xfce3.net> References: <202006301808.05UI8xHC098191@repo.freebsd.org> <202006302256.05UMuHZY053765@gndrsh.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202006302256.05UMuHZY053765@gndrsh.dnsmgr.net> X-Url: X-Operating-System: FreeBSD 12.1-STABLE amd64 X-Host-Uptime: 9:32AM up 20:58, 4 users, load averages: 4.72, 4.93, 4.91 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 07:49:23 -0000 On Tue, Jun 30, 2020 at 03:56:17PM -0700, Rodney W. Grimes wrote: > [ Charset UTF-8 unsupported, converting... ] > > Author: gbe (doc committer) > > Date: Tue Jun 30 18:08:59 2020 > > New Revision: 362809 > > URL: https://svnweb.freebsd.org/changeset/base/362809 > > > > Log: > > Mention FreeBSD in the HISTORY sections of apropos(1) and makewhatis(8). > > > > PR: 223520, 223521 > > Reviewed by: bcr (mentor) > > Approved by: bcr (mentor) > > Differential Revision: https://reviews.freebsd.org/D25521 > > > > Modified: > > head/contrib/mandoc/apropos.1 > > head/contrib/mandoc/makewhatis.8 > > > > Modified: head/contrib/mandoc/apropos.1 > > ============================================================================== > > --- head/contrib/mandoc/apropos.1 Tue Jun 30 17:21:28 2020 (r362808) > > +++ head/contrib/mandoc/apropos.1 Tue Jun 30 18:08:59 2020 (r362809) > > @@ -15,7 +15,7 @@ > > .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF > > .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. > > .\" > > -.Dd $Mdocdate: November 22 2018 $ > > +.Dd $Mdocdate: June 30 2020 $ > > .Dt APROPOS 1 > > .Os > > .Sh NAME > > @@ -493,6 +493,12 @@ The options > > .Fl acfhIKklOTWw > > appeared in > > .Ox 5.7 . > > +.Pp > > +The > > +.Nm > > +utility was integrated into > > +.Fx 11.1 > > +as part of the switch to mandoc. > > Huh? FreeBSD has had apropos since 1.0 and my 5.4 system clearly has it: > freebsd {110}% uname -a > FreeBSD pdx.rh.CN85.dnsmgr.net 5.4-RELEASE-p8 FreeBSD 5.4-RELEASE-p8 #1: Mon Jul 1 17:58:50 PDT 2019 root@pdx.rh.CN85.dnsmgr.net:/usr/src/sys/i386/compile/PDXMXPIE i386 > pdx.rh.CN85.dnsmgr.net:freebsd {111}% which apropos > /usr/bin/apropos > > And a man page for it too: > APROPOS(1) FreeBSD General Commands Manual APROPOS(1) > > NAME > apropos, whatis -- search the whatis database > > SYNOPSIS > apropos keyword ... > whatis keyword ... > > DESCRIPTION > apropos searches a set of database files containing short descriptions of > system commands for keywords and displays the result on the standard out- > put. whatis displays only complete word matches. > > keyword really is an extended regular expression, please read grep(1) > manual page for more information about its format. > > DIAGNOSTICS > The apropos utility exits 0 on success, and 1 if no keyword matched. > > SEE ALSO > grep(1), makewhatis(1), man(1) > > FreeBSD 5.4 January 15, 1991 FreeBSD 5.4 > > > .Sh AUTHORS > > .An -nosplit > > .An Bill Joy > > That is true, but the version of 'apropos' we have currently in base is based on mandoc, which was imported around September 2018. Due to the nature of contributed code I thought it would be best to document only the history when it was integrated into FreeSBD. The same applies for 'makewhatis'. > > Modified: head/contrib/mandoc/makewhatis.8 > > ============================================================================== > > --- head/contrib/mandoc/makewhatis.8 Tue Jun 30 17:21:28 2020 (r362808) > > +++ head/contrib/mandoc/makewhatis.8 Tue Jun 30 18:08:59 2020 (r362809) > > @@ -15,7 +15,7 @@ > > .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF > > .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. > > .\" > > -.Dd $Mdocdate: May 17 2017 $ > > +.Dd $Mdocdate: June 30 2020 $ > > .Dt MAKEWHATIS 8 > > .Os > > .Sh NAME > > @@ -211,6 +211,12 @@ and the options > > .Fl aCDnQT > > in > > .Ox 5.6 . > > +.Pp > > +The > > +.Nm > > +utility was integrated into > > +.Fx 11.1 > > +as part of the switch to mandoc. > > Ditto > > > .Sh AUTHORS > > .An -nosplit > > .An Bill Joy --Gordon From owner-svn-src-all@freebsd.org Wed Jul 1 08:23:58 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 659CF3670CF; Wed, 1 Jul 2020 08:23:58 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xZ4t24Q2z46KN; Wed, 1 Jul 2020 08:23:58 +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 2BD9526595; Wed, 1 Jul 2020 08:23:58 +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 0618NvQe028771; Wed, 1 Jul 2020 08:23:57 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0618Nvcu028770; Wed, 1 Jul 2020 08:23:57 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <202007010823.0618Nvcu028770@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 1 Jul 2020 08:23:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362829 - head/sys/compat/linuxkpi/common/src X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/src X-SVN-Commit-Revision: 362829 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 08:23:58 -0000 Author: hselasky Date: Wed Jul 1 08:23:57 2020 New Revision: 362829 URL: https://svnweb.freebsd.org/changeset/base/362829 Log: The "pid" field in the LinuxKPI task struct is typically set to the thread ID and not the process ID. Make sure the linux_task_exiting() function uses tdfind() to lookup the BSD procedure structure pointer by the "pid" field, and only fallback to pfind() when no match is found! This makes linux_task_exiting() in line with the rest of the code. Differential Revision: https://reviews.freebsd.org/D25509 Submitted by: Greg V MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/src/linux_current.c Modified: head/sys/compat/linuxkpi/common/src/linux_current.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_current.c Wed Jul 1 05:59:08 2020 (r362828) +++ head/sys/compat/linuxkpi/common/src/linux_current.c Wed Jul 1 08:23:57 2020 (r362829) @@ -219,11 +219,21 @@ linux_get_pid_task(pid_t pid) bool linux_task_exiting(struct task_struct *task) { + struct thread *td; struct proc *p; bool ret; ret = false; - p = pfind(task->pid); + + /* try to find corresponding thread */ + td = tdfind(task->pid, -1); + if (td != NULL) { + p = td->td_proc; + } else { + /* try to find corresponding procedure */ + p = pfind(task->pid); + } + if (p != NULL) { if ((p->p_flag & P_WEXIT) != 0) ret = true; From owner-svn-src-all@freebsd.org Wed Jul 1 08:58:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 20086367F50; Wed, 1 Jul 2020 08:58:10 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vtr.rulingia.com (vtr.rulingia.com [IPv6:2001:19f0:5801:ebe:5400:1ff:fe53:30fd]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vtr.rulingia.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xZrJ66jCz48nT; Wed, 1 Jul 2020 08:58:08 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from server.rulingia.com (ppp239-208.static.internode.on.net [59.167.239.208]) by vtr.rulingia.com (8.15.2/8.15.2) with ESMTPS id 0618vrgC071372 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 1 Jul 2020 18:57:58 +1000 (AEST) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.15.2/8.15.2) with ESMTPS id 0618vlmj024318 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 1 Jul 2020 18:57:47 +1000 (AEST) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.15.2/8.15.2/Submit) id 0618vlpq024317; Wed, 1 Jul 2020 18:57:47 +1000 (AEST) (envelope-from peter) Date: Wed, 1 Jul 2020 18:57:47 +1000 From: Peter Jeremy To: Oleksandr Tymoshenko Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362736 - head/sys/arm64/rockchip Message-ID: <20200701085747.GA23928@server.rulingia.com> References: <202006282111.05SLBAAq025544@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="9amGYk9869ThD9tj" Content-Disposition: inline In-Reply-To: <202006282111.05SLBAAq025544@repo.freebsd.org> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp X-Rspamd-Queue-Id: 49xZrJ66jCz48nT X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of peter@rulingia.com designates 2001:19f0:5801:ebe:5400:1ff:fe53:30fd as permitted sender) smtp.mailfrom=peter@rulingia.com X-Spamd-Result: default: False [-4.65 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.98)[-0.978]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; R_SPF_ALLOW(-0.20)[+mx]; DMARC_NA(0.00)[rulingia.com]; NEURAL_HAM_LONG(-1.01)[-1.010]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_HAM_SHORT(-0.26)[-0.263]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:20473, ipnet:2001:19f0:5800::/38, country:US]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 08:58:10 -0000 --9amGYk9869ThD9tj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2020-Jun-28 21:11:10 +0000, Oleksandr Tymoshenko wro= te: >Log: > Configure rx_delay/tx_delay values for RK3399/RK3328 GMAC > =20 > For 1000Mb mode to work reliably TX/RX delays need to be configured > between the TX/RX clock and the respective signals on the PHY > to compensate for differing trace lengths on the PCB. This breaks (at least) diskless booting on my Rock64. During boot, I normally see: regulator: shutting down unused regulators uhub1: 1 port with 1 removable, self powered uhub0: 2 ports with 2 removable, self powered uhub2: 1 port with 1 removable, self powered uhub3: 1 port with 1 removable, self powered dwc0: link state changed to DOWN NFS ROOT: 192.168.12.200:/tank/rock64 dwc0: link state changed to UP Warning: no time-of-day clock registered, system time will not be set accur= ately Warning: no time-of-day clock registered, system time will not be set accur= ately start_init: trying /sbin/init With r362736, I see: setting RK3328 RX/TX delays: 24/36 =2E.. regulator: shutting down unused regulators uhub0: 1 port with 1 removable, self powered uhub3: 2 ports with 2 removable, self powered uhub2: 1 port with 1 removable, self powered uhub1: 1 port with 1 removable, self powered dwc0: link state changed to DOWN NFS ROOT: 192.168.12.200:/tank/rock64 dwc0: link state changed to UP dwc0: link state changed to DOWN dwc0: link state changed to UP [Nothing further until I push the reset button] The system doesn't respond to pings so I suspect the network is dead. Normally, it runs 1000baseT . --=20 Peter Jeremy --9amGYk9869ThD9tj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE2M6l8vfIeOACl4uUHZIUommfjLIFAl78UAVfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEQ4 Q0VBNUYyRjdDODc4RTAwMjk3OEI5NDFEOTIxNEEyNjk5RjhDQjIACgkQHZIUommf jLJfCxAAp42gUhKQr/PQ/BfVuzfbV2xQFi+5D9LBHjqfHkTsqpVUpBZOVXqnrq86 xS9hA8G7cCK4yfOZkez4Ui/8dXHnvq1G+4l5MCIzq+slIecxYghNh0hP2R4M2MZS 00tFeJsJjtdGDIf7VWb9ObzSXJklO10BocWYJX4lId04s3Su9jIO/4zI38EY2Gsw S+LSOhE3NtfauhEr6HrDQqcY1Q5zF4DhIplIy/cyD7RmiHGj0FoU6gemluUTUTxU CWIvyNmzD9GzqJZKwlMe3d6W81uerO0wUT/zyhnobKbc4SnqypjjAduBwnBkMdmj rRYJnLKBxrxFL1ssJ8pApVMgidEs5Aej8g0VI1ZH4TdR5sxPRO6J7ihpJXNzbAzg 5wL3HazxRhseOE+x9OZs/+tes/hLFppTSi0sgAqYrcYAMKMeAKbm8LcFdf2raSqw WUeVI9kIKnCsqUH1JCp8rNVONaAKeAa5ysbbx6AZIJV9K/SSTQ4V7h5OB+WlHD7Y to/Nk1NbFl3viD/TDuxMg9ye/1W+2p3J4SfruU4JO3l7w9f5AVWS7dUV9pyBtHp4 G7/FvCt2BIzdSnYMKs5wB31tVKc7b94AN/1itbFO9scORU+cVOP5pBcpxpoFMEt0 vAGf+sVajoLRYYEj2rwkdgZvXKtiKu4AG9YH99Y/EbkkdCTcFs0= =sO7g -----END PGP SIGNATURE----- --9amGYk9869ThD9tj-- From owner-svn-src-all@freebsd.org Wed Jul 1 09:15:39 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2E2D9348A72; Wed, 1 Jul 2020 09:15:39 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xbDW0SX5z49kY; Wed, 1 Jul 2020 09:15:39 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:13b:39f::9f:25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id CC6862A451; Wed, 1 Jul 2020 09:15:38 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id DECB08D4A164; Wed, 1 Jul 2020 09:15:36 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 5A43DE707B7; Wed, 1 Jul 2020 09:15:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id SZsb-rHruLxT; Wed, 1 Jul 2020 09:15:35 +0000 (UTC) Received: from [192.168.124.1] (unknown [IPv6:fde9:577b:c1a9:4902:70bb:cf29:9220:f82a]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 1C909E707AD; Wed, 1 Jul 2020 09:15:35 +0000 (UTC) From: "Bjoern A. Zeeb" To: "Adrian Chadd" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362815 - head/sys/net80211 Date: Wed, 01 Jul 2020 09:15:34 +0000 X-Mailer: MailMate (2.0BETAr6146) Message-ID: <00AB847F-F2D5-4CC2-B911-648A3D605CF1@FreeBSD.org> In-Reply-To: <202007010023.0610Nn4w031533@repo.freebsd.org> References: <202007010023.0610Nn4w031533@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 09:15:39 -0000 On 1 Jul 2020, at 0:23, Adrian Chadd wrote: > Author: adrian > Date: Wed Jul 1 00:23:49 2020 > New Revision: 362815 > URL: https://svnweb.freebsd.org/changeset/base/362815 > > Log: > [net80211] Migrate HT/legacy protection mode and preamble > calculation to per-VAP flags can you please put these changes into Phabricator with adequate time to get the reviewed in the future? /bz From owner-svn-src-all@freebsd.org Wed Jul 1 09:21:38 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B083F348D8E; Wed, 1 Jul 2020 09:21:38 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49xbMQ0nssz4BbP; Wed, 1 Jul 2020 09:21:37 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id 0619LNt9072763 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 1 Jul 2020 12:21:26 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 0619LNt9072763 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id 0619LND1072762; Wed, 1 Jul 2020 12:21:23 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 1 Jul 2020 12:21:23 +0300 From: Konstantin Belousov To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362829 - head/sys/compat/linuxkpi/common/src Message-ID: <20200701092123.GI32126@kib.kiev.ua> References: <202007010823.0618Nvcu028770@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202007010823.0618Nvcu028770@repo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 49xbMQ0nssz4BbP X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 09:21:38 -0000 On Wed, Jul 01, 2020 at 08:23:57AM +0000, Hans Petter Selasky wrote: > Author: hselasky > Date: Wed Jul 1 08:23:57 2020 > New Revision: 362829 > URL: https://svnweb.freebsd.org/changeset/base/362829 > > Log: > The "pid" field in the LinuxKPI task struct is typically set to the thread ID > and not the process ID. Make sure the linux_task_exiting() function uses tdfind() > to lookup the BSD procedure structure pointer by the "pid" field, and only > fallback to pfind() when no match is found! This makes linux_task_exiting() > in line with the rest of the code. > > Differential Revision: https://reviews.freebsd.org/D25509 > Submitted by: Greg V > MFC after: 1 week > Sponsored by: Mellanox Technologies > > Modified: > head/sys/compat/linuxkpi/common/src/linux_current.c > > Modified: head/sys/compat/linuxkpi/common/src/linux_current.c > ============================================================================== > --- head/sys/compat/linuxkpi/common/src/linux_current.c Wed Jul 1 05:59:08 2020 (r362828) > +++ head/sys/compat/linuxkpi/common/src/linux_current.c Wed Jul 1 08:23:57 2020 (r362829) > @@ -219,11 +219,21 @@ linux_get_pid_task(pid_t pid) > bool > linux_task_exiting(struct task_struct *task) > { > + struct thread *td; > struct proc *p; > bool ret; > > ret = false; > - p = pfind(task->pid); > + > + /* try to find corresponding thread */ > + td = tdfind(task->pid, -1); > + if (td != NULL) { > + p = td->td_proc; > + } else { > + /* try to find corresponding procedure */ > + p = pfind(task->pid); > + } > + > if (p != NULL) { > if ((p->p_flag & P_WEXIT) != 0) > ret = true; It should be expressed as pget(pid, 0); instead of duplicating. From owner-svn-src-all@freebsd.org Wed Jul 1 09:28:01 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C4730348ED6; Wed, 1 Jul 2020 09:28:01 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xbVn4mQzz4Bjn; Wed, 1 Jul 2020 09:28:01 +0000 (UTC) (envelope-from rscheff@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 87BDF27122; Wed, 1 Jul 2020 09:28:01 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0619S1ig066452; Wed, 1 Jul 2020 09:28:01 GMT (envelope-from rscheff@FreeBSD.org) Received: (from rscheff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0619S0pO066449; Wed, 1 Jul 2020 09:28:00 GMT (envelope-from rscheff@FreeBSD.org) Message-Id: <202007010928.0619S0pO066449@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rscheff set sender to rscheff@FreeBSD.org using -f From: Richard Scheffenegger Date: Wed, 1 Jul 2020 09:28:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362830 - stable/12/bin/dd X-SVN-Group: stable-12 X-SVN-Commit-Author: rscheff X-SVN-Commit-Paths: stable/12/bin/dd X-SVN-Commit-Revision: 362830 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 09:28:01 -0000 Author: rscheff Date: Wed Jul 1 09:28:00 2020 New Revision: 362830 URL: https://svnweb.freebsd.org/changeset/base/362830 Log: MFC r361806: Add O_DIRECT flag to DD for cache bypass FreeBSD DD utility has not had support for the O_DIRECT flag, which is useful to bypass local caching, e.g. for unconditionally issuing NFS IO requests during testing. Reviewed by: rgrimes (mentor) Approved by: rgrimes (blanket) MFC after: 3 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D25066 Modified: stable/12/bin/dd/args.c stable/12/bin/dd/dd.1 stable/12/bin/dd/dd.c stable/12/bin/dd/dd.h Directory Properties: stable/12/ (props changed) Modified: stable/12/bin/dd/args.c ============================================================================== --- stable/12/bin/dd/args.c Wed Jul 1 08:23:57 2020 (r362829) +++ stable/12/bin/dd/args.c Wed Jul 1 09:28:00 2020 (r362830) @@ -266,6 +266,7 @@ static const struct iflag { const char *name; uint64_t set, noset; } ilist[] = { + { "direct", C_IDIRECT, 0 }, { "fullblock", C_IFULLBLOCK, C_SYNC }, }; @@ -410,6 +411,7 @@ static const struct oflag { const char *name; uint64_t set; } olist[] = { + { "direct", C_ODIRECT }, { "fsync", C_OFSYNC }, { "sync", C_OFSYNC }, }; Modified: stable/12/bin/dd/dd.1 ============================================================================== --- stable/12/bin/dd/dd.1 Wed Jul 1 08:23:57 2020 (r362829) +++ stable/12/bin/dd/dd.1 Wed Jul 1 09:28:00 2020 (r362830) @@ -32,7 +32,7 @@ .\" @(#)dd.1 8.2 (Berkeley) 1/13/94 .\" $FreeBSD$ .\" -.Dd March 26, 2019 +.Dd June 4, 2020 .Dt DD 1 .Os .Sh NAME @@ -117,6 +117,8 @@ limits the number of times is called on the input rather than the number of blocks copied in full. May not be combined with .Cm conv=sync . +.It Cm direct +Set the O_DIRECT flag on the input file to make reads bypass any local caching. .El .It Cm iseek Ns = Ns Ar n Seek on the input file @@ -143,7 +145,7 @@ the output file is truncated at that point. Where .Cm value is one of the symbols from the following list. -.Bl -tag -width "fsync" +.Bl -tag -width "direct" .It Cm fsync Set the O_FSYNC flag on the output file to make writes synchronous. .It Cm sync @@ -151,6 +153,8 @@ Set the O_SYNC flag on the output file to make writes This is synonymous with the .Cm fsync value. +.It Cm direct +Set the O_DIRECT flag on the output file to make writes bypass any local caching. .El .It Cm oseek Ns = Ns Ar n Seek on the output file Modified: stable/12/bin/dd/dd.c ============================================================================== --- stable/12/bin/dd/dd.c Wed Jul 1 08:23:57 2020 (r362829) +++ stable/12/bin/dd/dd.c Wed Jul 1 09:28:00 2020 (r362830) @@ -143,7 +143,7 @@ static void setup(void) { u_int cnt; - int oflags; + int iflags, oflags; cap_rights_t rights; unsigned long cmds[] = { FIODTYPE, MTIOCTOP }; @@ -151,7 +151,10 @@ setup(void) in.name = "stdin"; in.fd = STDIN_FILENO; } else { - in.fd = open(in.name, O_RDONLY, 0); + iflags = 0; + if (ddflags & C_IDIRECT) + iflags |= O_DIRECT; + in.fd = open(in.name, O_RDONLY | iflags, 0); if (in.fd == -1) err(1, "%s", in.name); } @@ -186,6 +189,8 @@ setup(void) oflags |= O_TRUNC; if (ddflags & C_OFSYNC) oflags |= O_FSYNC; + if (ddflags & C_ODIRECT) + oflags |= O_DIRECT; out.fd = open(out.name, O_RDWR | oflags, DEFFILEMODE); /* * May not have read access, so try again with write only. Modified: stable/12/bin/dd/dd.h ============================================================================== --- stable/12/bin/dd/dd.h Wed Jul 1 08:23:57 2020 (r362829) +++ stable/12/bin/dd/dd.h Wed Jul 1 09:28:00 2020 (r362830) @@ -105,6 +105,8 @@ typedef struct { #define C_FDATASYNC 0x0000000100000000ULL #define C_OFSYNC 0x0000000200000000ULL #define C_IFULLBLOCK 0x0000000400000000ULL +#define C_IDIRECT 0x0000000800000000ULL +#define C_ODIRECT 0x0000001000000000ULL #define C_PARITY (C_PAREVEN | C_PARODD | C_PARNONE | C_PARSET) From owner-svn-src-all@freebsd.org Wed Jul 1 09:32:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 55078348EF1; Wed, 1 Jul 2020 09:32:21 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xbbk6B0Qz4C26; Wed, 1 Jul 2020 09:32:18 +0000 (UTC) (envelope-from rscheff@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 206E727318; Wed, 1 Jul 2020 09:32:18 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0619WHQT070965; Wed, 1 Jul 2020 09:32:17 GMT (envelope-from rscheff@FreeBSD.org) Received: (from rscheff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0619WHEp070964; Wed, 1 Jul 2020 09:32:17 GMT (envelope-from rscheff@FreeBSD.org) Message-Id: <202007010932.0619WHEp070964@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rscheff set sender to rscheff@FreeBSD.org using -f From: Richard Scheffenegger Date: Wed, 1 Jul 2020 09:32:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362831 - stable/12/sys/netinet/cc X-SVN-Group: stable-12 X-SVN-Commit-Author: rscheff X-SVN-Commit-Paths: stable/12/sys/netinet/cc X-SVN-Commit-Revision: 362831 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 09:32:22 -0000 Author: rscheff Date: Wed Jul 1 09:32:17 2020 New Revision: 362831 URL: https://svnweb.freebsd.org/changeset/base/362831 Log: MFC r361987: Prevent TCP Cubic to abruptly increase cwnd after slow-start Introducing flags to track the initial Wmax dragging and exit from slow-start in TCP Cubic. This prevents sudden jumps in the caluclated cwnd by cubic, especially when the flow is application limited during slow start (cwnd can not grow as fast as expected). The downside is that cubic may remain slightly longer in the concave region before starting the convex region beyond Wmax again. Reviewed by: chengc_netapp.com, tuexen (mentor) Approved by: tuexen (mentor), rgrimes (mentor, blanket) MFC after: 3 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D23655 Modified: stable/12/sys/netinet/cc/cc_cubic.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/cc/cc_cubic.c ============================================================================== --- stable/12/sys/netinet/cc/cc_cubic.c Wed Jul 1 09:28:00 2020 (r362830) +++ stable/12/sys/netinet/cc/cc_cubic.c Wed Jul 1 09:32:17 2020 (r362831) @@ -88,8 +88,10 @@ struct cubic { unsigned long max_cwnd; /* cwnd at the previous congestion event. */ unsigned long prev_max_cwnd; - /* Number of congestion events. */ - uint32_t num_cong_events; + /* various flags */ + uint32_t flags; +#define CUBICFLAG_CONG_EVENT 0x00000001 /* congestion experienced */ +#define CUBICFLAG_IN_SLOWSTART 0x00000002 /* in slow start */ /* Minimum observed rtt in ticks. */ int min_rtt_ticks; /* Mean observed rtt between congestion epochs. */ @@ -135,11 +137,17 @@ cubic_ack_received(struct cc_var *ccv, uint16_t type) (V_tcp_do_rfc3465 && ccv->flags & CCF_ABC_SENTAWND))) { /* Use the logic in NewReno ack_received() for slow start. */ if (CCV(ccv, snd_cwnd) <= CCV(ccv, snd_ssthresh) || - cubic_data->min_rtt_ticks == TCPTV_SRTTBASE) + cubic_data->min_rtt_ticks == TCPTV_SRTTBASE) { + cubic_data->flags |= CUBICFLAG_IN_SLOWSTART; newreno_cc_algo.ack_received(ccv, type); - else { + } else { ticks_since_cong = ticks - cubic_data->t_last_cong; + if (cubic_data->flags & CUBICFLAG_IN_SLOWSTART) { + cubic_data->flags &= ~CUBICFLAG_IN_SLOWSTART; + cubic_data->t_last_cong = ticks; + cubic_data->K = 0; + } /* * The mean RTT is used to best reflect the equations in * the I-D. Using min_rtt in the tf_cwnd calculation @@ -185,7 +193,7 @@ cubic_ack_received(struct cc_var *ccv, uint16_t type) * keep updating our current estimate of the * max_cwnd. */ - if (cubic_data->num_cong_events == 0 && + if (((cubic_data->flags & CUBICFLAG_CONG_EVENT) == 0) && cubic_data->max_cwnd < CCV(ccv, snd_cwnd)) cubic_data->max_cwnd = CCV(ccv, snd_cwnd); } @@ -233,9 +241,10 @@ cubic_cong_signal(struct cc_var *ccv, uint32_t type) if (!IN_FASTRECOVERY(CCV(ccv, t_flags))) { if (!IN_CONGRECOVERY(CCV(ccv, t_flags))) { cubic_ssthresh_update(ccv); - cubic_data->num_cong_events++; + cubic_data->flags |= CUBICFLAG_CONG_EVENT; cubic_data->prev_max_cwnd = cubic_data->max_cwnd; cubic_data->max_cwnd = CCV(ccv, snd_cwnd); + cubic_data->K = cubic_k(cubic_data->max_cwnd / CCV(ccv, t_maxseg)); } ENTER_RECOVERY(CCV(ccv, t_flags)); } @@ -244,10 +253,11 @@ cubic_cong_signal(struct cc_var *ccv, uint32_t type) case CC_ECN: if (!IN_CONGRECOVERY(CCV(ccv, t_flags))) { cubic_ssthresh_update(ccv); - cubic_data->num_cong_events++; + cubic_data->flags |= CUBICFLAG_CONG_EVENT; cubic_data->prev_max_cwnd = cubic_data->max_cwnd; cubic_data->max_cwnd = CCV(ccv, snd_cwnd); cubic_data->t_last_cong = ticks; + cubic_data->K = cubic_k(cubic_data->max_cwnd / CCV(ccv, t_maxseg)); CCV(ccv, snd_cwnd) = CCV(ccv, snd_ssthresh); ENTER_CONGRECOVERY(CCV(ccv, t_flags)); } @@ -262,7 +272,7 @@ cubic_cong_signal(struct cc_var *ccv, uint32_t type) * congestion. */ if (CCV(ccv, t_rxtshift) >= 2) { - cubic_data->num_cong_events++; + cubic_data->flags |= CUBICFLAG_CONG_EVENT; cubic_data->t_last_cong = ticks; } break; @@ -408,7 +418,7 @@ cubic_ssthresh_update(struct cc_var *ccv) * On the first congestion event, set ssthresh to cwnd * 0.5, on * subsequent congestion events, set it to cwnd * beta. */ - if (cubic_data->num_cong_events == 0) + if ((cubic_data->flags & CUBICFLAG_CONG_EVENT) == 0) ssthresh = CCV(ccv, snd_cwnd) >> 1; else ssthresh = ((uint64_t)CCV(ccv, snd_cwnd) * From owner-svn-src-all@freebsd.org Wed Jul 1 09:35:34 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7D54D348EFD; Wed, 1 Jul 2020 09:35:34 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xbgV2kx0z4CMN; Wed, 1 Jul 2020 09:35:34 +0000 (UTC) (envelope-from rscheff@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 2742D27482; Wed, 1 Jul 2020 09:35:34 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0619ZX8B073312; Wed, 1 Jul 2020 09:35:33 GMT (envelope-from rscheff@FreeBSD.org) Received: (from rscheff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0619ZXRe073311; Wed, 1 Jul 2020 09:35:33 GMT (envelope-from rscheff@FreeBSD.org) Message-Id: <202007010935.0619ZXRe073311@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rscheff set sender to rscheff@FreeBSD.org using -f From: Richard Scheffenegger Date: Wed, 1 Jul 2020 09:35:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362832 - stable/12/sys/netinet/cc X-SVN-Group: stable-12 X-SVN-Commit-Author: rscheff X-SVN-Commit-Paths: stable/12/sys/netinet/cc X-SVN-Commit-Revision: 362832 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 09:35:34 -0000 Author: rscheff Date: Wed Jul 1 09:35:33 2020 New Revision: 362832 URL: https://svnweb.freebsd.org/changeset/base/362832 Log: MFC r362006: Prevent TCP Cubic to abruptly increase cwnd after app-limited Cubic calculates the new cwnd based on absolute time elapsed since the start of an epoch. A cubic epoch is started on congestion events, or once the congestion avoidance phase is started, after slow-start has completed. When a sender is application limited for an extended amount of time and subsequently a larger volume of data becomes ready for sending, Cubic recalculates cwnd with a lingering cubic epoch. This recalculation of the cwnd can induce a massive increase in cwnd, causing a burst of data to be sent at line rate by the sender. This adds a flag to reset the cubic epoch once a session transitions from app-limited to cwnd-limited to prevent the above effect. Reviewed by: chengc_netapp.com, tuexen (mentor) Approved by: tuexen (mentor), rgrimes (mentor) MFC after: 3 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D25065 Modified: stable/12/sys/netinet/cc/cc_cubic.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/cc/cc_cubic.c ============================================================================== --- stable/12/sys/netinet/cc/cc_cubic.c Wed Jul 1 09:32:17 2020 (r362831) +++ stable/12/sys/netinet/cc/cc_cubic.c Wed Jul 1 09:35:33 2020 (r362832) @@ -92,6 +92,7 @@ struct cubic { uint32_t flags; #define CUBICFLAG_CONG_EVENT 0x00000001 /* congestion experienced */ #define CUBICFLAG_IN_SLOWSTART 0x00000002 /* in slow start */ +#define CUBICFLAG_IN_APPLIMIT 0x00000004 /* application limited */ /* Minimum observed rtt in ticks. */ int min_rtt_ticks; /* Mean observed rtt between congestion epochs. */ @@ -143,8 +144,10 @@ cubic_ack_received(struct cc_var *ccv, uint16_t type) } else { ticks_since_cong = ticks - cubic_data->t_last_cong; - if (cubic_data->flags & CUBICFLAG_IN_SLOWSTART) { - cubic_data->flags &= ~CUBICFLAG_IN_SLOWSTART; + if (cubic_data->flags & (CUBICFLAG_IN_SLOWSTART | + CUBICFLAG_IN_APPLIMIT)) { + cubic_data->flags &= ~(CUBICFLAG_IN_SLOWSTART | + CUBICFLAG_IN_APPLIMIT); cubic_data->t_last_cong = ticks; cubic_data->K = 0; } @@ -197,6 +200,9 @@ cubic_ack_received(struct cc_var *ccv, uint16_t type) cubic_data->max_cwnd < CCV(ccv, snd_cwnd)) cubic_data->max_cwnd = CCV(ccv, snd_cwnd); } + } else if (type == CC_ACK && !IN_RECOVERY(CCV(ccv, t_flags)) && + !(ccv->flags & CCF_CWND_LIMITED)) { + cubic_data->flags |= CUBICFLAG_IN_APPLIMIT; } } From owner-svn-src-all@freebsd.org Wed Jul 1 09:35:54 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0F210349233; Wed, 1 Jul 2020 09:35:54 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49xbgq0rcbz4CHH; Wed, 1 Jul 2020 09:35:50 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [178.17.145.105]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 468F6260A6D; Wed, 1 Jul 2020 11:35:43 +0200 (CEST) Subject: Re: svn commit: r362829 - head/sys/compat/linuxkpi/common/src To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202007010823.0618Nvcu028770@repo.freebsd.org> <20200701092123.GI32126@kib.kiev.ua> From: Hans Petter Selasky Message-ID: <6478a8b2-9bfc-a671-4087-c2de92fea239@selasky.org> Date: Wed, 1 Jul 2020 11:35:21 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200701092123.GI32126@kib.kiev.ua> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49xbgq0rcbz4CHH X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 88.99.82.50 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-2.64 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; NEURAL_HAM_LONG(-1.03)[-1.028]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.43)[-0.434]; NEURAL_HAM_MEDIUM(-0.88)[-0.877]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 09:35:54 -0000 On 2020-07-01 11:21, Konstantin Belousov wrote: > It should be expressed as pget(pid, 0); instead of duplicating. Hi, Currently the LinuxKPI style is to use tdfind() and pfind(). If you look at linux_current.c you see multiple uses of the exact same syntax. Quickly looking at the pget() implementation, I see it doesn't expand to exactly tdfind() and pfind(). pget() uses pfind_tid() which looks overkill compared to tdfind(). tdfind() uses a hash-table lookup, while pfind_tid() doesn't .... I'm confused. --HPS From owner-svn-src-all@freebsd.org Wed Jul 1 10:30:36 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B284934AEA7; Wed, 1 Jul 2020 10:30:36 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49xctz4Zj4z4GTV; Wed, 1 Jul 2020 10:30:35 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id 061AUSQO089540 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 1 Jul 2020 13:30:31 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 061AUSQO089540 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id 061AUSPm089539; Wed, 1 Jul 2020 13:30:28 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 1 Jul 2020 13:30:28 +0300 From: Konstantin Belousov To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362829 - head/sys/compat/linuxkpi/common/src Message-ID: <20200701103028.GJ32126@kib.kiev.ua> References: <202007010823.0618Nvcu028770@repo.freebsd.org> <20200701092123.GI32126@kib.kiev.ua> <6478a8b2-9bfc-a671-4087-c2de92fea239@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6478a8b2-9bfc-a671-4087-c2de92fea239@selasky.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 49xctz4Zj4z4GTV X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com X-Spamd-Result: default: False [0.40 / 15.00]; ARC_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FREEMAIL_FROM(0.00)[gmail.com]; NEURAL_SPAM_SHORT(0.03)[0.028]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all:c]; NEURAL_SPAM_MEDIUM(0.29)[0.294]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.08)[0.079]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 10:30:36 -0000 On Wed, Jul 01, 2020 at 11:35:21AM +0200, Hans Petter Selasky wrote: > On 2020-07-01 11:21, Konstantin Belousov wrote: > > It should be expressed as pget(pid, 0); instead of duplicating. > > Hi, > > Currently the LinuxKPI style is to use tdfind() and pfind(). If you look at > linux_current.c you see multiple uses of the exact same syntax. > > Quickly looking at the pget() implementation, I see it doesn't expand to > exactly tdfind() and pfind(). pget() uses pfind_tid() which looks overkill > compared to tdfind(). tdfind() uses a hash-table lookup, while pfind_tid() > doesn't .... I'm confused. It is trivial to change pget() to use tdfind(), https://reviews.freebsd.org/D25532 I see no point in repeating the same pfind/tdfind calls, better to convert them to pget(), and have this code in one intended place. the sam From owner-svn-src-all@freebsd.org Wed Jul 1 10:37:08 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D3D9F34B211; Wed, 1 Jul 2020 10:37:08 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xd2X5HQyz4H9C; Wed, 1 Jul 2020 10:37:08 +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 95E5127AB7; Wed, 1 Jul 2020 10:37:08 +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 061Ab8lj010660; Wed, 1 Jul 2020 10:37:08 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061Ab8GI010659; Wed, 1 Jul 2020 10:37:08 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202007011037.061Ab8GI010659@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 1 Jul 2020 10:37:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362833 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 362833 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 10:37:08 -0000 Author: trasz Date: Wed Jul 1 10:37:08 2020 New Revision: 362833 URL: https://svnweb.freebsd.org/changeset/base/362833 Log: Rework linux accept(2). This makes the code flow easier to follow, and fixes a bug where calling accept(2) could result in closing fd 0. Note that the code still contains a number of problems: it makes assumptions about l_sockaddr_in being the same as sockaddr_in, the EFAULT-related code looks like it doesn't work at all, and the socket type check is racy. Those will be addressed later on; I'm trying to work in small steps to avoid breaking one thing while fixing another. It fixes Redis, among other things. Reviewed by: kib MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25461 Modified: head/sys/compat/linux/linux_socket.c Modified: head/sys/compat/linux/linux_socket.c ============================================================================== --- head/sys/compat/linux/linux_socket.c Wed Jul 1 09:35:33 2020 (r362832) +++ head/sys/compat/linux/linux_socket.c Wed Jul 1 10:37:08 2020 (r362833) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -611,17 +612,19 @@ linux_accept_common(struct thread *td, int s, l_uintpt { struct l_sockaddr *lsa; struct sockaddr *sa; - struct file *fp; + struct file *fp, *fp1; int bflags, len; struct socket *so; int error, error1; bflags = 0; + fp = NULL; + sa = NULL; + error = linux_set_socket_flags(flags, &bflags); if (error != 0) return (error); - sa = NULL; if (PTRIN(addr) == NULL) { len = 0; error = kern_accept4(td, s, NULL, NULL, bflags, NULL); @@ -632,48 +635,54 @@ linux_accept_common(struct thread *td, int s, l_uintpt if (len < 0) return (EINVAL); error = kern_accept4(td, s, &sa, &len, bflags, &fp); - if (error == 0) - fdrop(fp, td); } + /* + * Translate errno values into ones used by Linux. + */ if (error != 0) { /* * XXX. This is wrong, different sockaddr structures * have different sizes. */ - if (error == EFAULT && namelen != sizeof(struct sockaddr_in)) - { - error = EINVAL; - goto out; - } - if (error == EINVAL) { - error1 = getsock_cap(td, s, &cap_accept_rights, &fp, NULL, NULL); + switch (error) { + case EFAULT: + if (namelen != sizeof(struct sockaddr_in)) + error = EINVAL; + break; + case EINVAL: + error1 = getsock_cap(td, s, &cap_accept_rights, &fp1, NULL, NULL); if (error1 != 0) { error = error1; - goto out; + break; } - so = fp->f_data; + so = fp1->f_data; if (so->so_type == SOCK_DGRAM) error = EOPNOTSUPP; - fdrop(fp, td); + fdrop(fp1, td); + break; } - goto out; + return (error); } - if (len != 0 && error == 0) { + if (len != 0) { error = bsd_to_linux_sockaddr(sa, &lsa, len); if (error == 0) error = copyout(lsa, PTRIN(addr), len); free(lsa, M_SONAME); - } - free(sa, M_SONAME); + /* + * XXX: We should also copyout the len, shouldn't we? + */ -out: - if (error != 0) { - (void)kern_close(td, td->td_retval[0]); - td->td_retval[0] = 0; + if (error != 0) { + fdclose(td, fp, td->td_retval[0]); + td->td_retval[0] = 0; + } } + if (fp != NULL) + fdrop(fp, td); + free(sa, M_SONAME); return (error); } From owner-svn-src-all@freebsd.org Wed Jul 1 10:56:38 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4AA7F34B273; Wed, 1 Jul 2020 10:56:38 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [88.99.82.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49xdT152k1z4J64; Wed, 1 Jul 2020 10:56:37 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2020.home.selasky.org (unknown [178.17.145.105]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 5277B2600F2; Wed, 1 Jul 2020 12:56:34 +0200 (CEST) Subject: Re: svn commit: r362829 - head/sys/compat/linuxkpi/common/src To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202007010823.0618Nvcu028770@repo.freebsd.org> <20200701092123.GI32126@kib.kiev.ua> <6478a8b2-9bfc-a671-4087-c2de92fea239@selasky.org> <20200701103028.GJ32126@kib.kiev.ua> From: Hans Petter Selasky Message-ID: <6563154f-cd07-8468-e4fa-2d23aba4f908@selasky.org> Date: Wed, 1 Jul 2020 12:56:12 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200701103028.GJ32126@kib.kiev.ua> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49xdT152k1z4J64 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 88.99.82.50 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-2.80 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net:c]; NEURAL_HAM_LONG(-0.94)[-0.941]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; NEURAL_HAM_MEDIUM(-0.88)[-0.877]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.68)[-0.683]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 10:56:38 -0000 On 2020-07-01 12:30, Konstantin Belousov wrote: > I see no point in repeating the same pfind/tdfind calls, better to convert > them to pget(), and have this code in one intended place. I wonder if we can convert all cases in linux_current.c to use pget(). Could you have a look too? --HPS From owner-svn-src-all@freebsd.org Wed Jul 1 12:03:58 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A8A8134E335; Wed, 1 Jul 2020 12:03:58 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49xfyj2n8Vz4N65; Wed, 1 Jul 2020 12:03:57 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id 061C3nic010329 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 1 Jul 2020 15:03:52 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 061C3nic010329 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id 061C3nN5010328; Wed, 1 Jul 2020 15:03:49 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 1 Jul 2020 15:03:49 +0300 From: Konstantin Belousov To: Hans Petter Selasky Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362829 - head/sys/compat/linuxkpi/common/src Message-ID: <20200701120349.GK32126@kib.kiev.ua> References: <202007010823.0618Nvcu028770@repo.freebsd.org> <20200701092123.GI32126@kib.kiev.ua> <6478a8b2-9bfc-a671-4087-c2de92fea239@selasky.org> <20200701103028.GJ32126@kib.kiev.ua> <6563154f-cd07-8468-e4fa-2d23aba4f908@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6563154f-cd07-8468-e4fa-2d23aba4f908@selasky.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on tom.home X-Rspamd-Queue-Id: 49xfyj2n8Vz4N65 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com X-Spamd-Result: default: False [0.41 / 15.00]; ARC_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FREEMAIL_FROM(0.00)[gmail.com]; NEURAL_SPAM_SHORT(0.04)[0.037]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all:c]; NEURAL_SPAM_MEDIUM(0.29)[0.291]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.08)[0.078]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 12:03:58 -0000 On Wed, Jul 01, 2020 at 12:56:12PM +0200, Hans Petter Selasky wrote: > On 2020-07-01 12:30, Konstantin Belousov wrote: > > I see no point in repeating the same pfind/tdfind calls, better to convert > > them to pget(), and have this code in one intended place. > > I wonder if we can convert all cases in linux_current.c to use pget(). Could > you have a look too? Other uses in linux_current.c are not suitable for pget(). In case linux_pid_task()/linux_get_pid_task() were passed a tid instead of pid, current code returns lkpi_task for the specified thread. In other words, if using pget(), we would need to find the thread after the call, which makes no sense. On the other hand, there are at least two aspects that can be improved. First, the functions are too similar to require separating body. Second, distinction between pid and tid is static and if we are passed pid, it makes no sense to call tdfind() on it. https://reviews.freebsd.org/D25534 From owner-svn-src-all@freebsd.org Wed Jul 1 12:07:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 02EFA34E1C6; Wed, 1 Jul 2020 12:07:29 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xg2m6FxNz4N9j; Wed, 1 Jul 2020 12:07:28 +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 B9FBE8E3B; Wed, 1 Jul 2020 12:07:28 +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 061C7STa066007; Wed, 1 Jul 2020 12:07:28 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061C7SIW066006; Wed, 1 Jul 2020 12:07:28 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202007011207.061C7SIW066006@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 1 Jul 2020 12:07:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362834 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 362834 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 12:07:29 -0000 Author: andrew Date: Wed Jul 1 12:07:28 2020 New Revision: 362834 URL: https://svnweb.freebsd.org/changeset/base/362834 Log: Simplify the flow when getting/setting an isrc Rather than unlocking and returning we can just perform the needed action only when the interrupt source is valid and reuse the unlock in both the valid irq and invalid irq cases. Sponsored by: Innovate UK Modified: head/sys/kern/subr_intr.c Modified: head/sys/kern/subr_intr.c ============================================================================== --- head/sys/kern/subr_intr.c Wed Jul 1 10:37:08 2020 (r362833) +++ head/sys/kern/subr_intr.c Wed Jul 1 12:07:28 2020 (r362834) @@ -1517,13 +1517,12 @@ intr_map_get_isrc(u_int res_id) { struct intr_irqsrc *isrc; + isrc = NULL; mtx_lock(&irq_map_lock); - if ((res_id >= irq_map_count) || (irq_map[res_id] == NULL)) { - mtx_unlock(&irq_map_lock); - return (NULL); - } - isrc = irq_map[res_id]->isrc; + if (res_id < irq_map_count && irq_map[res_id] != NULL) + isrc = irq_map[res_id]->isrc; mtx_unlock(&irq_map_lock); + return (isrc); } @@ -1532,11 +1531,8 @@ intr_map_set_isrc(u_int res_id, struct intr_irqsrc *is { mtx_lock(&irq_map_lock); - if ((res_id >= irq_map_count) || (irq_map[res_id] == NULL)) { - mtx_unlock(&irq_map_lock); - return; - } - irq_map[res_id]->isrc = isrc; + if (res_id < irq_map_count && irq_map[res_id] != NULL) + irq_map[res_id]->isrc = isrc; mtx_unlock(&irq_map_lock); } From owner-svn-src-all@freebsd.org Wed Jul 1 12:47:54 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D9A4734F50B; Wed, 1 Jul 2020 12:47:54 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from vtr.rulingia.com (vtr.rulingia.com [IPv6:2001:19f0:5801:ebe:5400:1ff:fe53:30fd]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vtr.rulingia.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xgxP5VKCz4QHW; Wed, 1 Jul 2020 12:47:53 +0000 (UTC) (envelope-from peter@rulingia.com) Received: from server.rulingia.com (ppp239-208.static.internode.on.net [59.167.239.208]) by vtr.rulingia.com (8.15.2/8.15.2) with ESMTPS id 061ClhEL072317 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 1 Jul 2020 22:47:49 +1000 (AEST) (envelope-from peter@rulingia.com) X-Bogosity: Ham, spamicity=0.000000 Received: from server.rulingia.com (localhost.rulingia.com [127.0.0.1]) by server.rulingia.com (8.15.2/8.15.2) with ESMTPS id 061ClcLG031814 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 1 Jul 2020 22:47:38 +1000 (AEST) (envelope-from peter@server.rulingia.com) Received: (from peter@localhost) by server.rulingia.com (8.15.2/8.15.2/Submit) id 061Clcwk031813; Wed, 1 Jul 2020 22:47:38 +1000 (AEST) (envelope-from peter) Date: Wed, 1 Jul 2020 22:47:38 +1000 From: Peter Jeremy To: Oleksandr Tymoshenko Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362736 - head/sys/arm64/rockchip Message-ID: <20200701124738.GA30133@server.rulingia.com> References: <202006282111.05SLBAAq025544@repo.freebsd.org> <20200701085747.GA23928@server.rulingia.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="7JfCtLOvnd9MIVvH" Content-Disposition: inline In-Reply-To: <20200701085747.GA23928@server.rulingia.com> X-PGP-Key: http://www.rulingia.com/keys/peter.pgp X-Rspamd-Queue-Id: 49xgxP5VKCz4QHW X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of peter@rulingia.com designates 2001:19f0:5801:ebe:5400:1ff:fe53:30fd as permitted sender) smtp.mailfrom=peter@rulingia.com X-Spamd-Result: default: False [-4.27 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.98)[-0.978]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; R_SPF_ALLOW(-0.20)[+mx]; DMARC_NA(0.00)[rulingia.com]; NEURAL_SPAM_SHORT(0.10)[0.098]; NEURAL_HAM_LONG(-0.99)[-0.991]; RCVD_COUNT_THREE(0.00)[3]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:20473, ipnet:2001:19f0:5800::/38, country:US]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 12:47:54 -0000 --7JfCtLOvnd9MIVvH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2020-Jul-01 18:57:47 +1000, Peter Jeremy wro= te: >On 2020-Jun-28 21:11:10 +0000, Oleksandr Tymoshenko wr= ote: >>Log: >> Configure rx_delay/tx_delay values for RK3399/RK3328 GMAC >> =20 >> For 1000Mb mode to work reliably TX/RX delays need to be configured >> between the TX/RX clock and the respective signals on the PHY >> to compensate for differing trace lengths on the PCB. > >This breaks (at least) diskless booting on my Rock64. I've studied the RK3328 TRM[1] and the RK3328 code following r362736 matches[2] the GRF_MAC_CON0/1 documentation on p201-203 (though p574 says the delay line is configured via GRF_SOC_CON3 - which doesn't match the documentation on GRF_SOC_CON3 on p175-177). That suggests that the delay values in the FDT are incorrect. Unfortunately, the TRM doesn't include any details on how to configure the delay values so it's difficult to adjust the numbers in the FDT. One possible explanation I have is that there are (at least) 2 different Rock64 variants. Later versions have increased the RGMII bus voltage to improve GigE reliability. I initially had problems with GigE reliability and mod'd my Rock64[3] to use the higher RGMII bus voltage - which made it rock solid at GigE. It's possible that different variants need different delay values, due to different track skew or different driver behaviour at different bus voltages. [1] Rockchip_RK3328TRM_V1.1-Part1-20170321.pdf [2] There's one typo: RK3328_GRF_MAC_CON0_TX_MASK instead of RK3328_GRF_MAC_CON0_RX_MASK but the values are the same). [3] Move 1 resistor to change a pull-up to a pull-down --=20 Peter Jeremy --7JfCtLOvnd9MIVvH Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE2M6l8vfIeOACl4uUHZIUommfjLIFAl78heRfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEQ4 Q0VBNUYyRjdDODc4RTAwMjk3OEI5NDFEOTIxNEEyNjk5RjhDQjIACgkQHZIUommf jLKjRg//VBZR1ceAFb5TF8jsqW7bKXRYwQr8ahPj8hCQ3LSYaFjzryb3XsW1HlxH U8RJ9gor+mw3XdNyEuAZ8Sxwm5BxHi97sAPC0ndgeIVBtuTTD2goD5452EP2+5eh 57Gj4TPoQVB7vVFp6lyHC7Om2+Xs81UKjmEAU8/nNVK1uFST9MsOhp9p37cDL9BO gusuUOKXhPdMzvXEOL9ermD5+FmHGioYY7yI7E1R05ZvSCHP94IyfM7SnEaXzWxJ ZfdPqWz16Sqh6iUN4I80Ywjdg9cxegPpqcJ2I+d+QY7o+xHMt3lmXlfqwlFhEPUm liea8BG5NX0UOs/8WohM6QU4gYW4D10C28DtoYT4tUSTyslwSs8jyGWPVBYLex1h JdE0zOzkTqfsS/qfPO7B2rsocoOxJAzaCNpWVcvbHQTdmBrl0pVUMFHG9yDIOdUG N+0c5u5Zdat7vntwCxSIl93T4apoZ0H/bhlZv3dKXBP2py8QOapqSZpg9frS2oqH /Q+1Ix2LwD4tqR1JaLa+Hs9mBkeG0a5mX8WjsN2Hac0EEJ+UbokSa0YRnYtvlcOJ YZPihCeHugjkJ6QMIT7DI09sDkjP4FzA7lM1+uj13dLmmH7noSXFYRxUTtdhfSQq eSvapqplE1/4KmxTWInFY9gtkOZe+Vig7nyDyofI7lS//RPT4uQ= =U/Kh -----END PGP SIGNATURE----- --7JfCtLOvnd9MIVvH-- From owner-svn-src-all@freebsd.org Wed Jul 1 14:51:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6C0F03544CA; Wed, 1 Jul 2020 14:51:21 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 49xkgr6c2rz4bGF; Wed, 1 Jul 2020 14:51:20 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 061EpIN9056898; Wed, 1 Jul 2020 07:51:18 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 061EpIYF056897; Wed, 1 Jul 2020 07:51:18 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202007011451.061EpIYF056897@gndrsh.dnsmgr.net> Subject: Re: svn commit: r362809 - head/contrib/mandoc In-Reply-To: <20200701074920.GB72275@lion.0xfce3.net> To: Gordon Bergling Date: Wed, 1 Jul 2020 07:51:18 -0700 (PDT) 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: 49xkgr6c2rz4bGF X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 14:51:21 -0000 > On Tue, Jun 30, 2020 at 03:56:17PM -0700, Rodney W. Grimes wrote: > > [ Charset UTF-8 unsupported, converting... ] > > > Author: gbe (doc committer) > > > Date: Tue Jun 30 18:08:59 2020 > > > New Revision: 362809 > > > URL: https://svnweb.freebsd.org/changeset/base/362809 > > > > > > Log: > > > Mention FreeBSD in the HISTORY sections of apropos(1) and makewhatis(8). > > > > > > PR: 223520, 223521 > > > Reviewed by: bcr (mentor) > > > Approved by: bcr (mentor) > > > Differential Revision: https://reviews.freebsd.org/D25521 > > > > > > Modified: > > > head/contrib/mandoc/apropos.1 > > > head/contrib/mandoc/makewhatis.8 > > > > > > Modified: head/contrib/mandoc/apropos.1 > > > ============================================================================== > > > --- head/contrib/mandoc/apropos.1 Tue Jun 30 17:21:28 2020 (r362808) > > > +++ head/contrib/mandoc/apropos.1 Tue Jun 30 18:08:59 2020 (r362809) > > > @@ -15,7 +15,7 @@ > > > .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF > > > .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. > > > .\" > > > -.Dd $Mdocdate: November 22 2018 $ > > > +.Dd $Mdocdate: June 30 2020 $ > > > .Dt APROPOS 1 > > > .Os > > > .Sh NAME > > > @@ -493,6 +493,12 @@ The options > > > .Fl acfhIKklOTWw > > > appeared in > > > .Ox 5.7 . > > > +.Pp > > > +The > > > +.Nm > > > +utility was integrated into > > > +.Fx 11.1 > > > +as part of the switch to mandoc. > > > > Huh? FreeBSD has had apropos since 1.0 and my 5.4 system clearly has it: > > freebsd {110}% uname -a > > FreeBSD pdx.rh.CN85.dnsmgr.net 5.4-RELEASE-p8 FreeBSD 5.4-RELEASE-p8 #1: Mon Jul 1 17:58:50 PDT 2019 root@pdx.rh.CN85.dnsmgr.net:/usr/src/sys/i386/compile/PDXMXPIE i386 > > pdx.rh.CN85.dnsmgr.net:freebsd {111}% which apropos > > /usr/bin/apropos > > > > And a man page for it too: > > APROPOS(1) FreeBSD General Commands Manual APROPOS(1) > > > > NAME > > apropos, whatis -- search the whatis database > > > > SYNOPSIS > > apropos keyword ... > > whatis keyword ... > > > > DESCRIPTION > > apropos searches a set of database files containing short descriptions of > > system commands for keywords and displays the result on the standard out- > > put. whatis displays only complete word matches. > > > > keyword really is an extended regular expression, please read grep(1) > > manual page for more information about its format. > > > > DIAGNOSTICS > > The apropos utility exits 0 on success, and 1 if no keyword matched. > > > > SEE ALSO > > grep(1), makewhatis(1), man(1) > > > > FreeBSD 5.4 January 15, 1991 FreeBSD 5.4 > > > > > .Sh AUTHORS > > > .An -nosplit > > > .An Bill Joy > > > > > That is true, but the version of 'apropos' we have currently in base is based on mandoc, > which was imported around September 2018. Due to the nature of contributed code I > thought it would be best to document only the history when it was integrated into > FreeSBD. The same applies for 'makewhatis'. That is not what has been done in other places when code is changed/replaced, the HISTORY section is not specific to "FreeBSD's version" of this function. We often have "An ls command appeared in Version 1 AT&T UNIX." Our source code and man page is not from that, but that is the history of ls. This *could* be amended and *should* be amended to reflect that apropos, and makewhatis got *updated* by a switch to the mandoc versions, but it is misleading to say it was intergrated with the switch to mandoc as that implies it did not exist before this action. > > > > Modified: head/contrib/mandoc/makewhatis.8 > > > ============================================================================== > > > --- head/contrib/mandoc/makewhatis.8 Tue Jun 30 17:21:28 2020 (r362808) > > > +++ head/contrib/mandoc/makewhatis.8 Tue Jun 30 18:08:59 2020 (r362809) > > > @@ -15,7 +15,7 @@ > > > .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF > > > .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. > > > .\" > > > -.Dd $Mdocdate: May 17 2017 $ > > > +.Dd $Mdocdate: June 30 2020 $ > > > .Dt MAKEWHATIS 8 > > > .Os > > > .Sh NAME > > > @@ -211,6 +211,12 @@ and the options > > > .Fl aCDnQT > > > in > > > .Ox 5.6 . > > > +.Pp > > > +The > > > +.Nm > > > +utility was integrated into > > > +.Fx 11.1 > > > +as part of the switch to mandoc. > > > > Ditto > > > > > .Sh AUTHORS > > > .An -nosplit > > > .An Bill Joy > > --Gordon > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Wed Jul 1 15:00:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8F7703543CD; Wed, 1 Jul 2020 15:00:04 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xksw3GsKz4bLv; Wed, 1 Jul 2020 15:00:04 +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 535B2B0D7; Wed, 1 Jul 2020 15:00:04 +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 061F041G071871; Wed, 1 Jul 2020 15:00:04 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061F04WY071870; Wed, 1 Jul 2020 15:00:04 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007011500.061F04WY071870@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 1 Jul 2020 15:00:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362835 - stable/12/sbin/ipfw X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sbin/ipfw X-SVN-Commit-Revision: 362835 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 15:00:04 -0000 Author: markj Date: Wed Jul 1 15:00:03 2020 New Revision: 362835 URL: https://svnweb.freebsd.org/changeset/base/362835 Log: MFC r362582: ipfw(8): In fill_ip6(), use a single statement for both "me" and "me6". Modified: stable/12/sbin/ipfw/ipv6.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/ipfw/ipv6.c ============================================================================== --- stable/12/sbin/ipfw/ipv6.c Wed Jul 1 12:07:28 2020 (r362834) +++ stable/12/sbin/ipfw/ipv6.c Wed Jul 1 15:00:03 2020 (r362835) @@ -342,13 +342,8 @@ fill_ip6(ipfw_insn_ip6 *cmd, char *av, int cblen, stru if (strcmp(av, "any") == 0) return (1); - - if (strcmp(av, "me") == 0) { /* Set the data for "me" opt*/ - cmd->o.len |= F_INSN_SIZE(ipfw_insn); - return (1); - } - - if (strcmp(av, "me6") == 0) { /* Set the data for "me" opt*/ + /* Set the data for "me" opt */ + if (strcmp(av, "me") == 0 || strcmp(av, "me6") == 0) { cmd->o.len |= F_INSN_SIZE(ipfw_insn); return (1); } From owner-svn-src-all@freebsd.org Wed Jul 1 15:02:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2FFC535482C; Wed, 1 Jul 2020 15:02:57 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xkxF0ZVZz4bwX; Wed, 1 Jul 2020 15:02:57 +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 EB4A2B43B; Wed, 1 Jul 2020 15:02:56 +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 061F2uLN077542; Wed, 1 Jul 2020 15:02:56 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061F2u2L077541; Wed, 1 Jul 2020 15:02:56 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007011502.061F2u2L077541@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 1 Jul 2020 15:02:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362836 - stable/12/sys/netpfil/ipfw X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/netpfil/ipfw X-SVN-Commit-Revision: 362836 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 15:02:57 -0000 Author: markj Date: Wed Jul 1 15:02:56 2020 New Revision: 362836 URL: https://svnweb.freebsd.org/changeset/base/362836 Log: MFC r362585: ipfw(4): make O_IPVER/ipversion match IPv4 or 6, not just IPv4. Modified: stable/12/sys/netpfil/ipfw/ip_fw2.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- stable/12/sys/netpfil/ipfw/ip_fw2.c Wed Jul 1 15:00:03 2020 (r362835) +++ stable/12/sys/netpfil/ipfw/ip_fw2.c Wed Jul 1 15:02:56 2020 (r362836) @@ -2187,7 +2187,7 @@ do { \ break; case O_IPVER: - match = (is_ipv4 && + match = ((is_ipv4 || is_ipv6) && cmd->arg1 == ip->ip_v); break; From owner-svn-src-all@freebsd.org Wed Jul 1 15:17:46 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EB97D354F09; Wed, 1 Jul 2020 15:17:46 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xlGL5tzPz4cpW; Wed, 1 Jul 2020 15:17: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 A8DC3B70E; Wed, 1 Jul 2020 15:17: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 061FHk0X084139; Wed, 1 Jul 2020 15:17:46 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061FHk9B084136; Wed, 1 Jul 2020 15:17:46 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202007011517.061FHk9B084136@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 1 Jul 2020 15:17:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362837 - 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: 362837 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 15:17:47 -0000 Author: andrew Date: Wed Jul 1 15:17:45 2020 New Revision: 362837 URL: https://svnweb.freebsd.org/changeset/base/362837 Log: Read the arm64 ID registers earlier in the boot process. Also move parsing the registers to just after the secondary CPUs have started. This means the kernel register view from all CPUs is available after the CPU SYSINITs have finished, e.g. for use by ifunc resolvers. Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D25505 Modified: head/sys/arm64/arm64/identcpu.c head/sys/arm64/arm64/mp_machdep.c Modified: head/sys/arm64/arm64/identcpu.c ============================================================================== --- head/sys/arm64/arm64/identcpu.c Wed Jul 1 15:02:56 2020 (r362836) +++ head/sys/arm64/arm64/identcpu.c Wed Jul 1 15:17:45 2020 (r362837) @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include #include -static int ident_lock; static void print_cpu_features(u_int cpu); static u_long parse_cpu_features_hwcap(u_int cpu); @@ -67,6 +66,8 @@ static int allow_idc = 1; SYSCTL_INT(_machdep_cache, OID_AUTO, allow_idc, CTLFLAG_RDTUN, &allow_idc, 0, "Allow optimizations based on the IDC cache bit"); +static void check_cpu_regs(u_int cpu); + /* * The default implementation of I-cache sync assumes we have an * aliasing cache until we know otherwise. @@ -1063,8 +1064,9 @@ identify_cpu_sysinit(void *dummy __unused) dic = (allow_dic != 0); idc = (allow_idc != 0); + CPU_FOREACH(cpu) { - print_cpu_features(cpu); + check_cpu_regs(cpu); hwcap = parse_cpu_features_hwcap(cpu); if (elf_hwcap == 0) elf_hwcap = hwcap; @@ -1096,8 +1098,18 @@ identify_cpu_sysinit(void *dummy __unused) install_undef_handler(true, user_mrs_handler); } -SYSINIT(identify_cpu, SI_SUB_SMP, SI_ORDER_ANY, identify_cpu_sysinit, NULL); +SYSINIT(identify_cpu, SI_SUB_CPU, SI_ORDER_ANY, identify_cpu_sysinit, NULL); +static void +cpu_features_sysinit(void *dummy __unused) +{ + u_int cpu; + + CPU_FOREACH(cpu) + print_cpu_features(cpu); +} +SYSINIT(cpu_features, SI_SUB_SMP, SI_ORDER_ANY, cpu_features_sysinit, NULL); + static u_long parse_cpu_features_hwcap(u_int cpu) { @@ -1468,7 +1480,8 @@ identify_cpu(void) if (impl_id == cpu_implementers[i].impl_id || cpu_implementers[i].impl_id == 0) { cpu_desc[cpu].cpu_impl = impl_id; - cpu_desc[cpu].cpu_impl_name = cpu_implementers[i].impl_name; + cpu_desc[cpu].cpu_impl_name = + cpu_implementers[i].impl_name; cpu_partsp = cpu_implementers[i].cpu_parts; break; } @@ -1505,77 +1518,68 @@ identify_cpu(void) cpu_desc[cpu].id_aa64mmfr2 = READ_SPECIALREG(id_aa64mmfr2_el1); cpu_desc[cpu].id_aa64pfr0 = READ_SPECIALREG(id_aa64pfr0_el1); cpu_desc[cpu].id_aa64pfr1 = READ_SPECIALREG(id_aa64pfr1_el1); +} - if (cpu != 0) { - /* - * This code must run on one cpu at a time, but we are - * not scheduling on the current core so implement a - * simple spinlock. - */ - while (atomic_cmpset_acq_int(&ident_lock, 0, 1) == 0) - __asm __volatile("wfe" ::: "memory"); +static void +check_cpu_regs(u_int cpu) +{ - switch (cpu_aff_levels) { - case 0: - if (CPU_AFF0(cpu_desc[cpu].mpidr) != - CPU_AFF0(cpu_desc[0].mpidr)) - cpu_aff_levels = 1; - /* FALLTHROUGH */ - case 1: - if (CPU_AFF1(cpu_desc[cpu].mpidr) != - CPU_AFF1(cpu_desc[0].mpidr)) - cpu_aff_levels = 2; - /* FALLTHROUGH */ - case 2: - if (CPU_AFF2(cpu_desc[cpu].mpidr) != - CPU_AFF2(cpu_desc[0].mpidr)) - cpu_aff_levels = 3; - /* FALLTHROUGH */ - case 3: - if (CPU_AFF3(cpu_desc[cpu].mpidr) != - CPU_AFF3(cpu_desc[0].mpidr)) - cpu_aff_levels = 4; - break; - } + switch (cpu_aff_levels) { + case 0: + if (CPU_AFF0(cpu_desc[cpu].mpidr) != + CPU_AFF0(cpu_desc[0].mpidr)) + cpu_aff_levels = 1; + /* FALLTHROUGH */ + case 1: + if (CPU_AFF1(cpu_desc[cpu].mpidr) != + CPU_AFF1(cpu_desc[0].mpidr)) + cpu_aff_levels = 2; + /* FALLTHROUGH */ + case 2: + if (CPU_AFF2(cpu_desc[cpu].mpidr) != + CPU_AFF2(cpu_desc[0].mpidr)) + cpu_aff_levels = 3; + /* FALLTHROUGH */ + case 3: + if (CPU_AFF3(cpu_desc[cpu].mpidr) != + CPU_AFF3(cpu_desc[0].mpidr)) + cpu_aff_levels = 4; + break; + } - if (cpu_desc[cpu].id_aa64afr0 != cpu_desc[0].id_aa64afr0) - cpu_print_regs |= PRINT_ID_AA64_AFR0; - if (cpu_desc[cpu].id_aa64afr1 != cpu_desc[0].id_aa64afr1) - cpu_print_regs |= PRINT_ID_AA64_AFR1; + if (cpu_desc[cpu].id_aa64afr0 != cpu_desc[0].id_aa64afr0) + cpu_print_regs |= PRINT_ID_AA64_AFR0; + if (cpu_desc[cpu].id_aa64afr1 != cpu_desc[0].id_aa64afr1) + cpu_print_regs |= PRINT_ID_AA64_AFR1; - if (cpu_desc[cpu].id_aa64dfr0 != cpu_desc[0].id_aa64dfr0) - cpu_print_regs |= PRINT_ID_AA64_DFR0; - if (cpu_desc[cpu].id_aa64dfr1 != cpu_desc[0].id_aa64dfr1) - cpu_print_regs |= PRINT_ID_AA64_DFR1; + if (cpu_desc[cpu].id_aa64dfr0 != cpu_desc[0].id_aa64dfr0) + cpu_print_regs |= PRINT_ID_AA64_DFR0; + if (cpu_desc[cpu].id_aa64dfr1 != cpu_desc[0].id_aa64dfr1) + cpu_print_regs |= PRINT_ID_AA64_DFR1; - if (cpu_desc[cpu].id_aa64isar0 != cpu_desc[0].id_aa64isar0) - cpu_print_regs |= PRINT_ID_AA64_ISAR0; - if (cpu_desc[cpu].id_aa64isar1 != cpu_desc[0].id_aa64isar1) - cpu_print_regs |= PRINT_ID_AA64_ISAR1; + if (cpu_desc[cpu].id_aa64isar0 != cpu_desc[0].id_aa64isar0) + cpu_print_regs |= PRINT_ID_AA64_ISAR0; + if (cpu_desc[cpu].id_aa64isar1 != cpu_desc[0].id_aa64isar1) + cpu_print_regs |= PRINT_ID_AA64_ISAR1; - if (cpu_desc[cpu].id_aa64mmfr0 != cpu_desc[0].id_aa64mmfr0) - cpu_print_regs |= PRINT_ID_AA64_MMFR0; - if (cpu_desc[cpu].id_aa64mmfr1 != cpu_desc[0].id_aa64mmfr1) - cpu_print_regs |= PRINT_ID_AA64_MMFR1; - if (cpu_desc[cpu].id_aa64mmfr2 != cpu_desc[0].id_aa64mmfr2) - cpu_print_regs |= PRINT_ID_AA64_MMFR2; + if (cpu_desc[cpu].id_aa64mmfr0 != cpu_desc[0].id_aa64mmfr0) + cpu_print_regs |= PRINT_ID_AA64_MMFR0; + if (cpu_desc[cpu].id_aa64mmfr1 != cpu_desc[0].id_aa64mmfr1) + cpu_print_regs |= PRINT_ID_AA64_MMFR1; + if (cpu_desc[cpu].id_aa64mmfr2 != cpu_desc[0].id_aa64mmfr2) + cpu_print_regs |= PRINT_ID_AA64_MMFR2; - if (cpu_desc[cpu].id_aa64pfr0 != cpu_desc[0].id_aa64pfr0) - cpu_print_regs |= PRINT_ID_AA64_PFR0; - if (cpu_desc[cpu].id_aa64pfr1 != cpu_desc[0].id_aa64pfr1) - cpu_print_regs |= PRINT_ID_AA64_PFR1; + if (cpu_desc[cpu].id_aa64pfr0 != cpu_desc[0].id_aa64pfr0) + cpu_print_regs |= PRINT_ID_AA64_PFR0; + if (cpu_desc[cpu].id_aa64pfr1 != cpu_desc[0].id_aa64pfr1) + cpu_print_regs |= PRINT_ID_AA64_PFR1; - if (cpu_desc[cpu].ctr != cpu_desc[0].ctr) { - /* - * If the cache type register is different we may - * have a different l1 cache type. - */ - identify_cache(cpu_desc[cpu].ctr); - cpu_print_regs |= PRINT_CTR_EL0; - } - - /* Wake up the other CPUs */ - atomic_store_rel_int(&ident_lock, 0); - __asm __volatile("sev" ::: "memory"); + if (cpu_desc[cpu].ctr != cpu_desc[0].ctr) { + /* + * If the cache type register is different we may + * have a different l1 cache type. + */ + identify_cache(cpu_desc[cpu].ctr); + cpu_print_regs |= PRINT_CTR_EL0; } } Modified: head/sys/arm64/arm64/mp_machdep.c ============================================================================== --- head/sys/arm64/arm64/mp_machdep.c Wed Jul 1 15:02:56 2020 (r362836) +++ head/sys/arm64/arm64/mp_machdep.c Wed Jul 1 15:17:45 2020 (r362837) @@ -212,6 +212,19 @@ init_secondary(uint64_t cpu) "mov x18, %0 \n" "msr tpidr_el1, %0" :: "r"(pcpup)); + /* + * Identify current CPU. This is necessary to setup + * affinity registers and to provide support for + * runtime chip identification. + * + * We need this before signalling the CPU is ready to + * let the boot CPU use the results. + */ + identify_cpu(); + + /* Ensure the stores in identify_cpu have completed */ + atomic_thread_fence_acq_rel(); + /* Signal the BSP and spin until it has released all APs. */ atomic_add_int(&aps_started, 1); while (!atomic_load_int(&aps_ready)) @@ -227,12 +240,6 @@ init_secondary(uint64_t cpu) ("pmap0 doesn't match cpu %ld's ttbr0", cpu)); pcpup->pc_curpmap = pmap0; - /* - * Identify current CPU. This is necessary to setup - * affinity registers and to provide support for - * runtime chip identification. - */ - identify_cpu(); install_cpu_errata(); intr_pic_init_secondary(); From owner-svn-src-all@freebsd.org Wed Jul 1 15:27:35 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 43F16354EDC; Wed, 1 Jul 2020 15:27:35 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xlTg16Vjz4dPf; Wed, 1 Jul 2020 15:27:35 +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 0B017B73B; Wed, 1 Jul 2020 15:27:35 +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 061FRYmZ090348; Wed, 1 Jul 2020 15:27:34 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061FRY2u090347; Wed, 1 Jul 2020 15:27:34 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007011527.061FRY2u090347@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 1 Jul 2020 15:27:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362838 - stable/12/sys/kern X-SVN-Group: stable-12 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/12/sys/kern X-SVN-Commit-Revision: 362838 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 15:27:35 -0000 Author: markj Date: Wed Jul 1 15:27:34 2020 New Revision: 362838 URL: https://svnweb.freebsd.org/changeset/base/362838 Log: MFC r362789 (by gallatin): Fix a panic when unloading firmware Modified: stable/12/sys/kern/subr_firmware.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/subr_firmware.c ============================================================================== --- stable/12/sys/kern/subr_firmware.c Wed Jul 1 15:17:45 2020 (r362837) +++ stable/12/sys/kern/subr_firmware.c Wed Jul 1 15:27:34 2020 (r362838) @@ -394,14 +394,12 @@ EVENTHANDLER_DEFINE(mountroot, firmware_mountroot, NUL static void unloadentry(void *unused1, int unused2) { - struct priv_fw *fp, *tmp; + struct priv_fw *fp; int err; - bool changed; mtx_lock(&firmware_mtx); - changed = false; restart: - LIST_FOREACH_SAFE(fp, &firmware_table, link, tmp) { + LIST_FOREACH(fp, &firmware_table, link) { if (fp->file == NULL || fp->refcnt != 0 || (fp->flags & FW_UNLOAD) == 0) continue; @@ -412,7 +410,6 @@ restart: * 2. clear FW_UNLOAD so we don't try this entry again. * 3. release the lock while trying to unload the module. */ - changed = true; fp->flags &= ~FW_UNLOAD; /* do not try again */ /* @@ -422,9 +419,11 @@ restart: mtx_unlock(&firmware_mtx); err = linker_release_module(NULL, NULL, fp->file); mtx_lock(&firmware_mtx); - } - if (changed) { - changed = false; + + /* + * When we dropped the lock, another thread could have + * removed an element, so we must restart the scan. + */ goto restart; } mtx_unlock(&firmware_mtx); From owner-svn-src-all@freebsd.org Wed Jul 1 15:30:28 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 50CC9355292; Wed, 1 Jul 2020 15:30:28 +0000 (UTC) (envelope-from bofh@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xlY01VbGz4dbY; Wed, 1 Jul 2020 15:30:28 +0000 (UTC) (envelope-from bofh@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 17A62B986; Wed, 1 Jul 2020 15:30:28 +0000 (UTC) (envelope-from bofh@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 061FURia090553; Wed, 1 Jul 2020 15:30:27 GMT (envelope-from bofh@FreeBSD.org) Received: (from bofh@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061FURT5090552; Wed, 1 Jul 2020 15:30:27 GMT (envelope-from bofh@FreeBSD.org) Message-Id: <202007011530.061FURT5090552@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bofh set sender to bofh@FreeBSD.org using -f From: Muhammad Moinur Rahman Date: Wed, 1 Jul 2020 15:30:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362839 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: bofh X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 362839 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 15:30:28 -0000 Author: bofh (ports committer) Date: Wed Jul 1 15:30:27 2020 New Revision: 362839 URL: https://svnweb.freebsd.org/changeset/base/362839 Log: Update with the members of the 11th core team, core.xi - Update the core-secretary role. - Update the comment to mention that the sorting is done based on FreeBSD login name Reported by: bofh (with core-secretary@ hat on) Reviewed by: bcr Approved by: bcr Differential Revision: https://reviews.freebsd.org/D25526 Modified: head/share/misc/organization.dot Modified: head/share/misc/organization.dot ============================================================================== --- head/share/misc/organization.dot Wed Jul 1 15:27:34 2020 (r362838) +++ head/share/misc/organization.dot Wed Jul 1 15:30:27 2020 (r362839) @@ -23,10 +23,10 @@ _devel [label="FreeBSD Developers"] _admin [label="FreeBSD Infrastructure Administrators"] _misc [label="Miscellaneous Hats"] -# Development teams go here alphabetically sorted +# Development teams go here alphabetically sorted by FreeBSD login name -core [label="Core Team\ncore@FreeBSD.org\nallanjude, bcr, brooks,\nimp, hrs, jeff,\njhb, kmoore, seanc"] -coresecretary [label="Core Team Secretary\ncore-secretary@FreeBSD.org\njrm"] +core [label="Core Team\ncore@FreeBSD.org\nbapt, emaste, gnn,\nimp, hrs, kevans,\nmarkj, scottl, seanc"] +coresecretary [label="Core Team Secretary\ncore-secretary@FreeBSD.org\nbofh"] doccommitters [label="Doc/www Committers\ndoc-committers@FreeBSD.org"] doceng [label="Documentation Engineering Team\ndoceng@FreeBSD.org\nbcr, gabor, gjb, hrs,\nblackend, ryusuke, wblock"] portscommitters [label="Ports Committers\nports-committers@FreeBSD.org"] From owner-svn-src-all@freebsd.org Wed Jul 1 15:42:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 641ED35567F; Wed, 1 Jul 2020 15:42:49 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xlqF1xm2z4g1B; Wed, 1 Jul 2020 15:42:49 +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 2759BBC61; Wed, 1 Jul 2020 15:42:49 +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 061FgnYR002927; Wed, 1 Jul 2020 15:42:49 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061FgnbC002926; Wed, 1 Jul 2020 15:42:49 GMT (envelope-from markj@FreeBSD.org) Message-Id: <202007011542.061FgnbC002926@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 1 Jul 2020 15:42:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362840 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 362840 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 15:42:49 -0000 Author: markj Date: Wed Jul 1 15:42:48 2020 New Revision: 362840 URL: https://svnweb.freebsd.org/changeset/base/362840 Log: Fix a possible next-hop refcount leak when handling IPSec traffic. It may be possible to fix this by deferring the lookup, but let's keep the initial change simple to make MFCs easier. PR: 246951 Reviewed by: melifaro MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25519 Modified: head/sys/netinet/ip_input.c Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Wed Jul 1 15:30:27 2020 (r362839) +++ head/sys/netinet/ip_input.c Wed Jul 1 15:42:48 2020 (r362840) @@ -1028,6 +1028,7 @@ ip_forward(struct mbuf *m, int srcrt) if (IPSEC_ENABLED(ipv4)) { if ((error = IPSEC_FORWARD(ipv4, m)) != 0) { /* mbuf consumed by IPsec */ + RO_NHFREE(&ro); m_freem(mcopy); if (error != EINPROGRESS) IPSTAT_INC(ips_cantforward); From owner-svn-src-all@freebsd.org Wed Jul 1 16:17:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6D48C3564A5; Wed, 1 Jul 2020 16:17:52 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xmbh2FnQz4j2w; Wed, 1 Jul 2020 16:17:52 +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 30CE0BD74; Wed, 1 Jul 2020 16:17:52 +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 061GHqj6021586; Wed, 1 Jul 2020 16:17:52 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061GHpi7021585; Wed, 1 Jul 2020 16:17:51 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202007011617.061GHpi7021585@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 1 Jul 2020 16:17:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362841 - 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: 362841 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 16:17:52 -0000 Author: andrew Date: Wed Jul 1 16:17:51 2020 New Revision: 362841 URL: https://svnweb.freebsd.org/changeset/base/362841 Log: Move ID reading signatures to a better header The functions to read the common user and kernel ID registers should be in cpu.h rather than undefined.h as they are related to CPU details and used by undefined instruction handlers. Sponsored by: Innovate UK Modified: head/sys/arm64/include/cpu.h head/sys/arm64/include/undefined.h Modified: head/sys/arm64/include/cpu.h ============================================================================== --- head/sys/arm64/include/cpu.h Wed Jul 1 15:42:48 2020 (r362840) +++ head/sys/arm64/include/cpu.h Wed Jul 1 16:17:51 2020 (r362841) @@ -171,6 +171,10 @@ void identify_cpu(void); void install_cpu_errata(void); void swi_vm(void *v); +/* Functions to read the sanitised view of the special registers */ +bool extract_user_id_field(u_int, u_int, uint8_t *); +bool get_kernel_reg(u_int, uint64_t *); + #define CPU_AFFINITY(cpu) __cpu_affinity[(cpu)] #define CPU_CURRENT_SOCKET \ (CPU_AFF2(CPU_AFFINITY(PCPU_GET(cpuid)))) Modified: head/sys/arm64/include/undefined.h ============================================================================== --- head/sys/arm64/include/undefined.h Wed Jul 1 15:42:48 2020 (r362840) +++ head/sys/arm64/include/undefined.h Wed Jul 1 16:17:51 2020 (r362841) @@ -63,10 +63,6 @@ void *install_undef_handler(bool, undef_handler_t); void remove_undef_handler(void *); int undef_insn(u_int, struct trapframe *); -/* Functions to read the sanitised view of the special registers */ -bool extract_user_id_field(u_int, u_int, uint8_t *); -bool get_kernel_reg(u_int, uint64_t *); - #endif /* _KERNEL */ #endif From owner-svn-src-all@freebsd.org Wed Jul 1 16:18:39 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 68A7C35670F; Wed, 1 Jul 2020 16:18:39 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xmcb2RXbz4jHj; Wed, 1 Jul 2020 16:18:39 +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 36CD3C1C3; Wed, 1 Jul 2020 16:18:39 +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 061GIdwo021679; Wed, 1 Jul 2020 16:18:39 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061GIa5C021664; Wed, 1 Jul 2020 16:18:36 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202007011618.061GIa5C021664@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 1 Jul 2020 16:18:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362842 - in stable/12: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/src lib/libmagic X-SVN-Group: stable-12 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: in stable/12: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/src lib/libmagic X-SVN-Commit-Revision: 362842 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 16:18:39 -0000 Author: delphij Date: Wed Jul 1 16:18:35 2020 New Revision: 362842 URL: https://svnweb.freebsd.org/changeset/base/362842 Log: MFC r362258, r362279: file 5.39 Relnotes: yes Added: stable/12/contrib/file/libmagic.pc.in - copied unchanged from r362258, head/contrib/file/libmagic.pc.in stable/12/contrib/file/magic/Magdir/asf - copied unchanged from r362258, head/contrib/file/magic/Magdir/asf stable/12/contrib/file/magic/Magdir/dif - copied unchanged from r362258, head/contrib/file/magic/Magdir/dif stable/12/contrib/file/magic/Magdir/sylk - copied unchanged from r362258, head/contrib/file/magic/Magdir/sylk stable/12/contrib/file/magic/Magdir/unisig - copied unchanged from r362258, head/contrib/file/magic/Magdir/unisig stable/12/contrib/file/magic/Magdir/usd - copied unchanged from r362258, head/contrib/file/magic/Magdir/usd stable/12/contrib/file/magic/Magdir/web - copied unchanged from r362258, head/contrib/file/magic/Magdir/web Modified: stable/12/contrib/file/ChangeLog stable/12/contrib/file/Makefile.am stable/12/contrib/file/Makefile.in stable/12/contrib/file/configure stable/12/contrib/file/configure.ac stable/12/contrib/file/doc/file.man stable/12/contrib/file/doc/magic.man stable/12/contrib/file/magic/Magdir/animation stable/12/contrib/file/magic/Magdir/archive stable/12/contrib/file/magic/Magdir/cad stable/12/contrib/file/magic/Magdir/commands stable/12/contrib/file/magic/Magdir/compress stable/12/contrib/file/magic/Magdir/console stable/12/contrib/file/magic/Magdir/database stable/12/contrib/file/magic/Magdir/der stable/12/contrib/file/magic/Magdir/elf stable/12/contrib/file/magic/Magdir/filesystems stable/12/contrib/file/magic/Magdir/games stable/12/contrib/file/magic/Magdir/gnu stable/12/contrib/file/magic/Magdir/images stable/12/contrib/file/magic/Magdir/intel stable/12/contrib/file/magic/Magdir/kicad stable/12/contrib/file/magic/Magdir/linux stable/12/contrib/file/magic/Magdir/msdos stable/12/contrib/file/magic/Magdir/ole2compounddocs stable/12/contrib/file/magic/Magdir/parix stable/12/contrib/file/magic/Magdir/pascal stable/12/contrib/file/magic/Magdir/pdf stable/12/contrib/file/magic/Magdir/pgp stable/12/contrib/file/magic/Magdir/python stable/12/contrib/file/magic/Magdir/riff stable/12/contrib/file/magic/Magdir/rst stable/12/contrib/file/magic/Magdir/rtf stable/12/contrib/file/magic/Magdir/sgml stable/12/contrib/file/magic/Magdir/sniffer stable/12/contrib/file/magic/Magdir/ssh stable/12/contrib/file/magic/Magdir/ti-8x stable/12/contrib/file/magic/Magdir/tplink stable/12/contrib/file/magic/Magdir/troff stable/12/contrib/file/magic/Magdir/virtual stable/12/contrib/file/magic/Magdir/windows stable/12/contrib/file/magic/Magdir/wordprocessors stable/12/contrib/file/magic/Magdir/zip stable/12/contrib/file/magic/Makefile.am stable/12/contrib/file/magic/Makefile.in stable/12/contrib/file/src/apprentice.c stable/12/contrib/file/src/ascmagic.c stable/12/contrib/file/src/buffer.c stable/12/contrib/file/src/compress.c stable/12/contrib/file/src/der.c stable/12/contrib/file/src/file.c stable/12/contrib/file/src/file.h stable/12/contrib/file/src/file_opts.h stable/12/contrib/file/src/funcs.c stable/12/contrib/file/src/is_json.c stable/12/contrib/file/src/magic.c stable/12/contrib/file/src/print.c stable/12/contrib/file/src/readelf.c stable/12/contrib/file/src/seccomp.c stable/12/contrib/file/src/softmagic.c stable/12/lib/libmagic/Makefile stable/12/lib/libmagic/config.h Directory Properties: stable/12/ (props changed) Modified: stable/12/contrib/file/ChangeLog ============================================================================== --- stable/12/contrib/file/ChangeLog Wed Jul 1 16:17:51 2020 (r362841) +++ stable/12/contrib/file/ChangeLog Wed Jul 1 16:18:35 2020 (r362842) @@ -1,3 +1,83 @@ +2020-06-14 20:02 Christos Zoulas + + * release 5.39 + +2020-06-07 20:00 Christos Zoulas + + * Remove unused subtype_mime (Steve Grubb) + * Remove unused check in okstat (Steve Grubb) + * Fix mime-type in elf binaries by making sure $x is set + * Fix indirect negative offsets broken by OFFNEGATIVE + * Fix GUID equality check + * PR/165: Handle empty array and strings in JSON + * PR/162: Add --exclude-quiet + +2020-06-06 15:33 Christos Zoulas + + * Fix memory leak in ascmagic (Steve Grubb) + +2020-06-04 00:21 Christos Zoulas + + * Fix string comparison length with ignore whitespace + +2020-05-31 00:11 Christos Zoulas + + * Fix mingwin 64 compilation + +2020-05-30 23:56 Christos Zoulas + + * PR/159: whitelist getpid needed for file_pipe2file() + +2020-05-09 18:57 Christos Zoulas + + * Indicate negative offsets with a flag OFFNEGATIVE + so that -0 works. + * Introduce "offset" magic type that can be used to + detect the file size, and bail on short files. + * document DER better in the magic man page. + +2020-03-11 21:53 Christos Zoulas + + * fix memory leaks (SonarQube) + +2020-03-08 21:33 Christos Zoulas + + * fix memory leaks (SonarQube) + * rewrite confusing loops (SonarQube) + * fix bogus test (SonarQube) + * pass a sized buffer to file_fmttime() (SonarQube) + + * fix memory leaks (SonarQube) + +2020-02-20 15:50 Christos Zoulas + + * Don't allow * in printf formats, or the code itself (Christoph Biedl) + * Introduce a printf output size checker to avoid DoS attacks + +2020-02-17 17:22 Christos Zoulas + + * Avoid memory leak on error (oss-fuzz) + * Check length of string on DER before derefercing and add new types + * Add missing DER string (oss-fuzz) + +2020-02-16 20:45 Christos Zoulas + + * Add missing DER types, and debugging + +2020-02-13 13:10 Christos Zoulas + + * PR/140: Avoid abort with hand-crafted magic file (gockelhahn) + * PR/139 Avoid DoS in printf with hand-crafted magic file (gockelhahn) + * PR/138: Avoid crash with hand-crafted magic file (gockelhahn) + +2020-02-12 17:30 Christos Zoulas + + * PR/136: Fix static build by adding a libmagic.pc (Fabrice Fontaine) + +2019-12-24 14:16 Christos Zoulas + + * add guid support + 2019-12-16 21:11 Christos Zoulas * release 5.38 Modified: stable/12/contrib/file/Makefile.am ============================================================================== --- stable/12/contrib/file/Makefile.am Wed Jul 1 16:17:51 2020 (r362841) +++ stable/12/contrib/file/Makefile.am Wed Jul 1 16:18:35 2020 (r362842) @@ -3,3 +3,8 @@ ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = MAINT SUBDIRS = src magic tests doc python + +# This variable must have 'exec' in its name, in order to be installed +# by 'install-exec' target (instead of default 'install-data') +pkgconfigexecdir = $(libdir)/pkgconfig +pkgconfigexec_DATA = libmagic.pc Modified: stable/12/contrib/file/Makefile.in ============================================================================== --- stable/12/contrib/file/Makefile.in Wed Jul 1 16:17:51 2020 (r362841) +++ stable/12/contrib/file/Makefile.in Wed Jul 1 16:18:35 2020 (r362842) @@ -13,6 +13,7 @@ # PARTICULAR PURPOSE. @SET_MAKE@ + VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ @@ -100,7 +101,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cach configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = +CONFIG_CLEAN_FILES = libmagic.pc CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -129,6 +130,35 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(pkgconfigexecdir)" +DATA = $(pkgconfigexec_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ @@ -159,9 +189,10 @@ ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) -am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in AUTHORS \ - COPYING ChangeLog INSTALL NEWS README TODO compile \ - config.guess config.sub install-sh ltmain.sh missing +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(srcdir)/libmagic.pc.in AUTHORS COPYING ChangeLog INSTALL \ + NEWS README TODO compile config.guess config.sub install-sh \ + ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -328,6 +359,11 @@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = MAINT SUBDIRS = src magic tests doc python + +# This variable must have 'exec' in its name, in order to be installed +# by 'install-exec' target (instead of default 'install-data') +pkgconfigexecdir = $(libdir)/pkgconfig +pkgconfigexec_DATA = libmagic.pc all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -380,6 +416,8 @@ $(srcdir)/config.h.in: $(am__configure_deps) distclean-hdr: -rm -f config.h stamp-h1 +libmagic.pc: $(top_builddir)/config.status $(srcdir)/libmagic.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo @@ -389,7 +427,28 @@ clean-libtool: distclean-libtool: -rm -f libtool config.lt +install-pkgconfigexecDATA: $(pkgconfigexec_DATA) + @$(NORMAL_INSTALL) + @list='$(pkgconfigexec_DATA)'; test -n "$(pkgconfigexecdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigexecdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgconfigexecdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigexecdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigexecdir)" || exit $$?; \ + done +uninstall-pkgconfigexecDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfigexec_DATA)'; test -n "$(pkgconfigexecdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(pkgconfigexecdir)'; $(am__uninstall_files_from_dir) + # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, @@ -689,9 +748,12 @@ distcleancheck: distclean exit 1; } >&2 check-am: all-am check: check-recursive -all-am: Makefile config.h +all-am: Makefile $(DATA) config.h installdirs: installdirs-recursive installdirs-am: + for dir in "$(DESTDIR)$(pkgconfigexecdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive @@ -750,7 +812,7 @@ install-dvi: install-dvi-recursive install-dvi-am: -install-exec-am: +install-exec-am: install-pkgconfigexecDATA install-html: install-html-recursive @@ -790,7 +852,7 @@ ps: ps-recursive ps-am: -uninstall-am: +uninstall-am: uninstall-pkgconfigexecDATA .MAKE: $(am__recursive_targets) all install-am install-strip @@ -804,12 +866,13 @@ uninstall-am: info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ - uninstall-am + install-man install-pdf install-pdf-am \ + install-pkgconfigexecDATA install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-pkgconfigexecDATA .PRECIOUS: Makefile Modified: stable/12/contrib/file/configure ============================================================================== --- stable/12/contrib/file/configure Wed Jul 1 16:17:51 2020 (r362841) +++ stable/12/contrib/file/configure Wed Jul 1 16:18:35 2020 (r362842) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for file 5.38. +# Generated by GNU Autoconf 2.69 for file 5.39. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='file' PACKAGE_TARNAME='file' -PACKAGE_VERSION='5.38' -PACKAGE_STRING='file 5.38' +PACKAGE_VERSION='5.39' +PACKAGE_STRING='file 5.39' PACKAGE_BUGREPORT='christos@astron.com' PACKAGE_URL='' @@ -1334,7 +1334,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures file 5.38 to adapt to many kinds of systems. +\`configure' configures file 5.39 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1404,7 +1404,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of file 5.38:";; + short | recursive ) echo "Configuration of file 5.39:";; esac cat <<\_ACEOF @@ -1524,7 +1524,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -file configure 5.38 +file configure 5.39 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2180,7 +2180,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by file $as_me 5.38, which was +It was created by file $as_me 5.39, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3046,7 +3046,7 @@ fi # Define the identity of the package. PACKAGE='file' - VERSION='5.38' + VERSION='5.39' cat >>confdefs.h <<_ACEOF @@ -15167,7 +15167,7 @@ $as_echo "#define XZLIBSUPPORT 1" >>confdefs.h fi -ac_config_files="$ac_config_files Makefile src/Makefile magic/Makefile tests/Makefile doc/Makefile python/Makefile" +ac_config_files="$ac_config_files Makefile src/Makefile magic/Makefile tests/Makefile doc/Makefile python/Makefile libmagic.pc" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -15712,7 +15712,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by file $as_me 5.38, which was +This file was extended by file $as_me 5.39, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15778,7 +15778,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -file config.status 5.38 +file config.status 5.39 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -16199,6 +16199,7 @@ do "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "python/Makefile") CONFIG_FILES="$CONFIG_FILES python/Makefile" ;; + "libmagic.pc") CONFIG_FILES="$CONFIG_FILES libmagic.pc" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac Modified: stable/12/contrib/file/configure.ac ============================================================================== --- stable/12/contrib/file/configure.ac Wed Jul 1 16:17:51 2020 (r362841) +++ stable/12/contrib/file/configure.ac Wed Jul 1 16:18:35 2020 (r362842) @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([file],[5.38],[christos@astron.com]) +AC_INIT([file],[5.39],[christos@astron.com]) AM_INIT_AUTOMAKE([subdir-objects foreign]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) @@ -217,5 +217,5 @@ if test "$ac_cv_header_lzma_h$ac_cv_lib_lzma_lzma_str AC_DEFINE([XZLIBSUPPORT], 1, [Enable xzlib compression support]) fi -AC_CONFIG_FILES([Makefile src/Makefile magic/Makefile tests/Makefile doc/Makefile python/Makefile]) +AC_CONFIG_FILES([Makefile src/Makefile magic/Makefile tests/Makefile doc/Makefile python/Makefile libmagic.pc]) AC_OUTPUT Modified: stable/12/contrib/file/doc/file.man ============================================================================== --- stable/12/contrib/file/doc/file.man Wed Jul 1 16:17:51 2020 (r362841) +++ stable/12/contrib/file/doc/file.man Wed Jul 1 16:18:35 2020 (r362842) @@ -1,5 +1,5 @@ -.\" $File: file.man,v 1.138 2019/10/15 18:00:40 christos Exp $ -.Dd July 13, 2019 +.\" $File: file.man,v 1.140 2020/06/07 17:41:07 christos Exp $ +.Dd June 7, 2020 .Dt FILE __CSECTION__ .Os .Sh NAME @@ -10,6 +10,7 @@ .Bk -words .Op Fl bcdEhiklLNnprsSvzZ0 .Op Fl Fl apple +.Op Fl Fl exclude-quiet .Op Fl Fl extension .Op Fl Fl mime-encoding .Op Fl Fl mime-type @@ -229,6 +230,14 @@ the soft magic method. A synonym for .Sq ascii . .El +.It Fl Fl exclude-quiet +Like +.Fl Fl exclude +but ignore tests that +.Nm +does not know about. +This is intended for compatilibity with older versions of +.Nm . .It Fl Fl extension Print a slash-separated list of valid extensions for the file type found. .It Fl F , Fl Fl separator Ar separator @@ -326,13 +335,13 @@ never read them. Set various parameter limits. .Bl -column "elf_phnum" "Default" "XXXXXXXXXXXXXXXXXXXXXXXXXXX" -offset indent .It Sy "Name" Ta Sy "Default" Ta Sy "Explanation" -.It Li indir Ta 15 Ta recursion limit for indirect magic -.It Li name Ta 30 Ta use count limit for name/use magic +.It Li bytes Ta 1048576 Ta max number of bytes to read from file .It Li elf_notes Ta 256 Ta max ELF notes processed -.It Li elf_phnum Ta 128 Ta max ELF program sections processed +.It Li elf_phnum Ta 2048 Ta max ELF program sections processed .It Li elf_shnum Ta 32768 Ta max ELF sections processed +.It Li indir Ta 50 Ta recursion limit for indirect magic +.It Li name Ta 50 Ta use count limit for name/use magic .It Li regex Ta 8192 Ta length limit for regex searches -.It Li bytes Ta 1048576 Ta max number of bytes to read from file .El .It Fl r , Fl Fl raw Don't translate unprintable characters to \eooo. Modified: stable/12/contrib/file/doc/magic.man ============================================================================== --- stable/12/contrib/file/doc/magic.man Wed Jul 1 16:17:51 2020 (r362841) +++ stable/12/contrib/file/doc/magic.man Wed Jul 1 16:18:35 2020 (r362842) @@ -1,5 +1,5 @@ -.\" $File: magic.man,v 1.97 2019/11/15 21:03:14 christos Exp $ -.Dd January 21, 2019 +.\" $File: magic.man,v 1.98 2020/05/09 18:55:23 christos Exp $ +.Dd May 9, 2020 .Dt MAGIC __FSECTION__ .Os .\" install as magic.4 on USG, magic.5 on V7, Berkeley and Linux systems. @@ -300,6 +300,62 @@ This test is always true and clears the match flag for It is intended to be used with the .Dv default test. +.It Dv der +Parse the file as a DER Certificate file. +The test field is used as a der type that needs to be matched. +The DER types are: +.Dv eoc , +.Dv bool , +.Dv int , +.Dv bit_str , +.Dv octet_str , +.Dv null , +.Dv obj_id , +.Dv obj_desc , +.Dv ext , +.Dv real , +.Dv enum , +.Dv embed , +.Dv utf8_str , +.Dv rel_oid , +.Dv time , +.Dv res2 , +.Dv seq , +.Dv set , +.Dv num_str , +.Dv prt_str , +.Dv t61_str , +.Dv vid_str , +.Dv ia5_str , +.Dv utc_time , +.Dv gen_time , +.Dv gr_str , +.Dv vis_str , +.Dv gen_str , +.Dv univ_str , +.Dv char_str , +.Dv bmp_str , +.Dv date , +.Dv tod , +.Dv datetime , +.Dv duration , +.Dv oid-iri , +.Dv rel-oid-iri . +These types can be followed by an optional numeric size, which indicates +the field width in bytes. +.It Dv guid +A Globally Unique Identifier, parsed and printed as +XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX. +It's format is a string. +.It Dv offset +This is a quad value indicating the current offset of the file. +It can be used to determine the size of the file or the magic buffer. +For example the magic entries: +.Bd -literal -offset indent +-0 offset x this file is %lld bytes +-0 offset <=100 must be more than 100 \e + bytes and is only %lld +.Ed .El .Pp For compatibility with the Single Copied: stable/12/contrib/file/libmagic.pc.in (from r362258, head/contrib/file/libmagic.pc.in) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/contrib/file/libmagic.pc.in Wed Jul 1 16:18:35 2020 (r362842, copy of r362258, head/contrib/file/libmagic.pc.in) @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libmagic +Description: Magic number recognition library +Version: @VERSION@ +Libs: -L${libdir} -lmagic +Libs.private: @LIBS@ Modified: stable/12/contrib/file/magic/Magdir/animation ============================================================================== --- stable/12/contrib/file/magic/Magdir/animation Wed Jul 1 16:17:51 2020 (r362841) +++ stable/12/contrib/file/magic/Magdir/animation Wed Jul 1 16:18:35 2020 (r362842) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: animation,v 1.74 2019/10/29 01:06:20 christos Exp $ +# $File: animation,v 1.77 2020/04/26 15:23:43 christos Exp $ # animation: file(1) magic for animation/movie formats # # animation formats @@ -159,7 +159,7 @@ >8 string mqt \b, Sony / Mobile QuickTime (.MQV) US Pat 7,477,830 !:mime video/quicktime >8 string MSNV \b, MPEG-4 (.MP4) for SonyPSP -!:mime audio/mp4 +!:mime video/mp4 >8 string NDAS \b, MP4 v2 [ISO 14496-14] Nero Digital AAC Audio !:mime audio/mp4 >8 string NDSC \b, MPEG-4 (.MP4) Nero Cinema Profile @@ -854,10 +854,6 @@ >4 byte ^0x01 (DV) movie file >3 byte &0x80 (PAL) >3 byte ^0x80 (NTSC) - -# Microsoft Advanced Streaming Format (ASF) -0 belong 0x3026b275 Microsoft ASF -!:mime video/x-ms-asf # MNG Video Format, 0 string \x8aMNG MNG video data, Modified: stable/12/contrib/file/magic/Magdir/archive ============================================================================== --- stable/12/contrib/file/magic/Magdir/archive Wed Jul 1 16:17:51 2020 (r362841) +++ stable/12/contrib/file/magic/Magdir/archive Wed Jul 1 16:18:35 2020 (r362842) @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------ -# $File: archive,v 1.133 2019/11/15 21:03:14 christos Exp $ +# $File: archive,v 1.138 2020/06/07 23:29:26 christos Exp $ # archive: file(1) magic for archive formats (see also "msdos" for self- # extracting compressed archives) # @@ -236,7 +236,8 @@ !:ext deb/udeb >14 string -binary Debian binary package !:mime application/vnd.debian.binary-package -!:ext deb/udeb +# For ipk packager see also https://en.wikipedia.org/wiki/Opkg +!:ext deb/udeb/ipk # This should not happen >14 default x Unknown Debian package # NL terminated version; for most Debian cases this is 2.0 or 2.1 for splitted @@ -250,7 +251,16 @@ >>0 search/0x93e4f data.tar. \b, data compression # the above line only works if FILE_BYTES_MAX in ../../src/file.h is raised # for example like libreoffice-dev-doc_1%3a5.2.7-1+rpi1+deb9u3_all.deb ->>>&0 string x %.4s +>>>&0 string x %.2s +# skip space (0x20 BSD) and slash (0x2f System V) character marking end of name +>>>&2 ubyte !0x20 +>>>>&-1 ubyte !0x2f +# display 3rd character of file name extension like 2 of bz2 or m of lzma +>>>>>&-1 ubyte x \b%c +>>>>>>&0 ubyte !0x20 +>>>>>>>&-1 ubyte !0x2f +# display 4th character of file name extension like a of lzma +>>>>>>>>&-1 ubyte x \b%c # splitted debian package case >68 string =2.1\n # dpkg-1.18.25/dpkg-split/info.c @@ -1124,71 +1134,120 @@ # OpenOffice formats (for OpenOffice 1.x / StarOffice 6/7) # (mimetype contains "application/vnd.sun.xml.") +# URL: https://en.wikipedia.org/wiki/OpenOffice.org_XML +# reference: http://fileformats.archiveteam.org/wiki/OpenOffice.org_XML >>50 string vnd.sun.xml. OpenOffice.org 1.x >>>62 string writer Writer >>>>68 byte !0x2e document +!:mime application/vnd.sun.xml.writer +!:ext sxw >>>>68 string .template template +!:mime application/vnd.sun.xml.writer.template +!:ext stw +>>>>68 string .web Web template +!:mime application/vnd.sun.xml.writer.web +!:ext stw >>>>68 string .global global document +!:mime application/vnd.sun.xml.writer.global +!:ext sxg >>>62 string calc Calc >>>>66 byte !0x2e spreadsheet +!:mime application/vnd.sun.xml.calc +!:ext sxc >>>>66 string .template template +!:mime application/vnd.sun.xml.calc.template +!:ext stc >>>62 string draw Draw >>>>66 byte !0x2e document +!:mime application/vnd.sun.xml.draw +!:ext sxd >>>>66 string .template template +!:mime application/vnd.sun.xml.draw.template +!:ext std >>>62 string impress Impress >>>>69 byte !0x2e presentation +!:mime application/vnd.sun.xml.impress +!:ext sxi >>>>69 string .template template +!:mime application/vnd.sun.xml.impress.template +!:ext sti >>>62 string math Math document +!:mime application/vnd.sun.xml.math +!:ext sxm >>>62 string base Database file +!:mime application/vnd.sun.xml.base +!:ext sdb # OpenDocument formats (for OpenOffice 2.x / StarOffice >= 8) +# URL: http://fileformats.archiveteam.org/wiki/OpenDocument # https://lists.oasis-open.org/archives/office/200505/msg00006.html # (mimetype contains "application/vnd.oasis.opendocument.") >>50 string vnd.oasis.opendocument. OpenDocument >>>73 string text >>>>77 byte !0x2d Text !:mime application/vnd.oasis.opendocument.text +!:ext odt >>>>77 string -template Text Template !:mime application/vnd.oasis.opendocument.text-template +!:ext ott >>>>77 string -web HTML Document Template !:mime application/vnd.oasis.opendocument.text-web +!:ext oth >>>>77 string -master Master Document !:mime application/vnd.oasis.opendocument.text-master +!:ext odm >>>73 string graphics >>>>81 byte !0x2d Drawing !:mime application/vnd.oasis.opendocument.graphics ->>>>81 string -template Template +!:ext odg +>>>>81 string -template Drawing Template !:mime application/vnd.oasis.opendocument.graphics-template +!:ext otg >>>73 string presentation >>>>85 byte !0x2d Presentation !:mime application/vnd.oasis.opendocument.presentation ->>>>85 string -template Template +!:ext odp +>>>>85 string -template Presentation Template !:mime application/vnd.oasis.opendocument.presentation-template +!:ext otp >>>73 string spreadsheet >>>>84 byte !0x2d Spreadsheet !:mime application/vnd.oasis.opendocument.spreadsheet ->>>>84 string -template Template +!:ext ods +>>>>84 string -template Spreadsheet Template !:mime application/vnd.oasis.opendocument.spreadsheet-template +!:ext ots >>>73 string chart >>>>78 byte !0x2d Chart !:mime application/vnd.oasis.opendocument.chart ->>>>78 string -template Template +!:ext odc +>>>>78 string -template Chart Template !:mime application/vnd.oasis.opendocument.chart-template +!:ext otc >>>73 string formula >>>>80 byte !0x2d Formula !:mime application/vnd.oasis.opendocument.formula ->>>>80 string -template Template +!:ext odf +>>>>80 string -template Formula Template !:mime application/vnd.oasis.opendocument.formula-template +!:ext otf +# https://www.loc.gov/preservation/digital/formats/fdd/fdd000441.shtml >>>73 string database Database !:mime application/vnd.oasis.opendocument.database +!:ext odb # Valid for LibreOffice Base 6.0.1.1 at least >>>73 string base Database -!:mime application/vnd.oasis.opendocument.base +# https://bugs.documentfoundation.org/show_bug.cgi?id=45854 +!:mime application/vnd.oasis.opendocument.database +#!:mime application/vnd.oasis.opendocument.base +!:ext odb >>>73 string image >>>>78 byte !0x2d Image !:mime application/vnd.oasis.opendocument.image ->>>>78 string -template Template +!:ext odi +>>>>78 string -template Image Template !:mime application/vnd.oasis.opendocument.image-template +!:ext oti # EPUB (OEBPS) books using OCF (OEBPS Container Format) # https://www.idpf.org/ocf/ocf1.0/download/ocf10.htm, section 4. @@ -1206,12 +1265,33 @@ >>>62 string draw.template+zip Draw template, version 14-16 !:mime application/x-vnd.corel.draw.template+zip !:ext cdrt ->>>62 string zcf.draw.document+zip Draw drawing, version 17-21 +>>>62 string zcf.draw.document+zip Draw drawing, version 17-22 !:mime application/x-vnd.corel.zcf.draw.document+zip !:ext cdr ->>>62 string zcf.draw.template+zip Draw template, version 17-21 +>>>62 string zcf.draw.template+zip Draw template, version 17-22 !:mime application/x-vnd.corel.zcf.draw.template+zip !:ext cdt/cdrt +# URL: http://product.corel.com/help/CorelDRAW/540240626/Main/EN/Doc/CorelDRAW-Other-file-formats.html +>>>62 string zcf.pattern+zip Draw pattern, version 22 +!:mime application/x-vnd.corel.zcf.pattern+zip +!:ext pat +# URL: https://en.wikipedia.org/wiki/Corel_Designer +# Reference: http://fileformats.archiveteam.org/wiki/Corel_Designer +# Note: called by TrID "Corel DESIGN graphics" +>>>62 string designer.document+zip DESIGNER graphics, version 14-16 +!:mime application/x-vnd.corel.designer.document+zip +!:ext des +>>>62 string zcf.designer.document+zip DESIGNER graphics, version 17-21 +!:mime application/x-vnd.corel.zcf.designer.document+zip +!:ext des +# URL: http://product.corel.com/help/CorelDRAW/540223850/Main/EN/Documentation/ +# CorelDRAW-Corel-Symbol-Library-CSL.html +>>>62 string symbol.library+zip Symbol Library, version 6-16.3 +!:mime application/x-vnd.corel.symbol.library+zip +!:ext csl +>>>62 string zcf.symbol.library+zip Symbol Library, version 17-22 +!:mime application/x-vnd.corel.zcf.symbol.library+zip +!:ext csl # Catch other ZIP-with-mimetype formats # In a ZIP file, the bytes immediately after a member's contents are @@ -1239,16 +1319,19 @@ >>>>38 search/64 .app/ iOS App !:mime application/x-ios-app +>30 search/100/b application/epub+zip EPUB document +!:mime application/epub+zip # Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu) # Next line excludes specialized formats: >(26.s+30) leshort !0xcafe ->>26 string !\x8\0\0\0mimetype Zip archive data +>>30 search/100/b !application/epub+zip +>>>26 string !\x8\0\0\0mimetype Zip archive data !:mime application/zip ->>>4 beshort x \b, at least ->>>4 use zipversion ->>>4 beshort x to extract ->>>0x161 string WINZIP \b, WinZIP self-extracting +>>>>4 beshort x \b, at least +>>>>4 use zipversion +>>>>4 beshort x to extract +>>>>0x161 string WINZIP \b, WinZIP self-extracting # StarView Metafile # From Pierre Ducroquet Copied: stable/12/contrib/file/magic/Magdir/asf (from r362258, head/contrib/file/magic/Magdir/asf) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/contrib/file/magic/Magdir/asf Wed Jul 1 16:18:35 2020 (r362842, copy of r362258, head/contrib/file/magic/Magdir/asf) @@ -0,0 +1,132 @@ + +#------------------------------------------------------------------------------ +# $File: asf,v 1.1 2019/12/26 02:07:53 christos Exp $ +# asf: file(1) magic for Microsoft Advanced Systems Format (ASF) files +# http://www.staroceans.org/e-book/ASF_Specification.pdf + +0 name asf-name +# ASF_Data_Object +#>0 guid 75B22636-668E-11CF-A6D9-00AA0062CE6C +#>16 lequad >0 +#>>(16.q) use asf-object +# ASF_Simple_Index_Object +>0 guid 33000890-E5B1-11CF-89F4-00A0C90349CB +>0 guid D6E229D3-35DA-11D1-9034-00A0C90349BE ASF_Index_Object +>0 guid FEB103F8-12AD-4C64-840F-2A1D2F7AD48C ASF_Media_Object_Index_Object +>0 guid 3CB73FD0-0C4A-4803-953D-EDF7B6228F0C ASF_Timecode_Index_Object + +# ASF_File_Properties_Object +>0 guid 8CABDCA1-A947-11CF-8EE4-00C00C205365 + +# ASF_Stream_Properties_Object +>0 guid B7DC0791-A9B7-11CF-8EE6-00C00C205365 +#>>56 lequad x Time Offset %lld +#>>64 lelong x Type-Specicic Data Length %d +#>>68 lelong x Error Correction Data Length %d +#>>72 leshort x Flags 0x%x +#>>74 lelong x Reserved %x +# ASF_Audio_Media +>>24 guid F8699E40-5B4D-11CF-A8FD-00805F5C442B \b, Audio Media ( +>>>78 leshort x \bCodec Id %d +>>>80 leshort x \b, Number of channels %d +>>>82 lelong x \b, Samples Per Second %d +>>>86 lelong x \b, Average Number of Bytes Per Second %d +>>>90 lelong x \b, Block Alignment %d +>>>94 leshort x \b, Bits Per Sample %d +# ASF_Video_Media +>>24 guid BC19EFC0-5B4D-11CF-A8FD-00805F5C442B \b, Video Media ( +>>>78 lelong x \bEncoded Image Width %d +>>>82 lelong x \b, Encoded Image Height %d +#>>>85 leshort x \b, Format Data Size %x +>>>93 lelong x \b, Image Width %d +>>>97 lelong x \b, Image Height %d +#>>>101 leshort x \b, Reserved 0x%x +>>>103 leshort x \b, Bits Per Pixel Count %d +#>>>105 lelong x \b, Compression ID %d +#>>>109 lelong x \b, Image Size %d +#>>>113 lelong x \b, Horizontal Pixels Per Meter %d +#>>>117 lelong x \b, Vertical Pixels Per Meter %d +#>>>121 lelong x \b, Colors Used Count %d +#>>>125 lelong x \b, Important Colors Count %d +>>0 lelong x \b, Error correction type +>>40 use asf-name +>>0 lelong x \b) +#ASF_Header_Extension_Object +>0 guid 5FBF03B5-A92E-11CF-8EE3-00C00C205365 +# ASF_Codec_List_Object +>0 guid 86D15240-311D-11D0-A3A4-00A0C90348F6 +>0 guid 1EFB1A30-0B62-11D0-A39B-00A0C90348F6 ASF_Script_Command_Object +>0 guid F487CD01-A951-11CF-8EE6-00C00C205365 ASF_Marker_Object +>0 guid D6E229DC-35DA-11D1-9034-00A0C90349BE ASF_Bitrate_Mutual_Exclusion_Object +>0 guid 75B22635-668E-11CF-A6D9-00AA0062CE6C ASF_Error_Correction_Object +# ASF_Content_Description_Object +>0 guid 75B22633-668E-11CF-A6D9-00AA0062CE6C +#>>24 leshort title length %d +#>>26 leshort author length %d +#>>28 leshort copyright length %d +#>>30 leshort descriptor length %d +#>>32 leshort rating length %d +>0 guid D2D0A440-E307-11D2-97F0-00A0C95EA850 ASF_Extended_Content_Description_Object +>0 guid 2211B3FA-BD23-11D2-B4B7-00A0C955FC6E ASF_Content_Branding_Object +>0 guid 7BF875CE-468D-11D1-8D82-006097C9A2B2 ASF_Stream_Bitrate_Properties_Object +>0 guid 2211B3FB-BD23-11D2-B4B7-00A0C955FC6E ASF_Content_Encryption_Object +>0 guid 298AE614-2622-4C17-B935-DAE07EE9289C ASF_Extended_Content_Encryption_Object +>0 guid 2211B3FC-BD23-11D2-B4B7-00A0C955FC6E ASF_Digital_Signature_Object +# ASF_Padding_Object +>0 guid 1806D474-CADF-4509-A4BA-9AABCB96AAE8 +>0 guid 14E6A5CB-C672-4332-8399-A96952065B5A ASF_Extended_Stream_Properties_Object +>0 guid A08649CF-4775-4670-8A16-6E35357566CD ASF_Advanced_Mutual_Exclusion_Object +>0 guid D1465A40-5A79-4338-B71B-E36B8FD6C249 ASF_Group_Mutual_Exclusion_Object +>0 guid D4FED15B-88D3-454F-81F0-ED5C45999E24 ASF_Stream_Prioritization_Object +>0 guid A69609E6-517B-11D2-B6AF-00C04FD908E9 ASF_Bandwidth_Sharing_Object +>0 guid 7C4346A9-EFE0-4BFC-B229-393EDE415C85 ASF_Language_List_Object +>0 guid C5F8CBEA-5BAF-4877-8467-AA8C44FA4CCA ASF_Metadata_Object +>0 guid 44231C94-9498-49D1-A141-1D134E457054 ASF_Metadata_Library_Object +>0 guid D6E229DF-35DA-11D1-9034-00A0C90349BE ASF_Index_Parameters_Object +>0 guid 6B203BAD-3F11-48E4-ACA8-D7613DE2CFA7 ASF_Media_Object_Index_Parameters_Object +>0 guid F55E496D-9797-4B5D-8C8B-604DFE9BFB24 ASF_Timecode_Index_Parameters_Object +>0 guid 26F18B5D-4584-47EC-9F5F-0E651F0452C9 ASF_Compatibility_Object +>0 guid 43058533-6981-49E6-9B74-AD12CB86D58C ASF_Advanced_Content_Encryption_Object +>0 guid 59DACFC0-59E6-11D0-A3AC-00A0C90348F6 ASF_Command_Media +>0 guid B61BE100-5B4E-11CF-A8FD-00805F5C44 ASF_JFIF_Media +>0 guid 35907DE0-E415-11CF-A917-00805F5C442B ASF_Degradable_JPEG_Media +>0 guid 91BD222C-F21C-497A-8B6D-5AA86BFC0185 ASF_File_Transfer_Media +>0 guid 3AFB65E2-47EF-40F2-AC2C-70A90D71D343 ASF_Binary_Media +>0 guid 776257D4-C627-41CB-8F81-7AC7FF1C40CC ASF_Web_Stream_Media_Subtype +>0 guid DA1E6B13-8359-4050-B398-388E965BF00C ASF_Web_Stream_Format +>0 guid 20FB5700-5B55-11CF-A8FD-00805F5C442B ASF_No_Error_Correction +>0 guid BFC3CD50-618F-11CF-8BB2-00AA00B4E220 ASF_Audio_Spread +>0 guid ABD3D211-A9BA-11cf-8EE6-00C00C205365 ASF_Reserved_1 +>0 guid 7A079BB6-DAA4-4e12-A5CA-91D38DC11A8D ASF_Content_Encryption_System_Windows_Media_DRM +# _Network_Devices +>0 guid 86D15241-311D-11D0-A3A4-00A0C90348F6 ASF_Reserved_2 +>0 guid 4B1ACBE3-100B-11D0-A39B-00A0C90348F6 ASF_Reserved_3 +>0 guid 4CFEDB20-75F6-11CF-9C0F-00A0C90349CB ASF_Reserved_4 +>0 guid D6E22A00-35DA-11D1-9034-00A0C90349BE ASF_Mutex_Language +>0 guid D6E22A01-35DA-11D1-9034-00A0C90349BE ASF_Mutex_Bitrate +>0 guid D6E22A02-35DA-11D1-9034-00A0C90349BE ASF_Mutex_Unknown +>0 guid AF6060AA-5197-11D2-B6AF-00C04FD908E9 ASF_Bandwidth_Sharing_Exclusive +>0 guid AF6060AB-5197-11D2-B6AF-00C04FD908E9 ASF_Bandwidth_Sharing_Partial +>0 guid 399595EC-8667-4E2D-8FDB-98814CE76C1E ASF_Payload_Extension_System_Timecode +>0 guid E165EC0E-19ED-45D7-B4A7-25CBD1E28E9B ASF_Payload_Extension_System_File_Name +>0 guid D590DC20-07BC-436C-9CF7-F3BBFBF1A4DC ASF_Payload_Extension_System_Content_Type +>0 guid 1B1EE554-F9EA-4BC8-821A-376B74E4C4B8 ASF_Payload_Extension_System_Pixel_Aspect_Ratio +>0 guid C6BD9450-867F-4907-83A3-C77921B733AD ASF_Payload_Extension_System_Sample_Duration +>0 guid 6698B84E-0AFA-4330-AEB2-1C0A98D7A44D ASF_Payload_Extension_System_Encryption_Sample_ID +>0 guid 00E1AF06-7BEC-11D1-A582-00C04FC29CFB ASF_Payload_Extension_System_Degradable_JPEG + +0 name asf-object +>0 use asf-name +#>>16 lequad >0 (size %lld) [ +>>16 lequad >0 +>>>(16.q) use asf-object +#>>16 lequad 0 ] + +# Microsoft Advanced Streaming Format (ASF) +0 guid 75B22630-668E-11CF-A6D9-00AA0062CE6C Microsoft ASF +!:mime video/x-ms-asf +#>16 lequad >0 (size %lld +#>>24 lelong x \b, %d header objects) +>16 lequad >0 +>>30 use asf-object +>>(16.q) use asf-object Modified: stable/12/contrib/file/magic/Magdir/cad ============================================================================== --- stable/12/contrib/file/magic/Magdir/cad Wed Jul 1 16:17:51 2020 (r362841) +++ stable/12/contrib/file/magic/Magdir/cad Wed Jul 1 16:18:35 2020 (r362842) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: cad,v 1.20 2019/08/10 13:34:17 christos Exp $ +# $File: cad,v 1.23 2020/05/30 23:58:07 christos Exp $ # autocad: file(1) magic for cad files # @@ -229,9 +229,13 @@ !:mime image/vnd.dwg 0 string AC1024 DWG AutoDesk AutoCAD 2010/2011/2012 !:mime image/vnd.dwg -0 string AC1027 DWG AutoDesk AutoCAD 2013/2014 +0 string AC1027 DWG AutoDesk AutoCAD 2013-2017 !:mime image/vnd.dwg +# From GNU LibreDWG +0 string AC1032 DWG AutoDesk AutoCAD 2018/2019 +!:mime image/vnd.dwg + # KOMPAS 2D drawing from ASCON # This is KOMPAS 2D drawing or fragment of drawing but is not detailed nor # gathered nor specification @@ -315,3 +319,6 @@ 0 string \xff\xfe\xff\x0e\x53\x00\x6b\x00\x65\x00\x74\x00\x63\x00\x68\x00\x55\x00\x70\x00\x20\x00\x4d\x00\x6f\x00\x64\x00\x65\x00\x6c\x00 SketchUp Model !:mime application/vnd.sketchup.skp !:ext skp + +4 regex/b P[0-9][0-9]\\.[0-9][0-9][0-9][0-9]\\.[0-9][0-9][0-9][0-9]\\.[0-9] NAXOS CAD System file from version %s +!:strength +40 Modified: stable/12/contrib/file/magic/Magdir/commands ============================================================================== --- stable/12/contrib/file/magic/Magdir/commands Wed Jul 1 16:17:51 2020 (r362841) +++ stable/12/contrib/file/magic/Magdir/commands Wed Jul 1 16:18:35 2020 (r362842) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: commands,v 1.61 2019/10/30 03:16:43 christos Exp $ +# $File: commands,v 1.63 2020/06/06 15:36:30 christos Exp $ # commands: file(1) magic for various shells and interpreters # #0 string/w : shell archive or script for antique kernel text @@ -83,6 +83,30 @@ !:mime text/x-shellscript 0 string/wt #!\ /usr/bin/env\ bash Bourne-Again shell script text executable !:mime text/x-shellscript + +# Fish shell magic +# From: Benjamin Lowry +0 string/wt #!\ /usr/local/bin/fish fish shell script text executable +!:mime text/x-shellscript +0 string/wt #!\ /usr/bin/fish fish shell script text executable +!:mime text/x-shellscript +0 string/wt #!\ /usr/bin/env\ fish fish shell script text executable +!:mime text/x-shellscript + + +0 search/1/wt #!\ /usr/bin/tclsh Tcl/Tk script text executable +!:mime text/x-tcl + +0 search/1/wt #!\ /usr/bin/texlua LuaTex script text executable +!:mime text/x-luatex + +0 search/1/wt #!\ /usr/bin/luatex LuaTex script text executable +!:mime text/x-luatex + +0 search/1/wt #!\ /usr/bin/stap Systemtap script text executable +!:mime text/x-systemtap + + # PHP scripts # Ulf Harnhammar Modified: stable/12/contrib/file/magic/Magdir/compress ============================================================================== --- stable/12/contrib/file/magic/Magdir/compress Wed Jul 1 16:17:51 2020 (r362841) +++ stable/12/contrib/file/magic/Magdir/compress Wed Jul 1 16:18:35 2020 (r362842) @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------ -# $File: compress,v 1.77 2019/10/08 20:25:13 christos Exp $ +# $File: compress,v 1.79 2020/05/30 23:53:04 christos Exp $ # compress: file(1) magic for pure-compression formats (no archives) # # compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc. @@ -61,7 +61,9 @@ !:mime application/gzip >>>0 use gzip-info # size of the original (uncompressed) input data modulo 2^32 +>>-0 offset >48 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Jul 1 16:33:33 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B376F356D68; Wed, 1 Jul 2020 16:33:33 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xmxn4GsQz4kPc; Wed, 1 Jul 2020 16:33:33 +0000 (UTC) (envelope-from fernape@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 5EF97C249; Wed, 1 Jul 2020 16:33:33 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 061GXXB2033919; Wed, 1 Jul 2020 16:33:33 GMT (envelope-from fernape@FreeBSD.org) Received: (from fernape@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061GXX8n033918; Wed, 1 Jul 2020 16:33:33 GMT (envelope-from fernape@FreeBSD.org) Message-Id: <202007011633.061GXX8n033918@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fernape set sender to fernape@FreeBSD.org using -f From: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= Date: Wed, 1 Jul 2020 16:33:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362843 - head/usr.bin/printf X-SVN-Group: head X-SVN-Commit-Author: fernape X-SVN-Commit-Paths: head/usr.bin/printf X-SVN-Commit-Revision: 362843 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 16:33:33 -0000 Author: fernape (ports committer) Date: Wed Jul 1 16:33:32 2020 New Revision: 362843 URL: https://svnweb.freebsd.org/changeset/base/362843 Log: printf(1): Add EXAMPLES section * Small addition with four simple examples * While here, remove three obsolete .Tn macros Approved by: manpages (gbe) Differential Revision: https://reviews.freebsd.org/D25462 Modified: head/usr.bin/printf/printf.1 Modified: head/usr.bin/printf/printf.1 ============================================================================== --- head/usr.bin/printf/printf.1 Wed Jul 1 16:18:35 2020 (r362842) +++ head/usr.bin/printf/printf.1 Wed Jul 1 16:33:32 2020 (r362843) @@ -31,7 +31,7 @@ .\" @(#)printf.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd July 29, 2019 +.Dd July 1, 2020 .Dt PRINTF 1 .Os .Sh NAME @@ -316,12 +316,48 @@ Consult the manual page. .Sh EXIT STATUS .Ex -std +.Sh EXAMPLES +Print the string +.Qq hello : +.Bd -literal -offset indent +$ printf "%s\en" hello +hello +.Ed +.Pp +Same as above, but notice that the format string is not quoted and hence we +do not get the expected behavior: +.Bd -literal -offset indent +$ printf %s\en hello +hellon$ +.Ed +.Pp +Print arguments forcing sign only for the first argument: +.Bd -literal -offset indent +$ printf "%+d\en%d\en%d\en" 1 -2 13 ++1 +-2 +13 +.Ed +.Pp +Same as above, but the single format string will be applied to the three +arguments: +.Bd -literal -offset indent +$ printf "%+d\en" 1 -2 13 ++1 +-2 ++13 +.Ed +.Pp +Print number using only two digits after the decimal point: +.Bd -literal -offset indent +$ printf "%.2f\en" 31.7456 +31.75 +.Ed .Sh COMPATIBILITY The traditional .Bx behavior of converting arguments of numeric formats not beginning -with a digit to the -.Tn ASCII +with a digit to the ASCII code of the first character is not supported. .Sh SEE ALSO .Xr builtin 1 , @@ -343,8 +379,7 @@ It is modeled after the standard library function, .Xr printf 3 . .Sh CAVEATS -.Tn ANSI -hexadecimal character constants were deliberately not provided. +ANSI hexadecimal character constants were deliberately not provided. .Pp Trying to print a dash ("-") as the first character causes .Nm @@ -364,10 +399,8 @@ and formats with a precision may not operate as expected. .Sh BUGS -Since the floating point numbers are translated from -.Tn ASCII -to floating-point and -then back again, floating-point precision may be lost. +Since the floating point numbers are translated from ASCII +to floating-point and then back again, floating-point precision may be lost. (By default, the number is translated to an IEEE-754 double-precision value before being printed. The From owner-svn-src-all@freebsd.org Wed Jul 1 16:37:12 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D0E08356FB6; Wed, 1 Jul 2020 16:37: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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xn205MzXz4kVR; Wed, 1 Jul 2020 16:37: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 8496BC250; Wed, 1 Jul 2020 16:37: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 061GbCI0034158; Wed, 1 Jul 2020 16:37:12 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061Gb9Tj034140; Wed, 1 Jul 2020 16:37:09 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202007011637.061Gb9Tj034140@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 1 Jul 2020 16:37:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362844 - in stable/11: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/src lib/libmagic X-SVN-Group: stable-11 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: in stable/11: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/src lib/libmagic X-SVN-Commit-Revision: 362844 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 16:37:12 -0000 Author: delphij Date: Wed Jul 1 16:37:08 2020 New Revision: 362844 URL: https://svnweb.freebsd.org/changeset/base/362844 Log: MFC r362258, r362279: file 5.39 Relnotes: yes Added: stable/11/contrib/file/libmagic.pc.in - copied unchanged from r362258, head/contrib/file/libmagic.pc.in stable/11/contrib/file/magic/Magdir/asf - copied unchanged from r362258, head/contrib/file/magic/Magdir/asf stable/11/contrib/file/magic/Magdir/dif - copied unchanged from r362258, head/contrib/file/magic/Magdir/dif stable/11/contrib/file/magic/Magdir/sylk - copied unchanged from r362258, head/contrib/file/magic/Magdir/sylk stable/11/contrib/file/magic/Magdir/unisig - copied unchanged from r362258, head/contrib/file/magic/Magdir/unisig stable/11/contrib/file/magic/Magdir/usd - copied unchanged from r362258, head/contrib/file/magic/Magdir/usd stable/11/contrib/file/magic/Magdir/web - copied unchanged from r362258, head/contrib/file/magic/Magdir/web Modified: stable/11/contrib/file/ChangeLog stable/11/contrib/file/Makefile.am stable/11/contrib/file/Makefile.in stable/11/contrib/file/configure stable/11/contrib/file/configure.ac stable/11/contrib/file/doc/file.man stable/11/contrib/file/doc/magic.man stable/11/contrib/file/magic/Magdir/animation stable/11/contrib/file/magic/Magdir/archive stable/11/contrib/file/magic/Magdir/cad stable/11/contrib/file/magic/Magdir/commands stable/11/contrib/file/magic/Magdir/compress stable/11/contrib/file/magic/Magdir/console stable/11/contrib/file/magic/Magdir/database stable/11/contrib/file/magic/Magdir/der stable/11/contrib/file/magic/Magdir/elf stable/11/contrib/file/magic/Magdir/filesystems stable/11/contrib/file/magic/Magdir/games stable/11/contrib/file/magic/Magdir/gnu stable/11/contrib/file/magic/Magdir/images stable/11/contrib/file/magic/Magdir/intel stable/11/contrib/file/magic/Magdir/kicad stable/11/contrib/file/magic/Magdir/linux stable/11/contrib/file/magic/Magdir/msdos stable/11/contrib/file/magic/Magdir/ole2compounddocs stable/11/contrib/file/magic/Magdir/parix stable/11/contrib/file/magic/Magdir/pascal stable/11/contrib/file/magic/Magdir/pdf stable/11/contrib/file/magic/Magdir/pgp stable/11/contrib/file/magic/Magdir/python stable/11/contrib/file/magic/Magdir/riff stable/11/contrib/file/magic/Magdir/rst stable/11/contrib/file/magic/Magdir/rtf stable/11/contrib/file/magic/Magdir/sgml stable/11/contrib/file/magic/Magdir/sniffer stable/11/contrib/file/magic/Magdir/ssh stable/11/contrib/file/magic/Magdir/ti-8x stable/11/contrib/file/magic/Magdir/tplink stable/11/contrib/file/magic/Magdir/troff stable/11/contrib/file/magic/Magdir/virtual stable/11/contrib/file/magic/Magdir/windows stable/11/contrib/file/magic/Magdir/wordprocessors stable/11/contrib/file/magic/Magdir/zip stable/11/contrib/file/magic/Makefile.am stable/11/contrib/file/magic/Makefile.in stable/11/contrib/file/src/apprentice.c stable/11/contrib/file/src/ascmagic.c stable/11/contrib/file/src/buffer.c stable/11/contrib/file/src/compress.c stable/11/contrib/file/src/der.c stable/11/contrib/file/src/file.c stable/11/contrib/file/src/file.h stable/11/contrib/file/src/file_opts.h stable/11/contrib/file/src/funcs.c stable/11/contrib/file/src/is_json.c stable/11/contrib/file/src/magic.c stable/11/contrib/file/src/print.c stable/11/contrib/file/src/readelf.c stable/11/contrib/file/src/seccomp.c stable/11/contrib/file/src/softmagic.c stable/11/lib/libmagic/Makefile stable/11/lib/libmagic/config.h Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/file/ChangeLog ============================================================================== --- stable/11/contrib/file/ChangeLog Wed Jul 1 16:33:32 2020 (r362843) +++ stable/11/contrib/file/ChangeLog Wed Jul 1 16:37:08 2020 (r362844) @@ -1,3 +1,83 @@ +2020-06-14 20:02 Christos Zoulas + + * release 5.39 + +2020-06-07 20:00 Christos Zoulas + + * Remove unused subtype_mime (Steve Grubb) + * Remove unused check in okstat (Steve Grubb) + * Fix mime-type in elf binaries by making sure $x is set + * Fix indirect negative offsets broken by OFFNEGATIVE + * Fix GUID equality check + * PR/165: Handle empty array and strings in JSON + * PR/162: Add --exclude-quiet + +2020-06-06 15:33 Christos Zoulas + + * Fix memory leak in ascmagic (Steve Grubb) + +2020-06-04 00:21 Christos Zoulas + + * Fix string comparison length with ignore whitespace + +2020-05-31 00:11 Christos Zoulas + + * Fix mingwin 64 compilation + +2020-05-30 23:56 Christos Zoulas + + * PR/159: whitelist getpid needed for file_pipe2file() + +2020-05-09 18:57 Christos Zoulas + + * Indicate negative offsets with a flag OFFNEGATIVE + so that -0 works. + * Introduce "offset" magic type that can be used to + detect the file size, and bail on short files. + * document DER better in the magic man page. + +2020-03-11 21:53 Christos Zoulas + + * fix memory leaks (SonarQube) + +2020-03-08 21:33 Christos Zoulas + + * fix memory leaks (SonarQube) + * rewrite confusing loops (SonarQube) + * fix bogus test (SonarQube) + * pass a sized buffer to file_fmttime() (SonarQube) + + * fix memory leaks (SonarQube) + +2020-02-20 15:50 Christos Zoulas + + * Don't allow * in printf formats, or the code itself (Christoph Biedl) + * Introduce a printf output size checker to avoid DoS attacks + +2020-02-17 17:22 Christos Zoulas + + * Avoid memory leak on error (oss-fuzz) + * Check length of string on DER before derefercing and add new types + * Add missing DER string (oss-fuzz) + +2020-02-16 20:45 Christos Zoulas + + * Add missing DER types, and debugging + +2020-02-13 13:10 Christos Zoulas + + * PR/140: Avoid abort with hand-crafted magic file (gockelhahn) + * PR/139 Avoid DoS in printf with hand-crafted magic file (gockelhahn) + * PR/138: Avoid crash with hand-crafted magic file (gockelhahn) + +2020-02-12 17:30 Christos Zoulas + + * PR/136: Fix static build by adding a libmagic.pc (Fabrice Fontaine) + +2019-12-24 14:16 Christos Zoulas + + * add guid support + 2019-12-16 21:11 Christos Zoulas * release 5.38 Modified: stable/11/contrib/file/Makefile.am ============================================================================== --- stable/11/contrib/file/Makefile.am Wed Jul 1 16:33:32 2020 (r362843) +++ stable/11/contrib/file/Makefile.am Wed Jul 1 16:37:08 2020 (r362844) @@ -3,3 +3,8 @@ ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = MAINT SUBDIRS = src magic tests doc python + +# This variable must have 'exec' in its name, in order to be installed +# by 'install-exec' target (instead of default 'install-data') +pkgconfigexecdir = $(libdir)/pkgconfig +pkgconfigexec_DATA = libmagic.pc Modified: stable/11/contrib/file/Makefile.in ============================================================================== --- stable/11/contrib/file/Makefile.in Wed Jul 1 16:33:32 2020 (r362843) +++ stable/11/contrib/file/Makefile.in Wed Jul 1 16:37:08 2020 (r362844) @@ -13,6 +13,7 @@ # PARTICULAR PURPOSE. @SET_MAKE@ + VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ @@ -100,7 +101,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cach configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = +CONFIG_CLEAN_FILES = libmagic.pc CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -129,6 +130,35 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(pkgconfigexecdir)" +DATA = $(pkgconfigexec_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ @@ -159,9 +189,10 @@ ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) -am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in AUTHORS \ - COPYING ChangeLog INSTALL NEWS README TODO compile \ - config.guess config.sub install-sh ltmain.sh missing +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(srcdir)/libmagic.pc.in AUTHORS COPYING ChangeLog INSTALL \ + NEWS README TODO compile config.guess config.sub install-sh \ + ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -328,6 +359,11 @@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = MAINT SUBDIRS = src magic tests doc python + +# This variable must have 'exec' in its name, in order to be installed +# by 'install-exec' target (instead of default 'install-data') +pkgconfigexecdir = $(libdir)/pkgconfig +pkgconfigexec_DATA = libmagic.pc all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -380,6 +416,8 @@ $(srcdir)/config.h.in: $(am__configure_deps) distclean-hdr: -rm -f config.h stamp-h1 +libmagic.pc: $(top_builddir)/config.status $(srcdir)/libmagic.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo @@ -389,7 +427,28 @@ clean-libtool: distclean-libtool: -rm -f libtool config.lt +install-pkgconfigexecDATA: $(pkgconfigexec_DATA) + @$(NORMAL_INSTALL) + @list='$(pkgconfigexec_DATA)'; test -n "$(pkgconfigexecdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigexecdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgconfigexecdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigexecdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigexecdir)" || exit $$?; \ + done +uninstall-pkgconfigexecDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfigexec_DATA)'; test -n "$(pkgconfigexecdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(pkgconfigexecdir)'; $(am__uninstall_files_from_dir) + # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, @@ -689,9 +748,12 @@ distcleancheck: distclean exit 1; } >&2 check-am: all-am check: check-recursive -all-am: Makefile config.h +all-am: Makefile $(DATA) config.h installdirs: installdirs-recursive installdirs-am: + for dir in "$(DESTDIR)$(pkgconfigexecdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive @@ -750,7 +812,7 @@ install-dvi: install-dvi-recursive install-dvi-am: -install-exec-am: +install-exec-am: install-pkgconfigexecDATA install-html: install-html-recursive @@ -790,7 +852,7 @@ ps: ps-recursive ps-am: -uninstall-am: +uninstall-am: uninstall-pkgconfigexecDATA .MAKE: $(am__recursive_targets) all install-am install-strip @@ -804,12 +866,13 @@ uninstall-am: info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ - uninstall-am + install-man install-pdf install-pdf-am \ + install-pkgconfigexecDATA install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-pkgconfigexecDATA .PRECIOUS: Makefile Modified: stable/11/contrib/file/configure ============================================================================== --- stable/11/contrib/file/configure Wed Jul 1 16:33:32 2020 (r362843) +++ stable/11/contrib/file/configure Wed Jul 1 16:37:08 2020 (r362844) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for file 5.38. +# Generated by GNU Autoconf 2.69 for file 5.39. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='file' PACKAGE_TARNAME='file' -PACKAGE_VERSION='5.38' -PACKAGE_STRING='file 5.38' +PACKAGE_VERSION='5.39' +PACKAGE_STRING='file 5.39' PACKAGE_BUGREPORT='christos@astron.com' PACKAGE_URL='' @@ -1334,7 +1334,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures file 5.38 to adapt to many kinds of systems. +\`configure' configures file 5.39 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1404,7 +1404,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of file 5.38:";; + short | recursive ) echo "Configuration of file 5.39:";; esac cat <<\_ACEOF @@ -1524,7 +1524,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -file configure 5.38 +file configure 5.39 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2180,7 +2180,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by file $as_me 5.38, which was +It was created by file $as_me 5.39, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3046,7 +3046,7 @@ fi # Define the identity of the package. PACKAGE='file' - VERSION='5.38' + VERSION='5.39' cat >>confdefs.h <<_ACEOF @@ -15167,7 +15167,7 @@ $as_echo "#define XZLIBSUPPORT 1" >>confdefs.h fi -ac_config_files="$ac_config_files Makefile src/Makefile magic/Makefile tests/Makefile doc/Makefile python/Makefile" +ac_config_files="$ac_config_files Makefile src/Makefile magic/Makefile tests/Makefile doc/Makefile python/Makefile libmagic.pc" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -15712,7 +15712,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by file $as_me 5.38, which was +This file was extended by file $as_me 5.39, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15778,7 +15778,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -file config.status 5.38 +file config.status 5.39 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -16199,6 +16199,7 @@ do "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "python/Makefile") CONFIG_FILES="$CONFIG_FILES python/Makefile" ;; + "libmagic.pc") CONFIG_FILES="$CONFIG_FILES libmagic.pc" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac Modified: stable/11/contrib/file/configure.ac ============================================================================== --- stable/11/contrib/file/configure.ac Wed Jul 1 16:33:32 2020 (r362843) +++ stable/11/contrib/file/configure.ac Wed Jul 1 16:37:08 2020 (r362844) @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([file],[5.38],[christos@astron.com]) +AC_INIT([file],[5.39],[christos@astron.com]) AM_INIT_AUTOMAKE([subdir-objects foreign]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) @@ -217,5 +217,5 @@ if test "$ac_cv_header_lzma_h$ac_cv_lib_lzma_lzma_str AC_DEFINE([XZLIBSUPPORT], 1, [Enable xzlib compression support]) fi -AC_CONFIG_FILES([Makefile src/Makefile magic/Makefile tests/Makefile doc/Makefile python/Makefile]) +AC_CONFIG_FILES([Makefile src/Makefile magic/Makefile tests/Makefile doc/Makefile python/Makefile libmagic.pc]) AC_OUTPUT Modified: stable/11/contrib/file/doc/file.man ============================================================================== --- stable/11/contrib/file/doc/file.man Wed Jul 1 16:33:32 2020 (r362843) +++ stable/11/contrib/file/doc/file.man Wed Jul 1 16:37:08 2020 (r362844) @@ -1,5 +1,5 @@ -.\" $File: file.man,v 1.138 2019/10/15 18:00:40 christos Exp $ -.Dd July 13, 2019 +.\" $File: file.man,v 1.140 2020/06/07 17:41:07 christos Exp $ +.Dd June 7, 2020 .Dt FILE __CSECTION__ .Os .Sh NAME @@ -10,6 +10,7 @@ .Bk -words .Op Fl bcdEhiklLNnprsSvzZ0 .Op Fl Fl apple +.Op Fl Fl exclude-quiet .Op Fl Fl extension .Op Fl Fl mime-encoding .Op Fl Fl mime-type @@ -229,6 +230,14 @@ the soft magic method. A synonym for .Sq ascii . .El +.It Fl Fl exclude-quiet +Like +.Fl Fl exclude +but ignore tests that +.Nm +does not know about. +This is intended for compatilibity with older versions of +.Nm . .It Fl Fl extension Print a slash-separated list of valid extensions for the file type found. .It Fl F , Fl Fl separator Ar separator @@ -326,13 +335,13 @@ never read them. Set various parameter limits. .Bl -column "elf_phnum" "Default" "XXXXXXXXXXXXXXXXXXXXXXXXXXX" -offset indent .It Sy "Name" Ta Sy "Default" Ta Sy "Explanation" -.It Li indir Ta 15 Ta recursion limit for indirect magic -.It Li name Ta 30 Ta use count limit for name/use magic +.It Li bytes Ta 1048576 Ta max number of bytes to read from file .It Li elf_notes Ta 256 Ta max ELF notes processed -.It Li elf_phnum Ta 128 Ta max ELF program sections processed +.It Li elf_phnum Ta 2048 Ta max ELF program sections processed .It Li elf_shnum Ta 32768 Ta max ELF sections processed +.It Li indir Ta 50 Ta recursion limit for indirect magic +.It Li name Ta 50 Ta use count limit for name/use magic .It Li regex Ta 8192 Ta length limit for regex searches -.It Li bytes Ta 1048576 Ta max number of bytes to read from file .El .It Fl r , Fl Fl raw Don't translate unprintable characters to \eooo. Modified: stable/11/contrib/file/doc/magic.man ============================================================================== --- stable/11/contrib/file/doc/magic.man Wed Jul 1 16:33:32 2020 (r362843) +++ stable/11/contrib/file/doc/magic.man Wed Jul 1 16:37:08 2020 (r362844) @@ -1,5 +1,5 @@ -.\" $File: magic.man,v 1.97 2019/11/15 21:03:14 christos Exp $ -.Dd January 21, 2019 +.\" $File: magic.man,v 1.98 2020/05/09 18:55:23 christos Exp $ +.Dd May 9, 2020 .Dt MAGIC __FSECTION__ .Os .\" install as magic.4 on USG, magic.5 on V7, Berkeley and Linux systems. @@ -300,6 +300,62 @@ This test is always true and clears the match flag for It is intended to be used with the .Dv default test. +.It Dv der +Parse the file as a DER Certificate file. +The test field is used as a der type that needs to be matched. +The DER types are: +.Dv eoc , +.Dv bool , +.Dv int , +.Dv bit_str , +.Dv octet_str , +.Dv null , +.Dv obj_id , +.Dv obj_desc , +.Dv ext , +.Dv real , +.Dv enum , +.Dv embed , +.Dv utf8_str , +.Dv rel_oid , +.Dv time , +.Dv res2 , +.Dv seq , +.Dv set , +.Dv num_str , +.Dv prt_str , +.Dv t61_str , +.Dv vid_str , +.Dv ia5_str , +.Dv utc_time , +.Dv gen_time , +.Dv gr_str , +.Dv vis_str , +.Dv gen_str , +.Dv univ_str , +.Dv char_str , +.Dv bmp_str , +.Dv date , +.Dv tod , +.Dv datetime , +.Dv duration , +.Dv oid-iri , +.Dv rel-oid-iri . +These types can be followed by an optional numeric size, which indicates +the field width in bytes. +.It Dv guid +A Globally Unique Identifier, parsed and printed as +XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX. +It's format is a string. +.It Dv offset +This is a quad value indicating the current offset of the file. +It can be used to determine the size of the file or the magic buffer. +For example the magic entries: +.Bd -literal -offset indent +-0 offset x this file is %lld bytes +-0 offset <=100 must be more than 100 \e + bytes and is only %lld +.Ed .El .Pp For compatibility with the Single Copied: stable/11/contrib/file/libmagic.pc.in (from r362258, head/contrib/file/libmagic.pc.in) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/contrib/file/libmagic.pc.in Wed Jul 1 16:37:08 2020 (r362844, copy of r362258, head/contrib/file/libmagic.pc.in) @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libmagic +Description: Magic number recognition library +Version: @VERSION@ +Libs: -L${libdir} -lmagic +Libs.private: @LIBS@ Modified: stable/11/contrib/file/magic/Magdir/animation ============================================================================== --- stable/11/contrib/file/magic/Magdir/animation Wed Jul 1 16:33:32 2020 (r362843) +++ stable/11/contrib/file/magic/Magdir/animation Wed Jul 1 16:37:08 2020 (r362844) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: animation,v 1.74 2019/10/29 01:06:20 christos Exp $ +# $File: animation,v 1.77 2020/04/26 15:23:43 christos Exp $ # animation: file(1) magic for animation/movie formats # # animation formats @@ -159,7 +159,7 @@ >8 string mqt \b, Sony / Mobile QuickTime (.MQV) US Pat 7,477,830 !:mime video/quicktime >8 string MSNV \b, MPEG-4 (.MP4) for SonyPSP -!:mime audio/mp4 +!:mime video/mp4 >8 string NDAS \b, MP4 v2 [ISO 14496-14] Nero Digital AAC Audio !:mime audio/mp4 >8 string NDSC \b, MPEG-4 (.MP4) Nero Cinema Profile @@ -854,10 +854,6 @@ >4 byte ^0x01 (DV) movie file >3 byte &0x80 (PAL) >3 byte ^0x80 (NTSC) - -# Microsoft Advanced Streaming Format (ASF) -0 belong 0x3026b275 Microsoft ASF -!:mime video/x-ms-asf # MNG Video Format, 0 string \x8aMNG MNG video data, Modified: stable/11/contrib/file/magic/Magdir/archive ============================================================================== --- stable/11/contrib/file/magic/Magdir/archive Wed Jul 1 16:33:32 2020 (r362843) +++ stable/11/contrib/file/magic/Magdir/archive Wed Jul 1 16:37:08 2020 (r362844) @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------ -# $File: archive,v 1.133 2019/11/15 21:03:14 christos Exp $ +# $File: archive,v 1.138 2020/06/07 23:29:26 christos Exp $ # archive: file(1) magic for archive formats (see also "msdos" for self- # extracting compressed archives) # @@ -236,7 +236,8 @@ !:ext deb/udeb >14 string -binary Debian binary package !:mime application/vnd.debian.binary-package -!:ext deb/udeb +# For ipk packager see also https://en.wikipedia.org/wiki/Opkg +!:ext deb/udeb/ipk # This should not happen >14 default x Unknown Debian package # NL terminated version; for most Debian cases this is 2.0 or 2.1 for splitted @@ -250,7 +251,16 @@ >>0 search/0x93e4f data.tar. \b, data compression # the above line only works if FILE_BYTES_MAX in ../../src/file.h is raised # for example like libreoffice-dev-doc_1%3a5.2.7-1+rpi1+deb9u3_all.deb ->>>&0 string x %.4s +>>>&0 string x %.2s +# skip space (0x20 BSD) and slash (0x2f System V) character marking end of name +>>>&2 ubyte !0x20 +>>>>&-1 ubyte !0x2f +# display 3rd character of file name extension like 2 of bz2 or m of lzma +>>>>>&-1 ubyte x \b%c +>>>>>>&0 ubyte !0x20 +>>>>>>>&-1 ubyte !0x2f +# display 4th character of file name extension like a of lzma +>>>>>>>>&-1 ubyte x \b%c # splitted debian package case >68 string =2.1\n # dpkg-1.18.25/dpkg-split/info.c @@ -1124,71 +1134,120 @@ # OpenOffice formats (for OpenOffice 1.x / StarOffice 6/7) # (mimetype contains "application/vnd.sun.xml.") +# URL: https://en.wikipedia.org/wiki/OpenOffice.org_XML +# reference: http://fileformats.archiveteam.org/wiki/OpenOffice.org_XML >>50 string vnd.sun.xml. OpenOffice.org 1.x >>>62 string writer Writer >>>>68 byte !0x2e document +!:mime application/vnd.sun.xml.writer +!:ext sxw >>>>68 string .template template +!:mime application/vnd.sun.xml.writer.template +!:ext stw +>>>>68 string .web Web template +!:mime application/vnd.sun.xml.writer.web +!:ext stw >>>>68 string .global global document +!:mime application/vnd.sun.xml.writer.global +!:ext sxg >>>62 string calc Calc >>>>66 byte !0x2e spreadsheet +!:mime application/vnd.sun.xml.calc +!:ext sxc >>>>66 string .template template +!:mime application/vnd.sun.xml.calc.template +!:ext stc >>>62 string draw Draw >>>>66 byte !0x2e document +!:mime application/vnd.sun.xml.draw +!:ext sxd >>>>66 string .template template +!:mime application/vnd.sun.xml.draw.template +!:ext std >>>62 string impress Impress >>>>69 byte !0x2e presentation +!:mime application/vnd.sun.xml.impress +!:ext sxi >>>>69 string .template template +!:mime application/vnd.sun.xml.impress.template +!:ext sti >>>62 string math Math document +!:mime application/vnd.sun.xml.math +!:ext sxm >>>62 string base Database file +!:mime application/vnd.sun.xml.base +!:ext sdb # OpenDocument formats (for OpenOffice 2.x / StarOffice >= 8) +# URL: http://fileformats.archiveteam.org/wiki/OpenDocument # https://lists.oasis-open.org/archives/office/200505/msg00006.html # (mimetype contains "application/vnd.oasis.opendocument.") >>50 string vnd.oasis.opendocument. OpenDocument >>>73 string text >>>>77 byte !0x2d Text !:mime application/vnd.oasis.opendocument.text +!:ext odt >>>>77 string -template Text Template !:mime application/vnd.oasis.opendocument.text-template +!:ext ott >>>>77 string -web HTML Document Template !:mime application/vnd.oasis.opendocument.text-web +!:ext oth >>>>77 string -master Master Document !:mime application/vnd.oasis.opendocument.text-master +!:ext odm >>>73 string graphics >>>>81 byte !0x2d Drawing !:mime application/vnd.oasis.opendocument.graphics ->>>>81 string -template Template +!:ext odg +>>>>81 string -template Drawing Template !:mime application/vnd.oasis.opendocument.graphics-template +!:ext otg >>>73 string presentation >>>>85 byte !0x2d Presentation !:mime application/vnd.oasis.opendocument.presentation ->>>>85 string -template Template +!:ext odp +>>>>85 string -template Presentation Template !:mime application/vnd.oasis.opendocument.presentation-template +!:ext otp >>>73 string spreadsheet >>>>84 byte !0x2d Spreadsheet !:mime application/vnd.oasis.opendocument.spreadsheet ->>>>84 string -template Template +!:ext ods +>>>>84 string -template Spreadsheet Template !:mime application/vnd.oasis.opendocument.spreadsheet-template +!:ext ots >>>73 string chart >>>>78 byte !0x2d Chart !:mime application/vnd.oasis.opendocument.chart ->>>>78 string -template Template +!:ext odc +>>>>78 string -template Chart Template !:mime application/vnd.oasis.opendocument.chart-template +!:ext otc >>>73 string formula >>>>80 byte !0x2d Formula !:mime application/vnd.oasis.opendocument.formula ->>>>80 string -template Template +!:ext odf +>>>>80 string -template Formula Template !:mime application/vnd.oasis.opendocument.formula-template +!:ext otf +# https://www.loc.gov/preservation/digital/formats/fdd/fdd000441.shtml >>>73 string database Database !:mime application/vnd.oasis.opendocument.database +!:ext odb # Valid for LibreOffice Base 6.0.1.1 at least >>>73 string base Database -!:mime application/vnd.oasis.opendocument.base +# https://bugs.documentfoundation.org/show_bug.cgi?id=45854 +!:mime application/vnd.oasis.opendocument.database +#!:mime application/vnd.oasis.opendocument.base +!:ext odb >>>73 string image >>>>78 byte !0x2d Image !:mime application/vnd.oasis.opendocument.image ->>>>78 string -template Template +!:ext odi +>>>>78 string -template Image Template !:mime application/vnd.oasis.opendocument.image-template +!:ext oti # EPUB (OEBPS) books using OCF (OEBPS Container Format) # https://www.idpf.org/ocf/ocf1.0/download/ocf10.htm, section 4. @@ -1206,12 +1265,33 @@ >>>62 string draw.template+zip Draw template, version 14-16 !:mime application/x-vnd.corel.draw.template+zip !:ext cdrt ->>>62 string zcf.draw.document+zip Draw drawing, version 17-21 +>>>62 string zcf.draw.document+zip Draw drawing, version 17-22 !:mime application/x-vnd.corel.zcf.draw.document+zip !:ext cdr ->>>62 string zcf.draw.template+zip Draw template, version 17-21 +>>>62 string zcf.draw.template+zip Draw template, version 17-22 !:mime application/x-vnd.corel.zcf.draw.template+zip !:ext cdt/cdrt +# URL: http://product.corel.com/help/CorelDRAW/540240626/Main/EN/Doc/CorelDRAW-Other-file-formats.html +>>>62 string zcf.pattern+zip Draw pattern, version 22 +!:mime application/x-vnd.corel.zcf.pattern+zip +!:ext pat +# URL: https://en.wikipedia.org/wiki/Corel_Designer +# Reference: http://fileformats.archiveteam.org/wiki/Corel_Designer +# Note: called by TrID "Corel DESIGN graphics" +>>>62 string designer.document+zip DESIGNER graphics, version 14-16 +!:mime application/x-vnd.corel.designer.document+zip +!:ext des +>>>62 string zcf.designer.document+zip DESIGNER graphics, version 17-21 +!:mime application/x-vnd.corel.zcf.designer.document+zip +!:ext des +# URL: http://product.corel.com/help/CorelDRAW/540223850/Main/EN/Documentation/ +# CorelDRAW-Corel-Symbol-Library-CSL.html +>>>62 string symbol.library+zip Symbol Library, version 6-16.3 +!:mime application/x-vnd.corel.symbol.library+zip +!:ext csl +>>>62 string zcf.symbol.library+zip Symbol Library, version 17-22 +!:mime application/x-vnd.corel.zcf.symbol.library+zip +!:ext csl # Catch other ZIP-with-mimetype formats # In a ZIP file, the bytes immediately after a member's contents are @@ -1239,16 +1319,19 @@ >>>>38 search/64 .app/ iOS App !:mime application/x-ios-app +>30 search/100/b application/epub+zip EPUB document +!:mime application/epub+zip # Generic zip archives (Greg Roelofs, c/o zip-bugs@wkuvx1.wku.edu) # Next line excludes specialized formats: >(26.s+30) leshort !0xcafe ->>26 string !\x8\0\0\0mimetype Zip archive data +>>30 search/100/b !application/epub+zip +>>>26 string !\x8\0\0\0mimetype Zip archive data !:mime application/zip ->>>4 beshort x \b, at least ->>>4 use zipversion ->>>4 beshort x to extract ->>>0x161 string WINZIP \b, WinZIP self-extracting +>>>>4 beshort x \b, at least +>>>>4 use zipversion +>>>>4 beshort x to extract +>>>>0x161 string WINZIP \b, WinZIP self-extracting # StarView Metafile # From Pierre Ducroquet Copied: stable/11/contrib/file/magic/Magdir/asf (from r362258, head/contrib/file/magic/Magdir/asf) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/contrib/file/magic/Magdir/asf Wed Jul 1 16:37:08 2020 (r362844, copy of r362258, head/contrib/file/magic/Magdir/asf) @@ -0,0 +1,132 @@ + +#------------------------------------------------------------------------------ +# $File: asf,v 1.1 2019/12/26 02:07:53 christos Exp $ +# asf: file(1) magic for Microsoft Advanced Systems Format (ASF) files +# http://www.staroceans.org/e-book/ASF_Specification.pdf + +0 name asf-name +# ASF_Data_Object +#>0 guid 75B22636-668E-11CF-A6D9-00AA0062CE6C +#>16 lequad >0 +#>>(16.q) use asf-object +# ASF_Simple_Index_Object +>0 guid 33000890-E5B1-11CF-89F4-00A0C90349CB +>0 guid D6E229D3-35DA-11D1-9034-00A0C90349BE ASF_Index_Object +>0 guid FEB103F8-12AD-4C64-840F-2A1D2F7AD48C ASF_Media_Object_Index_Object +>0 guid 3CB73FD0-0C4A-4803-953D-EDF7B6228F0C ASF_Timecode_Index_Object + +# ASF_File_Properties_Object +>0 guid 8CABDCA1-A947-11CF-8EE4-00C00C205365 + +# ASF_Stream_Properties_Object +>0 guid B7DC0791-A9B7-11CF-8EE6-00C00C205365 +#>>56 lequad x Time Offset %lld +#>>64 lelong x Type-Specicic Data Length %d +#>>68 lelong x Error Correction Data Length %d +#>>72 leshort x Flags 0x%x +#>>74 lelong x Reserved %x +# ASF_Audio_Media +>>24 guid F8699E40-5B4D-11CF-A8FD-00805F5C442B \b, Audio Media ( +>>>78 leshort x \bCodec Id %d +>>>80 leshort x \b, Number of channels %d +>>>82 lelong x \b, Samples Per Second %d +>>>86 lelong x \b, Average Number of Bytes Per Second %d +>>>90 lelong x \b, Block Alignment %d +>>>94 leshort x \b, Bits Per Sample %d +# ASF_Video_Media +>>24 guid BC19EFC0-5B4D-11CF-A8FD-00805F5C442B \b, Video Media ( +>>>78 lelong x \bEncoded Image Width %d +>>>82 lelong x \b, Encoded Image Height %d +#>>>85 leshort x \b, Format Data Size %x +>>>93 lelong x \b, Image Width %d +>>>97 lelong x \b, Image Height %d +#>>>101 leshort x \b, Reserved 0x%x +>>>103 leshort x \b, Bits Per Pixel Count %d +#>>>105 lelong x \b, Compression ID %d +#>>>109 lelong x \b, Image Size %d +#>>>113 lelong x \b, Horizontal Pixels Per Meter %d +#>>>117 lelong x \b, Vertical Pixels Per Meter %d +#>>>121 lelong x \b, Colors Used Count %d +#>>>125 lelong x \b, Important Colors Count %d +>>0 lelong x \b, Error correction type +>>40 use asf-name +>>0 lelong x \b) +#ASF_Header_Extension_Object +>0 guid 5FBF03B5-A92E-11CF-8EE3-00C00C205365 +# ASF_Codec_List_Object +>0 guid 86D15240-311D-11D0-A3A4-00A0C90348F6 +>0 guid 1EFB1A30-0B62-11D0-A39B-00A0C90348F6 ASF_Script_Command_Object +>0 guid F487CD01-A951-11CF-8EE6-00C00C205365 ASF_Marker_Object +>0 guid D6E229DC-35DA-11D1-9034-00A0C90349BE ASF_Bitrate_Mutual_Exclusion_Object +>0 guid 75B22635-668E-11CF-A6D9-00AA0062CE6C ASF_Error_Correction_Object +# ASF_Content_Description_Object +>0 guid 75B22633-668E-11CF-A6D9-00AA0062CE6C +#>>24 leshort title length %d +#>>26 leshort author length %d +#>>28 leshort copyright length %d +#>>30 leshort descriptor length %d +#>>32 leshort rating length %d +>0 guid D2D0A440-E307-11D2-97F0-00A0C95EA850 ASF_Extended_Content_Description_Object +>0 guid 2211B3FA-BD23-11D2-B4B7-00A0C955FC6E ASF_Content_Branding_Object +>0 guid 7BF875CE-468D-11D1-8D82-006097C9A2B2 ASF_Stream_Bitrate_Properties_Object +>0 guid 2211B3FB-BD23-11D2-B4B7-00A0C955FC6E ASF_Content_Encryption_Object +>0 guid 298AE614-2622-4C17-B935-DAE07EE9289C ASF_Extended_Content_Encryption_Object +>0 guid 2211B3FC-BD23-11D2-B4B7-00A0C955FC6E ASF_Digital_Signature_Object +# ASF_Padding_Object +>0 guid 1806D474-CADF-4509-A4BA-9AABCB96AAE8 +>0 guid 14E6A5CB-C672-4332-8399-A96952065B5A ASF_Extended_Stream_Properties_Object +>0 guid A08649CF-4775-4670-8A16-6E35357566CD ASF_Advanced_Mutual_Exclusion_Object +>0 guid D1465A40-5A79-4338-B71B-E36B8FD6C249 ASF_Group_Mutual_Exclusion_Object +>0 guid D4FED15B-88D3-454F-81F0-ED5C45999E24 ASF_Stream_Prioritization_Object +>0 guid A69609E6-517B-11D2-B6AF-00C04FD908E9 ASF_Bandwidth_Sharing_Object +>0 guid 7C4346A9-EFE0-4BFC-B229-393EDE415C85 ASF_Language_List_Object +>0 guid C5F8CBEA-5BAF-4877-8467-AA8C44FA4CCA ASF_Metadata_Object +>0 guid 44231C94-9498-49D1-A141-1D134E457054 ASF_Metadata_Library_Object +>0 guid D6E229DF-35DA-11D1-9034-00A0C90349BE ASF_Index_Parameters_Object +>0 guid 6B203BAD-3F11-48E4-ACA8-D7613DE2CFA7 ASF_Media_Object_Index_Parameters_Object +>0 guid F55E496D-9797-4B5D-8C8B-604DFE9BFB24 ASF_Timecode_Index_Parameters_Object +>0 guid 26F18B5D-4584-47EC-9F5F-0E651F0452C9 ASF_Compatibility_Object +>0 guid 43058533-6981-49E6-9B74-AD12CB86D58C ASF_Advanced_Content_Encryption_Object +>0 guid 59DACFC0-59E6-11D0-A3AC-00A0C90348F6 ASF_Command_Media +>0 guid B61BE100-5B4E-11CF-A8FD-00805F5C44 ASF_JFIF_Media +>0 guid 35907DE0-E415-11CF-A917-00805F5C442B ASF_Degradable_JPEG_Media +>0 guid 91BD222C-F21C-497A-8B6D-5AA86BFC0185 ASF_File_Transfer_Media +>0 guid 3AFB65E2-47EF-40F2-AC2C-70A90D71D343 ASF_Binary_Media +>0 guid 776257D4-C627-41CB-8F81-7AC7FF1C40CC ASF_Web_Stream_Media_Subtype +>0 guid DA1E6B13-8359-4050-B398-388E965BF00C ASF_Web_Stream_Format +>0 guid 20FB5700-5B55-11CF-A8FD-00805F5C442B ASF_No_Error_Correction +>0 guid BFC3CD50-618F-11CF-8BB2-00AA00B4E220 ASF_Audio_Spread +>0 guid ABD3D211-A9BA-11cf-8EE6-00C00C205365 ASF_Reserved_1 +>0 guid 7A079BB6-DAA4-4e12-A5CA-91D38DC11A8D ASF_Content_Encryption_System_Windows_Media_DRM +# _Network_Devices +>0 guid 86D15241-311D-11D0-A3A4-00A0C90348F6 ASF_Reserved_2 +>0 guid 4B1ACBE3-100B-11D0-A39B-00A0C90348F6 ASF_Reserved_3 +>0 guid 4CFEDB20-75F6-11CF-9C0F-00A0C90349CB ASF_Reserved_4 +>0 guid D6E22A00-35DA-11D1-9034-00A0C90349BE ASF_Mutex_Language +>0 guid D6E22A01-35DA-11D1-9034-00A0C90349BE ASF_Mutex_Bitrate +>0 guid D6E22A02-35DA-11D1-9034-00A0C90349BE ASF_Mutex_Unknown +>0 guid AF6060AA-5197-11D2-B6AF-00C04FD908E9 ASF_Bandwidth_Sharing_Exclusive +>0 guid AF6060AB-5197-11D2-B6AF-00C04FD908E9 ASF_Bandwidth_Sharing_Partial +>0 guid 399595EC-8667-4E2D-8FDB-98814CE76C1E ASF_Payload_Extension_System_Timecode +>0 guid E165EC0E-19ED-45D7-B4A7-25CBD1E28E9B ASF_Payload_Extension_System_File_Name +>0 guid D590DC20-07BC-436C-9CF7-F3BBFBF1A4DC ASF_Payload_Extension_System_Content_Type +>0 guid 1B1EE554-F9EA-4BC8-821A-376B74E4C4B8 ASF_Payload_Extension_System_Pixel_Aspect_Ratio +>0 guid C6BD9450-867F-4907-83A3-C77921B733AD ASF_Payload_Extension_System_Sample_Duration +>0 guid 6698B84E-0AFA-4330-AEB2-1C0A98D7A44D ASF_Payload_Extension_System_Encryption_Sample_ID +>0 guid 00E1AF06-7BEC-11D1-A582-00C04FC29CFB ASF_Payload_Extension_System_Degradable_JPEG + +0 name asf-object +>0 use asf-name +#>>16 lequad >0 (size %lld) [ +>>16 lequad >0 +>>>(16.q) use asf-object +#>>16 lequad 0 ] + +# Microsoft Advanced Streaming Format (ASF) +0 guid 75B22630-668E-11CF-A6D9-00AA0062CE6C Microsoft ASF +!:mime video/x-ms-asf +#>16 lequad >0 (size %lld +#>>24 lelong x \b, %d header objects) +>16 lequad >0 +>>30 use asf-object +>>(16.q) use asf-object Modified: stable/11/contrib/file/magic/Magdir/cad ============================================================================== --- stable/11/contrib/file/magic/Magdir/cad Wed Jul 1 16:33:32 2020 (r362843) +++ stable/11/contrib/file/magic/Magdir/cad Wed Jul 1 16:37:08 2020 (r362844) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: cad,v 1.20 2019/08/10 13:34:17 christos Exp $ +# $File: cad,v 1.23 2020/05/30 23:58:07 christos Exp $ # autocad: file(1) magic for cad files # @@ -229,9 +229,13 @@ !:mime image/vnd.dwg 0 string AC1024 DWG AutoDesk AutoCAD 2010/2011/2012 !:mime image/vnd.dwg -0 string AC1027 DWG AutoDesk AutoCAD 2013/2014 +0 string AC1027 DWG AutoDesk AutoCAD 2013-2017 !:mime image/vnd.dwg +# From GNU LibreDWG +0 string AC1032 DWG AutoDesk AutoCAD 2018/2019 +!:mime image/vnd.dwg + # KOMPAS 2D drawing from ASCON # This is KOMPAS 2D drawing or fragment of drawing but is not detailed nor # gathered nor specification @@ -315,3 +319,6 @@ 0 string \xff\xfe\xff\x0e\x53\x00\x6b\x00\x65\x00\x74\x00\x63\x00\x68\x00\x55\x00\x70\x00\x20\x00\x4d\x00\x6f\x00\x64\x00\x65\x00\x6c\x00 SketchUp Model !:mime application/vnd.sketchup.skp !:ext skp + +4 regex/b P[0-9][0-9]\\.[0-9][0-9][0-9][0-9]\\.[0-9][0-9][0-9][0-9]\\.[0-9] NAXOS CAD System file from version %s +!:strength +40 Modified: stable/11/contrib/file/magic/Magdir/commands ============================================================================== --- stable/11/contrib/file/magic/Magdir/commands Wed Jul 1 16:33:32 2020 (r362843) +++ stable/11/contrib/file/magic/Magdir/commands Wed Jul 1 16:37:08 2020 (r362844) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: commands,v 1.61 2019/10/30 03:16:43 christos Exp $ +# $File: commands,v 1.63 2020/06/06 15:36:30 christos Exp $ # commands: file(1) magic for various shells and interpreters # #0 string/w : shell archive or script for antique kernel text @@ -83,6 +83,30 @@ !:mime text/x-shellscript 0 string/wt #!\ /usr/bin/env\ bash Bourne-Again shell script text executable !:mime text/x-shellscript + +# Fish shell magic +# From: Benjamin Lowry +0 string/wt #!\ /usr/local/bin/fish fish shell script text executable +!:mime text/x-shellscript +0 string/wt #!\ /usr/bin/fish fish shell script text executable +!:mime text/x-shellscript +0 string/wt #!\ /usr/bin/env\ fish fish shell script text executable +!:mime text/x-shellscript + + +0 search/1/wt #!\ /usr/bin/tclsh Tcl/Tk script text executable +!:mime text/x-tcl + +0 search/1/wt #!\ /usr/bin/texlua LuaTex script text executable +!:mime text/x-luatex + +0 search/1/wt #!\ /usr/bin/luatex LuaTex script text executable +!:mime text/x-luatex + +0 search/1/wt #!\ /usr/bin/stap Systemtap script text executable +!:mime text/x-systemtap + + # PHP scripts # Ulf Harnhammar Modified: stable/11/contrib/file/magic/Magdir/compress ============================================================================== --- stable/11/contrib/file/magic/Magdir/compress Wed Jul 1 16:33:32 2020 (r362843) +++ stable/11/contrib/file/magic/Magdir/compress Wed Jul 1 16:37:08 2020 (r362844) @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------ -# $File: compress,v 1.77 2019/10/08 20:25:13 christos Exp $ +# $File: compress,v 1.79 2020/05/30 23:53:04 christos Exp $ # compress: file(1) magic for pure-compression formats (no archives) # # compress, gzip, pack, compact, huf, squeeze, crunch, freeze, yabba, etc. @@ -61,7 +61,9 @@ !:mime application/gzip >>>0 use gzip-info # size of the original (uncompressed) input data modulo 2^32 +>>-0 offset >48 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Jul 1 16:57:58 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AB4E53574CF; Wed, 1 Jul 2020 16:57: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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xnTy47gtz4lqt; Wed, 1 Jul 2020 16:57: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 72B48C6CD; Wed, 1 Jul 2020 16:57:58 +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 061GvwDK046276; Wed, 1 Jul 2020 16:57:58 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061Gvv9V046272; Wed, 1 Jul 2020 16:57:57 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <202007011657.061Gvv9V046272@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 1 Jul 2020 16:57:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362845 - in head/sys/arm64: arm64 include X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys/arm64: arm64 include X-SVN-Commit-Revision: 362845 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 16:57:58 -0000 Author: andrew Date: Wed Jul 1 16:57:57 2020 New Revision: 362845 URL: https://svnweb.freebsd.org/changeset/base/362845 Log: Read the CPU 0 arm64 ID registers early in initarm We also update the kernel view early in the boot. This will allow the use of the common kernel view in ifunc resolvers. Sponsored by: Innovate UK Modified: head/sys/arm64/arm64/identcpu.c head/sys/arm64/arm64/machdep.c head/sys/arm64/arm64/mp_machdep.c head/sys/arm64/include/cpu.h Modified: head/sys/arm64/arm64/identcpu.c ============================================================================== --- head/sys/arm64/arm64/identcpu.c Wed Jul 1 16:37:08 2020 (r362844) +++ head/sys/arm64/arm64/identcpu.c Wed Jul 1 16:57:57 2020 (r362845) @@ -992,7 +992,7 @@ update_lower_register(uint64_t val, uint64_t new_val, return (val); } -static void +void update_special_regs(u_int cpu) { struct mrs_field *fields; @@ -1072,7 +1072,8 @@ identify_cpu_sysinit(void *dummy __unused) elf_hwcap = hwcap; else elf_hwcap &= hwcap; - update_special_regs(cpu); + if (cpu != 0) + update_special_regs(cpu); if (CTR_DIC_VAL(cpu_desc[cpu].ctr) == 0) dic = false; @@ -1457,23 +1458,15 @@ identify_cache(uint64_t ctr) } void -identify_cpu(void) +identify_cpu(u_int cpu) { u_int midr; u_int impl_id; u_int part_id; - u_int cpu; size_t i; const struct cpu_parts *cpu_partsp = NULL; - cpu = PCPU_GET(cpuid); midr = get_midr(); - - /* - * Store midr to pcpu to allow fast reading - * from EL0, EL1 and assembly code. - */ - PCPU_SET(midr, midr); impl_id = CPU_IMPL(midr); for (i = 0; i < nitems(cpu_implementers); i++) { Modified: head/sys/arm64/arm64/machdep.c ============================================================================== --- head/sys/arm64/arm64/machdep.c Wed Jul 1 16:37:08 2020 (r362844) +++ head/sys/arm64/arm64/machdep.c Wed Jul 1 16:57:57 2020 (r362845) @@ -172,7 +172,6 @@ cpu_startup(void *dummy) { undef_init(); - identify_cpu(); install_cpu_errata(); vm_ksubmap_init(&kmi); @@ -1138,6 +1137,9 @@ initarm(struct arm64_bootparams *abp) if (kmdp == NULL) kmdp = preload_search_by_type("elf64 kernel"); + identify_cpu(0); + update_special_regs(0); + link_elf_ireloc(kmdp); try_load_dtb(kmdp); @@ -1181,6 +1183,7 @@ initarm(struct arm64_bootparams *abp) "msr tpidr_el1, %0" :: "r"(pcpup)); PCPU_SET(curthread, &thread0); + PCPU_SET(midr, get_midr()); /* Do basic tuning, hz etc */ init_param1(); Modified: head/sys/arm64/arm64/mp_machdep.c ============================================================================== --- head/sys/arm64/arm64/mp_machdep.c Wed Jul 1 16:37:08 2020 (r362844) +++ head/sys/arm64/arm64/mp_machdep.c Wed Jul 1 16:57:57 2020 (r362845) @@ -220,7 +220,7 @@ init_secondary(uint64_t cpu) * We need this before signalling the CPU is ready to * let the boot CPU use the results. */ - identify_cpu(); + identify_cpu(cpu); /* Ensure the stores in identify_cpu have completed */ atomic_thread_fence_acq_rel(); @@ -229,6 +229,8 @@ init_secondary(uint64_t cpu) atomic_add_int(&aps_started, 1); while (!atomic_load_int(&aps_ready)) __asm __volatile("wfe"); + + pcpup->pc_midr = get_midr(); /* Initialize curthread */ KASSERT(PCPU_GET(idlethread) != NULL, ("no idle thread")); Modified: head/sys/arm64/include/cpu.h ============================================================================== --- head/sys/arm64/include/cpu.h Wed Jul 1 16:37:08 2020 (r362844) +++ head/sys/arm64/include/cpu.h Wed Jul 1 16:57:57 2020 (r362845) @@ -167,11 +167,12 @@ void cpu_halt(void) __dead2; void cpu_reset(void) __dead2; void fork_trampoline(void); void identify_cache(uint64_t); -void identify_cpu(void); +void identify_cpu(u_int); void install_cpu_errata(void); void swi_vm(void *v); /* Functions to read the sanitised view of the special registers */ +void update_special_regs(u_int); bool extract_user_id_field(u_int, u_int, uint8_t *); bool get_kernel_reg(u_int, uint64_t *); From owner-svn-src-all@freebsd.org Wed Jul 1 17:17:06 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E726B357E0E; Wed, 1 Jul 2020 17:17:06 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xnw25f8cz4mYC; Wed, 1 Jul 2020 17:17:06 +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 A5146CBB5; Wed, 1 Jul 2020 17:17:06 +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 061HH6DK058859; Wed, 1 Jul 2020 17:17:06 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061HH663058858; Wed, 1 Jul 2020 17:17:06 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007011717.061HH663058858@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 1 Jul 2020 17:17:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362846 - head/sys/netinet/tcp_stacks X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet/tcp_stacks X-SVN-Commit-Revision: 362846 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 17:17:07 -0000 Author: tuexen Date: Wed Jul 1 17:17:06 2020 New Revision: 362846 URL: https://svnweb.freebsd.org/changeset/base/362846 Log: Fix the cleanup handling in a error path for TCP BBR. Reported by: syzbot+df7899c55c4cc52f5447@syzkaller.appspotmail.com Reviewed by: rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D25486 Modified: head/sys/netinet/tcp_stacks/bbr.c Modified: head/sys/netinet/tcp_stacks/bbr.c ============================================================================== --- head/sys/netinet/tcp_stacks/bbr.c Wed Jul 1 16:57:57 2020 (r362845) +++ head/sys/netinet/tcp_stacks/bbr.c Wed Jul 1 17:17:06 2020 (r362846) @@ -13381,6 +13381,8 @@ send: */ BBR_STAT_INC(bbr_offset_drop); tcp_set_inp_to_drop(inp, EFAULT); + SOCKBUF_UNLOCK(sb); + (void)m_free(m); return (0); } len = rsm->r_end - rsm->r_start; From owner-svn-src-all@freebsd.org Wed Jul 1 17:40:12 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D4C27357CCE; Wed, 1 Jul 2020 17:40:12 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xpQh5Dvvz4nRR; Wed, 1 Jul 2020 17:40:12 +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 98649D0B2; Wed, 1 Jul 2020 17:40:12 +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 061HeCjI071191; Wed, 1 Jul 2020 17:40:12 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061HeB5e071186; Wed, 1 Jul 2020 17:40:11 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007011740.061HeB5e071186@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 1 Jul 2020 17:40:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362847 - in stable/12/sys: netinet netinet6 X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: in stable/12/sys: netinet netinet6 X-SVN-Commit-Revision: 362847 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 17:40:12 -0000 Author: tuexen Date: Wed Jul 1 17:40:11 2020 New Revision: 362847 URL: https://svnweb.freebsd.org/changeset/base/362847 Log: MFC r350588: SCTP related cleanup Improve consistency. No functional change. Modified: stable/12/sys/netinet/sctp_asconf.c stable/12/sys/netinet/sctp_os_bsd.h stable/12/sys/netinet/sctp_pcb.c stable/12/sys/netinet/sctp_usrreq.c stable/12/sys/netinet6/sctp6_usrreq.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_asconf.c ============================================================================== --- stable/12/sys/netinet/sctp_asconf.c Wed Jul 1 17:17:06 2020 (r362846) +++ stable/12/sys/netinet/sctp_asconf.c Wed Jul 1 17:40:11 2020 (r362847) @@ -1982,7 +1982,7 @@ sctp_addr_mgmt_assoc(struct sctp_inpcb *inp, struct sc /* invalid if we are a v6 only endpoint */ if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) && - SCTP_IPV6_V6ONLY(&inp->ip_inp.inp)) + SCTP_IPV6_V6ONLY(inp)) return; sin = &ifa->address.sin; @@ -2055,9 +2055,8 @@ sctp_asconf_iterator_ep(struct sctp_inpcb *inp, void * case AF_INET: { /* invalid if we are a v6 only endpoint */ - if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) && - SCTP_IPV6_V6ONLY(&inp->ip_inp.inp)) { + SCTP_IPV6_V6ONLY(inp)) { cnt_invalid++; if (asc->cnt == cnt_invalid) return (1); @@ -2172,7 +2171,7 @@ sctp_asconf_iterator_stcb(struct sctp_inpcb *inp, stru /* invalid if we are a v6 only endpoint */ if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) && - SCTP_IPV6_V6ONLY(&inp->ip_inp.inp)) + SCTP_IPV6_V6ONLY(inp)) continue; sin = &ifa->address.sin; @@ -2189,7 +2188,7 @@ sctp_asconf_iterator_stcb(struct sctp_inpcb *inp, stru continue; } if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) && - SCTP_IPV6_V6ONLY(&inp->ip_inp.inp)) { + SCTP_IPV6_V6ONLY(inp)) { cnt_invalid++; if (asc->cnt == cnt_invalid) return; Modified: stable/12/sys/netinet/sctp_os_bsd.h ============================================================================== --- stable/12/sys/netinet/sctp_os_bsd.h Wed Jul 1 17:17:06 2020 (r362846) +++ stable/12/sys/netinet/sctp_os_bsd.h Wed Jul 1 17:40:11 2020 (r362847) @@ -365,10 +365,10 @@ typedef struct callout sctp_os_timer_t; */ /* get the v6 hop limit */ -#define SCTP_GET_HLIM(inp, ro) in6_selecthlim((struct inpcb *)&inp->ip_inp.inp, (ro ? (ro->ro_rt ? (ro->ro_rt->rt_ifp) : (NULL)) : (NULL))); +#define SCTP_GET_HLIM(inp, ro) in6_selecthlim(&inp->ip_inp.inp, (ro ? (ro->ro_rt ? (ro->ro_rt->rt_ifp) : (NULL)) : (NULL))); /* is the endpoint v6only? */ -#define SCTP_IPV6_V6ONLY(inp) (((struct inpcb *)inp)->inp_flags & IN6P_IPV6_V6ONLY) +#define SCTP_IPV6_V6ONLY(sctp_inpcb) ((sctp_inpcb)->ip_inp.inp.inp_flags & IN6P_IPV6_V6ONLY) /* is the socket non-blocking? */ #define SCTP_SO_IS_NBIO(so) ((so)->so_state & SS_NBIO) #define SCTP_SET_SO_NBIO(so) ((so)->so_state |= SS_NBIO) Modified: stable/12/sys/netinet/sctp_pcb.c ============================================================================== --- stable/12/sys/netinet/sctp_pcb.c Wed Jul 1 17:17:06 2020 (r362846) +++ stable/12/sys/netinet/sctp_pcb.c Wed Jul 1 17:40:11 2020 (r362847) @@ -2844,7 +2844,7 @@ sctp_inpcb_bind(struct socket *so, struct sockaddr *ad struct sockaddr_in *sin; /* IPV6_V6ONLY socket? */ - if (SCTP_IPV6_V6ONLY(ip_inp)) { + if (SCTP_IPV6_V6ONLY(inp)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, EINVAL); return (EINVAL); } @@ -3642,8 +3642,9 @@ sctp_inpcb_free(struct sctp_inpcb *inp, int immediate, #ifdef INET6 - if (ip_pcb->inp_vflag & INP_IPV6) - ip6_freepcbopts(((struct inpcb *)inp)->in6p_outputopts); + if (ip_pcb->inp_vflag & INP_IPV6) { + ip6_freepcbopts(ip_pcb->in6p_outputopts); + } #endif /* INET6 */ ip_pcb->inp_vflag = 0; /* free up authentication fields */ Modified: stable/12/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/12/sys/netinet/sctp_usrreq.c Wed Jul 1 17:17:06 2020 (r362846) +++ stable/12/sys/netinet/sctp_usrreq.c Wed Jul 1 17:40:11 2020 (r362847) @@ -1412,7 +1412,6 @@ sctp_do_connect_x(struct socket *so, struct sctp_inpcb } if ((inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) && (num_v4 > 0)) { - if (SCTP_IPV6_V6ONLY(inp)) { /* * if IPV6_V6ONLY flag, ignore connections destined @@ -6931,14 +6930,14 @@ sctp_connect(struct socket *so, struct sockaddr *addr, #ifdef INET case AF_INET: { - struct sockaddr_in *sinp; + struct sockaddr_in *sin; if (addr->sa_len != sizeof(struct sockaddr_in)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); return (EINVAL); } - sinp = (struct sockaddr_in *)addr; - if (p != NULL && (error = prison_remote_ip4(p->td_ucred, &sinp->sin_addr)) != 0) { + sin = (struct sockaddr_in *)addr; + if (p != NULL && (error = prison_remote_ip4(p->td_ucred, &sin->sin_addr)) != 0) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, error); return (error); } Modified: stable/12/sys/netinet6/sctp6_usrreq.c ============================================================================== --- stable/12/sys/netinet6/sctp6_usrreq.c Wed Jul 1 17:17:06 2020 (r362846) +++ stable/12/sys/netinet6/sctp6_usrreq.c Wed Jul 1 17:40:11 2020 (r362847) @@ -596,7 +596,7 @@ sctp6_bind(struct socket *so, struct sockaddr *addr, s vflagsav = inp->ip_inp.inp.inp_vflag; inp->ip_inp.inp.inp_vflag &= ~INP_IPV4; inp->ip_inp.inp.inp_vflag |= INP_IPV6; - if ((addr != NULL) && (SCTP_IPV6_V6ONLY(&inp->ip_inp.inp) == 0)) { + if ((addr != NULL) && (SCTP_IPV6_V6ONLY(inp) == 0)) { switch (addr->sa_family) { #ifdef INET case AF_INET: From owner-svn-src-all@freebsd.org Wed Jul 1 17:58:18 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0947E358907 for ; Wed, 1 Jul 2020 17:58:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xpqY3HqYz4pd6 for ; Wed, 1 Jul 2020 17:58:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x743.google.com with SMTP id b185so12454883qkg.1 for ; Wed, 01 Jul 2020 10:58:17 -0700 (PDT) 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=zK2mp7as19TY0bM7dKiFssSoEEzdDZT2O09pawz+Kw4=; b=2TUVY0z/sBPwlxDAFcFx3caHaYP+vzBP0RaSwDH9VaOB+2XPFE8IzdQjMzOhsmtWn/ 1VAeOP/d3VnVlHWKzikd93sYgJ7Rnk4xNQ9Kjs8ki9doL5Yz4+mE7vB9sBHvPAIp0/bd EA6sR3JjTdor1P/XbR9jXoeIrFojxhV9pf6C006Zn2MrAlA9lfPZ+XglLmxVgz68HrAR o1WHH7Kkl0ni8rObjz0VX1Soe+csUKAqtkY48g/XPeaq3TaeGL/lM0JuwRgLJ/2KpG/f OGtd9PTq5rOrQWza6mZ+bFctuw2/J0DOwlzTIaMtRo5QGqs1Rrs6SVV4nYQDXofZnnkI /EuA== 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=zK2mp7as19TY0bM7dKiFssSoEEzdDZT2O09pawz+Kw4=; b=U86TvS3L5MDFDf45aKb1s4p7OeKLqrLruq+wPx0Vw2g+VXJCcBSSJooeLYe5gfYj3y hpT2uY0gAMP1Yja6sRg+3HSP4CB6HkxwyCjzPPjcv0J5cW96XXVAjg4rhsTxTtEoda5p Ruul4G6O5GILZ5Tb8C6uH8PV/XckG7CuxLIHUSER/f2sDwqdjtXyPmH/Q8ZDVP1ealyM z0j+z5rPsriCJ6SyLZs1VtEyO7V0ITgk32W3z+gqiBoYyhqn9gkJ2xvUbFKWQs92KS2t lxRxcSdfrZQB1X3zqdmpTiRDULs0uCtKqt5gfitH4w4IzGTDeMi0RASALEFFFrmrqsH/ 6rBg== X-Gm-Message-State: AOAM531We5u7diqHfubFKCV6ws6d8uszA2S2VRxhnQdrWfjMS6hsWwLZ Ytdz2X7UOnnWLDSzfzo0Rl0lsftWdF2MIfo3XCAybQ== X-Google-Smtp-Source: ABdhPJyFbdtAZyegVnRBIeRr7xdhLuVSubzjyqk9vGdS1B//OzLaRChebIWMdALaLkAtYn8rGEfYXB1yWTXnZ674aqk= X-Received: by 2002:a37:741:: with SMTP id 62mr26073690qkh.495.1593626296457; Wed, 01 Jul 2020 10:58:16 -0700 (PDT) MIME-Version: 1.0 References: <20200701074920.GB72275@lion.0xfce3.net> <202007011451.061EpIYF056897@gndrsh.dnsmgr.net> In-Reply-To: <202007011451.061EpIYF056897@gndrsh.dnsmgr.net> From: Warner Losh Date: Wed, 1 Jul 2020 11:58:05 -0600 Message-ID: Subject: Re: svn commit: r362809 - head/contrib/mandoc To: "Rodney W. Grimes" Cc: Gordon Bergling , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 49xpqY3HqYz4pd6 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=2TUVY0z/; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::743) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-1.71 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.75)[-0.754]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.01)[0.006]; NEURAL_HAM_LONG(-0.96)[-0.961]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::743:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 17:58:18 -0000 On Wed, Jul 1, 2020 at 8:51 AM Rodney W. Grimes wrote: > > On Tue, Jun 30, 2020 at 03:56:17PM -0700, Rodney W. Grimes wrote: > > > [ Charset UTF-8 unsupported, converting... ] > > > > Author: gbe (doc committer) > > > > Date: Tue Jun 30 18:08:59 2020 > > > > New Revision: 362809 > > > > URL: https://svnweb.freebsd.org/changeset/base/362809 > > > > > > > > Log: > > > > Mention FreeBSD in the HISTORY sections of apropos(1) and > makewhatis(8). > > > > > > > > PR: 223520, 223521 > > > > Reviewed by: bcr (mentor) > > > > Approved by: bcr (mentor) > > > > Differential Revision: https://reviews.freebsd.org/D25521 > > > > > > > > Modified: > > > > head/contrib/mandoc/apropos.1 > > > > head/contrib/mandoc/makewhatis.8 > > > > > > > > Modified: head/contrib/mandoc/apropos.1 > > > > > ============================================================================== > > > > --- head/contrib/mandoc/apropos.1 Tue Jun 30 17:21:28 2020 > (r362808) > > > > +++ head/contrib/mandoc/apropos.1 Tue Jun 30 18:08:59 2020 > (r362809) > > > > @@ -15,7 +15,7 @@ > > > > .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, > ARISING OUT OF > > > > .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. > > > > .\" > > > > -.Dd $Mdocdate: November 22 2018 $ > > > > +.Dd $Mdocdate: June 30 2020 $ > > > > .Dt APROPOS 1 > > > > .Os > > > > .Sh NAME > > > > @@ -493,6 +493,12 @@ The options > > > > .Fl acfhIKklOTWw > > > > appeared in > > > > .Ox 5.7 . > > > > +.Pp > > > > +The > > > > +.Nm > > > > +utility was integrated into > > > > +.Fx 11.1 > > > > +as part of the switch to mandoc. > > > > > > Huh? FreeBSD has had apropos since 1.0 and my 5.4 system clearly has > it: > > > freebsd {110}% uname -a > > > FreeBSD pdx.rh.CN85.dnsmgr.net 5.4-RELEASE-p8 FreeBSD 5.4-RELEASE-p8 > #1: Mon Jul 1 17:58:50 PDT 2019 root@pdx.rh.CN85.dnsmgr.net:/usr/src/sys/i386/compile/PDXMXPIE > i386 > > > pdx.rh.CN85.dnsmgr.net:freebsd {111}% which apropos > > > /usr/bin/apropos > > > > > > And a man page for it too: > > > APROPOS(1) FreeBSD General Commands Manual > APROPOS(1) > > > > > > NAME > > > apropos, whatis -- search the whatis database > > > > > > SYNOPSIS > > > apropos keyword ... > > > whatis keyword ... > > > > > > DESCRIPTION > > > apropos searches a set of database files containing short > descriptions of > > > system commands for keywords and displays the result on the > standard out- > > > put. whatis displays only complete word matches. > > > > > > keyword really is an extended regular expression, please read > grep(1) > > > manual page for more information about its format. > > > > > > DIAGNOSTICS > > > The apropos utility exits 0 on success, and 1 if no keyword > matched. > > > > > > SEE ALSO > > > grep(1), makewhatis(1), man(1) > > > > > > FreeBSD 5.4 January 15, 1991 > FreeBSD 5.4 > > > > > > > .Sh AUTHORS > > > > .An -nosplit > > > > .An Bill Joy > > > > > > > > That is true, but the version of 'apropos' we have currently in base is > based on mandoc, > > which was imported around September 2018. Due to the nature of > contributed code I > > thought it would be best to document only the history when it was > integrated into > > FreeSBD. The same applies for 'makewhatis'. > > That is not what has been done in other places when code is > changed/replaced, > the HISTORY section is not specific to "FreeBSD's version" of this > function. > > We often have "An ls command appeared in Version 1 AT&T UNIX." Our source > code and man page is not from that, but that is the history of ls. > > This *could* be amended and *should* be amended to reflect that apropos, > and makewhatis got *updated* by a switch to the mandoc versions, but it > is misleading to say it was intergrated with the switch to mandoc as that > implies it did not exist before this action. > I tend to agree with Rod here. These appeared in X the first time, but noting they were replaced in version X with Y is the best way to address the current provenance of the code... Warner > > > > > > Modified: head/contrib/mandoc/makewhatis.8 > > > > > ============================================================================== > > > > --- head/contrib/mandoc/makewhatis.8 Tue Jun 30 17:21:28 2020 > (r362808) > > > > +++ head/contrib/mandoc/makewhatis.8 Tue Jun 30 18:08:59 2020 > (r362809) > > > > @@ -15,7 +15,7 @@ > > > > .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, > ARISING OUT OF > > > > .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. > > > > .\" > > > > -.Dd $Mdocdate: May 17 2017 $ > > > > +.Dd $Mdocdate: June 30 2020 $ > > > > .Dt MAKEWHATIS 8 > > > > .Os > > > > .Sh NAME > > > > @@ -211,6 +211,12 @@ and the options > > > > .Fl aCDnQT > > > > in > > > > .Ox 5.6 . > > > > +.Pp > > > > +The > > > > +.Nm > > > > +utility was integrated into > > > > +.Fx 11.1 > > > > +as part of the switch to mandoc. > > > > > > Ditto > > > > > > > .Sh AUTHORS > > > > .An -nosplit > > > > .An Bill Joy > > > > --Gordon > > > > -- > Rod Grimes > rgrimes@freebsd.org > From owner-svn-src-all@freebsd.org Wed Jul 1 18:03:40 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 01602358B40; Wed, 1 Jul 2020 18:03:40 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xpxl6GvQz4qJ6; Wed, 1 Jul 2020 18:03:39 +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 BA318D6AC; Wed, 1 Jul 2020 18:03:39 +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 061I3duM089327; Wed, 1 Jul 2020 18:03:39 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061I3cTs089322; Wed, 1 Jul 2020 18:03:38 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007011803.061I3cTs089322@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 1 Jul 2020 18:03:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362848 - in stable/12/sys: net netinet sys X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: in stable/12/sys: net netinet sys X-SVN-Commit-Revision: 362848 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 18:03:40 -0000 Author: tuexen Date: Wed Jul 1 18:03:38 2020 New Revision: 362848 URL: https://svnweb.freebsd.org/changeset/base/362848 Log: MFC r353480: Use event handler in SCTP Use an event handler to notify the SCTP about IP address changes instead of calling an SCTP specific function from the IP code. This is a requirement of supporting SCTP as a kernel loadable module. This patch was developed by markj@, I tweaked a bit the SCTP related code. Submitted by: markj Modified: stable/12/sys/net/route.c stable/12/sys/netinet/sctp_bsd_addr.c stable/12/sys/netinet/sctp_bsd_addr.h stable/12/sys/netinet/sctp_usrreq.c stable/12/sys/sys/eventhandler.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/route.c ============================================================================== --- stable/12/sys/net/route.c Wed Jul 1 17:40:11 2020 (r362847) +++ stable/12/sys/net/route.c Wed Jul 1 18:03:38 2020 (r362848) @@ -38,10 +38,9 @@ #include "opt_inet.h" #include "opt_inet6.h" -#include "opt_route.h" -#include "opt_sctp.h" #include "opt_mrouting.h" #include "opt_mpath.h" +#include "opt_route.h" #include #include @@ -90,13 +89,6 @@ #define RT_NUMFIBS 1 #endif -#if defined(INET) || defined(INET6) -#ifdef SCTP -extern void sctp_addr_change(struct ifaddr *ifa, int cmd); -#endif /* SCTP */ -#endif - - /* This is read-only.. */ u_int rt_numfibs = RT_NUMFIBS; SYSCTL_UINT(_net, OID_AUTO, fibs, CTLFLAG_RDTUN, &rt_numfibs, 0, ""); @@ -140,6 +132,8 @@ VNET_DEFINE(int, rttrash); /* routes not in table but VNET_DEFINE_STATIC(uma_zone_t, rtzone); /* Routing table UMA zone. */ #define V_rtzone VNET(rtzone) +EVENTHANDLER_LIST_DEFINE(rt_addrmsg); + static int rtrequest1_fib_change(struct rib_head *, struct rt_addrinfo *, struct rtentry **, u_int); static void rt_setmetrics(const struct rt_addrinfo *, struct rtentry *); @@ -2192,20 +2186,10 @@ rt_addrmsg(int cmd, struct ifaddr *ifa, int fibnum) KASSERT(cmd == RTM_ADD || cmd == RTM_DELETE, ("unexpected cmd %d", cmd)); - KASSERT(fibnum == RT_ALL_FIBS || (fibnum >= 0 && fibnum < rt_numfibs), ("%s: fib out of range 0 <=%d<%d", __func__, fibnum, rt_numfibs)); -#if defined(INET) || defined(INET6) -#ifdef SCTP - /* - * notify the SCTP stack - * this will only get called when an address is added/deleted - * XXX pass the ifaddr struct instead if ifa->ifa_addr... - */ - sctp_addr_change(ifa, cmd); -#endif /* SCTP */ -#endif + EVENTHANDLER_DIRECT_INVOKE(rt_addrmsg, ifa, cmd); return (rtsock_addrmsg(cmd, ifa, fibnum)); } Modified: stable/12/sys/netinet/sctp_bsd_addr.c ============================================================================== --- stable/12/sys/netinet/sctp_bsd_addr.c Wed Jul 1 17:40:11 2020 (r362847) +++ stable/12/sys/netinet/sctp_bsd_addr.c Wed Jul 1 18:03:38 2020 (r362848) @@ -357,6 +357,12 @@ sctp_addr_change(struct ifaddr *ifa, int cmd) } void +sctp_addr_change_event_handler(void *arg __unused, struct ifaddr *ifa, int cmd) +{ + sctp_addr_change(ifa, cmd); +} + +void sctp_add_or_del_interfaces(int (*pred) (struct ifnet *), int add){ struct ifnet *ifn; struct ifaddr *ifa; Modified: stable/12/sys/netinet/sctp_bsd_addr.h ============================================================================== --- stable/12/sys/netinet/sctp_bsd_addr.h Wed Jul 1 17:40:11 2020 (r362847) +++ stable/12/sys/netinet/sctp_bsd_addr.h Wed Jul 1 18:03:38 2020 (r362848) @@ -61,6 +61,8 @@ int sctp_copy_out_packet_log(uint8_t *target, int leng void sctp_addr_change(struct ifaddr *ifa, int cmd); +void sctp_addr_change_event_handler(void *, struct ifaddr *, int); + void sctp_add_or_del_interfaces(int (*pred) (struct ifnet *), int add); #endif Modified: stable/12/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/12/sys/netinet/sctp_usrreq.c Wed Jul 1 17:40:11 2020 (r362847) +++ stable/12/sys/netinet/sctp_usrreq.c Wed Jul 1 18:03:38 2020 (r362848) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include @@ -89,6 +90,8 @@ sctp_init(void) SCTP_BASE_VAR(packet_log_end) = 0; memset(&SCTP_BASE_VAR(packet_log_buffer), 0, SCTP_PACKET_LOG_SIZE); #endif + EVENTHANDLER_REGISTER(rt_addrmsg, sctp_addr_change_event_handler, + NULL, EVENTHANDLER_PRI_FIRST); } #ifdef VIMAGE Modified: stable/12/sys/sys/eventhandler.h ============================================================================== --- stable/12/sys/sys/eventhandler.h Wed Jul 1 17:40:11 2020 (r362847) +++ stable/12/sys/sys/eventhandler.h Wed Jul 1 18:03:38 2020 (r362848) @@ -335,4 +335,9 @@ typedef void (*device_detach_fn)(void *, device_t, enu EVENTHANDLER_DECLARE(device_attach, device_attach_fn); EVENTHANDLER_DECLARE(device_detach, device_detach_fn); +/* Interface address addition and removal event */ +struct ifaddr; +typedef void (*rt_addrmsg_fn)(void *, struct ifaddr *, int); +EVENTHANDLER_DECLARE(rt_addrmsg, rt_addrmsg_fn); + #endif /* _SYS_EVENTHANDLER_H_ */ From owner-svn-src-all@freebsd.org Wed Jul 1 18:09:00 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 31D72358BC8; Wed, 1 Jul 2020 18:09:00 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xq3w0cwsz4qjt; Wed, 1 Jul 2020 18:09:00 +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 E902FD6AD; Wed, 1 Jul 2020 18:08:59 +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 061I8xvA089778; Wed, 1 Jul 2020 18:08:59 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061I8x1U089776; Wed, 1 Jul 2020 18:08:59 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007011808.061I8x1U089776@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 1 Jul 2020 18:08:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362849 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 362849 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 18:09:00 -0000 Author: tuexen Date: Wed Jul 1 18:08:59 2020 New Revision: 362849 URL: https://svnweb.freebsd.org/changeset/base/362849 Log: MFC r353488: Rename sctp_dtrace_declare.h to sctp_kdtrace.h Added: stable/12/sys/netinet/sctp_kdtrace.h - copied unchanged from r353488, head/sys/netinet/sctp_kdtrace.h Deleted: stable/12/sys/netinet/sctp_dtrace_declare.h Modified: stable/12/sys/netinet/sctp_cc_functions.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_cc_functions.c ============================================================================== --- stable/12/sys/netinet/sctp_cc_functions.c Wed Jul 1 18:03:38 2020 (r362848) +++ stable/12/sys/netinet/sctp_cc_functions.c Wed Jul 1 18:08:59 2020 (r362849) @@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #define SHIFT_MPTCP_MULTI_N 40 #define SHIFT_MPTCP_MULTI_Z 16 Copied: stable/12/sys/netinet/sctp_kdtrace.h (from r353488, head/sys/netinet/sctp_kdtrace.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/sys/netinet/sctp_kdtrace.h Wed Jul 1 18:08:59 2020 (r362849, copy of r353488, head/sys/netinet/sctp_kdtrace.h) @@ -0,0 +1,81 @@ +/*- + * SPDX-License-Identifier: BSD-3-Clause + * + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * a) Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * b) 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. + * + * c) Neither the name of Cisco Systems, Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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$"); + +#ifndef _NETINET_SCTP_DTRACE_DECLARE_H_ +#define _NETINET_SCTP_DTRACE_DECLARE_H_ + +#include +#include + +/* Declare the SCTP provider */ +SDT_PROVIDER_DECLARE(sctp); + +/* The probes we have so far: */ + +/* One to track a net's cwnd */ +/* initial */ +SDT_PROBE_DECLARE(sctp, cwnd, net, init); +/* update at a ack -- increase */ +SDT_PROBE_DECLARE(sctp, cwnd, net, ack); +/* update at a fast retransmit -- decrease */ +SDT_PROBE_DECLARE(sctp, cwnd, net, fr); +/* update at a time-out -- decrease */ +SDT_PROBE_DECLARE(sctp, cwnd, net, to); +/* update at a burst-limit -- decrease */ +SDT_PROBE_DECLARE(sctp, cwnd, net, bl); +/* update at a ECN -- decrease */ +SDT_PROBE_DECLARE(sctp, cwnd, net, ecn); +/* update at a Packet-Drop -- decrease */ +SDT_PROBE_DECLARE(sctp, cwnd, net, pd); +/* Rttvar probe declaration */ +SDT_PROBE_DECLARE(sctp, cwnd, net, rttvar); +SDT_PROBE_DECLARE(sctp, cwnd, net, rttstep); + +/* One to track an associations rwnd */ +SDT_PROBE_DECLARE(sctp, rwnd, assoc, val); + +/* One to track a net's flight size */ +SDT_PROBE_DECLARE(sctp, flightsize, net, val); + +/* One to track an associations flight size */ +SDT_PROBE_DECLARE(sctp, flightsize, assoc, val); + + + + + + +#endif From owner-svn-src-all@freebsd.org Wed Jul 1 18:10:39 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8EC46358F07; Wed, 1 Jul 2020 18:10:39 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xq5q3Lg2z4qnL; Wed, 1 Jul 2020 18:10:39 +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 56413D3DF; Wed, 1 Jul 2020 18:10:39 +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 061IAdgB090229; Wed, 1 Jul 2020 18:10:39 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061IAbQm090057; Wed, 1 Jul 2020 18:10:37 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007011810.061IAbQm090057@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 1 Jul 2020 18:10:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362850 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 362850 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 18:10:39 -0000 Author: tuexen Date: Wed Jul 1 18:10:37 2020 New Revision: 362850 URL: https://svnweb.freebsd.org/changeset/base/362850 Log: MFC r353518: Separate out SCTP related dtrace code. This is based on work done by markj. Modified: stable/12/sys/netinet/in_kdtrace.c stable/12/sys/netinet/in_kdtrace.h stable/12/sys/netinet/sctp_input.c stable/12/sys/netinet/sctp_kdtrace.c stable/12/sys/netinet/sctp_kdtrace.h stable/12/sys/netinet/sctp_output.c stable/12/sys/netinet/sctputil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/in_kdtrace.c ============================================================================== --- stable/12/sys/netinet/in_kdtrace.c Wed Jul 1 18:08:59 2020 (r362849) +++ stable/12/sys/netinet/in_kdtrace.c Wed Jul 1 18:10:37 2020 (r362850) @@ -31,16 +31,11 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_sctp.h" - #include #include #include SDT_PROVIDER_DEFINE(ip); -#ifdef SCTP -SDT_PROVIDER_DEFINE(sctp); -#endif SDT_PROVIDER_DEFINE(tcp); SDT_PROVIDER_DEFINE(udp); SDT_PROVIDER_DEFINE(udplite); @@ -60,30 +55,6 @@ SDT_PROBE_DEFINE6_XLATE(ip, , , send, "struct ifnet *", "ifinfo_t *", "struct ip *", "ipv4info_t *", "struct ip6_hdr *", "ipv6info_t *"); - -#ifdef SCTP -SDT_PROBE_DEFINE5_XLATE(sctp, , , receive, - "void *", "pktinfo_t *", - "struct sctp_tcb *", "csinfo_t *", - "struct mbuf *", "ipinfo_t *", - "struct sctp_tcb *", "sctpsinfo_t *" , - "struct sctphdr *", "sctpinfo_t *"); - -SDT_PROBE_DEFINE5_XLATE(sctp, , , send, - "void *", "pktinfo_t *", - "struct sctp_tcb *", "csinfo_t *", - "uint8_t *", "ipinfo_t *", - "struct sctp_tcb *", "sctpsinfo_t *" , - "struct sctphdr *", "sctpinfo_t *"); - -SDT_PROBE_DEFINE6_XLATE(sctp, , , state__change, - "void *", "void *", - "struct sctp_tcb *", "csinfo_t *", - "void *", "void *", - "struct sctp_tcb *", "sctpsinfo_t *", - "void *", "void *", - "int", "sctplsinfo_t *"); -#endif SDT_PROBE_DEFINE5_XLATE(tcp, , , accept__established, "void *", "pktinfo_t *", Modified: stable/12/sys/netinet/in_kdtrace.h ============================================================================== --- stable/12/sys/netinet/in_kdtrace.h Wed Jul 1 18:08:59 2020 (r362849) +++ stable/12/sys/netinet/in_kdtrace.h Wed Jul 1 18:10:37 2020 (r362850) @@ -48,31 +48,14 @@ SDT_PROBE5(tcp, , , probe, arg0, arg1, arg2, arg3, arg4) #define TCP_PROBE6(probe, arg0, arg1, arg2, arg3, arg4, arg5) \ SDT_PROBE6(tcp, , , probe, arg0, arg1, arg2, arg3, arg4, arg5) -#define SCTP_PROBE1(probe, arg0) \ - SDT_PROBE1(sctp, , , probe, arg0) -#define SCTP_PROBE2(probe, arg0, arg1) \ - SDT_PROBE2(sctp, , , probe, arg0, arg1) -#define SCTP_PROBE3(probe, arg0, arg1, arg2) \ - SDT_PROBE3(sctp, , , probe, arg0, arg1, arg2) -#define SCTP_PROBE4(probe, arg0, arg1, arg2, arg3) \ - SDT_PROBE4(sctp, , , probe, arg0, arg1, arg2, arg3) -#define SCTP_PROBE5(probe, arg0, arg1, arg2, arg3, arg4) \ - SDT_PROBE5(sctp, , , probe, arg0, arg1, arg2, arg3, arg4) -#define SCTP_PROBE6(probe, arg0, arg1, arg2, arg3, arg4, arg5) \ - SDT_PROBE6(sctp, , , probe, arg0, arg1, arg2, arg3, arg4, arg5) SDT_PROVIDER_DECLARE(ip); -SDT_PROVIDER_DECLARE(sctp); SDT_PROVIDER_DECLARE(tcp); SDT_PROVIDER_DECLARE(udp); SDT_PROVIDER_DECLARE(udplite); SDT_PROBE_DECLARE(ip, , , receive); SDT_PROBE_DECLARE(ip, , , send); - -SDT_PROBE_DECLARE(sctp, , , receive); -SDT_PROBE_DECLARE(sctp, , , send); -SDT_PROBE_DECLARE(sctp, , , state__change); SDT_PROBE_DECLARE(tcp, , , accept__established); SDT_PROBE_DECLARE(tcp, , , accept__refused); Modified: stable/12/sys/netinet/sctp_input.c ============================================================================== --- stable/12/sys/netinet/sctp_input.c Wed Jul 1 18:08:59 2020 (r362849) +++ stable/12/sys/netinet/sctp_input.c Wed Jul 1 18:10:37 2020 (r362850) @@ -49,10 +49,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #if defined(INET) || defined(INET6) #include #endif -#include #include Modified: stable/12/sys/netinet/sctp_kdtrace.c ============================================================================== --- stable/12/sys/netinet/sctp_kdtrace.c Wed Jul 1 18:08:59 2020 (r362849) +++ stable/12/sys/netinet/sctp_kdtrace.c Wed Jul 1 18:10:37 2020 (r362850) @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include -SDT_PROVIDER_DECLARE(sctp); +SDT_PROVIDER_DEFINE(sctp); /********************************************************/ /* Cwnd probe - tracks changes in the congestion window on a netp */ @@ -171,3 +171,29 @@ SDT_PROBE_DEFINE4(sctp, flightsize, assoc, val, * order. */ "int", /* The up/down amount */ "int"); /* The new value of the cwnd */ + +/* + * Standard Solaris-compatible probes. + */ + +SDT_PROBE_DEFINE5_XLATE(sctp,,, receive, + "void *", "pktinfo_t *", + "struct sctp_tcb *", "csinfo_t *", + "struct mbuf *", "ipinfo_t *", + "struct sctp_tcb *", "sctpsinfo_t *", + "struct sctphdr *", "sctpinfo_t *"); + +SDT_PROBE_DEFINE5_XLATE(sctp,,, send, + "void *", "pktinfo_t *", + "struct sctp_tcb *", "csinfo_t *", + "uint8_t *", "ipinfo_t *", + "struct sctp_tcb *", "sctpsinfo_t *", + "struct sctphdr *", "sctpinfo_t *"); + +SDT_PROBE_DEFINE6_XLATE(sctp,,, state__change, + "void *", "void *", + "struct sctp_tcb *", "csinfo_t *", + "void *", "void *", + "struct sctp_tcb *", "sctpsinfo_t *", + "void *", "void *", + "int", "sctplsinfo_t *"); Modified: stable/12/sys/netinet/sctp_kdtrace.h ============================================================================== --- stable/12/sys/netinet/sctp_kdtrace.h Wed Jul 1 18:08:59 2020 (r362849) +++ stable/12/sys/netinet/sctp_kdtrace.h Wed Jul 1 18:10:37 2020 (r362850) @@ -34,12 +34,25 @@ #include __FBSDID("$FreeBSD$"); -#ifndef _NETINET_SCTP_DTRACE_DECLARE_H_ -#define _NETINET_SCTP_DTRACE_DECLARE_H_ +#ifndef _NETINET_SCTP_KDTRACE_H_ +#define _NETINET_SCTP_KDTRACE_H_ #include #include +#define SCTP_PROBE1(probe, arg0) \ + SDT_PROBE1(sctp, , , probe, arg0) +#define SCTP_PROBE2(probe, arg0, arg1) \ + SDT_PROBE2(sctp, , , probe, arg0, arg1) +#define SCTP_PROBE3(probe, arg0, arg1, arg2) \ + SDT_PROBE3(sctp, , , probe, arg0, arg1, arg2) +#define SCTP_PROBE4(probe, arg0, arg1, arg2, arg3) \ + SDT_PROBE4(sctp, , , probe, arg0, arg1, arg2, arg3) +#define SCTP_PROBE5(probe, arg0, arg1, arg2, arg3, arg4) \ + SDT_PROBE5(sctp, , , probe, arg0, arg1, arg2, arg3, arg4) +#define SCTP_PROBE6(probe, arg0, arg1, arg2, arg3, arg4, arg5) \ + SDT_PROBE6(sctp, , , probe, arg0, arg1, arg2, arg3, arg4, arg5) + /* Declare the SCTP provider */ SDT_PROVIDER_DECLARE(sctp); @@ -63,19 +76,15 @@ SDT_PROBE_DECLARE(sctp, cwnd, net, pd); /* Rttvar probe declaration */ SDT_PROBE_DECLARE(sctp, cwnd, net, rttvar); SDT_PROBE_DECLARE(sctp, cwnd, net, rttstep); - /* One to track an associations rwnd */ SDT_PROBE_DECLARE(sctp, rwnd, assoc, val); - /* One to track a net's flight size */ SDT_PROBE_DECLARE(sctp, flightsize, net, val); - /* One to track an associations flight size */ SDT_PROBE_DECLARE(sctp, flightsize, assoc, val); - - - - - +/* Standard Solaris compatible probes */ +SDT_PROBE_DECLARE(sctp,,, receive); +SDT_PROBE_DECLARE(sctp,,, send); +SDT_PROBE_DECLARE(sctp,,, state__change); #endif Modified: stable/12/sys/netinet/sctp_output.c ============================================================================== --- stable/12/sys/netinet/sctp_output.c Wed Jul 1 18:08:59 2020 (r362849) +++ stable/12/sys/netinet/sctp_output.c Wed Jul 1 18:10:37 2020 (r362850) @@ -52,12 +52,12 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #if defined(INET) || defined(INET6) #include #endif #include #include -#include Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Wed Jul 1 18:08:59 2020 (r362849) +++ stable/12/sys/netinet/sctputil.c Wed Jul 1 18:10:37 2020 (r362850) @@ -51,12 +51,12 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #if defined(INET6) || defined(INET) #include #endif #include #include -#include #include #ifdef INET6 #include From owner-svn-src-all@freebsd.org Wed Jul 1 19:11:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1713E3598C9; Wed, 1 Jul 2020 19:11:03 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xrRV6pJtz4tGD; Wed, 1 Jul 2020 19:11:02 +0000 (UTC) (envelope-from kp@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 CCC1AE254; Wed, 1 Jul 2020 19:11:02 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 061JB2bo029669; Wed, 1 Jul 2020 19:11:02 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061JB29a029668; Wed, 1 Jul 2020 19:11:02 GMT (envelope-from kp@FreeBSD.org) Message-Id: <202007011911.061JB29a029668@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 1 Jul 2020 19:11:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362851 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 362851 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 19:11:03 -0000 Author: kp Date: Wed Jul 1 19:11:02 2020 New Revision: 362851 URL: https://svnweb.freebsd.org/changeset/base/362851 Log: riscv: Log missing registers in dump_regs() If we panic we dump the registers for debugging. This is very useful, but it missed several registers (ra, sp, gp and tp). Log these as well. Especially the return address value is extremely useful. Sponsored by: Axiado Modified: head/sys/riscv/riscv/trap.c Modified: head/sys/riscv/riscv/trap.c ============================================================================== --- head/sys/riscv/riscv/trap.c Wed Jul 1 18:10:37 2020 (r362850) +++ head/sys/riscv/riscv/trap.c Wed Jul 1 19:11:02 2020 (r362851) @@ -147,6 +147,11 @@ dump_regs(struct trapframe *frame) for (i = 0; i < n; i++) printf("a[%d] == 0x%016lx\n", i, frame->tf_a[i]); + printf("ra == 0x%016lx\n", frame->tf_ra); + printf("sp == 0x%016lx\n", frame->tf_sp); + printf("gp == 0x%016lx\n", frame->tf_gp); + printf("tp == 0x%016lx\n", frame->tf_tp); + printf("sepc == 0x%016lx\n", frame->tf_sepc); printf("sstatus == 0x%016lx\n", frame->tf_sstatus); } From owner-svn-src-all@freebsd.org Wed Jul 1 19:12:48 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 11E0A359BB8; Wed, 1 Jul 2020 19:12:48 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xrTW6j7kz4tYD; Wed, 1 Jul 2020 19:12:47 +0000 (UTC) (envelope-from kp@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 C9727DFEE; Wed, 1 Jul 2020 19:12:47 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 061JCltg032864; Wed, 1 Jul 2020 19:12:47 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061JCl7g032863; Wed, 1 Jul 2020 19:12:47 GMT (envelope-from kp@FreeBSD.org) Message-Id: <202007011912.061JCl7g032863@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 1 Jul 2020 19:12:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362852 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 362852 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 19:12:48 -0000 Author: kp Date: Wed Jul 1 19:12:47 2020 New Revision: 362852 URL: https://svnweb.freebsd.org/changeset/base/362852 Log: riscv locore.S: load constant prior to loop A very minor micro-optimization; t0 is not clobbered between the loop top and bottom and there appear to be no other branches to this label. Submitted by: Nathaniel Filardo Reviewed by: mhorne Differential Revision: https://reviews.freebsd.org/D25524 Modified: head/sys/riscv/riscv/locore.S Modified: head/sys/riscv/riscv/locore.S ============================================================================== --- head/sys/riscv/riscv/locore.S Wed Jul 1 19:11:02 2020 (r362851) +++ head/sys/riscv/riscv/locore.S Wed Jul 1 19:12:47 2020 (r362852) @@ -139,8 +139,8 @@ pagetables: li t2, 512 /* Build 512 entries */ add t3, t4, t2 li t5, 0 -1: li t0, (PTE_KERN | PTE_X) +1: slli t2, t4, PTE_PPN1_S /* << PTE_PPN1_S */ or t5, t0, t2 sd t5, (s1) /* Store PTE entry to position */ From owner-svn-src-all@freebsd.org Wed Jul 1 19:15:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EA359359F12; Wed, 1 Jul 2020 19:15:43 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xrXv5yFYz4tfH; Wed, 1 Jul 2020 19:15:43 +0000 (UTC) (envelope-from kp@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 AFAC8E26D; Wed, 1 Jul 2020 19:15:43 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 061JFhCG033041; Wed, 1 Jul 2020 19:15:43 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061JFhhu033038; Wed, 1 Jul 2020 19:15:43 GMT (envelope-from kp@FreeBSD.org) Message-Id: <202007011915.061JFhhu033038@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Wed, 1 Jul 2020 19:15:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362853 - in head/sys/riscv: include riscv X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: in head/sys/riscv: include riscv X-SVN-Commit-Revision: 362853 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 19:15:44 -0000 Author: kp Date: Wed Jul 1 19:15:43 2020 New Revision: 362853 URL: https://svnweb.freebsd.org/changeset/base/362853 Log: riscv pmap: zero reserved pte bits in ppn The top 10 bits of a pte are reserved by specification[1] and are not part of the PPN. [1] 'Volume II: RISC-V Privileged Architectures V20190608-Priv-MSU-Ratified', '4.4.1 Addressing and Memory Protection', page 72: "The PTE format for Sv39 is shown in Figure 4.18. ... Bits 63–54 are reserved for future use and must be zeroed by software for forward compatibility." Submitted by: Nathaniel Filardo Reviewed by: kp, mhorne Differential Revision: https://reviews.freebsd.org/D25523 Modified: head/sys/riscv/include/pte.h head/sys/riscv/riscv/pmap.c Modified: head/sys/riscv/include/pte.h ============================================================================== --- head/sys/riscv/include/pte.h Wed Jul 1 19:12:47 2020 (r362852) +++ head/sys/riscv/include/pte.h Wed Jul 1 19:15:43 2020 (r362853) @@ -83,6 +83,9 @@ typedef uint64_t pn_t; /* page number */ #define PTE_PROMOTE (PTE_V | PTE_RWX | PTE_D | PTE_A | PTE_G | PTE_U | \ PTE_SW_MANAGED | PTE_SW_WIRED) +/* Bits 63 - 54 are reserved for future use. */ +#define PTE_HI_MASK 0xFFC0000000000000ULL + #define PTE_PPN0_S 10 #define PTE_PPN1_S 19 #define PTE_PPN2_S 28 Modified: head/sys/riscv/riscv/pmap.c ============================================================================== --- head/sys/riscv/riscv/pmap.c Wed Jul 1 19:12:47 2020 (r362852) +++ head/sys/riscv/riscv/pmap.c Wed Jul 1 19:15:43 2020 (r362853) @@ -339,7 +339,8 @@ pagezero(void *p) #define pmap_l2_index(va) (((va) >> L2_SHIFT) & Ln_ADDR_MASK) #define pmap_l3_index(va) (((va) >> L3_SHIFT) & Ln_ADDR_MASK) -#define PTE_TO_PHYS(pte) ((pte >> PTE_PPN0_S) * PAGE_SIZE) +#define PTE_TO_PHYS(pte) \ + ((((pte) & ~PTE_HI_MASK) >> PTE_PPN0_S) * PAGE_SIZE) static __inline pd_entry_t * pmap_l1(pmap_t pmap, vm_offset_t va) From owner-svn-src-all@freebsd.org Wed Jul 1 19:23:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 92C4235A2AD; Wed, 1 Jul 2020 19:23:16 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xrjc3Q3nz4vQG; Wed, 1 Jul 2020 19:23:16 +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 59B25E4E0; Wed, 1 Jul 2020 19:23:16 +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 061JNGVo039339; Wed, 1 Jul 2020 19:23:16 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061JNGRv039337; Wed, 1 Jul 2020 19:23:16 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007011923.061JNGRv039337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 1 Jul 2020 19:23:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362854 - stable/12/sys/netinet/cc X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet/cc X-SVN-Commit-Revision: 362854 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 19:23:16 -0000 Author: tuexen Date: Wed Jul 1 19:23:15 2020 New Revision: 362854 URL: https://svnweb.freebsd.org/changeset/base/362854 Log: MFC r354772: Implement a TCP CUBIC-specific after idle reaction. This patch addresses a very common case of frequent application stalls, where TCP runs idle and looses the state of the network. Submitted by: rscheff Reviewed by: Cheng Cui Differential Revision: https://reviews.freebsd.org/D18954 Modified: stable/12/sys/netinet/cc/cc_cubic.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/cc/cc_cubic.c ============================================================================== --- stable/12/sys/netinet/cc/cc_cubic.c Wed Jul 1 19:15:43 2020 (r362853) +++ stable/12/sys/netinet/cc/cc_cubic.c Wed Jul 1 19:23:15 2020 (r362854) @@ -78,6 +78,7 @@ static int cubic_mod_init(void); static void cubic_post_recovery(struct cc_var *ccv); static void cubic_record_rtt(struct cc_var *ccv); static void cubic_ssthresh_update(struct cc_var *ccv); +static void cubic_after_idle(struct cc_var *ccv); struct cubic { /* Cubic K in fixed point form with CUBIC_SHIFT worth of precision. */ @@ -115,6 +116,7 @@ struct cc_algo cubic_cc_algo = { .conn_init = cubic_conn_init, .mod_init = cubic_mod_init, .post_recovery = cubic_post_recovery, + .after_idle = cubic_after_idle, }; static void @@ -206,7 +208,24 @@ cubic_ack_received(struct cc_var *ccv, uint16_t type) } } +/* + * This is a Cubic specific implementation of after_idle. + * - Reset cwnd by calling New Reno implementation of after_idle. + * - Reset t_last_cong. + */ static void +cubic_after_idle(struct cc_var *ccv) +{ + struct cubic *cubic_data; + + cubic_data = ccv->cc_data; + + newreno_cc_algo.after_idle(ccv); + cubic_data->t_last_cong = ticks; +} + + +static void cubic_cb_destroy(struct cc_var *ccv) { free(ccv->cc_data, M_CUBIC); @@ -303,9 +322,6 @@ cubic_conn_init(struct cc_var *ccv) static int cubic_mod_init(void) { - - cubic_cc_algo.after_idle = newreno_cc_algo.after_idle; - return (0); } From owner-svn-src-all@freebsd.org Wed Jul 1 19:41:11 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8169135A73E; Wed, 1 Jul 2020 19:41:11 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xs6H2qsnz3Rv1; Wed, 1 Jul 2020 19:41:11 +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 4493DE3D8; Wed, 1 Jul 2020 19:41:11 +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 061JfB30046712; Wed, 1 Jul 2020 19:41:11 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061JfBPF046711; Wed, 1 Jul 2020 19:41:11 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007011941.061JfBPF046711@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 1 Jul 2020 19:41:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362855 - stable/12/sys/net X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/net X-SVN-Commit-Revision: 362855 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 19:41:11 -0000 Author: tuexen Date: Wed Jul 1 19:41:10 2020 New Revision: 362855 URL: https://svnweb.freebsd.org/changeset/base/362855 Log: MFC r353482: Add missing include which breaks builds without VIMAGE. Modified: stable/12/sys/net/route.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/net/route.c ============================================================================== --- stable/12/sys/net/route.c Wed Jul 1 19:23:15 2020 (r362854) +++ stable/12/sys/net/route.c Wed Jul 1 19:41:10 2020 (r362855) @@ -52,6 +52,7 @@ #include #include #include +#include #include #include #include From owner-svn-src-all@freebsd.org Wed Jul 1 19:42:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7452435AA30; Wed, 1 Jul 2020 19:42:24 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xs7h2W6zz3RqW; Wed, 1 Jul 2020 19:42:24 +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 3AB31EB0B; Wed, 1 Jul 2020 19:42:24 +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 061JgOgD051414; Wed, 1 Jul 2020 19:42:24 GMT (envelope-from vmaffione@FreeBSD.org) Received: (from vmaffione@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061JgO3p051413; Wed, 1 Jul 2020 19:42:24 GMT (envelope-from vmaffione@FreeBSD.org) Message-Id: <202007011942.061JgO3p051413@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vmaffione set sender to vmaffione@FreeBSD.org using -f From: Vincenzo Maffione Date: Wed, 1 Jul 2020 19:42:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362856 - stable/12/sys/dev/virtio/network X-SVN-Group: stable-12 X-SVN-Commit-Author: vmaffione X-SVN-Commit-Paths: stable/12/sys/dev/virtio/network X-SVN-Commit-Revision: 362856 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 19:42:24 -0000 Author: vmaffione Date: Wed Jul 1 19:42:23 2020 New Revision: 362856 URL: https://svnweb.freebsd.org/changeset/base/362856 Log: MFC r362204 if_vtnet: let vtnet_rx_vq_intr() and vtnet_rxq_tq_intr() share code Since the two functions are similar, introduce a common function (vtnet_rx_vq_process()) to share common code. This also improves locking, by ensuring vrxs_rescheduled is accessed under the RXQ lock, and taskqueue_enqueue() is not called under the lock (therefore avoiding a spurious duplicate lock warning). Reported by: jrtc27 Modified: stable/12/sys/dev/virtio/network/if_vtnet.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- stable/12/sys/dev/virtio/network/if_vtnet.c Wed Jul 1 19:41:10 2020 (r362855) +++ stable/12/sys/dev/virtio/network/if_vtnet.c Wed Jul 1 19:42:23 2020 (r362856) @@ -127,6 +127,7 @@ static int vtnet_rxq_merged_eof(struct vtnet_rxq *, st static void vtnet_rxq_input(struct vtnet_rxq *, struct mbuf *, struct virtio_net_hdr *); static int vtnet_rxq_eof(struct vtnet_rxq *); +static void vtnet_rx_vq_process(struct vtnet_rxq *rxq, int tries); static void vtnet_rx_vq_intr(void *); static void vtnet_rxq_tq_intr(void *, int); @@ -1847,20 +1848,17 @@ vtnet_rxq_eof(struct vtnet_rxq *rxq) } static void -vtnet_rx_vq_intr(void *xrxq) +vtnet_rx_vq_process(struct vtnet_rxq *rxq, int tries) { struct vtnet_softc *sc; - struct vtnet_rxq *rxq; struct ifnet *ifp; - int tries, more; + int more; #ifdef DEV_NETMAP int nmirq; #endif /* DEV_NETMAP */ - rxq = xrxq; sc = rxq->vtnrx_sc; ifp = sc->vtnet_ifp; - tries = 0; if (__predict_false(rxq->vtnrx_id >= sc->vtnet_act_vq_pairs)) { /* @@ -1908,58 +1906,32 @@ again: * This is an occasional condition or race (when !more), * so retry a few times before scheduling the taskqueue. */ - if (tries++ < VTNET_INTR_DISABLE_RETRIES) + if (tries-- > 0) goto again; - VTNET_RXQ_UNLOCK(rxq); rxq->vtnrx_stats.vrxs_rescheduled++; + VTNET_RXQ_UNLOCK(rxq); taskqueue_enqueue(rxq->vtnrx_tq, &rxq->vtnrx_intrtask); } else VTNET_RXQ_UNLOCK(rxq); } static void -vtnet_rxq_tq_intr(void *xrxq, int pending) +vtnet_rx_vq_intr(void *xrxq) { - struct vtnet_softc *sc; struct vtnet_rxq *rxq; - struct ifnet *ifp; - int more; -#ifdef DEV_NETMAP - int nmirq; -#endif /* DEV_NETMAP */ rxq = xrxq; - sc = rxq->vtnrx_sc; - ifp = sc->vtnet_ifp; + vtnet_rx_vq_process(rxq, VTNET_INTR_DISABLE_RETRIES); +} - VTNET_RXQ_LOCK(rxq); +static void +vtnet_rxq_tq_intr(void *xrxq, int pending) +{ + struct vtnet_rxq *rxq; -#ifdef DEV_NETMAP - nmirq = netmap_rx_irq(ifp, rxq->vtnrx_id, &more); - if (nmirq != NM_IRQ_PASS) { - VTNET_RXQ_UNLOCK(rxq); - if (nmirq == NM_IRQ_RESCHED) { - taskqueue_enqueue(rxq->vtnrx_tq, &rxq->vtnrx_intrtask); - } - return; - } -#endif /* DEV_NETMAP */ - - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { - VTNET_RXQ_UNLOCK(rxq); - return; - } - - more = vtnet_rxq_eof(rxq); - if (more || vtnet_rxq_enable_intr(rxq) != 0) { - if (!more) - vtnet_rxq_disable_intr(rxq); - rxq->vtnrx_stats.vrxs_rescheduled++; - taskqueue_enqueue(rxq->vtnrx_tq, &rxq->vtnrx_intrtask); - } - - VTNET_RXQ_UNLOCK(rxq); + rxq = xrxq; + vtnet_rx_vq_process(rxq, 0); } static int From owner-svn-src-all@freebsd.org Wed Jul 1 19:50:03 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B8E1F35AB86; Wed, 1 Jul 2020 19:50:03 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xsJW4Ywfz3SB9; Wed, 1 Jul 2020 19:50:03 +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 7C2E2E9FB; Wed, 1 Jul 2020 19:50:03 +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 061Jo3Fl051887; Wed, 1 Jul 2020 19:50:03 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061Jo3fQ051886; Wed, 1 Jul 2020 19:50:03 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007011950.061Jo3fQ051886@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 1 Jul 2020 19:50:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362857 - stable/12/sys/netinet/cc X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet/cc X-SVN-Commit-Revision: 362857 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 19:50:03 -0000 Author: tuexen Date: Wed Jul 1 19:50:03 2020 New Revision: 362857 URL: https://svnweb.freebsd.org/changeset/base/362857 Log: MFC r354773: Improve TCP CUBIC specific after idle reaction. The adjustments are inspired by the Linux stack, which has had a functionally equivalent implementation for more than a decade now. MFC r356224: Add curly braces missed in above change Submitted by: rscheff Reviewed by: Cheng Cui Differential Revision: https://reviews.freebsd.org/D18982 Modified: stable/12/sys/netinet/cc/cc_cubic.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/cc/cc_cubic.c ============================================================================== --- stable/12/sys/netinet/cc/cc_cubic.c Wed Jul 1 19:42:23 2020 (r362856) +++ stable/12/sys/netinet/cc/cc_cubic.c Wed Jul 1 19:50:03 2020 (r362857) @@ -199,8 +199,11 @@ cubic_ack_received(struct cc_var *ccv, uint16_t type) * max_cwnd. */ if (((cubic_data->flags & CUBICFLAG_CONG_EVENT) == 0) && - cubic_data->max_cwnd < CCV(ccv, snd_cwnd)) + cubic_data->max_cwnd < CCV(ccv, snd_cwnd)) { cubic_data->max_cwnd = CCV(ccv, snd_cwnd); + cubic_data->K = cubic_k(cubic_data->max_cwnd / + CCV(ccv, t_maxseg)); + } } } else if (type == CC_ACK && !IN_RECOVERY(CCV(ccv, t_flags)) && !(ccv->flags & CCF_CWND_LIMITED)) { @@ -219,6 +222,9 @@ cubic_after_idle(struct cc_var *ccv) struct cubic *cubic_data; cubic_data = ccv->cc_data; + + cubic_data->max_cwnd = ulmax(cubic_data->max_cwnd, CCV(ccv, snd_cwnd)); + cubic_data->K = cubic_k(cubic_data->max_cwnd / CCV(ccv, t_maxseg)); newreno_cc_algo.after_idle(ccv); cubic_data->t_last_cong = ticks; From owner-svn-src-all@freebsd.org Wed Jul 1 20:09:35 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 58C0435AE9E; Wed, 1 Jul 2020 20:09:35 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xsl31gcnz3TJD; Wed, 1 Jul 2020 20:09:35 +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 1CA70E8D9; Wed, 1 Jul 2020 20:09:35 +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 061K9YA3064286; Wed, 1 Jul 2020 20:09:34 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061K9YGs064284; Wed, 1 Jul 2020 20:09:34 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007012009.061K9YGs064284@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 1 Jul 2020 20:09:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362858 - stable/12/sys/netinet/cc X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet/cc X-SVN-Commit-Revision: 362858 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 20:09:35 -0000 Author: tuexen Date: Wed Jul 1 20:09:34 2020 New Revision: 362858 URL: https://svnweb.freebsd.org/changeset/base/362858 Log: MFC r354774: Add boundary and overflow checks to the formulas used in the TCP CUBIC congestion control module. Submitted by: rscheff Reviewed by: rgrimes Differential Revision: https://reviews.freebsd.org/D19118 Modified: stable/12/sys/netinet/cc/cc_cubic.c stable/12/sys/netinet/cc/cc_cubic.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/cc/cc_cubic.c ============================================================================== --- stable/12/sys/netinet/cc/cc_cubic.c Wed Jul 1 19:50:03 2020 (r362857) +++ stable/12/sys/netinet/cc/cc_cubic.c Wed Jul 1 20:09:34 2020 (r362858) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -144,7 +145,14 @@ cubic_ack_received(struct cc_var *ccv, uint16_t type) cubic_data->flags |= CUBICFLAG_IN_SLOWSTART; newreno_cc_algo.ack_received(ccv, type); } else { - ticks_since_cong = ticks - cubic_data->t_last_cong; + if ((ticks_since_cong = + ticks - cubic_data->t_last_cong) < 0) { + /* + * dragging t_last_cong along + */ + ticks_since_cong = INT_MAX; + cubic_data->t_last_cong = ticks - INT_MAX; + } if (cubic_data->flags & (CUBICFLAG_IN_SLOWSTART | CUBICFLAG_IN_APPLIMIT)) { @@ -170,12 +178,14 @@ cubic_ack_received(struct cc_var *ccv, uint16_t type) ccv->flags &= ~CCF_ABC_SENTAWND; - if (w_cubic_next < w_tf) + if (w_cubic_next < w_tf) { /* * TCP-friendly region, follow tf * cwnd growth. */ - CCV(ccv, snd_cwnd) = w_tf; + if (CCV(ccv, snd_cwnd) < w_tf) + CCV(ccv, snd_cwnd) = ulmin(w_tf, INT_MAX); + } else if (CCV(ccv, snd_cwnd) < w_cubic_next) { /* @@ -183,12 +193,14 @@ cubic_ack_received(struct cc_var *ccv, uint16_t type) * cwnd growth. */ if (V_tcp_do_rfc3465) - CCV(ccv, snd_cwnd) = w_cubic_next; + CCV(ccv, snd_cwnd) = ulmin(w_cubic_next, + INT_MAX); else - CCV(ccv, snd_cwnd) += ((w_cubic_next - + CCV(ccv, snd_cwnd) += ulmax(1, + ((ulmin(w_cubic_next, INT_MAX) - CCV(ccv, snd_cwnd)) * CCV(ccv, t_maxseg)) / - CCV(ccv, snd_cwnd); + CCV(ccv, snd_cwnd)); } /* Modified: stable/12/sys/netinet/cc/cc_cubic.h ============================================================================== --- stable/12/sys/netinet/cc/cc_cubic.h Wed Jul 1 19:50:03 2020 (r362857) +++ stable/12/sys/netinet/cc/cc_cubic.h Wed Jul 1 20:09:34 2020 (r362858) @@ -41,6 +41,8 @@ #ifndef _NETINET_CC_CUBIC_H_ #define _NETINET_CC_CUBIC_H_ +#include + /* Number of bits of precision for fixed point math calcs. */ #define CUBIC_SHIFT 8 @@ -70,6 +72,12 @@ /* Don't trust s_rtt until this many rtt samples have been taken. */ #define CUBIC_MIN_RTT_SAMPLES 8 +/* + * (2^21)^3 is long max. Dividing (2^63) by Cubic_C_factor + * and taking cube-root yields 448845 as the effective useful limit + */ +#define CUBED_ROOT_MAX_ULONG 448845 + /* Userland only bits. */ #ifndef _KERNEL @@ -172,8 +180,13 @@ cubic_cwnd(int ticks_since_cong, unsigned long wmax, u /* K is in fixed point form with CUBIC_SHIFT worth of precision. */ /* t - K, with CUBIC_SHIFT worth of precision. */ - cwnd = ((int64_t)(ticks_since_cong << CUBIC_SHIFT) - (K * hz)) / hz; + cwnd = (((int64_t)ticks_since_cong << CUBIC_SHIFT) - (K * hz)) / hz; + if (cwnd > CUBED_ROOT_MAX_ULONG) + return INT_MAX; + if (cwnd < -CUBED_ROOT_MAX_ULONG) + return 0; + /* (t - K)^3, with CUBIC_SHIFT^3 worth of precision. */ cwnd *= (cwnd * cwnd); @@ -183,9 +196,13 @@ cubic_cwnd(int ticks_since_cong, unsigned long wmax, u * CUBIC_SHIFT included in the value. 3 from the cubing of cwnd above, * and an extra from multiplying through by CUBIC_C_FACTOR. */ - cwnd = ((cwnd * CUBIC_C_FACTOR * smss) >> CUBIC_SHIFT_4) + wmax; - return ((unsigned long)cwnd); + cwnd = ((cwnd * CUBIC_C_FACTOR) >> CUBIC_SHIFT_4) * smss + wmax; + + /* + * for negative cwnd, limiting to zero as lower bound + */ + return (lmax(0,cwnd)); } /* @@ -223,8 +240,10 @@ tf_cwnd(int ticks_since_cong, int rtt_ticks, unsigned { /* Equation 4 of I-D. */ - return (((wmax * CUBIC_BETA) + (((THREE_X_PT3 * ticks_since_cong * - smss) << CUBIC_SHIFT) / TWO_SUB_PT3 / rtt_ticks)) >> CUBIC_SHIFT); + return (((wmax * CUBIC_BETA) + + (((THREE_X_PT3 * (unsigned long)ticks_since_cong * + (unsigned long)smss) << CUBIC_SHIFT) / (TWO_SUB_PT3 * rtt_ticks))) + >> CUBIC_SHIFT); } #endif /* _NETINET_CC_CUBIC_H_ */ From owner-svn-src-all@freebsd.org Wed Jul 1 20:26:36 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 36FF135B271; Wed, 1 Jul 2020 20:26:36 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xt6h0hlRz3V5R; Wed, 1 Jul 2020 20:26:36 +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 F0641F213; Wed, 1 Jul 2020 20:26:35 +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 061KQZax076408; Wed, 1 Jul 2020 20:26:35 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061KQZWT076407; Wed, 1 Jul 2020 20:26:35 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007012026.061KQZWT076407@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 1 Jul 2020 20:26:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362859 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 362859 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 20:26:36 -0000 Author: tuexen Date: Wed Jul 1 20:26:35 2020 New Revision: 362859 URL: https://svnweb.freebsd.org/changeset/base/362859 Log: MFC r355135: Plug two mbuf leaks during INIT-ACK handling. One leak happens when there is not enough memory to allocate the the resources for streams. The other leak happens if the are unknown parameters in the received INIT-ACK chunk which require reporting and the INIT-ACK requires sending an ABORT due to illegal parameter combinations. Hopefully this fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19083 Modified: stable/12/sys/netinet/sctp_input.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_input.c ============================================================================== --- stable/12/sys/netinet/sctp_input.c Wed Jul 1 20:09:34 2020 (r362858) +++ stable/12/sys/netinet/sctp_input.c Wed Jul 1 20:26:35 2020 (r362859) @@ -495,6 +495,9 @@ sctp_process_init_ack(struct mbuf *m, int iphlen, int /* process the peer's parameters in the INIT-ACK */ retval = sctp_process_init((struct sctp_init_chunk *)cp, stcb); if (retval < 0) { + if (op_err != NULL) { + sctp_m_freem(op_err); + } return (retval); } initack_limit = offset + ntohs(cp->ch.chunk_length); @@ -502,6 +505,9 @@ sctp_process_init_ack(struct mbuf *m, int iphlen, int if ((retval = sctp_load_addresses_from_init(stcb, m, (offset + sizeof(struct sctp_init_chunk)), initack_limit, src, dst, NULL, stcb->asoc.port))) { + if (op_err != NULL) { + sctp_m_freem(op_err); + } op_err = sctp_generate_cause(SCTP_BASE_SYSCTL(sctp_diag_info_code), "Problem with address parameters"); SCTPDBG(SCTP_DEBUG_INPUT1, From owner-svn-src-all@freebsd.org Wed Jul 1 20:32:51 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E738935B4A8; Wed, 1 Jul 2020 20:32:51 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xtFv4mHpz3VZ1; Wed, 1 Jul 2020 20:32:51 +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 6ED17F38F; Wed, 1 Jul 2020 20:32:51 +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 061KWpJI082248; Wed, 1 Jul 2020 20:32:51 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061KWpPD082247; Wed, 1 Jul 2020 20:32:51 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007012032.061KWpPD082247@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 1 Jul 2020 20:32:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362860 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 362860 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 20:32:52 -0000 Author: tuexen Date: Wed Jul 1 20:32:51 2020 New Revision: 362860 URL: https://svnweb.freebsd.org/changeset/base/362860 Log: MFC r355172: Really ignore the SCTP association identifier on 1-to-1 style sockets as requiresd by the socket API specification. Thanks to Inaki Baz Castillo, who found this bug running the userland stack with valgrind and reported the issue in https://github.com/sctplab/usrsctp/issues/408 Modified: stable/12/sys/netinet/sctp_usrreq.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/12/sys/netinet/sctp_usrreq.c Wed Jul 1 20:26:35 2020 (r362859) +++ stable/12/sys/netinet/sctp_usrreq.c Wed Jul 1 20:32:51 2020 (r362860) @@ -1675,7 +1675,8 @@ flags_out: } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (av->assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (av->assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_RLOCK(inp); if (inp->idata_supported) { av->assoc_value = 1; @@ -1705,7 +1706,8 @@ flags_out: } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (av->assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (av->assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_RLOCK(inp); av->assoc_value = inp->sctp_cmt_on_off; SCTP_INP_RUNLOCK(inp); @@ -1731,7 +1733,8 @@ flags_out: } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (av->assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (av->assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_RLOCK(inp); av->assoc_value = inp->sctp_ep.sctp_default_cc_module; SCTP_INP_RUNLOCK(inp); @@ -1776,7 +1779,8 @@ flags_out: } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (av->assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (av->assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_RLOCK(inp); av->assoc_value = inp->sctp_ep.sctp_default_ss_module; SCTP_INP_RUNLOCK(inp); @@ -1914,7 +1918,8 @@ flags_out: } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (av->assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (av->assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_RLOCK(inp); av->assoc_value = inp->sctp_context; SCTP_INP_RUNLOCK(inp); @@ -1990,7 +1995,8 @@ flags_out: } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (sack->sack_assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (sack->sack_assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_RLOCK(inp); sack->sack_delay = TICKS_TO_MSEC(inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_RECV]); sack->sack_freq = inp->sctp_ep.sctp_sack_freq; @@ -2037,7 +2043,8 @@ flags_out: } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (av->assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (av->assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_RLOCK(inp); av->assoc_value = inp->sctp_ep.max_burst; SCTP_INP_RUNLOCK(inp); @@ -2065,7 +2072,8 @@ flags_out: } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (av->assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (av->assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_RLOCK(inp); if (inp->sctp_flags & SCTP_PCB_FLAGS_BOUND_V6) { ovh = SCTP_MED_OVERHEAD; @@ -2466,7 +2474,8 @@ flags_out: } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (paddrp->spp_assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (paddrp->spp_assoc_id == SCTP_FUTURE_ASSOC))) { /* Use endpoint defaults */ SCTP_INP_RLOCK(inp); paddrp->spp_pathmaxrxt = inp->sctp_ep.def_net_failure; @@ -2694,7 +2703,8 @@ flags_out: } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (srto->srto_assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (srto->srto_assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_RLOCK(inp); srto->srto_initial = inp->sctp_ep.initial_rto; srto->srto_max = inp->sctp_ep.sctp_maxrto; @@ -2750,7 +2760,8 @@ flags_out: } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (sasoc->sasoc_assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (sasoc->sasoc_assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_RLOCK(inp); sasoc->sasoc_cookie_life = TICKS_TO_MSEC(inp->sctp_ep.def_cookie_life); sasoc->sasoc_asocmaxrxt = inp->sctp_ep.max_send_times; @@ -2781,7 +2792,8 @@ flags_out: } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (s_info->sinfo_assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (s_info->sinfo_assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_RLOCK(inp); memcpy(s_info, &inp->def_send, sizeof(inp->def_send)); SCTP_INP_RUNLOCK(inp); @@ -2901,7 +2913,8 @@ flags_out: } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (scact->scact_assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (scact->scact_assoc_id == SCTP_FUTURE_ASSOC))) { /* get the endpoint active key */ SCTP_INP_RLOCK(inp); scact->scact_keynumber = inp->sctp_ep.default_keyid; @@ -2943,7 +2956,8 @@ flags_out: } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (sac->gauth_assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (sac->gauth_assoc_id == SCTP_FUTURE_ASSOC))) { /* get off the endpoint */ SCTP_INP_RLOCK(inp); chklist = inp->sctp_ep.local_auth_chunks; @@ -3061,7 +3075,8 @@ flags_out: } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (event->se_assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (event->se_assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_RLOCK(inp); event->se_on = sctp_is_feature_on(inp, event_type); SCTP_INP_RUNLOCK(inp); @@ -3134,7 +3149,8 @@ flags_out: } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (info->snd_assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (info->snd_assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_RLOCK(inp); info->snd_sid = inp->def_send.sinfo_stream; info->snd_flags = inp->def_send.sinfo_flags; @@ -3166,7 +3182,8 @@ flags_out: } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (info->pr_assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (info->pr_assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_RLOCK(inp); info->pr_policy = PR_SCTP_POLICY(inp->def_send.sinfo_flags); info->pr_value = inp->def_send.sinfo_timetolive; @@ -3277,7 +3294,8 @@ flags_out: } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (thlds->spt_assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (thlds->spt_assoc_id == SCTP_FUTURE_ASSOC))) { /* Use endpoint defaults */ SCTP_INP_RLOCK(inp); thlds->spt_pathmaxrxt = inp->sctp_ep.def_net_failure; @@ -3385,7 +3403,8 @@ flags_out: } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (encaps->sue_assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (encaps->sue_assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_RLOCK(inp); encaps->sue_port = inp->sctp_ep.port; SCTP_INP_RUNLOCK(inp); @@ -3412,7 +3431,8 @@ flags_out: } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (av->assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (av->assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_RLOCK(inp); av->assoc_value = inp->ecn_supported; SCTP_INP_RUNLOCK(inp); @@ -3439,7 +3459,8 @@ flags_out: } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (av->assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (av->assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_RLOCK(inp); av->assoc_value = inp->prsctp_supported; SCTP_INP_RUNLOCK(inp); @@ -3466,7 +3487,8 @@ flags_out: } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (av->assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (av->assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_RLOCK(inp); av->assoc_value = inp->auth_supported; SCTP_INP_RUNLOCK(inp); @@ -3493,7 +3515,8 @@ flags_out: } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (av->assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (av->assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_RLOCK(inp); av->assoc_value = inp->asconf_supported; SCTP_INP_RUNLOCK(inp); @@ -3520,7 +3543,8 @@ flags_out: } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (av->assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (av->assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_RLOCK(inp); av->assoc_value = inp->reconfig_supported; SCTP_INP_RUNLOCK(inp); @@ -3547,7 +3571,8 @@ flags_out: } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (av->assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (av->assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_RLOCK(inp); av->assoc_value = inp->nrsack_supported; SCTP_INP_RUNLOCK(inp); @@ -3574,7 +3599,8 @@ flags_out: } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (av->assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (av->assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_RLOCK(inp); av->assoc_value = inp->pktdrop_supported; SCTP_INP_RUNLOCK(inp); @@ -3601,7 +3627,8 @@ flags_out: } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (av->assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (av->assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_RLOCK(inp); av->assoc_value = (uint32_t)inp->local_strreset_support; SCTP_INP_RUNLOCK(inp); @@ -3703,7 +3730,8 @@ flags_out: } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (av->assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (av->assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_RLOCK(inp); av->assoc_value = inp->max_cwnd; SCTP_INP_RUNLOCK(inp); @@ -3892,7 +3920,8 @@ sctp_setopt(struct socket *so, int optname, void *optv } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (av->assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (av->assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_WLOCK(inp); if (av->assoc_value == 0) { inp->idata_supported = 0; @@ -3936,14 +3965,16 @@ sctp_setopt(struct socket *so, int optname, void *optv } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (av->assoc_id == SCTP_FUTURE_ASSOC) || - (av->assoc_id == SCTP_ALL_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + ((av->assoc_id == SCTP_FUTURE_ASSOC) || + (av->assoc_id == SCTP_ALL_ASSOC)))) { SCTP_INP_WLOCK(inp); inp->sctp_cmt_on_off = av->assoc_value; SCTP_INP_WUNLOCK(inp); } - if ((av->assoc_id == SCTP_CURRENT_ASSOC) || - (av->assoc_id == SCTP_ALL_ASSOC)) { + if ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + ((av->assoc_id == SCTP_CURRENT_ASSOC) || + (av->assoc_id == SCTP_ALL_ASSOC))) { SCTP_INP_RLOCK(inp); LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) { SCTP_TCB_LOCK(stcb); @@ -3985,14 +4016,16 @@ sctp_setopt(struct socket *so, int optname, void *optv } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (av->assoc_id == SCTP_FUTURE_ASSOC) || - (av->assoc_id == SCTP_ALL_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + ((av->assoc_id == SCTP_FUTURE_ASSOC) || + (av->assoc_id == SCTP_ALL_ASSOC)))) { SCTP_INP_WLOCK(inp); inp->sctp_ep.sctp_default_cc_module = av->assoc_value; SCTP_INP_WUNLOCK(inp); } - if ((av->assoc_id == SCTP_CURRENT_ASSOC) || - (av->assoc_id == SCTP_ALL_ASSOC)) { + if ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + ((av->assoc_id == SCTP_CURRENT_ASSOC) || + (av->assoc_id == SCTP_ALL_ASSOC))) { SCTP_INP_RLOCK(inp); LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) { SCTP_TCB_LOCK(stcb); @@ -4017,7 +4050,8 @@ sctp_setopt(struct socket *so, int optname, void *optv SCTP_CHECK_AND_CAST(cc_opt, optval, struct sctp_cc_option, optsize); SCTP_FIND_STCB(inp, stcb, cc_opt->aid_value.assoc_id); if (stcb == NULL) { - if (cc_opt->aid_value.assoc_id == SCTP_CURRENT_ASSOC) { + if ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (cc_opt->aid_value.assoc_id == SCTP_CURRENT_ASSOC)) { SCTP_INP_RLOCK(inp); LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) { SCTP_TCB_LOCK(stcb); @@ -4068,14 +4102,16 @@ sctp_setopt(struct socket *so, int optname, void *optv } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (av->assoc_id == SCTP_FUTURE_ASSOC) || - (av->assoc_id == SCTP_ALL_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + ((av->assoc_id == SCTP_FUTURE_ASSOC) || + (av->assoc_id == SCTP_ALL_ASSOC)))) { SCTP_INP_WLOCK(inp); inp->sctp_ep.sctp_default_ss_module = av->assoc_value; SCTP_INP_WUNLOCK(inp); } - if ((av->assoc_id == SCTP_CURRENT_ASSOC) || - (av->assoc_id == SCTP_ALL_ASSOC)) { + if ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + ((av->assoc_id == SCTP_CURRENT_ASSOC) || + (av->assoc_id == SCTP_ALL_ASSOC))) { SCTP_INP_RLOCK(inp); LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) { SCTP_TCB_LOCK(stcb); @@ -4107,7 +4143,8 @@ sctp_setopt(struct socket *so, int optname, void *optv } SCTP_TCB_UNLOCK(stcb); } else { - if (av->assoc_id == SCTP_CURRENT_ASSOC) { + if ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (av->assoc_id == SCTP_CURRENT_ASSOC)) { SCTP_INP_RLOCK(inp); LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) { SCTP_TCB_LOCK(stcb); @@ -4148,14 +4185,16 @@ sctp_setopt(struct socket *so, int optname, void *optv } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (av->assoc_id == SCTP_FUTURE_ASSOC) || - (av->assoc_id == SCTP_ALL_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + ((av->assoc_id == SCTP_FUTURE_ASSOC) || + (av->assoc_id == SCTP_ALL_ASSOC)))) { SCTP_INP_WLOCK(inp); inp->sctp_context = av->assoc_value; SCTP_INP_WUNLOCK(inp); } - if ((av->assoc_id == SCTP_CURRENT_ASSOC) || - (av->assoc_id == SCTP_ALL_ASSOC)) { + if ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + ((av->assoc_id == SCTP_CURRENT_ASSOC) || + (av->assoc_id == SCTP_ALL_ASSOC))) { SCTP_INP_RLOCK(inp); LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) { SCTP_TCB_LOCK(stcb); @@ -4216,8 +4255,9 @@ sctp_setopt(struct socket *so, int optname, void *optv } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (sack->sack_assoc_id == SCTP_FUTURE_ASSOC) || - (sack->sack_assoc_id == SCTP_ALL_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + ((sack->sack_assoc_id == SCTP_FUTURE_ASSOC) || + (sack->sack_assoc_id == SCTP_ALL_ASSOC)))) { SCTP_INP_WLOCK(inp); if (sack->sack_delay) { inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_RECV] = MSEC_TO_TICKS(sack->sack_delay); @@ -4227,8 +4267,9 @@ sctp_setopt(struct socket *so, int optname, void *optv } SCTP_INP_WUNLOCK(inp); } - if ((sack->sack_assoc_id == SCTP_CURRENT_ASSOC) || - (sack->sack_assoc_id == SCTP_ALL_ASSOC)) { + if ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + ((sack->sack_assoc_id == SCTP_CURRENT_ASSOC) || + (sack->sack_assoc_id == SCTP_ALL_ASSOC))) { SCTP_INP_RLOCK(inp); LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) { SCTP_TCB_LOCK(stcb); @@ -4315,8 +4356,9 @@ sctp_setopt(struct socket *so, int optname, void *optv } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (sca->sca_assoc_id == SCTP_FUTURE_ASSOC) || - (sca->sca_assoc_id == SCTP_ALL_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + ((sca->sca_assoc_id == SCTP_FUTURE_ASSOC) || + (sca->sca_assoc_id == SCTP_ALL_ASSOC)))) { SCTP_INP_WLOCK(inp); shared_keys = &inp->sctp_ep.shared_keys; /* @@ -4350,8 +4392,9 @@ sctp_setopt(struct socket *so, int optname, void *optv error = sctp_insert_sharedkey(shared_keys, shared_key); SCTP_INP_WUNLOCK(inp); } - if ((sca->sca_assoc_id == SCTP_CURRENT_ASSOC) || - (sca->sca_assoc_id == SCTP_ALL_ASSOC)) { + if ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + ((sca->sca_assoc_id == SCTP_CURRENT_ASSOC) || + (sca->sca_assoc_id == SCTP_ALL_ASSOC))) { SCTP_INP_RLOCK(inp); LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) { SCTP_TCB_LOCK(stcb); @@ -4462,8 +4505,9 @@ sctp_setopt(struct socket *so, int optname, void *optv } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (scact->scact_assoc_id == SCTP_FUTURE_ASSOC) || - (scact->scact_assoc_id == SCTP_ALL_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + ((scact->scact_assoc_id == SCTP_FUTURE_ASSOC) || + (scact->scact_assoc_id == SCTP_ALL_ASSOC)))) { SCTP_INP_WLOCK(inp); if (sctp_auth_setactivekey_ep(inp, scact->scact_keynumber)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); @@ -4471,8 +4515,9 @@ sctp_setopt(struct socket *so, int optname, void *optv } SCTP_INP_WUNLOCK(inp); } - if ((scact->scact_assoc_id == SCTP_CURRENT_ASSOC) || - (scact->scact_assoc_id == SCTP_ALL_ASSOC)) { + if ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + ((scact->scact_assoc_id == SCTP_CURRENT_ASSOC) || + (scact->scact_assoc_id == SCTP_ALL_ASSOC))) { SCTP_INP_RLOCK(inp); LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) { SCTP_TCB_LOCK(stcb); @@ -4501,8 +4546,9 @@ sctp_setopt(struct socket *so, int optname, void *optv } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (scdel->scact_assoc_id == SCTP_FUTURE_ASSOC) || - (scdel->scact_assoc_id == SCTP_ALL_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + ((scdel->scact_assoc_id == SCTP_FUTURE_ASSOC) || + (scdel->scact_assoc_id == SCTP_ALL_ASSOC)))) { SCTP_INP_WLOCK(inp); if (sctp_delete_sharedkey_ep(inp, scdel->scact_keynumber)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); @@ -4510,8 +4556,9 @@ sctp_setopt(struct socket *so, int optname, void *optv } SCTP_INP_WUNLOCK(inp); } - if ((scdel->scact_assoc_id == SCTP_CURRENT_ASSOC) || - (scdel->scact_assoc_id == SCTP_ALL_ASSOC)) { + if ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + ((scdel->scact_assoc_id == SCTP_CURRENT_ASSOC) || + (scdel->scact_assoc_id == SCTP_ALL_ASSOC))) { SCTP_INP_RLOCK(inp); LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) { SCTP_TCB_LOCK(stcb); @@ -4540,8 +4587,9 @@ sctp_setopt(struct socket *so, int optname, void *optv } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (keyid->scact_assoc_id == SCTP_FUTURE_ASSOC) || - (keyid->scact_assoc_id == SCTP_ALL_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + ((keyid->scact_assoc_id == SCTP_FUTURE_ASSOC) || + (keyid->scact_assoc_id == SCTP_ALL_ASSOC)))) { SCTP_INP_WLOCK(inp); if (sctp_deact_sharedkey_ep(inp, keyid->scact_keynumber)) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); @@ -4549,8 +4597,9 @@ sctp_setopt(struct socket *so, int optname, void *optv } SCTP_INP_WUNLOCK(inp); } - if ((keyid->scact_assoc_id == SCTP_CURRENT_ASSOC) || - (keyid->scact_assoc_id == SCTP_ALL_ASSOC)) { + if ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + ((keyid->scact_assoc_id == SCTP_CURRENT_ASSOC) || + (keyid->scact_assoc_id == SCTP_ALL_ASSOC))) { SCTP_INP_RLOCK(inp); LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) { SCTP_TCB_LOCK(stcb); @@ -4579,14 +4628,16 @@ sctp_setopt(struct socket *so, int optname, void *optv } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (av->assoc_id == SCTP_FUTURE_ASSOC) || - (av->assoc_id == SCTP_ALL_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + ((av->assoc_id == SCTP_FUTURE_ASSOC) || + (av->assoc_id == SCTP_ALL_ASSOC)))) { SCTP_INP_WLOCK(inp); inp->local_strreset_support = (uint8_t)av->assoc_value; SCTP_INP_WUNLOCK(inp); } - if ((av->assoc_id == SCTP_CURRENT_ASSOC) || - (av->assoc_id == SCTP_ALL_ASSOC)) { + if ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + ((av->assoc_id == SCTP_CURRENT_ASSOC) || + (av->assoc_id == SCTP_ALL_ASSOC))) { SCTP_INP_RLOCK(inp); LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) { SCTP_TCB_LOCK(stcb); @@ -4934,14 +4985,16 @@ sctp_setopt(struct socket *so, int optname, void *optv } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (av->assoc_id == SCTP_FUTURE_ASSOC) || - (av->assoc_id == SCTP_ALL_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + ((av->assoc_id == SCTP_FUTURE_ASSOC) || + (av->assoc_id == SCTP_ALL_ASSOC)))) { SCTP_INP_WLOCK(inp); inp->sctp_ep.max_burst = av->assoc_value; SCTP_INP_WUNLOCK(inp); } - if ((av->assoc_id == SCTP_CURRENT_ASSOC) || - (av->assoc_id == SCTP_ALL_ASSOC)) { + if ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + ((av->assoc_id == SCTP_CURRENT_ASSOC) || + (av->assoc_id == SCTP_ALL_ASSOC))) { SCTP_INP_RLOCK(inp); LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) { SCTP_TCB_LOCK(stcb); @@ -4976,7 +5029,8 @@ sctp_setopt(struct socket *so, int optname, void *optv } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (av->assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (av->assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_WLOCK(inp); /* * FIXME MT: I think this is not in @@ -5187,14 +5241,16 @@ sctp_setopt(struct socket *so, int optname, void *optv } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (s_info->sinfo_assoc_id == SCTP_FUTURE_ASSOC) || - (s_info->sinfo_assoc_id == SCTP_ALL_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + ((s_info->sinfo_assoc_id == SCTP_FUTURE_ASSOC) || + (s_info->sinfo_assoc_id == SCTP_ALL_ASSOC)))) { SCTP_INP_WLOCK(inp); memcpy(&inp->def_send, s_info, min(optsize, sizeof(inp->def_send))); SCTP_INP_WUNLOCK(inp); } - if ((s_info->sinfo_assoc_id == SCTP_CURRENT_ASSOC) || - (s_info->sinfo_assoc_id == SCTP_ALL_ASSOC)) { + if ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + ((s_info->sinfo_assoc_id == SCTP_CURRENT_ASSOC) || + (s_info->sinfo_assoc_id == SCTP_ALL_ASSOC))) { SCTP_INP_RLOCK(inp); LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) { SCTP_TCB_LOCK(stcb); @@ -5542,7 +5598,8 @@ sctp_setopt(struct socket *so, int optname, void *optv /************************NO TCB, SET TO default stuff ******************/ if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (paddrp->spp_assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (paddrp->spp_assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_WLOCK(inp); /* * For the TOS/FLOWLABEL stuff you @@ -5633,7 +5690,8 @@ sctp_setopt(struct socket *so, int optname, void *optv } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (srto->srto_assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (srto->srto_assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_WLOCK(inp); if (srto->srto_initial) new_init = srto->srto_initial; @@ -5687,7 +5745,8 @@ sctp_setopt(struct socket *so, int optname, void *optv } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (sasoc->sasoc_assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (sasoc->sasoc_assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_WLOCK(inp); if (sasoc->sasoc_asocmaxrxt) inp->sctp_ep.max_send_times = sasoc->sasoc_asocmaxrxt; @@ -6098,8 +6157,7 @@ sctp_setopt(struct socket *so, int optname, void *optv * sender dry events */ if ((event_type == SCTP_PCB_FLAGS_DRYEVNT) && - ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) == 0) && - ((inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) == 0) && + (inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && ((event->se_assoc_id == SCTP_ALL_ASSOC) || (event->se_assoc_id == SCTP_CURRENT_ASSOC))) { SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, ENOTSUP); @@ -6108,8 +6166,9 @@ sctp_setopt(struct socket *so, int optname, void *optv } if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (event->se_assoc_id == SCTP_FUTURE_ASSOC) || - (event->se_assoc_id == SCTP_ALL_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + ((event->se_assoc_id == SCTP_FUTURE_ASSOC) || + (event->se_assoc_id == SCTP_ALL_ASSOC)))) { SCTP_INP_WLOCK(inp); if (event->se_on) { sctp_feature_on(inp, event_type); @@ -6118,8 +6177,9 @@ sctp_setopt(struct socket *so, int optname, void *optv } SCTP_INP_WUNLOCK(inp); } - if ((event->se_assoc_id == SCTP_CURRENT_ASSOC) || - (event->se_assoc_id == SCTP_ALL_ASSOC)) { + if ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + ((event->se_assoc_id == SCTP_CURRENT_ASSOC) || + (event->se_assoc_id == SCTP_ALL_ASSOC))) { SCTP_INP_RLOCK(inp); LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) { SCTP_TCB_LOCK(stcb); @@ -6192,8 +6252,9 @@ sctp_setopt(struct socket *so, int optname, void *optv } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (info->snd_assoc_id == SCTP_FUTURE_ASSOC) || - (info->snd_assoc_id == SCTP_ALL_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + ((info->snd_assoc_id == SCTP_FUTURE_ASSOC) || + (info->snd_assoc_id == SCTP_ALL_ASSOC)))) { SCTP_INP_WLOCK(inp); inp->def_send.sinfo_stream = info->snd_sid; policy = PR_SCTP_POLICY(inp->def_send.sinfo_flags); @@ -6203,8 +6264,9 @@ sctp_setopt(struct socket *so, int optname, void *optv inp->def_send.sinfo_context = info->snd_context; SCTP_INP_WUNLOCK(inp); } - if ((info->snd_assoc_id == SCTP_CURRENT_ASSOC) || - (info->snd_assoc_id == SCTP_ALL_ASSOC)) { + if ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + ((info->snd_assoc_id == SCTP_CURRENT_ASSOC) || + (info->snd_assoc_id == SCTP_ALL_ASSOC))) { SCTP_INP_RLOCK(inp); LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) { SCTP_TCB_LOCK(stcb); @@ -6246,16 +6308,18 @@ sctp_setopt(struct socket *so, int optname, void *optv } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (info->pr_assoc_id == SCTP_FUTURE_ASSOC) || - (info->pr_assoc_id == SCTP_ALL_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + ((info->pr_assoc_id == SCTP_FUTURE_ASSOC) || + (info->pr_assoc_id == SCTP_ALL_ASSOC)))) { SCTP_INP_WLOCK(inp); inp->def_send.sinfo_flags &= 0xfff0; inp->def_send.sinfo_flags |= info->pr_policy; inp->def_send.sinfo_timetolive = info->pr_value; SCTP_INP_WUNLOCK(inp); } - if ((info->pr_assoc_id == SCTP_CURRENT_ASSOC) || - (info->pr_assoc_id == SCTP_ALL_ASSOC)) { + if ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + ((info->pr_assoc_id == SCTP_CURRENT_ASSOC) || + (info->pr_assoc_id == SCTP_ALL_ASSOC))) { SCTP_INP_RLOCK(inp); LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) { SCTP_TCB_LOCK(stcb); @@ -6430,7 +6494,8 @@ sctp_setopt(struct socket *so, int optname, void *optv } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (thlds->spt_assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (thlds->spt_assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_WLOCK(inp); inp->sctp_ep.def_net_failure = thlds->spt_pathmaxrxt; inp->sctp_ep.def_net_pf_threshold = thlds->spt_pathpfthld; @@ -6534,7 +6599,8 @@ sctp_setopt(struct socket *so, int optname, void *optv } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (encaps->sue_assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (encaps->sue_assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_WLOCK(inp); inp->sctp_ep.port = encaps->sue_port; SCTP_INP_WUNLOCK(inp); @@ -6559,7 +6625,8 @@ sctp_setopt(struct socket *so, int optname, void *optv } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (av->assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (av->assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_WLOCK(inp); if (av->assoc_value == 0) { inp->ecn_supported = 0; @@ -6588,7 +6655,8 @@ sctp_setopt(struct socket *so, int optname, void *optv } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (av->assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (av->assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_WLOCK(inp); if (av->assoc_value == 0) { inp->prsctp_supported = 0; @@ -6617,7 +6685,8 @@ sctp_setopt(struct socket *so, int optname, void *optv } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (av->assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (av->assoc_id == SCTP_FUTURE_ASSOC))) { if ((av->assoc_value == 0) && (inp->asconf_supported == 1)) { /* @@ -6656,7 +6725,8 @@ sctp_setopt(struct socket *so, int optname, void *optv } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (av->assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (av->assoc_id == SCTP_FUTURE_ASSOC))) { if ((av->assoc_value != 0) && (inp->auth_supported == 0)) { /* @@ -6703,7 +6773,8 @@ sctp_setopt(struct socket *so, int optname, void *optv } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (av->assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (av->assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_WLOCK(inp); if (av->assoc_value == 0) { inp->reconfig_supported = 0; @@ -6732,7 +6803,8 @@ sctp_setopt(struct socket *so, int optname, void *optv } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (av->assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (av->assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_WLOCK(inp); if (av->assoc_value == 0) { inp->nrsack_supported = 0; @@ -6761,7 +6833,8 @@ sctp_setopt(struct socket *so, int optname, void *optv } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (av->assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (av->assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_WLOCK(inp); if (av->assoc_value == 0) { inp->pktdrop_supported = 0; @@ -6801,7 +6874,8 @@ sctp_setopt(struct socket *so, int optname, void *optv } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || - (av->assoc_id == SCTP_FUTURE_ASSOC)) { + ((inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) && + (av->assoc_id == SCTP_FUTURE_ASSOC))) { SCTP_INP_WLOCK(inp); inp->max_cwnd = av->assoc_value; SCTP_INP_WUNLOCK(inp); From owner-svn-src-all@freebsd.org Wed Jul 1 20:37:06 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C9D6535B3C9; Wed, 1 Jul 2020 20:37:06 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xtLp4xZjz3Vnl; Wed, 1 Jul 2020 20:37:06 +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 8CE45F582; Wed, 1 Jul 2020 20:37:06 +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 061Kb69B082525; Wed, 1 Jul 2020 20:37:06 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061Kb6vW082524; Wed, 1 Jul 2020 20:37:06 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007012037.061Kb6vW082524@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 1 Jul 2020 20:37:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362861 - stable/12/sys/netinet6 X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet6 X-SVN-Commit-Revision: 362861 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 20:37:06 -0000 Author: tuexen Date: Wed Jul 1 20:37:06 2020 New Revision: 362861 URL: https://svnweb.freebsd.org/changeset/base/362861 Log: MFC r355264: Update the hostcache also for PTB messages received for SCTP/IPv6. The corresponding code for SCTP/IPv4 was introduced in https://svnweb.freebsd.org/base?view=revision&revision=317597 Submitted by: Julius Flohr Differential Revision: https://reviews.freebsd.org/D22605 Modified: stable/12/sys/netinet6/sctp6_usrreq.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet6/sctp6_usrreq.c ============================================================================== --- stable/12/sys/netinet6/sctp6_usrreq.c Wed Jul 1 20:32:51 2020 (r362860) +++ stable/12/sys/netinet6/sctp6_usrreq.c Wed Jul 1 20:37:06 2020 (r362861) @@ -242,6 +242,11 @@ sctp6_notify(struct sctp_inpcb *inp, } if (net->mtu > next_mtu) { net->mtu = next_mtu; + if (net->port) { + sctp_hc_set_mtu(&net->ro._l_addr, inp->fibnum, next_mtu + sizeof(struct udphdr)); + } else { + sctp_hc_set_mtu(&net->ro._l_addr, inp->fibnum, next_mtu); + } } /* Update the association MTU */ if (stcb->asoc.smallest_mtu > next_mtu) { From owner-svn-src-all@freebsd.org Wed Jul 1 20:38:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 303EA35B63A; Wed, 1 Jul 2020 20:38:57 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xtNx0SZjz3Vr7; Wed, 1 Jul 2020 20:38:57 +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 E733DF588; Wed, 1 Jul 2020 20:38:56 +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 061Kcujq082652; Wed, 1 Jul 2020 20:38:56 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061Kcusg082651; Wed, 1 Jul 2020 20:38:56 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007012038.061Kcusg082651@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 1 Jul 2020 20:38:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362862 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 362862 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 20:38:57 -0000 Author: tuexen Date: Wed Jul 1 20:38:56 2020 New Revision: 362862 URL: https://svnweb.freebsd.org/changeset/base/362862 Log: MFC r355265: When changing the MTU of an SCTP path, not only cancel all ongoing RTT measurements, but also scheldule new ones for the future. Submitted by: Julius Flohr Differential Revision: https://reviews.freebsd.org/D22547 Modified: stable/12/sys/netinet/sctp_usrreq.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/12/sys/netinet/sctp_usrreq.c Wed Jul 1 20:37:06 2020 (r362861) +++ stable/12/sys/netinet/sctp_usrreq.c Wed Jul 1 20:38:56 2020 (r362862) @@ -143,7 +143,10 @@ sctp_pathmtu_adjustment(struct sctp_tcb *stcb, uint16_ chk->rec.data.tsn); } /* Clear any time so NO RTT is being done */ - chk->do_rtt = 0; + if (chk->do_rtt == 1) { + chk->do_rtt = 0; + chk->whoTo->rto_needed = 1; + } } } } From owner-svn-src-all@freebsd.org Wed Jul 1 20:41:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8F9A135B3F0; Wed, 1 Jul 2020 20:41:25 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xtRn264Kz3VhK; Wed, 1 Jul 2020 20:41:25 +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 2C76DF511; Wed, 1 Jul 2020 20:41:25 +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 061KfPZo084719; Wed, 1 Jul 2020 20:41:25 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061KfOnr084710; Wed, 1 Jul 2020 20:41:24 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007012041.061KfOnr084710@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 1 Jul 2020 20:41:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362863 - in stable/12/sys: dev/cxgbe/tom netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: in stable/12/sys: dev/cxgbe/tom netinet X-SVN-Commit-Revision: 362863 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 20:41:25 -0000 Author: tuexen Date: Wed Jul 1 20:41:23 2020 New Revision: 362863 URL: https://svnweb.freebsd.org/changeset/base/362863 Log: MFC r355266: In order for the TCP Handshake to support ECN++, and further ECN-related improvements, the ECN bits need to be exposed to the TCP SYNcache. This change is a minimal modification to the function headers, without any functional change intended. Submitted by: rscheff Reviewed by: rgrimes, rrs, tuexen Differential Revision: https://reviews.freebsd.org/D22436 Modified: stable/12/sys/dev/cxgbe/tom/t4_listen.c stable/12/sys/netinet/tcp_input.c stable/12/sys/netinet/tcp_syncache.c stable/12/sys/netinet/tcp_syncache.h stable/12/sys/netinet/toecore.c stable/12/sys/netinet/toecore.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- stable/12/sys/dev/cxgbe/tom/t4_listen.c Wed Jul 1 20:38:56 2020 (r362862) +++ stable/12/sys/dev/cxgbe/tom/t4_listen.c Wed Jul 1 20:41:23 2020 (r362863) @@ -986,7 +986,7 @@ t4opt_to_tcpopt(const struct tcp_options *t4opt, struc static void pass_accept_req_to_protohdrs(struct adapter *sc, const struct mbuf *m, - struct in_conninfo *inc, struct tcphdr *th) + struct in_conninfo *inc, struct tcphdr *th, uint8_t *iptos) { const struct cpl_pass_accept_req *cpl = mtod(m, const void *); const struct ether_header *eh; @@ -1003,6 +1003,21 @@ pass_accept_req_to_protohdrs(struct adapter *sc, const tcp = (const void *)(l3hdr + G_IP_HDR_LEN(hlen)); } + /* extract TOS (DiffServ + ECN) byte for AccECN */ + if (iptos) { + if (((struct ip *)l3hdr)->ip_v == IPVERSION) { + const struct ip *ip = (const void *)l3hdr; + *iptos = ip->ip_tos; + } +#ifdef INET6 + else + if (((struct ip *)l3hdr)->ip_v == (IPV6_VERSION >> 4)) { + const struct ip6_hdr *ip6 = (const void *)l3hdr; + *iptos = (ntohl(ip6->ip6_flow) >> 20) & 0xff; + } +#endif /* INET */ + } + if (inc) { bzero(inc, sizeof(*inc)); inc->inc_fport = tcp->th_sport; @@ -1148,6 +1163,7 @@ do_pass_accept_req(struct sge_iq *iq, const struct rss unsigned int opcode = G_CPL_OPCODE(be32toh(OPCODE_TID(cpl))); #endif struct offload_settings settings; + uint8_t iptos; KASSERT(opcode == CPL_PASS_ACCEPT_REQ, ("%s: unexpected opcode 0x%x", __func__, opcode)); @@ -1206,7 +1222,7 @@ found: if (lctx->vnet != ifp->if_vnet) REJECT_PASS_ACCEPT_REQ(true); - pass_accept_req_to_protohdrs(sc, m, &inc, &th); + pass_accept_req_to_protohdrs(sc, m, &inc, &th, &iptos); if (inc.inc_flags & INC_ISIPV6) { /* Don't offload if the ifcap isn't enabled */ @@ -1282,7 +1298,7 @@ found: * syncache_add. Note that syncache_add releases the pcb lock. */ t4opt_to_tcpopt(&cpl->tcpopt, &to); - toe_syncache_add(&inc, &to, &th, inp, tod, synqe); + toe_syncache_add(&inc, &to, &th, inp, tod, synqe, iptos); if (atomic_load_int(&synqe->ok_to_respond) > 0) { uint64_t opt0; @@ -1348,9 +1364,10 @@ synqe_to_protohdrs(struct adapter *sc, struct synq_ent struct tcphdr *th, struct tcpopt *to) { uint16_t tcp_opt = be16toh(cpl->tcp_opt); + uint8_t iptos; /* start off with the original SYN */ - pass_accept_req_to_protohdrs(sc, synqe->syn, inc, th); + pass_accept_req_to_protohdrs(sc, synqe->syn, inc, th, &iptos); /* modify parts to make it look like the ACK to our SYN|ACK */ th->th_flags = TH_ACK; Modified: stable/12/sys/netinet/tcp_input.c ============================================================================== --- stable/12/sys/netinet/tcp_input.c Wed Jul 1 20:38:56 2020 (r362862) +++ stable/12/sys/netinet/tcp_input.c Wed Jul 1 20:41:23 2020 (r362863) @@ -1361,7 +1361,7 @@ tfo_socket_result: #endif TCP_PROBE3(debug__input, tp, th, m); tcp_dooptions(&to, optp, optlen, TO_SYN); - if (syncache_add(&inc, &to, th, inp, &so, m, NULL, NULL)) + if (syncache_add(&inc, &to, th, inp, &so, m, NULL, NULL, iptos)) goto tfo_socket_result; /* Modified: stable/12/sys/netinet/tcp_syncache.c ============================================================================== --- stable/12/sys/netinet/tcp_syncache.c Wed Jul 1 20:38:56 2020 (r362862) +++ stable/12/sys/netinet/tcp_syncache.c Wed Jul 1 20:41:23 2020 (r362863) @@ -1306,7 +1306,7 @@ syncache_tfo_expand(struct syncache *sc, struct socket int syncache_add(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th, struct inpcb *inp, struct socket **lsop, struct mbuf *m, void *tod, - void *todctx) + void *todctx, uint8_t iptos) { struct tcpcb *tp; struct socket *so; Modified: stable/12/sys/netinet/tcp_syncache.h ============================================================================== --- stable/12/sys/netinet/tcp_syncache.h Wed Jul 1 20:38:56 2020 (r362862) +++ stable/12/sys/netinet/tcp_syncache.h Wed Jul 1 20:41:23 2020 (r362863) @@ -45,7 +45,7 @@ int syncache_expand(struct in_conninfo *, struct tcpo struct tcphdr *, struct socket **, struct mbuf *); int syncache_add(struct in_conninfo *, struct tcpopt *, struct tcphdr *, struct inpcb *, struct socket **, struct mbuf *, - void *, void *); + void *, void *, uint8_t); void syncache_chkrst(struct in_conninfo *, struct tcphdr *, struct mbuf *); void syncache_badack(struct in_conninfo *); int syncache_pcblist(struct sysctl_req *req, int max_pcbs, int *pcbs_exported); Modified: stable/12/sys/netinet/toecore.c ============================================================================== --- stable/12/sys/netinet/toecore.c Wed Jul 1 20:38:56 2020 (r362862) +++ stable/12/sys/netinet/toecore.c Wed Jul 1 20:41:23 2020 (r362863) @@ -336,13 +336,13 @@ unregister_toedev(struct toedev *tod) void toe_syncache_add(struct in_conninfo *inc, struct tcpopt *to, struct tcphdr *th, - struct inpcb *inp, void *tod, void *todctx) + struct inpcb *inp, void *tod, void *todctx, uint8_t iptos) { struct socket *lso = inp->inp_socket; INP_WLOCK_ASSERT(inp); - syncache_add(inc, to, th, inp, &lso, NULL, tod, todctx); + syncache_add(inc, to, th, inp, &lso, NULL, tod, todctx, iptos); } int Modified: stable/12/sys/netinet/toecore.h ============================================================================== --- stable/12/sys/netinet/toecore.h Wed Jul 1 20:38:56 2020 (r362862) +++ stable/12/sys/netinet/toecore.h Wed Jul 1 20:41:23 2020 (r362863) @@ -129,7 +129,7 @@ int toe_l2_resolve(struct toedev *, struct ifnet *, st void toe_connect_failed(struct toedev *, struct inpcb *, int); void toe_syncache_add(struct in_conninfo *, struct tcpopt *, struct tcphdr *, - struct inpcb *, void *, void *); + struct inpcb *, void *, void *, uint8_t); int toe_syncache_expand(struct in_conninfo *, struct tcpopt *, struct tcphdr *, struct socket **); From owner-svn-src-all@freebsd.org Wed Jul 1 20:45:27 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4309235B668; Wed, 1 Jul 2020 20:45:27 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xtXR0zxfz3Whf; Wed, 1 Jul 2020 20:45: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 05501F5AC; Wed, 1 Jul 2020 20:45: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 061KjQUO088796; Wed, 1 Jul 2020 20:45:26 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061KjQLx088795; Wed, 1 Jul 2020 20:45:26 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007012045.061KjQLx088795@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 1 Jul 2020 20:45:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362864 - stable/12/share/man/man4 X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/share/man/man4 X-SVN-Commit-Revision: 362864 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 20:45:27 -0000 Author: tuexen Date: Wed Jul 1 20:45:26 2020 New Revision: 362864 URL: https://svnweb.freebsd.org/changeset/base/362864 Log: MFC r355268: Add a description for the TCP sysctl variable rfc6675_pipe. It was introduced by r290122, but no documentation was provided. This is taken from https://reviews.freebsd.org/D21798, since it is not related to the feature added there. Submitted by: rscheff Modified: stable/12/share/man/man4/tcp.4 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/tcp.4 ============================================================================== --- stable/12/share/man/man4/tcp.4 Wed Jul 1 20:41:23 2020 (r362863) +++ stable/12/share/man/man4/tcp.4 Wed Jul 1 20:45:26 2020 (r362864) @@ -34,7 +34,7 @@ .\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd July 23, 2019 +.Dd December 1, 2019 .Dt TCP 4 .Os .Sh NAME @@ -493,6 +493,9 @@ The value should be relative to the link capacity. Start with small values for lower-capacity links. Large bursts can cause buffer overruns and packet drops if routers have small buffers or the link is experiencing congestion. +.It Va rfc6675_pipe +Calculate the bytes in flight using the algorithm described in RFC 6675, and +is also a prerequisite to enable Proportional Rate Reduction. .It Va rfc3042 Enable the Limited Transmit algorithm as described in RFC 3042. It helps avoid timeouts on lossy links and also when the congestion window From owner-svn-src-all@freebsd.org Wed Jul 1 21:28:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C4DDC35C3CA; Wed, 1 Jul 2020 21:28:49 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xvVT4tSZz3YXX; Wed, 1 Jul 2020 21:28:49 +0000 (UTC) (envelope-from gbe@freebsd.org) Received: from localhost (p548612f6.dip0.t-ipconnect.de [84.134.18.246]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gbe) by smtp.freebsd.org (Postfix) with ESMTPSA id 2D8B6100FD; Wed, 1 Jul 2020 21:28:49 +0000 (UTC) (envelope-from gbe@freebsd.org) Date: Wed, 1 Jul 2020 23:28:47 +0200 From: Gordon Bergling To: Warner Losh Cc: "Rodney W. Grimes" , Gordon Bergling , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r362809 - head/contrib/mandoc Message-ID: <20200701212847.GA1751@lion.0xfce3.net> References: <20200701074920.GB72275@lion.0xfce3.net> <202007011451.061EpIYF056897@gndrsh.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: X-Operating-System: FreeBSD 12.1-STABLE amd64 X-Host-Uptime: 11:17PM up 10:49, 5 users, load averages: 1.08, 1.04, 1.02 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 21:28:49 -0000 On Wed, Jul 01, 2020 at 11:58:05AM -0600, Warner Losh wrote: > On Wed, Jul 1, 2020 at 8:51 AM Rodney W. Grimes > wrote: > > > > On Tue, Jun 30, 2020 at 03:56:17PM -0700, Rodney W. Grimes wrote: > > > > [ Charset UTF-8 unsupported, converting... ] > > > > > Author: gbe (doc committer) > > > > > Date: Tue Jun 30 18:08:59 2020 > > > > > New Revision: 362809 > > > > > URL: https://svnweb.freebsd.org/changeset/base/362809 > > > > > > > > > > Log: > > > > > Mention FreeBSD in the HISTORY sections of apropos(1) and > > makewhatis(8). > > > > > > > > > > PR: 223520, 223521 > > > > > Reviewed by: bcr (mentor) > > > > > Approved by: bcr (mentor) > > > > > Differential Revision: https://reviews.freebsd.org/D25521 > > > > > > > > > > Modified: > > > > > head/contrib/mandoc/apropos.1 > > > > > head/contrib/mandoc/makewhatis.8 > > > > > > > > > > Modified: head/contrib/mandoc/apropos.1 > > > > > > > ============================================================================== > > > > > --- head/contrib/mandoc/apropos.1 Tue Jun 30 17:21:28 2020 > > (r362808) > > > > > +++ head/contrib/mandoc/apropos.1 Tue Jun 30 18:08:59 2020 > > (r362809) > > > > > @@ -15,7 +15,7 @@ > > > > > .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, > > ARISING OUT OF > > > > > .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. > > > > > .\" > > > > > -.Dd $Mdocdate: November 22 2018 $ > > > > > +.Dd $Mdocdate: June 30 2020 $ > > > > > .Dt APROPOS 1 > > > > > .Os > > > > > .Sh NAME > > > > > @@ -493,6 +493,12 @@ The options > > > > > .Fl acfhIKklOTWw > > > > > appeared in > > > > > .Ox 5.7 . > > > > > +.Pp > > > > > +The > > > > > +.Nm > > > > > +utility was integrated into > > > > > +.Fx 11.1 > > > > > +as part of the switch to mandoc. > > > > > > > > Huh? FreeBSD has had apropos since 1.0 and my 5.4 system clearly has > > it: > > > > freebsd {110}% uname -a > > > > FreeBSD pdx.rh.CN85.dnsmgr.net 5.4-RELEASE-p8 FreeBSD 5.4-RELEASE-p8 > > #1: Mon Jul 1 17:58:50 PDT 2019 root@pdx.rh.CN85.dnsmgr.net:/usr/src/sys/i386/compile/PDXMXPIE > > i386 > > > > pdx.rh.CN85.dnsmgr.net:freebsd {111}% which apropos > > > > /usr/bin/apropos > > > > > > > > And a man page for it too: > > > > APROPOS(1) FreeBSD General Commands Manual > > APROPOS(1) > > > > > > > > NAME > > > > apropos, whatis -- search the whatis database > > > > > > > > SYNOPSIS > > > > apropos keyword ... > > > > whatis keyword ... > > > > > > > > DESCRIPTION > > > > apropos searches a set of database files containing short > > descriptions of > > > > system commands for keywords and displays the result on the > > standard out- > > > > put. whatis displays only complete word matches. > > > > > > > > keyword really is an extended regular expression, please read > > grep(1) > > > > manual page for more information about its format. > > > > > > > > DIAGNOSTICS > > > > The apropos utility exits 0 on success, and 1 if no keyword > > matched. > > > > > > > > SEE ALSO > > > > grep(1), makewhatis(1), man(1) > > > > > > > > FreeBSD 5.4 January 15, 1991 > > FreeBSD 5.4 > > > > > > > > > .Sh AUTHORS > > > > > .An -nosplit > > > > > .An Bill Joy > > > > > > > > > > > That is true, but the version of 'apropos' we have currently in base is > > based on mandoc, > > > which was imported around September 2018. Due to the nature of > > contributed code I > > > thought it would be best to document only the history when it was > > integrated into > > > FreeSBD. The same applies for 'makewhatis'. > > > > That is not what has been done in other places when code is > > changed/replaced, > > the HISTORY section is not specific to "FreeBSD's version" of this > > function. > > > > We often have "An ls command appeared in Version 1 AT&T UNIX." Our source > > code and man page is not from that, but that is the history of ls. > > > > This *could* be amended and *should* be amended to reflect that apropos, > > and makewhatis got *updated* by a switch to the mandoc versions, but it > > is misleading to say it was intergrated with the switch to mandoc as that > > implies it did not exist before this action. > > > > I tend to agree with Rod here. These appeared in X the first time, but > noting they were replaced in version X with Y is the best way to address > the current provenance of the code... > > Warner OK, I see your arguments. How about the following addition for HISTORY section, The apropos utility was integrated into FreeBSD 11.1 as part of the switch to mandoc. Before the switch to mandoc apropos was available since FreeBSD 1.0. Any suggestions on how to describe the history more precise are very welcome. --Gordon > > > > > Modified: head/contrib/mandoc/makewhatis.8 > > > > > > > ============================================================================== > > > > > --- head/contrib/mandoc/makewhatis.8 Tue Jun 30 17:21:28 2020 > > (r362808) > > > > > +++ head/contrib/mandoc/makewhatis.8 Tue Jun 30 18:08:59 2020 > > (r362809) > > > > > @@ -15,7 +15,7 @@ > > > > > .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, > > ARISING OUT OF > > > > > .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. > > > > > .\" > > > > > -.Dd $Mdocdate: May 17 2017 $ > > > > > +.Dd $Mdocdate: June 30 2020 $ > > > > > .Dt MAKEWHATIS 8 > > > > > .Os > > > > > .Sh NAME > > > > > @@ -211,6 +211,12 @@ and the options > > > > > .Fl aCDnQT > > > > > in > > > > > .Ox 5.6 . > > > > > +.Pp > > > > > +The > > > > > +.Nm > > > > > +utility was integrated into > > > > > +.Fx 11.1 > > > > > +as part of the switch to mandoc. > > > > > > > > Ditto > > > > > > > > > .Sh AUTHORS > > > > > .An -nosplit > > > > > .An Bill Joy > > -- > > Rod Grimes > > rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Wed Jul 1 21:37:33 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6403035C06B; Wed, 1 Jul 2020 21:37:33 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xvhY2107z3Yt8; Wed, 1 Jul 2020 21:37:33 +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 249FE10101; Wed, 1 Jul 2020 21:37:33 +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 061LbWmP019710; Wed, 1 Jul 2020 21:37:32 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061LbWnY019709; Wed, 1 Jul 2020 21:37:32 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007012137.061LbWnY019709@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 1 Jul 2020 21:37:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362868 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 362868 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 21:37:33 -0000 Author: tuexen Date: Wed Jul 1 21:37:32 2020 New Revision: 362868 URL: https://svnweb.freebsd.org/changeset/base/362868 Log: MFC r355931: Improve input validation for some parameters having a too small reported length. Thanks to Natalie Silvanovich from Google for finding one of these issues in the SCTP userland stack and reporting it. Modified: stable/12/sys/netinet/sctp_auth.c stable/12/sys/netinet/sctp_pcb.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_auth.c ============================================================================== --- stable/12/sys/netinet/sctp_auth.c Wed Jul 1 21:27:33 2020 (r362867) +++ stable/12/sys/netinet/sctp_auth.c Wed Jul 1 21:37:32 2020 (r362868) @@ -1397,7 +1397,8 @@ sctp_auth_get_cookie_params(struct sctp_tcb *stcb, str ptype = ntohs(phdr->param_type); plen = ntohs(phdr->param_length); - if ((plen == 0) || (offset + plen > length)) + if ((plen < sizeof(struct sctp_paramhdr)) || + (offset + plen > length)) break; if (ptype == SCTP_RANDOM) { Modified: stable/12/sys/netinet/sctp_pcb.c ============================================================================== --- stable/12/sys/netinet/sctp_pcb.c Wed Jul 1 21:27:33 2020 (r362867) +++ stable/12/sys/netinet/sctp_pcb.c Wed Jul 1 21:37:32 2020 (r362868) @@ -6202,7 +6202,7 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, s if (offset + plen > limit) { break; } - if (plen == 0) { + if (plen < sizeof(struct sctp_paramhdr)) { break; } #ifdef INET @@ -6427,6 +6427,9 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, s } if (plen > sizeof(lstore)) { return (-23); + } + if (plen < sizeof(struct sctp_asconf_addrv4_param)) { + return (-101); } phdr = sctp_get_next_param(m, offset, (struct sctp_paramhdr *)&lstore, From owner-svn-src-all@freebsd.org Wed Jul 1 21:40:28 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 307B835C07A; Wed, 1 Jul 2020 21:40: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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xvlw0SXsz3ZSD; Wed, 1 Jul 2020 21:40:28 +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 E75E7FF41; Wed, 1 Jul 2020 21:40: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 061LeRCK019920; Wed, 1 Jul 2020 21:40:27 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061LeRtY019919; Wed, 1 Jul 2020 21:40:27 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007012140.061LeRtY019919@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 1 Jul 2020 21:40:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362869 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 362869 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 21:40:28 -0000 Author: tuexen Date: Wed Jul 1 21:40:27 2020 New Revision: 362869 URL: https://svnweb.freebsd.org/changeset/base/362869 Log: MFC r356226: Clear the flag indicating that the last received packet was marked CE also in the case where a packet not marked was received. Submitted by: rscheff Reviewed by: rgrimes, tuexen Differential Revision: https://reviews.freebsd.org/D19143 Modified: stable/12/sys/netinet/tcp_input.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/tcp_input.c ============================================================================== --- stable/12/sys/netinet/tcp_input.c Wed Jul 1 21:37:32 2020 (r362868) +++ stable/12/sys/netinet/tcp_input.c Wed Jul 1 21:40:27 2020 (r362869) @@ -500,14 +500,15 @@ cc_ecnpkt_handler(struct tcpcb *tp, struct tcphdr *th, if (CC_ALGO(tp)->ecnpkt_handler != NULL) { switch (iptos & IPTOS_ECN_MASK) { case IPTOS_ECN_CE: - tp->ccv->flags |= CCF_IPHDR_CE; - break; + tp->ccv->flags |= CCF_IPHDR_CE; + break; case IPTOS_ECN_ECT0: - tp->ccv->flags &= ~CCF_IPHDR_CE; - break; + /* FALLTHROUGH */ case IPTOS_ECN_ECT1: - tp->ccv->flags &= ~CCF_IPHDR_CE; - break; + /* FALLTHROUGH */ + case IPTOS_ECN_NOTECT: + tp->ccv->flags &= ~CCF_IPHDR_CE; + break; } if (th->th_flags & TH_CWR) From owner-svn-src-all@freebsd.org Wed Jul 1 21:42:53 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2333035C65E; Wed, 1 Jul 2020 21:42:53 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xvpj06MXz3ZRP; Wed, 1 Jul 2020 21:42:53 +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 DB280100B6; Wed, 1 Jul 2020 21:42:52 +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 061LgqGU025601; Wed, 1 Jul 2020 21:42:52 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061LgqXK025599; Wed, 1 Jul 2020 21:42:52 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007012142.061LgqXK025599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 1 Jul 2020 21:42:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362870 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 362870 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 21:42:53 -0000 Author: tuexen Date: Wed Jul 1 21:42:52 2020 New Revision: 362870 URL: https://svnweb.freebsd.org/changeset/base/362870 Log: MFC r356227: Add flags for upcoming patches related to improved ECN handling. No functional change. Submitted by: rscheff Reviewed by: rgrimes, tuexen Differential Revision: https://reviews.freebsd.org/D22429 Modified: stable/12/sys/netinet/tcp.h stable/12/sys/netinet/tcp_syncache.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/tcp.h ============================================================================== --- stable/12/sys/netinet/tcp.h Wed Jul 1 21:40:27 2020 (r362869) +++ stable/12/sys/netinet/tcp.h Wed Jul 1 21:42:52 2020 (r362870) @@ -71,8 +71,9 @@ struct tcphdr { #define TH_URG 0x20 #define TH_ECE 0x40 #define TH_CWR 0x80 +#define TH_AE 0x100 /* maps into th_x2 */ #define TH_FLAGS (TH_FIN|TH_SYN|TH_RST|TH_PUSH|TH_ACK|TH_URG|TH_ECE|TH_CWR) -#define PRINT_TH_FLAGS "\20\1FIN\2SYN\3RST\4PUSH\5ACK\6URG\7ECE\10CWR" +#define PRINT_TH_FLAGS "\20\1FIN\2SYN\3RST\4PUSH\5ACK\6URG\7ECE\10CWR\11AE" u_short th_win; /* window */ u_short th_sum; /* checksum */ Modified: stable/12/sys/netinet/tcp_syncache.h ============================================================================== --- stable/12/sys/netinet/tcp_syncache.h Wed Jul 1 21:40:27 2020 (r362869) +++ stable/12/sys/netinet/tcp_syncache.h Wed Jul 1 21:42:52 2020 (r362870) @@ -90,6 +90,10 @@ struct syncache { #define SCF_SIGNATURE 0x20 /* send MD5 digests */ #define SCF_SACK 0x80 /* send SACK option */ #define SCF_ECN 0x100 /* send ECN setup packet */ +#define SCF_ACE_N 0x200 /* send ACE non-ECT setup */ +#define SCF_ACE_0 0x400 /* send ACE ECT0 setup */ +#define SCF_ACE_1 0x800 /* send ACE ECT1 setup */ +#define SCF_ACE_CE 0x1000 /* send ACE CE setup */ struct syncache_head { struct mtx sch_mtx; From owner-svn-src-all@freebsd.org Wed Jul 1 21:48:17 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E8B3135C7CD; Wed, 1 Jul 2020 21:48:17 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xvwx5yXXz3ZvN; Wed, 1 Jul 2020 21:48:17 +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 B0870FF71; Wed, 1 Jul 2020 21:48:17 +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 061LmHDx025925; Wed, 1 Jul 2020 21:48:17 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061LmHxh025924; Wed, 1 Jul 2020 21:48:17 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007012148.061LmHxh025924@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 1 Jul 2020 21:48:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362871 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 362871 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 21:48:18 -0000 Author: tuexen Date: Wed Jul 1 21:48:17 2020 New Revision: 362871 URL: https://svnweb.freebsd.org/changeset/base/362871 Log: MFC r355272: Make the TF_* flags easier readable by humans by adding leading zeroes to make them aligned. Submitted by: rscheff Reviewed by: rgrimes, rrs, tuexen Differential Revision: https://reviews.freebsd.org/D22428 Modified: stable/12/sys/netinet/tcp_var.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/tcp_var.h ============================================================================== --- stable/12/sys/netinet/tcp_var.h Wed Jul 1 21:42:52 2020 (r362870) +++ stable/12/sys/netinet/tcp_var.h Wed Jul 1 21:48:17 2020 (r362871) @@ -306,32 +306,32 @@ TAILQ_HEAD(tcp_funchead, tcp_function); /* * Flags and utility macros for the t_flags field. */ -#define TF_ACKNOW 0x000001 /* ack peer immediately */ -#define TF_DELACK 0x000002 /* ack, but try to delay it */ -#define TF_NODELAY 0x000004 /* don't delay packets to coalesce */ -#define TF_NOOPT 0x000008 /* don't use tcp options */ -#define TF_SENTFIN 0x000010 /* have sent FIN */ -#define TF_REQ_SCALE 0x000020 /* have/will request window scaling */ -#define TF_RCVD_SCALE 0x000040 /* other side has requested scaling */ -#define TF_REQ_TSTMP 0x000080 /* have/will request timestamps */ -#define TF_RCVD_TSTMP 0x000100 /* a timestamp was received in SYN */ -#define TF_SACK_PERMIT 0x000200 /* other side said I could SACK */ -#define TF_NEEDSYN 0x000400 /* send SYN (implicit state) */ -#define TF_NEEDFIN 0x000800 /* send FIN (implicit state) */ -#define TF_NOPUSH 0x001000 /* don't push */ -#define TF_PREVVALID 0x002000 /* saved values for bad rxmit valid */ -#define TF_MORETOCOME 0x010000 /* More data to be appended to sock */ -#define TF_LQ_OVERFLOW 0x020000 /* listen queue overflow */ -#define TF_LASTIDLE 0x040000 /* connection was previously idle */ -#define TF_RXWIN0SENT 0x080000 /* sent a receiver win 0 in response */ -#define TF_FASTRECOVERY 0x100000 /* in NewReno Fast Recovery */ -#define TF_WASFRECOVERY 0x200000 /* was in NewReno Fast Recovery */ -#define TF_SIGNATURE 0x400000 /* require MD5 digests (RFC2385) */ -#define TF_FORCEDATA 0x800000 /* force out a byte */ -#define TF_TSO 0x1000000 /* TSO enabled on this connection */ -#define TF_TOE 0x2000000 /* this connection is offloaded */ -#define TF_ECN_PERMIT 0x4000000 /* connection ECN-ready */ -#define TF_ECN_SND_CWR 0x8000000 /* ECN CWR in queue */ +#define TF_ACKNOW 0x00000001 /* ack peer immediately */ +#define TF_DELACK 0x00000002 /* ack, but try to delay it */ +#define TF_NODELAY 0x00000004 /* don't delay packets to coalesce */ +#define TF_NOOPT 0x00000008 /* don't use tcp options */ +#define TF_SENTFIN 0x00000010 /* have sent FIN */ +#define TF_REQ_SCALE 0x00000020 /* have/will request window scaling */ +#define TF_RCVD_SCALE 0x00000040 /* other side has requested scaling */ +#define TF_REQ_TSTMP 0x00000080 /* have/will request timestamps */ +#define TF_RCVD_TSTMP 0x00000100 /* a timestamp was received in SYN */ +#define TF_SACK_PERMIT 0x00000200 /* other side said I could SACK */ +#define TF_NEEDSYN 0x00000400 /* send SYN (implicit state) */ +#define TF_NEEDFIN 0x00000800 /* send FIN (implicit state) */ +#define TF_NOPUSH 0x00001000 /* don't push */ +#define TF_PREVVALID 0x00002000 /* saved values for bad rxmit valid */ +#define TF_MORETOCOME 0x00010000 /* More data to be appended to sock */ +#define TF_LQ_OVERFLOW 0x00020000 /* listen queue overflow */ +#define TF_LASTIDLE 0x00040000 /* connection was previously idle */ +#define TF_RXWIN0SENT 0x00080000 /* sent a receiver win 0 in response */ +#define TF_FASTRECOVERY 0x00100000 /* in NewReno Fast Recovery */ +#define TF_WASFRECOVERY 0x00200000 /* was in NewReno Fast Recovery */ +#define TF_SIGNATURE 0x00400000 /* require MD5 digests (RFC2385) */ +#define TF_FORCEDATA 0x00800000 /* force out a byte */ +#define TF_TSO 0x01000000 /* TSO enabled on this connection */ +#define TF_TOE 0x02000000 /* this connection is offloaded */ +#define TF_ECN_PERMIT 0x04000000 /* connection ECN-ready */ +#define TF_ECN_SND_CWR 0x08000000 /* ECN CWR in queue */ #define TF_ECN_SND_ECE 0x10000000 /* ECN ECE in queue */ #define TF_CONGRECOVERY 0x20000000 /* congestion recovery mode */ #define TF_WASCRECOVERY 0x40000000 /* was in congestion recovery */ From owner-svn-src-all@freebsd.org Wed Jul 1 21:52:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E840F35CB05; Wed, 1 Jul 2020 21:52:14 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xw1V5rnFz3bFY; Wed, 1 Jul 2020 21:52:14 +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 AC3EB10406; Wed, 1 Jul 2020 21:52:14 +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 061LqEBf029548; Wed, 1 Jul 2020 21:52:14 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061LqE6i029546; Wed, 1 Jul 2020 21:52:14 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007012152.061LqE6i029546@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 1 Jul 2020 21:52:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362872 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 362872 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 21:52:15 -0000 Author: tuexen Date: Wed Jul 1 21:52:14 2020 New Revision: 362872 URL: https://svnweb.freebsd.org/changeset/base/362872 Log: MFC r356270: Improve input validation of the spp_pathmtu field in the SCTP_PEER_ADDR_PARAMS socket option. The code in the stack assumes sane values for the MTU. This issue was found by running an instance of syzkaller. MFC r356271: Remove empty line which was added in previous commit by accident. Modified: stable/12/sys/netinet/sctp.h stable/12/sys/netinet/sctp_usrreq.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp.h ============================================================================== --- stable/12/sys/netinet/sctp.h Wed Jul 1 21:48:17 2020 (r362871) +++ stable/12/sys/netinet/sctp.h Wed Jul 1 21:52:14 2020 (r362872) @@ -585,8 +585,10 @@ struct sctp_error_auth_invalid_hmac { #define SCTP_MOBILITY_PRIM_DELETED 0x00000004 -#define SCTP_SMALLEST_PMTU 512 /* smallest pmtu allowed when disabling PMTU - * discovery */ +/* Smallest PMTU allowed when disabling PMTU discovery */ +#define SCTP_SMALLEST_PMTU 512 +/* Largest PMTU allowed when disabling PMTU discovery */ +#define SCTP_LARGEST_PMTU 65536 #undef SCTP_PACKED Modified: stable/12/sys/netinet/sctp_usrreq.c ============================================================================== --- stable/12/sys/netinet/sctp_usrreq.c Wed Jul 1 21:48:17 2020 (r362871) +++ stable/12/sys/netinet/sctp_usrreq.c Wed Jul 1 21:52:14 2020 (r362872) @@ -5363,6 +5363,14 @@ sctp_setopt(struct socket *so, int optname, void *optv SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); return (EINVAL); } + if ((paddrp->spp_flags & SPP_PMTUD_DISABLE) && + ((paddrp->spp_pathmtu < SCTP_SMALLEST_PMTU) || + (paddrp->spp_pathmtu > SCTP_LARGEST_PMTU))) { + if (stcb) + SCTP_TCB_UNLOCK(stcb); + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); + return (EINVAL); + } if (stcb != NULL) { /************************TCB SPECIFIC SET ******************/ @@ -5394,7 +5402,7 @@ sctp_setopt(struct socket *so, int optname, void *optv sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net); } } - if ((paddrp->spp_flags & SPP_PMTUD_DISABLE) && (paddrp->spp_pathmtu >= SCTP_SMALLEST_PMTU)) { + if (paddrp->spp_flags & SPP_PMTUD_DISABLE) { if (SCTP_OS_TIMER_PENDING(&net->pmtu_timer.timer)) { sctp_timer_stop(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net, SCTP_FROM_SCTP_USRREQ + SCTP_LOC_11); @@ -5536,7 +5544,7 @@ sctp_setopt(struct socket *so, int optname, void *optv } sctp_stcb_feature_on(inp, stcb, SCTP_PCB_FLAGS_DONOT_HEARTBEAT); } - if ((paddrp->spp_flags & SPP_PMTUD_DISABLE) && (paddrp->spp_pathmtu >= SCTP_SMALLEST_PMTU)) { + if (paddrp->spp_flags & SPP_PMTUD_DISABLE) { TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { if (SCTP_OS_TIMER_PENDING(&net->pmtu_timer.timer)) { sctp_timer_stop(SCTP_TIMER_TYPE_PATHMTURAISE, inp, stcb, net, @@ -5635,9 +5643,7 @@ sctp_setopt(struct socket *so, int optname, void *optv inp->sctp_ep.default_mtu = 0; sctp_feature_off(inp, SCTP_PCB_FLAGS_DO_NOT_PMTUD); } else if (paddrp->spp_flags & SPP_PMTUD_DISABLE) { - if (paddrp->spp_pathmtu >= SCTP_SMALLEST_PMTU) { - inp->sctp_ep.default_mtu = paddrp->spp_pathmtu; - } + inp->sctp_ep.default_mtu = paddrp->spp_pathmtu; sctp_feature_on(inp, SCTP_PCB_FLAGS_DO_NOT_PMTUD); } if (paddrp->spp_flags & SPP_DSCP) { From owner-svn-src-all@freebsd.org Wed Jul 1 21:54:40 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id ED44C35C972; Wed, 1 Jul 2020 21:54:40 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xw4J5yhrz3bXB; Wed, 1 Jul 2020 21:54:40 +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 AC06010293; Wed, 1 Jul 2020 21:54:40 +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 061Lsefo032046; Wed, 1 Jul 2020 21:54:40 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061Lsd3C032039; Wed, 1 Jul 2020 21:54:39 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007012154.061Lsd3C032039@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 1 Jul 2020 21:54:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362873 - in stable/12: share/man/man4 sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: in stable/12: share/man/man4 sys/netinet X-SVN-Commit-Revision: 362873 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 21:54:41 -0000 Author: tuexen Date: Wed Jul 1 21:54:39 2020 New Revision: 362873 URL: https://svnweb.freebsd.org/changeset/base/362873 Log: MFC r356357: Make the message size limit used for SCTP_SENDALL configurable via a sysctl variable instead of a compiled in constant. This is based on a patch provided by nwhitehorn. Modified: stable/12/share/man/man4/sctp.4 stable/12/sys/netinet/sctp.h stable/12/sys/netinet/sctp_output.c stable/12/sys/netinet/sctp_sysctl.c stable/12/sys/netinet/sctp_sysctl.h Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/sctp.4 ============================================================================== --- stable/12/share/man/man4/sctp.4 Wed Jul 1 21:52:14 2020 (r362872) +++ stable/12/share/man/man4/sctp.4 Wed Jul 1 21:54:39 2020 (r362873) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 10, 2018 +.Dd January 4, 2020 .Dt SCTP 4 .Os .Sh NAME @@ -472,6 +472,8 @@ Enable SCTP blackholing. See .Xr blackhole 4 for more details. +.It Va sendall_limit +Maximum message size (in bytes) that can be transmitted with SCTP_SENDALL flags set. .It Va buffer_splitting Enable send/receive buffer splitting. .It Va vtag_time_wait Modified: stable/12/sys/netinet/sctp.h ============================================================================== --- stable/12/sys/netinet/sctp.h Wed Jul 1 21:52:14 2020 (r362872) +++ stable/12/sys/netinet/sctp.h Wed Jul 1 21:54:39 2020 (r362873) @@ -491,7 +491,6 @@ struct sctp_error_auth_invalid_hmac { * time */ #define SCTP_SAT_NETWORK_BURST_INCR 2 /* how many times to multiply maxburst * in sat */ -#define SCTP_MAX_SENDALL_LIMIT 1024 /* Data Chuck Specific Flags */ #define SCTP_DATA_FRAG_MASK 0x03 Modified: stable/12/sys/netinet/sctp_output.c ============================================================================== --- stable/12/sys/netinet/sctp_output.c Wed Jul 1 21:52:14 2020 (r362872) +++ stable/12/sys/netinet/sctp_output.c Wed Jul 1 21:54:39 2020 (r362873) @@ -6885,8 +6885,8 @@ sctp_sendall(struct sctp_inpcb *inp, struct uio *uio, /* There is another. */ return (EBUSY); } - if (uio->uio_resid > SCTP_MAX_SENDALL_LIMIT) { - /* You must be less than the max! */ + if (uio->uio_resid > SCTP_BASE_SYSCTL(sctp_sendall_limit)) { + /* You must not be larger than the limit! */ return (EMSGSIZE); } SCTP_MALLOC(ca, struct sctp_copy_all *, sizeof(struct sctp_copy_all), Modified: stable/12/sys/netinet/sctp_sysctl.c ============================================================================== --- stable/12/sys/netinet/sctp_sysctl.c Wed Jul 1 21:52:14 2020 (r362872) +++ stable/12/sys/netinet/sctp_sysctl.c Wed Jul 1 21:54:39 2020 (r362873) @@ -119,6 +119,7 @@ sctp_init_sysctls() SCTP_BASE_SYSCTL(sctp_steady_step) = SCTPCTL_RTTVAR_STEADYS_DEFAULT; SCTP_BASE_SYSCTL(sctp_use_dccc_ecn) = SCTPCTL_RTTVAR_DCCCECN_DEFAULT; SCTP_BASE_SYSCTL(sctp_blackhole) = SCTPCTL_BLACKHOLE_DEFAULT; + SCTP_BASE_SYSCTL(sctp_sendall_limit) = SCTPCTL_SENDALL_LIMIT_DEFAULT; SCTP_BASE_SYSCTL(sctp_diag_info_code) = SCTPCTL_DIAG_INFO_CODE_DEFAULT; #if defined(SCTP_LOCAL_TRACE_BUF) memset(&SCTP_BASE_SYSCTL(sctp_log), 0, sizeof(struct sctp_log)); @@ -943,6 +944,7 @@ SCTP_UINT_SYSCTL(rttvar_eqret, sctp_rttvar_eqret, SCTP SCTP_UINT_SYSCTL(rttvar_steady_step, sctp_steady_step, SCTPCTL_RTTVAR_STEADYS) SCTP_UINT_SYSCTL(use_dcccecn, sctp_use_dccc_ecn, SCTPCTL_RTTVAR_DCCCECN) SCTP_UINT_SYSCTL(blackhole, sctp_blackhole, SCTPCTL_BLACKHOLE) +SCTP_UINT_SYSCTL(sendall_limit, sctp_sendall_limit, SCTPCTL_SENDALL_LIMIT) SCTP_UINT_SYSCTL(diag_info_code, sctp_diag_info_code, SCTPCTL_DIAG_INFO_CODE) #ifdef SCTP_DEBUG SCTP_UINT_SYSCTL(debug, sctp_debug_on, SCTPCTL_DEBUG) Modified: stable/12/sys/netinet/sctp_sysctl.h ============================================================================== --- stable/12/sys/netinet/sctp_sysctl.h Wed Jul 1 21:52:14 2020 (r362872) +++ stable/12/sys/netinet/sctp_sysctl.h Wed Jul 1 21:54:39 2020 (r362873) @@ -116,6 +116,7 @@ struct sctp_sysctl { uint32_t sctp_buffer_splitting; uint32_t sctp_initial_cwnd; uint32_t sctp_blackhole; + uint32_t sctp_sendall_limit; #if defined(SCTP_DEBUG) uint32_t sctp_debug_on; #endif @@ -537,6 +538,12 @@ struct sctp_sysctl { #define SCTPCTL_BLACKHOLE_MIN 0 #define SCTPCTL_BLACKHOLE_MAX 2 #define SCTPCTL_BLACKHOLE_DEFAULT SCTPCTL_BLACKHOLE_MIN + +/* sendall_limit: Maximum message with SCTP_SENDALL */ +#define SCTPCTL_SENDALL_LIMIT_DESC "Maximum size of a message send with SCTP_SENDALL" +#define SCTPCTL_SENDALL_LIMIT_MIN 0 +#define SCTPCTL_SENDALL_LIMIT_MAX 0xFFFFFFFF +#define SCTPCTL_SENDALL_LIMIT_DEFAULT 1432 #define SCTPCTL_DIAG_INFO_CODE_DESC "Diagnostic information error cause code" #define SCTPCTL_DIAG_INFO_CODE_MIN 0 From owner-svn-src-all@freebsd.org Wed Jul 1 21:56:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2E56135CAD9; Wed, 1 Jul 2020 21:56:21 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xw6F0PZ6z3bgg; Wed, 1 Jul 2020 21:56:21 +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 E5C8010409; Wed, 1 Jul 2020 21:56:20 +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 061LuKLi032206; Wed, 1 Jul 2020 21:56:20 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061LuKjX032205; Wed, 1 Jul 2020 21:56:20 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007012156.061LuKjX032205@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 1 Jul 2020 21:56:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362874 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 362874 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 21:56:21 -0000 Author: tuexen Date: Wed Jul 1 21:56:20 2020 New Revision: 362874 URL: https://svnweb.freebsd.org/changeset/base/362874 Log: MFC r356376: Ensure that we don't miss a trigger for kicking off the SCTP iterator. Reported by: nwhitehorn Modified: stable/12/sys/netinet/sctputil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Wed Jul 1 21:54:39 2020 (r362873) +++ stable/12/sys/netinet/sctputil.c Wed Jul 1 21:56:20 2020 (r362874) @@ -1475,12 +1475,11 @@ no_stcb: void sctp_iterator_worker(void) { - struct sctp_iterator *it, *nit; + struct sctp_iterator *it; /* This function is called with the WQ lock in place */ - sctp_it_ctl.iterator_running = 1; - TAILQ_FOREACH_SAFE(it, &sctp_it_ctl.iteratorhead, sctp_nxt_itr, nit) { + while ((it = TAILQ_FIRST(&sctp_it_ctl.iteratorhead)) != NULL) { /* now lets work on this one */ TAILQ_REMOVE(&sctp_it_ctl.iteratorhead, it, sctp_nxt_itr); SCTP_IPI_ITERATOR_WQ_UNLOCK(); From owner-svn-src-all@freebsd.org Wed Jul 1 21:57:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9B24E35CD40; Wed, 1 Jul 2020 21:57:41 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xw7n3bgkz3bn3; Wed, 1 Jul 2020 21:57:41 +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 5EC08103CD; Wed, 1 Jul 2020 21:57:41 +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 061Lvf2F032317; Wed, 1 Jul 2020 21:57:41 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061Lvfdv032316; Wed, 1 Jul 2020 21:57:41 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007012157.061Lvfdv032316@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 1 Jul 2020 21:57:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362875 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 362875 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 21:57:41 -0000 Author: tuexen Date: Wed Jul 1 21:57:40 2020 New Revision: 362875 URL: https://svnweb.freebsd.org/changeset/base/362875 Log: MFC r356377: Return -1 consistently if an error occurs. Modified: stable/12/sys/netinet/sctp_pcb.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_pcb.c ============================================================================== --- stable/12/sys/netinet/sctp_pcb.c Wed Jul 1 21:56:20 2020 (r362874) +++ stable/12/sys/netinet/sctp_pcb.c Wed Jul 1 21:57:40 2020 (r362875) @@ -7131,7 +7131,7 @@ sctp_initiate_iterator(inp_func inpf, SCTP_M_ITER); if (it == NULL) { SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_PCB, ENOMEM); - return (ENOMEM); + return (-1); } memset(it, 0, sizeof(*it)); it->function_assoc = af; From owner-svn-src-all@freebsd.org Wed Jul 1 21:59:19 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 285A635CF82; Wed, 1 Jul 2020 21:59:19 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xw9g0FRsz3br0; Wed, 1 Jul 2020 21:59:19 +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 E0006100F0; Wed, 1 Jul 2020 21:59:18 +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 061LxIqi032441; Wed, 1 Jul 2020 21:59:18 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061LxI1R032440; Wed, 1 Jul 2020 21:59:18 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007012159.061LxI1R032440@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 1 Jul 2020 21:59:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362876 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 362876 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 21:59:19 -0000 Author: tuexen Date: Wed Jul 1 21:59:18 2020 New Revision: 362876 URL: https://svnweb.freebsd.org/changeset/base/362876 Log: MFC r356378: Don't mark the sendall iterator as being up if it could not be started. Modified: stable/12/sys/netinet/sctp_output.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_output.c ============================================================================== --- stable/12/sys/netinet/sctp_output.c Wed Jul 1 21:57:40 2020 (r362875) +++ stable/12/sys/netinet/sctp_output.c Wed Jul 1 21:59:18 2020 (r362876) @@ -6932,7 +6932,7 @@ sctp_sendall(struct sctp_inpcb *inp, struct uio *uio, (void *)ca, 0, sctp_sendall_completes, inp, 1); if (ret) { - SCTP_PRINTF("Failed to initiate iterator for sendall\n"); + inp->sctp_flags &= ~SCTP_PCB_FLAGS_SND_ITERATOR_UP; SCTP_FREE(ca, SCTP_M_COPYAL); SCTP_LTRACE_ERR_RET_PKT(m, inp, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, EFAULT); return (EFAULT); From owner-svn-src-all@freebsd.org Wed Jul 1 22:00:36 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 49AE235CE44; Wed, 1 Jul 2020 22:00:36 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xwC8197sz3c5T; Wed, 1 Jul 2020 22:00:36 +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 0BB861040E; Wed, 1 Jul 2020 22:00:36 +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 061M0Zwi033362; Wed, 1 Jul 2020 22:00:35 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061M0ZE9033361; Wed, 1 Jul 2020 22:00:35 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007012200.061M0ZE9033361@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 1 Jul 2020 22:00:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362877 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 362877 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 22:00:36 -0000 Author: tuexen Date: Wed Jul 1 22:00:35 2020 New Revision: 362877 URL: https://svnweb.freebsd.org/changeset/base/362877 Log: MFC r356660: Fix division by zero issue. Thanks to Stas Denisov for reporting the issue for the userland stack and providing a fix. Modified: stable/12/sys/netinet/sctp_cc_functions.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_cc_functions.c ============================================================================== --- stable/12/sys/netinet/sctp_cc_functions.c Wed Jul 1 21:59:18 2020 (r362876) +++ stable/12/sys/netinet/sctp_cc_functions.c Wed Jul 1 22:00:35 2020 (r362877) @@ -1876,7 +1876,7 @@ htcp_cong_time(struct htcp *ca) static inline uint32_t htcp_ccount(struct htcp *ca) { - return (htcp_cong_time(ca) / ca->minRTT); + return (ca->minRTT == 0 ? htcp_cong_time(ca) : htcp_cong_time(ca) / ca->minRTT); } static inline void From owner-svn-src-all@freebsd.org Wed Jul 1 22:22:27 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D3D5E35D422; Wed, 1 Jul 2020 22:22:27 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xwhM5JXtz3dHQ; Wed, 1 Jul 2020 22:22: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 9AD8E1088E; Wed, 1 Jul 2020 22:22: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 061MMRu1051093; Wed, 1 Jul 2020 22:22:27 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061MMQUT051087; Wed, 1 Jul 2020 22:22:26 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007012222.061MMQUT051087@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 1 Jul 2020 22:22:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362878 - in stable/12/sys: netinet netinet6 X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: in stable/12/sys: netinet netinet6 X-SVN-Commit-Revision: 362878 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 22:22:27 -0000 Author: tuexen Date: Wed Jul 1 22:22:26 2020 New Revision: 362878 URL: https://svnweb.freebsd.org/changeset/base/362878 Log: MFC r356663: Fix race when accepting TCP connections. When expanding a SYN-cache entry to a socket/inp a two step approach was taken: 1) The local address was filled in, then the inp was added to the hash table. 2) The remote address was filled in and the inp was relocated in the hash table. Before the epoch changes, a write lock was held when this happens and the code looking up entries was holding a corresponding read lock. Since the read lock is gone away after the introduction of the epochs, the half populated inp was found during lookup. This resulted in processing TCP segments in the context of the wrong TCP connection. This patch changes the above procedure in a way that the inp is fully populated before inserted into the hash table. Thanks to Paul for reporting the issue on the net@ mailing list and for testing the patch! Reviewed by: rrs@ Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D22971 Modified: stable/12/sys/netinet/in_pcb.c stable/12/sys/netinet/in_pcb.h stable/12/sys/netinet/tcp_syncache.c stable/12/sys/netinet6/in6_pcb.c stable/12/sys/netinet6/in6_pcb.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/in_pcb.c ============================================================================== --- stable/12/sys/netinet/in_pcb.c Wed Jul 1 22:00:35 2020 (r362877) +++ stable/12/sys/netinet/in_pcb.c Wed Jul 1 22:22:26 2020 (r362878) @@ -1003,7 +1003,7 @@ in_pcbbind_setup(struct inpcb *inp, struct sockaddr *n */ int in_pcbconnect_mbuf(struct inpcb *inp, struct sockaddr *nam, - struct ucred *cred, struct mbuf *m) + struct ucred *cred, struct mbuf *m, bool rehash) { u_short lport, fport; in_addr_t laddr, faddr; @@ -1022,6 +1022,8 @@ in_pcbconnect_mbuf(struct inpcb *inp, struct sockaddr /* Do the initial binding of the local address if required. */ if (inp->inp_laddr.s_addr == INADDR_ANY && inp->inp_lport == 0) { + KASSERT(rehash == true, + ("Rehashing required for unbound inps")); inp->inp_lport = lport; inp->inp_laddr.s_addr = laddr; if (in_pcbinshash(inp) != 0) { @@ -1036,7 +1038,11 @@ in_pcbconnect_mbuf(struct inpcb *inp, struct sockaddr inp->inp_laddr.s_addr = laddr; inp->inp_faddr.s_addr = faddr; inp->inp_fport = fport; - in_pcbrehash_mbuf(inp, m); + if (rehash) { + in_pcbrehash_mbuf(inp, m); + } else { + in_pcbinshash_mbuf(inp, m); + } if (anonport) inp->inp_flags |= INP_ANONPORT; @@ -1047,7 +1053,7 @@ int in_pcbconnect(struct inpcb *inp, struct sockaddr *nam, struct ucred *cred) { - return (in_pcbconnect_mbuf(inp, nam, cred, NULL)); + return (in_pcbconnect_mbuf(inp, nam, cred, NULL, true)); } /* @@ -2543,7 +2549,7 @@ in_pcblookup_mbuf(struct inpcbinfo *pcbinfo, struct in * Insert PCB onto various hash lists. */ static int -in_pcbinshash_internal(struct inpcb *inp, int do_pcbgroup_update) +in_pcbinshash_internal(struct inpcb *inp, struct mbuf *m) { struct inpcbhead *pcbhash; struct inpcbporthead *pcbporthash; @@ -2609,35 +2615,27 @@ in_pcbinshash_internal(struct inpcb *inp, int do_pcbgr CK_LIST_INSERT_HEAD(pcbhash, inp, inp_hash); inp->inp_flags |= INP_INHASHLIST; #ifdef PCBGROUP - if (do_pcbgroup_update) + if (m != NULL) { + in_pcbgroup_update_mbuf(inp, m); + } else { in_pcbgroup_update(inp); + } #endif return (0); } -/* - * For now, there are two public interfaces to insert an inpcb into the hash - * lists -- one that does update pcbgroups, and one that doesn't. The latter - * is used only in the TCP syncache, where in_pcbinshash is called before the - * full 4-tuple is set for the inpcb, and we don't want to install in the - * pcbgroup until later. - * - * XXXRW: This seems like a misfeature. in_pcbinshash should always update - * connection groups, and partially initialised inpcbs should not be exposed - * to either reservation hash tables or pcbgroups. - */ int in_pcbinshash(struct inpcb *inp) { - return (in_pcbinshash_internal(inp, 1)); + return (in_pcbinshash_internal(inp, NULL)); } int -in_pcbinshash_nopcbgroup(struct inpcb *inp) +in_pcbinshash_mbuf(struct inpcb *inp, struct mbuf *m) { - return (in_pcbinshash_internal(inp, 0)); + return (in_pcbinshash_internal(inp, m)); } /* Modified: stable/12/sys/netinet/in_pcb.h ============================================================================== --- stable/12/sys/netinet/in_pcb.h Wed Jul 1 22:00:35 2020 (r362877) +++ stable/12/sys/netinet/in_pcb.h Wed Jul 1 22:22:26 2020 (r362878) @@ -846,7 +846,7 @@ int in_pcbbind_setup(struct inpcb *, struct sockaddr * u_short *, struct ucred *); int in_pcbconnect(struct inpcb *, struct sockaddr *, struct ucred *); int in_pcbconnect_mbuf(struct inpcb *, struct sockaddr *, struct ucred *, - struct mbuf *); + struct mbuf *, bool); int in_pcbconnect_setup(struct inpcb *, struct sockaddr *, in_addr_t *, u_short *, in_addr_t *, u_short *, struct inpcb **, struct ucred *); @@ -855,7 +855,7 @@ void in_pcbdisconnect(struct inpcb *); void in_pcbdrop(struct inpcb *); void in_pcbfree(struct inpcb *); int in_pcbinshash(struct inpcb *); -int in_pcbinshash_nopcbgroup(struct inpcb *); +int in_pcbinshash_mbuf(struct inpcb *, struct mbuf *); int in_pcbladdr(struct inpcb *, struct in_addr *, struct in_addr *, struct ucred *); struct inpcb * Modified: stable/12/sys/netinet/tcp_syncache.c ============================================================================== --- stable/12/sys/netinet/tcp_syncache.c Wed Jul 1 22:00:35 2020 (r362877) +++ stable/12/sys/netinet/tcp_syncache.c Wed Jul 1 22:22:26 2020 (r362878) @@ -779,34 +779,8 @@ syncache_socket(struct syncache *sc, struct socket *ls inp->inp_flowtype = M_HASHTYPE_GET(m); } - /* - * Install in the reservation hash table for now, but don't yet - * install a connection group since the full 4-tuple isn't yet - * configured. - */ inp->inp_lport = sc->sc_inc.inc_lport; - if ((error = in_pcbinshash_nopcbgroup(inp)) != 0) { - /* - * Undo the assignments above if we failed to - * put the PCB on the hash lists. - */ #ifdef INET6 - if (sc->sc_inc.inc_flags & INC_ISIPV6) - inp->in6p_laddr = in6addr_any; - else -#endif - inp->inp_laddr.s_addr = INADDR_ANY; - inp->inp_lport = 0; - if ((s = tcp_log_addrs(&sc->sc_inc, NULL, NULL, NULL))) { - log(LOG_DEBUG, "%s; %s: in_pcbinshash failed " - "with error %i\n", - s, __func__, error); - free(s, M_TCPLOG); - } - INP_HASH_WUNLOCK(&V_tcbinfo); - goto abort; - } -#ifdef INET6 if (inp->inp_vflag & INP_IPV6PROTO) { struct inpcb *oinp = sotoinpcb(lso); @@ -838,7 +812,7 @@ syncache_socket(struct syncache *sc, struct socket *ls if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr)) inp->in6p_laddr = sc->sc_inc.inc6_laddr; if ((error = in6_pcbconnect_mbuf(inp, (struct sockaddr *)&sin6, - thread0.td_ucred, m)) != 0) { + thread0.td_ucred, m, false)) != 0) { inp->in6p_laddr = laddr6; if ((s = tcp_log_addrs(&sc->sc_inc, NULL, NULL, NULL))) { log(LOG_DEBUG, "%s; %s: in6_pcbconnect failed " @@ -878,7 +852,7 @@ syncache_socket(struct syncache *sc, struct socket *ls if (inp->inp_laddr.s_addr == INADDR_ANY) inp->inp_laddr = sc->sc_inc.inc_laddr; if ((error = in_pcbconnect_mbuf(inp, (struct sockaddr *)&sin, - thread0.td_ucred, m)) != 0) { + thread0.td_ucred, m, false)) != 0) { inp->inp_laddr = laddr; if ((s = tcp_log_addrs(&sc->sc_inc, NULL, NULL, NULL))) { log(LOG_DEBUG, "%s; %s: in_pcbconnect failed " Modified: stable/12/sys/netinet6/in6_pcb.c ============================================================================== --- stable/12/sys/netinet6/in6_pcb.c Wed Jul 1 22:00:35 2020 (r362877) +++ stable/12/sys/netinet6/in6_pcb.c Wed Jul 1 22:22:26 2020 (r362878) @@ -409,13 +409,12 @@ in6_pcbladdr(struct inpcb *inp, struct sockaddr *nam, */ int in6_pcbconnect_mbuf(struct inpcb *inp, struct sockaddr *nam, - struct ucred *cred, struct mbuf *m) + struct ucred *cred, struct mbuf *m, bool rehash) { struct inpcbinfo *pcbinfo = inp->inp_pcbinfo; struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)nam; struct sockaddr_in6 laddr6; int error; - bool rehash = true; bzero(&laddr6, sizeof(laddr6)); laddr6.sin6_family = AF_INET6; @@ -439,6 +438,8 @@ in6_pcbconnect_mbuf(struct inpcb *inp, struct sockaddr } if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr)) { if (inp->inp_lport == 0) { + KASSERT(rehash == true, + ("Rehashing required for unbound inps")); rehash = false; error = in_pcb_lport_dest(inp, (struct sockaddr *) &laddr6, &inp->inp_lport, @@ -459,7 +460,7 @@ in6_pcbconnect_mbuf(struct inpcb *inp, struct sockaddr if (rehash) { in_pcbrehash_mbuf(inp, m); } else { - in_pcbinshash(inp); + in_pcbinshash_mbuf(inp, m); } return (0); @@ -469,7 +470,7 @@ int in6_pcbconnect(struct inpcb *inp, struct sockaddr *nam, struct ucred *cred) { - return (in6_pcbconnect_mbuf(inp, nam, cred, NULL)); + return (in6_pcbconnect_mbuf(inp, nam, cred, NULL, true)); } void Modified: stable/12/sys/netinet6/in6_pcb.h ============================================================================== --- stable/12/sys/netinet6/in6_pcb.h Wed Jul 1 22:00:35 2020 (r362877) +++ stable/12/sys/netinet6/in6_pcb.h Wed Jul 1 22:22:26 2020 (r362878) @@ -86,7 +86,7 @@ void in6_losing(struct inpcb *); int in6_pcbbind(struct inpcb *, struct sockaddr *, struct ucred *); int in6_pcbconnect(struct inpcb *, struct sockaddr *, struct ucred *); int in6_pcbconnect_mbuf(struct inpcb *, struct sockaddr *, - struct ucred *, struct mbuf *); + struct ucred *, struct mbuf *, bool); void in6_pcbdisconnect(struct inpcb *); struct inpcb * in6_pcblookup_local(struct inpcbinfo *, From owner-svn-src-all@freebsd.org Wed Jul 1 22:31:37 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E8EB735D6B5; Wed, 1 Jul 2020 22:31:37 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xwtx5bXkz3f0y; Wed, 1 Jul 2020 22:31:37 +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 A251E1089E; Wed, 1 Jul 2020 22:31:37 +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 061MVblg052606; Wed, 1 Jul 2020 22:31:37 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061MVbMi052605; Wed, 1 Jul 2020 22:31:37 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007012231.061MVbMi052605@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 1 Jul 2020 22:31:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362879 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 362879 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 22:31:38 -0000 Author: tuexen Date: Wed Jul 1 22:31:37 2020 New Revision: 362879 URL: https://svnweb.freebsd.org/changeset/base/362879 Log: MFC r356796: Remove debug code not needed anymore. Submitted by: rscheff Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D23208 Modified: stable/12/sys/netinet/tcp_sack.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/tcp_sack.c ============================================================================== --- stable/12/sys/netinet/tcp_sack.c Wed Jul 1 22:22:26 2020 (r362878) +++ stable/12/sys/netinet/tcp_sack.c Wed Jul 1 22:31:37 2020 (r362879) @@ -165,11 +165,6 @@ tcp_update_dsack_list(struct tcpcb *tp, tcp_seq rcv_st KASSERT(SEQ_LT(rcv_start, rcv_end), ("rcv_start < rcv_end")); - if (tp->t_inpcb->inp_socket->so_options & SO_DEBUG) { - log(LOG_DEBUG, "\nDSACK update: %d..%d, rcv_nxt: %u\n", - rcv_start, rcv_end, tp->rcv_nxt); - } - if (SEQ_LT(rcv_end, tp->rcv_nxt) || ((rcv_end == tp->rcv_nxt) && (tp->rcv_numsacks > 0 ) && From owner-svn-src-all@freebsd.org Wed Jul 1 23:07:22 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 565D235E0DA; Wed, 1 Jul 2020 23:07:22 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 49xxh95DRcz3g6v; Wed, 1 Jul 2020 23:07:21 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 061N7DUh058638; Wed, 1 Jul 2020 16:07:13 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 061N7Cpk058637; Wed, 1 Jul 2020 16:07:13 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202007012307.061N7Cpk058637@gndrsh.dnsmgr.net> Subject: Re: svn commit: r362809 - head/contrib/mandoc In-Reply-To: <20200701212847.GA1751@lion.0xfce3.net> To: Gordon Bergling Date: Wed, 1 Jul 2020 16:07:12 -0700 (PDT) CC: Warner Losh , "Rodney W. Grimes" , src-committers , svn-src-all , svn-src-head 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: 49xxh95DRcz3g6v X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 23:07:22 -0000 > On Wed, Jul 01, 2020 at 11:58:05AM -0600, Warner Losh wrote: > > On Wed, Jul 1, 2020 at 8:51 AM Rodney W. Grimes > > wrote: > > > > > > On Tue, Jun 30, 2020 at 03:56:17PM -0700, Rodney W. Grimes wrote: > > > > > [ Charset UTF-8 unsupported, converting... ] > > > > > > Author: gbe (doc committer) > > > > > > Date: Tue Jun 30 18:08:59 2020 > > > > > > New Revision: 362809 > > > > > > URL: https://svnweb.freebsd.org/changeset/base/362809 > > > > > > > > > > > > Log: > > > > > > Mention FreeBSD in the HISTORY sections of apropos(1) and > > > makewhatis(8). > > > > > > > > > > > > PR: 223520, 223521 > > > > > > Reviewed by: bcr (mentor) > > > > > > Approved by: bcr (mentor) > > > > > > Differential Revision: https://reviews.freebsd.org/D25521 > > > > > > > > > > > > Modified: > > > > > > head/contrib/mandoc/apropos.1 > > > > > > head/contrib/mandoc/makewhatis.8 > > > > > > > > > > > > Modified: head/contrib/mandoc/apropos.1 > > > > > > > > > ============================================================================== > > > > > > --- head/contrib/mandoc/apropos.1 Tue Jun 30 17:21:28 2020 > > > (r362808) > > > > > > +++ head/contrib/mandoc/apropos.1 Tue Jun 30 18:08:59 2020 > > > (r362809) > > > > > > @@ -15,7 +15,7 @@ > > > > > > .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, > > > ARISING OUT OF > > > > > > .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. > > > > > > .\" > > > > > > -.Dd $Mdocdate: November 22 2018 $ > > > > > > +.Dd $Mdocdate: June 30 2020 $ > > > > > > .Dt APROPOS 1 > > > > > > .Os > > > > > > .Sh NAME > > > > > > @@ -493,6 +493,12 @@ The options > > > > > > .Fl acfhIKklOTWw > > > > > > appeared in > > > > > > .Ox 5.7 . > > > > > > +.Pp > > > > > > +The > > > > > > +.Nm > > > > > > +utility was integrated into > > > > > > +.Fx 11.1 > > > > > > +as part of the switch to mandoc. > > > > > > > > > > Huh? FreeBSD has had apropos since 1.0 and my 5.4 system clearly has > > > it: > > > > > freebsd {110}% uname -a > > > > > FreeBSD pdx.rh.CN85.dnsmgr.net 5.4-RELEASE-p8 FreeBSD 5.4-RELEASE-p8 > > > #1: Mon Jul 1 17:58:50 PDT 2019 root@pdx.rh.CN85.dnsmgr.net:/usr/src/sys/i386/compile/PDXMXPIE > > > i386 > > > > > pdx.rh.CN85.dnsmgr.net:freebsd {111}% which apropos > > > > > /usr/bin/apropos > > > > > > > > > > And a man page for it too: > > > > > APROPOS(1) FreeBSD General Commands Manual > > > APROPOS(1) > > > > > > > > > > NAME > > > > > apropos, whatis -- search the whatis database > > > > > > > > > > SYNOPSIS > > > > > apropos keyword ... > > > > > whatis keyword ... > > > > > > > > > > DESCRIPTION > > > > > apropos searches a set of database files containing short > > > descriptions of > > > > > system commands for keywords and displays the result on the > > > standard out- > > > > > put. whatis displays only complete word matches. > > > > > > > > > > keyword really is an extended regular expression, please read > > > grep(1) > > > > > manual page for more information about its format. > > > > > > > > > > DIAGNOSTICS > > > > > The apropos utility exits 0 on success, and 1 if no keyword > > > matched. > > > > > > > > > > SEE ALSO > > > > > grep(1), makewhatis(1), man(1) > > > > > > > > > > FreeBSD 5.4 January 15, 1991 > > > FreeBSD 5.4 > > > > > > > > > > > .Sh AUTHORS > > > > > > .An -nosplit > > > > > > .An Bill Joy > > > > > > > > > > > > > > That is true, but the version of 'apropos' we have currently in base is > > > based on mandoc, > > > > which was imported around September 2018. Due to the nature of > > > contributed code I > > > > thought it would be best to document only the history when it was > > > integrated into > > > > FreeSBD. The same applies for 'makewhatis'. > > > > > > That is not what has been done in other places when code is > > > changed/replaced, > > > the HISTORY section is not specific to "FreeBSD's version" of this > > > function. > > > > > > We often have "An ls command appeared in Version 1 AT&T UNIX." Our source > > > code and man page is not from that, but that is the history of ls. > > > > > > This *could* be amended and *should* be amended to reflect that apropos, > > > and makewhatis got *updated* by a switch to the mandoc versions, but it > > > is misleading to say it was intergrated with the switch to mandoc as that > > > implies it did not exist before this action. > > > > > > > I tend to agree with Rod here. These appeared in X the first time, but > > noting they were replaced in version X with Y is the best way to address > > the current provenance of the code... > > > > Warner > > OK, I see your arguments. How about the following addition for HISTORY section, > > The apropos utility was integrated into FreeBSD 11.1 as part of the > switch to mandoc. Before the switch to mandoc apropos was available since > FreeBSD 1.0. This still implies that it originated with the switch to mandoc, though there is other context that indicates it did not. There is already a pretty good history section there, I am not sure what your trying to clarify. Even the Authors section reflects the history accurately. I do not see that this is adding any great value to the HISTORY for either apropos or makewhatis. > > Any suggestions on how to describe the history more precise are very welcome. The history appears to be described accurately already. > --Gordon > > > > > > > Modified: head/contrib/mandoc/makewhatis.8 > > > > > > > > > ============================================================================== > > > > > > --- head/contrib/mandoc/makewhatis.8 Tue Jun 30 17:21:28 2020 > > > (r362808) > > > > > > +++ head/contrib/mandoc/makewhatis.8 Tue Jun 30 18:08:59 2020 > > > (r362809) > > > > > > @@ -15,7 +15,7 @@ > > > > > > .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, > > > ARISING OUT OF > > > > > > .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. > > > > > > .\" > > > > > > -.Dd $Mdocdate: May 17 2017 $ > > > > > > +.Dd $Mdocdate: June 30 2020 $ > > > > > > .Dt MAKEWHATIS 8 > > > > > > .Os > > > > > > .Sh NAME > > > > > > @@ -211,6 +211,12 @@ and the options > > > > > > .Fl aCDnQT > > > > > > in > > > > > > .Ox 5.6 . > > > > > > +.Pp > > > > > > +The > > > > > > +.Nm > > > > > > +utility was integrated into > > > > > > +.Fx 11.1 > > > > > > +as part of the switch to mandoc. > > > > > > > > > > Ditto > > > > > > > > > > > .Sh AUTHORS > > > > > > .An -nosplit > > > > > > .An Bill Joy > > > -- > > > Rod Grimes > > > rgrimes@freebsd.org > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Wed Jul 1 23:42:13 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 83B6835E895; Wed, 1 Jul 2020 23:42:13 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xySP31Hhz3yrH; Wed, 1 Jul 2020 23:42:13 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 4FA241CB71; Wed, 1 Jul 2020 23:42:13 +0000 (UTC) Date: Wed, 1 Jul 2020 23:42:13 +0000 From: Alexey Dokuchaev To: Gordon Bergling Cc: Warner Losh , "Rodney W. Grimes" , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r362809 - head/contrib/mandoc Message-ID: <20200701234213.GA54023@FreeBSD.org> References: <20200701074920.GB72275@lion.0xfce3.net> <202007011451.061EpIYF056897@gndrsh.dnsmgr.net> <20200701212847.GA1751@lion.0xfce3.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200701212847.GA1751@lion.0xfce3.net> X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 23:42:13 -0000 On Wed, Jul 01, 2020 at 11:28:47PM +0200, Gordon Bergling wrote: > On Wed, Jul 01, 2020 at 11:58:05AM -0600, Warner Losh wrote: > > On Wed, Jul 1, 2020 at 8:51 AM Rodney W. Grimes wrote: > > > ... > > > We often have "An ls command appeared in Version 1 AT&T UNIX." Our source > > > code and man page is not from that, but that is the history of ls. > > > > > > This *could* be amended and *should* be amended to reflect that apropos, > > > and makewhatis got *updated* by a switch to the mandoc versions, but it > > > is misleading to say it was intergrated with the switch to mandoc as that > > > implies it did not exist before this action. > > > > I tend to agree with Rod here. These appeared in X the first time, but > > noting they were replaced in version X with Y is the best way to address > > the current provenance of the code... > > OK, I see your arguments. How about the following addition for HISTORY section, > > The apropos utility was integrated into FreeBSD 11.1 as part of the > switch to mandoc. Before the switch to mandoc apropos was available since > FreeBSD 1.0. It should be the other way around: "The apropos utility appeared in FreeBSD 1.0. Since FreeBSD 11.1 it is based on mandoc implementation." ./danfe From owner-svn-src-all@freebsd.org Wed Jul 1 23:47:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9674B35E775; Wed, 1 Jul 2020 23:47:52 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xyZw3Zjfz405Y; Wed, 1 Jul 2020 23:47:52 +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 404AC115E9; Wed, 1 Jul 2020 23:47:52 +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 061Nlqgm000284; Wed, 1 Jul 2020 23:47:52 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 061Nlpp8000278; Wed, 1 Jul 2020 23:47:51 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202007012347.061Nlpp8000278@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 1 Jul 2020 23:47:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362880 - in stable/12/sys: modules/tcp/rack netinet netinet/tcp_stacks sys X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: in stable/12/sys: modules/tcp/rack netinet netinet/tcp_stacks sys X-SVN-Commit-Revision: 362880 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2020 23:47:52 -0000 Author: tuexen Date: Wed Jul 1 23:47:51 2020 New Revision: 362880 URL: https://svnweb.freebsd.org/changeset/base/362880 Log: MFC r349893: This commit updates rack to what is basically being used at NF as well as sets in some of the groundwork for committing BBR. The hpts system is updated as well as some other needed utilities for the entrance of BBR. This is actually part 1 of 3 more needed commits which will finally complete with BBRv1 being added as a new tcp stack. Merge conflics were manually resolved. Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D20834 Added: stable/12/sys/netinet/tcp_stacks/rack_bbr_common.c - copied unchanged from r349893, head/sys/netinet/tcp_stacks/rack_bbr_common.c Modified: stable/12/sys/modules/tcp/rack/Makefile stable/12/sys/netinet/in_pcb.h stable/12/sys/netinet/tcp.h stable/12/sys/netinet/tcp_hpts.c stable/12/sys/netinet/tcp_hpts.h stable/12/sys/netinet/tcp_log_buf.h stable/12/sys/netinet/tcp_stacks/rack.c stable/12/sys/netinet/tcp_stacks/rack_bbr_common.h stable/12/sys/netinet/tcp_var.h stable/12/sys/sys/mbuf.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/modules/tcp/rack/Makefile ============================================================================== --- stable/12/sys/modules/tcp/rack/Makefile Wed Jul 1 22:31:37 2020 (r362879) +++ stable/12/sys/modules/tcp/rack/Makefile Wed Jul 1 23:47:51 2020 (r362880) @@ -6,7 +6,7 @@ STACKNAME= rack KMOD= tcp_${STACKNAME} -SRCS= rack.c sack_filter.c +SRCS= rack.c sack_filter.c rack_bbr_common.c SRCS+= opt_inet.h opt_inet6.h opt_ipsec.h SRCS+= opt_tcpdebug.h Modified: stable/12/sys/netinet/in_pcb.h ============================================================================== --- stable/12/sys/netinet/in_pcb.h Wed Jul 1 22:31:37 2020 (r362879) +++ stable/12/sys/netinet/in_pcb.h Wed Jul 1 23:47:51 2020 (r362880) @@ -759,7 +759,9 @@ int inp_so_options(const struct inpcb *inp); #define INP_ORIGDSTADDR 0x00000800 /* receive IP dst address/port */ #define INP_CANNOT_DO_ECN 0x00001000 /* The stack does not do ECN */ #define INP_REUSEPORT_LB 0x00002000 /* SO_REUSEPORT_LB option is set */ - +#define INP_SUPPORTS_MBUFQ 0x00004000 /* Supports the mbuf queue method of LRO */ +#define INP_MBUF_QUEUE_READY 0x00008000 /* The transport is pacing, inputs can be queued */ +#define INP_DONT_SACK_QUEUE 0x00010000 /* If a sack arrives do not wake me */ /* * Flags passed to in_pcblookup*() functions. */ Modified: stable/12/sys/netinet/tcp.h ============================================================================== --- stable/12/sys/netinet/tcp.h Wed Jul 1 22:31:37 2020 (r362879) +++ stable/12/sys/netinet/tcp.h Wed Jul 1 23:47:51 2020 (r362880) @@ -202,9 +202,8 @@ struct tcphdr { #define TCP_RACK_TLP_THRESH 1063 /* RACK TLP theshold i.e. srtt+(srtt/N) */ #define TCP_RACK_PKT_DELAY 1064 /* RACK added ms i.e. rack-rtt + reord + N */ #define TCP_RACK_TLP_INC_VAR 1065 /* Does TLP include rtt variance in t-o */ -#define TCP_RACK_SESS_CWV 1066 /* Enable RFC7611 cwnd validation on sess */ #define TCP_BBR_IWINTSO 1067 /* Initial TSO window for BBRs first sends */ -#define TCP_BBR_RECFORCE 1068 /* Enter recovery force out a segment disregard pacer */ +#define TCP_BBR_RECFORCE 1068 /* Enter recovery force out a segment disregard pacer no longer valid */ #define TCP_BBR_STARTUP_PG 1069 /* Startup pacing gain */ #define TCP_BBR_DRAIN_PG 1070 /* Drain pacing gain */ #define TCP_BBR_RWND_IS_APP 1071 /* Rwnd limited is considered app limited */ @@ -212,14 +211,18 @@ struct tcphdr { #define TCP_BBR_ONE_RETRAN 1073 /* Is only one segment allowed out during retran */ #define TCP_BBR_STARTUP_LOSS_EXIT 1074 /* Do we exit a loss during startup if not 20% incr */ #define TCP_BBR_USE_LOWGAIN 1075 /* lower the gain in PROBE_BW enable */ -#define TCP_BBR_LOWGAIN_THRESH 1076 /* How many cycles do we stay in lowgain */ -#define TCP_BBR_LOWGAIN_HALF 1077 /* Do we halfstep lowgain down */ -#define TCP_BBR_LOWGAIN_FD 1078 /* Do we force a drain when lowgain in place */ +#define TCP_BBR_LOWGAIN_THRESH 1076 /* Unused after 2.3 morphs to TSLIMITS >= 2.3 */ +#define TCP_BBR_TSLIMITS 1076 /* Do we use experimental Timestamp limiting for our algo */ +#define TCP_BBR_LOWGAIN_HALF 1077 /* Unused after 2.3 */ +#define TCP_BBR_PACE_OH 1077 /* Reused in 4.2 for pacing overhead setting */ +#define TCP_BBR_LOWGAIN_FD 1078 /* Unused after 2.3 */ +#define TCP_BBR_HOLD_TARGET 1078 /* For 4.3 on */ #define TCP_BBR_USEDEL_RATE 1079 /* Enable use of delivery rate for loss recovery */ #define TCP_BBR_MIN_RTO 1080 /* Min RTO in milliseconds */ #define TCP_BBR_MAX_RTO 1081 /* Max RTO in milliseconds */ #define TCP_BBR_REC_OVER_HPTS 1082 /* Recovery override htps settings 0/1/3 */ -#define TCP_BBR_UNLIMITED 1083 /* Does BBR, in non-recovery not use cwnd */ +#define TCP_BBR_UNLIMITED 1083 /* Not used before 2.3 and morphs to algorithm >= 2.3 */ +#define TCP_BBR_ALGORITHM 1083 /* What measurement algo does BBR use netflix=0, google=1 */ #define TCP_BBR_DRAIN_INC_EXTRA 1084 /* Does the 3/4 drain target include the extra gain */ #define TCP_BBR_STARTUP_EXIT_EPOCH 1085 /* what epoch gets us out of startup */ #define TCP_BBR_PACE_PER_SEC 1086 @@ -228,17 +231,27 @@ struct tcphdr { #define TCP_BBR_PACE_SEG_MIN 1089 #define TCP_BBR_PACE_CROSS 1090 #define TCP_RACK_IDLE_REDUCE_HIGH 1092 /* Reduce the highest cwnd seen to IW on idle */ -#define TCP_RACK_IDLE_REDUCE_HIGH 1092 /* Reduce the highest cwnd seen to IW on idle */ #define TCP_RACK_MIN_PACE 1093 /* Do we enforce rack min pace time */ #define TCP_RACK_MIN_PACE_SEG 1094 /* If so what is the seg threshould */ +#define TCP_RACK_GP_INCREASE 1094 /* After 4.1 its the GP increase */ #define TCP_RACK_TLP_USE 1095 #define TCP_BBR_ACK_COMP_ALG 1096 /* Not used */ +#define TCP_BBR_TMR_PACE_OH 1096 /* Recycled in 4.2 */ #define TCP_BBR_EXTRA_GAIN 1097 #define TCP_BBR_RACK_RTT_USE 1098 /* what RTT should we use 0, 1, or 2? */ #define TCP_BBR_RETRAN_WTSO 1099 #define TCP_DATA_AFTER_CLOSE 1100 #define TCP_BBR_PROBE_RTT_GAIN 1101 #define TCP_BBR_PROBE_RTT_LEN 1102 +#define TCP_BBR_SEND_IWND_IN_TSO 1103 /* Do we burst out whole iwin size chunks at start? */ +#define TCP_BBR_USE_RACK_CHEAT 1104 /* Do we use the rack cheat for pacing rxt's */ +#define TCP_BBR_HDWR_PACE 1105 /* Enable/disable hardware pacing */ +#define TCP_BBR_UTTER_MAX_TSO 1106 /* Do we enforce an utter max TSO size */ +#define TCP_BBR_EXTRA_STATE 1107 /* Special exit-persist catch up */ +#define TCP_BBR_FLOOR_MIN_TSO 1108 /* The min tso size */ +#define TCP_BBR_MIN_TOPACEOUT 1109 /* Do we suspend pacing until */ +#define TCP_BBR_TSTMP_RAISES 1110 /* Can a timestamp measurement raise the b/w */ +#define TCP_BBR_POLICER_DETECT 1111 /* Turn on/off google mode policer detection */ /* Start of reserved space for third-party user-settable options. */ Modified: stable/12/sys/netinet/tcp_hpts.c ============================================================================== --- stable/12/sys/netinet/tcp_hpts.c Wed Jul 1 22:31:37 2020 (r362879) +++ stable/12/sys/netinet/tcp_hpts.c Wed Jul 1 23:47:51 2020 (r362880) @@ -37,7 +37,7 @@ __FBSDID("$FreeBSD$"); * pacing packets out onto the wire. It can be used in two ways * by a given TCP stack (and those two methods can be used simultaneously). * - * First, and probably the main thing its used by Rack and BBR for, it can + * First, and probably the main thing its used by Rack and BBR, it can * be used to call tcp_output() of a transport stack at some time in the future. * The normal way this is done is that tcp_output() of the stack schedules * itself to be called again by calling tcp_hpts_insert(tcpcb, slot). The @@ -59,42 +59,57 @@ __FBSDID("$FreeBSD$"); * to prevent output processing until the time alotted has gone by. * Of course this is a bare bones example and the stack will probably * have more consideration then just the above. - * - * Now the tcp_hpts system will call tcp_output in one of two forms, - * it will first check to see if the stack as defined a - * tfb_tcp_output_wtime() function, if so that is the routine it - * will call, if that function is not defined then it will call the - * tfb_tcp_output() function. The only difference between these - * two calls is that the former passes the time in to the function - * so the function does not have to access the time (which tcp_hpts - * already has). What these functions do is of course totally up - * to the individual tcp stack. - * + * * Now the second function (actually two functions I guess :D) * the tcp_hpts system provides is the ability to either abort - * a connection (later) or process input on a connection. - * Why would you want to do this? To keep processor locality. + * a connection (later) or process input on a connection. + * Why would you want to do this? To keep processor locality + * and or not have to worry about untangling any recursive + * locks. The input function now is hooked to the new LRO + * system as well. * - * So in order to use the input redirection function the - * stack changes its tcp_do_segment() routine to instead - * of process the data call the function: + * In order to use the input redirection function the + * tcp stack must define an input function for + * tfb_do_queued_segments(). This function understands + * how to dequeue a array of packets that were input and + * knows how to call the correct processing routine. * - * tcp_queue_pkt_to_input() - * - * You will note that the arguments to this function look - * a lot like tcp_do_segments's arguments. This function - * will assure that the tcp_hpts system will - * call the functions tfb_tcp_hpts_do_segment() from the - * correct CPU. Note that multiple calls can get pushed - * into the tcp_hpts system this will be indicated by - * the next to last argument to tfb_tcp_hpts_do_segment() - * (nxt_pkt). If nxt_pkt is a 1 then another packet is - * coming. If nxt_pkt is a 0 then this is the last call - * that the tcp_hpts system has available for the tcp stack. + * Locking in this is important as well so most likely the + * stack will need to define the tfb_do_segment_nounlock() + * splitting tfb_do_segment() into two parts. The main processing + * part that does not unlock the INP and returns a value of 1 or 0. + * It returns 0 if all is well and the lock was not released. It + * returns 1 if we had to destroy the TCB (a reset received etc). + * The remains of tfb_do_segment() then become just a simple call + * to the tfb_do_segment_nounlock() function and check the return + * code and possibly unlock. * - * The other point of the input system is to be able to safely - * drop a tcp connection without worrying about the recursive - * locking that may be occuring on the INP_WLOCK. So if + * The stack must also set the flag on the INP that it supports this + * feature i.e. INP_SUPPORTS_MBUFQ. The LRO code recoginizes + * this flag as well and will queue packets when it is set. + * There are other flags as well INP_MBUF_QUEUE_READY and + * INP_DONT_SACK_QUEUE. The first flag tells the LRO code + * that we are in the pacer for output so there is no + * need to wake up the hpts system to get immediate + * input. The second tells the LRO code that its okay + * if a SACK arrives you can still defer input and let + * the current hpts timer run (this is usually set when + * a rack timer is up so we know SACK's are happening + * on the connection already and don't want to wakeup yet). + * + * There is a common functions within the rack_bbr_common code + * version i.e. ctf_do_queued_segments(). This function + * knows how to take the input queue of packets from + * tp->t_in_pkts and process them digging out + * all the arguments, calling any bpf tap and + * calling into tfb_do_segment_nounlock(). The common + * function (ctf_do_queued_segments()) requires that + * you have defined the tfb_do_segment_nounlock() as + * described above. + * + * The second feature of the input side of hpts is the + * dropping of a connection. This is due to the way that + * locking may have occured on the INP_WLOCK. So if * a stack wants to drop a connection it calls: * * tcp_set_inp_to_drop(tp, ETIMEDOUT) @@ -155,6 +170,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef tcpdebug #include @@ -167,24 +183,19 @@ __FBSDID("$FreeBSD$"); MALLOC_DEFINE(M_TCPHPTS, "tcp_hpts", "TCP hpts"); #ifdef RSS -#include -#include static int tcp_bind_threads = 1; #else static int tcp_bind_threads = 0; #endif TUNABLE_INT("net.inet.tcp.bind_hptss", &tcp_bind_threads); -static uint32_t tcp_hpts_logging_size = DEFAULT_HPTS_LOG; - -TUNABLE_INT("net.inet.tcp.hpts_logging_sz", &tcp_hpts_logging_size); - static struct tcp_hptsi tcp_pace; +static int hpts_does_tp_logging = 0; static void tcp_wakehpts(struct tcp_hpts_entry *p); static void tcp_wakeinput(struct tcp_hpts_entry *p); static void tcp_input_data(struct tcp_hpts_entry *hpts, struct timeval *tv); -static void tcp_hptsi(struct tcp_hpts_entry *hpts, struct timeval *ctick); +static void tcp_hptsi(struct tcp_hpts_entry *hpts); static void tcp_hpts_thread(void *ctx); static void tcp_init_hptsi(void *st); @@ -203,52 +214,81 @@ SYSCTL_NODE(_net_inet_tcp, OID_AUTO, hpts, CTLFLAG_RW, } \ } while (0) -static int32_t logging_on = 0; -static int32_t hpts_sleep_max = (NUM_OF_HPTSI_SLOTS - 2); static int32_t tcp_hpts_precision = 120; SYSCTL_INT(_net_inet_tcp_hpts, OID_AUTO, precision, CTLFLAG_RW, &tcp_hpts_precision, 120, "Value for PRE() precision of callout"); -SYSCTL_INT(_net_inet_tcp_hpts, OID_AUTO, logging, CTLFLAG_RW, - &logging_on, 0, - "Turn on logging if compiled in"); +counter_u64_t hpts_hopelessly_behind; +SYSCTL_COUNTER_U64(_net_inet_tcp_hpts, OID_AUTO, hopeless, CTLFLAG_RD, + &hpts_hopelessly_behind, + "Number of times hpts could not catch up and was behind hopelessly"); + counter_u64_t hpts_loops; SYSCTL_COUNTER_U64(_net_inet_tcp_hpts, OID_AUTO, loops, CTLFLAG_RD, &hpts_loops, "Number of times hpts had to loop to catch up"); + counter_u64_t back_tosleep; SYSCTL_COUNTER_U64(_net_inet_tcp_hpts, OID_AUTO, no_tcbsfound, CTLFLAG_RD, &back_tosleep, "Number of times hpts found no tcbs"); -static int32_t in_newts_every_tcb = 0; +counter_u64_t combined_wheel_wrap; -SYSCTL_INT(_net_inet_tcp_hpts, OID_AUTO, in_tsperpcb, CTLFLAG_RW, - &in_newts_every_tcb, 0, - "Do we have a new cts every tcb we process for input"); -static int32_t in_ts_percision = 0; +SYSCTL_COUNTER_U64(_net_inet_tcp_hpts, OID_AUTO, comb_wheel_wrap, CTLFLAG_RD, + &combined_wheel_wrap, "Number of times the wheel lagged enough to have an insert see wrap"); -SYSCTL_INT(_net_inet_tcp_hpts, OID_AUTO, in_tspercision, CTLFLAG_RW, - &in_ts_percision, 0, - "Do we use percise timestamp for clients on input"); -static int32_t out_newts_every_tcb = 0; +counter_u64_t wheel_wrap; -SYSCTL_INT(_net_inet_tcp_hpts, OID_AUTO, out_tsperpcb, CTLFLAG_RW, - &out_newts_every_tcb, 0, - "Do we have a new cts every tcb we process for output"); +SYSCTL_COUNTER_U64(_net_inet_tcp_hpts, OID_AUTO, wheel_wrap, CTLFLAG_RD, + &wheel_wrap, "Number of times the wheel lagged enough to have an insert see wrap"); + static int32_t out_ts_percision = 0; SYSCTL_INT(_net_inet_tcp_hpts, OID_AUTO, out_tspercision, CTLFLAG_RW, &out_ts_percision, 0, "Do we use a percise timestamp for every output cts"); +SYSCTL_INT(_net_inet_tcp_hpts, OID_AUTO, logging, CTLFLAG_RW, + &hpts_does_tp_logging, 0, + "Do we add to any tp that has logging on pacer logs"); -SYSCTL_INT(_net_inet_tcp_hpts, OID_AUTO, maxsleep, CTLFLAG_RW, +static int32_t max_pacer_loops = 10; +SYSCTL_INT(_net_inet_tcp_hpts, OID_AUTO, loopmax, CTLFLAG_RW, + &max_pacer_loops, 10, + "What is the maximum number of times the pacer will loop trying to catch up"); + +#define HPTS_MAX_SLEEP_ALLOWED (NUM_OF_HPTSI_SLOTS/2) + +static uint32_t hpts_sleep_max = HPTS_MAX_SLEEP_ALLOWED; + + +static int +sysctl_net_inet_tcp_hpts_max_sleep(SYSCTL_HANDLER_ARGS) +{ + int error; + uint32_t new; + + new = hpts_sleep_max; + error = sysctl_handle_int(oidp, &new, 0, req); + if (error == 0 && req->newptr) { + if ((new < (NUM_OF_HPTSI_SLOTS / 4)) || + (new > HPTS_MAX_SLEEP_ALLOWED)) + error = EINVAL; + else + hpts_sleep_max = new; + } + return (error); +} + +SYSCTL_PROC(_net_inet_tcp_hpts, OID_AUTO, maxsleep, + CTLTYPE_UINT | CTLFLAG_RW, &hpts_sleep_max, 0, - "The maximum time the hpts will sleep <1 - 254>"); + &sysctl_net_inet_tcp_hpts_max_sleep, "IU", + "Maximum time hpts will sleep"); SYSCTL_INT(_net_inet_tcp_hpts, OID_AUTO, minsleep, CTLFLAG_RW, &tcp_min_hptsi_time, 0, @@ -259,55 +299,35 @@ SYSCTL_INT(_net_inet_tcp_hpts, OID_AUTO, skip_swi, CTL "Do we have the callout call directly to the hpts?"); static void -__tcp_hpts_log_it(struct tcp_hpts_entry *hpts, struct inpcb *inp, int event, uint32_t slot, - uint32_t ticknow, int32_t line) +tcp_hpts_log(struct tcp_hpts_entry *hpts, struct tcpcb *tp, struct timeval *tv, + int ticks_to_run, int idx) { - struct hpts_log *pl; - - HPTS_MTX_ASSERT(hpts); - if (hpts->p_log == NULL) - return; - pl = &hpts->p_log[hpts->p_log_at]; - hpts->p_log_at++; - if (hpts->p_log_at >= hpts->p_logsize) { - hpts->p_log_at = 0; - hpts->p_log_wrapped = 1; - } - pl->inp = inp; - if (inp) { - pl->t_paceslot = inp->inp_hptsslot; - pl->t_hptsreq = inp->inp_hpts_request; - pl->p_onhpts = inp->inp_in_hpts; - pl->p_oninput = inp->inp_in_input; - } else { - pl->t_paceslot = 0; - pl->t_hptsreq = 0; - pl->p_onhpts = 0; - pl->p_oninput = 0; - } - pl->is_notempty = 1; - pl->event = event; - pl->line = line; - pl->cts = tcp_get_usecs(NULL); - pl->p_curtick = hpts->p_curtick; - pl->p_prevtick = hpts->p_prevtick; - pl->p_on_queue_cnt = hpts->p_on_queue_cnt; - pl->ticknow = ticknow; - pl->slot_req = slot; - pl->p_nxt_slot = hpts->p_nxt_slot; - pl->p_cur_slot = hpts->p_cur_slot; - pl->p_hpts_sleep_time = hpts->p_hpts_sleep_time; - pl->p_flags = (hpts->p_cpu & 0x7f); - pl->p_flags <<= 7; - pl->p_flags |= (hpts->p_num & 0x7f); - pl->p_flags <<= 2; - if (hpts->p_hpts_active) { - pl->p_flags |= HPTS_HPTS_ACTIVE; - } + union tcp_log_stackspecific log; + + memset(&log.u_bbr, 0, sizeof(log.u_bbr)); + log.u_bbr.flex1 = hpts->p_nxt_slot; + log.u_bbr.flex2 = hpts->p_cur_slot; + log.u_bbr.flex3 = hpts->p_prev_slot; + log.u_bbr.flex4 = idx; + log.u_bbr.flex5 = hpts->p_curtick; + log.u_bbr.flex6 = hpts->p_on_queue_cnt; + log.u_bbr.use_lt_bw = 1; + log.u_bbr.inflight = ticks_to_run; + log.u_bbr.applimited = hpts->overidden_sleep; + log.u_bbr.delivered = hpts->saved_curtick; + log.u_bbr.timeStamp = tcp_tv_to_usectick(tv); + log.u_bbr.epoch = hpts->saved_curslot; + log.u_bbr.lt_epoch = hpts->saved_prev_slot; + log.u_bbr.pkts_out = hpts->p_delayed_by; + log.u_bbr.lost = hpts->p_hpts_sleep_time; + log.u_bbr.cur_del_rate = hpts->p_runningtick; + TCP_LOG_EVENTP(tp, NULL, + &tp->t_inpcb->inp_socket->so_rcv, + &tp->t_inpcb->inp_socket->so_snd, + BBR_LOG_HPTSDIAG, 0, + 0, &log, false, tv); } -#define tcp_hpts_log_it(a, b, c, d, e) __tcp_hpts_log_it(a, b, c, d, e, __LINE__) - static void hpts_timeout_swi(void *arg) { @@ -339,12 +359,6 @@ hpts_sane_pace_remove(struct tcp_hpts_entry *hpts, str /* We are not on the hpts? */ panic("%s: hpts:%p inp:%p not on the hpts?", __FUNCTION__, hpts, inp); } - if (TAILQ_EMPTY(head) && - (hpts->p_on_queue_cnt != 0)) { - /* We should not be empty with a queue count */ - panic("%s hpts:%p hpts bucket empty but cnt:%d", - __FUNCTION__, hpts, hpts->p_on_queue_cnt); - } #endif TAILQ_REMOVE(head, inp, inp_hpts); hpts->p_on_queue_cnt--; @@ -448,58 +462,13 @@ hpts_sane_input_insert(struct tcp_hpts_entry *hpts, st in_pcbref(inp); } -static int -sysctl_tcp_hpts_log(SYSCTL_HANDLER_ARGS) -{ - struct tcp_hpts_entry *hpts; - size_t sz; - int32_t logging_was, i; - int32_t error = 0; - - /* - * HACK: Turn off logging so no locks are required this really needs - * a memory barrier :) - */ - logging_was = logging_on; - logging_on = 0; - if (!req->oldptr) { - /* How much? */ - sz = 0; - for (i = 0; i < tcp_pace.rp_num_hptss; i++) { - hpts = tcp_pace.rp_ent[i]; - if (hpts->p_log == NULL) - continue; - sz += (sizeof(struct hpts_log) * hpts->p_logsize); - } - error = SYSCTL_OUT(req, 0, sz); - } else { - for (i = 0; i < tcp_pace.rp_num_hptss; i++) { - hpts = tcp_pace.rp_ent[i]; - if (hpts->p_log == NULL) - continue; - if (hpts->p_log_wrapped) - sz = (sizeof(struct hpts_log) * hpts->p_logsize); - else - sz = (sizeof(struct hpts_log) * hpts->p_log_at); - error = SYSCTL_OUT(req, hpts->p_log, sz); - } - } - logging_on = logging_was; - return error; -} - -SYSCTL_PROC(_net_inet_tcp_hpts, OID_AUTO, log, CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, - 0, 0, sysctl_tcp_hpts_log, "A", "tcp hptsi log"); - - static void tcp_wakehpts(struct tcp_hpts_entry *hpts) { HPTS_MTX_ASSERT(hpts); - swi_sched(hpts->ie_cookie, 0); - if (hpts->p_hpts_active == 2) { - /* Rare sleeping on a ENOBUF */ - wakeup_one(hpts); + if (hpts->p_hpts_wake_scheduled == 0) { + hpts->p_hpts_wake_scheduled = 1; + swi_sched(hpts->ie_cookie, 0); } } @@ -507,10 +476,9 @@ static void tcp_wakeinput(struct tcp_hpts_entry *hpts) { HPTS_MTX_ASSERT(hpts); - swi_sched(hpts->ie_cookie, 0); - if (hpts->p_hpts_active == 2) { - /* Rare sleeping on a ENOBUF */ - wakeup_one(hpts); + if (hpts->p_hpts_wake_scheduled == 0) { + hpts->p_hpts_wake_scheduled = 1; + swi_sched(hpts->ie_cookie, 0); } } @@ -640,8 +608,8 @@ tcp_hpts_remove_locked_input(struct tcp_hpts_entry *hp * Valid values in the flags are * HPTS_REMOVE_OUTPUT - remove from the output of the hpts. * HPTS_REMOVE_INPUT - remove from the input of the hpts. - * Note that you can or both values together and get two - * actions. + * Note that you can use one or both values together + * and get two actions. */ void __tcp_hpts_remove(struct inpcb *inp, int32_t flags, int32_t line) @@ -662,53 +630,198 @@ __tcp_hpts_remove(struct inpcb *inp, int32_t flags, in } static inline int -hpts_tick(struct tcp_hpts_entry *hpts, int32_t plus) +hpts_tick(uint32_t wheel_tick, uint32_t plus) { - return ((hpts->p_prevtick + plus) % NUM_OF_HPTSI_SLOTS); + /* + * Given a slot on the wheel, what slot + * is that plus ticks out? + */ + KASSERT(wheel_tick < NUM_OF_HPTSI_SLOTS, ("Invalid tick %u not on wheel", wheel_tick)); + return ((wheel_tick + plus) % NUM_OF_HPTSI_SLOTS); } +static inline int +tick_to_wheel(uint32_t cts_in_wticks) +{ + /* + * Given a timestamp in wheel ticks (10usec inc's) + * map it to our limited space wheel. + */ + return (cts_in_wticks % NUM_OF_HPTSI_SLOTS); +} + +static inline int +hpts_ticks_diff(int prev_tick, int tick_now) +{ + /* + * Given two ticks that are someplace + * on our wheel. How far are they apart? + */ + if (tick_now > prev_tick) + return (tick_now - prev_tick); + else if (tick_now == prev_tick) + /* + * Special case, same means we can go all of our + * wheel less one slot. + */ + return (NUM_OF_HPTSI_SLOTS - 1); + else + return ((NUM_OF_HPTSI_SLOTS - prev_tick) + tick_now); +} + +/* + * Given a tick on the wheel that is the current time + * mapped to the wheel (wheel_tick), what is the maximum + * distance forward that can be obtained without + * wrapping past either prev_tick or running_tick + * depending on the htps state? Also if passed + * a uint32_t *, fill it with the tick location. + * + * Note if you do not give this function the current + * time (that you think it is) mapped to the wheel + * then the results will not be what you expect and + * could lead to invalid inserts. + */ +static inline int32_t +max_ticks_available(struct tcp_hpts_entry *hpts, uint32_t wheel_tick, uint32_t *target_tick) +{ + uint32_t dis_to_travel, end_tick, pacer_to_now, avail_on_wheel; + + if ((hpts->p_hpts_active == 1) && + (hpts->p_wheel_complete == 0)) { + end_tick = hpts->p_runningtick; + /* Back up one tick */ + if (end_tick == 0) + end_tick = NUM_OF_HPTSI_SLOTS - 1; + else + end_tick--; + if (target_tick) + *target_tick = end_tick; + } else { + /* + * For the case where we are + * not active, or we have + * completed the pass over + * the wheel, we can use the + * prev tick and subtract one from it. This puts us + * as far out as possible on the wheel. + */ + end_tick = hpts->p_prev_slot; + if (end_tick == 0) + end_tick = NUM_OF_HPTSI_SLOTS - 1; + else + end_tick--; + if (target_tick) + *target_tick = end_tick; + /* + * Now we have close to the full wheel left minus the + * time it has been since the pacer went to sleep. Note + * that wheel_tick, passed in, should be the current time + * from the perspective of the caller, mapped to the wheel. + */ + if (hpts->p_prev_slot != wheel_tick) + dis_to_travel = hpts_ticks_diff(hpts->p_prev_slot, wheel_tick); + else + dis_to_travel = 1; + /* + * dis_to_travel in this case is the space from when the + * pacer stopped (p_prev_slot) and where our wheel_tick + * is now. To know how many slots we can put it in we + * subtract from the wheel size. We would not want + * to place something after p_prev_slot or it will + * get ran too soon. + */ + return (NUM_OF_HPTSI_SLOTS - dis_to_travel); + } + /* + * So how many slots are open between p_runningtick -> p_cur_slot + * that is what is currently un-available for insertion. Special + * case when we are at the last slot, this gets 1, so that + * the answer to how many slots are available is all but 1. + */ + if (hpts->p_runningtick == hpts->p_cur_slot) + dis_to_travel = 1; + else + dis_to_travel = hpts_ticks_diff(hpts->p_runningtick, hpts->p_cur_slot); + /* + * How long has the pacer been running? + */ + if (hpts->p_cur_slot != wheel_tick) { + /* The pacer is a bit late */ + pacer_to_now = hpts_ticks_diff(hpts->p_cur_slot, wheel_tick); + } else { + /* The pacer is right on time, now == pacers start time */ + pacer_to_now = 0; + } + /* + * To get the number left we can insert into we simply + * subract the distance the pacer has to run from how + * many slots there are. + */ + avail_on_wheel = NUM_OF_HPTSI_SLOTS - dis_to_travel; + /* + * Now how many of those we will eat due to the pacer's + * time (p_cur_slot) of start being behind the + * real time (wheel_tick)? + */ + if (avail_on_wheel <= pacer_to_now) { + /* + * Wheel wrap, we can't fit on the wheel, that + * is unusual the system must be way overloaded! + * Insert into the assured tick, and return special + * "0". + */ + counter_u64_add(combined_wheel_wrap, 1); + *target_tick = hpts->p_nxt_slot; + return (0); + } else { + /* + * We know how many slots are open + * on the wheel (the reverse of what + * is left to run. Take away the time + * the pacer started to now (wheel_tick) + * and that tells you how many slots are + * open that can be inserted into that won't + * be touched by the pacer until later. + */ + return (avail_on_wheel - pacer_to_now); + } +} + static int tcp_queue_to_hpts_immediate_locked(struct inpcb *inp, struct tcp_hpts_entry *hpts, int32_t line, int32_t noref) { - int32_t need_wake = 0; - uint32_t ticknow = 0; - + uint32_t need_wake = 0; + HPTS_MTX_ASSERT(hpts); if (inp->inp_in_hpts == 0) { /* Ok we need to set it on the hpts in the current slot */ - if (hpts->p_hpts_active == 0) { - /* A sleeping hpts we want in next slot to run */ - if (logging_on) { - tcp_hpts_log_it(hpts, inp, HPTSLOG_INSERT_SLEEPER, 0, - hpts_tick(hpts, 1)); - } - inp->inp_hptsslot = hpts_tick(hpts, 1); - inp->inp_hpts_request = 0; - if (logging_on) { - tcp_hpts_log_it(hpts, inp, HPTSLOG_SLEEP_BEFORE, 1, ticknow); - } - need_wake = 1; + inp->inp_hpts_request = 0; + if ((hpts->p_hpts_active == 0) || + (hpts->p_wheel_complete)) { + /* + * A sleeping hpts we want in next slot to run + * note that in this state p_prev_slot == p_cur_slot + */ + inp->inp_hptsslot = hpts_tick(hpts->p_prev_slot, 1); + if ((hpts->p_on_min_sleep == 0) && (hpts->p_hpts_active == 0)) + need_wake = 1; } else if ((void *)inp == hpts->p_inp) { /* + * The hpts system is running and the caller + * was awoken by the hpts system. * We can't allow you to go into the same slot we - * are in. We must put you out. + * are in (we don't want a loop :-D). */ inp->inp_hptsslot = hpts->p_nxt_slot; } else - inp->inp_hptsslot = hpts->p_cur_slot; + inp->inp_hptsslot = hpts->p_runningtick; hpts_sane_pace_insert(hpts, inp, &hpts->p_hptss[inp->inp_hptsslot], line, noref); - inp->inp_hpts_request = 0; - if (logging_on) { - tcp_hpts_log_it(hpts, inp, HPTSLOG_IMMEDIATE, 0, 0); - } if (need_wake) { /* * Activate the hpts if it is sleeping and its * timeout is not 1. */ - if (logging_on) { - tcp_hpts_log_it(hpts, inp, HPTSLOG_WAKEUP_HPTS, 0, ticknow); - } hpts->p_direct_wake = 1; tcp_wakehpts(hpts); } @@ -729,141 +842,129 @@ __tcp_queue_to_hpts_immediate(struct inpcb *inp, int32 return (ret); } +#ifdef INVARIANTS static void -tcp_hpts_insert_locked(struct tcp_hpts_entry *hpts, struct inpcb *inp, uint32_t slot, uint32_t cts, int32_t line, - struct hpts_diag *diag, int32_t noref) +check_if_slot_would_be_wrong(struct tcp_hpts_entry *hpts, struct inpcb *inp, uint32_t inp_hptsslot, int line) { - int32_t need_new_to = 0; - int32_t need_wakeup = 0; - uint32_t largest_slot; - uint32_t ticknow = 0; - uint32_t slot_calc; + /* + * Sanity checks for the pacer with invariants + * on insert. + */ + if (inp_hptsslot >= NUM_OF_HPTSI_SLOTS) + panic("hpts:%p inp:%p slot:%d > max", + hpts, inp, inp_hptsslot); + if ((hpts->p_hpts_active) && + (hpts->p_wheel_complete == 0)) { + /* + * If the pacer is processing a arc + * of the wheel, we need to make + * sure we are not inserting within + * that arc. + */ + int distance, yet_to_run; + distance = hpts_ticks_diff(hpts->p_runningtick, inp_hptsslot); + if (hpts->p_runningtick != hpts->p_cur_slot) + yet_to_run = hpts_ticks_diff(hpts->p_runningtick, hpts->p_cur_slot); + else + yet_to_run = 0; /* processing last slot */ + if (yet_to_run > distance) { + panic("hpts:%p inp:%p slot:%d distance:%d yet_to_run:%d rs:%d cs:%d", + hpts, inp, inp_hptsslot, + distance, yet_to_run, + hpts->p_runningtick, hpts->p_cur_slot); + } + } +} +#endif + +static void +tcp_hpts_insert_locked(struct tcp_hpts_entry *hpts, struct inpcb *inp, uint32_t slot, int32_t line, + struct hpts_diag *diag, struct timeval *tv) +{ + uint32_t need_new_to = 0; + uint32_t wheel_cts, last_tick; + int32_t wheel_tick, maxticks; + int8_t need_wakeup = 0; + HPTS_MTX_ASSERT(hpts); if (diag) { memset(diag, 0, sizeof(struct hpts_diag)); diag->p_hpts_active = hpts->p_hpts_active; + diag->p_prev_slot = hpts->p_prev_slot; + diag->p_runningtick = hpts->p_runningtick; diag->p_nxt_slot = hpts->p_nxt_slot; diag->p_cur_slot = hpts->p_cur_slot; + diag->p_curtick = hpts->p_curtick; + diag->p_lasttick = hpts->p_lasttick; diag->slot_req = slot; + diag->p_on_min_sleep = hpts->p_on_min_sleep; + diag->hpts_sleep_time = hpts->p_hpts_sleep_time; } - if ((inp->inp_in_hpts == 0) || noref) { - inp->inp_hpts_request = slot; + if (inp->inp_in_hpts == 0) { if (slot == 0) { /* Immediate */ - tcp_queue_to_hpts_immediate_locked(inp, hpts, line, noref); + tcp_queue_to_hpts_immediate_locked(inp, hpts, line, 0); return; } - if (hpts->p_hpts_active) { - /* - * Its slot - 1 since nxt_slot is the next tick that - * will go off since the hpts is awake - */ - if (logging_on) { - tcp_hpts_log_it(hpts, inp, HPTSLOG_INSERT_NORMAL, slot, 0); - } - /* - * We want to make sure that we don't place a inp in - * the range of p_cur_slot <-> p_nxt_slot. If we - * take from p_nxt_slot to the end, plus p_cur_slot - * and then take away 2, we will know how many is - * the max slots we can use. - */ - if (hpts->p_nxt_slot > hpts->p_cur_slot) { - /* - * Non-wrap case nxt_slot <-> cur_slot we - * don't want to land in. So the diff gives - * us what is taken away from the number of - * slots. + /* Get the current time relative to the wheel */ + wheel_cts = tcp_tv_to_hptstick(tv); + /* Map it onto the wheel */ + wheel_tick = tick_to_wheel(wheel_cts); + /* Now what's the max we can place it at? */ + maxticks = max_ticks_available(hpts, wheel_tick, &last_tick); + if (diag) { + diag->wheel_tick = wheel_tick; + diag->maxticks = maxticks; + diag->wheel_cts = wheel_cts; + } + if (maxticks == 0) { + /* The pacer is in a wheel wrap behind, yikes! */ + if (slot > 1) { + /* + * Reduce by 1 to prevent a forever loop in + * case something else is wrong. Note this + * probably does not hurt because the pacer + * if its true is so far behind we will be + * > 1second late calling anyway. */ - largest_slot = NUM_OF_HPTSI_SLOTS - (hpts->p_nxt_slot - hpts->p_cur_slot); - } else if (hpts->p_nxt_slot == hpts->p_cur_slot) { - largest_slot = NUM_OF_HPTSI_SLOTS - 2; - } else { - /* - * Wrap case so the diff gives us the number - * of slots that we can land in. - */ - largest_slot = hpts->p_cur_slot - hpts->p_nxt_slot; + slot--; } - /* - * We take away two so we never have a problem (20 - * usec's) out of 1024000 usecs - */ - largest_slot -= 2; - if (inp->inp_hpts_request > largest_slot) { - /* - * Restrict max jump of slots and remember - * leftover - */ - slot = largest_slot; - inp->inp_hpts_request -= largest_slot; - } else { - /* This one will run when we hit it */ - inp->inp_hpts_request = 0; - } - if (hpts->p_nxt_slot == hpts->p_cur_slot) - slot_calc = (hpts->p_nxt_slot + slot) % NUM_OF_HPTSI_SLOTS; - else - slot_calc = (hpts->p_nxt_slot + slot - 1) % NUM_OF_HPTSI_SLOTS; - if (slot_calc == hpts->p_cur_slot) { + inp->inp_hptsslot = last_tick; + inp->inp_hpts_request = slot; + } else if (maxticks >= slot) { + /* It all fits on the wheel */ + inp->inp_hpts_request = 0; + inp->inp_hptsslot = hpts_tick(wheel_tick, slot); + } else { + /* It does not fit */ + inp->inp_hpts_request = slot - maxticks; + inp->inp_hptsslot = last_tick; + } + if (diag) { + diag->slot_remaining = inp->inp_hpts_request; + diag->inp_hptsslot = inp->inp_hptsslot; + } #ifdef INVARIANTS - /* TSNH */ - panic("Hpts:%p impossible slot calculation slot_calc:%u slot:%u largest:%u\n", - hpts, slot_calc, slot, largest_slot); + check_if_slot_would_be_wrong(hpts, inp, inp->inp_hptsslot, line); #endif - if (slot_calc) - slot_calc--; - else - slot_calc = NUM_OF_HPTSI_SLOTS - 1; - } - inp->inp_hptsslot = slot_calc; - if (diag) { - diag->inp_hptsslot = inp->inp_hptsslot; - } - } else { + hpts_sane_pace_insert(hpts, inp, &hpts->p_hptss[inp->inp_hptsslot], line, 0); + if ((hpts->p_hpts_active == 0) && + (inp->inp_hpts_request == 0) && + (hpts->p_on_min_sleep == 0)) { /* - * The hpts is sleeping, we need to figure out where + * The hpts is sleeping and not on a minimum + * sleep time, we need to figure out where * it will wake up at and if we need to reschedule * its time-out. */ uint32_t have_slept, yet_to_sleep; - uint32_t slot_now; - struct timeval tv; - ticknow = tcp_gethptstick(&tv); - slot_now = ticknow % NUM_OF_HPTSI_SLOTS; - /* - * The user wants to be inserted at (slot_now + - * slot) % NUM_OF_HPTSI_SLOTS, so lets set that up. - */ - largest_slot = NUM_OF_HPTSI_SLOTS - 2; - if (inp->inp_hpts_request > largest_slot) { - /* Adjust the residual in inp_hpts_request */ - slot = largest_slot; - inp->inp_hpts_request -= largest_slot; - } else { - /* No residual it all fits */ - inp->inp_hpts_request = 0; - } - inp->inp_hptsslot = (slot_now + slot) % NUM_OF_HPTSI_SLOTS; - if (diag) { - diag->slot_now = slot_now; - diag->inp_hptsslot = inp->inp_hptsslot; - diag->p_on_min_sleep = hpts->p_on_min_sleep; - } - if (logging_on) { - tcp_hpts_log_it(hpts, inp, HPTSLOG_INSERT_SLEEPER, slot, ticknow); - } /* Now do we need to restart the hpts's timer? */ - if (TSTMP_GT(ticknow, hpts->p_curtick)) - have_slept = ticknow - hpts->p_curtick; - else - have_slept = 0; - if (have_slept < hpts->p_hpts_sleep_time) { - /* This should be what happens */ + have_slept = hpts_ticks_diff(hpts->p_prev_slot, wheel_tick); + if (have_slept < hpts->p_hpts_sleep_time) yet_to_sleep = hpts->p_hpts_sleep_time - have_slept; - } else { + else { /* We are over-due */ yet_to_sleep = 0; need_wakeup = 1; @@ -871,29 +972,22 @@ tcp_hpts_insert_locked(struct tcp_hpts_entry *hpts, st if (diag) { diag->have_slept = have_slept; diag->yet_to_sleep = yet_to_sleep; - diag->hpts_sleep_time = hpts->p_hpts_sleep_time; } - if ((hpts->p_on_min_sleep == 0) && (yet_to_sleep > slot)) { + if (yet_to_sleep && + (yet_to_sleep > slot)) { /* - * We need to reschedule the hptss time-out. + * We need to reschedule the hpts's time-out. */ hpts->p_hpts_sleep_time = slot; need_new_to = slot * HPTS_TICKS_PER_USEC; } } - hpts_sane_pace_insert(hpts, inp, &hpts->p_hptss[inp->inp_hptsslot], line, noref); - if (logging_on) { - tcp_hpts_log_it(hpts, inp, HPTSLOG_INSERTED, slot, ticknow); - } /* * Now how far is the hpts sleeping to? if active is 1, its * up and ticking we do nothing, otherwise we may need to * reschedule its callout if need_new_to is set from above. */ if (need_wakeup) { - if (logging_on) { - tcp_hpts_log_it(hpts, inp, HPTSLOG_RESCHEDULE, 1, 0); - } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Jul 2 00:01:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2AA2635E564; Thu, 2 Jul 2020 00:01:04 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.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 49xyt66Q63z40Xs; Thu, 2 Jul 2020 00:01:02 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 062010cc058838; Wed, 1 Jul 2020 17:01:00 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 062010DA058837; Wed, 1 Jul 2020 17:01:00 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202007020001.062010DA058837@gndrsh.dnsmgr.net> Subject: Re: svn commit: r362809 - head/contrib/mandoc In-Reply-To: <20200701234213.GA54023@FreeBSD.org> To: Alexey Dokuchaev Date: Wed, 1 Jul 2020 17:01:00 -0700 (PDT) CC: Gordon Bergling , Warner Losh , "Rodney W. Grimes" , src-committers , svn-src-all , svn-src-head 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: 49xyt66Q63z40Xs X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd@gndrsh.dnsmgr.net X-Spamd-Result: default: False [2.63 / 15.00]; HAS_REPLYTO(0.00)[rgrimes@freebsd.org]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.10)[0.101]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.76)[0.757]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_SPAM_LONG(0.87)[0.873]; RCPT_COUNT_SEVEN(0.00)[7]; RCVD_TLS_LAST(0.00)[]; R_SPF_NA(0.00)[no SPF record]; 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]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2020 00:01:04 -0000 > On Wed, Jul 01, 2020 at 11:28:47PM +0200, Gordon Bergling wrote: > > On Wed, Jul 01, 2020 at 11:58:05AM -0600, Warner Losh wrote: > > > On Wed, Jul 1, 2020 at 8:51 AM Rodney W. Grimes wrote: > > > > ... > > > > We often have "An ls command appeared in Version 1 AT&T UNIX." Our source > > > > code and man page is not from that, but that is the history of ls. > > > > > > > > This *could* be amended and *should* be amended to reflect that apropos, > > > > and makewhatis got *updated* by a switch to the mandoc versions, but it > > > > is misleading to say it was intergrated with the switch to mandoc as that > > > > implies it did not exist before this action. > > > > > > I tend to agree with Rod here. These appeared in X the first time, but > > > noting they were replaced in version X with Y is the best way to address > > > the current provenance of the code... > > > > OK, I see your arguments. How about the following addition for HISTORY section, > > > > The apropos utility was integrated into FreeBSD 11.1 as part of the > > switch to mandoc. Before the switch to mandoc apropos was available since > > FreeBSD 1.0. > > It should be the other way around: > > "The apropos utility appeared in FreeBSD 1.0. Since FreeBSD 11.1 > it is based on mandoc implementation." Thats good, but realize the page already contains history that reads like: HISTORY Part of the functionality of whatis was already provided by the former manwhere utility in 1BSD. The apropos and whatis utilities first ap- peared in 2BSD. They were rewritten from scratch for OpenBSD 5.6. The -M option and the MANPATH variable first appeared in 4.3BSD; -m in 4.3BSD-Reno; -C in 4.4BSD Lite1; and -S and -s in OpenBSD 4.5 for apropos and in OpenBSD 5.6 for whatis. The options -acfhIKklOTWw appeared in OpenBSD 5.7. And further contains: UTHORS Bill Joy wrote manwhere in 1977 and the original BSD apropos and whatis in February 1979. The current version was written by Kristaps Dzonsons and Ingo Schwarze . So the history is rich and complete, do we really need to say when we incorporated this into FreeBSD from OpenBSD's mandoc in the manual page? > ./danfe -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Thu Jul 2 00:06:13 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5B45535EFB9; Thu, 2 Jul 2020 00:06:13 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49xz051YbDz41Fb; Thu, 2 Jul 2020 00:06:13 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 2D4121D31A; Thu, 2 Jul 2020 00:06:13 +0000 (UTC) Date: Thu, 2 Jul 2020 00:06:13 +0000 From: Alexey Dokuchaev To: rgrimes@freebsd.org Cc: Gordon Bergling , Warner Losh , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r362809 - head/contrib/mandoc Message-ID: <20200702000613.GA93146@FreeBSD.org> References: <20200701234213.GA54023@FreeBSD.org> <202007020001.062010DA058837@gndrsh.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202007020001.062010DA058837@gndrsh.dnsmgr.net> X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2020 00:06:13 -0000 On Wed, Jul 01, 2020 at 05:01:00PM -0700, Rodney W. Grimes wrote: > Thats good, but realize the page already contains history that > reads like: > > HISTORY > Part of the functionality of whatis was already provided by the former > manwhere utility in 1BSD. The apropos and whatis utilities first ap- > peared in 2BSD. They were rewritten from scratch for OpenBSD 5.6. > > The -M option and the MANPATH variable first appeared in 4.3BSD; -m in > 4.3BSD-Reno; -C in 4.4BSD Lite1; and -S and -s in OpenBSD 4.5 for apropos > and in OpenBSD 5.6 for whatis. The options -acfhIKklOTWw appeared in > OpenBSD 5.7. > > And further contains: > > AUTHORS > Bill Joy wrote manwhere in 1977 and the original BSD apropos and whatis > in February 1979. The current version was written by Kristaps Dzonsons > and Ingo Schwarze . > > So the history is rich and complete, do we really need to say when we > incorporated this into FreeBSD from OpenBSD's mandoc in the manual page? Ah, in this case, the only thing lacking from the current version is mention of FreeBSD 11.1. Sorry for not checking with that before writing my reply. My main point, however, was that reverse chronological order looks strange. ./danfe From owner-svn-src-all@freebsd.org Thu Jul 2 01:02:41 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A116E3606F3; Thu, 2 Jul 2020 01:02:41 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49y0FF3sSLz43tm; Thu, 2 Jul 2020 01:02:41 +0000 (UTC) (envelope-from mav@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 4D32012615; Thu, 2 Jul 2020 01:02:41 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06212fZb049473; Thu, 2 Jul 2020 01:02:41 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06212ffC049472; Thu, 2 Jul 2020 01:02:41 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202007020102.06212ffC049472@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 2 Jul 2020 01:02:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362881 - stable/12/sys/dev/nvme X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sys/dev/nvme X-SVN-Commit-Revision: 362881 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2020 01:02:41 -0000 Author: mav Date: Thu Jul 2 01:02:40 2020 New Revision: 362881 URL: https://svnweb.freebsd.org/changeset/base/362881 Log: MFC r362630: Fix few panics on NVMe's timing out initialization requests. Modified: stable/12/sys/dev/nvme/nvme_ctrlr.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/nvme/nvme_ctrlr.c ============================================================================== --- stable/12/sys/dev/nvme/nvme_ctrlr.c Wed Jul 1 23:47:51 2020 (r362880) +++ stable/12/sys/dev/nvme/nvme_ctrlr.c Thu Jul 2 01:02:40 2020 (r362881) @@ -1020,11 +1020,20 @@ nvme_ctrlr_start(void *ctrlr_arg, bool resetting) if (resetting) nvme_qpair_reset(&ctrlr->adminq); - for (i = 0; i < ctrlr->num_io_queues; i++) - nvme_qpair_reset(&ctrlr->ioq[i]); + if (ctrlr->ioq != NULL) { + for (i = 0; i < ctrlr->num_io_queues; i++) + nvme_qpair_reset(&ctrlr->ioq[i]); + } nvme_admin_qpair_enable(&ctrlr->adminq); + /* + * If it was a reset on initialization command timeout, just + * return here, letting initialization code fail gracefully. + */ + if (resetting && !ctrlr->is_initialized) + return; + if (nvme_ctrlr_identify(ctrlr) != 0) { nvme_ctrlr_fail(ctrlr); return; @@ -1079,7 +1088,6 @@ void nvme_ctrlr_start_config_hook(void *arg) { struct nvme_controller *ctrlr = arg; - int status; /* * Reset controller twice to ensure we do a transition from cc.en==1 to @@ -1087,19 +1095,15 @@ nvme_ctrlr_start_config_hook(void *arg) * controller was left in when boot handed off to OS. Linux doesn't do * this, however. If we adopt that policy, see also nvme_ctrlr_resume(). */ - status = nvme_ctrlr_hw_reset(ctrlr); - if (status != 0) { + if (nvme_ctrlr_hw_reset(ctrlr) != 0) { +fail: nvme_ctrlr_fail(ctrlr); config_intrhook_disestablish(&ctrlr->config_hook); return; } - status = nvme_ctrlr_hw_reset(ctrlr); - if (status != 0) { - nvme_ctrlr_fail(ctrlr); - config_intrhook_disestablish(&ctrlr->config_hook); - return; - } + if (nvme_ctrlr_hw_reset(ctrlr) != 0) + goto fail; nvme_qpair_reset(&ctrlr->adminq); nvme_admin_qpair_enable(&ctrlr->adminq); @@ -1108,7 +1112,7 @@ nvme_ctrlr_start_config_hook(void *arg) nvme_ctrlr_construct_io_qpairs(ctrlr) == 0) nvme_ctrlr_start(ctrlr, false); else - nvme_ctrlr_fail(ctrlr); + goto fail; nvme_sysctl_initialize_ctrlr(ctrlr); config_intrhook_disestablish(&ctrlr->config_hook); @@ -1418,10 +1422,12 @@ nvme_ctrlr_destruct(struct nvme_controller *ctrlr, dev nvme_ctrlr_hmb_enable(ctrlr, false, false); nvme_ctrlr_delete_qpairs(ctrlr); } + nvme_ctrlr_hmb_free(ctrlr); + } + if (ctrlr->ioq != NULL) { for (i = 0; i < ctrlr->num_io_queues; i++) nvme_io_qpair_destroy(&ctrlr->ioq[i]); free(ctrlr->ioq, M_NVME); - nvme_ctrlr_hmb_free(ctrlr); } nvme_admin_qpair_destroy(&ctrlr->adminq); From owner-svn-src-all@freebsd.org Thu Jul 2 01:10:19 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5BFB3360BBB; Thu, 2 Jul 2020 01:10:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49y0Q31r1Sz44FL; Thu, 2 Jul 2020 01:10:19 +0000 (UTC) (envelope-from mav@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 217E11278D; Thu, 2 Jul 2020 01:10:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0621AIId049951; Thu, 2 Jul 2020 01:10:19 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0621AIqS049950; Thu, 2 Jul 2020 01:10:18 GMT (envelope-from mav@FreeBSD.org) Message-Id: <202007020110.0621AIqS049950@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 2 Jul 2020 01:10:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r362882 - svnadmin/conf X-SVN-Group: svnadmin X-SVN-Commit-Author: mav X-SVN-Commit-Paths: svnadmin/conf X-SVN-Commit-Revision: 362882 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2020 01:10:19 -0000 Author: mav Date: Thu Jul 2 01:10:18 2020 New Revision: 362882 URL: https://svnweb.freebsd.org/changeset/base/362882 Log: Release Ryan Moeller (freqlabs) from mentorship. Approved by: mmacy (co-mentor) Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Thu Jul 2 01:02:40 2020 (r362881) +++ svnadmin/conf/mentors Thu Jul 2 01:10:18 2020 (r362882) @@ -13,7 +13,6 @@ afedorov vmaffione Co-mentor: jhb anish jhb brd allanjude Co-mentor: bapt -freqlabs mav Co-mentor: mmacy gordon delphij Co-mentor: emaste jceel trasz jkh rwatson From owner-svn-src-all@freebsd.org Thu Jul 2 07:03:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 43C4A34B0D0; Thu, 2 Jul 2020 07:03:16 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49y8FJ16f8z4Psq; Thu, 2 Jul 2020 07:03:16 +0000 (UTC) (envelope-from tsoome@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 0A69316C3D; Thu, 2 Jul 2020 07:03:16 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06273FIu071287; Thu, 2 Jul 2020 07:03:15 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06273FoX071286; Thu, 2 Jul 2020 07:03:15 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202007020703.06273FoX071286@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Thu, 2 Jul 2020 07:03:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362883 - head/stand/libsa/zfs X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/libsa/zfs X-SVN-Commit-Revision: 362883 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2020 07:03:16 -0000 Author: tsoome Date: Thu Jul 2 07:03:15 2020 New Revision: 362883 URL: https://svnweb.freebsd.org/changeset/base/362883 Log: loader: potential memory leak and check return values Need to free nvlist before return from vdev_from_nvlist(). Sponsored by: Netflix, Klara Inc. Modified: head/stand/libsa/zfs/zfsimpl.c Modified: head/stand/libsa/zfs/zfsimpl.c ============================================================================== --- head/stand/libsa/zfs/zfsimpl.c Thu Jul 2 01:10:18 2020 (r362882) +++ head/stand/libsa/zfs/zfsimpl.c Thu Jul 2 07:03:15 2020 (r362883) @@ -1111,14 +1111,20 @@ vdev_from_nvlist(spa_t *spa, uint64_t top_guid, const return (rc); } rc = vdev_init(guid, kids, &vdev); - if (rc != 0) + if (rc != 0) { + nvlist_destroy(kids); return (rc); + } vdev->v_spa = spa; vdev->v_top = top_vdev; vdev_insert(top_vdev, vdev); rc = nvlist_next(kids); + if (rc != 0) { + nvlist_destroy(kids); + return (rc); + } } } else { /* @@ -1228,6 +1234,8 @@ vdev_update_from_nvlist(uint64_t top_guid, const nvlis vdev_set_initial_state(vdev, kids); rc = nvlist_next(kids); + if (rc != 0) + break; } } else { rc = 0; @@ -1290,7 +1298,9 @@ vdev_init_from_nvlist(spa_t *spa, const nvlist_t *nvli rc = vdev_update_from_nvlist(guid, kids); if (rc != 0) break; - nvlist_next(kids); + rc = nvlist_next(kids); + if (rc != 0) + break; } nvlist_destroy(kids); From owner-svn-src-all@freebsd.org Thu Jul 2 07:15:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0D39234B602; Thu, 2 Jul 2020 07:15:49 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49y8Wm6Jphz4QCC; Thu, 2 Jul 2020 07:15:48 +0000 (UTC) (envelope-from tsoome@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 BC75F170FD; Thu, 2 Jul 2020 07:15:48 +0000 (UTC) (envelope-from tsoome@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0627FmVt077554; Thu, 2 Jul 2020 07:15:48 GMT (envelope-from tsoome@FreeBSD.org) Received: (from tsoome@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0627FmYF077553; Thu, 2 Jul 2020 07:15:48 GMT (envelope-from tsoome@FreeBSD.org) Message-Id: <202007020715.0627FmYF077553@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tsoome set sender to tsoome@FreeBSD.org using -f From: Toomas Soome Date: Thu, 2 Jul 2020 07:15:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362884 - head/stand/libsa/zfs X-SVN-Group: head X-SVN-Commit-Author: tsoome X-SVN-Commit-Paths: head/stand/libsa/zfs X-SVN-Commit-Revision: 362884 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2020 07:15:49 -0000 Author: tsoome Date: Thu Jul 2 07:15:48 2020 New Revision: 362884 URL: https://svnweb.freebsd.org/changeset/base/362884 Log: loader: zfs reader does not need BOOT2 bits After switching zfsloader to use full libsa, we do not need spa_get_primary() and spa_get_primary_vdev() any more. Sponsored by: Netflix, Klara Inc. Modified: head/stand/libsa/zfs/zfsimpl.c Modified: head/stand/libsa/zfs/zfsimpl.c ============================================================================== --- head/stand/libsa/zfs/zfsimpl.c Thu Jul 2 07:03:15 2020 (r362883) +++ head/stand/libsa/zfs/zfsimpl.c Thu Jul 2 07:15:48 2020 (r362884) @@ -1336,34 +1336,6 @@ spa_find_by_name(const char *name) return (NULL); } -#ifdef BOOT2 -static spa_t * -spa_get_primary(void) -{ - - return (STAILQ_FIRST(&zfs_pools)); -} - -static vdev_t * -spa_get_primary_vdev(const spa_t *spa) -{ - vdev_t *vdev; - vdev_t *kid; - - if (spa == NULL) - spa = spa_get_primary(); - if (spa == NULL) - return (NULL); - vdev = spa->spa_root_vdev; - if (vdev == NULL) - return (NULL); - for (kid = STAILQ_FIRST(&vdev->v_children); kid != NULL; - kid = STAILQ_FIRST(&vdev->v_children)) - vdev = kid; - return (vdev); -} -#endif - static spa_t * spa_create(uint64_t guid, const char *name) { From owner-svn-src-all@freebsd.org Thu Jul 2 10:40:48 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 953413514EE; Thu, 2 Jul 2020 10:40:48 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49yF4J3TKCz4f0c; Thu, 2 Jul 2020 10:40:48 +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 5A9C5195ED; Thu, 2 Jul 2020 10:40:48 +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 062AemSi002537; Thu, 2 Jul 2020 10:40:48 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 062AemlD002519; Thu, 2 Jul 2020 10:40:48 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202007021040.062AemlD002519@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 2 Jul 2020 10:40:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362885 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 362885 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2020 10:40:48 -0000 Author: kib Date: Thu Jul 2 10:40:47 2020 New Revision: 362885 URL: https://svnweb.freebsd.org/changeset/base/362885 Log: Use tdfind() in pget(). Reviewed by: jhb, hselasky Sponsored by: Mellanox Technologies MFC after: 1 week Differential revision: https://reviews.freebsd.org/D25532 Modified: head/sys/kern/kern_proc.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Thu Jul 2 07:15:48 2020 (r362884) +++ head/sys/kern/kern_proc.c Thu Jul 2 10:40:47 2020 (r362885) @@ -455,30 +455,6 @@ pfind_any(pid_t pid) return (_pfind(pid, true)); } -static struct proc * -pfind_tid(pid_t tid) -{ - struct proc *p; - struct thread *td; - - sx_slock(&allproc_lock); - FOREACH_PROC_IN_SYSTEM(p) { - PROC_LOCK(p); - if (p->p_state == PRS_NEW) { - PROC_UNLOCK(p); - continue; - } - FOREACH_THREAD_IN_PROC(p, td) { - if (td->td_tid == tid) - goto found; - } - PROC_UNLOCK(p); - } -found: - sx_sunlock(&allproc_lock); - return (p); -} - /* * Locate a process group by number. * The caller must hold proctree_lock. @@ -506,6 +482,7 @@ int pget(pid_t pid, int flags, struct proc **pp) { struct proc *p; + struct thread *td1; int error; p = curproc; @@ -519,7 +496,9 @@ pget(pid_t pid, int flags, struct proc **pp) else p = pfind(pid); } else if ((flags & PGET_NOTID) == 0) { - p = pfind_tid(pid); + td1 = tdfind(pid, -1); + if (td1 != NULL) + p = td1->td_proc; } if (p == NULL) return (ESRCH); From owner-svn-src-all@freebsd.org Thu Jul 2 10:42:58 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EAF9F351664; Thu, 2 Jul 2020 10:42:58 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49yF6p5yv6z4fL2; Thu, 2 Jul 2020 10:42:58 +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 9673119903; Thu, 2 Jul 2020 10:42:58 +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 062AgwVe007275; Thu, 2 Jul 2020 10:42:58 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 062AgwhG007274; Thu, 2 Jul 2020 10:42:58 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202007021042.062AgwhG007274@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 2 Jul 2020 10:42:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362886 - head/sys/compat/linuxkpi/common/src X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/compat/linuxkpi/common/src X-SVN-Commit-Revision: 362886 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2020 10:42:59 -0000 Author: kib Date: Thu Jul 2 10:42:58 2020 New Revision: 362886 URL: https://svnweb.freebsd.org/changeset/base/362886 Log: linuxkpi: improvements for linux_pid_task() and linux_get_pid_task(). Unify functions bodies. Do not call tdfind() if pid is passed, and do not call pfind() if tid is supplied. Reviewed by: hselasky Sponsored by: Mellanox Technologies MFC after: 1 week Differential revision: https://reviews.freebsd.org/D25534 Modified: head/sys/compat/linuxkpi/common/src/linux_current.c Modified: head/sys/compat/linuxkpi/common/src/linux_current.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_current.c Thu Jul 2 10:40:47 2020 (r362885) +++ head/sys/compat/linuxkpi/common/src/linux_current.c Thu Jul 2 10:42:58 2020 (r362886) @@ -155,65 +155,52 @@ linuxkpi_thread_dtor(void *arg __unused, struct thread put_task_struct(ts); } -struct task_struct * -linux_pid_task(pid_t pid) +static struct task_struct * +linux_get_pid_task_int(pid_t pid, const bool do_get) { struct thread *td; struct proc *p; + struct task_struct *ts; - /* try to find corresponding thread */ - td = tdfind(pid, -1); - if (td != NULL) { - struct task_struct *ts = td->td_lkpi_task; - PROC_UNLOCK(td->td_proc); - return (ts); - } - - /* try to find corresponding procedure */ - p = pfind(pid); - if (p != NULL) { - FOREACH_THREAD_IN_PROC(p, td) { - struct task_struct *ts = td->td_lkpi_task; - if (ts != NULL) { - PROC_UNLOCK(p); - return (ts); + if (pid > PID_MAX) { + /* try to find corresponding thread */ + td = tdfind(pid, -1); + if (td != NULL) { + ts = td->td_lkpi_task; + if (do_get && ts != NULL) + get_task_struct(ts); + PROC_UNLOCK(td->td_proc); + return (ts); + } + } else { + /* try to find corresponding procedure */ + p = pfind(pid); + if (p != NULL) { + FOREACH_THREAD_IN_PROC(p, td) { + ts = td->td_lkpi_task; + if (ts != NULL) { + if (do_get) + get_task_struct(ts); + PROC_UNLOCK(p); + return (ts); + } } + PROC_UNLOCK(p); } - PROC_UNLOCK(p); } return (NULL); } struct task_struct * -linux_get_pid_task(pid_t pid) +linux_pid_task(pid_t pid) { - struct thread *td; - struct proc *p; + return (linux_get_pid_task_int(pid, false)); +} - /* try to find corresponding thread */ - td = tdfind(pid, -1); - if (td != NULL) { - struct task_struct *ts = td->td_lkpi_task; - if (ts != NULL) - get_task_struct(ts); - PROC_UNLOCK(td->td_proc); - return (ts); - } - - /* try to find corresponding procedure */ - p = pfind(pid); - if (p != NULL) { - FOREACH_THREAD_IN_PROC(p, td) { - struct task_struct *ts = td->td_lkpi_task; - if (ts != NULL) { - get_task_struct(ts); - PROC_UNLOCK(p); - return (ts); - } - } - PROC_UNLOCK(p); - } - return (NULL); +struct task_struct * +linux_get_pid_task(pid_t pid) +{ + return (linux_get_pid_task_int(pid, true)); } bool From owner-svn-src-all@freebsd.org Thu Jul 2 10:44:46 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 58DE5351C02; Thu, 2 Jul 2020 10:44:46 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49yF8t1m4lz4fZJ; Thu, 2 Jul 2020 10:44:46 +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 1FD5119335; Thu, 2 Jul 2020 10:44:46 +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 062AikLB007425; Thu, 2 Jul 2020 10:44:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 062Aij2U007424; Thu, 2 Jul 2020 10:44:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202007021044.062Aij2U007424@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 2 Jul 2020 10:44:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362887 - head/sys/dev/mlx5/mlx5_core X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_core X-SVN-Commit-Revision: 362887 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2020 10:44:46 -0000 Author: kib Date: Thu Jul 2 10:44:45 2020 New Revision: 362887 URL: https://svnweb.freebsd.org/changeset/base/362887 Log: mlx5_core: remove unneccessary LFENCE instruction. Use fence instead of barrier, which is optimized to take advantage of the x86 TSO memory model. Reviewed by: hselasky Sponsored by: Mellanox Technologies MFC after: 1 week Modified: head/sys/dev/mlx5/mlx5_core/mlx5_eq.c Modified: head/sys/dev/mlx5/mlx5_core/mlx5_eq.c ============================================================================== --- head/sys/dev/mlx5/mlx5_core/mlx5_eq.c Thu Jul 2 10:42:58 2020 (r362886) +++ head/sys/dev/mlx5/mlx5_core/mlx5_eq.c Thu Jul 2 10:44:45 2020 (r362887) @@ -240,7 +240,7 @@ static int mlx5_eq_int(struct mlx5_core_dev *dev, stru * Make sure we read EQ entry contents after we've * checked the ownership bit. */ - rmb(); + atomic_thread_fence_acq(); mlx5_core_dbg(eq->dev, "eqn %d, eqe type %s\n", eq->eqn, eqe_type_str(eqe->type)); From owner-svn-src-all@freebsd.org Thu Jul 2 12:54:51 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 48763355E8E; Thu, 2 Jul 2020 12:54:51 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49yJ2z1Fj2z3Xj8; Thu, 2 Jul 2020 12:54:51 +0000 (UTC) (envelope-from mjg@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 0EBD91AF37; Thu, 2 Jul 2020 12:54:51 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 062Csogp086779; Thu, 2 Jul 2020 12:54:50 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 062Cso12086778; Thu, 2 Jul 2020 12:54:50 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202007021254.062Cso12086778@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 2 Jul 2020 12:54:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362888 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 362888 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2020 12:54:51 -0000 Author: mjg Date: Thu Jul 2 12:54:50 2020 New Revision: 362888 URL: https://svnweb.freebsd.org/changeset/base/362888 Log: cache: fix misplaced fence in cache_ncp_invalidate The intent was to mark the entry as invalid before cache_zap starts messing with it. While here add some comments. Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Thu Jul 2 10:44:45 2020 (r362887) +++ head/sys/kern/vfs_cache.c Thu Jul 2 12:54:50 2020 (r362888) @@ -147,22 +147,33 @@ struct namecache_ts { #define NCF_HOTNEGATIVE 0x40 #define NCF_INVALID 0x80 -static bool -cache_ncp_invalid(struct namecache *ncp) -{ - - atomic_thread_fence_acq(); - return ((ncp->nc_flag & NCF_INVALID) != 0); -} - +/* + * Mark an entry as invalid. + * + * This is called before it starts getting deconstructed. + */ static void cache_ncp_invalidate(struct namecache *ncp) { - atomic_thread_fence_rel(); KASSERT((ncp->nc_flag & NCF_INVALID) == 0, ("%s: entry %p already invalid", __func__, ncp)); ncp->nc_flag |= NCF_INVALID; + atomic_thread_fence_rel(); +} + +/* + * Verify validity of an entry. + * + * All places which elide locks are supposed to call this after they are + * done with reading from an entry. + */ +static bool +cache_ncp_invalid(struct namecache *ncp) +{ + + atomic_thread_fence_acq(); + return ((ncp->nc_flag & NCF_INVALID) != 0); } /* From owner-svn-src-all@freebsd.org Thu Jul 2 12:56:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 99071355F0B; Thu, 2 Jul 2020 12:56:21 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49yJ4j3X0Jz3Y87; Thu, 2 Jul 2020 12:56:21 +0000 (UTC) (envelope-from mjg@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 5C2C01AF38; Thu, 2 Jul 2020 12:56:21 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 062CuLPW086933; Thu, 2 Jul 2020 12:56:21 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 062CuLar086932; Thu, 2 Jul 2020 12:56:21 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202007021256.062CuLar086932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 2 Jul 2020 12:56:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362889 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 362889 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2020 12:56:21 -0000 Author: mjg Date: Thu Jul 2 12:56:20 2020 New Revision: 362889 URL: https://svnweb.freebsd.org/changeset/base/362889 Log: cache: add missing call to cache_ncp_invalid for negative hits Note the dtrace probe can fire even the entry is gone, but I don't think that's worth fixing. Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Thu Jul 2 12:54:50 2020 (r362888) +++ head/sys/kern/vfs_cache.c Thu Jul 2 12:56:20 2020 (r362889) @@ -1342,7 +1342,7 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, st uint32_t hash; enum vgetstate vs; int error, ltype; - bool try_smr, doing_smr; + bool try_smr, doing_smr, whiteout; #ifdef DEBUG_CACHE if (__predict_false(!doingcache)) { @@ -1498,28 +1498,28 @@ negative_success: goto zap_and_exit; } + SDT_PROBE2(vfs, namecache, lookup, hit__negative, dvp, ncp->nc_name); + cache_out_ts(ncp, tsp, ticksp); + counter_u64_add(numneghits, 1); + whiteout = (ncp->nc_flag & NCF_WHITE); + if (doing_smr) { - if ((ncp->nc_flag & NCF_HOTNEGATIVE) == 0) { - /* - * We need to take locks to promote the entry. - */ + /* + * We need to take locks to promote an entry. + */ + if ((ncp->nc_flag & NCF_HOTNEGATIVE) == 0 || + cache_ncp_invalid(ncp)) { vfs_smr_exit(); doing_smr = false; goto retry_hashed; } + vfs_smr_exit(); } else { cache_negative_hit(ncp); + cache_lookup_unlock(blp, dvlp); } - counter_u64_add(numneghits, 1); - if (ncp->nc_flag & NCF_WHITE) + if (whiteout) cnp->cn_flags |= ISWHITEOUT; - SDT_PROBE2(vfs, namecache, lookup, hit__negative, dvp, - ncp->nc_name); - cache_out_ts(ncp, tsp, ticksp); - if (doing_smr) - vfs_smr_exit(); - else - cache_lookup_unlock(blp, dvlp); return (ENOENT); zap_and_exit: From owner-svn-src-all@freebsd.org Thu Jul 2 12:58:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B262F355D41; Thu, 2 Jul 2020 12:58:07 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49yJ6l4Mhwz3YKy; Thu, 2 Jul 2020 12:58:07 +0000 (UTC) (envelope-from mjg@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 7A5FD1B0FA; Thu, 2 Jul 2020 12:58:07 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 062Cw7rB087051; Thu, 2 Jul 2020 12:58:07 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 062Cw7Av087050; Thu, 2 Jul 2020 12:58:07 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202007021258.062Cw7Av087050@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 2 Jul 2020 12:58:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362890 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 362890 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2020 12:58:07 -0000 Author: mjg Date: Thu Jul 2 12:58:07 2020 New Revision: 362890 URL: https://svnweb.freebsd.org/changeset/base/362890 Log: cred: add a prediction to crfree for td->td_realucred == cr This matches crhold and eliminates an assembly maze in the common case. Modified: head/sys/kern/kern_prot.c Modified: head/sys/kern/kern_prot.c ============================================================================== --- head/sys/kern/kern_prot.c Thu Jul 2 12:56:20 2020 (r362889) +++ head/sys/kern/kern_prot.c Thu Jul 2 12:58:07 2020 (r362890) @@ -1985,7 +1985,7 @@ crfree(struct ucred *cr) struct thread *td; td = curthread; - if (td->td_realucred == cr) { + if (__predict_true(td->td_realucred == cr)) { KASSERT(cr->cr_users > 0, ("%s: users %d not > 0 on cred %p", __func__, cr->cr_users, cr)); td->td_ucredref--; From owner-svn-src-all@freebsd.org Thu Jul 2 13:17:32 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 743743564C9; Thu, 2 Jul 2020 13:17:32 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49yJY82Sq7z3ZKC; Thu, 2 Jul 2020 13:17:32 +0000 (UTC) (envelope-from asomers@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 387641B40E; Thu, 2 Jul 2020 13:17:32 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 062DHW7Y099409; Thu, 2 Jul 2020 13:17:32 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 062DHWKY099408; Thu, 2 Jul 2020 13:17:32 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <202007021317.062DHWKY099408@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 2 Jul 2020 13:17:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362891 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Commit-Revision: 362891 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2020 13:17:32 -0000 Author: asomers Date: Thu Jul 2 13:17:31 2020 New Revision: 362891 URL: https://svnweb.freebsd.org/changeset/base/362891 Log: Fix page fault in zfsctl_snapdir_getattr Must acquire the z_teardown_lock before accessing the zfsvfs_t object. I can't reproduce this panic on demand, but this looks like the correct solution. PR: 247668 Reviewed by: avg MFC after: 2 weeks Sponsored by: Axcient Differential Revision: https://reviews.freebsd.org/D25543 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Thu Jul 2 12:58:07 2020 (r362890) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c Thu Jul 2 13:17:31 2020 (r362891) @@ -1121,12 +1121,13 @@ zfsctl_snapdir_getattr(ap) vnode_t *vp = ap->a_vp; vattr_t *vap = ap->a_vap; zfsvfs_t *zfsvfs = vp->v_vfsp->vfs_data; - dsl_dataset_t *ds = dmu_objset_ds(zfsvfs->z_os); + dsl_dataset_t *ds; sfs_node_t *node = vp->v_data; uint64_t snap_count; int err; ZFS_ENTER(zfsvfs); + ds = dmu_objset_ds(zfsvfs->z_os); zfsctl_common_getattr(vp, vap); vap->va_ctime = dmu_objset_snap_cmtime(zfsvfs->z_os); vap->va_mtime = vap->va_ctime; From owner-svn-src-all@freebsd.org Thu Jul 2 13:37:20 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4105B356DD4 for ; Thu, 2 Jul 2020 13:37:20 +0000 (UTC) (envelope-from 40532=ede5cb96-46f4-4ad8-87dc-1ab6d77d8843=91=24813111@e.promowagon.fr) Received: from ip2.promowagon.fr (ip2.promowagon.fr [185.31.81.148]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49yJzy6yGDz3bYk for ; Thu, 2 Jul 2020 13:37:18 +0000 (UTC) (envelope-from 40532=ede5cb96-46f4-4ad8-87dc-1ab6d77d8843=91=24813111@e.promowagon.fr) Received: by ip2.promowagon.fr id hvnhga2l7244 for ; Thu, 2 Jul 2020 13:37:09 +0000 (envelope-from <40532=ede5cb96-46f4-4ad8-87dc-1ab6d77d8843=91=24813111@e.promowagon.fr>) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; q=dns/txt; d=promowagon.fr; s=default1k; h=Date:Subject:From:To; bh=fkazNrGqMc44woKoZHJ8/OxMb0gaDnn7Jp+Gi3OPk2U=; b=YRJK1cJmu+SKHcSeA1yt3EdSy+0+xnbz2pTpG4544q1W3AfR21+KW9MNPikpLhtLH+vt TrEB4OfSW07t57BWz6avvTufjGbXvgdgH/joBfGV8V1LDGGfG5sazRgOJ/n+/CHRryixUa 4EEjv/9P5A1giqC+mWdGcphEm0TbCoJOc= MIME-Version: 1.0 Date: Thu, 02 Jul 2020 13:37:09 +0000 Message-ID: <40532=ede5cb96-46f4-4ad8-87dc-1ab6d77d8843=91=24813111@links.indisuivi.fr> Subject: =?utf-8?Q?Profitez_de_la_fibre_s=C3=A9curit=C3=A9_incluse_pour_votre_entr?= =?utf-8?Q?eprise?= From: "=?utf-8?Q?Bouygues_Telecom_Entreprises?=" Reply-To: =?utf-8?Q?Bouygues_Telecom_Entreprises?= To: svn-src-all@freebsd.org List-Unsubscribe-Post: List-Unsubscribe=One-Click X-Message-Type: newsletter X-Rspamd-Queue-Id: 49yJzy6yGDz3bYk X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=pass header.d=promowagon.fr header.s=default1k header.b=YRJK1cJm; dmarc=none; spf=pass (mx1.freebsd.org: domain of 40532=ede5cb96-46f4-4ad8-87dc-1ab6d77d8843=91=24813111@e.promowagon.fr designates 185.31.81.148 as permitted sender) smtp.mailfrom=40532=ede5cb96-46f4-4ad8-87dc-1ab6d77d8843=91=24813111@e.promowagon.fr X-Spamd-Result: default: False [1.57 / 15.00]; HAS_REPLYTO(0.00)[info@promowagon.fr]; R_SPF_ALLOW(-0.20)[+ip4:185.31.80.0/22]; REPLYTO_DN_EQ_FROM_DN(0.00)[]; REPLYTO_ADDR_EQ_FROM(0.00)[]; TO_DN_NONE(0.00)[]; DKIM_TRACE(0.00)[promowagon.fr:+]; FROM_EXCESS_QP(1.20)[]; FORGED_SENDER(0.30)[info@promowagon.fr,40532=ede5cb96-46f4-4ad8-87dc-1ab6d77d8843=91=24813111@e.promowagon.fr]; RCVD_COUNT_ZERO(0.00)[0]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:47544, ipnet:185.31.80.0/22, country:PL]; FROM_NEQ_ENVFROM(0.00)[info@promowagon.fr,40532=ede5cb96-46f4-4ad8-87dc-1ab6d77d8843=91=24813111@e.promowagon.fr]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.23)[-0.227]; R_DKIM_ALLOW(-0.20)[promowagon.fr:s=default1k]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.86)[-0.862]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[promowagon.fr]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; MANY_INVISIBLE_PARTS(0.10)[2]; REPLYTO_EXCESS_QP(1.20)[]; NEURAL_SPAM_SHORT(0.37)[0.374] Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2020 13:37:20 -0000 Si vous ne visualisez pas ce message correctement [1]cliquez-ici Pour ne plus recevoir nos offres vous pouvez vous d=C3=A9sabonner en bas= de cette page ou bien [2]cliquer ici. References 1. https://links.indisuivi.fr/v/2ZI/T4STYRnL_bKi9FK_B9_7a3/6f62acbf 2. https://links.indisuivi.fr/u/2ZI/T4STYRnL_bKi9FK_B9_7a3/Fd/FA-V9/F/a3= a58334 La solution pour acc=C3=A9l=C3=A9rer la croissance de votre business. De= mandez un devis ??????[1]ICI. Version [2]en ligne. [3]logo Bouygues Telecom Entreprises fibre entreprise [4]La fibre entreprise, maintenant vous avez le choix Avec la Fibre Entreprise S=C3=A9curis=C3=A9e, garantissez croissance et s=C3=A9curit=C3=A9 =C3=A0 votre entreprise. Plus de performance avec la Fibre Entreprise B=C3=A9n=C3=A9ficiez d'un acc=C3=A8s tr=C3=A8s haut d=C3=A9bit jusqu'=C3= =A0 1 Gbps^(1) pour plus de confort et d'efficacit=C3=A9 dans vos usages professionnels : t=C3=A9l= =C3=A9chargement de fichiers lourds et navigation plus rapides, usage de la vid=C3=A9o et sauvegarde dans le cloud plus fluides, travail =C3=A0 distance en collaboration possible etc. Plus de s=C3=A9r=C3=A9nit=C3=A9 avec la s=C3=A9curit=C3=A9 incluse Prot=C3=A9gez votre acc=C3=A8s Internet, vos usages web et applications = m=C3=A9tier des cyberattaques. Profitez =C3=A9galement d'un filtrage des usages web = de vos collaborateurs, d'un acc=C3=A8s =C3=A0 vos donn=C3=A9es statistiques= et =C3=A0 des rapports de s=C3=A9curit=C3=A9. __________________________________________________________________ d=C3=A8s 69=E2=82=AC par mois pendant la dur=C3=A9e de votre engagement En ce moment, les frais de mise en service sont offerts* (soit une =C3=A9conomie de 1= 50=E2=82=AC) __________________________________________________________________ [5]D=C3=A9couvrir les avantages de la solution En savoir plus sur la Fibre Entreprise : [6]bblog [7]youtube [8]twitter [9]linkedn *Service disponible en France m=C3=A9tropolitaine sous r=C3=A9serve d'= =C3=A9ligibilit=C3=A9 technique FTTH. Engagement 36 mois. Tarifs HT. D=C3=A9tails et conditions de l'offre disponibles sur demande aupr=C3=A8= s de notre service commercial ou de votre conseiller Bouygues Telecom Entreprises. Fibre entreprise s=C3=A9curis=C3=A9e : Tr=C3=A8s Haut D=C3=A9bit jusqu'= =C3=A0 1Gbps en descendant et jusqu'=C3=A0 250Mbps en montant avec le service Internet s=C3=A9curis=C3=A9 inclus. Norme Wi-Fi AC disponible avec terminaux (PC = et tablettes) compatibles. Tarif d=C3=A8s 69=E2=82=AC/mois. Soit 39=E2=82=AC/mois l'acc=C3=A8s + 20= =E2=82=AC/mois le service Internet + 10=E2=82=AC/mois le service Internet s=C3=A9curis=C3=A9 si so= uscription simultan=C3=A9e avec l'acc=C3=A8s Fibre entreprise (au lieu de 20=E2=82= =AC/mois si souscrit s=C3=A9par=C3=A9ment). Frais de mise en service =C3=A0 0=E2=82= =AC au lieu de 150=E2=82=AC par acc=C3=A8s seul. (1) Giga bits par seconde en d=C3=A9bit descendant c'est-=C3=A0-dire le = flux de donn=C3=A9es que vous recevez sur votre ligne et qui correspond =C3=A0 l= a vitesse =C3=A0 laquelle vous pouvez naviguer sur internet et t=C3=A9l=C3=A9charg= er des fichiers lourds. Bouygues Telecom s'inscrit dans le Plan France Tr=C3=A8s Haut D=C3=A9bit= et d=C3=A9ploie son r=C3=A9seau Fibre optique pour permettre =C3=A0 tous le= s particuliers, entreprises et administrations d'avoir un acc=C3=A8s =C3= =A0 Internet dans les meilleures conditions, dans les grandes villes comme dans les zones plus rurales. =C2=A9 BOUYGUES TELECOM - 37-39 rue Boissi=C3=A8re =C2=96 75116 PARIS - = S.A au capital de [10]712 588 399,56 =E2=82=AC - [11]397 480 930 R.C.S. Paris [campaign_view_MTA3MjU=3D_%%email%%.png] [pixel.gif?r=3D491ee37a2a43c6544604da87e08d9bf6579ceb35] [effi.pixel?id_compteur=3D22475089] References 1. https://links.indisuivi.fr/c/2ZI/cB8/T4STYRnL_bKi9FK_B9_7a3/Fd/FA-V9/= F/92f49eaa 2. https://links.indisuivi.fr/c/2ZI/cBY/T4STYRnL_bKi9FK_B9_7a3/Fd/FA-V9/= F/09cbd571 3. https://links.indisuivi.fr/c/2ZI/cBe/T4STYRnL_bKi9FK_B9_7a3/Fd/FA-V9/= F/70ac42df 4. https://links.indisuivi.fr/c/2ZI/cBf/T4STYRnL_bKi9FK_B9_7a3/Fd/FA-V9/= F/9b060a62 5. https://links.indisuivi.fr/c/2ZI/cBu/T4STYRnL_bKi9FK_B9_7a3/Fd/FA-V9/= F/e698d7a8 6. https://links.indisuivi.fr/c/2ZI/cB0/T4STYRnL_bKi9FK_B9_7a3/Fd/FA-V9/= F/34565731 7. https://links.indisuivi.fr/c/2ZI/c_y/T4STYRnL_bKi9FK_B9_7a3/Fd/FA-V9/= F/5363681b 8. https://links.indisuivi.fr/c/2ZI/c_F/T4STYRnL_bKi9FK_B9_7a3/Fd/FA-V9/= F/c1aeb708 9. https://links.indisuivi.fr/c/2ZI/c_c/T4STYRnL_bKi9FK_B9_7a3/Fd/FA-V9/= F/d1394421 10. https://links.indisuivi.fr/c/2ZI/c_m/T4STYRnL_bKi9FK_B9_7a3/Fd/FA-V9/= F/7bbe1a81 11. https://links.indisuivi.fr/c/2ZI/c_b/T4STYRnL_bKi9FK_B9_7a3/Fd/FA-V9/= F/885f7c4a Vous disposez d'un droit d'acc=C3=A8s, de rectification, d'opposition et= de consentement auquel vous avez acc=C3=A8s =C3=A0 partir de cette page = web : [1]Charte des Donn=C3=A9es Personnelles . Vous recevez ce message sur votre adresse email car vous =C3=AAtes inscr= it =C3=A0 notre liste compos=C3=A9e de dirigeants et professionnels. MEDIAZUR - 1 = Rue Prommenade des anglais 06000 Nice. 833 975 758 RCS. Pour stopper la r=C3=A9ception par email de nos messages, suivez ce lie= n : [2]Se d=C3=A9sabonner.. References 1. https://links.indisuivi.fr/c/2ZI/c_n/T4STYRnL_bKi9FK_B9_7a3/Fd/FA-V9/= F/9014523c 2. https://links.indisuivi.fr/u/2ZI/T4STYRnL_bKi9FK_B9_7a3/Fd/FA-V9/F/a3= a58334 From owner-svn-src-all@freebsd.org Thu Jul 2 16:10:35 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 41B8535A29C; Thu, 2 Jul 2020 16:10:35 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49yNNq11Ydz41j1; Thu, 2 Jul 2020 16:10:35 +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 077C81D583; Thu, 2 Jul 2020 16:10:35 +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 062GAYHs004081; Thu, 2 Jul 2020 16:10:34 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 062GAYPp004080; Thu, 2 Jul 2020 16:10:34 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202007021610.062GAYPp004080@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: Thu, 2 Jul 2020 16:10:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362892 - stable/12/usr.sbin/periodic X-SVN-Group: stable-12 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/12/usr.sbin/periodic X-SVN-Commit-Revision: 362892 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2020 16:10:35 -0000 Author: 0mp (doc,ports committer) Date: Thu Jul 2 16:10:34 2020 New Revision: 362892 URL: https://svnweb.freebsd.org/changeset/base/362892 Log: MFC 362321: Improve periodic(8) manual page presentation - Update synopsis to present all available arguments. - Consistently call the argument specifying an arbitrary directory a "directory". - Do not put macros into -width argument to Bl. They do not expand there. - Stylize command modifiers like "daily" with Cm instead of Pa. While technically periodic(8) operates on directories with such names, it is confusing from the perspective of the manual page reader as Pa and Ar are stylized the same way. Also, I cannot recall a single manual page where Pa would be used to describe the syntax of command-line arguments. Modified: stable/12/usr.sbin/periodic/periodic.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/periodic/periodic.8 ============================================================================== --- stable/12/usr.sbin/periodic/periodic.8 Thu Jul 2 13:17:31 2020 (r362891) +++ stable/12/usr.sbin/periodic/periodic.8 Thu Jul 2 16:10:34 2020 (r362892) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 20, 2016 +.Dd June 18, 2020 .Dt PERIODIC 8 .Os .Sh NAME @@ -32,7 +32,10 @@ .Nd run periodic system functions .Sh SYNOPSIS .Nm -.Ar directory ... +.Sm off +.Cm daily | weekly | monthly | security | Ar directory +.Sm on +.Ar ... .Sh DESCRIPTION The .Nm @@ -42,22 +45,22 @@ to execute shell scripts located in the specified directory. .Pp One or more of the following arguments must be specified: -.Bl -tag -width ".Pa monthly" -.It Pa daily +.Bl -tag -width "directory" +.It Cm daily Perform the standard daily periodic executable run. This usually occurs early in the morning (local time). -.It Pa weekly +.It Cm weekly Perform the standard weekly periodic executable run. This usually occurs very early on Saturday mornings. -.It Pa monthly +.It Cm monthly Perform the standard monthly periodic executable run. This usually occurs on the first day of the month. -.It Pa security +.It Cm security Perform the standard daily security checks. This is usually spawned by the -.Pa daily +.Cm daily run. -.It Ar path +.It Ar directory An arbitrary directory containing a set of executables to be run. .El .Pp From owner-svn-src-all@freebsd.org Thu Jul 2 16:11:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0C38735A51B; Thu, 2 Jul 2020 16:11:14 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49yNPY6cKhz41tT; Thu, 2 Jul 2020 16:11:13 +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 C72A91D4A1; Thu, 2 Jul 2020 16:11:13 +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 062GBDV2007477; Thu, 2 Jul 2020 16:11:13 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 062GBD8e007476; Thu, 2 Jul 2020 16:11:13 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202007021611.062GBD8e007476@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: Thu, 2 Jul 2020 16:11:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362893 - stable/11/usr.sbin/periodic X-SVN-Group: stable-11 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/11/usr.sbin/periodic X-SVN-Commit-Revision: 362893 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2020 16:11:14 -0000 Author: 0mp (doc,ports committer) Date: Thu Jul 2 16:11:13 2020 New Revision: 362893 URL: https://svnweb.freebsd.org/changeset/base/362893 Log: MFC 362321: Improve periodic(8) manual page presentation - Update synopsis to present all available arguments. - Consistently call the argument specifying an arbitrary directory a "directory". - Do not put macros into -width argument to Bl. They do not expand there. - Stylize command modifiers like "daily" with Cm instead of Pa. While technically periodic(8) operates on directories with such names, it is confusing from the perspective of the manual page reader as Pa and Ar are stylized the same way. Also, I cannot recall a single manual page where Pa would be used to describe the syntax of command-line arguments. Modified: stable/11/usr.sbin/periodic/periodic.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/periodic/periodic.8 ============================================================================== --- stable/11/usr.sbin/periodic/periodic.8 Thu Jul 2 16:10:34 2020 (r362892) +++ stable/11/usr.sbin/periodic/periodic.8 Thu Jul 2 16:11:13 2020 (r362893) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 20, 2016 +.Dd June 18, 2020 .Dt PERIODIC 8 .Os .Sh NAME @@ -32,7 +32,10 @@ .Nd run periodic system functions .Sh SYNOPSIS .Nm -.Ar directory ... +.Sm off +.Cm daily | weekly | monthly | security | Ar directory +.Sm on +.Ar ... .Sh DESCRIPTION The .Nm @@ -42,22 +45,22 @@ to execute shell scripts located in the specified directory. .Pp One or more of the following arguments must be specified: -.Bl -tag -width ".Pa monthly" -.It Pa daily +.Bl -tag -width "directory" +.It Cm daily Perform the standard daily periodic executable run. This usually occurs early in the morning (local time). -.It Pa weekly +.It Cm weekly Perform the standard weekly periodic executable run. This usually occurs very early on Saturday mornings. -.It Pa monthly +.It Cm monthly Perform the standard monthly periodic executable run. This usually occurs on the first day of the month. -.It Pa security +.It Cm security Perform the standard daily security checks. This is usually spawned by the -.Pa daily +.Cm daily run. -.It Ar path +.It Ar directory An arbitrary directory containing a set of executables to be run. .El .Pp From owner-svn-src-all@freebsd.org Thu Jul 2 16:12:53 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 67DE335A3B6; Thu, 2 Jul 2020 16:12: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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49yNRT25j2z42Fp; Thu, 2 Jul 2020 16:12:53 +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 2B3AA1D254; Thu, 2 Jul 2020 16:12:53 +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 062GCrwL010041; Thu, 2 Jul 2020 16:12:53 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 062GCrZu010040; Thu, 2 Jul 2020 16:12:53 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202007021612.062GCrZu010040@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: Thu, 2 Jul 2020 16:12:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362894 - stable/12/usr.sbin/efivar X-SVN-Group: stable-12 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/12/usr.sbin/efivar X-SVN-Commit-Revision: 362894 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2020 16:12:53 -0000 Author: 0mp (doc,ports committer) Date: Thu Jul 2 16:12:52 2020 New Revision: 362894 URL: https://svnweb.freebsd.org/changeset/base/362894 Log: MFC 362325: Fix the --guid flag description Modified: stable/12/usr.sbin/efivar/efivar.8 Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/efivar/efivar.8 ============================================================================== --- stable/12/usr.sbin/efivar/efivar.8 Thu Jul 2 16:11:13 2020 (r362893) +++ stable/12/usr.sbin/efivar/efivar.8 Thu Jul 2 16:12:52 2020 (r362894) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 22, 2017 +.Dd June 18, 2020 .Dt EFIVAR 8 .Os .Sh NAME @@ -122,9 +122,10 @@ may be specified. Interpret the variables printed as UEFI device paths and print the UEFI standard string representation. .It Fl g Fl -guid -flag is specified, guids are converted to names if they are known (and -show up in -.Fl -list-guids ). +Convert GUIDs to names if they are known +.Po and show them up in +.Fl -list-guids +.Pc . .It Fl H Fl -hex List variable data as a hex dump. .It Fl L Fl -list-guids From owner-svn-src-all@freebsd.org Thu Jul 2 16:14:16 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2280D35A2D2; Thu, 2 Jul 2020 16:14:16 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49yNT405XXz42HC; Thu, 2 Jul 2020 16:14:16 +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 DAC211D5A4; Thu, 2 Jul 2020 16:14:15 +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 062GEFUv010149; Thu, 2 Jul 2020 16:14:15 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 062GEFEn010148; Thu, 2 Jul 2020 16:14:15 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202007021614.062GEFEn010148@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: Thu, 2 Jul 2020 16:14:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362895 - stable/11/usr.sbin/efivar X-SVN-Group: stable-11 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/11/usr.sbin/efivar X-SVN-Commit-Revision: 362895 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2020 16:14:16 -0000 Author: 0mp (doc,ports committer) Date: Thu Jul 2 16:14:15 2020 New Revision: 362895 URL: https://svnweb.freebsd.org/changeset/base/362895 Log: MFC 362325: Fix the --guid flag description Modified: stable/11/usr.sbin/efivar/efivar.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/efivar/efivar.8 ============================================================================== --- stable/11/usr.sbin/efivar/efivar.8 Thu Jul 2 16:12:52 2020 (r362894) +++ stable/11/usr.sbin/efivar/efivar.8 Thu Jul 2 16:14:15 2020 (r362895) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 22, 2017 +.Dd June 18, 2020 .Dt EFIVAR 8 .Os .Sh NAME @@ -122,9 +122,10 @@ may be specified. Interpret the variables printed as UEFI device paths and print the UEFI standard string representation. .It Fl g Fl -guid -flag is specified, guids are converted to names if they are known (and -show up in -.Fl -list-guids ). +Convert GUIDs to names if they are known +.Po and show them up in +.Fl -list-guids +.Pc . .It Fl H Fl -hex List variable data as a hex dump. .It Fl L Fl -list-guids From owner-svn-src-all@freebsd.org Thu Jul 2 16:16:02 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 006C035A16E; Thu, 2 Jul 2020 16:16:02 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49yNW567Zcz42ZR; Thu, 2 Jul 2020 16:16:01 +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 B5D6C1CFEB; Thu, 2 Jul 2020 16:16:01 +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 062GG1mG010287; Thu, 2 Jul 2020 16:16:01 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 062GG1Pb010286; Thu, 2 Jul 2020 16:16:01 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202007021616.062GG1Pb010286@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: Thu, 2 Jul 2020 16:16:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362896 - stable/12/usr.bin/fstat X-SVN-Group: stable-12 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/12/usr.bin/fstat X-SVN-Commit-Revision: 362896 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2020 16:16:02 -0000 Author: 0mp (doc,ports committer) Date: Thu Jul 2 16:16:01 2020 New Revision: 362896 URL: https://svnweb.freebsd.org/changeset/base/362896 Log: MFC 362324: Clean up and improve manual page for fuser(1) - Mention option's arguments in the list of options (so that now we mention "-N system" instead of just "-N"). - Stylize signals and other constants like O_APPEND with Dv. - Sort options. - Change indentation width for readability. - Fix a couple of typos. - Sort symbols list. - Use Sy instead of Cm for symbols. They are not command modifiers. - Use Ex -std in the EXIT STATUS section for consistency with other manual pages. - Use Ql instead of Dq Li for inline code examples as Li has recently been deprecated by mdoc. Reviewed by: bcr Differential Revision: https://reviews.freebsd.org/D25332 Modified: stable/12/usr.bin/fstat/fuser.1 Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.bin/fstat/fuser.1 ============================================================================== --- stable/12/usr.bin/fstat/fuser.1 Thu Jul 2 16:14:15 2020 (r362895) +++ stable/12/usr.bin/fstat/fuser.1 Thu Jul 2 16:16:01 2020 (r362896) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 13, 2011 +.Dd June 18, 2020 .Dt FUSER 1 .Os .Sh NAME @@ -57,63 +57,63 @@ utility will also look through mmapped files. The following options are available: .Bl -tag -width indent .It Fl c -Treat files as mount point and report on any files open in the file system. +Treat files as mount points and report on any files open in the file system. .It Fl f The report must be only for named files. .It Fl k Send signal to reported processes -.Pq SIGKILL by default . -.It Fl m -Search through mmapped files too. -.It Fl u -Write the user name associated with each process to stderr. -.It Fl M +.Pq Dv SIGKILL No by default . +.It Fl M Ar core Extract values associated with the name list from the specified core instead of the default .Pa /dev/kmem . -.It Fl N +.It Fl m +Search through mmapped files too. +.It Fl N Ar system Extract the name list from the specified system instead of the default, which is the kernel image the system has booted from. -.It Fl s -Use given signal name instead of default SIGKILL. +.It Fl s Ar signal +Use given signal name instead of default +.Dv SIGKILL . +.It Fl u +Write the user name associated with each process to stderr. .El .Pp -The following symbols, written to stderr will indicate how files is used: -.Bl -tag -width MOUNT -.It Cm r -The file is the root directory of the process. -.It Cm c -The file is the current workdir directory of the process. -.It Cm j -The file is the jail-root of the process. -.It Cm t -The file is the kernel tracing file for the process. -.It Cm x -The file is executable text of the process. -.It Cm y -The process use this file as its controlling tty. -.It Cm m -The file is mmapped. -.It Cm w -The file is open for writing. -.It Cm a +The following symbols, written to stderr will indicate how files are used: +.Pp +.Bl -tag -width indent -compact +.It Sy a The file is open as append only -.Pq O_APPEND was specified . -.It Cm d +.Pq Dv O_APPEND No was specified . +.It Sy c +The file is the current workdir directory of the process. +.It Sy d The process bypasses fs cache while writing to this file -.Pq O_DIRECT was specified . -.It Cm s -Shared lock is hold. -.It Cm e +.Pq Dv O_DIRECT No was specified . +.It Sy e Exclusive lock is hold. +.It Sy j +The file is the jail root of the process. +.It Sy m +The file is mmapped. +.It Sy r +The file is the root directory of the process. +.It Sy s +Shared lock is hold. +.It Sy t +The file is the kernel tracing file for the process. +.It Sy w +The file is open for writing. +.It Sy x +The file is executable text of the process. +.It Sy y +The process uses this file as its controlling tty. .El .Sh EXIT STATUS -The -.Nm -utility returns 0 on successful completion and >0 otherwise. +.Ex -std .Sh EXAMPLES -The command: -.Dq Li "fuser -fu ." +The command +.Ql "fuser -fu \&." writes to standard output the process IDs of processes that are using the current directory and writes to stderr an indication of how those processes are using the directory and user names associated with the processes that are using From owner-svn-src-all@freebsd.org Thu Jul 2 16:18:33 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3D6B535A6C4; Thu, 2 Jul 2020 16:18:33 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49yNZ10y9wz42Jx; Thu, 2 Jul 2020 16:18:33 +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 F3BF71CFED; Thu, 2 Jul 2020 16:18:32 +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 062GIWZa010454; Thu, 2 Jul 2020 16:18:32 GMT (envelope-from 0mp@FreeBSD.org) Received: (from 0mp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 062GIWjW010453; Thu, 2 Jul 2020 16:18:32 GMT (envelope-from 0mp@FreeBSD.org) Message-Id: <202007021618.062GIWjW010453@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: Thu, 2 Jul 2020 16:18:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362897 - stable/11/usr.bin/fstat X-SVN-Group: stable-11 X-SVN-Commit-Author: 0mp X-SVN-Commit-Paths: stable/11/usr.bin/fstat X-SVN-Commit-Revision: 362897 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2020 16:18:33 -0000 Author: 0mp (doc,ports committer) Date: Thu Jul 2 16:18:32 2020 New Revision: 362897 URL: https://svnweb.freebsd.org/changeset/base/362897 Log: MFC 362324: Clean up and improve manual page for fuser(1) - Mention option's arguments in the list of options (so that now we mention "-N system" instead of just "-N"). - Stylize signals and other constants like O_APPEND with Dv. - Sort options. - Change indentation width for readability. - Fix a couple of typos. - Sort symbols list. - Use Sy instead of Cm for symbols. They are not command modifiers. - Use Ex -std in the EXIT STATUS section for consistency with other manual pages. - Use Ql instead of Dq Li for inline code examples as Li has recently been deprecated by mdoc. Reviewed by: bcr Differential Revision: https://reviews.freebsd.org/D25332 Modified: stable/11/usr.bin/fstat/fuser.1 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/fstat/fuser.1 ============================================================================== --- stable/11/usr.bin/fstat/fuser.1 Thu Jul 2 16:16:01 2020 (r362896) +++ stable/11/usr.bin/fstat/fuser.1 Thu Jul 2 16:18:32 2020 (r362897) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 13, 2011 +.Dd June 18, 2020 .Dt FUSER 1 .Os .Sh NAME @@ -57,63 +57,63 @@ utility will also look through mmapped files. The following options are available: .Bl -tag -width indent .It Fl c -Treat files as mount point and report on any files open in the file system. +Treat files as mount points and report on any files open in the file system. .It Fl f The report must be only for named files. .It Fl k Send signal to reported processes -.Pq SIGKILL by default . -.It Fl m -Search through mmapped files too. -.It Fl u -Write the user name associated with each process to stderr. -.It Fl M +.Pq Dv SIGKILL No by default . +.It Fl M Ar core Extract values associated with the name list from the specified core instead of the default .Pa /dev/kmem . -.It Fl N +.It Fl m +Search through mmapped files too. +.It Fl N Ar system Extract the name list from the specified system instead of the default, which is the kernel image the system has booted from. -.It Fl s -Use given signal name instead of default SIGKILL. +.It Fl s Ar signal +Use given signal name instead of default +.Dv SIGKILL . +.It Fl u +Write the user name associated with each process to stderr. .El .Pp -The following symbols, written to stderr will indicate how files is used: -.Bl -tag -width MOUNT -.It Cm r -The file is the root directory of the process. -.It Cm c -The file is the current workdir directory of the process. -.It Cm j -The file is the jail-root of the process. -.It Cm t -The file is the kernel tracing file for the process. -.It Cm x -The file is executable text of the process. -.It Cm y -The process use this file as its controlling tty. -.It Cm m -The file is mmapped. -.It Cm w -The file is open for writing. -.It Cm a +The following symbols, written to stderr will indicate how files are used: +.Pp +.Bl -tag -width indent -compact +.It Sy a The file is open as append only -.Pq O_APPEND was specified . -.It Cm d +.Pq Dv O_APPEND No was specified . +.It Sy c +The file is the current workdir directory of the process. +.It Sy d The process bypasses fs cache while writing to this file -.Pq O_DIRECT was specified . -.It Cm s -Shared lock is hold. -.It Cm e +.Pq Dv O_DIRECT No was specified . +.It Sy e Exclusive lock is hold. +.It Sy j +The file is the jail root of the process. +.It Sy m +The file is mmapped. +.It Sy r +The file is the root directory of the process. +.It Sy s +Shared lock is hold. +.It Sy t +The file is the kernel tracing file for the process. +.It Sy w +The file is open for writing. +.It Sy x +The file is executable text of the process. +.It Sy y +The process uses this file as its controlling tty. .El .Sh EXIT STATUS -The -.Nm -utility returns 0 on successful completion and >0 otherwise. +.Ex -std .Sh EXAMPLES -The command: -.Dq Li "fuser -fu ." +The command +.Ql "fuser -fu \&." writes to standard output the process IDs of processes that are using the current directory and writes to stderr an indication of how those processes are using the directory and user names associated with the processes that are using From owner-svn-src-all@freebsd.org Thu Jul 2 18:40:23 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6B23635D703; Thu, 2 Jul 2020 18:40:23 +0000 (UTC) (envelope-from thj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49yRjg2GhCz4B2k; Thu, 2 Jul 2020 18:40:23 +0000 (UTC) (envelope-from thj@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 327F31F091; Thu, 2 Jul 2020 18:40:23 +0000 (UTC) (envelope-from thj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 062IeNDp097224; Thu, 2 Jul 2020 18:40:23 GMT (envelope-from thj@FreeBSD.org) Received: (from thj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 062IeNMH097223; Thu, 2 Jul 2020 18:40:23 GMT (envelope-from thj@FreeBSD.org) Message-Id: <202007021840.062IeNMH097223@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: thj set sender to thj@FreeBSD.org using -f From: Tom Jones Date: Thu, 2 Jul 2020 18:40:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362898 - stable/12/share/man/man4 X-SVN-Group: stable-12 X-SVN-Commit-Author: thj X-SVN-Commit-Paths: stable/12/share/man/man4 X-SVN-Commit-Revision: 362898 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2020 18:40:23 -0000 Author: thj Date: Thu Jul 2 18:40:22 2020 New Revision: 362898 URL: https://svnweb.freebsd.org/changeset/base/362898 Log: MFC r362379: Fix typo in apic.4 Reviewed by: bcr (manpages) Approved by: jtl (co-mentor) Differential Revision: https://reviews.freebsd.org/D2535 Modified: stable/12/share/man/man4/apic.4 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/apic.4 ============================================================================== --- stable/12/share/man/man4/apic.4 Thu Jul 2 16:18:32 2020 (r362897) +++ stable/12/share/man/man4/apic.4 Thu Jul 2 18:40:22 2020 (r362898) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 20, 2011 +.Dd June 19, 2020 .Dt APIC 4 .Os .Sh NAME @@ -64,7 +64,7 @@ they receive from peripheral buses to one or more loca .Pp Each local APIC includes one 32-bit programmable timer. This driver uses them to supply kernel with one event timer named "LAPIC". -Event timer provided by the driver supports both one-shot an periodic modes. +Event timer provided by the driver supports both one-shot and periodic modes. Because of local APIC nature it is per-CPU. The timer frequency is not reported by the platform and so automatically measured by the driver on the first use. From owner-svn-src-all@freebsd.org Thu Jul 2 18:42:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F0DBA35D5C3; Thu, 2 Jul 2020 18:42:43 +0000 (UTC) (envelope-from thj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49yRmM68Y2z4BVw; Thu, 2 Jul 2020 18:42:43 +0000 (UTC) (envelope-from thj@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 B66831EF29; Thu, 2 Jul 2020 18:42:43 +0000 (UTC) (envelope-from thj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 062IghNZ002926; Thu, 2 Jul 2020 18:42:43 GMT (envelope-from thj@FreeBSD.org) Received: (from thj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 062IghUl002925; Thu, 2 Jul 2020 18:42:43 GMT (envelope-from thj@FreeBSD.org) Message-Id: <202007021842.062IghUl002925@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: thj set sender to thj@FreeBSD.org using -f From: Tom Jones Date: Thu, 2 Jul 2020 18:42:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362899 - stable/11/share/man/man4 X-SVN-Group: stable-11 X-SVN-Commit-Author: thj X-SVN-Commit-Paths: stable/11/share/man/man4 X-SVN-Commit-Revision: 362899 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2020 18:42:44 -0000 Author: thj Date: Thu Jul 2 18:42:43 2020 New Revision: 362899 URL: https://svnweb.freebsd.org/changeset/base/362899 Log: MFC r362379: Fix typo in apic.4 Reviewed by: bcr (manpages) Approved by: jtl (co-mentor) Differential Revision: https://reviews.freebsd.org/D25357 Modified: stable/11/share/man/man4/apic.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/apic.4 ============================================================================== --- stable/11/share/man/man4/apic.4 Thu Jul 2 18:40:22 2020 (r362898) +++ stable/11/share/man/man4/apic.4 Thu Jul 2 18:42:43 2020 (r362899) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 20, 2011 +.Dd June 19, 2020 .Dt APIC 4 .Os .Sh NAME @@ -64,7 +64,7 @@ they receive from peripheral buses to one or more loca .Pp Each local APIC includes one 32-bit programmable timer. This driver uses them to supply kernel with one event timer named "LAPIC". -Event timer provided by the driver supports both one-shot an periodic modes. +Event timer provided by the driver supports both one-shot and periodic modes. Because of local APIC nature it is per-CPU. The timer frequency is not reported by the platform and so automatically measured by the driver on the first use. From owner-svn-src-all@freebsd.org Thu Jul 2 19:20:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A329035E226; Thu, 2 Jul 2020 19:20:57 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49yScS4SzDz4D1g; Thu, 2 Jul 2020 19:20:56 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wr1-x442.google.com with SMTP id f18so21714504wrs.0; Thu, 02 Jul 2020 12:20:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to; bh=wXzAftCdCQa3wtM/e92v3o/hRyW5e6yhG3r/pT7PQ6E=; b=MTEEmNV+5sY8tX6MUyYKxsB5oEmpiQuiNW4OEqVsoPEBpQzVBOYiMS3KRQgzf1EvJK /lgx+SzgTmjyOA+VmoJQdjkRPhTNAS9vktG5gQMGLtJyDvR0YvXZqBiMiEV7ltID3p8A TVCJtHh/1a4AzaOdokCIk9Ylm7N1FMx/psY1K4oNzbWQglPQijbyRR+sVwF8oHkvH9oL YDRNGIjbJdfFlYmusz8QMSXWEU30yBwDLlLnKHOVZvVGEV2UUcUdFaB3hgiAaHxYR3he 9Bd9GQePaWB8sEZkJF2aKfKrsdZVjpZ0qRNcMbHZGABr/AKIK/EskFf1bNZKNcbWWf1l 2S3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=wXzAftCdCQa3wtM/e92v3o/hRyW5e6yhG3r/pT7PQ6E=; b=s5sdKl1z+6Shj3qBa4rN3B05q6xpZbAC8miXPm9reNVm7aeILXDBUM5+jOANsPUKaT 4DpHRvi45unrUfO+4D+klFdLymbNkjGkhby8ElvWz/UZaL89Buxw3yhNnFnjaZxgrQus Jt/hP9dKWj5Qo6gJtddG47H8TdCQi8YlvU52rZFANV8iUkPRVvAGmEc/Lucg/4KlbvYz CH/rpeEQTbEq7c68TqObm0esFLgPWl0gagfiLnRLVPxfx9M0GVlwJav6fTrM5NYTyBgX 6lX4iCz968gKQ9j/8CfBO7gnZI1pYFZqRk74E6Oooij1f5E6HCXeCr8ASL3Q1lNs0opz lfZA== X-Gm-Message-State: AOAM530G7bFdeCwDTb/3//qVZrqJfiek/7g8QOjA4Rhu1k5YTqXeWv+J Zt2baOeIaMd9y5yTcBjMaAaZro+c X-Google-Smtp-Source: ABdhPJyE1kEQolItVatHLBQ8dGZlWBBhGzOl5B0ROyuytl0ToXmKAxQXaaoaeaCd50hgHVYC5safuw== X-Received: by 2002:a5d:4903:: with SMTP id x3mr35073859wrq.351.1593717653059; Thu, 02 Jul 2020 12:20:53 -0700 (PDT) Received: from brick (cpc149474-cmbg20-2-0-cust954.5-4.cable.virginm.net. [82.4.199.187]) by smtp.gmail.com with ESMTPSA id z63sm6965995wmb.2.2020.07.02.12.20.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Jul 2020 12:20:51 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Thu, 2 Jul 2020 20:20:49 +0100 From: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= To: Kyle Evans Cc: Shawn Webb , src-committers , svn-src-all , svn-src-head Subject: Re: svn commit: r362769 - in head/sys: amd64/linux amd64/linux32 arm64/linux compat/linux i386/linux Message-ID: <20200702192049.GA51788@brick> Mail-Followup-To: Kyle Evans , Shawn Webb , src-committers , svn-src-all , svn-src-head References: <202006290309.05T39ETZ044859@repo.freebsd.org> <20200629152717.2ojwnipxkmjaoix2@mutt-hbsd> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 49yScS4SzDz4D1g X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=MTEEmNV+; dmarc=none; spf=pass (mx1.freebsd.org: domain of etnapierala@gmail.com designates 2a00:1450:4864:20::442 as permitted sender) smtp.mailfrom=etnapierala@gmail.com X-Spamd-Result: default: False [-2.43 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-0.95)[-0.946]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; NEURAL_HAM_LONG(-1.00)[-0.999]; MIME_GOOD(-0.10)[text/plain]; MID_RHS_NOT_FQDN(0.50)[]; DMARC_NA(0.00)[freebsd.org]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; NEURAL_HAM_SHORT(-0.78)[-0.782]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::442:from]; FORGED_SENDER(0.30)[trasz@freebsd.org,etnapierala@gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[82.4.199.187:received]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[trasz@freebsd.org,etnapierala@gmail.com]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2020 19:20:57 -0000 On 0629T1242, Kyle Evans wrote: > On Mon, Jun 29, 2020 at 10:27 AM Shawn Webb wrote: > > > > Hey Kyle, > > > > On Mon, Jun 29, 2020 at 03:09:14AM +0000, Kyle Evans wrote: > > > Author: kevans > > > Date: Mon Jun 29 03:09:14 2020 > > > New Revision: 362769 > > > URL: https://svnweb.freebsd.org/changeset/base/362769 > > > > > > Log: > > > linuxolator: implement memfd_create syscall > > > > > > This effectively mirrors our libc implementation, but with minor fudging -- > > > name needs to be copied in from userspace, so we just copy it straight into > > > stack-allocated memfd_name into the correct position rather than allocating > > > memory that needs to be cleaned up. > > > > > > The sealing-related fcntl(2) commands, F_GET_SEALS and F_ADD_SEALS, have > > > also been implemented now that we support them. > > > > > > Note that this implementation is still not quite at feature parity w.r.t. > > > the actual Linux version; some caveats, from my foggy memory: > > > > > > - Need to implement SHM_GROW_ON_WRITE, default for memfd (in progress) > > > - LTP wants the memfd name exposed to fdescfs > > > - Linux allows open() of an fdescfs fd with O_TRUNC to truncate after dup. > > > (?) > > > > > > Interested parties can install and run LTP from ports (devel/linux-ltp) to > > > confirm any fixes. > > > > > > PR: 240874 > > > Reviewed by: kib, trasz > > > Differential Revision: https://reviews.freebsd.org/D21845 > > > > RELNOTES? > > > > > > > > Modified: > > > head/sys/amd64/linux/linux_dummy.c > > > head/sys/amd64/linux32/linux32_dummy.c > > > head/sys/arm64/linux/linux_dummy.c > > > head/sys/compat/linux/linux.c > > > head/sys/compat/linux/linux.h > > > head/sys/compat/linux/linux_file.c > > > head/sys/compat/linux/linux_file.h > > > head/sys/i386/linux/linux_dummy.c > > > > Should __FreeBSD_version be bumped? > > > > I'm roping in trasz@, because I'm unsure on either of these points -- > I haven't paid attention and don't know if we typically include linux > syscalls that we implement in relnotes, and given that this commit > only really affects pre-compiled Linux binaries I'm not sure if > there's any utility in bumping __FreeBSD_version; presumably ports > folks can't do anything differently here, and binaries will work just > the same. I don't think we need to bump the version here. As for the relnotes: I hadn't considered that before, but it sounds like a good idea; we probably do want to at least enumerate the major Linuxulator changes there. From owner-svn-src-all@freebsd.org Thu Jul 2 21:04:12 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 681FF36024D; Thu, 2 Jul 2020 21:04:12 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49yVvc2JW7z4Jgg; Thu, 2 Jul 2020 21:04:12 +0000 (UTC) (envelope-from melifaro@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 31F1120AAB; Thu, 2 Jul 2020 21:04:12 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 062L4Cth089316; Thu, 2 Jul 2020 21:04:12 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 062L49Oo089298; Thu, 2 Jul 2020 21:04:09 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202007022104.062L49Oo089298@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Thu, 2 Jul 2020 21:04:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362900 - in head/sys: net netinet netinet6 netpfil/ipfw netpfil/ipfw/nat64 X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: in head/sys: net netinet netinet6 netpfil/ipfw netpfil/ipfw/nat64 X-SVN-Commit-Revision: 362900 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2020 21:04:12 -0000 Author: melifaro Date: Thu Jul 2 21:04:08 2020 New Revision: 362900 URL: https://svnweb.freebsd.org/changeset/base/362900 Log: Complete conversions from fib<4|6>_lookup_nh_ to fib<4|6>_lookup(). fib[46]_lookup_nh_ represents pre-epoch generation of fib api, providing less guarantees over pointer validness and requiring on-stack data copying. With no callers remaining, remove fib[46]_lookup_nh_ functions. Submitted by: Neel Chauhan Differential Revision: https://reviews.freebsd.org/D25445 Modified: head/sys/net/if_stf.c head/sys/netinet/if_ether.c head/sys/netinet/in_fib.c head/sys/netinet/in_fib.h head/sys/netinet/in_mcast.c head/sys/netinet/ip_options.c head/sys/netinet6/icmp6.c head/sys/netinet6/in6.c head/sys/netinet6/in6_fib.c head/sys/netinet6/in6_fib.h head/sys/netinet6/in6_mcast.c head/sys/netinet6/in6_src.c head/sys/netpfil/ipfw/ip_fw2.c head/sys/netpfil/ipfw/ip_fw_table_algo.c head/sys/netpfil/ipfw/nat64/nat64_translate.c Modified: head/sys/net/if_stf.c ============================================================================== --- head/sys/net/if_stf.c Thu Jul 2 18:42:43 2020 (r362899) +++ head/sys/net/if_stf.c Thu Jul 2 21:04:08 2020 (r362900) @@ -97,6 +97,7 @@ #include #include #include +#include #include #include #include @@ -568,12 +569,14 @@ stf_checkaddr4(struct stf_softc *sc, struct in_addr *i * perform ingress filter */ if (sc && (STF2IFP(sc)->if_flags & IFF_LINK2) == 0 && inifp) { - struct nhop4_basic nh4; + struct nhop_object *nh; - if (fib4_lookup_nh_basic(sc->sc_fibnum, *in, 0, 0, &nh4) != 0) + NET_EPOCH_ASSERT(); + nh = fib4_lookup(sc->sc_fibnum, *in, 0, 0, 0); + if (nh == NULL) return (-1); - if (nh4.nh_ifp != inifp) + if (nh->nh_ifp != inifp) return (-1); } Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Thu Jul 2 18:42:43 2020 (r362899) +++ head/sys/netinet/if_ether.c Thu Jul 2 21:04:08 2020 (r362900) @@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -804,7 +805,7 @@ in_arpinput(struct mbuf *m) int carped; struct sockaddr_in sin; struct sockaddr *dst; - struct nhop4_basic nh4; + struct nhop_object *nh; uint8_t linkhdr[LLE_MAX_LINKHDR]; struct route ro; size_t linkhdrsize; @@ -1065,8 +1066,9 @@ reply: if (!V_arp_proxyall) goto drop; - if (fib4_lookup_nh_basic(ifp->if_fib, itaddr, 0, 0, - &nh4) != 0) + NET_EPOCH_ASSERT(); + nh = fib4_lookup(ifp->if_fib, itaddr, 0, 0, 0); + if (nh == NULL) goto drop; /* @@ -1074,7 +1076,7 @@ reply: * as this one came out of, or we'll get into a fight * over who claims what Ether address. */ - if (nh4.nh_ifp == ifp) + if (nh->nh_ifp == ifp) goto drop; (void)memcpy(ar_tha(ah), ar_sha(ah), ah->ar_hln); @@ -1087,10 +1089,10 @@ reply: * wrong network. */ - if (fib4_lookup_nh_basic(ifp->if_fib, isaddr, 0, 0, - &nh4) != 0) + nh = fib4_lookup(ifp->if_fib, isaddr, 0, 0, 0); + if (nh == NULL) goto drop; - if (nh4.nh_ifp != ifp) { + if (nh->nh_ifp != ifp) { ARP_LOG(LOG_INFO, "proxy: ignoring request" " from %s via %s\n", inet_ntoa_r(isaddr, addrbuf), Modified: head/sys/netinet/in_fib.c ============================================================================== --- head/sys/netinet/in_fib.c Thu Jul 2 18:42:43 2020 (r362899) +++ head/sys/netinet/in_fib.c Thu Jul 2 21:04:08 2020 (r362900) @@ -66,165 +66,6 @@ __FBSDID("$FreeBSD$"); /* Verify struct route compatiblity */ /* Assert 'struct route_in' is compatible with 'struct route' */ CHK_STRUCT_ROUTE_COMPAT(struct route_in, ro_dst4); -static void fib4_rte_to_nh_basic(struct nhop_object *nh, struct in_addr dst, - uint32_t flags, struct nhop4_basic *pnh4); -static void fib4_rte_to_nh_extended(struct nhop_object *nh, struct in_addr dst, - uint32_t flags, struct nhop4_extended *pnh4); - - -static void -fib4_rte_to_nh_basic(struct nhop_object *nh, struct in_addr dst, - uint32_t flags, struct nhop4_basic *pnh4) -{ - - if ((flags & NHR_IFAIF) != 0) - pnh4->nh_ifp = nh->nh_ifa->ifa_ifp; - else - pnh4->nh_ifp = nh->nh_ifp; - pnh4->nh_mtu = nh->nh_mtu; - if (nh->nh_flags & NHF_GATEWAY) - pnh4->nh_addr = nh->gw4_sa.sin_addr; - else - pnh4->nh_addr = dst; - /* Set flags */ - pnh4->nh_flags = nh->nh_flags; - /* TODO: Handle RTF_BROADCAST here */ -} - -static void -fib4_rte_to_nh_extended(struct nhop_object *nh, struct in_addr dst, - uint32_t flags, struct nhop4_extended *pnh4) -{ - - if ((flags & NHR_IFAIF) != 0) - pnh4->nh_ifp = nh->nh_ifa->ifa_ifp; - else - pnh4->nh_ifp = nh->nh_ifp; - pnh4->nh_mtu = nh->nh_mtu; - if (nh->nh_flags & NHF_GATEWAY) - pnh4->nh_addr = nh->gw4_sa.sin_addr; - else - pnh4->nh_addr = dst; - /* Set flags */ - pnh4->nh_flags = nh->nh_flags; - pnh4->nh_ia = ifatoia(nh->nh_ifa); - pnh4->nh_src = IA_SIN(pnh4->nh_ia)->sin_addr; -} - -/* - * Performs IPv4 route table lookup on @dst. Returns 0 on success. - * Stores nexthop info provided @pnh4 structure. - * Note that - * - nh_ifp cannot be safely dereferenced - * - nh_ifp represents logical transmit interface (rt_ifp) (e.g. if - * looking up address on interface "ix0" pointer to "lo0" interface - * will be returned instead of "ix0") - * - nh_ifp represents "address" interface if NHR_IFAIF flag is passed - * - howewer mtu from "transmit" interface will be returned. - */ -int -fib4_lookup_nh_basic(uint32_t fibnum, struct in_addr dst, uint32_t flags, - uint32_t flowid, struct nhop4_basic *pnh4) -{ - RIB_RLOCK_TRACKER; - struct rib_head *rh; - struct radix_node *rn; - struct sockaddr_in sin; - struct nhop_object *nh; - - KASSERT((fibnum < rt_numfibs), ("fib4_lookup_nh_basic: bad fibnum")); - rh = rt_tables_get_rnh(fibnum, AF_INET); - if (rh == NULL) - return (ENOENT); - - /* Prepare lookup key */ - memset(&sin, 0, sizeof(sin)); - sin.sin_len = sizeof(struct sockaddr_in); - sin.sin_addr = dst; - - RIB_RLOCK(rh); - rn = rh->rnh_matchaddr((void *)&sin, &rh->head); - if (rn != NULL && ((rn->rn_flags & RNF_ROOT) == 0)) { - nh = RNTORT(rn)->rt_nhop; - /* Ensure route & ifp is UP */ - if (RT_LINK_IS_UP(nh->nh_ifp)) { - fib4_rte_to_nh_basic(nh, dst, flags, pnh4); - RIB_RUNLOCK(rh); - - return (0); - } - } - RIB_RUNLOCK(rh); - - return (ENOENT); -} - -/* - * Performs IPv4 route table lookup on @dst. Returns 0 on success. - * Stores extende nexthop info provided @pnh4 structure. - * Note that - * - nh_ifp cannot be safely dereferenced unless NHR_REF is specified. - * - in that case you need to call fib4_free_nh_ext() - * - nh_ifp represents logical transmit interface (rt_ifp) (e.g. if - * looking up address of interface "ix0" pointer to "lo0" interface - * will be returned instead of "ix0") - * - nh_ifp represents "address" interface if NHR_IFAIF flag is passed - * - howewer mtu from "transmit" interface will be returned. - */ -int -fib4_lookup_nh_ext(uint32_t fibnum, struct in_addr dst, uint32_t flags, - uint32_t flowid, struct nhop4_extended *pnh4) -{ - RIB_RLOCK_TRACKER; - struct rib_head *rh; - struct radix_node *rn; - struct sockaddr_in sin; - struct rtentry *rte; - struct nhop_object *nh; - - KASSERT((fibnum < rt_numfibs), ("fib4_lookup_nh_ext: bad fibnum")); - rh = rt_tables_get_rnh(fibnum, AF_INET); - if (rh == NULL) - return (ENOENT); - - /* Prepare lookup key */ - memset(&sin, 0, sizeof(sin)); - sin.sin_len = sizeof(struct sockaddr_in); - sin.sin_addr = dst; - - RIB_RLOCK(rh); - rn = rh->rnh_matchaddr((void *)&sin, &rh->head); - if (rn != NULL && ((rn->rn_flags & RNF_ROOT) == 0)) { - rte = RNTORT(rn); -#ifdef RADIX_MPATH - rte = rt_mpath_select(rte, flowid); - if (rte == NULL) { - RIB_RUNLOCK(rh); - return (ENOENT); - } -#endif - nh = rte->rt_nhop; - /* Ensure route & ifp is UP */ - if (RT_LINK_IS_UP(nh->nh_ifp)) { - fib4_rte_to_nh_extended(nh, dst, flags, pnh4); - if ((flags & NHR_REF) != 0) { - /* TODO: lwref on egress ifp's ? */ - } - RIB_RUNLOCK(rh); - - return (0); - } - } - RIB_RUNLOCK(rh); - - return (ENOENT); -} - -void -fib4_free_nh_ext(uint32_t fibnum, struct nhop4_extended *pnh4) -{ - -} /* * Looks up path in fib @fibnum specified by @dst. Modified: head/sys/netinet/in_fib.h ============================================================================== --- head/sys/netinet/in_fib.h Thu Jul 2 18:42:43 2020 (r362899) +++ head/sys/netinet/in_fib.h Thu Jul 2 21:04:08 2020 (r362900) @@ -45,32 +45,6 @@ struct route_in { struct sockaddr_in ro_dst4; }; -/* Basic nexthop info used for uRPF/mtu checks */ -struct nhop4_basic { - struct ifnet *nh_ifp; /* Logical egress interface */ - uint16_t nh_mtu; /* nexthop mtu */ - uint16_t nh_flags; /* nhop flags */ - struct in_addr nh_addr; /* GW/DST IPv4 address */ -}; - -/* Extended nexthop info used for control protocols */ -struct nhop4_extended { - struct ifnet *nh_ifp; /* Logical egress interface */ - struct in_ifaddr *nh_ia; /* Associated address */ - uint16_t nh_mtu; /* nexthop mtu */ - uint16_t nh_flags; /* nhop flags */ - uint8_t spare[4]; - struct in_addr nh_addr; /* GW/DST IPv4 address */ - struct in_addr nh_src; /* default source IPv4 address */ - uint64_t spare2; -}; - -int fib4_lookup_nh_basic(uint32_t fibnum, struct in_addr dst, uint32_t flags, - uint32_t flowid, struct nhop4_basic *pnh4); -int fib4_lookup_nh_ext(uint32_t fibnum, struct in_addr dst, uint32_t flags, - uint32_t flowid, struct nhop4_extended *pnh4); -void fib4_free_nh_ext(uint32_t fibnum, struct nhop4_extended *pnh4); - struct nhop_object *fib4_lookup(uint32_t fibnum, struct in_addr dst, uint32_t scopeid, uint32_t flags, uint32_t flowid); int fib4_check_urpf(uint32_t fibnum, struct in_addr dst, uint32_t scopeid, Modified: head/sys/netinet/in_mcast.c ============================================================================== --- head/sys/netinet/in_mcast.c Thu Jul 2 18:42:43 2020 (r362899) +++ head/sys/netinet/in_mcast.c Thu Jul 2 21:04:08 2020 (r362900) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -1902,7 +1903,7 @@ inp_lookup_mcast_ifp(const struct inpcb *inp, { struct rm_priotracker in_ifa_tracker; struct ifnet *ifp; - struct nhop4_basic nh4; + struct nhop_object *nh; uint32_t fibnum; KASSERT(gsin->sin_family == AF_INET, ("%s: not AF_INET", __func__)); @@ -1916,8 +1917,9 @@ inp_lookup_mcast_ifp(const struct inpcb *inp, IN_IFADDR_RUNLOCK(&in_ifa_tracker); } else { fibnum = inp ? inp->inp_inc.inc_fibnum : 0; - if (fib4_lookup_nh_basic(fibnum, gsin->sin_addr, 0, 0, &nh4)==0) - ifp = nh4.nh_ifp; + nh = fib4_lookup(fibnum, gsin->sin_addr, 0, 0, 0); + if (nh != NULL) + ifp = nh->nh_ifp; else { struct in_ifaddr *ia; struct ifnet *mifp; @@ -2726,6 +2728,7 @@ inp_setmoptions(struct inpcb *inp, struct sockopt *sop { struct ip_moptions *imo; int error; + struct epoch_tracker et; error = 0; @@ -2832,7 +2835,9 @@ inp_setmoptions(struct inpcb *inp, struct sockopt *sop case IP_ADD_SOURCE_MEMBERSHIP: case MCAST_JOIN_GROUP: case MCAST_JOIN_SOURCE_GROUP: + NET_EPOCH_ENTER(et); error = inp_join_group(inp, sopt); + NET_EPOCH_EXIT(et); break; case IP_DROP_MEMBERSHIP: Modified: head/sys/netinet/ip_options.c ============================================================================== --- head/sys/netinet/ip_options.c Thu Jul 2 18:42:43 2020 (r362899) +++ head/sys/netinet/ip_options.c Thu Jul 2 21:04:08 2020 (r362900) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -107,7 +108,7 @@ ip_dooptions(struct mbuf *m, int pass) int opt, optlen, cnt, off, code, type = ICMP_PARAMPROB, forward = 0; struct in_addr *sin, dst; uint32_t ntime; - struct nhop4_extended nh_ext; + struct nhop_object *nh; struct sockaddr_in ipaddr = { sizeof(ipaddr), AF_INET }; NET_EPOCH_ASSERT(); @@ -254,11 +255,12 @@ dropit: sizeof(struct in_addr)); } else { /* XXX MRT 0 for routing */ - if (fib4_lookup_nh_ext(M_GETFIB(m), - ipaddr.sin_addr, 0, 0, &nh_ext) != 0) + nh = fib4_lookup(M_GETFIB(m), ipaddr.sin_addr, + 0, NHR_NONE, 0); + if (nh == NULL) goto bad; - memcpy(cp + off, &nh_ext.nh_src, + memcpy(cp + off, &(IA_SIN(nh->nh_ifa)->sin_addr), sizeof(struct in_addr)); } @@ -299,9 +301,9 @@ dropit: if ((ia = (INA)ifa_ifwithaddr((SA)&ipaddr)) != NULL) { memcpy(cp + off, &(IA_SIN(ia)->sin_addr), sizeof(struct in_addr)); - } else if (fib4_lookup_nh_ext(M_GETFIB(m), - ipaddr.sin_addr, 0, 0, &nh_ext) == 0) { - memcpy(cp + off, &nh_ext.nh_src, + } else if ((nh = fib4_lookup(M_GETFIB(m), + ipaddr.sin_addr, 0, NHR_NONE, 0)) != NULL) { + memcpy(cp + off, &(IA_SIN(nh->nh_ifa)->sin_addr), sizeof(struct in_addr)); } else { type = ICMP_UNREACH; Modified: head/sys/netinet6/icmp6.c ============================================================================== --- head/sys/netinet6/icmp6.c Thu Jul 2 18:42:43 2020 (r362899) +++ head/sys/netinet6/icmp6.c Thu Jul 2 21:04:08 2020 (r362900) @@ -2270,13 +2270,17 @@ icmp6_redirect_input(struct mbuf *m, int off) } { /* ip6->ip6_src must be equal to gw for icmp6->icmp6_reddst */ - struct nhop6_basic nh6; + struct nhop_object *nh; struct in6_addr kdst; uint32_t scopeid; in6_splitscope(&reddst6, &kdst, &scopeid); - if (fib6_lookup_nh_basic(ifp->if_fib, &kdst, scopeid, 0, 0,&nh6)==0){ - if ((nh6.nh_flags & NHF_GATEWAY) == 0) { + NET_EPOCH_ASSERT(); + nh = fib6_lookup(ifp->if_fib, &kdst, scopeid, 0, 0); + if (nh == NULL) { + struct in6_addr nh_addr; + nh_addr = ifatoia6(nh->nh_ifa)->ia_addr.sin6_addr; + if ((nh->nh_flags & NHF_GATEWAY) == 0) { nd6log((LOG_ERR, "ICMP6 redirect rejected; no route " "with inet6 gateway found for redirect dst: %s\n", @@ -2285,19 +2289,16 @@ icmp6_redirect_input(struct mbuf *m, int off) } /* - * Embed scope zone id into next hop address, since - * fib6_lookup_nh_basic() returns address without embedded - * scope zone id. + * Embed scope zone id into next hop address. */ - if (in6_setscope(&nh6.nh_addr, m->m_pkthdr.rcvif, NULL)) - goto freeit; + nh_addr = nh->gw6_sa.sin6_addr; - if (IN6_ARE_ADDR_EQUAL(&src6, &nh6.nh_addr) == 0) { + if (IN6_ARE_ADDR_EQUAL(&src6, &nh_addr) == 0) { nd6log((LOG_ERR, "ICMP6 redirect rejected; " "not equal to gw-for-src=%s (must be same): " "%s\n", - ip6_sprintf(ip6buf, &nh6.nh_addr), + ip6_sprintf(ip6buf, &nh_addr), icmp6_redirect_diag(&src6, &reddst6, &redtgt6))); goto bad; } Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Thu Jul 2 18:42:43 2020 (r362899) +++ head/sys/netinet6/in6.c Thu Jul 2 21:04:08 2020 (r362900) @@ -91,6 +91,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -2141,10 +2142,9 @@ in6_lltable_rtcheck(struct ifnet *ifp, const struct sockaddr *l3addr) { const struct sockaddr_in6 *sin6; - struct nhop6_basic nh6; + struct nhop_object *nh; struct in6_addr dst; uint32_t scopeid; - int error; char ip6buf[INET6_ADDRSTRLEN]; int fibnum; @@ -2155,8 +2155,8 @@ in6_lltable_rtcheck(struct ifnet *ifp, sin6 = (const struct sockaddr_in6 *)l3addr; in6_splitscope(&sin6->sin6_addr, &dst, &scopeid); fibnum = V_rt_add_addr_allfibs ? RT_DEFAULT_FIB : ifp->if_fib; - error = fib6_lookup_nh_basic(fibnum, &dst, scopeid, 0, 0, &nh6); - if (error != 0 || (nh6.nh_flags & NHF_GATEWAY) || nh6.nh_ifp != ifp) { + nh = fib6_lookup(fibnum, &dst, scopeid, NHR_NONE, 0); + if (nh && ((nh->nh_flags & NHF_GATEWAY) || nh->nh_ifp != ifp)) { struct ifaddr *ifa; /* * Create an ND6 cache for an IPv6 neighbor Modified: head/sys/netinet6/in6_fib.c ============================================================================== --- head/sys/netinet6/in6_fib.c Thu Jul 2 18:42:43 2020 (r362899) +++ head/sys/netinet6/in6_fib.c Thu Jul 2 21:04:08 2020 (r362900) @@ -70,186 +70,8 @@ __FBSDID("$FreeBSD$"); #include #ifdef INET6 -static void fib6_rte_to_nh_extended(const struct nhop_object *nh, - const struct in6_addr *dst, uint32_t flags, struct nhop6_extended *pnh6); -static void fib6_rte_to_nh_basic(const struct nhop_object *nh, const struct in6_addr *dst, - uint32_t flags, struct nhop6_basic *pnh6); -#define ifatoia6(ifa) ((struct in6_ifaddr *)(ifa)) - CHK_STRUCT_ROUTE_COMPAT(struct route_in6, ro_dst); - - - -static void -fib6_rte_to_nh_basic(const struct nhop_object *nh, const struct in6_addr *dst, - uint32_t flags, struct nhop6_basic *pnh6) -{ - - /* Do explicit nexthop zero unless we're copying it */ - memset(pnh6, 0, sizeof(*pnh6)); - - if ((flags & NHR_IFAIF) != 0) - pnh6->nh_ifp = nh->nh_aifp; - else - pnh6->nh_ifp = nh->nh_ifp; - - pnh6->nh_mtu = nh->nh_mtu; - if (nh->nh_flags & NHF_GATEWAY) { - /* Return address with embedded scope. */ - pnh6->nh_addr = nh->gw6_sa.sin6_addr; - } else - pnh6->nh_addr = *dst; - /* Set flags */ - pnh6->nh_flags = nh->nh_flags; -} - -static void -fib6_rte_to_nh_extended(const struct nhop_object *nh, const struct in6_addr *dst, - uint32_t flags, struct nhop6_extended *pnh6) -{ - - /* Do explicit nexthop zero unless we're copying it */ - memset(pnh6, 0, sizeof(*pnh6)); - - if ((flags & NHR_IFAIF) != 0) - pnh6->nh_ifp = nh->nh_aifp; - else - pnh6->nh_ifp = nh->nh_ifp; - - pnh6->nh_mtu = nh->nh_mtu; - if (nh->nh_flags & NHF_GATEWAY) { - /* Return address with embedded scope. */ - pnh6->nh_addr = nh->gw6_sa.sin6_addr; - } else - pnh6->nh_addr = *dst; - /* Set flags */ - pnh6->nh_flags = nh->nh_flags; - pnh6->nh_ia = ifatoia6(nh->nh_ifa); -} - -/* - * Performs IPv6 route table lookup on @dst. Returns 0 on success. - * Stores basic nexthop info into provided @pnh6 structure. - * Note that - * - nh_ifp represents logical transmit interface (rt_ifp) by default - * - nh_ifp represents "address" interface if NHR_IFAIF flag is passed - * - mtu from logical transmit interface will be returned. - * - nh_ifp cannot be safely dereferenced - * - nh_ifp represents rt_ifp (e.g. if looking up address on - * interface "ix0" pointer to "ix0" interface will be returned instead - * of "lo0") - * - howewer mtu from "transmit" interface will be returned. - * - scope will be embedded in nh_addr - */ -int -fib6_lookup_nh_basic(uint32_t fibnum, const struct in6_addr *dst, uint32_t scopeid, - uint32_t flags, uint32_t flowid, struct nhop6_basic *pnh6) -{ - RIB_RLOCK_TRACKER; - struct rib_head *rh; - struct radix_node *rn; - struct sockaddr_in6 sin6; - struct nhop_object *nh; - - KASSERT((fibnum < rt_numfibs), ("fib6_lookup_nh_basic: bad fibnum")); - rh = rt_tables_get_rnh(fibnum, AF_INET6); - if (rh == NULL) - return (ENOENT); - - /* Prepare lookup key */ - memset(&sin6, 0, sizeof(sin6)); - sin6.sin6_addr = *dst; - sin6.sin6_len = sizeof(struct sockaddr_in6); - /* Assume scopeid is valid and embed it directly */ - if (IN6_IS_SCOPE_LINKLOCAL(dst)) - sin6.sin6_addr.s6_addr16[1] = htons(scopeid & 0xffff); - - RIB_RLOCK(rh); - rn = rh->rnh_matchaddr((void *)&sin6, &rh->head); - if (rn != NULL && ((rn->rn_flags & RNF_ROOT) == 0)) { - nh = RNTORT(rn)->rt_nhop; - /* Ensure route & ifp is UP */ - if (RT_LINK_IS_UP(nh->nh_ifp)) { - fib6_rte_to_nh_basic(nh, &sin6.sin6_addr, flags, pnh6); - RIB_RUNLOCK(rh); - return (0); - } - } - RIB_RUNLOCK(rh); - - return (ENOENT); -} - -/* - * Performs IPv6 route table lookup on @dst. Returns 0 on success. - * Stores extended nexthop info into provided @pnh6 structure. - * Note that - * - nh_ifp cannot be safely dereferenced unless NHR_REF is specified. - * - in that case you need to call fib6_free_nh_ext() - * - nh_ifp represents logical transmit interface (rt_ifp) by default - * - nh_ifp represents "address" interface if NHR_IFAIF flag is passed - * - mtu from logical transmit interface will be returned. - * - scope will be embedded in nh_addr - */ -int -fib6_lookup_nh_ext(uint32_t fibnum, const struct in6_addr *dst,uint32_t scopeid, - uint32_t flags, uint32_t flowid, struct nhop6_extended *pnh6) -{ - RIB_RLOCK_TRACKER; - struct rib_head *rh; - struct radix_node *rn; - struct sockaddr_in6 sin6; - struct rtentry *rte; - struct nhop_object *nh; - - KASSERT((fibnum < rt_numfibs), ("fib6_lookup_nh_ext: bad fibnum")); - rh = rt_tables_get_rnh(fibnum, AF_INET6); - if (rh == NULL) - return (ENOENT); - - /* Prepare lookup key */ - memset(&sin6, 0, sizeof(sin6)); - sin6.sin6_len = sizeof(struct sockaddr_in6); - sin6.sin6_addr = *dst; - /* Assume scopeid is valid and embed it directly */ - if (IN6_IS_SCOPE_LINKLOCAL(dst)) - sin6.sin6_addr.s6_addr16[1] = htons(scopeid & 0xffff); - - RIB_RLOCK(rh); - rn = rh->rnh_matchaddr((void *)&sin6, &rh->head); - if (rn != NULL && ((rn->rn_flags & RNF_ROOT) == 0)) { - rte = RNTORT(rn); -#ifdef RADIX_MPATH - rte = rt_mpath_select(rte, flowid); - if (rte == NULL) { - RIB_RUNLOCK(rh); - return (ENOENT); - } -#endif - nh = rte->rt_nhop; - /* Ensure route & ifp is UP */ - if (RT_LINK_IS_UP(nh->nh_ifp)) { - fib6_rte_to_nh_extended(nh, &sin6.sin6_addr, flags, - pnh6); - if ((flags & NHR_REF) != 0) { - /* TODO: Do lwref on egress ifp's */ - } - RIB_RUNLOCK(rh); - - return (0); - } - } - RIB_RUNLOCK(rh); - - return (ENOENT); -} - -void -fib6_free_nh_ext(uint32_t fibnum, struct nhop6_extended *pnh6) -{ - -} /* * Looks up path in fib @fibnum specified by @dst. Modified: head/sys/netinet6/in6_fib.h ============================================================================== --- head/sys/netinet6/in6_fib.h Thu Jul 2 18:42:43 2020 (r362899) +++ head/sys/netinet6/in6_fib.h Thu Jul 2 21:04:08 2020 (r362900) @@ -32,33 +32,6 @@ #ifndef _NETINET6_IN6_FIB_H_ #define _NETINET6_IN6_FIB_H_ -/* Basic nexthop info used for uRPF/mtu checks */ -struct nhop6_basic { - struct ifnet *nh_ifp; /* Logical egress interface */ - uint16_t nh_mtu; /* nexthop mtu */ - uint16_t nh_flags; /* nhop flags */ - uint8_t spare[4]; - struct in6_addr nh_addr; /* GW/DST IPv4 address */ -}; - -/* Extended nexthop info used for control protocols. */ -struct nhop6_extended { - struct ifnet *nh_ifp; /* Logical egress interface */ - struct in6_ifaddr *nh_ia; /* Associated address. */ - uint16_t nh_mtu; /* nexthop mtu */ - uint16_t nh_flags; /* nhop flags */ - uint8_t spare[4]; - struct in6_addr nh_addr; /* GW/DST IPv6 address */ - uint64_t spare2[1]; -}; - -int fib6_lookup_nh_basic(uint32_t fibnum, const struct in6_addr *dst, - uint32_t scopeid, uint32_t flags, uint32_t flowid,struct nhop6_basic *pnh6); -int fib6_lookup_nh_ext(uint32_t fibnum, const struct in6_addr *dst, - uint32_t scopeid, uint32_t flags, uint32_t flowid, - struct nhop6_extended *pnh6); -void fib6_free_nh_ext(uint32_t fibnum, struct nhop6_extended *pnh6); - struct nhop_object *fib6_lookup(uint32_t fibnum, const struct in6_addr *dst6, uint32_t scopeid, uint32_t flags, uint32_t flowid); Modified: head/sys/netinet6/in6_mcast.c ============================================================================== --- head/sys/netinet6/in6_mcast.c Thu Jul 2 18:42:43 2020 (r362899) +++ head/sys/netinet6/in6_mcast.c Thu Jul 2 21:04:08 2020 (r362900) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -1829,7 +1830,7 @@ static struct ifnet * in6p_lookup_mcast_ifp(const struct inpcb *inp, const struct sockaddr_in6 *gsin6) { - struct nhop6_basic nh6; + struct nhop_object *nh; struct in6_addr dst; uint32_t scopeid; uint32_t fibnum; @@ -1841,10 +1842,9 @@ in6p_lookup_mcast_ifp(const struct inpcb *inp, in6_splitscope(&gsin6->sin6_addr, &dst, &scopeid); fibnum = inp ? inp->inp_inc.inc_fibnum : RT_DEFAULT_FIB; - if (fib6_lookup_nh_basic(fibnum, &dst, scopeid, 0, 0, &nh6) != 0) - return (NULL); + nh = fib6_lookup(fibnum, &dst, scopeid, 0, 0); - return (nh6.nh_ifp); + return (nh ? nh->nh_ifp : NULL); } /* Modified: head/sys/netinet6/in6_src.c ============================================================================== --- head/sys/netinet6/in6_src.c Thu Jul 2 18:42:43 2020 (r362899) +++ head/sys/netinet6/in6_src.c Thu Jul 2 21:04:08 2020 (r362900) @@ -916,15 +916,16 @@ in6_selecthlim(struct inpcb *inp, struct ifnet *ifp) else if (ifp) return (ND_IFINFO(ifp)->chlim); else if (inp && !IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr)) { - struct nhop6_basic nh6; + struct nhop_object *nh; struct in6_addr dst; uint32_t fibnum, scopeid; int hlim; fibnum = inp->inp_inc.inc_fibnum; in6_splitscope(&inp->in6p_faddr, &dst, &scopeid); - if (fib6_lookup_nh_basic(fibnum, &dst, scopeid, 0, 0, &nh6)==0){ - hlim = ND_IFINFO(nh6.nh_ifp)->chlim; + nh = fib6_lookup(fibnum, &dst, scopeid, 0, 0); + if (nh != NULL) { + hlim = ND_IFINFO(nh->nh_ifp)->chlim; return (hlim); } } Modified: head/sys/netpfil/ipfw/ip_fw2.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw2.c Thu Jul 2 18:42:43 2020 (r362899) +++ head/sys/netpfil/ipfw/ip_fw2.c Thu Jul 2 21:04:08 2020 (r362900) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -466,9 +467,10 @@ verify_path(struct in_addr src, struct ifnet *ifp, u_i #if defined(USERSPACE) || !defined(__FreeBSD__) return 0; #else - struct nhop4_basic nh4; + struct nhop_object *nh; - if (fib4_lookup_nh_basic(fib, src, NHR_IFAIF, 0, &nh4) != 0) + nh = fib4_lookup(fib, src, 0, NHR_NONE, 0); + if (nh == NULL) return (0); /* @@ -478,15 +480,15 @@ verify_path(struct in_addr src, struct ifnet *ifp, u_i * routing entry (via lo0) for our own address * may exist, so we need to handle routing assymetry. */ - if (ifp != NULL && ifp != nh4.nh_ifp) + if (ifp != NULL && ifp != nh->nh_aifp) return (0); /* if no ifp provided, check if rtentry is not default route */ - if (ifp == NULL && (nh4.nh_flags & NHF_DEFAULT) != 0) + if (ifp == NULL && (nh->nh_flags & NHF_DEFAULT) != 0) return (0); /* or if this is a blackhole/reject route */ - if (ifp == NULL && (nh4.nh_flags & (NHF_REJECT|NHF_BLACKHOLE)) != 0) + if (ifp == NULL && (nh->nh_flags & (NHF_REJECT|NHF_BLACKHOLE)) != 0) return (0); /* found valid route */ @@ -805,24 +807,25 @@ ipfw_localip6(struct in6_addr *in6) static int verify_path6(struct in6_addr *src, struct ifnet *ifp, u_int fib) { - struct nhop6_basic nh6; + struct nhop_object *nh; if (IN6_IS_SCOPE_LINKLOCAL(src)) return (1); - if (fib6_lookup_nh_basic(fib, src, 0, NHR_IFAIF, 0, &nh6) != 0) + nh = fib6_lookup(fib, src, 0, NHR_NONE, 0); + if (nh == NULL) return (0); /* If ifp is provided, check for equality with route table. */ - if (ifp != NULL && ifp != nh6.nh_ifp) + if (ifp != NULL && ifp != nh->nh_aifp) return (0); /* if no ifp provided, check if rtentry is not default route */ - if (ifp == NULL && (nh6.nh_flags & NHF_DEFAULT) != 0) + if (ifp == NULL && (nh->nh_flags & NHF_DEFAULT) != 0) return (0); /* or if this is a blackhole/reject route */ - if (ifp == NULL && (nh6.nh_flags & (NHF_REJECT|NHF_BLACKHOLE)) != 0) + if (ifp == NULL && (nh->nh_flags & (NHF_REJECT|NHF_BLACKHOLE)) != 0) return (0); /* found valid route */ Modified: head/sys/netpfil/ipfw/ip_fw_table_algo.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_table_algo.c Thu Jul 2 18:42:43 2020 (r362899) +++ head/sys/netpfil/ipfw/ip_fw_table_algo.c Thu Jul 2 21:04:08 2020 (r362900) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include /* ip_fw.h requires IFNAMSIZ */ #include #include +#include #include #include @@ -3811,26 +3812,22 @@ ta_lookup_kfib(struct table_info *ti, void *key, uint3 uint32_t *val) { #ifdef INET - struct nhop4_basic nh4; struct in_addr in; #endif -#ifdef INET6 - struct nhop6_basic nh6; -#endif int error; error = ENOENT; #ifdef INET if (keylen == 4) { in.s_addr = *(in_addr_t *)key; - error = fib4_lookup_nh_basic(ti->data, - in, 0, 0, &nh4); + NET_EPOCH_ASSERT(); + error = fib4_lookup(ti->data, in, 0, NHR_NONE, 0) != NULL; } #endif #ifdef INET6 if (keylen == 6) - error = fib6_lookup_nh_basic(ti->data, - (struct in6_addr *)key, 0, 0, 0, &nh6); + error = fib6_lookup(ti->data, (struct in6_addr *)key, + 0, NHR_NONE, 0) != NULL; #endif if (error != 0) Modified: head/sys/netpfil/ipfw/nat64/nat64_translate.c ============================================================================== --- head/sys/netpfil/ipfw/nat64/nat64_translate.c Thu Jul 2 18:42:43 2020 (r362899) +++ head/sys/netpfil/ipfw/nat64/nat64_translate.c Thu Jul 2 21:04:08 2020 (r362900) @@ -50,9 +50,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include +#include #include #include #include @@ -79,9 +81,9 @@ typedef int (*nat64_output_t)(struct ifnet *, struct m typedef int (*nat64_output_one_t)(struct mbuf *, struct nat64_counters *, void *); -static int nat64_find_route4(struct nhop4_basic *, struct sockaddr_in *, +static struct nhop_object *nat64_find_route4(struct sockaddr_in *, struct mbuf *); -static int nat64_find_route6(struct nhop6_basic *, struct sockaddr_in6 *, +static struct nhop_object *nat64_find_route6(struct sockaddr_in6 *, struct mbuf *); static int nat64_output_one(struct mbuf *, struct nat64_counters *, void *); static int nat64_output(struct ifnet *, struct mbuf *, struct sockaddr *, @@ -172,8 +174,8 @@ static int nat64_direct_output_one(struct mbuf *m, struct nat64_counters *stats, void *logdata) { - struct nhop6_basic nh6; - struct nhop4_basic nh4; + struct nhop_object *nh4 = NULL; + struct nhop_object *nh6 = NULL; struct sockaddr_in6 dst6; struct sockaddr_in dst4; struct sockaddr *dst; @@ -183,25 +185,28 @@ nat64_direct_output_one(struct mbuf *m, struct nat64_c int error; ip4 = mtod(m, struct ip *); + error = 0; switch (ip4->ip_v) { case IPVERSION: dst4.sin_addr = ip4->ip_dst; - error = nat64_find_route4(&nh4, &dst4, m); - if (error != 0) + nh4 = nat64_find_route4(&dst4, m); + if (nh4 == NULL) { NAT64STAT_INC(stats, noroute4); - else { - ifp = nh4.nh_ifp; + error = EHOSTUNREACH; + } else { + ifp = nh4->nh_ifp; dst = (struct sockaddr *)&dst4; } break; case (IPV6_VERSION >> 4): ip6 = mtod(m, struct ip6_hdr *); dst6.sin6_addr = ip6->ip6_dst; - error = nat64_find_route6(&nh6, &dst6, m); - if (error != 0) + nh6 = nat64_find_route6(&dst6, m); + if (nh6 == NULL) { NAT64STAT_INC(stats, noroute6); - else { - ifp = nh6.nh_ifp; + error = EHOSTUNREACH; + } else { + ifp = nh6->nh_ifp; dst = (struct sockaddr *)&dst6; } break; @@ -614,31 +619,31 @@ fail: return (ENOMEM); } -static NAT64NOINLINE int -nat64_find_route6(struct nhop6_basic *pnh, struct sockaddr_in6 *dst, - struct mbuf *m) +static struct nhop_object * +nat64_find_route6(struct sockaddr_in6 *dst, struct mbuf *m) { - - if (fib6_lookup_nh_basic(M_GETFIB(m), &dst->sin6_addr, 0, 0, 0, - pnh) != 0) - return (EHOSTUNREACH); - if (pnh->nh_flags & (NHF_BLACKHOLE | NHF_REJECT)) - return (EHOSTUNREACH); + struct nhop_object *nh; + NET_EPOCH_ASSERT(); + nh = fib6_lookup(M_GETFIB(m), &dst->sin6_addr, 0, 0, 0); + if (nh == NULL) + return NULL; + if (nh->nh_flags & (NHF_BLACKHOLE | NHF_REJECT)) + return NULL; /* * XXX: we need to use destination address with embedded scope * zone id, because LLTABLE uses such form of addresses for lookup. */ dst->sin6_family = AF_INET6; dst->sin6_len = sizeof(*dst); - dst->sin6_addr = pnh->nh_addr; + dst->sin6_addr = ifatoia6(nh->nh_ifa)->ia_addr.sin6_addr; if (IN6_IS_SCOPE_LINKLOCAL(&dst->sin6_addr)) dst->sin6_addr.s6_addr16[1] = - htons(pnh->nh_ifp->if_index & 0xffff); + htons(nh->nh_ifp->if_index & 0xffff); dst->sin6_port = 0; dst->sin6_scope_id = 0; dst->sin6_flowinfo = 0; - return (0); + return nh; } #define NAT64_ICMP6_PLEN 64 @@ -766,21 +771,23 @@ freeit: m_freem(m); } -static NAT64NOINLINE int -nat64_find_route4(struct nhop4_basic *pnh, struct sockaddr_in *dst, - struct mbuf *m) +static struct nhop_object * +nat64_find_route4(struct sockaddr_in *dst, struct mbuf *m) { + struct nhop_object *nh; - if (fib4_lookup_nh_basic(M_GETFIB(m), dst->sin_addr, 0, 0, pnh) != 0) - return (EHOSTUNREACH); - if (pnh->nh_flags & (NHF_BLACKHOLE | NHF_BROADCAST | NHF_REJECT)) - return (EHOSTUNREACH); + NET_EPOCH_ASSERT(); + nh = fib4_lookup(M_GETFIB(m), dst->sin_addr, 0, 0, 0); + if (nh == NULL) + return NULL; + if (nh->nh_flags & (NHF_BLACKHOLE | NHF_BROADCAST | NHF_REJECT)) + return NULL; dst->sin_family = AF_INET; dst->sin_len = sizeof(*dst); - dst->sin_addr = pnh->nh_addr; + dst->sin_addr = IA_SIN(nh->nh_ifa)->sin_addr; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Jul 2 22:59:05 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EFE52361AF3; Thu, 2 Jul 2020 22:59:05 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49yYS96492z4P8R; Thu, 2 Jul 2020 22:59:05 +0000 (UTC) (envelope-from grog@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 B39EB21F9C; Thu, 2 Jul 2020 22:59:05 +0000 (UTC) (envelope-from grog@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 062Mx5dN056535; Thu, 2 Jul 2020 22:59:05 GMT (envelope-from grog@FreeBSD.org) Received: (from grog@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 062Mx5Up056534; Thu, 2 Jul 2020 22:59:05 GMT (envelope-from grog@FreeBSD.org) Message-Id: <202007022259.062Mx5Up056534@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: grog set sender to grog@FreeBSD.org using -f From: Greg Lehey Date: Thu, 2 Jul 2020 22:59:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362901 - head/usr.bin/calendar/calendars/de_DE.ISO8859-1 X-SVN-Group: head X-SVN-Commit-Author: grog X-SVN-Commit-Paths: head/usr.bin/calendar/calendars/de_DE.ISO8859-1 X-SVN-Commit-Revision: 362901 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2020 22:59:06 -0000 Author: grog Date: Thu Jul 2 22:59:05 2020 New Revision: 362901 URL: https://svnweb.freebsd.org/changeset/base/362901 Log: Use canonical description for Schlacht bei Königgrätz, add year. Modified: head/usr.bin/calendar/calendars/de_DE.ISO8859-1/calendar.geschichte Modified: head/usr.bin/calendar/calendars/de_DE.ISO8859-1/calendar.geschichte ============================================================================== --- head/usr.bin/calendar/calendars/de_DE.ISO8859-1/calendar.geschichte Thu Jul 2 21:04:08 2020 (r362900) +++ head/usr.bin/calendar/calendars/de_DE.ISO8859-1/calendar.geschichte Thu Jul 2 22:59:05 2020 (r362901) @@ -36,7 +36,7 @@ LANG=de_DE.ISO8859-1 Paulskirche, Wahl von Friedrich Wilhelm IV von Preußen zum deutschen Kaiser, 1849 04/28 Ablehnung der deutschen Kaiserkrone durch den preußischen König, 1849 -07/03 Schlacht von Königgrätz +07/03 Schlacht bei Königgrätz, 1866 07/13 Emser Depesche, 1870 07/18 Verkündung des Dogmas von der päpstlichen Unfehlbarkeit durch das I. Vatikanische Konzil From owner-svn-src-all@freebsd.org Fri Jul 3 00:09:44 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4C2D4363586; Fri, 3 Jul 2020 00:09:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49yb1h189Vz4RYl; Fri, 3 Jul 2020 00:09:44 +0000 (UTC) (envelope-from jhb@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 E1CE122C9C; Fri, 3 Jul 2020 00:09:43 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06309hhb099590; Fri, 3 Jul 2020 00:09:43 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06309gcC099579; Fri, 3 Jul 2020 00:09:42 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202007030009.06309gcC099579@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 3 Jul 2020 00:09:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362902 - in head/lib/csu: . aarch64 amd64 arm i386 mips powerpc powerpc64 riscv X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/lib/csu: . aarch64 amd64 arm i386 mips powerpc powerpc64 riscv X-SVN-Commit-Revision: 362902 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jul 2020 00:09:44 -0000 Author: jhb Date: Fri Jul 3 00:09:41 2020 New Revision: 362902 URL: https://svnweb.freebsd.org/changeset/base/362902 Log: Consolidate duplicated logic in csu Makefiles to lib/csu/Makefile.inc. Reviewed by: kib Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D25537 Modified: head/lib/csu/Makefile.inc head/lib/csu/aarch64/Makefile head/lib/csu/amd64/Makefile head/lib/csu/arm/Makefile head/lib/csu/i386/Makefile head/lib/csu/mips/Makefile head/lib/csu/powerpc/Makefile head/lib/csu/powerpc64/Makefile head/lib/csu/riscv/Makefile Modified: head/lib/csu/Makefile.inc ============================================================================== --- head/lib/csu/Makefile.inc Thu Jul 2 22:59:05 2020 (r362901) +++ head/lib/csu/Makefile.inc Fri Jul 3 00:09:41 2020 (r362902) @@ -8,15 +8,52 @@ NO_WMISSING_VARIABLE_DECLARATIONS= .if !defined(BUILDING_TESTS) +OBJS+= Scrt1.o crt1.o gcrt1.o OBJS+= crtbegin.o crtbeginS.o crtbeginT.o OBJS+= crtend.o crtendS.o +OBJS+= crti.o crtn.o +CRT1OBJS+= crtbrand.o ignore_init_note.o + ACFLAGS+= -DLOCORE CFLAGS+= -fno-asynchronous-unwind-tables CFLAGS+= -fno-omit-frame-pointer +CFLAGS+= -I${.CURDIR:H}/common \ + -I${SRCTOP}/lib/libc/include CFLAGS_CRTS= -DSHARED ${PICFLAG} + +FILES= ${OBJS} +FILESMODE= ${LIBMODE} +FILESOWN= ${LIBOWN} +FILESGRP= ${LIBGRP} +FILESDIR= ${LIBDIR} +# These FILES qualify as libraries for the purpose of LIBRARIES_ONLY. +.undef LIBRARIES_ONLY + +CLEANFILES+= ${OBJS} ${CRT1OBJS} crt1_c.o gcrt1_c.o Scrt1_c.o + +crt1.o: crt1_c.o ${CRT1OBJS} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} +.if ${MACHINE_ARCH} == "i386" + ${OBJCOPY} --localize-symbol _start1 crt1.o +.endif + +gcrt1_c.o: crt1_c.c + ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c + +gcrt1.o: gcrt1_c.o ${CRT1OBJS} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} + +Scrt1_c.o: crt1_c.c + ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c + +Scrt1.o: Scrt1_c.o ${CRT1OBJS} + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} +.if ${MACHINE_ARCH} == "i386" + ${OBJCOPY} --localize-symbol _start1 crt1.o +.endif crtbegin.o: crtbegin.c crtbeginS.o: crtbegin.c Modified: head/lib/csu/aarch64/Makefile ============================================================================== --- head/lib/csu/aarch64/Makefile Thu Jul 2 22:59:05 2020 (r362901) +++ head/lib/csu/aarch64/Makefile Fri Jul 3 00:09:41 2020 (r362902) @@ -2,37 +2,8 @@ .PATH: ${.CURDIR:H}/common -SRCS= crti.S crtn.S -OBJS= ${SRCS:N*.h:R:S/$/.o/g} -OBJS+= Scrt1.o crt1.o gcrt1.o -CFLAGS+= -I${.CURDIR:H}/common \ - -I${SRCTOP}/lib/libc/include CFLAGS+= -DCRT_IRELOC_SUPPRESS -FILES= ${OBJS} -FILESMODE= ${LIBMODE} -FILESOWN= ${LIBOWN} -FILESGRP= ${LIBGRP} -FILESDIR= ${LIBDIR} -# These FILES qualify as libraries for the purpose of LIBRARIES_ONLY. -.undef LIBRARIES_ONLY - -CLEANFILES= ${OBJS} crt1_c.o crt1_s.o gcrt1_c.o Scrt1_c.o -CLEANFILES+= crtbrand.o ignore_init_note.o - -gcrt1_c.o: crt1_c.c - ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c - -gcrt1.o: gcrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} - -crt1.o: crt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} - -Scrt1_c.o: crt1_c.c - ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c - -Scrt1.o: Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} +CRT1OBJS+= crt1_s.o .include Modified: head/lib/csu/amd64/Makefile ============================================================================== --- head/lib/csu/amd64/Makefile Thu Jul 2 22:59:05 2020 (r362901) +++ head/lib/csu/amd64/Makefile Fri Jul 3 00:09:41 2020 (r362902) @@ -2,37 +2,7 @@ .PATH: ${.CURDIR:H}/common -SRCS= crti.S crtn.S -OBJS= ${SRCS:N*.h:R:S/$/.o/g} -OBJS+= Scrt1.o crt1.o gcrt1.o -CFLAGS+= -I${.CURDIR} -I${.CURDIR:H}/common \ - -I${SRCTOP}/lib/libc/include +CFLAGS+= -I${.CURDIR} CFLAGS+= -fno-omit-frame-pointer -DCRT_IRELOC_RELA - -FILES= ${OBJS} -FILESMODE= ${LIBMODE} -FILESOWN= ${LIBOWN} -FILESGRP= ${LIBGRP} -FILESDIR= ${LIBDIR} -# These FILES qualify as libraries for the purpose of LIBRARIES_ONLY. -.undef LIBRARIES_ONLY - -CLEANFILES= ${OBJS} crt1_c.o gcrt1_c.o Scrt1_c.o -CLEANFILES+= crtbrand.o ignore_init_note.o - -gcrt1_c.o: crt1_c.c - ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c - -gcrt1.o: gcrt1_c.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o gcrt1.o -r crtbrand.o ignore_init_note.o gcrt1_c.o - -crt1.o: crt1_c.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o crt1.o -r crtbrand.o ignore_init_note.o crt1_c.o - -Scrt1_c.o: crt1_c.c - ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c - -Scrt1.o: Scrt1_c.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o Scrt1.o -r crtbrand.o ignore_init_note.o Scrt1_c.o .include Modified: head/lib/csu/arm/Makefile ============================================================================== --- head/lib/csu/arm/Makefile Thu Jul 2 22:59:05 2020 (r362901) +++ head/lib/csu/arm/Makefile Fri Jul 3 00:09:41 2020 (r362902) @@ -2,40 +2,8 @@ .PATH: ${.CURDIR:H}/common -SRCS= crti.S crtn.S -OBJS= ${SRCS:N*.h:R:S/$/.o/g} -OBJS+= Scrt1.o crt1.o gcrt1.o -CFLAGS+= -I${.CURDIR:H}/common \ - -I${SRCTOP}/lib/libc/include CFLAGS+= -DCRT_IRELOC_SUPPRESS -FILES= ${OBJS} -FILESMODE= ${LIBMODE} -FILESOWN= ${LIBOWN} -FILESGRP= ${LIBGRP} -FILESDIR= ${LIBDIR} -# These FILES qualify as libraries for the purpose of LIBRARIES_ONLY. -.undef LIBRARIES_ONLY - -CLEANFILES= ${OBJS} crt1_c.o crt1_s.o gcrt1_c.o Scrt1_c.o -CLEANFILES+= crtbrand.o ignore_init_note.o - -crt1_c.o: crt1_c.c - ${CC} ${CFLAGS} -c -o ${.TARGET} ${.CURDIR}/crt1_c.c - -crt1.o: crt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} - -gcrt1_c.o: crt1_c.c - ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c - -gcrt1.o: gcrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} - -Scrt1_c.o: crt1_c.c - ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c - -Scrt1.o: Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} +CRT1OBJS+= crt1_s.o .include Modified: head/lib/csu/i386/Makefile ============================================================================== --- head/lib/csu/i386/Makefile Thu Jul 2 22:59:05 2020 (r362901) +++ head/lib/csu/i386/Makefile Fri Jul 3 00:09:41 2020 (r362902) @@ -2,39 +2,9 @@ .PATH: ${.CURDIR:H}/common -SRCS= crti.S crtn.S -OBJS= ${SRCS:N*.h:R:S/$/.o/g} -OBJS+= Scrt1.o crt1.o gcrt1.o -CFLAGS+= -I${.CURDIR} -I${.CURDIR:H}/common \ - -I${SRCTOP}/lib/libc/include +CFLAGS+= -I${.CURDIR} CFLAGS+= -DCRT_IRELOC_REL -FILES= ${OBJS} -FILESMODE= ${LIBMODE} -FILESOWN= ${LIBOWN} -FILESGRP= ${LIBGRP} -FILESDIR= ${LIBDIR} -# These FILES qualify as libraries for the purpose of LIBRARIES_ONLY. -.undef LIBRARIES_ONLY - -CLEANFILES= ${OBJS} crt1_c.o crt1_s.o gcrt1_c.o Scrt1_c.o -CLEANFILES+= crtbrand.o ignore_init_note.o - -gcrt1_c.o: crt1_c.c - ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c - -gcrt1.o: gcrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} - -crt1.o: crt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} - ${OBJCOPY} --localize-symbol _start1 crt1.o - -Scrt1_c.o: crt1_c.c - ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c - -Scrt1.o: Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} - ${OBJCOPY} --localize-symbol _start1 Scrt1.o +CRT1OBJS+= crt1_s.o .include Modified: head/lib/csu/mips/Makefile ============================================================================== --- head/lib/csu/mips/Makefile Thu Jul 2 22:59:05 2020 (r362901) +++ head/lib/csu/mips/Makefile Fri Jul 3 00:09:41 2020 (r362902) @@ -2,37 +2,6 @@ .PATH: ${.CURDIR:H}/common -SRCS= crti.S crtn.S -OBJS= ${SRCS:N*.h:R:S/$/.o/g} -OBJS+= Scrt1.o crt1.o gcrt1.o -CFLAGS+= -I${.CURDIR:H}/common \ - -I${SRCTOP}/lib/libc/include CFLAGS+= -DCRT_IRELOC_SUPPRESS - -FILES= ${OBJS} -FILESMODE= ${LIBMODE} -FILESOWN= ${LIBOWN} -FILESGRP= ${LIBGRP} -FILESDIR= ${LIBDIR} -# These FILES qualify as libraries for the purpose of LIBRARIES_ONLY. -.undef LIBRARIES_ONLY - -CLEANFILES= ${OBJS} crt1_c.o gcrt1_c.o Scrt1_c.o -CLEANFILES+= crtbrand.o ignore_init_note.o - -gcrt1_c.o: crt1_c.c - ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c - -gcrt1.o: gcrt1_c.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o gcrt1.o -r crtbrand.o ignore_init_note.o gcrt1_c.o - -crt1.o: crt1_c.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o crt1.o -r crtbrand.o ignore_init_note.o crt1_c.o - -Scrt1_c.o: crt1_c.c - ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c - -Scrt1.o: Scrt1_c.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o Scrt1.o -r crtbrand.o ignore_init_note.o Scrt1_c.o .include Modified: head/lib/csu/powerpc/Makefile ============================================================================== --- head/lib/csu/powerpc/Makefile Thu Jul 2 22:59:05 2020 (r362901) +++ head/lib/csu/powerpc/Makefile Fri Jul 3 00:09:41 2020 (r362902) @@ -2,37 +2,7 @@ .PATH: ${.CURDIR:H}/common -SRCS= crti.S crtn.S crtsavres.S -OBJS= ${SRCS:N*.h:R:S/$/.o/g} -OBJS+= Scrt1.o crt1.o gcrt1.o -CFLAGS+= -I${.CURDIR:H}/common \ - -I${SRCTOP}/lib/libc/include +OBJS+= crtsavres.o CFLAGS+= -DCRT_IRELOC_SUPPRESS - -FILES= ${OBJS} -FILESMODE= ${LIBMODE} -FILESOWN= ${LIBOWN} -FILESGRP= ${LIBGRP} -FILESDIR= ${LIBDIR} -# These FILES qualify as libraries for the purpose of LIBRARIES_ONLY. -.undef LIBRARIES_ONLY - -CLEANFILES= ${OBJS} crt1_c.o gcrt1_c.o Scrt1_c.o -CLEANFILES+= crtbrand.o ignore_init_note.o - -gcrt1_c.o: crt1_c.c - ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c - -gcrt1.o: gcrt1_c.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o gcrt1.o -r crtbrand.o ignore_init_note.o gcrt1_c.o - -crt1.o: crt1_c.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o crt1.o -r crtbrand.o ignore_init_note.o crt1_c.o - -Scrt1_c.o: crt1_c.c - ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c - -Scrt1.o: Scrt1_c.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o Scrt1.o -r crtbrand.o ignore_init_note.o Scrt1_c.o .include Modified: head/lib/csu/powerpc64/Makefile ============================================================================== --- head/lib/csu/powerpc64/Makefile Thu Jul 2 22:59:05 2020 (r362901) +++ head/lib/csu/powerpc64/Makefile Fri Jul 3 00:09:41 2020 (r362902) @@ -2,42 +2,14 @@ .PATH: ${.CURDIR:H}/common -SRCS= crti.S crtn.S -OBJS= ${SRCS:N*.h:R:S/$/.o/g} -OBJS+= Scrt1.o crt1.o crtsavres.o gcrt1.o -CFLAGS+= -I${.CURDIR} -I${.CURDIR:H}/common \ - -I${SRCTOP}/lib/libc/include \ +OBJS+= crtsavres.o +CFLAGS+= -I${.CURDIR} \ -mlongcall -DCRT_IRELOC_RELA -FILES= ${OBJS} -FILESMODE= ${LIBMODE} -FILESOWN= ${LIBOWN} -FILESGRP= ${LIBGRP} -FILESDIR= ${LIBDIR} -# These FILES qualify as libraries for the purpose of LIBRARIES_ONLY. -.undef LIBRARIES_ONLY - -CLEANFILES= ${OBJS} crt1_c.o gcrt1_c.o Scrt1_c.o -CLEANFILES+= crtbrand.o ignore_init_note.o CLEANFILES+= crtsavres.S # On powerpc64 crtsavres is an empty file crtsavres.S: touch ${.TARGET} - -gcrt1_c.o: crt1_c.c - ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c - -gcrt1.o: gcrt1_c.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o gcrt1.o -r crtbrand.o ignore_init_note.o gcrt1_c.o - -crt1.o: crt1_c.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o crt1.o -r crtbrand.o ignore_init_note.o crt1_c.o - -Scrt1_c.o: crt1_c.c - ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c - -Scrt1.o: Scrt1_c.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o Scrt1.o -r crtbrand.o ignore_init_note.o Scrt1_c.o .include Modified: head/lib/csu/riscv/Makefile ============================================================================== --- head/lib/csu/riscv/Makefile Thu Jul 2 22:59:05 2020 (r362901) +++ head/lib/csu/riscv/Makefile Fri Jul 3 00:09:41 2020 (r362902) @@ -2,37 +2,8 @@ .PATH: ${.CURDIR:H}/common -SRCS= crti.S crtn.S -OBJS= ${SRCS:N*.h:R:S/$/.o/g} -OBJS+= Scrt1.o crt1.o gcrt1.o -CFLAGS+= -I${.CURDIR:H}/common \ - -I${SRCTOP}/lib/libc/include CFLAGS+= -DCRT_IRELOC_SUPPRESS -FILES= ${OBJS} -FILESMODE= ${LIBMODE} -FILESOWN= ${LIBOWN} -FILESGRP= ${LIBGRP} -FILESDIR= ${LIBDIR} -# These FILES qualify as libraries for the purpose of LIBRARIES_ONLY. -.undef LIBRARIES_ONLY - -CLEANFILES= ${OBJS} crt1_c.o crt1_s.o gcrt1_c.o Scrt1_c.o -CLEANFILES+= crtbrand.o ignore_init_note.o - -gcrt1_c.o: crt1_c.c - ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c - -gcrt1.o: gcrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} - -crt1.o: crt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} - -Scrt1_c.o: crt1_c.c - ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c - -Scrt1.o: Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} +CRT1OBJS+= crt1_s.o .include From owner-svn-src-all@freebsd.org Fri Jul 3 00:26:31 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 711B0363A55; Fri, 3 Jul 2020 00:26:31 +0000 (UTC) (envelope-from gonzo@freebsd.org) Received: from id.bluezbox.com (id.bluezbox.com [45.55.20.155]) (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 49ybP30z2Lz4Sk4; Fri, 3 Jul 2020 00:26:30 +0000 (UTC) (envelope-from gonzo@freebsd.org) Received: from localhost ([127.0.0.1] helo=id.bluezbox.com) by id.bluezbox.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92 (FreeBSD)) (envelope-from ) id 1jr9X6-0004v1-2I; Thu, 02 Jul 2020 17:26:24 -0700 Received: (from gonzo@localhost) by id.bluezbox.com (8.15.2/8.15.2/Submit) id 0630QNEe018910; Thu, 2 Jul 2020 17:26:23 -0700 (PDT) (envelope-from gonzo@freebsd.org) X-Authentication-Warning: id.bluezbox.com: gonzo set sender to gonzo@freebsd.org using -f Date: Thu, 2 Jul 2020 17:26:23 -0700 From: Oleksandr Tymoshenko To: Peter Jeremy Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362736 - head/sys/arm64/rockchip Message-ID: <20200703002623.GA18584@bluezbox.com> References: <202006282111.05SLBAAq025544@repo.freebsd.org> <20200701085747.GA23928@server.rulingia.com> <20200701124738.GA30133@server.rulingia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200701124738.GA30133@server.rulingia.com> X-Operating-System: FreeBSD/11.2-RELEASE-p10 (amd64) User-Agent: Mutt/1.12.1 (2019-06-15) X-Spam-Level: -- X-Spam-Report: Spam detection software, running on the system "id.bluezbox.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: Peter Jeremy (peter@rulingia.com) wrote: > On 2020-Jul-01 18:57:47 +1000, Peter Jeremy wrote: > >On 2020-Jun-28 21:11:10 +0000, Oleksandr Tymoshenko wro [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Rspamd-Queue-Id: 49ybP30z2Lz4Sk4 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[freebsd.org]; ASN(0.00)[asn:14061, ipnet:45.55.0.0/19, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jul 2020 00:26:31 -0000 Peter Jeremy (peter@rulingia.com) wrote: > On 2020-Jul-01 18:57:47 +1000, Peter Jeremy wrote: > >On 2020-Jun-28 21:11:10 +0000, Oleksandr Tymoshenko wrote: > >>Log: > >> Configure rx_delay/tx_delay values for RK3399/RK3328 GMAC > >> > >> For 1000Mb mode to work reliably TX/RX delays need to be configured > >> between the TX/RX clock and the respective signals on the PHY > >> to compensate for differing trace lengths on the PCB. > > > >This breaks (at least) diskless booting on my Rock64. > > I've studied the RK3328 TRM[1] and the RK3328 code following r362736 > matches[2] the GRF_MAC_CON0/1 documentation on p201-203 (though p574 > says the delay line is configured via GRF_SOC_CON3 - which doesn't > match the documentation on GRF_SOC_CON3 on p175-177). That suggests > that the delay values in the FDT are incorrect. Unfortunately, the > TRM doesn't include any details on how to configure the delay values > so it's difficult to adjust the numbers in the FDT. > > One possible explanation I have is that there are (at least) 2 > different Rock64 variants. Later versions have increased the RGMII > bus voltage to improve GigE reliability. I initially had problems > with GigE reliability and mod'd my Rock64[3] to use the higher RGMII > bus voltage - which made it rock solid at GigE. It's possible that > different variants need different delay values, due to different track > skew or different driver behaviour at different bus voltages. > > [1] Rockchip_RK3328TRM_V1.1-Part1-20170321.pdf > [2] There's one typo: RK3328_GRF_MAC_CON0_TX_MASK instead of > RK3328_GRF_MAC_CON0_RX_MASK but the values are the same). > [3] Move 1 resistor to change a pull-up to a pull-down Hi Peter, Could you try kernel with this patch? It's mostly debug output, with one possible clock-related fix. https://people.freebsd.org/~gonzo/patches/rk3328-gmac-debug.patch I have Rock64 v2, which, as you mentioned, has a known issue with GigE, so my tests are not reliable. I'll try to get another RK3328 board for tests, but it may take some time. If the clock fix doesn't help, I'll make delays configuration run-time configurable with off by default until more hardware is tested. -- gonzo From owner-svn-src-all@freebsd.org Fri Jul 3 01:19:30 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 945143641DE; Fri, 3 Jul 2020 01:19:30 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49ycZB3PJPz4VYH; Fri, 3 Jul 2020 01:19:30 +0000 (UTC) (envelope-from rmacklem@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 5874F239BF; Fri, 3 Jul 2020 01:19:30 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0631JUuh042081; Fri, 3 Jul 2020 01:19:30 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0631JTvr042079; Fri, 3 Jul 2020 01:19:29 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202007030119.0631JTvr042079@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Fri, 3 Jul 2020 01:19:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362903 - head/sys/fs/nfs X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/sys/fs/nfs X-SVN-Commit-Revision: 362903 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jul 2020 01:19:30 -0000 Author: rmacklem Date: Fri Jul 3 01:19:29 2020 New Revision: 362903 URL: https://svnweb.freebsd.org/changeset/base/362903 Log: Add support for ext_pgs mbufs to nfsm_build(). This is the first of a series of commits that add support to the NFS client and server for building RPC messages in ext_pgs mbufs with anonymous pages. This is useful so that the entire mbuf list does not need to be copied before calling sosend() when NFS over TLS is enabled. Since ND_EXTPG is never set yet, there is no semantic change at this time. Modified: head/sys/fs/nfs/nfsm_subs.h head/sys/fs/nfs/nfsport.h Modified: head/sys/fs/nfs/nfsm_subs.h ============================================================================== --- head/sys/fs/nfs/nfsm_subs.h Fri Jul 3 00:09:41 2020 (r362902) +++ head/sys/fs/nfs/nfsm_subs.h Fri Jul 3 01:19:29 2020 (r362903) @@ -64,14 +64,27 @@ nfsm_build(struct nfsrv_descript *nd, int siz) void *retp; struct mbuf *mb2; - if (siz > M_TRAILINGSPACE(nd->nd_mb)) { + if ((nd->nd_flag & ND_EXTPG) == 0 && + siz > M_TRAILINGSPACE(nd->nd_mb)) { NFSMCLGET(mb2, M_NOWAIT); if (siz > MLEN) panic("build > MLEN"); mb2->m_len = 0; - nd->nd_bpos = mtod(mb2, caddr_t); + nd->nd_bpos = mtod(mb2, char *); nd->nd_mb->m_next = mb2; nd->nd_mb = mb2; + } else if ((nd->nd_flag & ND_EXTPG) != 0) { + if (siz > nd->nd_bextpgsiz) { + mb2 = mb_alloc_ext_plus_pages(PAGE_SIZE, M_WAITOK); + nd->nd_bpos = (char *)(void *) + PHYS_TO_DMAP(mb2->m_epg_pa[0]); + nd->nd_bextpg = 0; + nd->nd_bextpgsiz = PAGE_SIZE - siz; + nd->nd_mb->m_next = mb2; + nd->nd_mb = mb2; + } else + nd->nd_bextpgsiz -= siz; + nd->nd_mb->m_epg_last_len += siz; } retp = (void *)(nd->nd_bpos); nd->nd_mb->m_len += siz; Modified: head/sys/fs/nfs/nfsport.h ============================================================================== --- head/sys/fs/nfs/nfsport.h Fri Jul 3 00:09:41 2020 (r362902) +++ head/sys/fs/nfs/nfsport.h Fri Jul 3 01:19:29 2020 (r362903) @@ -109,8 +109,9 @@ #include #include #include -#include #include +#include +#include #include #include "opt_nfs.h" #include "opt_ufs.h" From owner-svn-src-all@freebsd.org Fri Jul 3 01:21:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 57831364B2A; Fri, 3 Jul 2020 01:21:07 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: from mail-yb1-f170.google.com (mail-yb1-f170.google.com [209.85.219.170]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49ycc26vZqz4VlM; Fri, 3 Jul 2020 01:21:06 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: by mail-yb1-f170.google.com with SMTP id s1so14678642ybo.7; Thu, 02 Jul 2020 18:21:06 -0700 (PDT) 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=v1R+pE5brkQucsvxSb2fDW8kPLQPqE9/bNGoTxwCwDk=; b=FUqyhrMfRJ92h1t99keNV+F39Cl1F357/azXljZZflnleGqdMQsE1uqC4m0lGkfzQK jlZVSeYyR3wJt5QFNSN77BvXI2b4pIR0AvdsGpSEhN+imyJ3p7n/H/siHmLqbkz65Nzn jeJ+BXAmKvx4LFrf2ArGVp4Z99pXAlqN/068s24rLA0XRxvrnqbIN6I+HakoHsVv0nOq CUgDUUFa01KVVc0cWBdBQt0wBbOpx/OUGt7ckmJeJDxX3d4H55/1GHcMFm2b/iFvFbah y1eZ205ryIAalu3HDUnMrmhMQM1sXm0RZzQK9aPOhH9dtZIVyGBrksw29RJ+kWbRyDyJ gmfg== X-Gm-Message-State: AOAM530SD6sshTd2mlDDPRlQVfii/x81cErDt/x+Hztt9Jiecl06Gg3a eMt89Re0jlv7AcdPIBs+wCEhfJHrrdEtoov51bdKUzV979A= X-Google-Smtp-Source: ABdhPJzF51Ay9gbXLuFxowLNDSGnnHvEuZeDGNzaq6RGe2GRWJ9mowPU7g882wXgn88k5Sc3nO+hHot6pPxYeJUR1Ew= X-Received: by 2002:a25:c646:: with SMTP id k67mr56417759ybf.110.1593739265727; Thu, 02 Jul 2020 18:21:05 -0700 (PDT) MIME-Version: 1.0 References: <202007022104.062L49Oo089298@repo.freebsd.org> In-Reply-To: <202007022104.062L49Oo089298@repo.freebsd.org> From: Li-Wen Hsu Date: Fri, 3 Jul 2020 09:20:54 +0800 Message-ID: Subject: Re: svn commit: r362900 - in head/sys: net netinet netinet6 netpfil/ipfw netpfil/ipfw/nat64 To: "Alexander V. Chernikov" , Neel Chauhan Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 49ycc26vZqz4VlM X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jul 2020 01:21:07 -0000 On Fri, Jul 3, 2020 at 5:04 AM Alexander V. Chernikov wrote: > > Author: melifaro > Date: Thu Jul 2 21:04:08 2020 > New Revision: 362900 > URL: https://svnweb.freebsd.org/changeset/base/362900 > > Log: > Complete conversions from fib<4|6>_lookup_nh_ to fib<4|6>_lookup(). > > fib[46]_lookup_nh_ represents pre-epoch generation of fib api, providing less guarantees > over pointer validness and requiring on-stack data copying. > > With no callers remaining, remove fib[46]_lookup_nh_ functions. > > Submitted by: Neel Chauhan > Differential Revision: https://reviews.freebsd.org/D25445 > > Modified: > head/sys/net/if_stf.c > head/sys/netinet/if_ether.c > head/sys/netinet/in_fib.c > head/sys/netinet/in_fib.h > head/sys/netinet/in_mcast.c > head/sys/netinet/ip_options.c > head/sys/netinet6/icmp6.c > head/sys/netinet6/in6.c > head/sys/netinet6/in6_fib.c > head/sys/netinet6/in6_fib.h > head/sys/netinet6/in6_mcast.c > head/sys/netinet6/in6_src.c > head/sys/netpfil/ipfw/ip_fw2.c > head/sys/netpfil/ipfw/ip_fw_table_algo.c > head/sys/netpfil/ipfw/nat64/nat64_translate.c Hi, sys.netinet6.redirect.valid_redirect is failing after this change: https://ci.freebsd.org/job/FreeBSD-head-amd64-test/15739/testReport/junit/sys.netinet6/redirect/valid_redirect/ https://ci.freebsd.org/job/FreeBSD-head-i386-test/9849/testReport/junit/sys.netinet6/redirect/valid_redirect/ Can you help check if the code or test needs fixing? Thanks, Li-Wen From owner-svn-src-all@freebsd.org Fri Jul 3 02:02:35 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8705C3651E4; Fri, 3 Jul 2020 02:02:35 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49ydWv34qvz4XGC; Fri, 3 Jul 2020 02:02:35 +0000 (UTC) (envelope-from lwhsu@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 4DDFC23DDC; Fri, 3 Jul 2020 02:02:35 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06322ZOW072222; Fri, 3 Jul 2020 02:02:35 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06322ZHo072221; Fri, 3 Jul 2020 02:02:35 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202007030202.06322ZHo072221@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Fri, 3 Jul 2020 02:02:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362904 - head/tests/sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/tests/sys/netinet6 X-SVN-Commit-Revision: 362904 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jul 2020 02:02:35 -0000 Author: lwhsu Date: Fri Jul 3 02:02:34 2020 New Revision: 362904 URL: https://svnweb.freebsd.org/changeset/base/362904 Log: Temporarily skip sys.netinet6.redirect.valid_redirect in CI PR: 247729 Sponsored by: The FreeBSD Foundation Modified: head/tests/sys/netinet6/redirect.sh Modified: head/tests/sys/netinet6/redirect.sh ============================================================================== --- head/tests/sys/netinet6/redirect.sh Fri Jul 3 01:19:29 2020 (r362903) +++ head/tests/sys/netinet6/redirect.sh Fri Jul 3 02:02:34 2020 (r362904) @@ -40,6 +40,10 @@ valid_redirect_head() { valid_redirect_body() { + if [ "$(atf_config_get ci false)" = "true" ]; then + atf_skip "https://bugs.freebsd.org/247729" + fi + ids=65533 id=`printf "%x" ${ids}` if [ $$ -gt 65535 ]; then From owner-svn-src-all@freebsd.org Fri Jul 3 04:44:25 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 53980369825; Fri, 3 Jul 2020 04:44:25 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49yj6d1p4Wz3Sws; Fri, 3 Jul 2020 04:44:25 +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 07E2326226; Fri, 3 Jul 2020 04:44:25 +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 0634iOcZ071903; Fri, 3 Jul 2020 04:44:24 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0634iNGo071896; Fri, 3 Jul 2020 04:44:23 GMT (envelope-from np@FreeBSD.org) Message-Id: <202007030444.0634iNGo071896@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 3 Jul 2020 04:44:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362905 - in head/sys/dev/cxgbe: . common X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: in head/sys/dev/cxgbe: . common X-SVN-Commit-Revision: 362905 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jul 2020 04:44:25 -0000 Author: np Date: Fri Jul 3 04:44:23 2020 New Revision: 362905 URL: https://svnweb.freebsd.org/changeset/base/362905 Log: cxgbe(4): changes in the Tx path to help increase tx coalescing. - Ask the firmware for the number of frames that can be stuffed in one work request. - Modify mp_ring to increase the likelihood of tx coalescing when there are just one or two threads that are doing most of the tx. Add teeth to the abdication mechanism by pushing the consumer lock into mp_ring. This reduces the likelihood that a consumer will get stuck with all the work even though it is above its budget. - Add support for coalesced tx WR to the VF driver. This, with the changes above, results in a 7x improvement in the tx pps of the VF driver for some common cases. The firmware vets the L2 headers submitted by the VF driver and it's a big win if the checks are performed for a batch of packets and not each one individually. Reviewed by: jhb@ MFC after: 2 weeks Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D25454 Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/common/common.h head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_mp_ring.c head/sys/dev/cxgbe/t4_mp_ring.h head/sys/dev/cxgbe/t4_sge.c head/sys/dev/cxgbe/t4_vf.c Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Fri Jul 3 02:02:34 2020 (r362904) +++ head/sys/dev/cxgbe/adapter.h Fri Jul 3 04:44:23 2020 (r362905) @@ -550,6 +550,23 @@ struct sge_fl { struct mp_ring; +struct txpkts { + uint8_t wr_type; /* type 0 or type 1 */ + uint8_t npkt; /* # of packets in this work request */ + uint8_t len16; /* # of 16B pieces used by this work request */ + uint8_t score; /* 1-10. coalescing attempted if score > 3 */ + uint8_t max_npkt; /* maximum number of packets allowed */ + uint16_t plen; /* total payload (sum of all packets) */ + + /* straight from fw_eth_tx_pkts_vm_wr. */ + __u8 ethmacdst[6]; + __u8 ethmacsrc[6]; + __be16 ethtype; + __be16 vlantci; + + struct mbuf *mb[15]; +}; + /* txq: SGE egress queue + what's needed for Ethernet NIC */ struct sge_txq { struct sge_eq eq; /* MUST be first */ @@ -560,6 +577,7 @@ struct sge_txq { struct sglist *gl; __be32 cpl_ctrl0; /* for convenience */ int tc_idx; /* traffic class */ + struct txpkts txp; struct task tx_reclaim_task; /* stats for common events first */ Modified: head/sys/dev/cxgbe/common/common.h ============================================================================== --- head/sys/dev/cxgbe/common/common.h Fri Jul 3 02:02:34 2020 (r362904) +++ head/sys/dev/cxgbe/common/common.h Fri Jul 3 04:44:23 2020 (r362905) @@ -389,6 +389,7 @@ struct adapter_params { bool ulptx_memwrite_dsgl; /* use of T5 DSGL allowed */ bool fr_nsmr_tpte_wr_support; /* FW support for FR_NSMR_TPTE_WR */ bool viid_smt_extn_support; /* FW returns vin, vfvld & smt index? */ + unsigned int max_pkts_per_eth_tx_pkts_wr; }; #define CHELSIO_T4 0x4 Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Fri Jul 3 02:02:34 2020 (r362904) +++ head/sys/dev/cxgbe/t4_main.c Fri Jul 3 04:44:23 2020 (r362905) @@ -2191,7 +2191,7 @@ cxgbe_transmit(struct ifnet *ifp, struct mbuf *m) vi->rsrv_noflowq); items[0] = m; - rc = mp_ring_enqueue(txq->r, items, 1, 4096); + rc = mp_ring_enqueue(txq->r, items, 1, 256); if (__predict_false(rc != 0)) m_freem(m); @@ -2212,7 +2212,7 @@ cxgbe_qflush(struct ifnet *ifp) txq->eq.flags |= EQ_QFLUSH; TXQ_UNLOCK(txq); while (!mp_ring_is_idle(txq->r)) { - mp_ring_check_drainage(txq->r, 0); + mp_ring_check_drainage(txq->r, 4096); pause("qflush", 1); } TXQ_LOCK(txq); @@ -2261,7 +2261,7 @@ vi_get_counter(struct ifnet *ifp, ift_counter c) struct sge_txq *txq; for_each_txq(vi, i, txq) - drops += counter_u64_fetch(txq->r->drops); + drops += counter_u64_fetch(txq->r->dropped); } return (drops); @@ -2326,7 +2326,7 @@ cxgbe_get_counter(struct ifnet *ifp, ift_counter c) struct sge_txq *txq; for_each_txq(vi, i, txq) - drops += counter_u64_fetch(txq->r->drops); + drops += counter_u64_fetch(txq->r->dropped); } return (drops); @@ -4457,6 +4457,13 @@ get_params__post_init(struct adapter *sc) else sc->params.fr_nsmr_tpte_wr_support = false; + param[0] = FW_PARAM_PFVF(MAX_PKTS_PER_ETH_TX_PKTS_WR); + rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 1, param, val); + if (rc == 0) + sc->params.max_pkts_per_eth_tx_pkts_wr = val[0]; + else + sc->params.max_pkts_per_eth_tx_pkts_wr = 15; + /* get capabilites */ bzero(&caps, sizeof(caps)); caps.op_to_write = htobe32(V_FW_CMD_OP(FW_CAPS_CONFIG_CMD) | @@ -5965,7 +5972,7 @@ quiesce_txq(struct adapter *sc, struct sge_txq *txq) /* Wait for the mp_ring to empty. */ while (!mp_ring_is_idle(txq->r)) { - mp_ring_check_drainage(txq->r, 0); + mp_ring_check_drainage(txq->r, 4096); pause("rquiesce", 1); } Modified: head/sys/dev/cxgbe/t4_mp_ring.c ============================================================================== --- head/sys/dev/cxgbe/t4_mp_ring.c Fri Jul 3 02:02:34 2020 (r362904) +++ head/sys/dev/cxgbe/t4_mp_ring.c Fri Jul 3 04:44:23 2020 (r362905) @@ -34,6 +34,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include "t4_mp_ring.h" @@ -43,6 +45,23 @@ __FBSDID("$FreeBSD$"); #define atomic_cmpset_rel_64 atomic_cmpset_64 #endif +/* + * mp_ring handles multiple threads (producers) enqueueing data to a tx queue. + * The thread that is writing the hardware descriptors is the consumer and it + * runs with the consumer lock held. A producer becomes the consumer if there + * isn't one already. The consumer runs with the flags sets to BUSY and + * consumes everything (IDLE or COALESCING) or gets STALLED. If it is running + * over its budget it sets flags to TOO_BUSY. A producer that observes a + * TOO_BUSY consumer will become the new consumer by setting flags to + * TAKING_OVER. The original consumer stops and sets the flags back to BUSY for + * the new consumer. + * + * COALESCING is the same as IDLE except there are items being held in the hope + * that they can be coalesced with items that follow. The driver must arrange + * for a tx update or some other event that transmits all the held items in a + * timely manner if nothing else is enqueued. + */ + union ring_state { struct { uint16_t pidx_head; @@ -54,13 +73,21 @@ union ring_state { }; enum { - IDLE = 0, /* consumer ran to completion, nothing more to do. */ + IDLE = 0, /* tx is all caught up, nothing to do. */ + COALESCING, /* IDLE, but tx frames are being held for coalescing */ BUSY, /* consumer is running already, or will be shortly. */ + TOO_BUSY, /* consumer is running and is beyond its budget */ + TAKING_OVER, /* new consumer taking over from a TOO_BUSY consumer */ STALLED, /* consumer stopped due to lack of resources. */ - ABDICATED, /* consumer stopped even though there was work to be - done because it wants another thread to take over. */ }; +enum { + C_FAST = 0, + C_2, + C_3, + C_TAKEOVER, +}; + static inline uint16_t space_available(struct mp_ring *r, union ring_state s) { @@ -83,93 +110,104 @@ increment_idx(struct mp_ring *r, uint16_t idx, uint16_ return (x > n ? idx + n : n - x); } -/* Consumer is about to update the ring's state to s */ -static inline uint16_t -state_to_flags(union ring_state s, int abdicate) -{ - - if (s.cidx == s.pidx_tail) - return (IDLE); - else if (abdicate && s.pidx_tail != s.pidx_head) - return (ABDICATED); - - return (BUSY); -} - /* - * Caller passes in a state, with a guarantee that there is work to do and that - * all items up to the pidx_tail in the state are visible. + * Consumer. Called with the consumer lock held and a guarantee that there is + * work to do. */ static void -drain_ring(struct mp_ring *r, union ring_state os, uint16_t prev, int budget) +drain_ring(struct mp_ring *r, int budget) { - union ring_state ns; + union ring_state os, ns; int n, pending, total; - uint16_t cidx = os.cidx; - uint16_t pidx = os.pidx_tail; + uint16_t cidx; + uint16_t pidx; + bool coalescing; + mtx_assert(r->cons_lock, MA_OWNED); + + os.state = atomic_load_acq_64(&r->state); MPASS(os.flags == BUSY); + + cidx = os.cidx; + pidx = os.pidx_tail; MPASS(cidx != pidx); - if (prev == IDLE) - counter_u64_add(r->starts, 1); pending = 0; total = 0; while (cidx != pidx) { /* Items from cidx to pidx are available for consumption. */ - n = r->drain(r, cidx, pidx); + n = r->drain(r, cidx, pidx, &coalescing); if (n == 0) { critical_enter(); - os.state = r->state; + os.state = atomic_load_64(&r->state); do { ns.state = os.state; ns.cidx = cidx; - ns.flags = STALLED; + + MPASS(os.flags == BUSY || + os.flags == TOO_BUSY || + os.flags == TAKING_OVER); + + if (os.flags == TAKING_OVER) + ns.flags = BUSY; + else + ns.flags = STALLED; } while (atomic_fcmpset_64(&r->state, &os.state, ns.state) == 0); critical_exit(); - if (prev != STALLED) + if (os.flags == TAKING_OVER) + counter_u64_add(r->abdications, 1); + else if (ns.flags == STALLED) counter_u64_add(r->stalls, 1); - else if (total > 0) { - counter_u64_add(r->restarts, 1); - counter_u64_add(r->stalls, 1); - } break; } cidx = increment_idx(r, cidx, n); pending += n; total += n; + counter_u64_add(r->consumed, n); - /* - * We update the cidx only if we've caught up with the pidx, the - * real cidx is getting too far ahead of the one visible to - * everyone else, or we have exceeded our budget. - */ - if (cidx != pidx && pending < 64 && total < budget) - continue; - critical_enter(); - os.state = r->state; + os.state = atomic_load_64(&r->state); do { + MPASS(os.flags == BUSY || os.flags == TOO_BUSY || + os.flags == TAKING_OVER); + ns.state = os.state; ns.cidx = cidx; - ns.flags = state_to_flags(ns, total >= budget); + if (__predict_false(os.flags == TAKING_OVER)) { + MPASS(total >= budget); + ns.flags = BUSY; + continue; + } + if (cidx == os.pidx_tail) { + ns.flags = coalescing ? COALESCING : IDLE; + continue; + } + if (total >= budget) { + ns.flags = TOO_BUSY; + continue; + } + MPASS(os.flags == BUSY); + if (pending < 32) + break; } while (atomic_fcmpset_acq_64(&r->state, &os.state, ns.state) == 0); - critical_exit(); - if (ns.flags == ABDICATED) + if (__predict_false(os.flags == TAKING_OVER)) { + MPASS(ns.flags == BUSY); counter_u64_add(r->abdications, 1); - if (ns.flags != BUSY) { - /* Wrong loop exit if we're going to stall. */ - MPASS(ns.flags != STALLED); - if (prev == STALLED) { - MPASS(total > 0); - counter_u64_add(r->restarts, 1); - } break; } + if (ns.flags == IDLE || ns.flags == COALESCING) { + MPASS(ns.pidx_tail == cidx); + if (ns.pidx_head != ns.pidx_tail) + counter_u64_add(r->cons_idle2, 1); + else + counter_u64_add(r->cons_idle, 1); + break; + } + /* * The acquire style atomic above guarantees visibility of items * associated with any pidx change that we notice here. @@ -177,13 +215,55 @@ drain_ring(struct mp_ring *r, union ring_state os, uin pidx = ns.pidx_tail; pending = 0; } + +#ifdef INVARIANTS + if (os.flags == TAKING_OVER) + MPASS(ns.flags == BUSY); + else { + MPASS(ns.flags == IDLE || ns.flags == COALESCING || + ns.flags == STALLED); + } +#endif } +static void +drain_txpkts(struct mp_ring *r, union ring_state os, int budget) +{ + union ring_state ns; + uint16_t cidx = os.cidx; + uint16_t pidx = os.pidx_tail; + bool coalescing; + + mtx_assert(r->cons_lock, MA_OWNED); + MPASS(os.flags == BUSY); + MPASS(cidx == pidx); + + r->drain(r, cidx, pidx, &coalescing); + MPASS(coalescing == false); + critical_enter(); + os.state = atomic_load_64(&r->state); + do { + ns.state = os.state; + MPASS(os.flags == BUSY); + MPASS(os.cidx == cidx); + if (ns.cidx == ns.pidx_tail) + ns.flags = IDLE; + else + ns.flags = BUSY; + } while (atomic_fcmpset_acq_64(&r->state, &os.state, ns.state) == 0); + critical_exit(); + + if (ns.flags == BUSY) + drain_ring(r, budget); +} + int mp_ring_alloc(struct mp_ring **pr, int size, void *cookie, ring_drain_t drain, - ring_can_drain_t can_drain, struct malloc_type *mt, int flags) + ring_can_drain_t can_drain, struct malloc_type *mt, struct mtx *lck, + int flags) { struct mp_ring *r; + int i; /* All idx are 16b so size can be 65536 at most */ if (pr == NULL || size < 2 || size > 65536 || drain == NULL || @@ -201,43 +281,59 @@ mp_ring_alloc(struct mp_ring **pr, int size, void *coo r->mt = mt; r->drain = drain; r->can_drain = can_drain; - r->enqueues = counter_u64_alloc(flags); - r->drops = counter_u64_alloc(flags); - r->starts = counter_u64_alloc(flags); - r->stalls = counter_u64_alloc(flags); - r->restarts = counter_u64_alloc(flags); - r->abdications = counter_u64_alloc(flags); - if (r->enqueues == NULL || r->drops == NULL || r->starts == NULL || - r->stalls == NULL || r->restarts == NULL || - r->abdications == NULL) { - mp_ring_free(r); - return (ENOMEM); + r->cons_lock = lck; + if ((r->dropped = counter_u64_alloc(flags)) == NULL) + goto failed; + for (i = 0; i < nitems(r->consumer); i++) { + if ((r->consumer[i] = counter_u64_alloc(flags)) == NULL) + goto failed; } - + if ((r->not_consumer = counter_u64_alloc(flags)) == NULL) + goto failed; + if ((r->abdications = counter_u64_alloc(flags)) == NULL) + goto failed; + if ((r->stalls = counter_u64_alloc(flags)) == NULL) + goto failed; + if ((r->consumed = counter_u64_alloc(flags)) == NULL) + goto failed; + if ((r->cons_idle = counter_u64_alloc(flags)) == NULL) + goto failed; + if ((r->cons_idle2 = counter_u64_alloc(flags)) == NULL) + goto failed; *pr = r; return (0); +failed: + mp_ring_free(r); + return (ENOMEM); } void mp_ring_free(struct mp_ring *r) { + int i; if (r == NULL) return; - if (r->enqueues != NULL) - counter_u64_free(r->enqueues); - if (r->drops != NULL) - counter_u64_free(r->drops); - if (r->starts != NULL) - counter_u64_free(r->starts); - if (r->stalls != NULL) - counter_u64_free(r->stalls); - if (r->restarts != NULL) - counter_u64_free(r->restarts); + if (r->dropped != NULL) + counter_u64_free(r->dropped); + for (i = 0; i < nitems(r->consumer); i++) { + if (r->consumer[i] != NULL) + counter_u64_free(r->consumer[i]); + } + if (r->not_consumer != NULL) + counter_u64_free(r->not_consumer); if (r->abdications != NULL) counter_u64_free(r->abdications); + if (r->stalls != NULL) + counter_u64_free(r->stalls); + if (r->consumed != NULL) + counter_u64_free(r->consumed); + if (r->cons_idle != NULL) + counter_u64_free(r->cons_idle); + if (r->cons_idle2 != NULL) + counter_u64_free(r->cons_idle2); free(r, r->mt); } @@ -252,7 +348,8 @@ mp_ring_enqueue(struct mp_ring *r, void **items, int n { union ring_state os, ns; uint16_t pidx_start, pidx_stop; - int i; + int i, nospc, cons; + bool consumer; MPASS(items != NULL); MPASS(n > 0); @@ -261,26 +358,70 @@ mp_ring_enqueue(struct mp_ring *r, void **items, int n * Reserve room for the new items. Our reservation, if successful, is * from 'pidx_start' to 'pidx_stop'. */ - os.state = r->state; + nospc = 0; + os.state = atomic_load_64(&r->state); for (;;) { - if (n >= space_available(r, os)) { - counter_u64_add(r->drops, n); + for (;;) { + if (__predict_true(space_available(r, os) >= n)) + break; + + /* Not enough room in the ring. */ + MPASS(os.flags != IDLE); + MPASS(os.flags != COALESCING); + if (__predict_false(++nospc > 100)) { + counter_u64_add(r->dropped, n); + return (ENOBUFS); + } if (os.flags == STALLED) - mp_ring_check_drainage(r, 0); - return (ENOBUFS); + mp_ring_check_drainage(r, 64); + else + cpu_spinwait(); + os.state = atomic_load_64(&r->state); } + + /* There is room in the ring. */ + + cons = -1; ns.state = os.state; ns.pidx_head = increment_idx(r, os.pidx_head, n); + if (os.flags == IDLE || os.flags == COALESCING) { + MPASS(os.pidx_tail == os.cidx); + if (os.pidx_head == os.pidx_tail) { + cons = C_FAST; + ns.pidx_tail = increment_idx(r, os.pidx_tail, n); + } else + cons = C_2; + ns.flags = BUSY; + } else if (os.flags == TOO_BUSY) { + cons = C_TAKEOVER; + ns.flags = TAKING_OVER; + } critical_enter(); if (atomic_fcmpset_64(&r->state, &os.state, ns.state)) break; critical_exit(); cpu_spinwait(); - } + }; + pidx_start = os.pidx_head; pidx_stop = ns.pidx_head; + if (cons == C_FAST) { + i = pidx_start; + do { + r->items[i] = *items++; + if (__predict_false(++i == r->size)) + i = 0; + } while (i != pidx_stop); + critical_exit(); + counter_u64_add(r->consumer[C_FAST], 1); + mtx_lock(r->cons_lock); + drain_ring(r, budget); + mtx_unlock(r->cons_lock); + return (0); + } + /* * Wait for other producers who got in ahead of us to enqueue their * items, one producer at a time. It is our turn when the ring's @@ -288,7 +429,7 @@ mp_ring_enqueue(struct mp_ring *r, void **items, int n */ while (ns.pidx_tail != pidx_start) { cpu_spinwait(); - ns.state = r->state; + ns.state = atomic_load_64(&r->state); } /* Now it is our turn to fill up the area we reserved earlier. */ @@ -303,21 +444,33 @@ mp_ring_enqueue(struct mp_ring *r, void **items, int n * Update the ring's pidx_tail. The release style atomic guarantees * that the items are visible to any thread that sees the updated pidx. */ - os.state = r->state; + os.state = atomic_load_64(&r->state); do { + consumer = false; ns.state = os.state; ns.pidx_tail = pidx_stop; - ns.flags = BUSY; + if (os.flags == IDLE || os.flags == COALESCING || + (os.flags == STALLED && r->can_drain(r))) { + MPASS(cons == -1); + consumer = true; + ns.flags = BUSY; + } } while (atomic_fcmpset_rel_64(&r->state, &os.state, ns.state) == 0); critical_exit(); - counter_u64_add(r->enqueues, n); - /* - * Turn into a consumer if some other thread isn't active as a consumer - * already. - */ - if (os.flags != BUSY) - drain_ring(r, ns, os.flags, budget); + if (cons == -1) { + if (consumer) + cons = C_3; + else { + counter_u64_add(r->not_consumer, 1); + return (0); + } + } + MPASS(cons > C_FAST && cons < nitems(r->consumer)); + counter_u64_add(r->consumer[cons], 1); + mtx_lock(r->cons_lock); + drain_ring(r, budget); + mtx_unlock(r->cons_lock); return (0); } @@ -327,46 +480,96 @@ mp_ring_check_drainage(struct mp_ring *r, int budget) { union ring_state os, ns; - os.state = r->state; - if (os.flags != STALLED || os.pidx_head != os.pidx_tail || - r->can_drain(r) == 0) - return; - - MPASS(os.cidx != os.pidx_tail); /* implied by STALLED */ - ns.state = os.state; - ns.flags = BUSY; - - /* - * The acquire style atomic guarantees visibility of items associated - * with the pidx that we read here. - */ - if (!atomic_cmpset_acq_64(&r->state, os.state, ns.state)) - return; - - drain_ring(r, ns, os.flags, budget); + os.state = atomic_load_64(&r->state); + if (os.flags == STALLED && r->can_drain(r)) { + MPASS(os.cidx != os.pidx_tail); /* implied by STALLED */ + ns.state = os.state; + ns.flags = BUSY; + if (atomic_cmpset_acq_64(&r->state, os.state, ns.state)) { + mtx_lock(r->cons_lock); + drain_ring(r, budget); + mtx_unlock(r->cons_lock); + } + } else if (os.flags == COALESCING) { + MPASS(os.cidx == os.pidx_tail); + ns.state = os.state; + ns.flags = BUSY; + if (atomic_cmpset_acq_64(&r->state, os.state, ns.state)) { + mtx_lock(r->cons_lock); + drain_txpkts(r, ns, budget); + mtx_unlock(r->cons_lock); + } + } } void mp_ring_reset_stats(struct mp_ring *r) { + int i; - counter_u64_zero(r->enqueues); - counter_u64_zero(r->drops); - counter_u64_zero(r->starts); - counter_u64_zero(r->stalls); - counter_u64_zero(r->restarts); + counter_u64_zero(r->dropped); + for (i = 0; i < nitems(r->consumer); i++) + counter_u64_zero(r->consumer[i]); + counter_u64_zero(r->not_consumer); counter_u64_zero(r->abdications); + counter_u64_zero(r->stalls); + counter_u64_zero(r->consumed); + counter_u64_zero(r->cons_idle); + counter_u64_zero(r->cons_idle2); } -int +bool mp_ring_is_idle(struct mp_ring *r) { union ring_state s; - s.state = r->state; + s.state = atomic_load_64(&r->state); if (s.pidx_head == s.pidx_tail && s.pidx_tail == s.cidx && s.flags == IDLE) - return (1); + return (true); - return (0); + return (false); +} + +void +mp_ring_sysctls(struct mp_ring *r, struct sysctl_ctx_list *ctx, + struct sysctl_oid_list *children) +{ + struct sysctl_oid *oid; + + oid = SYSCTL_ADD_NODE(ctx, children, OID_AUTO, "mp_ring", CTLFLAG_RD | + CTLFLAG_MPSAFE, NULL, "mp_ring statistics"); + children = SYSCTL_CHILDREN(oid); + + SYSCTL_ADD_U64(ctx, children, OID_AUTO, "state", CTLFLAG_RD, + __DEVOLATILE(uint64_t *, &r->state), 0, "ring state"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "dropped", CTLFLAG_RD, + &r->dropped, "# of items dropped"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "consumed", + CTLFLAG_RD, &r->consumed, "# of items consumed"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "fast_consumer", + CTLFLAG_RD, &r->consumer[C_FAST], + "# of times producer became consumer (fast)"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "consumer2", + CTLFLAG_RD, &r->consumer[C_2], + "# of times producer became consumer (2)"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "consumer3", + CTLFLAG_RD, &r->consumer[C_3], + "# of times producer became consumer (3)"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "takeovers", + CTLFLAG_RD, &r->consumer[C_TAKEOVER], + "# of times producer took over from another consumer."); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "not_consumer", + CTLFLAG_RD, &r->not_consumer, + "# of times producer did not become consumer"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "abdications", + CTLFLAG_RD, &r->abdications, "# of consumer abdications"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "stalls", + CTLFLAG_RD, &r->stalls, "# of consumer stalls"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "cons_idle", + CTLFLAG_RD, &r->cons_idle, + "# of times consumer ran fully to completion"); + SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "cons_idle2", + CTLFLAG_RD, &r->cons_idle2, + "# of times consumer idled when another enqueue was in progress"); } Modified: head/sys/dev/cxgbe/t4_mp_ring.h ============================================================================== --- head/sys/dev/cxgbe/t4_mp_ring.h Fri Jul 3 02:02:34 2020 (r362904) +++ head/sys/dev/cxgbe/t4_mp_ring.h Fri Jul 3 04:44:23 2020 (r362905) @@ -36,33 +36,38 @@ #endif struct mp_ring; -typedef u_int (*ring_drain_t)(struct mp_ring *, u_int, u_int); +typedef u_int (*ring_drain_t)(struct mp_ring *, u_int, u_int, bool *); typedef u_int (*ring_can_drain_t)(struct mp_ring *); struct mp_ring { volatile uint64_t state __aligned(CACHE_LINE_SIZE); + struct malloc_type * mt; int size __aligned(CACHE_LINE_SIZE); void * cookie; - struct malloc_type * mt; ring_drain_t drain; ring_can_drain_t can_drain; /* cheap, may be unreliable */ - counter_u64_t enqueues; - counter_u64_t drops; - counter_u64_t starts; - counter_u64_t stalls; - counter_u64_t restarts; /* recovered after stalling */ + struct mtx * cons_lock; + counter_u64_t dropped; + counter_u64_t consumer[4]; + counter_u64_t not_consumer; counter_u64_t abdications; + counter_u64_t consumed; + counter_u64_t cons_idle; + counter_u64_t cons_idle2; + counter_u64_t stalls; void * volatile items[] __aligned(CACHE_LINE_SIZE); }; int mp_ring_alloc(struct mp_ring **, int, void *, ring_drain_t, - ring_can_drain_t, struct malloc_type *, int); + ring_can_drain_t, struct malloc_type *, struct mtx *, int); void mp_ring_free(struct mp_ring *); int mp_ring_enqueue(struct mp_ring *, void **, int, int); void mp_ring_check_drainage(struct mp_ring *, int); void mp_ring_reset_stats(struct mp_ring *); -int mp_ring_is_idle(struct mp_ring *); +bool mp_ring_is_idle(struct mp_ring *); +void mp_ring_sysctls(struct mp_ring *, struct sysctl_ctx_list *, + struct sysctl_oid_list *); #endif Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Fri Jul 3 02:02:34 2020 (r362904) +++ head/sys/dev/cxgbe/t4_sge.c Fri Jul 3 04:44:23 2020 (r362905) @@ -203,19 +203,6 @@ static int lro_mbufs = 0; SYSCTL_INT(_hw_cxgbe, OID_AUTO, lro_mbufs, CTLFLAG_RDTUN, &lro_mbufs, 0, "Enable presorting of LRO frames"); -struct txpkts { - u_int wr_type; /* type 0 or type 1 */ - u_int npkt; /* # of packets in this work request */ - u_int plen; /* total payload (sum of all packets) */ - u_int len16; /* # of 16B pieces used by this work request */ -}; - -/* A packet's SGL. This + m_pkthdr has all info needed for tx */ -struct sgl { - struct sglist sg; - struct sglist_seg seg[TX_SGL_SEGS]; -}; - static int service_iq(struct sge_iq *, int); static int service_iq_fl(struct sge_iq *, int); static struct mbuf *get_fl_payload(struct adapter *, struct sge_fl *, uint32_t); @@ -284,14 +271,16 @@ static inline u_int txpkt_vm_len16(u_int, u_int); static inline u_int txpkts0_len16(u_int); static inline u_int txpkts1_len16(void); static u_int write_raw_wr(struct sge_txq *, void *, struct mbuf *, u_int); -static u_int write_txpkt_wr(struct adapter *, struct sge_txq *, - struct fw_eth_tx_pkt_wr *, struct mbuf *, u_int); +static u_int write_txpkt_wr(struct adapter *, struct sge_txq *, struct mbuf *, + u_int); static u_int write_txpkt_vm_wr(struct adapter *, struct sge_txq *, - struct fw_eth_tx_pkt_vm_wr *, struct mbuf *, u_int); -static int try_txpkts(struct mbuf *, struct mbuf *, struct txpkts *, u_int); -static int add_to_txpkts(struct mbuf *, struct txpkts *, u_int); -static u_int write_txpkts_wr(struct adapter *, struct sge_txq *, - struct fw_eth_tx_pkts_wr *, struct mbuf *, const struct txpkts *, u_int); + struct mbuf *); +static int add_to_txpkts_vf(struct adapter *, struct sge_txq *, struct mbuf *, + int, bool *); +static int add_to_txpkts_pf(struct adapter *, struct sge_txq *, struct mbuf *, + int, bool *); +static u_int write_txpkts_wr(struct adapter *, struct sge_txq *); +static u_int write_txpkts_vm_wr(struct adapter *, struct sge_txq *); static void write_gl_to_txd(struct sge_txq *, struct mbuf *, caddr_t *, int); static inline void copy_to_txd(struct sge_eq *, caddr_t, caddr_t *, int); static inline void ring_eq_db(struct adapter *, struct sge_eq *, u_int); @@ -2839,7 +2828,7 @@ can_resume_eth_tx(struct mp_ring *r) return (total_available_tx_desc(eq) > eq->sidx / 8); } -static inline int +static inline bool cannot_use_txpkts(struct mbuf *m) { /* maybe put a GL limit too, to avoid silliness? */ @@ -2855,8 +2844,9 @@ discard_tx(struct sge_eq *eq) } static inline int -wr_can_update_eq(struct fw_eth_tx_pkts_wr *wr) +wr_can_update_eq(void *p) { + struct fw_eth_tx_pkts_wr *wr = p; switch (G_FW_WR_OP(be32toh(wr->op_pkd))) { case FW_ULPTX_WR: @@ -2864,159 +2854,232 @@ wr_can_update_eq(struct fw_eth_tx_pkts_wr *wr) case FW_ETH_TX_PKTS_WR: case FW_ETH_TX_PKTS2_WR: case FW_ETH_TX_PKT_VM_WR: + case FW_ETH_TX_PKTS_VM_WR: return (1); default: return (0); } } +static inline void +set_txupdate_flags(struct sge_txq *txq, u_int avail, + struct fw_eth_tx_pkt_wr *wr) +{ + struct sge_eq *eq = &txq->eq; + struct txpkts *txp = &txq->txp; + + if ((txp->npkt > 0 || avail < eq->sidx / 2) && + atomic_cmpset_int(&eq->equiq, 0, 1)) { + wr->equiq_to_len16 |= htobe32(F_FW_WR_EQUEQ | F_FW_WR_EQUIQ); + eq->equeqidx = eq->pidx; + } else if (IDXDIFF(eq->pidx, eq->equeqidx, eq->sidx) >= 32) { + wr->equiq_to_len16 |= htobe32(F_FW_WR_EQUEQ); + eq->equeqidx = eq->pidx; + } +} + /* * r->items[cidx] to r->items[pidx], with a wraparound at r->size, are ready to * be consumed. Return the actual number consumed. 0 indicates a stall. */ static u_int -eth_tx(struct mp_ring *r, u_int cidx, u_int pidx) +eth_tx(struct mp_ring *r, u_int cidx, u_int pidx, bool *coalescing) { struct sge_txq *txq = r->cookie; - struct sge_eq *eq = &txq->eq; struct ifnet *ifp = txq->ifp; + struct sge_eq *eq = &txq->eq; + struct txpkts *txp = &txq->txp; struct vi_info *vi = ifp->if_softc; struct adapter *sc = vi->adapter; u_int total, remaining; /* # of packets */ - u_int available, dbdiff; /* # of hardware descriptors */ - u_int n, next_cidx; - struct mbuf *m0, *tail; - struct txpkts txp; - struct fw_eth_tx_pkts_wr *wr; /* any fw WR struct will do */ + u_int n, avail, dbdiff; /* # of hardware descriptors */ + int i, rc; + struct mbuf *m0; + bool snd; + void *wr; /* start of the last WR written to the ring */ - remaining = IDXDIFF(pidx, cidx, r->size); - MPASS(remaining > 0); /* Must not be called without work to do. */ - total = 0; + TXQ_LOCK_ASSERT_OWNED(txq); - TXQ_LOCK(txq); + remaining = IDXDIFF(pidx, cidx, r->size); if (__predict_false(discard_tx(eq))) { + for (i = 0; i < txp->npkt; i++) + m_freem(txp->mb[i]); + txp->npkt = 0; while (cidx != pidx) { m0 = r->items[cidx]; m_freem(m0); if (++cidx == r->size) cidx = 0; } - reclaim_tx_descs(txq, 2048); - total = remaining; - goto done; + reclaim_tx_descs(txq, eq->sidx); + *coalescing = false; + return (remaining); /* emptied */ } /* How many hardware descriptors do we have readily available. */ - if (eq->pidx == eq->cidx) - available = eq->sidx - 1; - else - available = IDXDIFF(eq->cidx, eq->pidx, eq->sidx) - 1; - dbdiff = IDXDIFF(eq->pidx, eq->dbidx, eq->sidx); + if (eq->pidx == eq->cidx) { + avail = eq->sidx - 1; + if (txp->score++ >= 5) + txp->score = 5; /* tx is completely idle, reset. */ + } else + avail = IDXDIFF(eq->cidx, eq->pidx, eq->sidx) - 1; - while (remaining > 0) { + total = 0; + if (remaining == 0) { + if (txp->score-- == 1) /* egr_update had to drain txpkts */ + txp->score = 1; + goto send_txpkts; + } + dbdiff = 0; + MPASS(remaining > 0); + while (remaining > 0) { m0 = r->items[cidx]; M_ASSERTPKTHDR(m0); MPASS(m0->m_nextpkt == NULL); - if (available < tx_len16_to_desc(mbuf_len16(m0))) { - available += reclaim_tx_descs(txq, 64); - if (available < tx_len16_to_desc(mbuf_len16(m0))) - break; /* out of descriptors */ + if (avail < 2 * SGE_MAX_WR_NDESC) + avail += reclaim_tx_descs(txq, 64); + + if (txp->npkt > 0 || remaining > 1 || txp->score > 3 || + atomic_load_int(&txq->eq.equiq) != 0) { + if (sc->flags & IS_VF) + rc = add_to_txpkts_vf(sc, txq, m0, avail, &snd); + else + rc = add_to_txpkts_pf(sc, txq, m0, avail, &snd); + } else { + snd = false; + rc = EINVAL; } + if (snd) { + MPASS(txp->npkt > 0); + for (i = 0; i < txp->npkt; i++) + ETHER_BPF_MTAP(ifp, txp->mb[i]); + if (txp->npkt > 1) { + if (txp->score++ >= 10) + txp->score = 10; + MPASS(avail >= tx_len16_to_desc(txp->len16)); + if (sc->flags & IS_VF) + n = write_txpkts_vm_wr(sc, txq); + else + n = write_txpkts_wr(sc, txq); + } else { + MPASS(avail >= + tx_len16_to_desc(mbuf_len16(txp->mb[0]))); + if (sc->flags & IS_VF) + n = write_txpkt_vm_wr(sc, txq, + txp->mb[0]); + else + n = write_txpkt_wr(sc, txq, txp->mb[0], + avail); + } + MPASS(n <= SGE_MAX_WR_NDESC); + avail -= n; + dbdiff += n; + wr = &eq->desc[eq->pidx]; + IDXINCR(eq->pidx, n, eq->sidx); + txp->npkt = 0; /* emptied */ + } + if (rc == 0) { + /* m0 was coalesced into txq->txpkts. */ + goto next_mbuf; + } + if (rc == EAGAIN) { + /* + * m0 is suitable for tx coalescing but could not be + * combined with the existing txq->txpkts, which has now + * been transmitted. Start a new txpkts with m0. + */ + MPASS(snd); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Jul 3 05:21:06 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 74EC2369C5B; Fri, 3 Jul 2020 05:21:06 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49yjwy29gwz3TtS; Fri, 3 Jul 2020 05:21:06 +0000 (UTC) (envelope-from rmacklem@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 2F4A12698A; Fri, 3 Jul 2020 05:21:06 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0635L6dx090312; Fri, 3 Jul 2020 05:21:06 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0635L67u090311; Fri, 3 Jul 2020 05:21:06 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202007030521.0635L67u090311@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Fri, 3 Jul 2020 05:21:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362906 - head/sys/fs/nfs X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/sys/fs/nfs X-SVN-Commit-Revision: 362906 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jul 2020 05:21:06 -0000 Author: rmacklem Date: Fri Jul 3 05:21:05 2020 New Revision: 362906 URL: https://svnweb.freebsd.org/changeset/base/362906 Log: Fix build breakage caused by r362903. Only pmap.h is needed now, but vm_page.h and vm_pageout.h is needed later, so put them in now. Pointy hat goes on me. Modified: head/sys/fs/nfs/nfsport.h Modified: head/sys/fs/nfs/nfsport.h ============================================================================== --- head/sys/fs/nfs/nfsport.h Fri Jul 3 04:44:23 2020 (r362905) +++ head/sys/fs/nfs/nfsport.h Fri Jul 3 05:21:05 2020 (r362906) @@ -109,8 +109,11 @@ #include #include #include +#include #include #include +#include +#include #include #include #include "opt_nfs.h" From owner-svn-src-all@freebsd.org Fri Jul 3 07:22:34 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EA41436CD11; Fri, 3 Jul 2020 07:22:34 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49ymd65tyFz3d4R; Fri, 3 Jul 2020 07:22:34 +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 AE6D527F74; Fri, 3 Jul 2020 07:22:34 +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 0637MY1F071054; Fri, 3 Jul 2020 07:22:34 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0637MYor071053; Fri, 3 Jul 2020 07:22:34 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202007030722.0637MYor071053@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 3 Jul 2020 07:22:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362907 - stable/12/crypto/openssh X-SVN-Group: stable-12 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/12/crypto/openssh X-SVN-Commit-Revision: 362907 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jul 2020 07:22:35 -0000 Author: delphij Date: Fri Jul 3 07:22:34 2020 New Revision: 362907 URL: https://svnweb.freebsd.org/changeset/base/362907 Log: MFC r362642: Don't log normal login_getpwclass(3) result. Modified: stable/12/crypto/openssh/auth2.c Directory Properties: stable/12/ (props changed) Modified: stable/12/crypto/openssh/auth2.c ============================================================================== --- stable/12/crypto/openssh/auth2.c Fri Jul 3 05:21:05 2020 (r362906) +++ stable/12/crypto/openssh/auth2.c Fri Jul 3 07:22:34 2020 (r362907) @@ -317,8 +317,6 @@ input_userauth_request(int type, u_int32_t seq, struct #ifdef HAVE_LOGIN_CAP if (authctxt->pw != NULL && (lc = PRIVSEP(login_getpwclass(authctxt->pw))) != NULL) { - logit("user %s login class %s", authctxt->pw->pw_name, - authctxt->pw->pw_class); from_host = auth_get_canonical_hostname(ssh, options.use_dns); from_ip = ssh_remote_ipaddr(ssh); if (!auth_hostok(lc, from_host, from_ip)) { From owner-svn-src-all@freebsd.org Fri Jul 3 07:25:27 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 77DB536C97D; Fri, 3 Jul 2020 07:25: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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49ymhR2BTnz3cxQ; Fri, 3 Jul 2020 07:25: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 291AB27A6B; Fri, 3 Jul 2020 07:25: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 0637PRd8071279; Fri, 3 Jul 2020 07:25:27 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0637PR23071278; Fri, 3 Jul 2020 07:25:27 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202007030725.0637PR23071278@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 3 Jul 2020 07:25:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362908 - stable/11/crypto/openssh X-SVN-Group: stable-11 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/11/crypto/openssh X-SVN-Commit-Revision: 362908 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jul 2020 07:25:27 -0000 Author: delphij Date: Fri Jul 3 07:25:26 2020 New Revision: 362908 URL: https://svnweb.freebsd.org/changeset/base/362908 Log: MFC r362642: Don't log normal login_getpwclass(3) result. Modified: stable/11/crypto/openssh/auth2.c Directory Properties: stable/11/ (props changed) Modified: stable/11/crypto/openssh/auth2.c ============================================================================== --- stable/11/crypto/openssh/auth2.c Fri Jul 3 07:22:34 2020 (r362907) +++ stable/11/crypto/openssh/auth2.c Fri Jul 3 07:25:26 2020 (r362908) @@ -276,8 +276,6 @@ input_userauth_request(int type, u_int32_t seq, void * #ifdef HAVE_LOGIN_CAP if (authctxt->pw != NULL && (lc = login_getpwclass(authctxt->pw)) != NULL) { - logit("user %s login class %s", authctxt->pw->pw_name, - authctxt->pw->pw_class); from_host = auth_get_canonical_hostname(ssh, options.use_dns); from_ip = ssh_remote_ipaddr(ssh); if (!auth_hostok(lc, from_host, from_ip)) { From owner-svn-src-all@freebsd.org Fri Jul 3 08:06:27 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B71336E068; Fri, 3 Jul 2020 08:06:27 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49ynbk728Rz3gYY; Fri, 3 Jul 2020 08:06:26 +0000 (UTC) (envelope-from melifaro@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 D11C68ACE; Fri, 3 Jul 2020 08:06:26 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06386QKs095692; Fri, 3 Jul 2020 08:06:26 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06386QS8095690; Fri, 3 Jul 2020 08:06:26 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <202007030806.06386QS8095690@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Fri, 3 Jul 2020 08:06:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362909 - in head: sys/netinet6 tests/sys/netinet6 X-SVN-Group: head X-SVN-Commit-Author: melifaro X-SVN-Commit-Paths: in head: sys/netinet6 tests/sys/netinet6 X-SVN-Commit-Revision: 362909 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jul 2020 08:06:27 -0000 Author: melifaro Date: Fri Jul 3 08:06:26 2020 New Revision: 362909 URL: https://svnweb.freebsd.org/changeset/base/362909 Log: Fix IPv6 regression introduced by r362900. PR: kern/247729 Modified: head/sys/netinet6/icmp6.c head/tests/sys/netinet6/redirect.sh Modified: head/sys/netinet6/icmp6.c ============================================================================== --- head/sys/netinet6/icmp6.c Fri Jul 3 07:25:26 2020 (r362908) +++ head/sys/netinet6/icmp6.c Fri Jul 3 08:06:26 2020 (r362909) @@ -2277,7 +2277,7 @@ icmp6_redirect_input(struct mbuf *m, int off) in6_splitscope(&reddst6, &kdst, &scopeid); NET_EPOCH_ASSERT(); nh = fib6_lookup(ifp->if_fib, &kdst, scopeid, 0, 0); - if (nh == NULL) { + if (nh != NULL) { struct in6_addr nh_addr; nh_addr = ifatoia6(nh->nh_ifa)->ia_addr.sin6_addr; if ((nh->nh_flags & NHF_GATEWAY) == 0) { Modified: head/tests/sys/netinet6/redirect.sh ============================================================================== --- head/tests/sys/netinet6/redirect.sh Fri Jul 3 07:25:26 2020 (r362908) +++ head/tests/sys/netinet6/redirect.sh Fri Jul 3 08:06:26 2020 (r362909) @@ -87,7 +87,15 @@ valid_redirect_body() { local_ll_mac=`jexec ${jname} ifconfig ${epair}b ether | awk '$1~/ether/{print$2}'` # wait for DAD to complete - sleep 2 + while [ `ifconfig ${epair}a inet6 | grep -c tentative` != "0" ]; do + sleep 0.1 + done + while [ `jexec ${jname}b ifconfig ${epair}b inet6 | grep -c tentative` != "0" ]; do + sleep 0.1 + done + + # enable ND debugging in the target jail to ease catching errors + jexec ${jname} sysctl net.inet6.icmp6.nd6_debug=1 # echo "LOCAL: ${local_ll_ip} ${local_ll_mac}" # echo "REMOTE: ${remote_rtr_ll_ip} ${remote_rtr_mac}" From owner-svn-src-all@freebsd.org Fri Jul 3 09:23:12 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4E04734890A; Fri, 3 Jul 2020 09:23:12 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49yqJJ1Khcz4340; Fri, 3 Jul 2020 09:23:12 +0000 (UTC) (envelope-from mjg@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 1109394EC; Fri, 3 Jul 2020 09:23:12 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0639NBVH044711; Fri, 3 Jul 2020 09:23:11 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0639NBoj044710; Fri, 3 Jul 2020 09:23:11 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202007030923.0639NBoj044710@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 3 Jul 2020 09:23:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362910 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 362910 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jul 2020 09:23:12 -0000 Author: mjg Date: Fri Jul 3 09:23:11 2020 New Revision: 362910 URL: https://svnweb.freebsd.org/changeset/base/362910 Log: ifdef out pg_jobc assertions added in r361967 They trigger for some people, the bug is not obvious, there are no takers for fixing it, the issue already had to be there for years beforehand and is low priority. Modified: head/sys/kern/kern_proc.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Fri Jul 3 08:06:26 2020 (r362909) +++ head/sys/kern/kern_proc.c Fri Jul 3 09:23:11 2020 (r362910) @@ -731,10 +731,14 @@ pgadjustjobc(struct pgrp *pgrp, int entering) PGRP_LOCK(pgrp); if (entering) { +#ifdef notyet MPASS(pgrp->pg_jobc >= 0); +#endif pgrp->pg_jobc++; } else { +#ifdef notyet MPASS(pgrp->pg_jobc > 0); +#endif --pgrp->pg_jobc; if (pgrp->pg_jobc == 0) orphanpg(pgrp); From owner-svn-src-all@freebsd.org Fri Jul 3 11:44:44 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3F66C34B3FE; Fri, 3 Jul 2020 11:44:44 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49ytRc0mPCz49gW; Fri, 3 Jul 2020 11:44:44 +0000 (UTC) (envelope-from kaktus@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 EEA7AB414; Fri, 3 Jul 2020 11:44:43 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 063Bihfa030641; Fri, 3 Jul 2020 11:44:43 GMT (envelope-from kaktus@FreeBSD.org) Received: (from kaktus@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 063BihPK030640; Fri, 3 Jul 2020 11:44:43 GMT (envelope-from kaktus@FreeBSD.org) Message-Id: <202007031144.063BihPK030640@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kaktus set sender to kaktus@FreeBSD.org using -f From: Pawel Biernacki Date: Fri, 3 Jul 2020 11:44:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362911 - stable/12/lib/libc/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: kaktus X-SVN-Commit-Paths: stable/12/lib/libc/sys X-SVN-Commit-Revision: 362911 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jul 2020 11:44:44 -0000 Author: kaktus Date: Fri Jul 3 11:44:43 2020 New Revision: 362911 URL: https://svnweb.freebsd.org/changeset/base/362911 Log: MFC r362611 man page of select(2) should mention pselect(2) Reviewed by: bcr (manpages), kib, trasz Approved by: kib (mentor) MFC after: 7 days Sponsored by: Mysterious Code Ltd. Modified: stable/12/lib/libc/sys/select.2 Directory Properties: stable/12/ (props changed) Modified: stable/12/lib/libc/sys/select.2 ============================================================================== --- stable/12/lib/libc/sys/select.2 Fri Jul 3 09:23:11 2020 (r362910) +++ stable/12/lib/libc/sys/select.2 Fri Jul 3 11:44:43 2020 (r362911) @@ -28,7 +28,7 @@ .\" @(#)select.2 8.2 (Berkeley) 3/25/94 .\" $FreeBSD$ .\" -.Dd November 17, 2002 +.Dd June 25, 2020 .Dt SELECT 2 .Os .Sh NAME @@ -172,6 +172,7 @@ was invalid. .Xr gettimeofday 2 , .Xr kqueue 2 , .Xr poll 2 , +.Xr pselect 2 , .Xr read 2 , .Xr recv 2 , .Xr send 2 , From owner-svn-src-all@freebsd.org Fri Jul 3 11:46:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9B12434B8BA; Fri, 3 Jul 2020 11:46:43 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49ytTv3YZsz49kY; Fri, 3 Jul 2020 11:46:43 +0000 (UTC) (envelope-from kaktus@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 58455B223; Fri, 3 Jul 2020 11:46:43 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 063BkhRS030791; Fri, 3 Jul 2020 11:46:43 GMT (envelope-from kaktus@FreeBSD.org) Received: (from kaktus@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 063BkhxA030790; Fri, 3 Jul 2020 11:46:43 GMT (envelope-from kaktus@FreeBSD.org) Message-Id: <202007031146.063BkhxA030790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kaktus set sender to kaktus@FreeBSD.org using -f From: Pawel Biernacki Date: Fri, 3 Jul 2020 11:46:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362912 - stable/11/lib/libc/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: kaktus X-SVN-Commit-Paths: stable/11/lib/libc/sys X-SVN-Commit-Revision: 362912 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jul 2020 11:46:43 -0000 Author: kaktus Date: Fri Jul 3 11:46:42 2020 New Revision: 362912 URL: https://svnweb.freebsd.org/changeset/base/362912 Log: MFC r362611 man page of select(2) should mention pselect(2) Reviewed by: bcr (manpages), kib, trasz Approved by: kib (mentor) MFC after: 7 days Sponsored by: Mysterious Code Ltd. Modified: stable/11/lib/libc/sys/select.2 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/select.2 ============================================================================== --- stable/11/lib/libc/sys/select.2 Fri Jul 3 11:44:43 2020 (r362911) +++ stable/11/lib/libc/sys/select.2 Fri Jul 3 11:46:42 2020 (r362912) @@ -28,7 +28,7 @@ .\" @(#)select.2 8.2 (Berkeley) 3/25/94 .\" $FreeBSD$ .\" -.Dd November 17, 2002 +.Dd June 25, 2020 .Dt SELECT 2 .Os .Sh NAME @@ -172,6 +172,7 @@ was invalid. .Xr gettimeofday 2 , .Xr kqueue 2 , .Xr poll 2 , +.Xr pselect 2 , .Xr read 2 , .Xr recv 2 , .Xr send 2 , From owner-svn-src-all@freebsd.org Fri Jul 3 14:54:47 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 84D86350C90; Fri, 3 Jul 2020 14:54:47 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49yyfv2sCpz4Mdp; Fri, 3 Jul 2020 14:54:47 +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 45C8FD6F0; Fri, 3 Jul 2020 14:54:47 +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 063EslYt049007; Fri, 3 Jul 2020 14:54:47 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 063EskxA049004; Fri, 3 Jul 2020 14:54:46 GMT (envelope-from cem@FreeBSD.org) Message-Id: <202007031454.063EskxA049004@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Fri, 3 Jul 2020 14:54:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362913 - in head/sys: amd64/amd64 amd64/include crypto/aesni crypto/blake2 X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: in head/sys: amd64/amd64 amd64/include crypto/aesni crypto/blake2 X-SVN-Commit-Revision: 362913 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jul 2020 14:54:47 -0000 Author: cem Date: Fri Jul 3 14:54:46 2020 New Revision: 362913 URL: https://svnweb.freebsd.org/changeset/base/362913 Log: Add domain policy allocation for amd64 fpu_kern_ctx Like other types of allocation, fpu_kern_ctx are frequently allocated per-cpu. Provide the API and sketch some example consumers. fpu_kern_alloc_ctx_domain() preferentially allocates memory from the provided domain, and falls back to other domains if that one is empty (DOMAINSET_PREF(domain) policy). Maybe it makes more sense to just shove one of these in the DPCPU area sooner or later -- left for future work. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D22053 Modified: head/sys/amd64/amd64/fpu.c head/sys/amd64/include/fpu.h head/sys/crypto/aesni/aesni.c head/sys/crypto/blake2/blake2_cryptodev.c Modified: head/sys/amd64/amd64/fpu.c ============================================================================== --- head/sys/amd64/amd64/fpu.c Fri Jul 3 11:46:42 2020 (r362912) +++ head/sys/amd64/amd64/fpu.c Fri Jul 3 14:54:46 2020 (r362913) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1030,17 +1031,31 @@ struct fpu_kern_ctx { char hwstate1[]; }; +static inline size_t __pure2 +fpu_kern_alloc_sz(u_int max_est) +{ + return (sizeof(struct fpu_kern_ctx) + XSAVE_AREA_ALIGN + max_est); +} + +static inline int __pure2 +fpu_kern_malloc_flags(u_int fpflags) +{ + return (((fpflags & FPU_KERN_NOWAIT) ? M_NOWAIT : M_WAITOK) | M_ZERO); +} + struct fpu_kern_ctx * -fpu_kern_alloc_ctx(u_int flags) +fpu_kern_alloc_ctx_domain(int domain, u_int flags) { - struct fpu_kern_ctx *res; - size_t sz; + return (malloc_domainset(fpu_kern_alloc_sz(cpu_max_ext_state_size), + M_FPUKERN_CTX, DOMAINSET_PREF(domain), + fpu_kern_malloc_flags(flags))); +} - sz = sizeof(struct fpu_kern_ctx) + XSAVE_AREA_ALIGN + - cpu_max_ext_state_size; - res = malloc(sz, M_FPUKERN_CTX, ((flags & FPU_KERN_NOWAIT) ? - M_NOWAIT : M_WAITOK) | M_ZERO); - return (res); +struct fpu_kern_ctx * +fpu_kern_alloc_ctx(u_int flags) +{ + return (malloc(fpu_kern_alloc_sz(cpu_max_ext_state_size), + M_FPUKERN_CTX, fpu_kern_malloc_flags(flags))); } void Modified: head/sys/amd64/include/fpu.h ============================================================================== --- head/sys/amd64/include/fpu.h Fri Jul 3 11:46:42 2020 (r362912) +++ head/sys/amd64/include/fpu.h Fri Jul 3 14:54:46 2020 (r362913) @@ -71,6 +71,7 @@ int fputrap_sse(void); int fputrap_x87(void); void fpuuserinited(struct thread *td); struct fpu_kern_ctx *fpu_kern_alloc_ctx(u_int flags); +struct fpu_kern_ctx *fpu_kern_alloc_ctx_domain(int domain, u_int flags); void fpu_kern_free_ctx(struct fpu_kern_ctx *ctx); void fpu_kern_enter(struct thread *td, struct fpu_kern_ctx *ctx, u_int flags); Modified: head/sys/crypto/aesni/aesni.c ============================================================================== --- head/sys/crypto/aesni/aesni.c Fri Jul 3 11:46:42 2020 (r362912) +++ head/sys/crypto/aesni/aesni.c Fri Jul 3 14:54:46 2020 (r362913) @@ -180,7 +180,12 @@ aesni_attach(device_t dev) M_WAITOK|M_ZERO); CPU_FOREACH(i) { - ctx_fpu[i] = fpu_kern_alloc_ctx(0); +#ifdef __amd64__ + ctx_fpu[i] = fpu_kern_alloc_ctx_domain( + pcpu_find(i)->pc_domain, FPU_KERN_NORMAL); +#else + ctx_fpu[i] = fpu_kern_alloc_ctx(FPU_KERN_NORMAL); +#endif mtx_init(&ctx_mtx[i], "anifpumtx", NULL, MTX_DEF|MTX_NEW); } Modified: head/sys/crypto/blake2/blake2_cryptodev.c ============================================================================== --- head/sys/crypto/blake2/blake2_cryptodev.c Fri Jul 3 11:46:42 2020 (r362912) +++ head/sys/crypto/blake2/blake2_cryptodev.c Fri Jul 3 14:54:46 2020 (r362913) @@ -142,7 +142,12 @@ blake2_attach(device_t dev) M_WAITOK | M_ZERO); CPU_FOREACH(i) { - ctx_fpu[i] = fpu_kern_alloc_ctx(0); +#ifdef __amd64__ + ctx_fpu[i] = fpu_kern_alloc_ctx_domain( + pcpu_find(i)->pc_domain, FPU_KERN_NORMAL); +#else + ctx_fpu[i] = fpu_kern_alloc_ctx(FPU_KERN_NORMAL); +#endif mtx_init(&ctx_mtx[i], "bl2fpumtx", NULL, MTX_DEF | MTX_NEW); } From owner-svn-src-all@freebsd.org Fri Jul 3 20:13:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 84984358049; Fri, 3 Jul 2020 20:13:59 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49z5lB5PNQz3SCj; Fri, 3 Jul 2020 20:13:58 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wr1-x42c.google.com with SMTP id a6so33934398wrm.4; Fri, 03 Jul 2020 13:13:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to; bh=RMH3tKHZ1APMhtqxofNmn1epoFJrzCahIgwDMxNdHTw=; b=dgkxOF5zX/dhVpuIul8r6wrpDj50AAUkFjk6oh4vxAdz7Ai8GWFTWSy0HX4qIW0R/n HW/EjMNL9yyodVKfGHZiRg9RYu6xLt5Qo/keiC6RPSkWt0W5ojdQv+gHMoxOm2KioJXe hfmBMGUhNW+k/wBJOKw8XNcQkR/hWQ8sZrHHZXqbpx3tfBzHQzDfXW7IbVBUwduVUKbF VdAPk6lXZhEpayhz/L/2GgNwxYWX0czUqxgbYfNKOuRChPIARaerLv0QPJVgo/YZpipj GrrDlB89g9qnjlespEoB7/TpZLq834L+v2izim+b96cFpBr/MNGDnvS9hDqDLwlxGOMS 7C3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=RMH3tKHZ1APMhtqxofNmn1epoFJrzCahIgwDMxNdHTw=; b=dMCEg4fHwj8ZQZzslpIuaRMNIO5Q89HtkCoCjAIeGtavQTxU2hgolTKT/JVUXg19Ks A6/7lqyVz1pe4S8XECYjXe8RYu6osKS8bQ+kEqz6tvBSzAfENRvTEGBqDAZ99zEqmfrn pN50bnHDhQyv9NncLKWdIvKRMU3XX4ekrLoIarT4IXOrPlJMMC/bI1pWr/bX6y8MaeaR 41WNH9Ut+of9UX1VQJQjJxRlAFsCP0igOQ42rJRWjPc6HUUQmNqaMCHc8FLL+f4e+fm3 gC7j9oMfII+HrsccZld7y0YYol198mi4/1Jy07fHxoP2dhtMgeAZ4+R29ReYQZA2qVRe pAjQ== X-Gm-Message-State: AOAM531LVRQeW4nzRoE8P0A5epZmDjZ6rZAUkdrnbA8EeRt6YRU227i0 7AAAV2QkB3vq5OHhSP55L/aMPycx X-Google-Smtp-Source: ABdhPJzxoFgVqcdnziAQuRGJitSMpzw3IuSSvIteOrOaa+zhUOqGlgt0sgr5aUWdrHVpgCpkn8KksQ== X-Received: by 2002:a5d:4bd2:: with SMTP id l18mr37276838wrt.119.1593807236525; Fri, 03 Jul 2020 13:13:56 -0700 (PDT) Received: from brick (cpc149474-cmbg20-2-0-cust954.5-4.cable.virginm.net. [82.4.199.187]) by smtp.gmail.com with ESMTPSA id j24sm16772666wrd.43.2020.07.03.13.13.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Jul 2020 13:13:55 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Fri, 3 Jul 2020 21:13:53 +0100 From: Edward Tomasz Napierala To: Mateusz Piotrowski <0mp@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r362806 - head/sys/compat/linprocfs Message-ID: <20200703201353.GA1574@brick> Mail-Followup-To: Mateusz Piotrowski <0mp@freebsd.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202006301624.05UGOS9F035293@repo.freebsd.org> <526e3180-bc4a-b609-b601-80dfa6e3d918@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <526e3180-bc4a-b609-b601-80dfa6e3d918@FreeBSD.org> X-Rspamd-Queue-Id: 49z5lB5PNQz3SCj X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=dgkxOF5z; dmarc=none; spf=pass (mx1.freebsd.org: domain of etnapierala@gmail.com designates 2a00:1450:4864:20::42c as permitted sender) smtp.mailfrom=etnapierala@gmail.com X-Spamd-Result: default: False [-1.40 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-0.94)[-0.944]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; MID_RHS_NOT_FQDN(0.50)[]; DMARC_NA(0.00)[freebsd.org]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; NEURAL_HAM_LONG(-0.89)[-0.892]; RCVD_COUNT_THREE(0.00)[3]; NEURAL_SPAM_SHORT(0.13)[0.135]; DKIM_TRACE(0.00)[gmail.com:+]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::42c:from]; FORGED_SENDER(0.30)[trasz@freebsd.org,etnapierala@gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[82.4.199.187:received]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[trasz@freebsd.org,etnapierala@gmail.com]; RCVD_TLS_ALL(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jul 2020 20:13:59 -0000 On 0630T1828, Mateusz Piotrowski wrote: > Hi, > > On 6/30/20 6:24 PM, Edward Tomasz Napierala wrote: > > Author: trasz > > Date: Tue Jun 30 16:24:28 2020 > > New Revision: 362806 > > URL: https://svnweb.freebsd.org/changeset/base/362806 > > > > Log: > > Make linprocfs(5) create the /proc//task/ directores. > > This is to silence down some Chromium assertions. > > > > PR: kern/240991 > > Analyzed by: Alex S > > MFC after: 2 weeks > > Sponsored by: The FreeBSD Foundation > > Differential Revision: https://reviews.freebsd.org/D25256 > > Hmm, could something similar be done to the following warning which is being printed > when service fahclient is started (from the biology/linux-foldingathome port): > > 16:25:39:WARNING:Exception: Failed to open '/proc/bus/pci/devices': Failed to open > '/proc/bus/pci/devices': No such file or directory: No such file or directory Sure: https://reviews.freebsd.org/D25557 From owner-svn-src-all@freebsd.org Fri Jul 3 20:32:54 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9B7AF358B5C; Fri, 3 Jul 2020 20:32:54 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49z6923V9tz3TN8; Fri, 3 Jul 2020 20:32:54 +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 5B5C7111CF; Fri, 3 Jul 2020 20:32:54 +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 063KWsJf058385; Fri, 3 Jul 2020 20:32:54 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 063KWsRA058384; Fri, 3 Jul 2020 20:32:54 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <202007032032.063KWsRA058384@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 3 Jul 2020 20:32:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362914 - head/usr.bin/gh-bc X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/usr.bin/gh-bc X-SVN-Commit-Revision: 362914 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jul 2020 20:32:54 -0000 Author: emaste Date: Fri Jul 3 20:32:53 2020 New Revision: 362914 URL: https://svnweb.freebsd.org/changeset/base/362914 Log: bc: disable -flto on powerpc64 Previously bc segfaulted at start, on powerpc64. PR: 247738 Submitted by: luporl Reported by: pkubaj MFC after: 1 week Modified: head/usr.bin/gh-bc/Makefile Modified: head/usr.bin/gh-bc/Makefile ============================================================================== --- head/usr.bin/gh-bc/Makefile Fri Jul 3 14:54:46 2020 (r362913) +++ head/usr.bin/gh-bc/Makefile Fri Jul 3 20:32:53 2020 (r362914) @@ -50,7 +50,8 @@ CFLAGS+= -DBC_ENABLE_NLS=0 CFLAGS+= -DBC_ENABLE_NLS=1 # prevent floating point incompatibilities caused by -flto on some architectures -.if ${MACHINE_ARCH} != mips && ${MACHINE_ARCH} != mips64 && ${MACHINE_ARCH} != riscv64 +.if ${MACHINE_ARCH} != mips && ${MACHINE_ARCH} != mips64 && \ + ${MACHINE_ARCH} != powerpc64 && ${MACHINE_ARCH} != riscv64 CFLAGS+= -flto .endif From owner-svn-src-all@freebsd.org Fri Jul 3 21:52:59 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2854D35AA4D; Fri, 3 Jul 2020 21:52:59 +0000 (UTC) (envelope-from ktullavik@gmail.com) Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49z7xQ1Jw3z3YGF; Fri, 3 Jul 2020 21:52:57 +0000 (UTC) (envelope-from ktullavik@gmail.com) Received: by mail-lj1-x241.google.com with SMTP id f5so22695001ljj.10; Fri, 03 Jul 2020 14:52:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=/zOKhtEVa7xqG6QUdWwxz04dW0Lijj11MZpb4f0NE5o=; b=C0ri/0IJlMt8uRb70+l/KSyVGUlt1MZMAl03VHoYm98llw9IFRg7ClKoPPIWewoo6H leJHhrNbHi2Zg/EE9qa2/ZfVIiSqy2hs5jFXaavn3FdwXLJRleKgJlWWZ3Cwhk7OhTSe 1aWkulxe2oVhTVAIG5OXsW9jIyLhI7v4hLxjjziBOMD0lQtK/BpbU+uBXiPEWkvamNhN UarYoAlw4eQZl+EaUFGtGdW1n5XMv4qGWxOJH+f1Ia/ZkxJH+KSCb6WeureV3fupOUb0 y0AhzG0rZuer+yuwzICDO5ifSvEIyWrSD3pzVTm588UcjIAPZ4jXHOKdeuEb0grS1KQ6 lepw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=/zOKhtEVa7xqG6QUdWwxz04dW0Lijj11MZpb4f0NE5o=; b=WMC8Ran7+Vzop4JctOE0hErX8zaiS8Y6F3VPeC2MhWmt0CR8mosU+jBiTdu0jPAXnP OrF2mn0EEAl0C1zS6Vtoffxl8fxmbshGmkNsWWA5Bia9GCPqPFv9L03y56RaXsPfrbwq l+O4dcHMqT5CRlxh4AnawBoHRjITl1dEqhvhxB6Ko9UlGY1VKur0TD9wnzr8uQnzZ96u xp8gcUjcEoyI/CgaYWsynqPHz29mMs1sNG94T5y7Am6IqKm6oSmfA4JKs2gELREf5qYW S8g5ll+lPcoIMZc55KluKNu7UQPgGTzEX0D4TAqbDyVtztTtLdgTTiluWI6uXsW3f2CJ G5VA== X-Gm-Message-State: AOAM533LA0FyFqnwyoU7Z/ykffzgHVZ8dzmNt2brhlDHRPj4IOz35T9c n/PeZ2Kn4iyTCPOHIGWvlHJnMgT1OtWY2g== X-Google-Smtp-Source: ABdhPJzaK0WUABBfNP/fqOhn0KRrM9x+7prhW96H3x7TxzurucbMf7AkBh9ORCh4ekMmhQEov40R5A== X-Received: by 2002:a05:651c:1105:: with SMTP id d5mr9038422ljo.62.1593813174492; Fri, 03 Jul 2020 14:52:54 -0700 (PDT) Received: from [10.0.0.11] (cm-84.208.206.179.getinternet.no. [84.208.206.179]) by smtp.gmail.com with ESMTPSA id l4sm778048ljc.83.2020.07.03.14.52.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Jul 2020 14:52:54 -0700 (PDT) Subject: Re: svn commit: r362902 - in head/lib/csu: . aarch64 amd64 arm i386 mips powerpc powerpc64 riscv To: John Baldwin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202007030009.06309gcC099579@repo.freebsd.org> From: Kjell Tore Ullavik Message-ID: <7b140e64-ba4d-d76e-29a4-d0587f7351a0@gmail.com> Date: Fri, 3 Jul 2020 23:46:45 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <202007030009.06309gcC099579@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Rspamd-Queue-Id: 49z7xQ1Jw3z3YGF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=C0ri/0IJ; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of ktullavik@gmail.com designates 2a00:1450:4864:20::241 as permitted sender) smtp.mailfrom=ktullavik@gmail.com X-Spamd-Result: default: False [-2.14 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-0.96)[-0.956]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FREEMAIL_FROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; NEURAL_HAM_LONG(-1.00)[-0.995]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.81)[0.814]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::241:from]; 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]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jul 2020 21:52:59 -0000 Got a buildworld error for CURRENT, amd64 today. I have not rebuilt in while, but maybe r362902 is related? I'm at r362906 sh /usr/src/tools/install.sh  -C -o root -g wheel -m 444 libgcc_eh.a /usr/obj/usr/src/amd64.amd64/obj-lib32/tmp/usr/lib32/ ===> lib/libgcc_s (obj,all,install) ===> lib/csu (obj,all,install) ===> lib/csu/i386 (all) cc -DCOMPAT_32BIT -march=i686 -mmmx -msse -msse2 -target x86_64-unknown-freebsd13.0 -m32 -L/usr/obj/usr/src/amd64.amd64/obj-lib32/tmp/usr/lib32 --sysroot=/usr/obj/usr/src/amd64.amd64/obj-lib32/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -B/usr/obj/usr/src/amd64.amd64/obj-lib32/tmp/usr/lib32 -O2 -pipe -fno-common -I/usr/src/lib/csu/i386 -DCRT_IRELOC_REL -fno-asynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/src/lib/csu/common  -I/usr/src/lib/libc/include -g -std=gnu99 -Wno-format-zero-length -nobuiltininc -idirafter /usr/lib/clang/10.0.0/include  -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments    -fPIC -DPIC -c -o Scrt1_c.o /usr/src/lib/csu/i386/crt1_c.c cc -DCOMPAT_32BIT -march=i686 -mmmx -msse -msse2 -target x86_64-unknown-freebsd13.0 -m32 -L/usr/obj/usr/src/amd64.amd64/obj-lib32/tmp/usr/lib32 --sysroot=/usr/obj/usr/src/amd64.amd64/obj-lib32/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -B/usr/obj/usr/src/amd64.amd64/obj-lib32/tmp/usr/lib32 -O2 -pipe -fno-common -I/usr/src/lib/csu/i386 -DCRT_IRELOC_REL -fno-asynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/src/lib/csu/common  -I/usr/src/lib/libc/include -g -std=gnu99 -Wno-format-zero-length -nobuiltininc -idirafter /usr/lib/clang/10.0.0/include  -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments     -DLOCORE   -c /usr/src/lib/csu/i386/crt1_s.S -o crt1_s.o cc -DCOMPAT_32BIT -march=i686 -mmmx -msse -msse2 -target x86_64-unknown-freebsd13.0 -m32 -L/usr/obj/usr/src/amd64.amd64/obj-lib32/tmp/usr/lib32 --sysroot=/usr/obj/usr/src/amd64.amd64/obj-lib32/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -B/usr/obj/usr/src/amd64.amd64/obj-lib32/tmp/usr/lib32 -O2 -pipe -fno-common -I/usr/src/lib/csu/i386 -DCRT_IRELOC_REL -fno-asynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/src/lib/csu/common  -I/usr/src/lib/libc/include -g -std=gnu99 -Wno-format-zero-length -nobuiltininc -idirafter /usr/lib/clang/10.0.0/include  -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments     -DLOCORE   -c /usr/src/lib/csu/common/crtbrand.S -o crtbrand.o cc -DCOMPAT_32BIT -march=i686 -mmmx -msse -msse2 -target x86_64-unknown-freebsd13.0 -m32 -L/usr/obj/usr/src/amd64.amd64/obj-lib32/tmp/usr/lib32 --sysroot=/usr/obj/usr/src/amd64.amd64/obj-lib32/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -B/usr/obj/usr/src/amd64.amd64/obj-lib32/tmp/usr/lib32 -O2 -pipe -fno-common -I/usr/src/lib/csu/i386 -DCRT_IRELOC_REL -fno-asynchronous-unwind-tables -fno-omit-frame-pointer -I/usr/src/lib/csu/common  -I/usr/src/lib/libc/include -g -std=gnu99 -Wno-format-zero-length -nobuiltininc -idirafter /usr/lib/clang/10.0.0/include  -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments     -DLOCORE   -c /usr/src/lib/csu/common/ignore_init_note.S -o ignore_init_note.o ld -m elf_i386_fbsd -L/usr/obj/usr/src/amd64.amd64/obj-lib32/tmp/usr/lib32  -o Scrt1.o -r Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o objcopy --localize-symbol _start1 crt1.o objcopy: open crt1.o failed: No such file or directory *** Error code 1 Stop. make[5]: stopped in /usr/src/lib/csu/i386 *** Error code 1 Stop. make[4]: stopped in /usr/src/lib/csu *** Error code 1 Stop. make[3]: stopped in /usr/src *** Error code 1 Stop. make[2]: stopped in /usr/src *** Error code 1 Stop. make[1]: stopped in /usr/src *** Error code 1 Stop. make: stopped in /usr/src -------- src.conf -------- KERNCONF=GALOIS WITHOUT_ATM= WITHOUT_BSDINSTALL= WITHOUT_CROSS_COMPILER= WITHOUT_CTM= WITHOUT_DICT= WITHOUT_EE= WITHOUT_FINGER= WITHOUT_FLOPPY= WITHOUT_FREEBSD_UPDATE= WITHOUT_GAMES= WITHOUT_HAST= WITHOUT_HTML= WITHOUT_HYPERV= WITHOUT_IPFILTER= WITHOUT_MAIL= WITHOUT_NDIS= WITHOUT_PF= WITHOUT_SVNLITE= WITHOUT_TALK= WITHOUT_TESTS= WITHOUT_UNBOUND= ------ make.conf ------ MALLOC_PRODUCTION= On 03.07.2020 02:09, John Baldwin wrote: > Author: jhb > Date: Fri Jul 3 00:09:41 2020 > New Revision: 362902 > URL: https://svnweb.freebsd.org/changeset/base/362902 > > Log: > Consolidate duplicated logic in csu Makefiles to lib/csu/Makefile.inc. > > Reviewed by: kib > Sponsored by: DARPA > Differential Revision: https://reviews.freebsd.org/D25537 > > Modified: > head/lib/csu/Makefile.inc > head/lib/csu/aarch64/Makefile > head/lib/csu/amd64/Makefile > head/lib/csu/arm/Makefile > head/lib/csu/i386/Makefile > head/lib/csu/mips/Makefile > head/lib/csu/powerpc/Makefile > head/lib/csu/powerpc64/Makefile > head/lib/csu/riscv/Makefile > > Modified: head/lib/csu/Makefile.inc > ============================================================================== > --- head/lib/csu/Makefile.inc Thu Jul 2 22:59:05 2020 (r362901) > +++ head/lib/csu/Makefile.inc Fri Jul 3 00:09:41 2020 (r362902) > @@ -8,15 +8,52 @@ NO_WMISSING_VARIABLE_DECLARATIONS= > > .if !defined(BUILDING_TESTS) > > +OBJS+= Scrt1.o crt1.o gcrt1.o > OBJS+= crtbegin.o crtbeginS.o crtbeginT.o > OBJS+= crtend.o crtendS.o > +OBJS+= crti.o crtn.o > > +CRT1OBJS+= crtbrand.o ignore_init_note.o > + > ACFLAGS+= -DLOCORE > > CFLAGS+= -fno-asynchronous-unwind-tables > CFLAGS+= -fno-omit-frame-pointer > +CFLAGS+= -I${.CURDIR:H}/common \ > + -I${SRCTOP}/lib/libc/include > > CFLAGS_CRTS= -DSHARED ${PICFLAG} > + > +FILES= ${OBJS} > +FILESMODE= ${LIBMODE} > +FILESOWN= ${LIBOWN} > +FILESGRP= ${LIBGRP} > +FILESDIR= ${LIBDIR} > +# These FILES qualify as libraries for the purpose of LIBRARIES_ONLY. > +.undef LIBRARIES_ONLY > + > +CLEANFILES+= ${OBJS} ${CRT1OBJS} crt1_c.o gcrt1_c.o Scrt1_c.o > + > +crt1.o: crt1_c.o ${CRT1OBJS} > + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} > +.if ${MACHINE_ARCH} == "i386" > + ${OBJCOPY} --localize-symbol _start1 crt1.o > +.endif > + > +gcrt1_c.o: crt1_c.c > + ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c > + > +gcrt1.o: gcrt1_c.o ${CRT1OBJS} > + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} > + > +Scrt1_c.o: crt1_c.c > + ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c > + > +Scrt1.o: Scrt1_c.o ${CRT1OBJS} > + ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} > +.if ${MACHINE_ARCH} == "i386" > + ${OBJCOPY} --localize-symbol _start1 crt1.o > +.endif > > crtbegin.o: crtbegin.c > crtbeginS.o: crtbegin.c > > Modified: head/lib/csu/aarch64/Makefile > ============================================================================== > --- head/lib/csu/aarch64/Makefile Thu Jul 2 22:59:05 2020 (r362901) > +++ head/lib/csu/aarch64/Makefile Fri Jul 3 00:09:41 2020 (r362902) > @@ -2,37 +2,8 @@ > > .PATH: ${.CURDIR:H}/common > > -SRCS= crti.S crtn.S > -OBJS= ${SRCS:N*.h:R:S/$/.o/g} > -OBJS+= Scrt1.o crt1.o gcrt1.o > -CFLAGS+= -I${.CURDIR:H}/common \ > - -I${SRCTOP}/lib/libc/include > CFLAGS+= -DCRT_IRELOC_SUPPRESS > > -FILES= ${OBJS} > -FILESMODE= ${LIBMODE} > -FILESOWN= ${LIBOWN} > -FILESGRP= ${LIBGRP} > -FILESDIR= ${LIBDIR} > -# These FILES qualify as libraries for the purpose of LIBRARIES_ONLY. > -.undef LIBRARIES_ONLY > - > -CLEANFILES= ${OBJS} crt1_c.o crt1_s.o gcrt1_c.o Scrt1_c.o > -CLEANFILES+= crtbrand.o ignore_init_note.o > - > -gcrt1_c.o: crt1_c.c > - ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c > - > -gcrt1.o: gcrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o > - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} > - > -crt1.o: crt1_c.o crt1_s.o crtbrand.o ignore_init_note.o > - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} > - > -Scrt1_c.o: crt1_c.c > - ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c > - > -Scrt1.o: Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o > - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} > +CRT1OBJS+= crt1_s.o > > .include > > Modified: head/lib/csu/amd64/Makefile > ============================================================================== > --- head/lib/csu/amd64/Makefile Thu Jul 2 22:59:05 2020 (r362901) > +++ head/lib/csu/amd64/Makefile Fri Jul 3 00:09:41 2020 (r362902) > @@ -2,37 +2,7 @@ > > .PATH: ${.CURDIR:H}/common > > -SRCS= crti.S crtn.S > -OBJS= ${SRCS:N*.h:R:S/$/.o/g} > -OBJS+= Scrt1.o crt1.o gcrt1.o > -CFLAGS+= -I${.CURDIR} -I${.CURDIR:H}/common \ > - -I${SRCTOP}/lib/libc/include > +CFLAGS+= -I${.CURDIR} > CFLAGS+= -fno-omit-frame-pointer -DCRT_IRELOC_RELA > - > -FILES= ${OBJS} > -FILESMODE= ${LIBMODE} > -FILESOWN= ${LIBOWN} > -FILESGRP= ${LIBGRP} > -FILESDIR= ${LIBDIR} > -# These FILES qualify as libraries for the purpose of LIBRARIES_ONLY. > -.undef LIBRARIES_ONLY > - > -CLEANFILES= ${OBJS} crt1_c.o gcrt1_c.o Scrt1_c.o > -CLEANFILES+= crtbrand.o ignore_init_note.o > - > -gcrt1_c.o: crt1_c.c > - ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c > - > -gcrt1.o: gcrt1_c.o crtbrand.o ignore_init_note.o > - ${LD} ${_LDFLAGS} -o gcrt1.o -r crtbrand.o ignore_init_note.o gcrt1_c.o > - > -crt1.o: crt1_c.o crtbrand.o ignore_init_note.o > - ${LD} ${_LDFLAGS} -o crt1.o -r crtbrand.o ignore_init_note.o crt1_c.o > - > -Scrt1_c.o: crt1_c.c > - ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c > - > -Scrt1.o: Scrt1_c.o crtbrand.o ignore_init_note.o > - ${LD} ${_LDFLAGS} -o Scrt1.o -r crtbrand.o ignore_init_note.o Scrt1_c.o > > .include > > Modified: head/lib/csu/arm/Makefile > ============================================================================== > --- head/lib/csu/arm/Makefile Thu Jul 2 22:59:05 2020 (r362901) > +++ head/lib/csu/arm/Makefile Fri Jul 3 00:09:41 2020 (r362902) > @@ -2,40 +2,8 @@ > > .PATH: ${.CURDIR:H}/common > > -SRCS= crti.S crtn.S > -OBJS= ${SRCS:N*.h:R:S/$/.o/g} > -OBJS+= Scrt1.o crt1.o gcrt1.o > -CFLAGS+= -I${.CURDIR:H}/common \ > - -I${SRCTOP}/lib/libc/include > CFLAGS+= -DCRT_IRELOC_SUPPRESS > > -FILES= ${OBJS} > -FILESMODE= ${LIBMODE} > -FILESOWN= ${LIBOWN} > -FILESGRP= ${LIBGRP} > -FILESDIR= ${LIBDIR} > -# These FILES qualify as libraries for the purpose of LIBRARIES_ONLY. > -.undef LIBRARIES_ONLY > - > -CLEANFILES= ${OBJS} crt1_c.o crt1_s.o gcrt1_c.o Scrt1_c.o > -CLEANFILES+= crtbrand.o ignore_init_note.o > - > -crt1_c.o: crt1_c.c > - ${CC} ${CFLAGS} -c -o ${.TARGET} ${.CURDIR}/crt1_c.c > - > -crt1.o: crt1_c.o crt1_s.o crtbrand.o ignore_init_note.o > - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} > - > -gcrt1_c.o: crt1_c.c > - ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c > - > -gcrt1.o: gcrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o > - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} > - > -Scrt1_c.o: crt1_c.c > - ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c > - > -Scrt1.o: Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o > - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} > +CRT1OBJS+= crt1_s.o > > .include > > Modified: head/lib/csu/i386/Makefile > ============================================================================== > --- head/lib/csu/i386/Makefile Thu Jul 2 22:59:05 2020 (r362901) > +++ head/lib/csu/i386/Makefile Fri Jul 3 00:09:41 2020 (r362902) > @@ -2,39 +2,9 @@ > > .PATH: ${.CURDIR:H}/common > > -SRCS= crti.S crtn.S > -OBJS= ${SRCS:N*.h:R:S/$/.o/g} > -OBJS+= Scrt1.o crt1.o gcrt1.o > -CFLAGS+= -I${.CURDIR} -I${.CURDIR:H}/common \ > - -I${SRCTOP}/lib/libc/include > +CFLAGS+= -I${.CURDIR} > CFLAGS+= -DCRT_IRELOC_REL > > -FILES= ${OBJS} > -FILESMODE= ${LIBMODE} > -FILESOWN= ${LIBOWN} > -FILESGRP= ${LIBGRP} > -FILESDIR= ${LIBDIR} > -# These FILES qualify as libraries for the purpose of LIBRARIES_ONLY. > -.undef LIBRARIES_ONLY > - > -CLEANFILES= ${OBJS} crt1_c.o crt1_s.o gcrt1_c.o Scrt1_c.o > -CLEANFILES+= crtbrand.o ignore_init_note.o > - > -gcrt1_c.o: crt1_c.c > - ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c > - > -gcrt1.o: gcrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o > - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} > - > -crt1.o: crt1_c.o crt1_s.o crtbrand.o ignore_init_note.o > - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} > - ${OBJCOPY} --localize-symbol _start1 crt1.o > - > -Scrt1_c.o: crt1_c.c > - ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c > - > -Scrt1.o: Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o > - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} > - ${OBJCOPY} --localize-symbol _start1 Scrt1.o > +CRT1OBJS+= crt1_s.o > > .include > > Modified: head/lib/csu/mips/Makefile > ============================================================================== > --- head/lib/csu/mips/Makefile Thu Jul 2 22:59:05 2020 (r362901) > +++ head/lib/csu/mips/Makefile Fri Jul 3 00:09:41 2020 (r362902) > @@ -2,37 +2,6 @@ > > .PATH: ${.CURDIR:H}/common > > -SRCS= crti.S crtn.S > -OBJS= ${SRCS:N*.h:R:S/$/.o/g} > -OBJS+= Scrt1.o crt1.o gcrt1.o > -CFLAGS+= -I${.CURDIR:H}/common \ > - -I${SRCTOP}/lib/libc/include > CFLAGS+= -DCRT_IRELOC_SUPPRESS > - > -FILES= ${OBJS} > -FILESMODE= ${LIBMODE} > -FILESOWN= ${LIBOWN} > -FILESGRP= ${LIBGRP} > -FILESDIR= ${LIBDIR} > -# These FILES qualify as libraries for the purpose of LIBRARIES_ONLY. > -.undef LIBRARIES_ONLY > - > -CLEANFILES= ${OBJS} crt1_c.o gcrt1_c.o Scrt1_c.o > -CLEANFILES+= crtbrand.o ignore_init_note.o > - > -gcrt1_c.o: crt1_c.c > - ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c > - > -gcrt1.o: gcrt1_c.o crtbrand.o ignore_init_note.o > - ${LD} ${_LDFLAGS} -o gcrt1.o -r crtbrand.o ignore_init_note.o gcrt1_c.o > - > -crt1.o: crt1_c.o crtbrand.o ignore_init_note.o > - ${LD} ${_LDFLAGS} -o crt1.o -r crtbrand.o ignore_init_note.o crt1_c.o > - > -Scrt1_c.o: crt1_c.c > - ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c > - > -Scrt1.o: Scrt1_c.o crtbrand.o ignore_init_note.o > - ${LD} ${_LDFLAGS} -o Scrt1.o -r crtbrand.o ignore_init_note.o Scrt1_c.o > > .include > > Modified: head/lib/csu/powerpc/Makefile > ============================================================================== > --- head/lib/csu/powerpc/Makefile Thu Jul 2 22:59:05 2020 (r362901) > +++ head/lib/csu/powerpc/Makefile Fri Jul 3 00:09:41 2020 (r362902) > @@ -2,37 +2,7 @@ > > .PATH: ${.CURDIR:H}/common > > -SRCS= crti.S crtn.S crtsavres.S > -OBJS= ${SRCS:N*.h:R:S/$/.o/g} > -OBJS+= Scrt1.o crt1.o gcrt1.o > -CFLAGS+= -I${.CURDIR:H}/common \ > - -I${SRCTOP}/lib/libc/include > +OBJS+= crtsavres.o > CFLAGS+= -DCRT_IRELOC_SUPPRESS > - > -FILES= ${OBJS} > -FILESMODE= ${LIBMODE} > -FILESOWN= ${LIBOWN} > -FILESGRP= ${LIBGRP} > -FILESDIR= ${LIBDIR} > -# These FILES qualify as libraries for the purpose of LIBRARIES_ONLY. > -.undef LIBRARIES_ONLY > - > -CLEANFILES= ${OBJS} crt1_c.o gcrt1_c.o Scrt1_c.o > -CLEANFILES+= crtbrand.o ignore_init_note.o > - > -gcrt1_c.o: crt1_c.c > - ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c > - > -gcrt1.o: gcrt1_c.o crtbrand.o ignore_init_note.o > - ${LD} ${_LDFLAGS} -o gcrt1.o -r crtbrand.o ignore_init_note.o gcrt1_c.o > - > -crt1.o: crt1_c.o crtbrand.o ignore_init_note.o > - ${LD} ${_LDFLAGS} -o crt1.o -r crtbrand.o ignore_init_note.o crt1_c.o > - > -Scrt1_c.o: crt1_c.c > - ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c > - > -Scrt1.o: Scrt1_c.o crtbrand.o ignore_init_note.o > - ${LD} ${_LDFLAGS} -o Scrt1.o -r crtbrand.o ignore_init_note.o Scrt1_c.o > > .include > > Modified: head/lib/csu/powerpc64/Makefile > ============================================================================== > --- head/lib/csu/powerpc64/Makefile Thu Jul 2 22:59:05 2020 (r362901) > +++ head/lib/csu/powerpc64/Makefile Fri Jul 3 00:09:41 2020 (r362902) > @@ -2,42 +2,14 @@ > > .PATH: ${.CURDIR:H}/common > > -SRCS= crti.S crtn.S > -OBJS= ${SRCS:N*.h:R:S/$/.o/g} > -OBJS+= Scrt1.o crt1.o crtsavres.o gcrt1.o > -CFLAGS+= -I${.CURDIR} -I${.CURDIR:H}/common \ > - -I${SRCTOP}/lib/libc/include \ > +OBJS+= crtsavres.o > +CFLAGS+= -I${.CURDIR} \ > -mlongcall -DCRT_IRELOC_RELA > > -FILES= ${OBJS} > -FILESMODE= ${LIBMODE} > -FILESOWN= ${LIBOWN} > -FILESGRP= ${LIBGRP} > -FILESDIR= ${LIBDIR} > -# These FILES qualify as libraries for the purpose of LIBRARIES_ONLY. > -.undef LIBRARIES_ONLY > - > -CLEANFILES= ${OBJS} crt1_c.o gcrt1_c.o Scrt1_c.o > -CLEANFILES+= crtbrand.o ignore_init_note.o > CLEANFILES+= crtsavres.S > > # On powerpc64 crtsavres is an empty file > crtsavres.S: > touch ${.TARGET} > - > -gcrt1_c.o: crt1_c.c > - ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c > - > -gcrt1.o: gcrt1_c.o crtbrand.o ignore_init_note.o > - ${LD} ${_LDFLAGS} -o gcrt1.o -r crtbrand.o ignore_init_note.o gcrt1_c.o > - > -crt1.o: crt1_c.o crtbrand.o ignore_init_note.o > - ${LD} ${_LDFLAGS} -o crt1.o -r crtbrand.o ignore_init_note.o crt1_c.o > - > -Scrt1_c.o: crt1_c.c > - ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c > - > -Scrt1.o: Scrt1_c.o crtbrand.o ignore_init_note.o > - ${LD} ${_LDFLAGS} -o Scrt1.o -r crtbrand.o ignore_init_note.o Scrt1_c.o > > .include > > Modified: head/lib/csu/riscv/Makefile > ============================================================================== > --- head/lib/csu/riscv/Makefile Thu Jul 2 22:59:05 2020 (r362901) > +++ head/lib/csu/riscv/Makefile Fri Jul 3 00:09:41 2020 (r362902) > @@ -2,37 +2,8 @@ > > .PATH: ${.CURDIR:H}/common > > -SRCS= crti.S crtn.S > -OBJS= ${SRCS:N*.h:R:S/$/.o/g} > -OBJS+= Scrt1.o crt1.o gcrt1.o > -CFLAGS+= -I${.CURDIR:H}/common \ > - -I${SRCTOP}/lib/libc/include > CFLAGS+= -DCRT_IRELOC_SUPPRESS > > -FILES= ${OBJS} > -FILESMODE= ${LIBMODE} > -FILESOWN= ${LIBOWN} > -FILESGRP= ${LIBGRP} > -FILESDIR= ${LIBDIR} > -# These FILES qualify as libraries for the purpose of LIBRARIES_ONLY. > -.undef LIBRARIES_ONLY > - > -CLEANFILES= ${OBJS} crt1_c.o crt1_s.o gcrt1_c.o Scrt1_c.o > -CLEANFILES+= crtbrand.o ignore_init_note.o > - > -gcrt1_c.o: crt1_c.c > - ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c > - > -gcrt1.o: gcrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o > - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} > - > -crt1.o: crt1_c.o crt1_s.o crtbrand.o ignore_init_note.o > - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} > - > -Scrt1_c.o: crt1_c.c > - ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c > - > -Scrt1.o: Scrt1_c.o crt1_s.o crtbrand.o ignore_init_note.o > - ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o} > +CRT1OBJS+= crt1_s.o > > .include > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" From owner-svn-src-all@freebsd.org Sat Jul 4 03:26:19 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5F316360490; Sat, 4 Jul 2020 03:26: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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49zHL31ZNBz45gh; Sat, 4 Jul 2020 03:26:19 +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 1970B16310; Sat, 4 Jul 2020 03:26:19 +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 0643QIGG015808; Sat, 4 Jul 2020 03:26:18 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0643QI3X015803; Sat, 4 Jul 2020 03:26:18 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202007040326.0643QI3X015803@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 4 Jul 2020 03:26:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362915 - in stable/12: . contrib/xz/src/liblzma/check lib/liblzma share/mk X-SVN-Group: stable-12 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: in stable/12: . contrib/xz/src/liblzma/check lib/liblzma share/mk X-SVN-Commit-Revision: 362915 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jul 2020 03:26:19 -0000 Author: delphij Date: Sat Jul 4 03:26:17 2020 New Revision: 362915 URL: https://svnweb.freebsd.org/changeset/base/362915 Log: MFC r362452, r362478: liblzma: Make liblzma use libmd implementation of SHA256. Deleted: stable/12/contrib/xz/src/liblzma/check/sha256.c Modified: stable/12/Makefile.inc1 stable/12/lib/liblzma/Makefile stable/12/lib/liblzma/Symbol.map stable/12/lib/liblzma/config.h stable/12/share/mk/src.libnames.mk Directory Properties: stable/12/ (props changed) Modified: stable/12/Makefile.inc1 ============================================================================== --- stable/12/Makefile.inc1 Fri Jul 3 20:32:53 2020 (r362914) +++ stable/12/Makefile.inc1 Sat Jul 4 03:26:17 2020 (r362915) @@ -2668,7 +2668,7 @@ _lib_casper= lib/libcasper lib/libpjdlog__L: lib/libutil__L lib/libcasper__L: lib/libnv__L -lib/liblzma__L: lib/libthr__L +lib/liblzma__L: lib/libmd__L lib/libthr__L _generic_libs= ${_cddl_lib} gnu/lib ${_kerberos5_lib} lib ${_secure_lib} usr.bin/lex/lib .if ${MK_IPFILTER} != "no" Modified: stable/12/lib/liblzma/Makefile ============================================================================== --- stable/12/lib/liblzma/Makefile Fri Jul 3 20:32:53 2020 (r362914) +++ stable/12/lib/liblzma/Makefile Sat Jul 4 03:26:17 2020 (r362915) @@ -78,8 +78,7 @@ SRCS+= common.c \ .PATH: ${LZMADIR}/check SRCS+= check.c \ crc32_table.c \ - crc64_table.c \ - sha256.c + crc64_table.c .if defined(MACHINE_ARCH) && ${MACHINE_ARCH} == "i386" SRCS+= crc32_x86.S \ crc64_x86.S @@ -125,11 +124,11 @@ SRCS+= simple_coder.c \ .PATH: ${LZMADIR} -VERSION_MAJOR!= awk '$$1 == "\#define" && $$2 == "LZMA_VERSION_MAJOR" {print $$3 } ' \ +VERSION_MAJOR!= sed -n '/define.*LZMA_VERSION_MAJOR/{s,[^0-9.],,gp;q;}' \ ${LZMADIR}/api/lzma/version.h -VERSION_MINOR!= awk '$$1 == "\#define" && $$2 == "LZMA_VERSION_MINOR" {print $$3 } ' \ +VERSION_MINOR!= sed -n '/define.*LZMA_VERSION_MINOR/{s,[^0-9.],,gp;q;}' \ ${LZMADIR}/api/lzma/version.h -VERSION_PATCH!= awk '$$1 == "\#define" && $$2 == "LZMA_VERSION_PATCH" {print $$3 } ' \ +VERSION_PATCH!= sed -n '/define.*LZMA_VERSION_PATCH/{s,[^0-9.],,gp;q;}' \ ${LZMADIR}/api/lzma/version.h WARNS?= 3 @@ -147,7 +146,7 @@ CFLAGS+= -DHAVE_CONFIG_H \ -I${LZMADIR}/simple \ -I${LZMADIR:H}/common -LIBADD+= pthread +LIBADD+= md pthread VERSION_DEF= ${.CURDIR}/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map @@ -160,10 +159,11 @@ FILESDIR= ${LIBDATADIR}/pkgconfig liblzma.pc: liblzma.pc.in sed -e 's,@prefix@,/usr,g ; \ - s,@exec_prefix@,/usr,g ; \ + s,@exec_prefix@,/usr,g ; \ s,@libdir@,/usr/lib,g ; \ s,@includedir@,/usr/include,g ; \ - s,@PACKAGE_URL@,http://tukaani.org/xz/,g ; \ + s,@LIBS@,-pthread -lmd,g ; \ + s,@PACKAGE_URL@,https://tukaani.org/xz/,g ; \ s,@PACKAGE_VERSION@,${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH},g ; \ s,@PTHREAD_CFLAGS@,,g ; \ s,@PTHREAD_LIBS@,,g' ${.ALLSRC} > ${.TARGET} Modified: stable/12/lib/liblzma/Symbol.map ============================================================================== --- stable/12/lib/liblzma/Symbol.map Fri Jul 3 20:32:53 2020 (r362914) +++ stable/12/lib/liblzma/Symbol.map Sat Jul 4 03:26:17 2020 (r362915) @@ -180,9 +180,6 @@ XZprivate_1.0 { lzma_raw_coder_memusage; lzma_raw_decoder_init; lzma_raw_encoder_init; - lzma_sha256_finish; - lzma_sha256_init; - lzma_sha256_update; lzma_simple_arm_decoder_init; lzma_simple_arm_encoder_init; lzma_simple_armthumb_decoder_init; Modified: stable/12/lib/liblzma/config.h ============================================================================== --- stable/12/lib/liblzma/config.h Fri Jul 3 20:32:53 2020 (r362914) +++ stable/12/lib/liblzma/config.h Sat Jul 4 03:26:17 2020 (r362915) @@ -211,16 +211,13 @@ /* #undef HAVE_SHA256INIT */ /* Define to 1 if the system has the type `SHA256_CTX'. */ -/* FreeBSD - disabled libmd SHA256 for now */ -/* #undef HAVE_SHA256_CTX */ +#define HAVE_SHA256_CTX 1 /* Define to 1 if you have the header file. */ -/* FreeBSD - disabled libmd SHA256 for now */ -/* #undef HAVE_SHA256_H */ +#define HAVE_SHA256_H 1 /* Define to 1 if you have the `SHA256_Init' function. */ -/* FreeBSD - disabled libmd SHA256 for now */ -/* #undef HAVE_SHA256_INIT */ +#define HAVE_SHA256_INIT 1 /* Define to 1 if the system has the type `SHA2_CTX'. */ /* #undef HAVE_SHA2_CTX */ Modified: stable/12/share/mk/src.libnames.mk ============================================================================== --- stable/12/share/mk/src.libnames.mk Fri Jul 3 20:32:53 2020 (r362914) +++ stable/12/share/mk/src.libnames.mk Sat Jul 4 03:26:17 2020 (r362915) @@ -336,7 +336,7 @@ _DP_heimipcs= heimbase roken pthread _DP_kafs5= asn1 krb5 roken _DP_krb5+= asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc _DP_gssapi_krb5+= gssapi krb5 crypto roken asn1 com_err -_DP_lzma= pthread +_DP_lzma= md pthread _DP_ucl= m _DP_vmmapi= util _DP_opencsd= cxxrt From owner-svn-src-all@freebsd.org Sat Jul 4 03:27:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 70D6B36049C; Sat, 4 Jul 2020 03:27:52 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49zHMr2L5qz45WR; Sat, 4 Jul 2020 03:27:52 +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 344F615E4E; Sat, 4 Jul 2020 03:27:52 +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 0643RqpB015929; Sat, 4 Jul 2020 03:27:52 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0643Rqbe015928; Sat, 4 Jul 2020 03:27:52 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202007040327.0643Rqbe015928@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 4 Jul 2020 03:27:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362916 - stable/12/sys/sys X-SVN-Group: stable-12 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/12/sys/sys X-SVN-Commit-Revision: 362916 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jul 2020 03:27:52 -0000 Author: delphij Date: Sat Jul 4 03:27:51 2020 New Revision: 362916 URL: https://svnweb.freebsd.org/changeset/base/362916 Log: Bump __FreeBSD_version after making liblzma to use libmd implementation of SHA256. Modified: stable/12/sys/sys/param.h Modified: stable/12/sys/sys/param.h ============================================================================== --- stable/12/sys/sys/param.h Sat Jul 4 03:26:17 2020 (r362915) +++ stable/12/sys/sys/param.h Sat Jul 4 03:27:51 2020 (r362916) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1201518 /* Master, propagated to newvers */ +#define __FreeBSD_version 1201519 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@freebsd.org Sat Jul 4 03:28:14 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 00E09360614; Sat, 4 Jul 2020 03:28:14 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49zHNF6DfJz45r0; Sat, 4 Jul 2020 03:28:13 +0000 (UTC) (envelope-from rmacklem@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 B929A1638B; Sat, 4 Jul 2020 03:28:13 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0643SDlO015991; Sat, 4 Jul 2020 03:28:13 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0643SD5O015990; Sat, 4 Jul 2020 03:28:13 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <202007040328.0643SD5O015990@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 4 Jul 2020 03:28:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362917 - head/sys/fs/nfs X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/sys/fs/nfs X-SVN-Commit-Revision: 362917 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jul 2020 03:28:14 -0000 Author: rmacklem Date: Sat Jul 4 03:28:13 2020 New Revision: 362917 URL: https://svnweb.freebsd.org/changeset/base/362917 Log: Add support for ext_pgs mbufs to nfscl_reqstart() and nfsm_set(). This is another in the series of commits that add support to the NFS client and server for building RPC messages in ext_pgs mbufs with anonymous pages. This is useful so that the entire mbuf list does not need to be copied before calling sosend() when NFS over TLS is enabled. Since ND_EXTPG is never set yet, there is no semantic change at this time. Modified: head/sys/fs/nfs/nfs_commonsubs.c Modified: head/sys/fs/nfs/nfs_commonsubs.c ============================================================================== --- head/sys/fs/nfs/nfs_commonsubs.c Sat Jul 4 03:27:51 2020 (r362916) +++ head/sys/fs/nfs/nfs_commonsubs.c Sat Jul 4 03:28:13 2020 (r362917) @@ -359,13 +359,19 @@ nfscl_reqstart(struct nfsrv_descript *nd, int procnum, /* * Get the first mbuf for the request. */ - if (nfs_bigrequest[procnum]) - NFSMCLGET(mb, M_WAITOK); - else - NFSMGET(mb); - mb->m_len = 0; - nd->nd_mreq = nd->nd_mb = mb; - nd->nd_bpos = mtod(mb, char *); + if ((nd->nd_flag & ND_EXTPG) != 0) { + mb = mb_alloc_ext_plus_pages(PAGE_SIZE, M_WAITOK); + nd->nd_mreq = nd->nd_mb = mb; + nfsm_set(nd, 0); + } else { + if (nfs_bigrequest[procnum]) + NFSMCLGET(mb, M_WAITOK); + else + NFSMGET(mb); + mb->m_len = 0; + nd->nd_mreq = nd->nd_mb = mb; + nd->nd_bpos = mtod(mb, char *); + } /* * And fill the first file handle into the request. @@ -4804,7 +4810,38 @@ void nfsm_set(struct nfsrv_descript *nd, u_int offs) { struct mbuf *m; + int rlen; m = nd->nd_mb; - nd->nd_bpos = mtod(m, char *) + offs; + if ((m->m_flags & M_EXTPG) != 0) { + nd->nd_bextpg = 0; + while (offs > 0) { + if (nd->nd_bextpg == 0) + rlen = m_epg_pagelen(m, 0, m->m_epg_1st_off); + else + rlen = m_epg_pagelen(m, nd->nd_bextpg, 0); + if (offs <= rlen) + break; + offs -= rlen; + nd->nd_bextpg++; + if (nd->nd_bextpg == m->m_epg_npgs) { + printf("nfsm_set: build offs " + "out of range\n"); + nd->nd_bextpg--; + break; + } + } + nd->nd_bpos = (char *)(void *) + PHYS_TO_DMAP(m->m_epg_pa[nd->nd_bextpg]); + if (nd->nd_bextpg == 0) + nd->nd_bpos += m->m_epg_1st_off; + if (offs > 0) { + nd->nd_bpos += offs; + nd->nd_bextpgsiz = rlen - offs; + } else if (nd->nd_bextpg == 0) + nd->nd_bextpgsiz = PAGE_SIZE - m->m_epg_1st_off; + else + nd->nd_bextpgsiz = PAGE_SIZE; + } else + nd->nd_bpos = mtod(m, char *) + offs; } From owner-svn-src-all@freebsd.org Sat Jul 4 03:29:20 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BD1C73606A6; Sat, 4 Jul 2020 03:29:20 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49zHPX4Mnvz45rw; Sat, 4 Jul 2020 03:29:20 +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 7A04116419; Sat, 4 Jul 2020 03:29:20 +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 0643TKb2016094; Sat, 4 Jul 2020 03:29:20 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0643TJE8016090; Sat, 4 Jul 2020 03:29:19 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202007040329.0643TJE8016090@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 4 Jul 2020 03:29:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362918 - in stable/11: . contrib/xz/src/liblzma/check lib/liblzma share/mk X-SVN-Group: stable-11 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: in stable/11: . contrib/xz/src/liblzma/check lib/liblzma share/mk X-SVN-Commit-Revision: 362918 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jul 2020 03:29:20 -0000 Author: delphij Date: Sat Jul 4 03:29:19 2020 New Revision: 362918 URL: https://svnweb.freebsd.org/changeset/base/362918 Log: MFC r362452, r362478: liblzma: Make liblzma use libmd implementation of SHA256. Deleted: stable/11/contrib/xz/src/liblzma/check/sha256.c Modified: stable/11/Makefile.inc1 stable/11/lib/liblzma/Makefile stable/11/lib/liblzma/Symbol.map stable/11/lib/liblzma/config.h stable/11/share/mk/src.libnames.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/Makefile.inc1 ============================================================================== --- stable/11/Makefile.inc1 Sat Jul 4 03:28:13 2020 (r362917) +++ stable/11/Makefile.inc1 Sat Jul 4 03:29:19 2020 (r362918) @@ -2231,7 +2231,7 @@ _lib_casper= lib/libcasper lib/libpjdlog__L: lib/libutil__L lib/libcasper__L: lib/libnv__L -lib/liblzma__L: lib/libthr__L +lib/liblzma__L: lib/libmd__L lib/libthr__L _generic_libs= ${_cddl_lib} gnu/lib ${_kerberos5_lib} lib ${_secure_lib} usr.bin/lex/lib .for _DIR in ${LOCAL_LIB_DIRS} Modified: stable/11/lib/liblzma/Makefile ============================================================================== --- stable/11/lib/liblzma/Makefile Sat Jul 4 03:28:13 2020 (r362917) +++ stable/11/lib/liblzma/Makefile Sat Jul 4 03:29:19 2020 (r362918) @@ -78,8 +78,7 @@ SRCS+= common.c \ .PATH: ${LZMADIR}/check SRCS+= check.c \ crc32_table.c \ - crc64_table.c \ - sha256.c + crc64_table.c .if defined(MACHINE_ARCH) && ${MACHINE_ARCH} == "i386" SRCS+= crc32_x86.S \ crc64_x86.S @@ -125,11 +124,11 @@ SRCS+= simple_coder.c \ .PATH: ${LZMADIR} -VERSION_MAJOR!= awk '$$1 == "\#define" && $$2 == "LZMA_VERSION_MAJOR" {print $$3 } ' \ +VERSION_MAJOR!= sed -n '/define.*LZMA_VERSION_MAJOR/{s,[^0-9.],,gp;q;}' \ ${LZMADIR}/api/lzma/version.h -VERSION_MINOR!= awk '$$1 == "\#define" && $$2 == "LZMA_VERSION_MINOR" {print $$3 } ' \ +VERSION_MINOR!= sed -n '/define.*LZMA_VERSION_MINOR/{s,[^0-9.],,gp;q;}' \ ${LZMADIR}/api/lzma/version.h -VERSION_PATCH!= awk '$$1 == "\#define" && $$2 == "LZMA_VERSION_PATCH" {print $$3 } ' \ +VERSION_PATCH!= sed -n '/define.*LZMA_VERSION_PATCH/{s,[^0-9.],,gp;q;}' \ ${LZMADIR}/api/lzma/version.h WARNS?= 3 @@ -147,7 +146,7 @@ CFLAGS+= -DHAVE_CONFIG_H \ -I${LZMADIR}/simple \ -I${LZMADIR:H}/common -LIBADD+= pthread +LIBADD+= md pthread VERSION_DEF= ${.CURDIR}/Versions.def SYMBOL_MAPS= ${.CURDIR}/Symbol.map @@ -160,10 +159,11 @@ FILESDIR= ${LIBDATADIR}/pkgconfig liblzma.pc: liblzma.pc.in sed -e 's,@prefix@,/usr,g ; \ - s,@exec_prefix@,/usr,g ; \ + s,@exec_prefix@,/usr,g ; \ s,@libdir@,/usr/lib,g ; \ s,@includedir@,/usr/include,g ; \ - s,@PACKAGE_URL@,http://tukaani.org/xz/,g ; \ + s,@LIBS@,-pthread -lmd,g ; \ + s,@PACKAGE_URL@,https://tukaani.org/xz/,g ; \ s,@PACKAGE_VERSION@,${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH},g ; \ s,@PTHREAD_CFLAGS@,,g ; \ s,@PTHREAD_LIBS@,,g' ${.ALLSRC} > ${.TARGET} Modified: stable/11/lib/liblzma/Symbol.map ============================================================================== --- stable/11/lib/liblzma/Symbol.map Sat Jul 4 03:28:13 2020 (r362917) +++ stable/11/lib/liblzma/Symbol.map Sat Jul 4 03:29:19 2020 (r362918) @@ -180,9 +180,6 @@ XZprivate_1.0 { lzma_raw_coder_memusage; lzma_raw_decoder_init; lzma_raw_encoder_init; - lzma_sha256_finish; - lzma_sha256_init; - lzma_sha256_update; lzma_simple_arm_decoder_init; lzma_simple_arm_encoder_init; lzma_simple_armthumb_decoder_init; Modified: stable/11/lib/liblzma/config.h ============================================================================== --- stable/11/lib/liblzma/config.h Sat Jul 4 03:28:13 2020 (r362917) +++ stable/11/lib/liblzma/config.h Sat Jul 4 03:29:19 2020 (r362918) @@ -211,16 +211,13 @@ /* #undef HAVE_SHA256INIT */ /* Define to 1 if the system has the type `SHA256_CTX'. */ -/* FreeBSD - disabled libmd SHA256 for now */ -/* #undef HAVE_SHA256_CTX */ +#define HAVE_SHA256_CTX 1 /* Define to 1 if you have the header file. */ -/* FreeBSD - disabled libmd SHA256 for now */ -/* #undef HAVE_SHA256_H */ +#define HAVE_SHA256_H 1 /* Define to 1 if you have the `SHA256_Init' function. */ -/* FreeBSD - disabled libmd SHA256 for now */ -/* #undef HAVE_SHA256_INIT */ +#define HAVE_SHA256_INIT 1 /* Define to 1 if the system has the type `SHA2_CTX'. */ /* #undef HAVE_SHA2_CTX */ Modified: stable/11/share/mk/src.libnames.mk ============================================================================== --- stable/11/share/mk/src.libnames.mk Sat Jul 4 03:28:13 2020 (r362917) +++ stable/11/share/mk/src.libnames.mk Sat Jul 4 03:29:19 2020 (r362918) @@ -302,7 +302,7 @@ _DP_heimipcs= heimbase roken pthread _DP_kafs5= asn1 krb5 roken _DP_krb5+= asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc _DP_gssapi_krb5+= gssapi krb5 crypto roken asn1 com_err -_DP_lzma= pthread +_DP_lzma= md pthread _DP_ucl= m _DP_vmmapi= util _DP_ctf= z From owner-svn-src-all@freebsd.org Sat Jul 4 03:30:20 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 761F436035F; Sat, 4 Jul 2020 03:30:20 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49zHQh2XSWz461F; Sat, 4 Jul 2020 03:30:20 +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 3A6AB16311; Sat, 4 Jul 2020 03:30:20 +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 0643UKkh016229; Sat, 4 Jul 2020 03:30:20 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0643UKpK016228; Sat, 4 Jul 2020 03:30:20 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202007040330.0643UKpK016228@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 4 Jul 2020 03:30:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362919 - stable/11/sys/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: stable/11/sys/sys X-SVN-Commit-Revision: 362919 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jul 2020 03:30:20 -0000 Author: delphij Date: Sat Jul 4 03:30:19 2020 New Revision: 362919 URL: https://svnweb.freebsd.org/changeset/base/362919 Log: Bump __FreeBSD_version after making liblzma to use libmd implementation of SHA256. Modified: stable/11/sys/sys/param.h Modified: stable/11/sys/sys/param.h ============================================================================== --- stable/11/sys/sys/param.h Sat Jul 4 03:29:19 2020 (r362918) +++ stable/11/sys/sys/param.h Sat Jul 4 03:30:19 2020 (r362919) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1104501 /* Master, propagated to newvers */ +#define __FreeBSD_version 1104502 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@freebsd.org Sat Jul 4 06:21:20 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D9E3D362773; Sat, 4 Jul 2020 06:21:20 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49zMD05JBYz4DMV; Sat, 4 Jul 2020 06:21:20 +0000 (UTC) (envelope-from mjg@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 9A83D17EEF; Sat, 4 Jul 2020 06:21:20 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0646LKxg023829; Sat, 4 Jul 2020 06:21:20 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0646LKZj023828; Sat, 4 Jul 2020 06:21:20 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202007040621.0646LKZj023828@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 4 Jul 2020 06:21:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362920 - head/sys/security/audit X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/security/audit X-SVN-Commit-Revision: 362920 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jul 2020 06:21:20 -0000 Author: mjg Date: Sat Jul 4 06:21:20 2020 New Revision: 362920 URL: https://svnweb.freebsd.org/changeset/base/362920 Log: audit: provide AUDITING_TD for !AUDIT case Modified: head/sys/security/audit/audit.h Modified: head/sys/security/audit/audit.h ============================================================================== --- head/sys/security/audit/audit.h Sat Jul 4 03:30:19 2020 (r362919) +++ head/sys/security/audit/audit.h Sat Jul 4 06:21:20 2020 (r362920) @@ -468,6 +468,8 @@ void audit_thread_free(struct thread *td); #define AUDIT_ARG_VNODE1(vp) #define AUDIT_ARG_VNODE2(vp) +#define AUDITING_TD(td) 0 + #define AUDIT_SYSCALL_ENTER(code, td) 0 #define AUDIT_SYSCALL_EXIT(error, td) From owner-svn-src-all@freebsd.org Sat Jul 4 06:22:06 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0E27C363081; Sat, 4 Jul 2020 06:22:06 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49zMDs6VRxz4DfF; Sat, 4 Jul 2020 06:22:05 +0000 (UTC) (envelope-from mjg@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 C25C51813F; Sat, 4 Jul 2020 06:22:05 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0646M5OC025754; Sat, 4 Jul 2020 06:22:05 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0646M5OD025751; Sat, 4 Jul 2020 06:22:05 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202007040622.0646M5OD025751@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 4 Jul 2020 06:22:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362921 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 362921 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jul 2020 06:22:06 -0000 Author: mjg Date: Sat Jul 4 06:22:05 2020 New Revision: 362921 URL: https://svnweb.freebsd.org/changeset/base/362921 Log: Add char and short types to kcsan Modified: head/sys/kern/subr_csan.c head/sys/sys/_cscan_atomic.h Modified: head/sys/kern/subr_csan.c ============================================================================== --- head/sys/kern/subr_csan.c Sat Jul 4 06:21:20 2020 (r362920) +++ head/sys/kern/subr_csan.c Sat Jul 4 06:22:05 2020 (r362921) @@ -590,6 +590,38 @@ CSAN_ATOMIC_FUNC_TESTANDCLEAR(64, uint64_t) CSAN_ATOMIC_FUNC_TESTANDSET(64, uint64_t) #endif +CSAN_ATOMIC_FUNC_ADD(char, uint8_t) +CSAN_ATOMIC_FUNC_CLEAR(char, uint8_t) +CSAN_ATOMIC_FUNC_CMPSET(char, uint8_t) +CSAN_ATOMIC_FUNC_FCMPSET(char, uint8_t) +CSAN_ATOMIC_FUNC_LOAD(char, uint8_t) +CSAN_ATOMIC_FUNC_SET(char, uint8_t) +CSAN_ATOMIC_FUNC_SUBTRACT(char, uint8_t) +_CSAN_ATOMIC_FUNC_STORE(char, uint8_t) +#if 0 +CSAN_ATOMIC_FUNC_FETCHADD(char, uint8_t) +CSAN_ATOMIC_FUNC_READANDCLEAR(char, uint8_t) +CSAN_ATOMIC_FUNC_SWAP(char, uint8_t) +CSAN_ATOMIC_FUNC_TESTANDCLEAR(char, uint8_t) +CSAN_ATOMIC_FUNC_TESTANDSET(char, uint8_t) +#endif + +CSAN_ATOMIC_FUNC_ADD(short, uint16_t) +CSAN_ATOMIC_FUNC_CLEAR(short, uint16_t) +CSAN_ATOMIC_FUNC_CMPSET(short, uint16_t) +CSAN_ATOMIC_FUNC_FCMPSET(short, uint16_t) +CSAN_ATOMIC_FUNC_LOAD(short, uint16_t) +CSAN_ATOMIC_FUNC_SET(short, uint16_t) +CSAN_ATOMIC_FUNC_SUBTRACT(short, uint16_t) +_CSAN_ATOMIC_FUNC_STORE(short, uint16_t) +#if 0 +CSAN_ATOMIC_FUNC_FETCHADD(short, uint16_t) +CSAN_ATOMIC_FUNC_READANDCLEAR(short, uint16_t) +CSAN_ATOMIC_FUNC_SWAP(short, uint16_t) +CSAN_ATOMIC_FUNC_TESTANDCLEAR(short, uint16_t) +CSAN_ATOMIC_FUNC_TESTANDSET(short, uint16_t) +#endif + CSAN_ATOMIC_FUNC_ADD(int, u_int) CSAN_ATOMIC_FUNC_CLEAR(int, u_int) CSAN_ATOMIC_FUNC_CMPSET(int, u_int) Modified: head/sys/sys/_cscan_atomic.h ============================================================================== --- head/sys/sys/_cscan_atomic.h Sat Jul 4 06:21:20 2020 (r362920) +++ head/sys/sys/_cscan_atomic.h Sat Jul 4 06:22:05 2020 (r362921) @@ -87,6 +87,8 @@ KCSAN_ATOMIC_TEST(testandclear, name, type); \ KCSAN_ATOMIC_TEST(testandset, name, type) +KCSAN_ATOMIC_FUNCS(char, uint8_t); +KCSAN_ATOMIC_FUNCS(short, uint16_t); KCSAN_ATOMIC_FUNCS(int, u_int); KCSAN_ATOMIC_FUNCS(long, u_long); KCSAN_ATOMIC_FUNCS(ptr, uintptr_t); @@ -101,6 +103,62 @@ void kcsan_atomic_thread_fence_rel(void); void kcsan_atomic_thread_fence_seq_cst(void); #ifndef KCSAN_RUNTIME + +#define atomic_add_char kcsan_atomic_add_char +#define atomic_add_acq_char kcsan_atomic_add_acq_char +#define atomic_add_rel_char kcsan_atomic_add_rel_char +#define atomic_clear_char kcsan_atomic_clear_char +#define atomic_clear_acq_char kcsan_atomic_clear_acq_char +#define atomic_clear_rel_char kcsan_atomic_clear_rel_char +#define atomic_cmpset_char kcsan_atomic_cmpset_char +#define atomic_cmpset_acq_char kcsan_atomic_cmpset_acq_char +#define atomic_cmpset_rel_char kcsan_atomic_cmpset_rel_char +#define atomic_fcmpset_char kcsan_atomic_fcmpset_char +#define atomic_fcmpset_acq_char kcsan_atomic_fcmpset_acq_char +#define atomic_fcmpset_rel_char kcsan_atomic_fcmpset_rel_char +#define atomic_fetchadd_char kcsan_atomic_fetchadd_char +#define atomic_load_char kcsan_atomic_load_char +#define atomic_load_acq_char kcsan_atomic_load_acq_char +#define atomic_readandclear_char kcsan_atomic_readandclear_char +#define atomic_set_char kcsan_atomic_set_char +#define atomic_set_acq_char kcsan_atomic_set_acq_char +#define atomic_set_rel_char kcsan_atomic_set_rel_char +#define atomic_subtract_char kcsan_atomic_subtract_char +#define atomic_subtract_acq_char kcsan_atomic_subtract_acq_char +#define atomic_subtract_rel_char kcsan_atomic_subtract_rel_char +#define atomic_store_char kcsan_atomic_store_char +#define atomic_store_rel_char kcsan_atomic_store_rel_char +#define atomic_swap_char kcsan_atomic_swap_char +#define atomic_testandclear_char kcsan_atomic_testandclear_char +#define atomic_testandset_char kcsan_atomic_testandset_char + +#define atomic_add_short kcsan_atomic_add_short +#define atomic_add_acq_short kcsan_atomic_add_acq_short +#define atomic_add_rel_short kcsan_atomic_add_rel_short +#define atomic_clear_short kcsan_atomic_clear_short +#define atomic_clear_acq_short kcsan_atomic_clear_acq_short +#define atomic_clear_rel_short kcsan_atomic_clear_rel_short +#define atomic_cmpset_short kcsan_atomic_cmpset_short +#define atomic_cmpset_acq_short kcsan_atomic_cmpset_acq_short +#define atomic_cmpset_rel_short kcsan_atomic_cmpset_rel_short +#define atomic_fcmpset_short kcsan_atomic_fcmpset_short +#define atomic_fcmpset_acq_short kcsan_atomic_fcmpset_acq_short +#define atomic_fcmpset_rel_short kcsan_atomic_fcmpset_rel_short +#define atomic_fetchadd_short kcsan_atomic_fetchadd_short +#define atomic_load_short kcsan_atomic_load_short +#define atomic_load_acq_short kcsan_atomic_load_acq_short +#define atomic_readandclear_short kcsan_atomic_readandclear_short +#define atomic_set_short kcsan_atomic_set_short +#define atomic_set_acq_short kcsan_atomic_set_acq_short +#define atomic_set_rel_short kcsan_atomic_set_rel_short +#define atomic_subtract_short kcsan_atomic_subtract_short +#define atomic_subtract_acq_short kcsan_atomic_subtract_acq_short +#define atomic_subtract_rel_short kcsan_atomic_subtract_rel_short +#define atomic_store_short kcsan_atomic_store_short +#define atomic_store_rel_short kcsan_atomic_store_rel_short +#define atomic_swap_short kcsan_atomic_swap_short +#define atomic_testandclear_short kcsan_atomic_testandclear_short +#define atomic_testandset_short kcsan_atomic_testandset_short #define atomic_add_int kcsan_atomic_add_int #define atomic_add_acq_int kcsan_atomic_add_acq_int From owner-svn-src-all@freebsd.org Sat Jul 4 06:25:42 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 60E71363100; Sat, 4 Jul 2020 06:25:42 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49zMK21Hhvz4FG0; Sat, 4 Jul 2020 06:25:42 +0000 (UTC) (envelope-from mjg@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 1030418448; Sat, 4 Jul 2020 06:25:42 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0646Pflf026708; Sat, 4 Jul 2020 06:25:41 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0646Pf7H026707; Sat, 4 Jul 2020 06:25:41 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202007040625.0646Pf7H026707@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 4 Jul 2020 06:25:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362922 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 362922 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jul 2020 06:25:42 -0000 Author: mjg Date: Sat Jul 4 06:25:41 2020 New Revision: 362922 URL: https://svnweb.freebsd.org/changeset/base/362922 Log: linux: fix ioctl performance for termios TCGETS et al are frequently issued by Linux binaries while the previous code avoidably ping-pongs a global sx lock and serializes on Giant. Note that even with the fix the common case will serialize on a per-tty lock. Modified: head/sys/compat/linux/linux_ioctl.c Modified: head/sys/compat/linux/linux_ioctl.c ============================================================================== --- head/sys/compat/linux/linux_ioctl.c Sat Jul 4 06:22:05 2020 (r362921) +++ head/sys/compat/linux/linux_ioctl.c Sat Jul 4 06:25:41 2020 (r362922) @@ -132,8 +132,6 @@ static struct linux_ioctl_handler socket_handler = { linux_ioctl_socket, LINUX_IOCTL_SOCKET_MIN, LINUX_IOCTL_SOCKET_MAX }; static struct linux_ioctl_handler sound_handler = { linux_ioctl_sound, LINUX_IOCTL_SOUND_MIN, LINUX_IOCTL_SOUND_MAX }; -static struct linux_ioctl_handler termio_handler = -{ linux_ioctl_termio, LINUX_IOCTL_TERMIO_MIN, LINUX_IOCTL_TERMIO_MAX }; static struct linux_ioctl_handler private_handler = { linux_ioctl_private, LINUX_IOCTL_PRIVATE_MIN, LINUX_IOCTL_PRIVATE_MAX }; static struct linux_ioctl_handler drm_handler = @@ -156,7 +154,6 @@ DATA_SET(linux_ioctl_handler_set, hdio_handler); DATA_SET(linux_ioctl_handler_set, disk_handler); DATA_SET(linux_ioctl_handler_set, socket_handler); DATA_SET(linux_ioctl_handler_set, sound_handler); -DATA_SET(linux_ioctl_handler_set, termio_handler); DATA_SET(linux_ioctl_handler_set, private_handler); DATA_SET(linux_ioctl_handler_set, drm_handler); DATA_SET(linux_ioctl_handler_set, sg_handler); @@ -165,6 +162,14 @@ DATA_SET(linux_ioctl_handler_set, video2_handler); DATA_SET(linux_ioctl_handler_set, fbsd_usb); DATA_SET(linux_ioctl_handler_set, evdev_handler); +/* + * Keep sorted by low. + */ +static struct linux_ioctl_handler linux_ioctls[] = { + { .func = linux_ioctl_termio, .low = LINUX_IOCTL_TERMIO_MIN, + .high = LINUX_IOCTL_TERMIO_MAX }, +}; + #ifdef __i386__ static TAILQ_HEAD(, linux_ioctl_handler_element) linux_ioctl_handlers = TAILQ_HEAD_INITIALIZER(linux_ioctl_handlers); @@ -3558,8 +3563,8 @@ linux_ioctl_evdev(struct thread *td, struct linux_ioct * main ioctl syscall function */ -int -linux_ioctl(struct thread *td, struct linux_ioctl_args *args) +static int +linux_ioctl_fallback(struct thread *td, struct linux_ioctl_args *args) { struct file *fp; struct linux_ioctl_handler_element *he; @@ -3618,6 +3623,35 @@ linux_ioctl(struct thread *td, struct linux_ioctl_args } return (EINVAL); +} + +int +linux_ioctl(struct thread *td, struct linux_ioctl_args *args) +{ + struct linux_ioctl_handler *handler; + int error, cmd, i; + + cmd = args->cmd & 0xffff; + + /* + * array of ioctls known at compilation time. Elides a lot of work on + * each call compared to the list variant. Everything frequently used + * should be moved here. + * + * Arguably the magic creating the list should create an array instead. + * + * For now just a linear scan. + */ + for (i = 0; i < nitems(linux_ioctls); i++) { + handler = &linux_ioctls[i]; + if (cmd >= handler->low && cmd <= handler->high) { + error = (*handler->func)(td, args); + if (error != ENOIOCTL) { + return (error); + } + } + } + return (linux_ioctl_fallback(td, args)); } int From owner-svn-src-all@freebsd.org Sat Jul 4 06:27:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 38354363123; Sat, 4 Jul 2020 06:27:29 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49zMM46bhdz4F7r; Sat, 4 Jul 2020 06:27:28 +0000 (UTC) (envelope-from mjg@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 C1A4518320; Sat, 4 Jul 2020 06:27:28 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0646RSgL026834; Sat, 4 Jul 2020 06:27:28 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0646RSEi026833; Sat, 4 Jul 2020 06:27:28 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202007040627.0646RSEi026833@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sat, 4 Jul 2020 06:27:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362923 - head/sys/fs/devfs X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/fs/devfs X-SVN-Commit-Revision: 362923 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jul 2020 06:27:29 -0000 Author: mjg Date: Sat Jul 4 06:27:28 2020 New Revision: 362923 URL: https://svnweb.freebsd.org/changeset/base/362923 Log: devfs: fix a vnode use-after-free in devfs_ioctl The vnode to be replaced was read with a shared lock, meaning 2 racing threads can find the same one. While here clean it up a little bit. Modified: head/sys/fs/devfs/devfs_vnops.c Modified: head/sys/fs/devfs/devfs_vnops.c ============================================================================== --- head/sys/fs/devfs/devfs_vnops.c Sat Jul 4 06:25:41 2020 (r362922) +++ head/sys/fs/devfs/devfs_vnops.c Sat Jul 4 06:27:28 2020 (r362923) @@ -787,6 +787,7 @@ devfs_ioctl(struct vop_ioctl_args *ap) struct vnode *vpold, *vp; struct cdevsw *dsw; struct thread *td; + struct session *sess; struct cdev *dev; int error, ref, i; const char *p; @@ -836,18 +837,18 @@ devfs_ioctl(struct vop_ioctl_args *ap) * nothing left to do. */ sx_slock(&proctree_lock); - if (td->td_proc->p_session->s_ttyvp == vp || - td->td_proc->p_session->s_ttyp == NULL) { + sess = td->td_proc->p_session; + if (sess->s_ttyvp == vp || sess->s_ttyp == NULL) { sx_sunlock(&proctree_lock); return (0); } - vpold = td->td_proc->p_session->s_ttyvp; - VREF(vp); - SESS_LOCK(td->td_proc->p_session); - td->td_proc->p_session->s_ttyvp = vp; - td->td_proc->p_session->s_ttydp = cdev2priv(dev); - SESS_UNLOCK(td->td_proc->p_session); + vrefact(vp); + SESS_LOCK(sess); + vpold = sess->s_ttyvp; + sess->s_ttyvp = vp; + sess->s_ttydp = cdev2priv(dev); + SESS_UNLOCK(sess); sx_sunlock(&proctree_lock); From owner-svn-src-all@freebsd.org Sat Jul 4 06:34:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3687C3630B9; Sat, 4 Jul 2020 06:34:57 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49zMWj0Jf5z4Fk6; Sat, 4 Jul 2020 06:34:57 +0000 (UTC) (envelope-from pstef@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 C62EA18525; Sat, 4 Jul 2020 06:34:56 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0646Yucq033004; Sat, 4 Jul 2020 06:34:56 GMT (envelope-from pstef@FreeBSD.org) Received: (from pstef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0646YtFN033001; Sat, 4 Jul 2020 06:34:55 GMT (envelope-from pstef@FreeBSD.org) Message-Id: <202007040634.0646YtFN033001@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pstef set sender to pstef@FreeBSD.org using -f From: Piotr Pawel Stefaniak Date: Sat, 4 Jul 2020 06:34:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362924 - stable/12/bin/ps X-SVN-Group: stable-12 X-SVN-Commit-Author: pstef X-SVN-Commit-Paths: stable/12/bin/ps X-SVN-Commit-Revision: 362924 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jul 2020 06:34:57 -0000 Author: pstef Date: Sat Jul 4 06:34:55 2020 New Revision: 362924 URL: https://svnweb.freebsd.org/changeset/base/362924 Log: MFC r362705 and r362707: ps(1): reuse keyword "cpu" to show CPU number ps(1): don't try to handle non-SMP systems Modified: stable/12/bin/ps/extern.h stable/12/bin/ps/keyword.c stable/12/bin/ps/print.c stable/12/bin/ps/ps.1 Directory Properties: stable/12/ (props changed) Modified: stable/12/bin/ps/extern.h ============================================================================== --- stable/12/bin/ps/extern.h Sat Jul 4 06:27:28 2020 (r362923) +++ stable/12/bin/ps/extern.h Sat Jul 4 06:34:55 2020 (r362924) @@ -48,6 +48,7 @@ __BEGIN_DECLS char *arguments(KINFO *, VARENT *); char *command(KINFO *, VARENT *); char *cputime(KINFO *, VARENT *); +char *cpunum(KINFO *, VARENT *); int donlist(void); char *elapsed(KINFO *, VARENT *); char *elapseds(KINFO *, VARENT *); Modified: stable/12/bin/ps/keyword.c ============================================================================== --- stable/12/bin/ps/keyword.c Sat Jul 4 06:27:28 2020 (r362923) +++ stable/12/bin/ps/keyword.c Sat Jul 4 06:34:55 2020 (r362924) @@ -83,8 +83,7 @@ static VAR var[] = { CHAR, NULL, 0}, {"cow", "COW", NULL, "copy-on-write-faults", 0, kvar, KOFF(ki_cow), UINT, "u", 0}, - {"cpu", "CPU", NULL, "cpu-usage", 0, kvar, KOFF(ki_estcpu), UINT, "d", - 0}, + {"cpu", "C", NULL, "on-cpu", 0, cpunum, 0, CHAR, NULL, 0}, {"cputime", "", "time", NULL, 0, NULL, 0, CHAR, NULL, 0}, {"dsiz", "DSIZ", NULL, "data-size", 0, kvar, KOFF(ki_dsize), PGTOK, "ld", 0}, Modified: stable/12/bin/ps/print.c ============================================================================== --- stable/12/bin/ps/print.c Sat Jul 4 06:27:28 2020 (r362923) +++ stable/12/bin/ps/print.c Sat Jul 4 06:34:55 2020 (r362924) @@ -551,6 +551,19 @@ cputime(KINFO *k, VARENT *ve) } char * +cpunum(KINFO *k, VARENT *ve __unused) +{ + char *cpu; + + if (k->ki_p->ki_stat == SRUN && k->ki_p->ki_oncpu != NOCPU) { + asprintf(&cpu, "%d", k->ki_p->ki_oncpu); + } else { + asprintf(&cpu, "%d", k->ki_p->ki_lastcpu); + } + return (cpu); +} + +char * systime(KINFO *k, VARENT *ve) { long secs, psecs; Modified: stable/12/bin/ps/ps.1 ============================================================================== --- stable/12/bin/ps/ps.1 Sat Jul 4 06:27:28 2020 (r362923) +++ stable/12/bin/ps/ps.1 Sat Jul 4 06:34:55 2020 (r362924) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd October 31, 2018 +.Dd June 27, 2020 .Dt PS 1 .Os .Sh NAME @@ -545,7 +545,8 @@ command and arguments .It Cm cow number of copy-on-write faults .It Cm cpu -short-term CPU usage factor (for scheduling) +The processor number on which the process is executing (visible only on SMP +systems). .It Cm dsiz data size (in Kbytes) .It Cm emul From owner-svn-src-all@freebsd.org Sat Jul 4 07:04:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 733D4363CC9; Sat, 4 Jul 2020 07:04:57 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49zNBK2rYrz4HGl; Sat, 4 Jul 2020 07:04:57 +0000 (UTC) (envelope-from hrs@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 27C0B188C9; Sat, 4 Jul 2020 07:04:57 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06474vXZ051614; Sat, 4 Jul 2020 07:04:57 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06474v2j051613; Sat, 4 Jul 2020 07:04:57 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <202007040704.06474v2j051613@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Sat, 4 Jul 2020 07:04:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362925 - in stable: 11/share/ctypedef 12/share/ctypedef X-SVN-Group: stable-11 X-SVN-Commit-Author: hrs X-SVN-Commit-Paths: in stable: 11/share/ctypedef 12/share/ctypedef X-SVN-Commit-Revision: 362925 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jul 2020 07:04:57 -0000 Author: hrs Date: Sat Jul 4 07:04:56 2020 New Revision: 362925 URL: https://svnweb.freebsd.org/changeset/base/362925 Log: MFC r362770: Fix CTYPE for ja_JP.eucJP and ja_JP.SJIS. PR: 163168 Modified: stable/11/share/ctypedef/ja_JP.eucJP.src Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/12/share/ctypedef/ja_JP.eucJP.src Directory Properties: stable/12/ (props changed) Modified: stable/11/share/ctypedef/ja_JP.eucJP.src ============================================================================== --- stable/11/share/ctypedef/ja_JP.eucJP.src Sat Jul 4 06:34:55 2020 (r362924) +++ stable/11/share/ctypedef/ja_JP.eucJP.src Sat Jul 4 07:04:56 2020 (r362925) @@ -49,7 +49,6 @@ upper ;/ ;/ ;/ ;/ - ;/ ;/ ;/ ;/ @@ -73,7 +72,6 @@ upper ;/ ;/ ;/ ;/ - ;/ ;/ ;/ ;/ @@ -85,7 +83,6 @@ upper ;/ ;/ ;/ ;/ - ;/ ;/ ;/ ;/ @@ -101,7 +98,6 @@ upper ;/ ;/ ;/ ;/ - ;/ ;/ ;/ ;/ @@ -126,45 +122,6 @@ upper ;/ ;/ ;/ ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ ;/ ;/ ;/ @@ -173,292 +130,86 @@ upper ;/ ;/ ;/ ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ ;/ ;/ ;/ @@ -556,19 +307,16 @@ lower ;/ ;/ ;/ ;/ - ;/ ;/ ;/ ;/ ;/ ;/ ;/ - ;/ ;/ ;/ ;/ ;/ - ;/ ;/ ;/ ;/ @@ -586,7 +334,6 @@ lower ;/ ;/ ;/ ;/ - ;/ ;/ ;/ ;/ @@ -610,37 +357,6 @@ lower ;/ ;/ ;/ ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ ;/ ;/ ;/ @@ -649,665 +365,89 @@ lower ;/ ;/ ;/ ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Jul 4 07:04:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8F88D363D2A; Sat, 4 Jul 2020 07:04:57 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49zNBK3fvbz4H1R; Sat, 4 Jul 2020 07:04:57 +0000 (UTC) (envelope-from hrs@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 5D8B918B99; Sat, 4 Jul 2020 07:04:57 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06474vZc051620; Sat, 4 Jul 2020 07:04:57 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06474v3o051619; Sat, 4 Jul 2020 07:04:57 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <202007040704.06474v3o051619@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Sat, 4 Jul 2020 07:04:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362925 - in stable: 11/share/ctypedef 12/share/ctypedef X-SVN-Group: stable-12 X-SVN-Commit-Author: hrs X-SVN-Commit-Paths: in stable: 11/share/ctypedef 12/share/ctypedef X-SVN-Commit-Revision: 362925 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jul 2020 07:04:57 -0000 Author: hrs Date: Sat Jul 4 07:04:56 2020 New Revision: 362925 URL: https://svnweb.freebsd.org/changeset/base/362925 Log: MFC r362770: Fix CTYPE for ja_JP.eucJP and ja_JP.SJIS. PR: 163168 Modified: stable/12/share/ctypedef/ja_JP.eucJP.src Directory Properties: stable/12/ (props changed) Changes in other areas also in this revision: Modified: stable/11/share/ctypedef/ja_JP.eucJP.src Directory Properties: stable/11/ (props changed) Modified: stable/12/share/ctypedef/ja_JP.eucJP.src ============================================================================== --- stable/12/share/ctypedef/ja_JP.eucJP.src Sat Jul 4 06:34:55 2020 (r362924) +++ stable/12/share/ctypedef/ja_JP.eucJP.src Sat Jul 4 07:04:56 2020 (r362925) @@ -49,7 +49,6 @@ upper ;/ ;/ ;/ ;/ - ;/ ;/ ;/ ;/ @@ -73,7 +72,6 @@ upper ;/ ;/ ;/ ;/ - ;/ ;/ ;/ ;/ @@ -85,7 +83,6 @@ upper ;/ ;/ ;/ ;/ - ;/ ;/ ;/ ;/ @@ -101,7 +98,6 @@ upper ;/ ;/ ;/ ;/ - ;/ ;/ ;/ ;/ @@ -126,45 +122,6 @@ upper ;/ ;/ ;/ ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ ;/ ;/ ;/ @@ -173,293 +130,86 @@ upper ;/ ;/ ;/ ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ + ;/ ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ ;/ ;/ ;/ @@ -557,19 +307,16 @@ lower ;/ ;/ ;/ ;/ - ;/ ;/ ;/ ;/ ;/ ;/ ;/ - ;/ ;/ ;/ ;/ ;/ - ;/ ;/ ;/ ;/ @@ -587,7 +334,6 @@ lower ;/ ;/ ;/ ;/ - ;/ ;/ ;/ ;/ @@ -611,37 +357,6 @@ lower ;/ ;/ ;/ ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ ;/ ;/ ;/ @@ -650,667 +365,89 @@ lower ;/ ;/ ;/ ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ - ;/ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Sat Jul 4 08:34:44 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 34808365C04; Sat, 4 Jul 2020 08:34:44 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49zQ9w0Ytkz4MfX; Sat, 4 Jul 2020 08:34:44 +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 EBAE519B2C; Sat, 4 Jul 2020 08:34:43 +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 0648YhAe007482; Sat, 4 Jul 2020 08:34:43 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0648Yhx3007481; Sat, 4 Jul 2020 08:34:43 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202007040834.0648Yhx3007481@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 4 Jul 2020 08:34:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362926 - stable/12/sys/amd64/amd64 X-SVN-Group: stable-12 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/12/sys/amd64/amd64 X-SVN-Commit-Revision: 362926 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jul 2020 08:34:44 -0000 Author: kib Date: Sat Jul 4 08:34:43 2020 New Revision: 362926 URL: https://svnweb.freebsd.org/changeset/base/362926 Log: MFC r362706: amd64 pmap: explain ptepindex. Modified: stable/12/sys/amd64/amd64/pmap.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/amd64/amd64/pmap.c ============================================================================== --- stable/12/sys/amd64/amd64/pmap.c Sat Jul 4 07:04:56 2020 (r362925) +++ stable/12/sys/amd64/amd64/pmap.c Sat Jul 4 08:34:43 2020 (r362926) @@ -3618,6 +3618,29 @@ pmap_pinit(pmap_t pmap) * one or two pages may be held during the wait, only to be released * afterwards. This conservative approach is easily argued to avoid * race conditions. + * + * The ptepindexes, i.e. page indices, of the page table pages encountered + * while translating virtual address va are defined as follows: + * - for the page table page (last level), + * ptepindex = pmap_pde_pindex(va) = va >> PDRSHIFT, + * in other words, it is just the index of the PDE that maps the page + * table page. + * - for the page directory page, + * ptepindex = NUPDE (number of userland PD entries) + + * (pmap_pde_index(va) >> NPDEPGSHIFT) + * i.e. index of PDPE is put after the last index of PDE, + * - for the page directory pointer page, + * ptepindex = NUPDE + NUPDPE + (pmap_pde_index(va) >> (NPDEPGSHIFT + + * NPML4EPGSHIFT), + * i.e. index of pml4e is put after the last index of PDPE. + * + * Define an order on the paging entries, where all entries of the + * same height are put together, then heights are put from deepest to + * root. Then ptexpindex is the sequential number of the + * corresponding paging entry in this order. + * + * The root page at PML4 does not participate in this indexing scheme, since + * it is statically allocated by pmap_pinit() and not by _pmap_allocpte(). */ static vm_page_t _pmap_allocpte(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp) From owner-svn-src-all@freebsd.org Sat Jul 4 08:36:07 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 52D60365A59; Sat, 4 Jul 2020 08:36:07 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49zQCW1VFWz4Md7; Sat, 4 Jul 2020 08:36:07 +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 15DAB19C9A; Sat, 4 Jul 2020 08:36:07 +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 0648a6rQ007613; Sat, 4 Jul 2020 08:36:06 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0648a66x007612; Sat, 4 Jul 2020 08:36:06 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202007040836.0648a66x007612@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 4 Jul 2020 08:36:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362927 - stable/11/sys/amd64/amd64 X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/amd64/amd64 X-SVN-Commit-Revision: 362927 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jul 2020 08:36:07 -0000 Author: kib Date: Sat Jul 4 08:36:06 2020 New Revision: 362927 URL: https://svnweb.freebsd.org/changeset/base/362927 Log: MFC r362706: amd64 pmap: explain ptepindex. Modified: stable/11/sys/amd64/amd64/pmap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/pmap.c ============================================================================== --- stable/11/sys/amd64/amd64/pmap.c Sat Jul 4 08:34:43 2020 (r362926) +++ stable/11/sys/amd64/amd64/pmap.c Sat Jul 4 08:36:06 2020 (r362927) @@ -2754,6 +2754,29 @@ pmap_pinit(pmap_t pmap) * one or two pages may be held during the wait, only to be released * afterwards. This conservative approach is easily argued to avoid * race conditions. + * + * The ptepindexes, i.e. page indices, of the page table pages encountered + * while translating virtual address va are defined as follows: + * - for the page table page (last level), + * ptepindex = pmap_pde_pindex(va) = va >> PDRSHIFT, + * in other words, it is just the index of the PDE that maps the page + * table page. + * - for the page directory page, + * ptepindex = NUPDE (number of userland PD entries) + + * (pmap_pde_index(va) >> NPDEPGSHIFT) + * i.e. index of PDPE is put after the last index of PDE, + * - for the page directory pointer page, + * ptepindex = NUPDE + NUPDPE + (pmap_pde_index(va) >> (NPDEPGSHIFT + + * NPML4EPGSHIFT), + * i.e. index of pml4e is put after the last index of PDPE. + * + * Define an order on the paging entries, where all entries of the + * same height are put together, then heights are put from deepest to + * root. Then ptexpindex is the sequential number of the + * corresponding paging entry in this order. + * + * The root page at PML4 does not participate in this indexing scheme, since + * it is statically allocated by pmap_pinit() and not by _pmap_allocpte(). */ static vm_page_t _pmap_allocpte(pmap_t pmap, vm_pindex_t ptepindex, struct rwlock **lockp) From owner-svn-src-all@freebsd.org Sat Jul 4 09:18:20 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2C6BA366BA4; Sat, 4 Jul 2020 09:18:20 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49zR8D0Rpmz4Phd; Sat, 4 Jul 2020 09:18:20 +0000 (UTC) (envelope-from lwhsu@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 E6D141A42E; Sat, 4 Jul 2020 09:18:19 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0649IJEs033000; Sat, 4 Jul 2020 09:18:19 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0649IJRi032997; Sat, 4 Jul 2020 09:18:19 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <202007040918.0649IJRi032997@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Sat, 4 Jul 2020 09:18:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362928 - in stable/12: share/man/man4 sys/dev/rtwn/usb sys/dev/usb X-SVN-Group: stable-12 X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: in stable/12: share/man/man4 sys/dev/rtwn/usb sys/dev/usb X-SVN-Commit-Revision: 362928 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jul 2020 09:18:20 -0000 Author: lwhsu Date: Sat Jul 4 09:18:19 2020 New Revision: 362928 URL: https://svnweb.freebsd.org/changeset/base/362928 Log: MFC r362672: rtwn: Add a USB ID for Buffalo WI-U2-433DHP PR: 247573 Submitted by: HATANO Tomomi Modified: stable/12/share/man/man4/rtwn_usb.4 stable/12/sys/dev/rtwn/usb/rtwn_usb_attach.h stable/12/sys/dev/usb/usbdevs Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/rtwn_usb.4 ============================================================================== --- stable/12/share/man/man4/rtwn_usb.4 Sat Jul 4 08:36:06 2020 (r362927) +++ stable/12/share/man/man4/rtwn_usb.4 Sat Jul 4 09:18:19 2020 (r362928) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\"/ -.Dd May 12, 2020 +.Dd June 27, 2020 .Dt RTWN_USB 4 .Os .Sh NAME @@ -67,6 +67,7 @@ based USB wireless network adapters, including: .It "ASUS USB-N10 NANO" Ta RTL8188CUS Ta USB 2.0 .It "Asus USB-N13, rev. B1" Ta RTL8192CU Ta USB 2.0 .It "Belkin F7D1102 Surf Wireless Micro" Ta RTL8188CUS Ta USB 2.0 +.It "Buffalo WI-U2-433DHP" Ta RTL8821AU Ta USB 2.0 .It "Buffalo WI-U2-433DM" Ta RTL8821AU Ta USB 2.0 .It "Buffalo WI-U3-866D" Ta RTL8812AU Ta USB 3.0 .It "D-Link DWA-123 rev D1" Ta RTL8188EU Ta USB 2.0 Modified: stable/12/sys/dev/rtwn/usb/rtwn_usb_attach.h ============================================================================== --- stable/12/sys/dev/rtwn/usb/rtwn_usb_attach.h Sat Jul 4 08:36:06 2020 (r362927) +++ stable/12/sys/dev/rtwn/usb/rtwn_usb_attach.h Sat Jul 4 09:18:19 2020 (r362928) @@ -158,6 +158,7 @@ static const STRUCT_USB_HOST_ID rtwn_devs[] = { RTWN_RTL8821AU_DEV(EDIMAX, EW7811UTC_2), RTWN_RTL8821AU_DEV(HAWKING, HD65U), RTWN_RTL8821AU_DEV(MELCO, WIU2433DM), + RTWN_RTL8821AU_DEV(MELCO, WIU2433DHP), RTWN_RTL8821AU_DEV(NETGEAR, A6100), RTWN_RTL8821AU_DEV(REALTEK, RTL8821AU_1), RTWN_RTL8821AU_DEV(REALTEK, RTL8821AU_2), Modified: stable/12/sys/dev/usb/usbdevs ============================================================================== --- stable/12/sys/dev/usb/usbdevs Sat Jul 4 08:36:06 2020 (r362927) +++ stable/12/sys/dev/usb/usbdevs Sat Jul 4 09:18:19 2020 (r362928) @@ -3190,6 +3190,7 @@ product MELCO WLIUCG300HPV1 0x01a8 WLI-UC-G300HP-V1 product MELCO WLIUCGNM2 0x01ee WLI-UC-GNM2 product MELCO WIU2433DM 0x0242 WI-U2-433DM product MELCO WIU3866D 0x025d WI-U3-866D +product MELCO WIU2433DHP 0x029b WI-U2-433DHP /* Merlin products */ product MERLIN V620 0x1110 Merlin V620 From owner-svn-src-all@freebsd.org Sat Jul 4 11:22:36 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 62EF1349E81; Sat, 4 Jul 2020 11:22:36 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49zTvc23wpz4Ws0; Sat, 4 Jul 2020 11:22:36 +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 2B7F41BAD2; Sat, 4 Jul 2020 11:22:36 +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 064BMaKU013687; Sat, 4 Jul 2020 11:22:36 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 064BMZR9013685; Sat, 4 Jul 2020 11:22:35 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202007041122.064BMZR9013685@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 4 Jul 2020 11:22:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362929 - in head/sys/compat: linprocfs linsysfs X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in head/sys/compat: linprocfs linsysfs X-SVN-Commit-Revision: 362929 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jul 2020 11:22:36 -0000 Author: trasz Date: Sat Jul 4 11:22:35 2020 New Revision: 362929 URL: https://svnweb.freebsd.org/changeset/base/362929 Log: Make linprocfs(5) create /proc/bus/pci/devices/, and linsysfs(5) create /sys/class/power_supply/. This silences some warnings from biology/linux-foldingathome. Reported by: 0mp MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25557 Modified: head/sys/compat/linprocfs/linprocfs.c head/sys/compat/linsysfs/linsysfs.c Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Sat Jul 4 09:18:19 2020 (r362928) +++ head/sys/compat/linprocfs/linprocfs.c Sat Jul 4 11:22:35 2020 (r362929) @@ -1746,6 +1746,11 @@ linprocfs_init(PFS_INIT_ARGS) pfs_create_file(root, "version", &linprocfs_doversion, NULL, NULL, NULL, PFS_RD); + /* /proc/bus/... */ + dir = pfs_create_dir(root, "bus", NULL, NULL, NULL, 0); + dir = pfs_create_dir(dir, "pci", NULL, NULL, NULL, 0); + dir = pfs_create_dir(dir, "devices", NULL, NULL, NULL, 0); + /* /proc/net/... */ dir = pfs_create_dir(root, "net", NULL, NULL, NULL, 0); pfs_create_file(dir, "dev", &linprocfs_donetdev, Modified: head/sys/compat/linsysfs/linsysfs.c ============================================================================== --- head/sys/compat/linsysfs/linsysfs.c Sat Jul 4 09:18:19 2020 (r362928) +++ head/sys/compat/linsysfs/linsysfs.c Sat Jul 4 11:22:35 2020 (r362929) @@ -622,6 +622,7 @@ linsysfs_init(PFS_INIT_ARGS) struct pfs_node *pci; struct pfs_node *scsi; struct pfs_node *net; + struct pfs_node *power_supply; struct pfs_node *devdir, *chardev; devclass_t devclass; device_t dev; @@ -634,6 +635,7 @@ linsysfs_init(PFS_INIT_ARGS) class = pfs_create_dir(root, "class", NULL, NULL, NULL, 0); scsi = pfs_create_dir(class, "scsi_host", NULL, NULL, NULL, 0); drm = pfs_create_dir(class, "drm", NULL, NULL, NULL, 0); + power_supply = pfs_create_dir(class, "power_supply", NULL, NULL, NULL, 0); /* /sys/class/net/.. */ net = pfs_create_dir(class, "net", NULL, NULL, NULL, 0); From owner-svn-src-all@freebsd.org Sat Jul 4 11:26:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 538B7349BD4; Sat, 4 Jul 2020 11:26:04 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49zTzc0lDhz4XCP; Sat, 4 Jul 2020 11:26:04 +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 D9E5F1BC9D; Sat, 4 Jul 2020 11:26:03 +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 064BQ3mL014010; Sat, 4 Jul 2020 11:26:03 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 064BQ38W014009; Sat, 4 Jul 2020 11:26:03 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202007041126.064BQ38W014009@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 4 Jul 2020 11:26:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362930 - head/sys/compat/linprocfs X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sys/compat/linprocfs X-SVN-Commit-Revision: 362930 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jul 2020 11:26:04 -0000 Author: trasz Date: Sat Jul 4 11:26:03 2020 New Revision: 362930 URL: https://svnweb.freebsd.org/changeset/base/362930 Log: Add /proc/sys/kernel/tainted to linprocfs(5). Helps LTP. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25556 Modified: head/sys/compat/linprocfs/linprocfs.c Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Sat Jul 4 11:22:35 2020 (r362929) +++ head/sys/compat/linprocfs/linprocfs.c Sat Jul 4 11:26:03 2020 (r362930) @@ -1414,6 +1414,17 @@ linprocfs_dosem(PFS_FILL_ARGS) } /* + * Filler function for proc/sys/kernel/tainted + */ +static int +linprocfs_dotainted(PFS_FILL_ARGS) +{ + + sbuf_printf(sb, "0\n"); + return (0); +} + +/* * Filler function for proc/sys/vm/min_free_kbytes * * This mirrors the approach in illumos to return zero for reads. Effectively, @@ -1814,6 +1825,8 @@ linprocfs_init(PFS_INIT_ARGS) pfs_create_file(dir, "pid_max", &linprocfs_dopid_max, NULL, NULL, NULL, PFS_RD); pfs_create_file(dir, "sem", &linprocfs_dosem, + NULL, NULL, NULL, PFS_RD); + pfs_create_file(dir, "tainted", &linprocfs_dotainted, NULL, NULL, NULL, PFS_RD); /* /proc/sys/kernel/random/... */ From owner-svn-src-all@freebsd.org Sat Jul 4 13:32:57 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C9EB734E96E; Sat, 4 Jul 2020 13:32:57 +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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49zXp14y1Tz3SdK; Sat, 4 Jul 2020 13:32:57 +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 8D4C21CFC7; Sat, 4 Jul 2020 13:32:57 +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 064DWvpg095168; Sat, 4 Jul 2020 13:32:57 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 064DWva6095167; Sat, 4 Jul 2020 13:32:57 GMT (envelope-from kib@FreeBSD.org) Message-Id: <202007041332.064DWva6095167@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 4 Jul 2020 13:32:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r362931 - svnadmin/conf X-SVN-Group: svnadmin X-SVN-Commit-Author: kib X-SVN-Commit-Paths: svnadmin/conf X-SVN-Commit-Revision: 362931 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jul 2020 13:32:57 -0000 Author: kib Date: Sat Jul 4 13:32:57 2020 New Revision: 362931 URL: https://svnweb.freebsd.org/changeset/base/362931 Log: Finish kaktus' mentorship. Discussed with: mjg Approved by: core (implicit) Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Sat Jul 4 11:26:03 2020 (r362930) +++ svnadmin/conf/mentors Sat Jul 4 13:32:57 2020 (r362931) @@ -18,7 +18,6 @@ jceel trasz jkh rwatson jrtc27 brooks Co-mentor: jhb kadesai ken Co-mentor: scottl, ambrisko -kaktus kib Co-mentor: mjg mjoras rstone nick philip Co-mentor: kp ram ken Co-mentor: mav From owner-svn-src-all@freebsd.org Sat Jul 4 14:20:04 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7D7C734F9FF; Sat, 4 Jul 2020 14:20:04 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49zYrN2mVGz3W4h; Sat, 4 Jul 2020 14:20:04 +0000 (UTC) (envelope-from kaktus@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 4333F1DD81; Sat, 4 Jul 2020 14:20:04 +0000 (UTC) (envelope-from kaktus@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 064EK46e020144; Sat, 4 Jul 2020 14:20:04 GMT (envelope-from kaktus@FreeBSD.org) Received: (from kaktus@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 064EK4Lk020143; Sat, 4 Jul 2020 14:20:04 GMT (envelope-from kaktus@FreeBSD.org) Message-Id: <202007041420.064EK4Lk020143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kaktus set sender to kaktus@FreeBSD.org using -f From: Pawel Biernacki Date: Sat, 4 Jul 2020 14:20:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362932 - head/sys/dev/ixl X-SVN-Group: head X-SVN-Commit-Author: kaktus X-SVN-Commit-Paths: head/sys/dev/ixl X-SVN-Commit-Revision: 362932 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jul 2020 14:20:04 -0000 Author: kaktus Date: Sat Jul 4 14:20:03 2020 New Revision: 362932 URL: https://svnweb.freebsd.org/changeset/base/362932 Log: dev.ixl..debug: mark as MPSAFE This node provides no handler, it's implicitly MPSAFE. Reviewed by: erj Sponsored by: Mysterious Code Ltd. Differential Revision: https://reviews.freebsd.org/D25408 Modified: head/sys/dev/ixl/if_iavf.c Modified: head/sys/dev/ixl/if_iavf.c ============================================================================== --- head/sys/dev/ixl/if_iavf.c Sat Jul 4 13:32:57 2020 (r362931) +++ head/sys/dev/ixl/if_iavf.c Sat Jul 4 14:20:03 2020 (r362932) @@ -2090,7 +2090,7 @@ iavf_add_device_sysctls(struct iavf_sc *sc) /* Add sysctls meant to print debug information, but don't list them * in "sysctl -a" output. */ debug_node = SYSCTL_ADD_NODE(ctx, ctx_list, - OID_AUTO, "debug", CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_NEEDGIANT, + OID_AUTO, "debug", CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_MPSAFE, NULL, "Debug Sysctls"); debug_list = SYSCTL_CHILDREN(debug_node); From owner-svn-src-all@freebsd.org Sat Jul 4 15:16:49 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A74EC350EDC; Sat, 4 Jul 2020 15:16:49 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49zb5s3vt2z3Yvj; Sat, 4 Jul 2020 15:16:49 +0000 (UTC) (envelope-from eugen@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 654291E6B0; Sat, 4 Jul 2020 15:16:49 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 064FGnR8056488; Sat, 4 Jul 2020 15:16:49 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 064FGnLe056486; Sat, 4 Jul 2020 15:16:49 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <202007041516.064FGnLe056486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Sat, 4 Jul 2020 15:16:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362933 - in stable/12: libexec/rc share/man/man5 X-SVN-Group: stable-12 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: in stable/12: libexec/rc share/man/man5 X-SVN-Commit-Revision: 362933 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jul 2020 15:16:49 -0000 Author: eugen Date: Sat Jul 4 15:16:48 2020 New Revision: 362933 URL: https://svnweb.freebsd.org/changeset/base/362933 Log: MFC r362502,r362503: network.subr, rc.conf: unobsolete gif_interfaces. There are cases when gif_interfaces cannot be replaced with cloned_interfaces, such as tunnels with external IPv6 addresses and internal IPv4 or vice versa. Such configuration requires extra invocation of ifconfig(8) and supported with gif_interfaces only. Modified: stable/12/libexec/rc/network.subr stable/12/share/man/man5/rc.conf.5 Directory Properties: stable/12/ (props changed) Modified: stable/12/libexec/rc/network.subr ============================================================================== --- stable/12/libexec/rc/network.subr Sat Jul 4 14:20:03 2020 (r362932) +++ stable/12/libexec/rc/network.subr Sat Jul 4 15:16:48 2020 (r362933) @@ -1364,9 +1364,6 @@ clone_up() fi esac done - if [ -n "$gif_interfaces" ]; then - warn "\$gif_interfaces is obsolete. Use \$cloned_interfaces instead." - fi for ifn in ${gif_interfaces}; do # Parse ifn:ifopt. OIFS=$IFS; IFS=:; set -- $ifn; ifn=$1; ifopt=$2; IFS=$OIFS Modified: stable/12/share/man/man5/rc.conf.5 ============================================================================== --- stable/12/share/man/man5/rc.conf.5 Sat Jul 4 14:20:03 2020 (r362932) +++ stable/12/share/man/man5/rc.conf.5 Sat Jul 4 15:16:48 2020 (r362933) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 8, 2020 +.Dd June 23, 2020 .Dt RC.CONF 5 .Os .Sh NAME @@ -1845,46 +1845,35 @@ Even if this variable is specified to .Dq :nosticky keyword can be used to override it on per interface basis. .It Va gif_interfaces -.Pq Vt str -This variable is deprecated in favor of -.Va cloned_interfaces . Set to the list of .Xr gif 4 tunnel interfaces to configure on this host. -For each -.Xr gif -tunnel interface, set a variable named -.Va ifconfig_ Ns Aq Ar interface -with the parameters for the -.Xr ifconfig 8 -command to configure the link level for -.Ar interface -with the -.Cm tunnel -option. +A +.Va gifconfig_ Ns Aq Ar interface +variable is assumed to exist for each value of +.Ar interface . The value of this variable is used to configure the link layer of the tunnel using the .Cm tunnel option to .Xr ifconfig . +Additionally, this option ensures that each listed interface is created +via the +.Cm create +option to +.Xr ifconfig +before attempting to configure it. +.Pp For example, configure two .Xr gif interfaces with: -.Bd -literal -offset indent +.Bd -literal gif_interfaces="gif0 gif1" -ifconfig_gif0="tunnel src_addr0 dst_addr0" -ifconfig_gif1="tunnel src_addr1 dst_addr1" +gifconfig_gif0="100.64.0.1 100.64.0.2" +ifconfig_gif0="inet 10.0.0.1 10.0.0.2 netmask 255.255.255.252" +gifconfig_gif1="inet6 2a00::1 2a01::1" +ifconfig_gif1="inet 10.1.0.1 10.1.0.2 netmask 255.255.255.252" .Ed -.Pp -Additionally, this option ensures that each listed interface is created -via the -.Cm create -option to -.Xr ifconfig . -This example also works with -.Va cloned_interfaces -instead of -.Va gif_interfaces . .It Va sppp_interfaces .Pq Vt str Set to the list of From owner-svn-src-all@freebsd.org Sat Jul 4 15:20:24 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EFAD535133A; Sat, 4 Jul 2020 15:20:24 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49zbB0633bz3Z5y; Sat, 4 Jul 2020 15:20:24 +0000 (UTC) (envelope-from eugen@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 B2DE01E2FA; Sat, 4 Jul 2020 15:20:24 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 064FKOon056929; Sat, 4 Jul 2020 15:20:24 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 064FKOZW056927; Sat, 4 Jul 2020 15:20:24 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <202007041520.064FKOZW056927@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Sat, 4 Jul 2020 15:20:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r362934 - in stable/11: etc share/man/man5 X-SVN-Group: stable-11 X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: in stable/11: etc share/man/man5 X-SVN-Commit-Revision: 362934 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jul 2020 15:20:25 -0000 Author: eugen Date: Sat Jul 4 15:20:23 2020 New Revision: 362934 URL: https://svnweb.freebsd.org/changeset/base/362934 Log: MFC r362502,r362503: network.subr, rc.conf: unobsolete gif_interfaces. There are cases when gif_interfaces cannot be replaced with cloned_interfaces, such as tunnels with external IPv6 addresses and internal IPv4 or vice versa. Such configuration requires extra invocation of ifconfig(8) and supported with gif_interfaces only. Modified: stable/11/etc/network.subr stable/11/share/man/man5/rc.conf.5 Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/network.subr ============================================================================== --- stable/11/etc/network.subr Sat Jul 4 15:16:48 2020 (r362933) +++ stable/11/etc/network.subr Sat Jul 4 15:20:23 2020 (r362934) @@ -1379,9 +1379,6 @@ clone_up() fi esac done - if [ -n "$gif_interfaces" ]; then - warn "\$gif_interfaces is obsolete. Use \$cloned_interfaces instead." - fi for ifn in ${gif_interfaces}; do # Parse ifn:ifopt. OIFS=$IFS; IFS=:; set -- $ifn; ifn=$1; ifopt=$2; IFS=$OIFS Modified: stable/11/share/man/man5/rc.conf.5 ============================================================================== --- stable/11/share/man/man5/rc.conf.5 Sat Jul 4 15:16:48 2020 (r362933) +++ stable/11/share/man/man5/rc.conf.5 Sat Jul 4 15:20:23 2020 (r362934) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 8, 2020 +.Dd June 23, 2020 .Dt RC.CONF 5 .Os .Sh NAME @@ -1842,46 +1842,35 @@ Even if this variable is specified to .Dq :nosticky keyword can be used to override it on per interface basis. .It Va gif_interfaces -.Pq Vt str -This variable is deprecated in favor of -.Va cloned_interfaces . Set to the list of .Xr gif 4 tunnel interfaces to configure on this host. -For each -.Xr gif -tunnel interface, set a variable named -.Va ifconfig_ Ns Aq Ar interface -with the parameters for the -.Xr ifconfig 8 -command to configure the link level for -.Ar interface -with the -.Cm tunnel -option. +A +.Va gifconfig_ Ns Aq Ar interface +variable is assumed to exist for each value of +.Ar interface . The value of this variable is used to configure the link layer of the tunnel using the .Cm tunnel option to .Xr ifconfig . +Additionally, this option ensures that each listed interface is created +via the +.Cm create +option to +.Xr ifconfig +before attempting to configure it. +.Pp For example, configure two .Xr gif interfaces with: -.Bd -literal -offset indent +.Bd -literal gif_interfaces="gif0 gif1" -ifconfig_gif0="tunnel src_addr0 dst_addr0" -ifconfig_gif1="tunnel src_addr1 dst_addr1" +gifconfig_gif0="100.64.0.1 100.64.0.2" +ifconfig_gif0="inet 10.0.0.1 10.0.0.2 netmask 255.255.255.252" +gifconfig_gif1="inet6 2a00::1 2a01::1" +ifconfig_gif1="inet 10.1.0.1 10.1.0.2 netmask 255.255.255.252" .Ed -.Pp -Additionally, this option ensures that each listed interface is created -via the -.Cm create -option to -.Xr ifconfig . -This example also works with -.Va cloned_interfaces -instead of -.Va gif_interfaces . .It Va sppp_interfaces .Pq Vt str Set to the list of From owner-svn-src-all@freebsd.org Sat Jul 4 18:01:29 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DBEB43545BD; Sat, 4 Jul 2020 18:01: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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49zfls5SXPz405g; Sat, 4 Jul 2020 18:01:29 +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 9EACC2042F; Sat, 4 Jul 2020 18:01:29 +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 064I1TCE059041; Sat, 4 Jul 2020 18:01:29 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 064I1TAc059039; Sat, 4 Jul 2020 18:01:29 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202007041801.064I1TAc059039@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 4 Jul 2020 18:01:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362935 - in head: libexec/rc/rc.d share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: in head: libexec/rc/rc.d share/man/man4 X-SVN-Commit-Revision: 362935 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jul 2020 18:01:29 -0000 Author: trasz Date: Sat Jul 4 18:01:29 2020 New Revision: 362935 URL: https://svnweb.freebsd.org/changeset/base/362935 Log: Make the linux rc script use linrdlnk by default. This fixes Linux gettyname(3), with caveats (see PR). PR: kern/240767 MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D25558 Modified: head/libexec/rc/rc.d/linux head/share/man/man4/linux.4 Modified: head/libexec/rc/rc.d/linux ============================================================================== --- head/libexec/rc/rc.d/linux Sat Jul 4 15:20:23 2020 (r362934) +++ head/libexec/rc/rc.d/linux Sat Jul 4 18:01:29 2020 (r362935) @@ -51,7 +51,7 @@ linux_start() mount -o nocover -t linprocfs linprocfs "${_emul_path}/proc" mount -o nocover -t linsysfs linsysfs "${_emul_path}/sys" mount -o nocover -t devfs devfs "${_emul_path}/dev" - mount -o nocover -t fdescfs fdescfs "${_emul_path}/dev/fd" + mount -o nocover,linrdlnk -t fdescfs fdescfs "${_emul_path}/dev/fd" mount -o nocover,mode=1777 -t tmpfs tmpfs "${_emul_path}/dev/shm" fi } Modified: head/share/man/man4/linux.4 ============================================================================== --- head/share/man/man4/linux.4 Sat Jul 4 15:20:23 2020 (r362934) +++ head/share/man/man4/linux.4 Sat Jul 4 18:01:29 2020 (r362935) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 12, 2020 +.Dd July 4, 2020 .Dt LINUX 4 .Os .Sh NAME @@ -130,7 +130,9 @@ Defaults to 0. .It Pa /compat/linux minimal Linux run-time environment .It Pa /compat/linux/dev/fd -file-descriptor file system, see +file descriptor file system mounted with the +.Cm linrdlnk +option, see .Xr fdescfs 5 .It Pa /compat/linux/dev/shm in-memory file system, see From owner-svn-src-all@freebsd.org Sat Jul 4 18:37:05 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6590B35554C; Sat, 4 Jul 2020 18:37: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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49zgXx1xKVz41s1; Sat, 4 Jul 2020 18:37: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 25D19206E3; Sat, 4 Jul 2020 18:37: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 064Ib47f082462; Sat, 4 Jul 2020 18:37:04 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 064Ib4PL082461; Sat, 4 Jul 2020 18:37:04 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <202007041837.064Ib4PL082461@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 4 Jul 2020 18:37:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362936 - head/sbin/newfs_msdos X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/sbin/newfs_msdos X-SVN-Commit-Revision: 362936 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jul 2020 18:37:05 -0000 Author: delphij Date: Sat Jul 4 18:37:04 2020 New Revision: 362936 URL: https://svnweb.freebsd.org/changeset/base/362936 Log: Gather writes to larger chunks (MAXPHYS) instead of issuing them in sectors. On my SanDisk Cruzer Blade 16GB USB stick this made formatting much faster: x before + after +--------------------------------------------------------------------------+ |+ | |+ x | |+ x x| |A MA|| +--------------------------------------------------------------------------+ N Min Max Median Avg Stddev x 3 15.89 16.38 16 16.09 0.2570992 + 3 0.32 0.37 0.35 0.34666667 0.025166115 Difference at 95.0% confidence -15.7433 +/- 0.414029 -97.8455% +/- 0.25668% (Student's t, pooled s = 0.182665) Reviewed by: emaste MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24508 Modified: head/sbin/newfs_msdos/mkfs_msdos.c Modified: head/sbin/newfs_msdos/mkfs_msdos.c ============================================================================== --- head/sbin/newfs_msdos/mkfs_msdos.c Sat Jul 4 18:01:29 2020 (r362935) +++ head/sbin/newfs_msdos/mkfs_msdos.c Sat Jul 4 18:37:04 2020 (r362936) @@ -64,6 +64,7 @@ static const char rcsid[] = #define DOSMAGIC 0xaa55 /* DOS magic number */ #define MINBPS 512 /* minimum bytes per sector */ +#define MAXBPS 4096 /* maximum bytes per sector */ #define MAXSPC 128 /* maximum sectors per cluster */ #define MAXNFT 16 /* maximum number of FATs */ #define DEFBLK 4096 /* default block size */ @@ -77,6 +78,25 @@ static const char rcsid[] = #define MAXCLS16 0xfff4U /* maximum FAT16 clusters */ #define MAXCLS32 0xffffff4U /* maximum FAT32 clusters */ +#ifndef CTASSERT +#define CTASSERT(x) _CTASSERT(x, __LINE__) +#define _CTASSERT(x, y) __CTASSERT(x, y) +#define __CTASSERT(x, y) typedef char __assert_ ## y [(x) ? 1 : -1] +#endif + +/* + * For better performance, we want to write larger chunks instead of + * individual sectors (the size can only be 512, 1024, 2048 or 4096 + * bytes). Assert that MAXPHYS can always hold an integer number of + * sectors by asserting that both are power of two numbers and the + * MAXPHYS is greater than MAXBPS. + */ +CTASSERT(powerof2(MAXPHYS)); +CTASSERT(powerof2(MAXBPS)); +CTASSERT(MAXPHYS > MAXBPS); + +const static ssize_t chunksize = MAXPHYS; + #define mincls(fat) ((fat) == 12 ? MINCLS12 : \ (fat) == 16 ? MINCLS16 : \ MINCLS32) @@ -243,6 +263,7 @@ mkfs_msdos(const char *fname, const char *dtype, const struct bsx *bsx; struct de *de; u_int8_t *img; + u_int8_t *physbuf, *physbuf_end; const char *bname; ssize_t n; time_t now; @@ -252,7 +273,7 @@ mkfs_msdos(const char *fname, const char *dtype, const int fd, fd1, rv; struct msdos_options o = *op; - img = NULL; + physbuf = NULL; rv = -1; fd = fd1 = -1; @@ -343,15 +364,13 @@ mkfs_msdos(const char *fname, const char *dtype, const bpb.bpbSecPerClust = 64; /* otherwise 32k */ } } - if (!powerof2(bpb.bpbBytesPerSec)) { - warnx("bytes/sector (%u) is not a power of 2", bpb.bpbBytesPerSec); + if (bpb.bpbBytesPerSec < MINBPS || + bpb.bpbBytesPerSec > MAXBPS || + !powerof2(bpb.bpbBytesPerSec)) { + warnx("Invalid bytes/sector (%u): must be 512, 1024, 2048 or 4096", + bpb.bpbBytesPerSec); goto done; } - if (bpb.bpbBytesPerSec < MINBPS) { - warnx("bytes/sector (%u) is too small; minimum is %u", - bpb.bpbBytesPerSec, MINBPS); - goto done; - } if (o.volume_label && !oklabel(o.volume_label)) { warnx("%s: bad volume label", o.volume_label); @@ -621,11 +640,14 @@ mkfs_msdos(const char *fname, const char *dtype, const tm = localtime(&now); } - - if (!(img = malloc(bpb.bpbBytesPerSec))) { + physbuf = malloc(chunksize); + if (physbuf == NULL) { warn(NULL); goto done; } + physbuf_end = physbuf + chunksize; + img = physbuf; + dir = bpb.bpbResSectors + (bpb.bpbFATsecs ? bpb.bpbFATsecs : bpb.bpbBigFATsecs) * bpb.bpbFATs; memset(&si_sa, 0, sizeof(si_sa)); @@ -750,19 +772,37 @@ mkfs_msdos(const char *fname, const char *dtype, const (u_int)tm->tm_mday; mk2(de->deMDate, x); } - if ((n = write(fd, img, bpb.bpbBytesPerSec)) == -1) { - warn("%s", fname); - goto done; + /* + * Issue a write of chunksize once we have collected + * enough sectors. + */ + img += bpb.bpbBytesPerSec; + if (img >= physbuf_end) { + n = write(fd, physbuf, chunksize); + if (n != chunksize) { + warnx("%s: can't write sector %u", fname, lsn); + goto done; + } + img = physbuf; } - if ((unsigned)n != bpb.bpbBytesPerSec) { - warnx("%s: can't write sector %u", fname, lsn); - goto done; - } } + /* + * Write remaining sectors, if the last write didn't end + * up filling a whole chunk. + */ + if (img != physbuf) { + ssize_t tailsize = img - physbuf; + + n = write(fd, physbuf, tailsize); + if (n != tailsize) { + warnx("%s: can't write sector %u", fname, lsn); + goto done; + } + } } rv = 0; done: - free(img); + free(physbuf); if (fd != -1) close(fd); if (fd1 != -1) From owner-svn-src-all@freebsd.org Sat Jul 4 19:02:10 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D3945355E18; Sat, 4 Jul 2020 19:02:10 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-ot1-f44.google.com (mail-ot1-f44.google.com [209.85.210.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49zh5t22rXz438R; Sat, 4 Jul 2020 19:02:10 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-ot1-f44.google.com with SMTP id 5so26835780oty.11; Sat, 04 Jul 2020 12:02:10 -0700 (PDT) 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=kAIPcqos0P65//5USrP/xzS1t1p4zztCxSsCDZOS9M4=; b=TdC1uOKq1nxzuaHkAkNSCzz96RzmYT58c4TyRmcWxzzbWm3DvA8Es1mzlYHU0pMcST Gc5z2qa16IfnltCo93UPtrN5eQLjDpM0Gy9ShrVLYLCaIvI7Vv9nrscv+bLB+0xEKBFN a9gEksfQIWEFEe6uArPLc7KtAmQQpcXE4xhHPOZoVXq9p8DWZfgzwwDEp/47eeLRRPwP l3XYuLRiKYXavurVi1QiW9Q9noX6PYYDg+Rwk5u++ZnjCyicddccqV67kN8qXkMTfFko 26qd6DSLVKLPok6byZedql6p8MrXBIDKN2+znRSWaw9lbipkX5OzeAL4NFKpCaCfFw7t E+7w== X-Gm-Message-State: AOAM530p9mSF+7exVUniiT3p5DIySUw+K2qzMXGsvuMaoQw3ort7i77J HkG9cbB2QwBFPYvZgY3HL31Yr+yg X-Google-Smtp-Source: ABdhPJy9wNNj8Ur8AGjgB9XTZMTKYa6JbvkXAmhH9E6d8j8esHqNqsox+BdKASusKS1jJMsUJsEvyg== X-Received: by 2002:a05:6830:138d:: with SMTP id d13mr9693538otq.298.1593889328319; Sat, 04 Jul 2020 12:02:08 -0700 (PDT) Received: from mail-ot1-f47.google.com (mail-ot1-f47.google.com. [209.85.210.47]) by smtp.gmail.com with ESMTPSA id l23sm4404114oot.41.2020.07.04.12.02.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 04 Jul 2020 12:02:08 -0700 (PDT) Received: by mail-ot1-f47.google.com with SMTP id w17so20989712otl.4; Sat, 04 Jul 2020 12:02:07 -0700 (PDT) X-Received: by 2002:a9d:2224:: with SMTP id o33mr36663051ota.216.1593889327326; Sat, 04 Jul 2020 12:02:07 -0700 (PDT) MIME-Version: 1.0 References: <202007041837.064Ib4PL082461@repo.freebsd.org> In-Reply-To: <202007041837.064Ib4PL082461@repo.freebsd.org> Reply-To: cem@freebsd.org From: Conrad Meyer Date: Sat, 4 Jul 2020 12:01:56 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r362936 - head/sbin/newfs_msdos To: Xin LI Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 49zh5t22rXz438R X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[]; REPLY(-4.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jul 2020 19:02:10 -0000 Hi Xin Li, Maybe we can use C11 static_assert instead of the CTASSERT array mechanism? Best, Conrad On Sat, Jul 4, 2020 at 11:37 Xin LI wrote: > Author: delphij > Date: Sat Jul 4 18:37:04 2020 > New Revision: 362936 > URL: https://svnweb.freebsd.org/changeset/base/362936 > > Log: > Gather writes to larger chunks (MAXPHYS) instead of issuing them in > sectors. > > On my SanDisk Cruzer Blade 16GB USB stick this made formatting much > faster: > > x before > + after > > +--------------------------------------------------------------------------+ > |+ > | > |+ > x | > |+ > x x| > |A > MA|| > > +--------------------------------------------------------------------------+ > N Min Max Median Avg > Stddev > x 3 15.89 16.38 16 16.09 > 0.2570992 > + 3 0.32 0.37 0.35 0.34666667 > 0.025166115 > Difference at 95.0% confidence > -15.7433 +/- 0.414029 > -97.8455% +/- 0.25668% > (Student's t, pooled s = 0.182665) > > Reviewed by: emaste > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D24508 > > Modified: > head/sbin/newfs_msdos/mkfs_msdos.c > > Modified: head/sbin/newfs_msdos/mkfs_msdos.c > > ============================================================================== > --- head/sbin/newfs_msdos/mkfs_msdos.c Sat Jul 4 18:01:29 2020 > (r362935) > +++ head/sbin/newfs_msdos/mkfs_msdos.c Sat Jul 4 18:37:04 2020 > (r362936) > @@ -64,6 +64,7 @@ static const char rcsid[] = > > #define DOSMAGIC 0xaa55 /* DOS magic number */ > #define MINBPS 512 /* minimum bytes per sector */ > +#define MAXBPS 4096 /* maximum bytes per sector */ > #define MAXSPC 128 /* maximum sectors per cluster */ > #define MAXNFT 16 /* maximum number of FATs */ > #define DEFBLK 4096 /* default block size */ > @@ -77,6 +78,25 @@ static const char rcsid[] = > #define MAXCLS16 0xfff4U /* maximum FAT16 clusters */ > #define MAXCLS32 0xffffff4U /* maximum FAT32 clusters */ > > +#ifndef CTASSERT > +#define CTASSERT(x) _CTASSERT(x, __LINE__) > +#define _CTASSERT(x, y) __CTASSERT(x, y) > +#define __CTASSERT(x, y) typedef char __assert_ ## y [(x) ? > 1 : -1] > +#endif > + > +/* > + * For better performance, we want to write larger chunks instead of > + * individual sectors (the size can only be 512, 1024, 2048 or 4096 > + * bytes). Assert that MAXPHYS can always hold an integer number of > + * sectors by asserting that both are power of two numbers and the > + * MAXPHYS is greater than MAXBPS. > + */ > +CTASSERT(powerof2(MAXPHYS)); > +CTASSERT(powerof2(MAXBPS)); > +CTASSERT(MAXPHYS > MAXBPS); > + > +const static ssize_t chunksize = MAXPHYS; > + > #define mincls(fat) ((fat) == 12 ? MINCLS12 : \ > (fat) == 16 ? MINCLS16 : \ > MINCLS32) > @@ -243,6 +263,7 @@ mkfs_msdos(const char *fname, const char *dtype, const > struct bsx *bsx; > struct de *de; > u_int8_t *img; > + u_int8_t *physbuf, *physbuf_end; > const char *bname; > ssize_t n; > time_t now; > @@ -252,7 +273,7 @@ mkfs_msdos(const char *fname, const char *dtype, const > int fd, fd1, rv; > struct msdos_options o = *op; > > - img = NULL; > + physbuf = NULL; > rv = -1; > fd = fd1 = -1; > > @@ -343,15 +364,13 @@ mkfs_msdos(const char *fname, const char *dtype, > const > bpb.bpbSecPerClust = 64; /* otherwise 32k */ > } > } > - if (!powerof2(bpb.bpbBytesPerSec)) { > - warnx("bytes/sector (%u) is not a power of 2", bpb.bpbBytesPerSec); > + if (bpb.bpbBytesPerSec < MINBPS || > + bpb.bpbBytesPerSec > MAXBPS || > + !powerof2(bpb.bpbBytesPerSec)) { > + warnx("Invalid bytes/sector (%u): must be 512, 1024, 2048 or 4096", > + bpb.bpbBytesPerSec); > goto done; > } > - if (bpb.bpbBytesPerSec < MINBPS) { > - warnx("bytes/sector (%u) is too small; minimum is %u", > - bpb.bpbBytesPerSec, MINBPS); > - goto done; > - } > > if (o.volume_label && !oklabel(o.volume_label)) { > warnx("%s: bad volume label", o.volume_label); > @@ -621,11 +640,14 @@ mkfs_msdos(const char *fname, const char *dtype, > const > tm = localtime(&now); > } > > - > - if (!(img = malloc(bpb.bpbBytesPerSec))) { > + physbuf = malloc(chunksize); > + if (physbuf == NULL) { > warn(NULL); > goto done; > } > + physbuf_end = physbuf + chunksize; > + img = physbuf; > + > dir = bpb.bpbResSectors + (bpb.bpbFATsecs ? bpb.bpbFATsecs : > bpb.bpbBigFATsecs) * bpb.bpbFATs; > memset(&si_sa, 0, sizeof(si_sa)); > @@ -750,19 +772,37 @@ mkfs_msdos(const char *fname, const char *dtype, > const > (u_int)tm->tm_mday; > mk2(de->deMDate, x); > } > - if ((n = write(fd, img, bpb.bpbBytesPerSec)) == -1) { > - warn("%s", fname); > - goto done; > + /* > + * Issue a write of chunksize once we have collected > + * enough sectors. > + */ > + img += bpb.bpbBytesPerSec; > + if (img >= physbuf_end) { > + n = write(fd, physbuf, chunksize); > + if (n != chunksize) { > + warnx("%s: can't write sector %u", fname, lsn); > + goto done; > + } > + img = physbuf; > } > - if ((unsigned)n != bpb.bpbBytesPerSec) { > - warnx("%s: can't write sector %u", fname, lsn); > - goto done; > - } > } > + /* > + * Write remaining sectors, if the last write didn't end > + * up filling a whole chunk. > + */ > + if (img != physbuf) { > + ssize_t tailsize = img - physbuf; > + > + n = write(fd, physbuf, tailsize); > + if (n != tailsize) { > + warnx("%s: can't write sector %u", fname, lsn); > + goto done; > + } > + } > } > rv = 0; > done: > - free(img); > + free(physbuf); > if (fd != -1) > close(fd); > if (fd1 != -1) > From owner-svn-src-all@freebsd.org Sat Jul 4 19:21:38 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E3DCA3564C8; Sat, 4 Jul 2020 19:21:38 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [64.62.153.212]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "anubis.delphij.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49zhXL3QwVz44Ft; Sat, 4 Jul 2020 19:21:38 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from p51.home.us.delphij.net (unknown [IPv6:2601:646:8600:58ba:e670:b8ff:fe5c:4e69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by anubis.delphij.net (Postfix) with ESMTPSA id 8883A3A119; Sat, 4 Jul 2020 12:21:30 -0700 (PDT) Reply-To: d@delphij.net Subject: Re: svn commit: r362936 - head/sbin/newfs_msdos To: cem@freebsd.org, Xin LI Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <202007041837.064Ib4PL082461@repo.freebsd.org> From: Xin Li Autocrypt: addr=delphij@delphij.net; keydata= mQINBFuSR4oBEACvvEgwRIHs6IcSP/yaDtySF78Ji3rP29qdiQsxhMsOtvtffdbS56VApIWO UFb3/iN2gA8HwLvrmjijN0HEoLVX7na1WARmxRYzQMtApsZIUTtx7hnUYlsi2F5odZa6CDW9 a954DLRzYxiUwYDcu5Zjl9bglK1H8e/N9uC0Vuigr4teWfh86brzOyf819QzwFVYfMIK4ihw QGwMvTzbyVuCFy+LENkmcVYni70oQy6rZ5ktSuYbuOFvu7inRRfhSWPHziV7k+bW88sJ7xhv lBlegcnhkSudWX2M8tZ3MO1PJOcyys0CJlsBY5Weiog2lIPi05h/E9pZ9mc1Vud17iqDaL6w RaggOUhuPfDGCdO5ro82W4BZGeQMRnRF5Ntk+t2ShIH4nn3xRLV0E5nziCiKlgiMqOrz/ZTL QTVbHrCuiwD+fSK14y0oHbkOLYTYLlgh1JbwfY2Ty7elOYiWzyeJ7sJh2dF91NSEneWIOys3 mBpuvtU3nSzzTvAB48VV+Nbg1CpIOgNlPjj7uhIum/Z/VjUaJEyaLpTIRh0MVJVcbP7hXSqZ NA35EEZZVnWEOYdycm4CmEdeNPWkrAf2Ya77iR5VLGypwMlsUMQPh+sKVWDD38M8stFGBBNm d01Hi74Bsq5hKan654dOqMt5eYklrVj0ucMzFQtus7oE502UswARAQABtBxYaW4gTEkgPGRl bHBoaWpAZGVscGhpai5uZXQ+iQJUBBMBCgA+FiEEceNg5NEMZIki80nQQHl/fJX0g08FAluS R/YCGwMFCQmuhAAFCwkIBwMFFQoJCAsFFgIDAQACHgECF4AACgkQQHl/fJX0g0+2Og//bWpE F2V5/M5l6YW1T8oLcT9rIOH6oq9M0LMNRgFeiNNnilGIeeIgtOGBRueG4CZiZAvsRPJkrO70 1R2SrdkCIvwGUzUAxx1NfBWb+vgm4fgkW/MotGonceM5v0qfSKKXasWvDctkK28aG+IoQzmi FjXNW4+ju4zeQFYwD4ZDWqw9MqO0hVb24uW3dxtQhbfmOLgJ/PEDMQaFuANbW1c+iR0BQA3D Go/EeMY4kpN8on6Aqt/S/4JVltudfQ9OXdjQsC7netSaB9K3mHGt9aKAAB7RzlRY00DKkYS/ /eQwLzGPmK7yX13M68mMDjBs6mIR8t/E1S5OdBNhHRPNPlEbwugR4KaiCsN5yqzJoSV99fKY z2VyxjWPaG8yhHE+jmKUgIBKTfFUQEfkriQR4EASoeJ+soaMTiFDBij1Zw5n3ndLRFMB1ZCl fZLER36mAgW4m4kP83TWnDiJLxOxSOxifV8HpTFjff902H85cybg9KMwrfPDr6W19GGk5Vo1 fkza5krRMGbKWb7+74Evusi0ZxJLIOFwp5Y8eVqUMZaAD3f1ZX1M3pgXOp20QgAy+2KvMHij rLa4q+tMGRzYYD1BnFVSVdXAX5VOoTmHBcDz67DkuRwk2Byp1sgd407oEOmSwrNJlKS0TPCm xUJ2fdSQF+1/MMSRfee49vtMvz7cOrC5Ag0EW5JHigEQANiBmIFAfRNH3nzYNWC0yC+tfx3z sUwAsH1VaBM/cTib+yKtbBOSIlXWjJZWX3MHwoI/1LeGghB2mxkkX1L0pJ/vj1eXNR+sFZ32 0pYcl61Fxg/5fioG4QDTM4i3i7NR5PxDnc6UVaynSlII93DedRhZ1ROtdn4vyMgzsDiqhbL7 BthDOt5KxjqdRk4qRPSw7BovEqZLOcG5IJtf/zZUzRbM7SBljEbOAfekDGx1Br+RrYSD7/Ef Pwwzou9T8315IpBpIHyQF/dZNk3iFiB9Ed5CA71ZRYV5YoLWE9lL0j9kxOLQ5vHnX3mVq7QZ Bc7nzwZ6UhQgYmrG5+RWvuiPpGwvDRIsugJUGXucYkAQh5kuNblmkwpv6u9rNMjCNbzAylOa qdogra5EW+RUSbRz0b4iIr8nnZeAlh7BihCe7JjOwbDjoBEEEtSfVc4hD/LENqpcYVrChphf aOLB9YIXhnVDTVvMc9OklWT/81HzAaDQqOQCzEfY92199Ct9/CwRoQ2OpO8TO5+8A7b9Nb33 nmxMn09mb48ruRacMrfHxCWbgU4w9SEfbip4GcS5wGG6yTC+hw55Iwnnwus40NrJ0GEr8a4r cdsLbkvlyoNHB8ZGgyJ4aFCQ1V4qE1BnlTk7Z8BYBUkJM1odPSkVvHpCnMUjVpJ3hEOC+73Z YH1dh7lZABEBAAGJAjwEGAEKACYWIQRx42Dk0QxkiSLzSdBAeX98lfSDTwUCW5JHigIbDAUJ Ca6EAAAKCRBAeX98lfSDTz8DEACMh3poeUb+gWNF4RWFZuLteZVo0+E1JLYXQkmtrRBLXviP +Qy0pXyFAVxLM4hNIBoIDYfK9BcwrBYf7AwSKrH0GiNwFpgHCkbZd6qoZy2gB+adTnCpVCTJ KJetsH/8awkrChJWMK0ckGf3EeWMPvawG7kW7FBz70NYEZ0pOMiaEZNVtzD3wwbYWUiDFYth 83XGglOExg+1ShTW5XjQPRrdyJAO+aUW4o3lVjfyUJXMgI4rmhMiLVm06GuNrbpKIF0s+4Vd jQAjhrDQjfoXi9CkfsA/cONseuHNv1JGj3RqHiqHJq1dbrpodXp925zGDAnUGxCOBPoFopAH gVzR89GTut059GpwqsddZmU6y7rqifuam/ekJ+QRwc16vgt7pHqCrTY8WPxRZr2UpFU1wlTo COdeiFep1gq1F9jzFjJnoMaAdmC6k7bgAA+RQusOgIhJL0jIej7DoAHxmxFFCfRy+lDtpXwF gQ8HMvzHI65QWmQnMo7s6SQH/ZH5s1yR6SJq8+3lDz+dCuT42qJVqIPVvxd10LW0FNN+t7HF eLadU6ekSgD13/EYMYXlvNHkw7dAItSDxIzgRyykLz0bCU9xwNWoS4Z43+ifF9anJ+uR0ltW El1j++h6ZrD3LLuCgJIt1so0m49GzdcSpOI7LCwMlacyvafiEyjUn+tSNDsnfw== Organization: The FreeBSD Project Message-ID: <2697ce4c-521f-8400-f05d-3d8c41efd865@delphij.net> Date: Sat, 4 Jul 2020 12:21:24 -0700 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="6eR4VNvaWS4dUGv3aJmeh6ZPWQpA9vuzZ" X-Rspamd-Queue-Id: 49zhXL3QwVz44Ft X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:64.62.128.0/18, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Jul 2020 19:21:39 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --6eR4VNvaWS4dUGv3aJmeh6ZPWQpA9vuzZ Content-Type: multipart/mixed; boundary="6KItCRYqdIR2cJNlTlk7S90DlWJpueKIl"; protected-headers="v1" From: Xin Li Reply-To: d@delphij.net To: cem@freebsd.org, Xin LI Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <2697ce4c-521f-8400-f05d-3d8c41efd865@delphij.net> Subject: Re: svn commit: r362936 - head/sbin/newfs_msdos References: <202007041837.064Ib4PL082461@repo.freebsd.org> In-Reply-To: --6KItCRYqdIR2cJNlTlk7S90DlWJpueKIl Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 7/4/20 12:01 PM, Conrad Meyer wrote: > Hi Xin Li, >=20 > Maybe we can use C11 static_assert instead of the CTASSERT array mechan= ism? Good point, maybe https://reviews.freebsd.org/D25562 ? --6KItCRYqdIR2cJNlTlk7S90DlWJpueKIl-- --6eR4VNvaWS4dUGv3aJmeh6ZPWQpA9vuzZ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.2.20 (FreeBSD) iQIzBAEBCgAdFiEEceNg5NEMZIki80nQQHl/fJX0g08FAl8A1rkACgkQQHl/fJX0 g0+bZQ/9GDgBoVtMUMyZvzIQaHEDiEm3ih53xbt2qkjn5ISy+4IVGzgcXjZvFNfH 8/maJl/YAxt06Y9eW0B6KSV7q2hbxkBtyfLbpqMnXSKO7hz4Pwk/xp/oXFBabWwR M3J9XAJFgMZr2GDrS7nyd9e2Tj7hJsUt2oEP2quUc8z190ZJCJqpoacv/Wx4tDqw dLph6elfENqGM6rxOpw1htM2xz1U6/RV1zLm0sAqOOHXX0PCrOZ0jpcGKVyF4pLp XrcvoF3aVlhGg/BgR7GTdEY1o4U+w81AJSofuIHmFcqVXMSsu1HnFLt4oPZGlZ3N 3HbQNhv1CfpLaZjC0GXlVUMI2x7OIYIHrSyWMP2nDbj6OZ99628HugTEKWqL4GQf Gdn2C9Vh/huE18JQJ0g1XIPSYPD9ZuUU7nspbaGdAIxAfzTzSN3iZZaq4J4+MoAH JPz79ILMzDoLJzLfqmtm/tfPTtBnmBGlo1rQFu9MHw7aQQtGmYA6VSbieGaQPNCZ QTzI+Otts2eyuZaTyoB5C4fqpga3RUHoRQ0AgivQUjh/Z9/fxb74d5nitvNN80Hk r/AkqSgy/f/54otcjBq4PQjFNpmmPSljna2uiIGnZDyzg2IqOjedJ8Ps77gnUi4M 6O+xVHgJh82O/Hw6tGz4z5/q1ZG/qrFmbN2wnnzsWS9qA8vEmT0= =JEpm -----END PGP SIGNATURE----- --6eR4VNvaWS4dUGv3aJmeh6ZPWQpA9vuzZ--