From owner-svn-src-all@freebsd.org Sun Jun 24 03:29:01 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74C211013FFB; Sun, 24 Jun 2018 03:29:01 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2949276048; Sun, 24 Jun 2018 03:29:01 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0AA93192C1; Sun, 24 Jun 2018 03:29:01 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5O3T0I6033163; Sun, 24 Jun 2018 03:29:00 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5O3T0kq033162; Sun, 24 Jun 2018 03:29:00 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201806240329.w5O3T0kq033162@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 24 Jun 2018 03:29:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335595 - head/etc X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/etc X-SVN-Commit-Revision: 335595 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.26 Precedence: list List-Id: "SVN commit messages 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, 24 Jun 2018 03:29:01 -0000 Author: ian Date: Sun Jun 24 03:29:00 2018 New Revision: 335595 URL: https://svnweb.freebsd.org/changeset/base/335595 Log: Modernize usage of "restrict" keyword in ntp.conf It is no longer necessary to specify a -4/-6 flag on any ntp.conf keyword. The address type is inferred from the address itself as necessary. "restrict default" statements always apply to both address families regardless of any -4/-6 flag that may be present. So this change just tidies up our default config by removing the redundant restrict -6 statement and comment, and by removing the -6 flag from the restrict keyword that allows access from localhost. This change was inspired by the patches provided in PRs 201803 and 210245, and included some contrib/ntp code inspection to verify that the -4/-6 keywords are basically no-ops in all contexts now. PR: 201803 210245 Differential Revision: https://reviews.freebsd.org/D15974 Modified: head/etc/ntp.conf Modified: head/etc/ntp.conf ============================================================================== --- head/etc/ntp.conf Sat Jun 23 23:44:36 2018 (r335594) +++ head/etc/ntp.conf Sun Jun 24 03:29:00 2018 (r335595) @@ -62,15 +62,13 @@ pool 0.freebsd.pool.ntp.org iburst # See http://support.ntp.org/bin/view/Support/AccessRestrictions # for more information. # -restrict default limited kod nomodify notrap noquery nopeer -restrict -6 default limited kod nomodify notrap noquery nopeer -restrict source limited kod nomodify notrap noquery +restrict default limited kod nomodify notrap noquery nopeer +restrict source limited kod nomodify notrap noquery # # Alternatively, the following rules would block all unauthorized access. # #restrict default ignore -#restrict -6 default ignore # # In this case, all remote NTP time servers also need to be explicitly # allowed or they would not be able to exchange time information with @@ -85,7 +83,7 @@ restrict source limited kod nomodify notrap noquer # # The following settings allow unrestricted access from the localhost restrict 127.0.0.1 -restrict -6 ::1 +restrict ::1 # # If a server loses sync with all upstream servers, NTP clients From owner-svn-src-all@freebsd.org Sun Jun 24 03:31:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADE39101409D; Sun, 24 Jun 2018 03:31:24 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 186F776325; Sun, 24 Jun 2018 03:31:24 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ED9941930B; Sun, 24 Jun 2018 03:31:23 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5O3VNsl035554; Sun, 24 Jun 2018 03:31:23 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5O3VNN3035553; Sun, 24 Jun 2018 03:31:23 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201806240331.w5O3VNN3035553@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 24 Jun 2018 03:31:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335596 - head/etc X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/etc X-SVN-Commit-Revision: 335596 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.26 Precedence: list List-Id: "SVN commit messages 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, 24 Jun 2018 03:31:24 -0000 Author: ian Date: Sun Jun 24 03:31:23 2018 New Revision: 335596 URL: https://svnweb.freebsd.org/changeset/base/335596 Log: Fix a comment; the ntp leaplist file is updated periodically, but not weekly (it's only updated when a check shows it's within 30 days of expiring). PR: 207138 Modified: head/etc/ntp.conf Modified: head/etc/ntp.conf ============================================================================== --- head/etc/ntp.conf Sun Jun 24 03:29:00 2018 (r335595) +++ head/etc/ntp.conf Sun Jun 24 03:31:23 2018 (r335596) @@ -99,6 +99,6 @@ restrict ::1 # See http://support.ntp.org/bin/view/Support/ConfiguringNTP#Section_6.14. # for documentation regarding leapfile. Updates to the file can be obtained # from ftp://time.nist.gov/pub/ or ftp://tycho.usno.navy.mil/pub/ntp/. -# Use either leapfile in /etc/ntp or weekly updated leapfile in /var/db. +# Use either leapfile in /etc/ntp or periodically updated leapfile in /var/db. #leapfile "/etc/ntp/leap-seconds" leapfile "/var/db/ntpd.leap-seconds.list" From owner-svn-src-all@freebsd.org Sun Jun 24 05:40:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E728D1019248; Sun, 24 Jun 2018 05:40:43 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 95D6F7A806; Sun, 24 Jun 2018 05:40:43 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 771E41A7E8; Sun, 24 Jun 2018 05:40:43 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5O5eham099180; Sun, 24 Jun 2018 05:40:43 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5O5eh5k099179; Sun, 24 Jun 2018 05:40:43 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201806240540.w5O5eh5k099179@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 24 Jun 2018 05:40:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335597 - head/sbin/newfs X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/sbin/newfs X-SVN-Commit-Revision: 335597 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.26 Precedence: list List-Id: "SVN commit messages 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, 24 Jun 2018 05:40:44 -0000 Author: eadler Date: Sun Jun 24 05:40:42 2018 New Revision: 335597 URL: https://svnweb.freebsd.org/changeset/base/335597 Log: newfs: clean up warnings - remove param: unused since r95357. - correct definition of usage - add explicit fallthrough notice. The existing one doesn't work with our selection of "implicit-fallthrough" strictness. This results in WARNS=6 building on amd64, but not other arches Modified: head/sbin/newfs/newfs.c Modified: head/sbin/newfs/newfs.c ============================================================================== --- head/sbin/newfs/newfs.c Sun Jun 24 03:31:23 2018 (r335596) +++ head/sbin/newfs/newfs.c Sun Jun 24 05:40:42 2018 (r335597) @@ -121,7 +121,7 @@ static char *dkname; static char *disktype; static void getfssize(intmax_t *, const char *p, intmax_t, intmax_t); -static struct disklabel *getdisklabel(char *s); +static struct disklabel *getdisklabel(void); static void usage(void); static int expand_number_int(const char *buf, int *num); @@ -185,6 +185,7 @@ main(int argc, char *argv[]) case 'j': jflag = 1; /* fall through to enable soft updates */ + /* FALLTHROUGH */ case 'U': Uflag = 1; break; @@ -351,7 +352,7 @@ main(int argc, char *argv[]) getfssize(&fssize, special, mediasize / sectorsize, reserved); } pp = NULL; - lp = getdisklabel(special); + lp = getdisklabel(); if (lp != NULL) { if (!is_file) /* already set for files */ part_name = special[strlen(special) - 1]; @@ -426,7 +427,7 @@ getfssize(intmax_t *fsz, const char *s, intmax_t disks } struct disklabel * -getdisklabel(char *s) +getdisklabel(void) { static struct disklabel lab; struct disklabel *lp; @@ -453,7 +454,7 @@ getdisklabel(char *s) } static void -usage() +usage(void) { fprintf(stderr, "usage: %s [ -fsoptions ] special-device%s\n", From owner-svn-src-all@freebsd.org Sun Jun 24 04:24:39 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E107C101617E; Sun, 24 Jun 2018 04:24:38 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-it0-x22b.google.com (mail-it0-x22b.google.com [IPv6:2607:f8b0:4001:c0b::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 79D8377DCC; Sun, 24 Jun 2018 04:24:38 +0000 (UTC) (envelope-from delphij@gmail.com) Received: by mail-it0-x22b.google.com with SMTP id 76-v6so7938625itx.4; Sat, 23 Jun 2018 21:24:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IAbAYAeb3ZvhkrIamVYdgxe6Uvxe68E+C8DQJUqMWAA=; b=Y8IeQu9VDXfB2WR7CPmUBx2dYm6K81E7pTi7CzrEx5G6WqVpLuLtqhE7kNLXo7moy/ ALUnROrrmq7VLCKPF9J6zb5A/ooNufdtIacRTjZeqC4YfTqS4I6T1cbTPvzPCVCBHu3C D8Ysg6UwKQHAX0RV7pSZwnwBBizeohEHopxx8cgSVCBZDUqZOjMfkMuc5S4vlIBt3W3/ DPUmi+9jE5n7ty+vrKY2fjQdkC/QRtqv+MgwC/CFurh62XxwWJCnbHxcCy7tSQzYZtY5 Bi10N0BTPZaTKCJKAOrNhCL8qvg/n6DRCGmEdAbnEeQjBG1kqPIp9EdPOGv+Jyl28B48 V0pQ== 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=IAbAYAeb3ZvhkrIamVYdgxe6Uvxe68E+C8DQJUqMWAA=; b=Mqh2kw3NyHsD1CasGlM/uOKpqbTsFjg4RqB3dRLsR380+FpaFcfZczOuS5vGOjR0mw x0d4QmXEp/S3i0SMbsTPzEYxutpuRrA2jcyo/VbDe6ECJk5UuSmw5MUaafX82GL/JCYU Ktw6OXRbVH/fR1pc55PiC/BCYucjLI4FVesHWgY4vuXRYjVyfUcQpJ/1rMg1tWs9BukN JvfLwP3oBBILxFRLAM4n968aoU4mRRuoGy4CC5ckk7E0kWNJgZXSFEQ3xhELqM7UJHXW kCL942WnkfWeEdfMMyZmk1RmTVe7qCBSmgQfOE+tnJ74BXo7M8L0Rh7hnVPOab6JaOHh 4b9Q== X-Gm-Message-State: APt69E1pkr9crqYwJXa0npnpIDfpZPUfLmw1/n09PRkmMWc0mKDb1lw9 o6iaaFJR8GXzDqEUbU1iN7de5fVqSg6QTKQ/TIH85w== X-Google-Smtp-Source: ADUXVKK4CU6Ib/mFCTSJnqmYpXNl7zHO6eqT4/H8ERjJE+CmT3QvyvbmHqEuGZupxD31oipwTQ7aWRP6HMOwRYcWgRA= X-Received: by 2002:a24:43cf:: with SMTP id s198-v6mr5787563itb.28.1529814277393; Sat, 23 Jun 2018 21:24:37 -0700 (PDT) MIME-Version: 1.0 References: <201806240329.w5O3T0kq033162@repo.freebsd.org> In-Reply-To: <201806240329.w5O3T0kq033162@repo.freebsd.org> From: Xin LI Date: Sat, 23 Jun 2018 21:24:25 -0700 Message-ID: Subject: Re: svn commit: r335595 - head/etc To: Ian Lepore Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 24 Jun 2018 04:24:39 -0000 Oh thanks for that. Is there a plan to MFC? On Sat, Jun 23, 2018 at 8:29 PM Ian Lepore wrote: > > Author: ian > Date: Sun Jun 24 03:29:00 2018 > New Revision: 335595 > URL: https://svnweb.freebsd.org/changeset/base/335595 > > Log: > Modernize usage of "restrict" keyword in ntp.conf > > It is no longer necessary to specify a -4/-6 flag on any ntp.conf > keyword. The address type is inferred from the address itself as > necessary. "restrict default" statements always apply to both address > families regardless of any -4/-6 flag that may be present. > > So this change just tidies up our default config by removing the redundant > restrict -6 statement and comment, and by removing the -6 flag from the > restrict keyword that allows access from localhost. > > This change was inspired by the patches provided in PRs 201803 and 210245, > and included some contrib/ntp code inspection to verify that the -4/-6 > keywords are basically no-ops in all contexts now. > > PR: 201803 210245 > Differential Revision: https://reviews.freebsd.org/D15974 > > Modified: > head/etc/ntp.conf > > Modified: head/etc/ntp.conf > ============================================================================== > --- head/etc/ntp.conf Sat Jun 23 23:44:36 2018 (r335594) > +++ head/etc/ntp.conf Sun Jun 24 03:29:00 2018 (r335595) > @@ -62,15 +62,13 @@ pool 0.freebsd.pool.ntp.org iburst > # See http://support.ntp.org/bin/view/Support/AccessRestrictions > # for more information. > # > -restrict default limited kod nomodify notrap noquery nopeer > -restrict -6 default limited kod nomodify notrap noquery nopeer > -restrict source limited kod nomodify notrap noquery > +restrict default limited kod nomodify notrap noquery nopeer > +restrict source limited kod nomodify notrap noquery > > # > # Alternatively, the following rules would block all unauthorized access. > # > #restrict default ignore > -#restrict -6 default ignore > # > # In this case, all remote NTP time servers also need to be explicitly > # allowed or they would not be able to exchange time information with > @@ -85,7 +83,7 @@ restrict source limited kod nomodify notrap noquer > # > # The following settings allow unrestricted access from the localhost > restrict 127.0.0.1 > -restrict -6 ::1 > +restrict ::1 > > # > # If a server loses sync with all upstream servers, NTP clients > From owner-svn-src-all@freebsd.org Sun Jun 24 09:39:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31E551021194; Sun, 24 Jun 2018 09:39:42 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AAABA81A5F; Sun, 24 Jun 2018 09:39:41 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 866CD1CE7C; Sun, 24 Jun 2018 09:39:41 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5O9dfow021011; Sun, 24 Jun 2018 09:39:41 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5O9dfpc021010; Sun, 24 Jun 2018 09:39:41 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201806240939.w5O9dfpc021010@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 24 Jun 2018 09:39:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335598 - in head: sbin usr.bin X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in head: sbin usr.bin X-SVN-Commit-Revision: 335598 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.26 Precedence: list List-Id: "SVN commit messages 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, 24 Jun 2018 09:39:42 -0000 Author: eadler Date: Sun Jun 24 09:39:40 2018 New Revision: 335598 URL: https://svnweb.freebsd.org/changeset/base/335598 Log: Makefiles: remove outdated comments Modified: head/sbin/Makefile head/usr.bin/Makefile Modified: head/sbin/Makefile ============================================================================== --- head/sbin/Makefile Sun Jun 24 05:40:42 2018 (r335597) +++ head/sbin/Makefile Sun Jun 24 09:39:40 2018 (r335598) @@ -3,8 +3,6 @@ .include -# XXX MISSING: icheck ncheck - SUBDIR=adjkerntz \ camcontrol \ clri \ Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Sun Jun 24 05:40:42 2018 (r335597) +++ head/usr.bin/Makefile Sun Jun 24 09:39:40 2018 (r335598) @@ -3,11 +3,6 @@ .include -# XXX MISSING: deroff diction graph learn plot -# spell spline struct xsend -# XXX Use GNU versions: diff ld patch -# - SUBDIR= alias \ apply \ asa \ From owner-svn-src-all@freebsd.org Sun Jun 24 12:52:39 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D3FE1027F5D; Sun, 24 Jun 2018 12:52:39 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CB03889F4; Sun, 24 Jun 2018 12:52:39 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2D0421EFFB; Sun, 24 Jun 2018 12:52:39 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5OCqdlU021812; Sun, 24 Jun 2018 12:52:39 GMT (envelope-from matthew@FreeBSD.org) Received: (from matthew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5OCqc54021810; Sun, 24 Jun 2018 12:52:38 GMT (envelope-from matthew@FreeBSD.org) Message-Id: <201806241252.w5OCqc54021810@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: matthew set sender to matthew@FreeBSD.org using -f From: Matthew Seaman Date: Sun, 24 Jun 2018 12:52:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r335599 - svnadmin/conf X-SVN-Group: svnadmin X-SVN-Commit-Author: matthew X-SVN-Commit-Paths: svnadmin/conf X-SVN-Commit-Revision: 335599 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.26 Precedence: list List-Id: "SVN commit messages 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, 24 Jun 2018 12:52:39 -0000 Author: matthew (ports committer) Date: Sun Jun 24 12:52:38 2018 New Revision: 335599 URL: https://svnweb.freebsd.org/changeset/base/335599 Log: Approved by: core Modified: svnadmin/conf/access svnadmin/conf/mentors Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Sun Jun 24 09:39:40 2018 (r335598) +++ svnadmin/conf/access Sun Jun 24 12:52:38 2018 (r335599) @@ -55,6 +55,7 @@ cracauer csjp cy dab +daichi davidcs dchagin def Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Sun Jun 24 09:39:40 2018 (r335598) +++ svnadmin/conf/mentors Sun Jun 24 12:52:38 2018 (r335599) @@ -15,6 +15,7 @@ anish neel Co-mentor: grehan arichardson jhb Co-mentor: brooks bcran eadler brd allanjude Co-mentor: bapt +daichi gnn def pjd eri ae Co-mentor: thompsa eugene avg Co-mentor: mav From owner-svn-src-all@freebsd.org Sun Jun 24 13:08:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 96CF110287A7; Sun, 24 Jun 2018 13:08: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 41CF28916D; Sun, 24 Jun 2018 13:08:06 +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 21D681F1A5; Sun, 24 Jun 2018 13:08:06 +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 w5OD86JM027623; Sun, 24 Jun 2018 13:08:06 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5OD85Kg027622; Sun, 24 Jun 2018 13:08:05 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201806241308.w5OD85Kg027622@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Sun, 24 Jun 2018 13:08:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335600 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 335600 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.26 Precedence: list List-Id: "SVN commit messages 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, 24 Jun 2018 13:08:06 -0000 Author: mjg Date: Sun Jun 24 13:08:05 2018 New Revision: 335600 URL: https://svnweb.freebsd.org/changeset/base/335600 Log: vm: stop passing M_ZERO when allocating radix nodes Allocation explicitely initialized the 3 leading fields. The rest is an array which is supposed to be NULL-ed prior to deallocation. Delegate zeroing to the infrequently called object initializator. This gets rid of one of the most common memset consumers. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D15989 Modified: head/sys/vm/vm_radix.c Modified: head/sys/vm/vm_radix.c ============================================================================== --- head/sys/vm/vm_radix.c Sun Jun 24 12:52:38 2018 (r335599) +++ head/sys/vm/vm_radix.c Sun Jun 24 13:08:05 2018 (r335600) @@ -112,7 +112,7 @@ vm_radix_node_get(vm_pindex_t owner, uint16_t count, u { struct vm_radix_node *rnode; - rnode = uma_zalloc(vm_radix_node_zone, M_NOWAIT | M_ZERO); + rnode = uma_zalloc(vm_radix_node_zone, M_NOWAIT); if (rnode == NULL) return (NULL); rnode->rn_owner = owner; @@ -283,6 +283,16 @@ vm_radix_node_zone_dtor(void *mem, int size __unused, } #endif +static int +vm_radix_node_zone_init(void *mem, int size __unused, int flags __unused) +{ + struct vm_radix_node *rnode; + + rnode = mem; + bzero(rnode, sizeof(*rnode)); + return (0); +} + #ifndef UMA_MD_SMALL_ALLOC void vm_radix_reserve_kva(void); /* @@ -321,7 +331,7 @@ vm_radix_zinit(void) #else NULL, #endif - NULL, NULL, VM_RADIX_PAD, UMA_ZONE_VM); + vm_radix_node_zone_init, NULL, VM_RADIX_PAD, UMA_ZONE_VM); } /* From owner-svn-src-all@freebsd.org Sun Jun 24 13:14:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53BAA1028AC0; Sun, 24 Jun 2018 13:14:05 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E066789685; Sun, 24 Jun 2018 13:14:04 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BC5A11F337; Sun, 24 Jun 2018 13:14:04 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5ODE4YA032553; Sun, 24 Jun 2018 13:14:04 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5ODE4DX032552; Sun, 24 Jun 2018 13:14:04 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201806241314.w5ODE4DX032552@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 24 Jun 2018 13:14:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335601 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 335601 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.26 Precedence: list List-Id: "SVN commit messages 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, 24 Jun 2018 13:14:05 -0000 Author: eadler Date: Sun Jun 24 13:14:04 2018 New Revision: 335601 URL: https://svnweb.freebsd.org/changeset/base/335601 Log: top(1): increase field with width for W/CPU column This allows 3 digit CPU columns to look nice Reported by: feld Modified: head/usr.bin/top/machine.c Modified: head/usr.bin/top/machine.c ============================================================================== --- head/usr.bin/top/machine.c Sun Jun 24 13:08:05 2018 (r335600) +++ head/usr.bin/top/machine.c Sun Jun 24 13:14:04 2018 (r335601) @@ -398,7 +398,7 @@ format_header(const char *uname_field) sbuf_cat(header, "C "); } sbuf_cat(header, "TIME "); - sbuf_printf(header, "%6s ", ps.wcpu ? "WCPU" : "CPU"); + sbuf_printf(header, " %6s ", ps.wcpu ? "WCPU" : "CPU"); sbuf_cat(header, "COMMAND"); sbuf_finish(header); break; @@ -1084,7 +1084,7 @@ format_next_process(struct handle * xhandle, char *(*g } sbuf_printf(procbuf, "%3d ", cpu); } - sbuf_printf(procbuf, "%6s", format_time(cputime)); + sbuf_printf(procbuf, "%6s ", format_time(cputime)); sbuf_printf(procbuf, "%6.2f%% ", ps.wcpu ? 100.0 * weighted_cpu(PCTCPU(pp), pp) : 100.0 * PCTCPU(pp)); } sbuf_printf(procbuf, "%.*s", From owner-svn-src-all@freebsd.org Sun Jun 24 13:20:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2B2DB1028CEB; Sun, 24 Jun 2018 13:20:42 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lf0-f47.google.com (mail-lf0-f47.google.com [209.85.215.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7EF2F899D7; Sun, 24 Jun 2018 13:20:38 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lf0-f47.google.com with SMTP id b7-v6so1561941lfa.0; Sun, 24 Jun 2018 06:20:38 -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:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=WwrccSRCGCGKdPekqSXF5V0UYgpDxBCR35B8PUVJueQ=; b=kO9H39LgkhgM57iyXRa96wcKh9PojOgEUh/MJ10b+UACY4BtrvXOH9YHxXijmUAakc TKK0V4GRLlyGYV7ljUwYejNzfLPINcL8FlrBF1/VaHKralO1zduCku7toVurbLO31yiG Dwt1phcmK3b9LmzUZV+cp6yTlsQu5jBDH1DxuFjSd5cflcn6EcE3bshckn1Z7CClqqHp 1xwmjKjQ/K4v70CcOyuqa5Ns539Rhopmeiq8Y/lF6gbrdV40K5XSeKrnWga8VZ0aGx+z IvCMkpxmO9UsYLRwXAenJDY6Te0KtcLcu3+rbFCE6Ck2a7LgE6RYRfHJC3cqQtNqU5AG Fw0Q== X-Gm-Message-State: APt69E30qFa6TplmupeulpnOi3TsnCl+kL3cViDUJz2FSp9qK/VX6C4/ BA5DJSIRU/poIgx66qaBUHetMk1g X-Google-Smtp-Source: ADUXVKKD50Y0iXKy6QHofztkmzXWdTkWkyh7cVcm1NfwD3SBP5wUiA+RDAL9SVrGgb6R3CLTCxqS6Q== X-Received: by 2002:a19:8e5c:: with SMTP id q89-v6mr3208121lfd.35.1529846430997; Sun, 24 Jun 2018 06:20:30 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id d20-v6sm1964580ljc.62.2018.06.24.06.20.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Jun 2018 06:20:30 -0700 (PDT) Subject: Re: svn commit: r335599 - svnadmin/conf To: Matthew Seaman , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org References: <201806241252.w5OCqc54021810@repo.freebsd.org> From: Andriy Gapon Openpgp: preference=signencrypt Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= xsFNBFm4LIgBEADNB/3lT7f15UKeQ52xCFQx/GqHkSxEdVyLFZTmY3KyNPQGBtyvVyBfprJ7 mAeXZWfhat6cKNRAGZcL5EmewdQuUfQfBdYmKjbw3a9GFDsDNuhDA2QwFt8BmkiVMRYyvI7l N0eVzszWCUgdc3qqM6qqcgBaqsVmJluwpvwp4ZBXmch5BgDDDb1MPO8AZ2QZfIQmplkj8Y6Z AiNMknkmgaekIINSJX8IzRzKD5WwMsin70psE8dpL/iBsA2cpJGzWMObVTtCxeDKlBCNqM1i gTXta1ukdUT7JgLEFZk9ceYQQMJJtUwzWu1UHfZn0Fs29HTqawfWPSZVbulbrnu5q55R4PlQ /xURkWQUTyDpqUvb4JK371zhepXiXDwrrpnyyZABm3SFLkk2bHlheeKU6Yql4pcmSVym1AS4 dV8y0oHAfdlSCF6tpOPf2+K9nW1CFA8b/tw4oJBTtfZ1kxXOMdyZU5fiG7xb1qDgpQKgHUX8 7Rd2T1UVLVeuhYlXNw2F+a2ucY+cMoqz3LtpksUiBppJhw099gEXehcN2JbUZ2TueJdt1FdS ztnZmsHUXLxrRBtGwqnFL7GSd6snpGIKuuL305iaOGODbb9c7ne1JqBbkw1wh8ci6vvwGlzx rexzimRaBzJxlkjNfMx8WpCvYebGMydNoeEtkWldtjTNVsUAtQARAQABzR5BbmRyaXkgR2Fw b24gPGF2Z0BGcmVlQlNELm9yZz7CwZQEEwEIAD4WIQS+LEO7ngQnXA4Bjr538m7TUc1yjwUC WbgsiAIbIwUJBaOagAULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgAAKCRB38m7TUc1yj+JAEACV l9AK/nOWAt/9cufV2fRj0hdOqB1aCshtSrwHk/exXsDa4/FkmegxXQGY+3GWX3deIyesbVRL rYdtdK0dqJyT1SBqXK1h3/at9rxr9GQA6KWOxTjUFURsU7ok/6SIlm8uLRPNKO+yq0GDjgaO LzN+xykuBA0FlhQAXJnpZLcVfPJdWv7sSHGedL5ln8P8rxR+XnmsA5TUaaPcbhTB+mG+iKFj GghASDSfGqLWFPBlX/fpXikBDZ1gvOr8nyMY9nXhgfXpq3B6QCRYKPy58ChrZ5weeJZ29b7/ QdEO8NFNWHjSD9meiLdWQaqo9Y7uUxN3wySc/YUZxtS0bhAd8zJdNPsJYG8sXgKjeBQMVGuT eCAJFEYJqbwWvIXMfVWop4+O4xB+z2YE3jAbG/9tB/GSnQdVSj3G8MS80iLS58frnt+RSEw/ psahrfh0dh6SFHttE049xYiC+cM8J27Aaf0i9RflyITq57NuJm+AHJoU9SQUkIF0nc6lfA+o JRiyRlHZHKoRQkIg4aiKaZSWjQYRl5Txl0IZUP1dSWMX4s3XTMurC/pnja45dge/4ESOtJ9R 8XuIWg45Oq6MeIWdjKddGhRj3OohsltKgkEU3eLKYtB6qRTQypHHUawCXz88uYt5e3w4V16H lCpSTZV/EVHnNe45FVBlvK7k7HFfDDkryM7BTQRZuCyIARAAlq0slcsVboY/+IUJdcbEiJRW be9HKVz4SUchq0z9MZPX/0dcnvz/gkyYA+OuM78dNS7Mbby5dTvOqfpLJfCuhaNYOhlE0wY+ 1T6Tf1f4c/uA3U/YiadukQ3+6TJuYGAdRZD5EqYFIkreARTVWg87N9g0fT9BEqLw9lJtEGDY EWUE7L++B8o4uu3LQFEYxcrb4K/WKmgtmFcm77s0IKDrfcX4doV92QTIpLiRxcOmCC/OCYuO jB1oaaqXQzZrCutXRK0L5XN1Y1PYjIrEzHMIXmCDlLYnpFkK+itlXwlE2ZQxkfMruCWdQXye syl2fynAe8hvp7Mms9qU2r2K9EcJiR5N1t1C2/kTKNUhcRv7Yd/vwusK7BqJbhlng5ZgRx0m WxdntU/JLEntz3QBsBsWM9Y9wf2V4tLv6/DuDBta781RsCB/UrU2zNuOEkSixlUiHxw1dccI 6CVlaWkkJBxmHX22GdDFrcjvwMNIbbyfQLuBq6IOh8nvu9vuItup7qemDG3Ms6TVwA7BD3j+ 3fGprtyW8Fd/RR2bW2+LWkMrqHffAr6Y6V3h5kd2G9Q8ZWpEJk+LG6Mk3fhZhmCnHhDu6CwN MeUvxXDVO+fqc3JjFm5OxhmfVeJKrbCEUJyM8ESWLoNHLqjywdZga4Q7P12g8DUQ1mRxYg/L HgZY3zfKOqcAEQEAAcLBfAQYAQgAJhYhBL4sQ7ueBCdcDgGOvnfybtNRzXKPBQJZuCyIAhsM BQkFo5qAAAoJEHfybtNRzXKPBVwQAKfFy9P7N3OsLDMB56A4Kf+ZT+d5cIx0Yiaf4n6w7m3i ImHHHk9FIetI4Xe54a2IXh4Bq5UkAGY0667eIs+Z1Ea6I2i27Sdo7DxGwq09Qnm/Y65ADvXs 3aBvokCcm7FsM1wky395m8xUos1681oV5oxgqeRI8/76qy0hD9WR65UW+HQgZRIcIjSel9vR XDaD2HLGPTTGr7u4v00UeTMs6qvPsa2PJagogrKY8RXdFtXvweQFz78NbXhluwix2Tb9ETPk LIpDrtzV73CaE2aqBG/KrboXT2C67BgFtnk7T7Y7iKq4/XvEdDWscz2wws91BOXuMMd4c/c4 OmGW9m3RBLufFrOag1q5yUS9QbFfyqL6dftJP3Zq/xe+mr7sbWbhPVCQFrH3r26mpmy841ym dwQnNcsbIGiBASBSKksOvIDYKa2Wy8htPmWFTEOPRpFXdGQ27awcjjnB42nngyCK5ukZDHi6 w0qK5DNQQCkiweevCIC6wc3p67jl1EMFY5+z+zdTPb3h7LeVnGqW0qBQl99vVFgzLxchKcl0 R/paSFgwqXCZhAKMuUHncJuynDOP7z5LirUeFI8qsBAJi1rXpQoLJTVcW72swZ42IdPiboqx NbTMiNOiE36GqMcTPfKylCbF45JNX4nF9ElM0E+Y8gi4cizJYBRr2FBJgay0b9Cp Message-ID: Date: Sun, 24 Jun 2018 16:20:29 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <201806241252.w5OCqc54021810@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.26 Precedence: list List-Id: "SVN commit messages 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, 24 Jun 2018 13:20:42 -0000 On 24/06/2018 15:52, Matthew Seaman wrote: > Log: > Approved by: core That's terse even by my standards. -- Andriy Gapon From owner-svn-src-all@freebsd.org Sun Jun 24 13:23:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2DDDC1028EE4; Sun, 24 Jun 2018 13:23:30 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D51AE89E18; Sun, 24 Jun 2018 13:23:29 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B6B9F1F4CD; Sun, 24 Jun 2018 13:23:29 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5ODNTWn037751; Sun, 24 Jun 2018 13:23:29 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5ODNRW2037739; Sun, 24 Jun 2018 13:23:27 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201806241323.w5ODNRW2037739@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sun, 24 Jun 2018 13:23:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335602 - head/sbin/dhclient X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/sbin/dhclient X-SVN-Commit-Revision: 335602 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.26 Precedence: list List-Id: "SVN commit messages 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, 24 Jun 2018 13:23:30 -0000 Author: eadler Date: Sun Jun 24 13:23:27 2018 New Revision: 335602 URL: https://svnweb.freebsd.org/changeset/base/335602 Log: dhclient: build with WARNS=6 - add static in a number of places - initialize __progname rather than rely on magical extern values - use nitems() instead of manually spelling it out - unshadow 'idi' - teach 'error' that it is '__dead2' - add missing 'break' Modified: head/sbin/dhclient/Makefile head/sbin/dhclient/bpf.c head/sbin/dhclient/clparse.c head/sbin/dhclient/conflex.c head/sbin/dhclient/dhclient.c head/sbin/dhclient/dhcpd.h head/sbin/dhclient/dispatch.c head/sbin/dhclient/options.c head/sbin/dhclient/privsep.c head/sbin/dhclient/privsep.h Modified: head/sbin/dhclient/Makefile ============================================================================== --- head/sbin/dhclient/Makefile Sun Jun 24 13:14:04 2018 (r335601) +++ head/sbin/dhclient/Makefile Sun Jun 24 13:23:27 2018 (r335602) @@ -50,7 +50,6 @@ LIBADD+= cap_syslog CFLAGS+=-DWITH_CASPER .endif -WARNS?= 4 NO_WCAST_ALIGN= yes HAS_TESTS= Modified: head/sbin/dhclient/bpf.c ============================================================================== --- head/sbin/dhclient/bpf.c Sun Jun 24 13:14:04 2018 (r335601) +++ head/sbin/dhclient/bpf.c Sun Jun 24 13:23:27 2018 (r335602) @@ -95,7 +95,7 @@ if_register_bpf(struct interface_info *info, int flags * Packet write filter program: * 'ip and udp and src port bootps and dst port (bootps or bootpc)' */ -struct bpf_insn dhcp_bpf_wfilter[] = { +static struct bpf_insn dhcp_bpf_wfilter[] = { BPF_STMT(BPF_LD + BPF_B + BPF_IND, 14), BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, (IPVERSION << 4) + 5, 0, 12), @@ -129,7 +129,7 @@ struct bpf_insn dhcp_bpf_wfilter[] = { BPF_STMT(BPF_RET+BPF_K, 0), }; -int dhcp_bpf_wfilter_len = sizeof(dhcp_bpf_wfilter) / sizeof(struct bpf_insn); +static int dhcp_bpf_wfilter_len = nitems(dhcp_bpf_wfilter); void if_register_send(struct interface_info *info) @@ -184,7 +184,7 @@ if_register_send(struct interface_info *info) * XXX: Changes to the filter program may require changes to the * constant offsets used in if_register_send to patch the BPF program! */ -struct bpf_insn dhcp_bpf_filter[] = { +static struct bpf_insn dhcp_bpf_filter[] = { /* Make sure this is an IP packet... */ BPF_STMT(BPF_LD + BPF_H + BPF_ABS, 12), BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ETHERTYPE_IP, 0, 8), @@ -211,7 +211,7 @@ struct bpf_insn dhcp_bpf_filter[] = { BPF_STMT(BPF_RET+BPF_K, 0), }; -int dhcp_bpf_filter_len = sizeof(dhcp_bpf_filter) / sizeof(struct bpf_insn); +static int dhcp_bpf_filter_len = nitems(dhcp_bpf_filter); void if_register_receive(struct interface_info *info) Modified: head/sbin/dhclient/clparse.c ============================================================================== --- head/sbin/dhclient/clparse.c Sun Jun 24 13:14:04 2018 (r335601) +++ head/sbin/dhclient/clparse.c Sun Jun 24 13:23:27 2018 (r335602) @@ -49,10 +49,9 @@ __FBSDID("$FreeBSD$"); #include "dhctoken.h" struct client_config top_level_config; -struct interface_info *dummy_interfaces; -extern struct interface_info *ifi; +static struct interface_info *dummy_interfaces; -char client_script_name[] = "/sbin/dhclient-script"; +static char client_script_name[] = "/sbin/dhclient-script"; /* * client-conf-file :== client-declarations EOF Modified: head/sbin/dhclient/conflex.c ============================================================================== --- head/sbin/dhclient/conflex.c Sun Jun 24 13:14:04 2018 (r335601) +++ head/sbin/dhclient/conflex.c Sun Jun 24 13:23:27 2018 (r335602) @@ -53,8 +53,8 @@ __FBSDID("$FreeBSD$"); int lexline; int lexchar; char *token_line; -char *prev_line; -char *cur_line; +static char *prev_line; +static char *cur_line; const char *tlname; int eol_token; @@ -347,6 +347,7 @@ intern(char *atom, int dfv) return (BOOTING); if (!strcasecmp(atom + 1, "oot-unknown-clients")) return (BOOT_UNKNOWN_CLIENTS); + break; case 'c': if (!strcasecmp(atom + 1, "lass")) return (CLASS); Modified: head/sbin/dhclient/dhclient.c ============================================================================== --- head/sbin/dhclient/dhclient.c Sun Jun 24 13:14:04 2018 (r335601) +++ head/sbin/dhclient/dhclient.c Sun Jun 24 13:23:27 2018 (r335602) @@ -65,9 +65,11 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include + #ifndef _PATH_VAREMPTY #define _PATH_VAREMPTY "/var/empty" #endif @@ -91,21 +93,21 @@ __FBSDID("$FreeBSD$"); cap_channel_t *capsyslog; time_t cur_time; -time_t default_lease_time = 43200; /* 12 hours... */ +static time_t default_lease_time = 43200; /* 12 hours... */ const char *path_dhclient_conf = _PATH_DHCLIENT_CONF; char *path_dhclient_db = NULL; int log_perror = 1; -int privfd; -int nullfd = -1; +static int privfd; +static int nullfd = -1; -char hostname[_POSIX_HOST_NAME_MAX + 1]; +static char hostname[_POSIX_HOST_NAME_MAX + 1]; -struct iaddr iaddr_broadcast = { 4, { 255, 255, 255, 255 } }; -struct in_addr inaddr_any, inaddr_broadcast; +static struct iaddr iaddr_broadcast = { 4, { 255, 255, 255, 255 } }; +static struct in_addr inaddr_any, inaddr_broadcast; -char *path_dhclient_pidfile; +static char *path_dhclient_pidfile; struct pidfh *pidfile; /* @@ -121,9 +123,9 @@ struct pidfh *pidfile; #define TIME_MAX ((((time_t) 1 << (sizeof(time_t) * CHAR_BIT - 2)) - 1) * 2 + 1) int log_priority; -int no_daemon; -int unknown_ok = 1; -int routefd; +static int no_daemon; +static int unknown_ok = 1; +static int routefd; struct interface_info *ifi; @@ -147,6 +149,7 @@ int fork_privchld(int, int); #define MIN_MTU 68 static time_t scripttime; +static char *__progname; int findproto(char *cp, int n) @@ -197,8 +200,8 @@ get_ifa(char *cp, int n) return (NULL); } -struct iaddr defaddr = { .len = 4 }; -uint8_t curbssid[6]; +static struct iaddr defaddr = { .len = 4 }; +static uint8_t curbssid[6]; static void disassoc(void *arg) @@ -369,7 +372,6 @@ init_casper(void) int main(int argc, char *argv[]) { - extern char *__progname; int ch, fd, quiet = 0, i = 0; int pipe_fd[2]; int immediate_daemon = 0; @@ -377,6 +379,8 @@ main(int argc, char *argv[]) pid_t otherpid; cap_rights_t rights; + __progname = basename(argv[0]); + init_casper(); /* Initially, log errors to stderr as well as to syslogd. */ @@ -561,7 +565,6 @@ main(int argc, char *argv[]) void usage(void) { - extern char *__progname; fprintf(stderr, "usage: %s [-bdqu] ", __progname); fprintf(stderr, "[-c conffile] [-l leasefile] interface\n"); @@ -1903,7 +1906,7 @@ free_client_lease(struct client_lease *lease) free(lease); } -FILE *leaseFile; +static FILE *leaseFile; void rewrite_client_leases(void) Modified: head/sbin/dhclient/dhcpd.h ============================================================================== --- head/sbin/dhclient/dhcpd.h Sun Jun 24 13:14:04 2018 (r335601) +++ head/sbin/dhclient/dhcpd.h Sun Jun 24 13:23:27 2018 (r335602) @@ -265,7 +265,7 @@ void do_packet(struct interface_info *, struct dhcp_pa /* errwarn.c */ extern int warnings_occurred; -void error(const char *, ...) __attribute__ ((__format__ (__printf__, 1, 2))); +void error(const char *, ...) __attribute__ ((__format__ (__printf__, 1, 2))) __dead2; int warning(const char *, ...) __attribute__ ((__format__ (__printf__, 1, 2))); int note(const char *, ...) __attribute__ ((__format__ (__printf__, 1, 2))); int debug(const char *, ...) __attribute__ ((__format__ (__printf__, 1, 2))); @@ -368,6 +368,8 @@ extern int log_perror; extern struct client_config top_level_config; extern struct pidfh *pidfile; + +extern struct interface_info *ifi; void dhcpoffer(struct packet *); void dhcpack(struct packet *); Modified: head/sbin/dhclient/dispatch.c ============================================================================== --- head/sbin/dhclient/dispatch.c Sun Jun 24 13:14:04 2018 (r335601) +++ head/sbin/dhclient/dispatch.c Sun Jun 24 13:23:27 2018 (r335602) @@ -57,8 +57,8 @@ __FBSDID("$FreeBSD$"); /* Assert that pointer p is aligned to at least align bytes */ #define assert_aligned(p, align) assert((((uintptr_t)p) & ((align) - 1)) == 0) -struct protocol *protocols; -struct timeout *timeouts; +static struct protocol *protocols; +static struct timeout *timeouts; static struct timeout *free_timeouts; static int interfaces_invalidated; void (*bootp_packet_handler)(struct interface_info *, Modified: head/sbin/dhclient/options.c ============================================================================== --- head/sbin/dhclient/options.c Sun Jun 24 13:14:04 2018 (r335601) +++ head/sbin/dhclient/options.c Sun Jun 24 13:23:27 2018 (r335602) @@ -50,8 +50,8 @@ __FBSDID("$FreeBSD$"); #define DHCP_OPTION_DATA #include "dhcpd.h" -int bad_options = 0; -int bad_options_max = 5; +static int bad_options = 0; +static int bad_options_max = 5; void parse_options(struct packet *); void parse_option_buffer(struct packet *, unsigned char *, int); Modified: head/sbin/dhclient/privsep.c ============================================================================== --- head/sbin/dhclient/privsep.c Sun Jun 24 13:14:04 2018 (r335601) +++ head/sbin/dhclient/privsep.c Sun Jun 24 13:23:27 2018 (r335602) @@ -102,7 +102,7 @@ buf_read(int sock, void *buf, size_t nbytes) } void -dispatch_imsg(struct interface_info *ifi, int fd) +dispatch_imsg(struct interface_info *ifix, int fd) { struct imsg_hdr hdr; char *medium, *reason, *filename, @@ -235,14 +235,14 @@ dispatch_imsg(struct interface_info *ifi, int fd) error("buf_close: %m"); break; case IMSG_SEND_PACKET: - send_packet_priv(ifi, &hdr, fd); + send_packet_priv(ifix, &hdr, fd); break; case IMSG_SET_INTERFACE_MTU: if (hdr.len < sizeof(hdr) + sizeof(u_int16_t)) error("corrupted message received"); buf_read(fd, &mtu, sizeof(u_int16_t)); - interface_set_mtu_priv(ifi->name, mtu); + interface_set_mtu_priv(ifix->name, mtu); break; default: error("received unknown message, code %d", hdr.code); Modified: head/sbin/dhclient/privsep.h ============================================================================== --- head/sbin/dhclient/privsep.h Sun Jun 24 13:14:04 2018 (r335601) +++ head/sbin/dhclient/privsep.h Sun Jun 24 13:23:27 2018 (r335602) @@ -44,8 +44,3 @@ struct imsg_hdr { enum imsg_code code; size_t len; }; - -struct buf *buf_open(size_t); -int buf_add(struct buf *, const void *, size_t); -int buf_close(int, struct buf *); -ssize_t buf_read(int sock, void *, size_t); From owner-svn-src-all@freebsd.org Sun Jun 24 13:26:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8DDF41000018; Sun, 24 Jun 2018 13:26:32 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 34AE789FBD; Sun, 24 Jun 2018 13:26:32 +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 12DC41F4D0; Sun, 24 Jun 2018 13:26:32 +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 w5ODQVZd038021; Sun, 24 Jun 2018 13:26:31 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5ODQVAg038020; Sun, 24 Jun 2018 13:26:31 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201806241326.w5ODQVAg038020@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 24 Jun 2018 13:26:31 +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: r335603 - stable/11/lib/libc/stdlib X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/lib/libc/stdlib X-SVN-Commit-Revision: 335603 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.26 Precedence: list List-Id: "SVN commit messages 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, 24 Jun 2018 13:26:32 -0000 Author: kib Date: Sun Jun 24 13:26:31 2018 New Revision: 335603 URL: https://svnweb.freebsd.org/changeset/base/335603 Log: MFC r334928: libc qsort(3): stop aliasing. PR: 228780 Modified: stable/11/lib/libc/stdlib/qsort.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/stdlib/qsort.c ============================================================================== --- stable/11/lib/libc/stdlib/qsort.c Sun Jun 24 13:23:27 2018 (r335602) +++ stable/11/lib/libc/stdlib/qsort.c Sun Jun 24 13:26:31 2018 (r335603) @@ -41,53 +41,27 @@ typedef int cmp_t(void *, const void *, const void * typedef int cmp_t(const void *, const void *); #endif static inline char *med3(char *, char *, char *, cmp_t *, void *); -static inline void swapfunc(char *, char *, size_t, int, int); #define MIN(a, b) ((a) < (b) ? a : b) /* * Qsort routine from Bentley & McIlroy's "Engineering a Sort Function". */ -#define swapcode(TYPE, parmi, parmj, n) { \ - size_t i = (n) / sizeof (TYPE); \ - TYPE *pi = (TYPE *) (parmi); \ - TYPE *pj = (TYPE *) (parmj); \ - do { \ - TYPE t = *pi; \ - *pi++ = *pj; \ - *pj++ = t; \ - } while (--i > 0); \ -} -#define SWAPINIT(TYPE, a, es) swaptype_ ## TYPE = \ - ((char *)a - (char *)0) % sizeof(TYPE) || \ - es % sizeof(TYPE) ? 2 : es == sizeof(TYPE) ? 0 : 1; - static inline void -swapfunc(char *a, char *b, size_t n, int swaptype_long, int swaptype_int) +swapfunc(char *a, char *b, size_t es) { - if (swaptype_long <= 1) - swapcode(long, a, b, n) - else if (swaptype_int <= 1) - swapcode(int, a, b, n) - else - swapcode(char, a, b, n) + char t; + + do { + t = *a; + *a++ = *b; + *b++ = t; + } while (--es > 0); } -#define swap(a, b) \ - if (swaptype_long == 0) { \ - long t = *(long *)(a); \ - *(long *)(a) = *(long *)(b); \ - *(long *)(b) = t; \ - } else if (swaptype_int == 0) { \ - int t = *(int *)(a); \ - *(int *)(a) = *(int *)(b); \ - *(int *)(b) = t; \ - } else \ - swapfunc(a, b, es, swaptype_long, swaptype_int) - #define vecswap(a, b, n) \ - if ((n) > 0) swapfunc(a, b, n, swaptype_long, swaptype_int) + if ((n) > 0) swapfunc(a, b, n) #ifdef I_AM_QSORT_R #define CMP(t, x, y) (cmp((t), (x), (y))) @@ -119,17 +93,16 @@ qsort(void *a, size_t n, size_t es, cmp_t *cmp) char *pa, *pb, *pc, *pd, *pl, *pm, *pn; size_t d1, d2; int cmp_result; - int swaptype_long, swaptype_int, swap_cnt; + int swap_cnt; -loop: SWAPINIT(long, a, es); - SWAPINIT(int, a, es); +loop: swap_cnt = 0; if (n < 7) { for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) for (pl = pm; pl > (char *)a && CMP(thunk, pl - es, pl) > 0; pl -= es) - swap(pl, pl - es); + swapfunc(pl, pl - es, es); return; } pm = (char *)a + (n / 2) * es; @@ -145,7 +118,7 @@ loop: SWAPINIT(long, a, es); } pm = med3(pl, pm, pn, cmp, thunk); } - swap(a, pm); + swapfunc(a, pm, es); pa = pb = (char *)a + es; pc = pd = (char *)a + (n - 1) * es; @@ -153,7 +126,7 @@ loop: SWAPINIT(long, a, es); while (pb <= pc && (cmp_result = CMP(thunk, pb, a)) <= 0) { if (cmp_result == 0) { swap_cnt = 1; - swap(pa, pb); + swapfunc(pa, pb, es); pa += es; } pb += es; @@ -161,14 +134,14 @@ loop: SWAPINIT(long, a, es); while (pb <= pc && (cmp_result = CMP(thunk, pc, a)) >= 0) { if (cmp_result == 0) { swap_cnt = 1; - swap(pc, pd); + swapfunc(pc, pd, es); pd -= es; } pc -= es; } if (pb > pc) break; - swap(pb, pc); + swapfunc(pb, pc, es); swap_cnt = 1; pb += es; pc -= es; @@ -178,7 +151,7 @@ loop: SWAPINIT(long, a, es); for (pl = pm; pl > (char *)a && CMP(thunk, pl - es, pl) > 0; pl -= es) - swap(pl, pl - es); + swapfunc(pl, pl - es, es); return; } From owner-svn-src-all@freebsd.org Sun Jun 24 13:29:10 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01F3610000FE; Sun, 24 Jun 2018 13:29:10 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [81.2.117.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "infracaninophile.co.uk" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D2E98A12F; Sun, 24 Jun 2018 13:29:09 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from liminal.local (unknown [IPv6:2001:8b0:151:1:90bd:be1f:5f0e:611e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: m.seaman@infracaninophile.co.uk) by smtp.infracaninophile.co.uk (Postfix) with ESMTPSA id 1E9471447; Sun, 24 Jun 2018 13:29:08 +0000 (UTC) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none (p=none dis=none) header.from=FreeBSD.org Authentication-Results: smtp.infracaninophile.co.uk/1E9471447; dkim=none; dkim-atps=neutral Subject: Re: svn commit: r335599 - svnadmin/conf To: Andriy Gapon , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org References: <201806241252.w5OCqc54021810@repo.freebsd.org> From: Matthew Seaman Openpgp: preference=signencrypt Autocrypt: addr=matthew@FreeBSD.org; prefer-encrypt=mutual; keydata= xsFNBFJIL80BEADi7/VbnnErDU6pjEhI/SzEZ/HbDRkJ5g7HroAtqIRm6nj8ZwOAgZ/2ZnWn 5F+fXTuLsG0FLNtkd17FoVcuCi5e/GPliXI5cmamV7E1Yz4T8UsJ7RQolimyxVexccKd16Tc AA7B9bFlJSKkBUSD0buj7VjT07xWhRzu6Vgi5r0UjLALYJz977uZA0F1aOGOXREDEAOhdcNc kSNjynqAwDA6dCT1Elpi4key1fYjv4jyDF+GU/YXul2Y/rguA8FCkHd9vyym5eAsLQ5mG00V V9fkEHIpH5KorNVnl/ufHXnkZqmHAZVpFDcrshb7aZ/pL45PXyWgLj+e6etelgj3a2bZi0JF cVdXCnBZVP2oIyYblM11ugTbfCwodORU8a5KfPeztMdAtDr4e+32NTrPdPi5rLT+GUsYz+PL 3A3m3u8bdsFp40DlIrBtSByVjqERxcfhphrEB4J8BXHUG7OAtXkZMlW/PGKDwXJq0O6Z5Tcg YHAoEiSWbXiexHgXNJyP+sqnIlhLWhSJGeJ+C83wqI6oYlZUCW00NkPxcIHnQPV/z+5wQVci TMyaWC2YCIHz4Ljs+TnwWMz0E8PNFDfHVbQ0W4PRGV7gRAqxfL+yKufauIEGbEq8rNDbSwL3 bcUCxR4ZDlaUEUwT4J8naf7rjdgiEYHs2Ig3jeK1+ER4FPG1sQARAQABzTBNYXR0aGV3IFNl YW1hbiA8bS5zZWFtYW5AaW5mcmFjYW5pbm9waGlsZS5jby51az7CwZcEEwEKAEECGwMFCwkI BwMFFQoJCAsFFgIDAQACHgECF4ACGQEWIQRyz6whebywJLW1RZADb2ye5/OevwUCWttU4QUJ DFmAlAAKCRADb2ye5/Oevwb5EACipbOazgwl5IbqkQI4gELpCh5dqDASS9DQqAD35n/cI91P 0lrYcdyCQbOXadQi5bswnP4AcJqX83mITXbcApDdxVxHujw7VODI069eV3/I9Qz72mHYYAAj w0CHNx4bKED2YCSVS6+jV5hq2sywNEUxL+4I218Oc+IsLts62m4tQ8UxX9fQ2H1kQOvdrYpj x7je5qJX/yujLc+9WWZ8ZBSdP/HVJUEdRgQotwAlgfMp3mRQEE73MAJisG/olj/dSxd+oHIP NbJt1yxMqhZekuEGqZpm3tWvqYgpGcEXdhphJSxeK6oLpTLghuAb7/WdOBrpfL7c2OQYBgOw DK+7Io9NBt/d/rCxL39jmUONW8ohrhnNQ2SALnyYTvZgruxA4tXxOOyM9up0/8mB5E8YC9ML 5YuxRPNTXYeWCexa0zktnkCgT7PhS33evf5gsA0B9Snv7TFCFN9adPAdHlsppZIWfTHDG8e2 Jik8PmvsUG34XNif5k6Ui3++2ZA8ZoKvOyLeomuno1hN8yk1APw8SbX1SPNz9UVbl8W/YgGj 3GhYOuQt4HcMiLyTby6R4lC4nsBaHS1MX+57f6Zxzf2wNjSKxiJK9qS7azbu/GxpafNhbz1Z +iUDIaJkRWA1Gs8C7SMcfVsI5zDtvqHGYtTCgooVMYJ6vRyB68M4bljUYMxRTs7BTQRSUUK4 ARAA1FhWoOejtwmsnGshoIbda2FmM+z/f97OzpagLhACHfP5Es/I18wG/0G+rdNuO2tjA9IM Z44GUMtjokDrDk63N9S+rVKy1QEy+UN6CiIfYTpTTAPnEY7IGN1JjGksPhn7aeuBCQwUMAV1 k+wklBCcOD6s8DD4kx0ZJqkH83XzWoBSVamdHvnM56C8yPVr5HHMC1tZInAWBMrF+cjl1EPf z3CqkVnG8Sxc5ydeibMS9Q3lHLeVkVlMRAmNqzNLfgJDUWtzac7JIjFEsxYYhpiaPcsstUUu Ha4zIRJ/yHDNbDttWRf1lrlFZLpeuap4BZ2hQw0UOZVNwGoFoS4ZqaZiv8mm0lX6s9/AdQD6 AVrpXWKa7JU2wDiay9sRbYh+5vVWGz9mhncK/Vfwtu5IjVp5v5WMz/WfnUxZMcNlfgTo4i1s www+qRBO2A4Yj8qKKWnTsl7aCX92itTiPgwbt6YgQPwgww72r67jPt5o8VMXDqPMPKzGicw1 AyxtMjsoSlnn91FuZctwil3vPpvzGXtBmrzQSbdDmy0KT5p5/W9pD/8UtLLLM6PLs5X0jIho vQHnQKEUO7xV3yNDAW9DPICeh7f/o9W+QJfQAXngNz0brvmgScAUXRaeAFeQbAmtEG92qlSV D7gb7WOemllgfbEn0Nanrv5aEcZCWx4WjybMLHEAEQEAAcLBZQQYAQoADwUCUlFCuAIbDAUJ Adf5AAAKCRADb2ye5/Oev8CLD/40aQCRpHTfydtq6sEVHFdpQCgGIE/47r46kr2x15C2wYPY m9JJ1lHvjpKt6N2gGfmiMfq8+PX1ppWp+qkZP4KF2PSxJJ6sjPNMne9+UhPEX5Xn3Z1vjRXJ t7BV0vhsB7WrI8jI9arpYkwVOkQyyjFxWeL0jvfGYYABttvlG/hjxuwI01vipuTfr89zjRYc C5hY1sg2bOn/tIe/V15Sj13Uo/JuFn7Aim91iEYrp5668qbWbLM/8hNqtECH6qLEhtoeoLlL bq6D3HIi00bYvcbBpig/azUasHio3gf4GNklQ5bVvWgIwV0Ue4TjXMCokpaLCq+CNaIqEO9v qJcEa4t0d7oXFHj6U9l6iSVPYRgXsCj/pBgYFPrdV6V8WNGHqa+yQBBtV9bSPNKF8xAjHQ5B KGardo1fBsF7P1CVE3SSr5IzZwk5DIeyCWGJjB8NGGaPWNPIvNyC9v5N9KpFe7WAOyAdEjR7 81ly0veYnFEFcVAmvW3FgzlEXQXw4M4FuniETd3idSJZpRBmq2jvxyfF3b69AdiLddcOAffR jGOBTezLtqxJstJhj7/s4yCuwQhUTpJzwoNBbPLqxmQ/THmdwx6VYAPIqOHBkSQj14nGyX5R vkfvZFq9OBKiVBSQi94jaaWZswqMfGeqZIOuZit+Q2TFTyS8b0R0dDaUUw32DMLBZQQYAQoA DwIbDAUCVCEGdQUJA7D3PQAKCRADb2ye5/Oev1gnD/4wJs6iWJrm2p7/7A0vt+ldL7j/ZaLw dl6XGiTvDY13qISfRwsl6yhsKgwqeAM5zOm1E6gzIdf7VwWx2/4KnQJ83nfBmU8KReUX3udT bVIk8Jo3sMYvPsWtNjRIHCLcXn54/Ajljp1cXihzQ0oXpFxn9sbZll4iE6TcKbPuBBFEsrbI xbjdtG7PNzjnhKkkwrORp2JsScWMcpvqq0/AvPeMKMbQ8SAkOZH20aWdw4wDbcm1bTrxSGYf bFsDmMXxueySeIWbDCwimeMFdWSItsCvHTKX8BIwDM6NP2sQY9Qya3p48HCmFGDpmHdZoU4f xp9+lZFvbNlG+gtY1up3HNYZ9pIbOOdKDjkKtymYX+F2gNflgD/Jp/Fa2EXDzk/iQ73gdT66 2TP9C0WOkFiM17bv5HmmFMGxG0Ap6Ntt8dcqZb2/XoBjR88ssrgDaSbFtpDkUIMy6OarXCii ioMF+bgpPDIffOFPRSFsB+jmMcGu2r3q5I6C3fpTgHh9towgJLhw0pfl08Vr+q3oODcOcXwk NbTrBtM3T5SrLv/lQqWtZmCppWDuRuFt02/jbMaVmWCnpQJN89Z+44H+Fu2ZL+sZSDhsBE0w O7iGAfgP1yIIiK/zunx6IMuNMf5v1y6StOHO/PqJ4+q8IWKBLzjWzEnpNiT5CA/Hdk7v+Va1 Ypd9XsLBfAQYAQoAJgIbDBYhBHLPrCF5vLAktbVFkANvbJ7n856/BQJa21VJBQkMUG4RAAoJ EANvbJ7n856/mAcP/0ybQAvXfxWEEBykIP0DhJHAC/EMeBwNkiAp4Sqr+uIz3GCFGKHDjvEG sofiFQ2ujBpG7FncHlBbnsTLFvte3ahE30I1AKcd9k1MBeOFoCBHwES1ts0XUXF37E+ANrEC QrzSayZx95csIiYvlfOPEOLAt7EiURKXCXdO6HNo8UimcmGdQwT3ytTMosHAbdrhQk13chTI WptmmCwz9iWLxT9PLY01ACCoXuAdGz07ZXQn+bB+avMa6Wh5yh39J+6jJiuzbRlv/Uelogq7 ojbC5zveX5rNbcyinwOEFyGAhFpfF7ESsKedR2Q40LvysT7I5ugS+Hk4Z2nvbd2bOSdC4j8a BWzfqVu2p37d2AnnswfPoLrOyNUZ+ciTEcmEUVR7WWUwQ0H6A6h4C2NeBmLRRjk9CEfzrgM2 DNQqDL1RMYKlVosQ8BeUR9ThztUwDakxnK0ZtZb2rAliKYaaEFbZDePz1xmvjYc7EZq/3OTl GMUDa6BPHHbCvJjiAUc/Q9iaRe3dp69V/rwOM5NiS+tWgp3OtgX0mDWVoQnDjyWVIRU/QagJ HsNJJCc0N48BxgIX3H6M0x6BbA9PKgFtDlK4hLR/hDl5fnWG45TVIxT4ybuPXGW7af9U6bGD gXTBNUCzNUz2p2F2u7W/iK0WTfjovYvVVcptegyu6ttZN49KkQtL Message-ID: <6ba5cb49-a1ba-53d1-2ae6-7290bc4bd637@FreeBSD.org> Date: Sun, 24 Jun 2018 14:29:07 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="vVztpw9UXhOL9jsAfTUGhHZ3gc49snhjs" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 24 Jun 2018 13:29:10 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --vVztpw9UXhOL9jsAfTUGhHZ3gc49snhjs Content-Type: multipart/mixed; boundary="Fjo9HNLdyhbyp0CYS8UkCh8IWqHarOn1z"; protected-headers="v1" From: Matthew Seaman To: Andriy Gapon , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Message-ID: <6ba5cb49-a1ba-53d1-2ae6-7290bc4bd637@FreeBSD.org> Subject: Re: svn commit: r335599 - svnadmin/conf References: <201806241252.w5OCqc54021810@repo.freebsd.org> In-Reply-To: --Fjo9HNLdyhbyp0CYS8UkCh8IWqHarOn1z Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: quoted-printable On 24/06/2018 14:20, Andriy Gapon wrote: > On 24/06/2018 15:52, Matthew Seaman wrote: >> Log: >> Approved by: core >=20 > That's terse even by my standards. >=20 Damn. Sorry about that -- fat fingered it. I had originally intended to say: Reactivate Daichi Goto's commit bit at his request. Daichi will be mentored by gnn while he reacquaints himself with how it all works. but missed out the 'Approved by:' flag. And then failed to fix the commit message properly. Matthew --Fjo9HNLdyhbyp0CYS8UkCh8IWqHarOn1z-- --vVztpw9UXhOL9jsAfTUGhHZ3gc49snhjs Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEGfFU7L8RLlBUTj8wAFE/EOCp5OcFAlsvnKNfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDE5 RjE1NEVDQkYxMTJFNTA1NDRFM0YzMDAwNTEzRjEwRTBBOUU0RTcACgkQAFE/EOCp 5Oc/3A//WlYkGeWCPwMtZ6ZY0SZf9Z3zmfijTZr8w7bUs7y882t0z9JsmY9i7aKV YXFte848w/5lcfaupF7wzPuo2cEqCtXGI3GY0+yHuKkXnrgxUK7hMMLF8hQltygQ k/OxQYDB2sg8LMRyLWiYGVGJEq/iOsQvuZWgvLPBQ7WUKUJ/U1QfVVCrk7Iyk+Qj +cM2uC+6u0cgU5GNz/3SULWF5KQ/naNefoMqMf5lNbVdbK1k3jKnr8leuFTI5fT3 4Az2YEAT7rA9wklTfZtwewuXx7BsN9wutBu7GZ8/qZ23tsAGmdFTwcYRG9BxIiW8 1Q96DwIFo4Rh6o/8SdTeIuSeytZ7DjpZ9MuFxUVR+fbDkr+yMcw4ELQUJes+itWA ovDpMmmocy6l6T8DsRQ5AmZKcL5ogbcmiECnz0ZwdVmE7ObDITDLdZioDsqXoyEV hfJX+v4BQ60027PQ4pyc0z73hL/veonnFKG2OBxfDkz86c38uGZQuajDWmurOH7x PFAtgucAJjU/XF4D9j4L9I8ZSxDrk0Zaff3yCK5iK0khUX1THKi4g/k6JltHbvAm 8bnhLkBvGIW6wecoCMQOhPwR3/l3ajaF1TQI30ATn6T8Qfta3aJuayoO6RoY1cEQ 6lLO+u8GTMRNwgpohVlnUGgT9dJ+RahpIU7iFn7uqukOJJqbpio= =CLmU -----END PGP SIGNATURE----- --vVztpw9UXhOL9jsAfTUGhHZ3gc49snhjs-- From owner-svn-src-all@freebsd.org Sun Jun 24 14:15:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82306100139D for ; Sun, 24 Jun 2018 14:15:33 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (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 0AA628B5F8 for ; Sun, 24 Jun 2018 14:15:32 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: 09956ac5-77b9-11e8-b829-b3adae557cda X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id 09956ac5-77b9-11e8-b829-b3adae557cda; Sun, 24 Jun 2018 14:15:25 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w5OEFOBl093214; Sun, 24 Jun 2018 08:15:24 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1529849724.24573.59.camel@freebsd.org> Subject: Re: svn commit: r335595 - head/etc From: Ian Lepore To: Xin LI Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Date: Sun, 24 Jun 2018 08:15:24 -0600 In-Reply-To: References: <201806240329.w5O3T0kq033162@repo.freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 24 Jun 2018 14:15:33 -0000 On Sat, 2018-06-23 at 21:24 -0700, Xin LI wrote: > Oh thanks for that.  Is there a plan to MFC? Yes, I plan to mfc to 10 and 11 after a short while. -- Ian > On Sat, Jun 23, 2018 at 8:29 PM Ian Lepore wrote: > > > > > > Author: ian > > Date: Sun Jun 24 03:29:00 2018 > > New Revision: 335595 > > URL: https://svnweb.freebsd.org/changeset/base/335595 > > > > Log: > >   Modernize usage of "restrict" keyword in ntp.conf > > > >   It is no longer necessary to specify a -4/-6 flag on any ntp.conf > >   keyword.  The address type is inferred from the address itself as > >   necessary.  "restrict default" statements always apply to both > > address > >   families regardless of any -4/-6 flag that may be present. > > > >   So this change just tidies up our default config by removing the > > redundant > >   restrict -6 statement and comment, and by removing the -6 flag > > from the > >   restrict keyword that allows access from localhost. > > > >   This change was inspired by the patches provided in PRs 201803 > > and 210245, > >   and included some contrib/ntp code inspection to verify that the > > -4/-6 > >   keywords are basically no-ops in all contexts now. > > > >   PR:           201803 210245 > >   Differential Revision:        https://reviews.freebsd.org/D15974 > > > > Modified: > >   head/etc/ntp.conf > > > > Modified: head/etc/ntp.conf > > =================================================================== > > =========== > > --- head/etc/ntp.conf   Sat Jun 23 23:44:36 2018        (r335594) > > +++ head/etc/ntp.conf   Sun Jun 24 03:29:00 2018        (r335595) > > @@ -62,15 +62,13 @@ pool 0.freebsd.pool.ntp.org iburst > >  # See http://support.ntp.org/bin/view/Support/AccessRestrictions > >  # for more information. > >  # > > -restrict    default limited kod nomodify notrap noquery nopeer > > -restrict -6 default limited kod nomodify notrap noquery nopeer > > -restrict    source  limited kod nomodify notrap noquery > > +restrict default limited kod nomodify notrap noquery nopeer > > +restrict source  limited kod nomodify notrap noquery > > > >  # > >  # Alternatively, the following rules would block all unauthorized > > access. > >  # > >  #restrict default ignore > > -#restrict -6 default ignore > >  # > >  # In this case, all remote NTP time servers also need to be > > explicitly > >  # allowed or they would not be able to exchange time information > > with > > @@ -85,7 +83,7 @@ restrict    source  limited kod nomodify notrap > > noquer > >  # > >  # The following settings allow unrestricted access from the > > localhost > >  restrict 127.0.0.1 > > -restrict -6 ::1 > > +restrict ::1 > > > >  # > >  # If a server loses sync with all upstream servers, NTP clients > > From owner-svn-src-all@freebsd.org Sun Jun 24 14:35:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 706641001BEB for ; Sun, 24 Jun 2018 14:35:35 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (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 E98218BFCA for ; Sun, 24 Jun 2018 14:35:34 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: d4035986-77bb-11e8-aa1a-954dbaed88ca X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id d4035986-77bb-11e8-aa1a-954dbaed88ca; Sun, 24 Jun 2018 14:35:24 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w5OEZNc2093242; Sun, 24 Jun 2018 08:35:23 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1529850923.24573.69.camel@freebsd.org> Subject: Re: svn commit: r335602 - head/sbin/dhclient From: Ian Lepore To: Eitan Adler , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Sun, 24 Jun 2018 08:35:23 -0600 In-Reply-To: <201806241323.w5ODNRW2037739@repo.freebsd.org> References: <201806241323.w5ODNRW2037739@repo.freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 24 Jun 2018 14:35:35 -0000 On Sun, 2018-06-24 at 13:23 +0000, Eitan Adler wrote: > Author: eadler > Date: Sun Jun 24 13:23:27 2018 > New Revision: 335602 > URL: https://svnweb.freebsd.org/changeset/base/335602 > > Log: >   dhclient: build with WARNS=6 >    >   - add static in a number of places >   - initialize __progname rather than rely on magical extern values >   - use nitems() instead of manually spelling it out >   - unshadow 'idi' >   - teach 'error' that it is '__dead2' >   - add missing 'break' The changes related to __progname aren't correct. __progname is a bsd- ism that goes back to at least 4.4BSD, including the need to locally have an extern char* decl to use it. You changed it to a file-static var definition without changing the name, and names beginning with a double underbar belong to the implementation and shouldn't be used locally. A more correct way to modernize code that uses __progname is to just replace each occurance of it with a call to getprogname(3) (and ensure stdlib.h has been included where it's used). References to the program name are typically not in performance-sensitive code so there's no need to even have a local var. (I think in libc, getprogname() is implemented as "return __progname"). -- Ian From owner-svn-src-all@freebsd.org Sun Jun 24 15:22:39 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 707501002B82; Sun, 24 Jun 2018 15:22:39 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 45B038D1DE; Sun, 24 Jun 2018 15:22:39 +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 27BAC20810; Sun, 24 Jun 2018 15:22:39 +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 w5OFMdR5099542; Sun, 24 Jun 2018 15:22:39 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5OFMdYg099541; Sun, 24 Jun 2018 15:22:39 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201806241522.w5OFMdYg099541@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 24 Jun 2018 15:22:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335604 - head/share/examples/bhyve X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/share/examples/bhyve X-SVN-Commit-Revision: 335604 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.26 Precedence: list List-Id: "SVN commit messages 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, 24 Jun 2018 15:22:39 -0000 Author: kib Date: Sun Jun 24 15:22:38 2018 New Revision: 335604 URL: https://svnweb.freebsd.org/changeset/base/335604 Log: bhyve/vmrun.sh: make -L functional. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/share/examples/bhyve/vmrun.sh Modified: head/share/examples/bhyve/vmrun.sh ============================================================================== --- head/share/examples/bhyve/vmrun.sh Sun Jun 24 13:26:31 2018 (r335603) +++ head/share/examples/bhyve/vmrun.sh Sun Jun 24 15:22:38 2018 (r335604) @@ -134,7 +134,7 @@ vncport=${DEFAULT_VNCPORT} vncsize=${DEFAULT_VNCSIZE} tablet="" -while getopts aAc:C:d:e:Ef:F:g:hH:iI:l:m:n:p:P:t:Tuvw c ; do +while getopts aAc:C:d:e:Ef:F:g:hH:iI:l:L:m:n:p:P:t:Tuvw c ; do case $c in a) bhyverun_opt="${bhyverun_opt} -a" From owner-svn-src-all@freebsd.org Sun Jun 24 18:57:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F2A71009844; Sun, 24 Jun 2018 18:57:07 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EC7FE72B8D; Sun, 24 Jun 2018 18:57:06 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C6D782296D; Sun, 24 Jun 2018 18:57:06 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5OIv6Ii006409; Sun, 24 Jun 2018 18:57:06 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5OIv6dX006407; Sun, 24 Jun 2018 18:57:06 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201806241857.w5OIv6dX006407@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sun, 24 Jun 2018 18:57:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335605 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 335605 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.26 Precedence: list List-Id: "SVN commit messages 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, 24 Jun 2018 18:57:07 -0000 Author: mmacy Date: Sun Jun 24 18:57:06 2018 New Revision: 335605 URL: https://svnweb.freebsd.org/changeset/base/335605 Log: fix assert and conditionally allow mutexes to be held across epoch_wait_preempt Modified: head/sys/kern/subr_epoch.c head/sys/sys/epoch.h Modified: head/sys/kern/subr_epoch.c ============================================================================== --- head/sys/kern/subr_epoch.c Sun Jun 24 15:22:38 2018 (r335604) +++ head/sys/kern/subr_epoch.c Sun Jun 24 18:57:06 2018 (r335605) @@ -375,9 +375,11 @@ epoch_block_handler_preempt(struct ck_epoch *global __ struct turnstile *ts; struct lock_object *lock; int spincount, gen; + int locksheld __unused; record = __containerof(cr, struct epoch_record, er_record); td = curthread; + locksheld = td->td_locks; spincount = 0; counter_u64_add(block_count, 1); if (record->er_cpuid != curcpu) { @@ -470,8 +472,8 @@ epoch_block_handler_preempt(struct ck_epoch *global __ turnstile_unlock(ts, lock); thread_lock(td); critical_exit(); - KASSERT(td->td_locks == 0, - ("%d locks held", td->td_locks)); + KASSERT(td->td_locks == locksheld, + ("%d extra locks held", td->td_locks - locksheld)); } } /* @@ -499,23 +501,20 @@ epoch_wait_preempt(epoch_t epoch) int old_cpu; int old_pinned; u_char old_prio; -#ifdef INVARIANTS - int locks; + int locks __unused; - locks = curthread->td_locks; -#endif - MPASS(cold || epoch != NULL); INIT_CHECK(epoch); - - MPASS(epoch->e_flags & EPOCH_PREEMPT); - WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, - "epoch_wait() can sleep"); - td = curthread; +#ifdef INVARIANTS + locks = curthread->td_locks; + MPASS(epoch->e_flags & EPOCH_PREEMPT); + if ((epoch->e_flags & EPOCH_LOCKED) == 0) + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, + "epoch_wait() can be long running"); KASSERT(td->td_epochnest == 0, ("epoch_wait() in the middle of an epoch section")); +#endif thread_lock(td); - DROP_GIANT(); old_cpu = PCPU_GET(cpuid); Modified: head/sys/sys/epoch.h ============================================================================== --- head/sys/sys/epoch.h Sun Jun 24 15:22:38 2018 (r335604) +++ head/sys/sys/epoch.h Sun Jun 24 18:57:06 2018 (r335605) @@ -39,6 +39,7 @@ struct epoch; typedef struct epoch *epoch_t; #define EPOCH_PREEMPT 0x1 +#define EPOCH_LOCKED 0x2 extern epoch_t global_epoch; extern epoch_t global_epoch_preempt; From owner-svn-src-all@freebsd.org Sun Jun 24 19:01:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7C5B1009BC5; Sun, 24 Jun 2018 19:01:02 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 95B2E72DBA; Sun, 24 Jun 2018 19:01:02 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 76EF222998; Sun, 24 Jun 2018 19:01:02 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5OJ12di006668; Sun, 24 Jun 2018 19:01:02 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5OJ111d006664; Sun, 24 Jun 2018 19:01:01 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201806241901.w5OJ111d006664@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 24 Jun 2018 19:01:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335606 - head/sys/dev/bktr X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/bktr X-SVN-Commit-Revision: 335606 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.26 Precedence: list List-Id: "SVN commit messages 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, 24 Jun 2018 19:01:03 -0000 Author: imp Date: Sun Jun 24 19:01:01 2018 New Revision: 335606 URL: https://svnweb.freebsd.org/changeset/base/335606 Log: Don't use generic PCI_VENDOR and PCI_PRODUCT macros. Prefix them with BKTR_ to avoid possible conflicts. Modified: head/sys/dev/bktr/bktr_core.c head/sys/dev/bktr/bktr_os.c head/sys/dev/bktr/bktr_reg.h Modified: head/sys/dev/bktr/bktr_core.c ============================================================================== --- head/sys/dev/bktr/bktr_core.c Sun Jun 24 18:57:06 2018 (r335605) +++ head/sys/dev/bktr/bktr_core.c Sun Jun 24 19:01:01 2018 (r335606) @@ -572,9 +572,9 @@ bktr_store_address(unit, BKTR_MEM_BUF, buf); /* using the pci device id and revision id */ /* and determine the card type */ - if (PCI_VENDOR(pci_id) == PCI_VENDOR_BROOKTREE) + if (BKTR_PCI_VENDOR(pci_id) == PCI_VENDOR_BROOKTREE) { - switch (PCI_PRODUCT(pci_id)) { + switch (BKTR_PCI_PRODUCT(pci_id)) { case PCI_PRODUCT_BROOKTREE_BT848: if (rev == 0x12) bktr->id = BROOKTREE_848A; Modified: head/sys/dev/bktr/bktr_os.c ============================================================================== --- head/sys/dev/bktr/bktr_os.c Sun Jun 24 18:57:06 2018 (r335605) +++ head/sys/dev/bktr/bktr_os.c Sun Jun 24 19:01:01 2018 (r335606) @@ -287,9 +287,9 @@ bktr_probe( device_t dev ) unsigned int type = pci_get_devid(dev); unsigned int rev = pci_get_revid(dev); - if (PCI_VENDOR(type) == PCI_VENDOR_BROOKTREE) + if (BKTR_PCI_VENDOR(type) == PCI_VENDOR_BROOKTREE) { - switch (PCI_PRODUCT(type)) { + switch (BKTR_PCI_PRODUCT(type)) { case PCI_PRODUCT_BROOKTREE_BT848: if (rev == 0x12) device_set_desc(dev, "BrookTree 848A"); @@ -922,11 +922,11 @@ bktr_probe(parent, match, aux) { struct pci_attach_args *pa = aux; - if (PCI_VENDOR(pa->pa_id) == PCI_VENDOR_BROOKTREE && - (PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROOKTREE_BT848 || - PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROOKTREE_BT849 || - PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROOKTREE_BT878 || - PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROOKTREE_BT879)) + if (BKTR_PCI_VENDOR(pa->pa_id) == PCI_VENDOR_BROOKTREE && + (BKTR_PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROOKTREE_BT848 || + BKTR_PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROOKTREE_BT849 || + BKTR_PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROOKTREE_BT878 || + BKTR_PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_BROOKTREE_BT879)) return 1; return 0; Modified: head/sys/dev/bktr/bktr_reg.h ============================================================================== --- head/sys/dev/bktr/bktr_reg.h Sun Jun 24 18:57:06 2018 (r335605) +++ head/sys/dev/bktr/bktr_reg.h Sun Jun 24 19:01:01 2018 (r335606) @@ -88,15 +88,15 @@ * Definitions for the Brooktree 848/878 video capture to pci interface. */ #ifndef __NetBSD__ -#define PCI_VENDOR_SHIFT 0 -#define PCI_VENDOR_MASK 0xffff -#define PCI_VENDOR(id) \ - (((id) >> PCI_VENDOR_SHIFT) & PCI_VENDOR_MASK) +#define BKTR_PCI_VENDOR_SHIFT 0 +#define BKTR_PCI_VENDOR_MASK 0xffff +#define BKTR_PCI_VENDOR(id) \ + (((id) >> BKTR_PCI_VENDOR_SHIFT) & BKTR_PCI_VENDOR_MASK) -#define PCI_PRODUCT_SHIFT 16 -#define PCI_PRODUCT_MASK 0xffff -#define PCI_PRODUCT(id) \ - (((id) >> PCI_PRODUCT_SHIFT) & PCI_PRODUCT_MASK) +#define BKTR_PCI_PRODUCT_SHIFT 16 +#define BKTR_PCI_PRODUCT_MASK 0xffff +#define BKTR_PCI_PRODUCT(id) \ + (((id) >> BKTR_PCI_PRODUCT_SHIFT) & BKTR_PCI_PRODUCT_MASK) /* PCI vendor ID */ #define PCI_VENDOR_BROOKTREE 0x109e /* Brooktree */ From owner-svn-src-all@freebsd.org Sun Jun 24 19:29:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AA72100A5AA; Sun, 24 Jun 2018 19:29:30 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EE4F973CD1; Sun, 24 Jun 2018 19:29:29 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CC16722E41; Sun, 24 Jun 2018 19:29:29 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5OJTTJK022195; Sun, 24 Jun 2018 19:29:29 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5OJTTld022194; Sun, 24 Jun 2018 19:29:29 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201806241929.w5OJTTld022194@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Sun, 24 Jun 2018 19:29:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335607 - head/stand/forth X-SVN-Group: head X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: head/stand/forth X-SVN-Commit-Revision: 335607 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.26 Precedence: list List-Id: "SVN commit messages 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, 24 Jun 2018 19:29:30 -0000 Author: dteske Date: Sun Jun 24 19:29:29 2018 New Revision: 335607 URL: https://svnweb.freebsd.org/changeset/base/335607 Log: check-password.4th(8): Fix manual [in]accuracy SVN r280384 updated the maximum password length from 16 bytes to 255. The manual was not updated to reflect this. Found while working on kern/207069. MFC after: 3 days X-MFC-to: stable/11 stable/10 Sponsored by: Smule, Inc. Modified: head/stand/forth/check-password.4th.8 Modified: head/stand/forth/check-password.4th.8 ============================================================================== --- head/stand/forth/check-password.4th.8 Sun Jun 24 19:01:01 2018 (r335606) +++ head/stand/forth/check-password.4th.8 Sun Jun 24 19:29:29 2018 (r335607) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2011-2015 Devin Teske +.\" Copyright (c) 2011-2018 Devin Teske .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 20, 2015 +.Dd June 24, 2018 .Dt CHECK-PASSWORD.4TH 8 .Os .Sh NAME @@ -91,7 +91,7 @@ for additional information. The environment variables that effect its behavior are: .Bl -tag -width bootlock_password -offset indent .It Va bootlock_password -Sets the bootlock password (up to 16 characters long) that is required by +Sets the bootlock password (up to 255 characters long) that is required by .Ic check-password to be entered before the system is allowed to boot. .It Va geom_eli_passphrase_prompt @@ -100,7 +100,7 @@ kernel for later mounting of .Xr geli 8 encrypted root device(s). .It Va password -Sets the password (up to 16 characters long) that is required by +Sets the password (up to 255 characters long) that is required by .Ic check-password before the user is allowed to visit the boot menu. .El From owner-svn-src-all@freebsd.org Sun Jun 24 20:56:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8EF1C100F26B for ; Sun, 24 Jun 2018 20:56:31 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-ed1-x544.google.com (mail-ed1-x544.google.com [IPv6:2a00:1450:4864:20::544]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1345A7A400 for ; Sun, 24 Jun 2018 20:56:30 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-ed1-x544.google.com with SMTP id g13-v6so1169741eds.12 for ; Sun, 24 Jun 2018 13:56:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=U0GxqBPSY/RBzJgNvOz1O13jIYlt43BKOJQmi3nxNOY=; b=2HgU3ZsImTKsoPhDr0XqyoiMEZqRkAjD7DswPAln2YArXPL/3ITx3YAU3T4EwDtsFt Umv9yYpc/FyCMi9cXZzeFbFHCCaoca27254zauiPoLEttg17jhLywKddDN4RGCvUdXfg z58+2p2mBG1G8FTB6OSqlIe19CQ1OGgaaFbJQXQ0Beo89wSJN3Lc9iCWuriMpp8Bk5B4 quwzZU6jrTg+A6AOsCw2/6nPVPT6wbAOA4IWyiwoaxrINZvlwmJRwRtNNaAYsw2u81Om c25b0OsvLyqLVFcFUrQCkgrngkaVrlNVtj94FngYZfTNHfBSfcyYfgxHUQNCKBu38K2a PWJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=U0GxqBPSY/RBzJgNvOz1O13jIYlt43BKOJQmi3nxNOY=; b=i7moLXMUPeau60/2IlzdENrFTmDmhEVgj/NNQe3JgMZf2sdCiIvMiUMJ9SWYmm8uCv 4zCYtU3p2lgIZKr4vPsxPFBf3F7QA0+uX/p+KQX7ZjE93H3hyBuoIsVBIqzw5OdwDdQD 1/QwRnCn5Qx4Xf06cPIvlJ+srOFAnUGWPDvwhNmEg8O4ohl1HBBKarxQ2Oc+4iSd8Og+ G49AqWZ1UNFzWlHntRlE2NSMNTwWqq91bBHPu1BQdOaJtDVEQy59HV16HVUwvdUFVFfQ VOzqZiuottE3IZVTyCO7Id4mbrskyNrATRw3IgHSnEE66ITm5HEw2Yj0Siugra4ZW8lF eqGA== X-Gm-Message-State: APt69E2d7yhkc+XQH19qWkalPqayKNrUxZ4hMANKowvctV846nyZkZwI t9VgwNedS6kRkmsg4P7kIFlhcnMaL0ICuz10MwexRg== X-Google-Smtp-Source: ADUXVKLkzRvtqsKlxqc3Br+N/X1mh8SXAPlBamMbihPwEJzPmU3BmvnEnou3TadRLAvRcwuY/hn3J9vtfzWp8yZb3qg= X-Received: by 2002:aa7:d3cb:: with SMTP id o11-v6mr9130967edr.104.1529873789683; Sun, 24 Jun 2018 13:56:29 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a50:8e0d:0:0:0:0:0 with HTTP; Sun, 24 Jun 2018 13:55:59 -0700 (PDT) In-Reply-To: References: <201805132316.w4DNG4oh092482@repo.freebsd.org> From: Ed Schouten Date: Sun, 24 Jun 2018 22:55:59 +0200 Message-ID: Subject: Re: svn commit: r333590 - head/share/man/man9 To: Matt Macy Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 24 Jun 2018 20:56:31 -0000 Hi Matt, 2018-05-17 9:06 GMT+02:00 Ed Schouten : > Hi Matt, > > 2018-05-14 1:16 GMT+02:00 Matt Macy : >> +Epochs do not have any lock ordering issues. Entering and leaving > > It looks like the man page is missing some newlines between sentences. > > Quick question: How does this work relate to RCU > (https://en.wikipedia.org/wiki/Read-copy-update)? If there is any > relation, should we mention it in the documentation? I never got a response to this. Any thoughts? -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands From owner-svn-src-all@freebsd.org Sun Jun 24 21:19:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 852BB101272D; Sun, 24 Jun 2018 21:19:09 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2A6757BE99; Sun, 24 Jun 2018 21:19:09 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0BB2324011; Sun, 24 Jun 2018 21:19:09 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5OLJ8aD089591; Sun, 24 Jun 2018 21:19:08 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5OLJ8MZ089590; Sun, 24 Jun 2018 21:19:08 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201806242119.w5OLJ8MZ089590@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Sun, 24 Jun 2018 21:19:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335608 - head/sbin/pfctl X-SVN-Group: head X-SVN-Commit-Author: sbruno X-SVN-Commit-Paths: head/sbin/pfctl X-SVN-Commit-Revision: 335608 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.26 Precedence: list List-Id: "SVN commit messages 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, 24 Jun 2018 21:19:09 -0000 Author: sbruno Date: Sun Jun 24 21:19:08 2018 New Revision: 335608 URL: https://svnweb.freebsd.org/changeset/base/335608 Log: Assuming that the intent (from the white space) is that the fprintf() be executed in the if() conditional. If its not supposed to be printed inside the conditional, then the braces should be removed and the extra tabs on the fprintf() should be removed. Noted by cross compilation with gcc-mips. Modified: head/sbin/pfctl/pfctl_altq.c Modified: head/sbin/pfctl/pfctl_altq.c ============================================================================== --- head/sbin/pfctl/pfctl_altq.c Sun Jun 24 19:29:29 2018 (r335607) +++ head/sbin/pfctl/pfctl_altq.c Sun Jun 24 21:19:08 2018 (r335608) @@ -497,12 +497,13 @@ cbq_compute_idletime(struct pfctl *pf, struct pf_altq * this causes integer overflow in kernel! * (bandwidth < 6Kbps when max_pkt_size=1500) */ - if (pa->bandwidth != 0 && (pf->opts & PF_OPT_QUIET) == 0) + if (pa->bandwidth != 0 && (pf->opts & PF_OPT_QUIET) == 0) { warnx("queue bandwidth must be larger than %s", rate2str(ifnsPerByte * (double)opts->maxpktsize / (double)INT_MAX * (double)pa->ifbandwidth)); fprintf(stderr, "cbq: queue %s is too slow!\n", pa->qname); + } nsPerByte = (double)(INT_MAX / opts->maxpktsize); } From owner-svn-src-all@freebsd.org Sun Jun 24 21:36:38 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC62D1013D09; Sun, 24 Jun 2018 21:36:37 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9BC7D7CED1; Sun, 24 Jun 2018 21:36:37 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 77A6F24356; Sun, 24 Jun 2018 21:36:37 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5OLab8P099973; Sun, 24 Jun 2018 21:36:37 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5OLabJg099972; Sun, 24 Jun 2018 21:36:37 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201806242136.w5OLabJg099972@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Sun, 24 Jun 2018 21:36:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335609 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: sbruno X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 335609 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.26 Precedence: list List-Id: "SVN commit messages 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, 24 Jun 2018 21:36:38 -0000 Author: sbruno Date: Sun Jun 24 21:36:37 2018 New Revision: 335609 URL: https://svnweb.freebsd.org/changeset/base/335609 Log: Reap unused variable and assignment that had no effect. Noted by cross compiling with gcc on mips. Reviewed by: mmacy Modified: head/sys/netinet/in_pcb.c Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Sun Jun 24 21:19:08 2018 (r335608) +++ head/sys/netinet/in_pcb.c Sun Jun 24 21:36:37 2018 (r335609) @@ -1582,11 +1582,9 @@ static void in_pcbfree_deferred(epoch_context_t ctx) { struct inpcb *inp; - struct inpcbinfo *pcbinfo; int released __unused; inp = __containerof(ctx, struct inpcb, inp_epoch_ctx); - pcbinfo = inp->inp_pcbinfo; INP_WLOCK(inp); #ifdef INET From owner-svn-src-all@freebsd.org Sun Jun 24 21:44:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D621101489B; Sun, 24 Jun 2018 21:44:49 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lf0-f44.google.com (mail-lf0-f44.google.com [209.85.215.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B8D687D827; Sun, 24 Jun 2018 21:44:48 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lf0-f44.google.com with SMTP id n96-v6so781243lfi.1; Sun, 24 Jun 2018 14:44: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:subject:to:cc:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=rA0Df1hUTnkAPmenGwqCtoqrwNdZgUl1viOLpXfG3sk=; b=WT+KV4bqiarP8ynCvVhlIaxyGOiohhU2rk+Y/XlNQ7t3ySvRE+quXJg8p31wNyv2/Q fKy0s7HFX5ceTTtXEVfeTLNlOkbs7frJKBfTIwUH4rxLz2wTG8qZl9FQSOUYg/UVa0Kk hgsxNHyBnDbiHGACx3ETeZmgjPBhB7DpsmXpuJhGJf6IX+aJ7/L5bOH9T/RCmqlFk1gX c3d/chmJEhtkD0Pjk9hpo6bAAn/kRauOPdvfjlcLSW7C6NyW2nmFytt4I39IdMPooPAy 15pajse12gTX8JIsJBE5X+KQE/L32CmlmU7PgraOYcaAU9xZs6A+RdkvJ9BbqGn+qjmq fS6Q== X-Gm-Message-State: APt69E3fIWkeAjtz842otS9fl/ifX3e08jO9NRXFSXMU8803XOxKATzI yDylhrwoUG34oBM4wloso96NO5FF X-Google-Smtp-Source: ADUXVKLSsSncW3pobFhD8lzNkuyi3bawJY+NM9EmK2DzjukYhPxkyTUK30cYwCAbpRm7B8FO6BEskQ== X-Received: by 2002:a19:5795:: with SMTP id l143-v6mr4178849lfb.25.1529876207424; Sun, 24 Jun 2018 14:36:47 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id i67-v6sm2118775lji.49.2018.06.24.14.36.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Jun 2018 14:36:46 -0700 (PDT) Subject: Re: svn commit: r333590 - head/share/man/man9 To: Ed Schouten , Matt Macy Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201805132316.w4DNG4oh092482@repo.freebsd.org> From: Andriy Gapon Openpgp: preference=signencrypt Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= xsFNBFm4LIgBEADNB/3lT7f15UKeQ52xCFQx/GqHkSxEdVyLFZTmY3KyNPQGBtyvVyBfprJ7 mAeXZWfhat6cKNRAGZcL5EmewdQuUfQfBdYmKjbw3a9GFDsDNuhDA2QwFt8BmkiVMRYyvI7l N0eVzszWCUgdc3qqM6qqcgBaqsVmJluwpvwp4ZBXmch5BgDDDb1MPO8AZ2QZfIQmplkj8Y6Z AiNMknkmgaekIINSJX8IzRzKD5WwMsin70psE8dpL/iBsA2cpJGzWMObVTtCxeDKlBCNqM1i gTXta1ukdUT7JgLEFZk9ceYQQMJJtUwzWu1UHfZn0Fs29HTqawfWPSZVbulbrnu5q55R4PlQ /xURkWQUTyDpqUvb4JK371zhepXiXDwrrpnyyZABm3SFLkk2bHlheeKU6Yql4pcmSVym1AS4 dV8y0oHAfdlSCF6tpOPf2+K9nW1CFA8b/tw4oJBTtfZ1kxXOMdyZU5fiG7xb1qDgpQKgHUX8 7Rd2T1UVLVeuhYlXNw2F+a2ucY+cMoqz3LtpksUiBppJhw099gEXehcN2JbUZ2TueJdt1FdS ztnZmsHUXLxrRBtGwqnFL7GSd6snpGIKuuL305iaOGODbb9c7ne1JqBbkw1wh8ci6vvwGlzx rexzimRaBzJxlkjNfMx8WpCvYebGMydNoeEtkWldtjTNVsUAtQARAQABzR5BbmRyaXkgR2Fw b24gPGF2Z0BGcmVlQlNELm9yZz7CwZQEEwEIAD4WIQS+LEO7ngQnXA4Bjr538m7TUc1yjwUC WbgsiAIbIwUJBaOagAULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgAAKCRB38m7TUc1yj+JAEACV l9AK/nOWAt/9cufV2fRj0hdOqB1aCshtSrwHk/exXsDa4/FkmegxXQGY+3GWX3deIyesbVRL rYdtdK0dqJyT1SBqXK1h3/at9rxr9GQA6KWOxTjUFURsU7ok/6SIlm8uLRPNKO+yq0GDjgaO LzN+xykuBA0FlhQAXJnpZLcVfPJdWv7sSHGedL5ln8P8rxR+XnmsA5TUaaPcbhTB+mG+iKFj GghASDSfGqLWFPBlX/fpXikBDZ1gvOr8nyMY9nXhgfXpq3B6QCRYKPy58ChrZ5weeJZ29b7/ QdEO8NFNWHjSD9meiLdWQaqo9Y7uUxN3wySc/YUZxtS0bhAd8zJdNPsJYG8sXgKjeBQMVGuT eCAJFEYJqbwWvIXMfVWop4+O4xB+z2YE3jAbG/9tB/GSnQdVSj3G8MS80iLS58frnt+RSEw/ psahrfh0dh6SFHttE049xYiC+cM8J27Aaf0i9RflyITq57NuJm+AHJoU9SQUkIF0nc6lfA+o JRiyRlHZHKoRQkIg4aiKaZSWjQYRl5Txl0IZUP1dSWMX4s3XTMurC/pnja45dge/4ESOtJ9R 8XuIWg45Oq6MeIWdjKddGhRj3OohsltKgkEU3eLKYtB6qRTQypHHUawCXz88uYt5e3w4V16H lCpSTZV/EVHnNe45FVBlvK7k7HFfDDkryM7BTQRZuCyIARAAlq0slcsVboY/+IUJdcbEiJRW be9HKVz4SUchq0z9MZPX/0dcnvz/gkyYA+OuM78dNS7Mbby5dTvOqfpLJfCuhaNYOhlE0wY+ 1T6Tf1f4c/uA3U/YiadukQ3+6TJuYGAdRZD5EqYFIkreARTVWg87N9g0fT9BEqLw9lJtEGDY EWUE7L++B8o4uu3LQFEYxcrb4K/WKmgtmFcm77s0IKDrfcX4doV92QTIpLiRxcOmCC/OCYuO jB1oaaqXQzZrCutXRK0L5XN1Y1PYjIrEzHMIXmCDlLYnpFkK+itlXwlE2ZQxkfMruCWdQXye syl2fynAe8hvp7Mms9qU2r2K9EcJiR5N1t1C2/kTKNUhcRv7Yd/vwusK7BqJbhlng5ZgRx0m WxdntU/JLEntz3QBsBsWM9Y9wf2V4tLv6/DuDBta781RsCB/UrU2zNuOEkSixlUiHxw1dccI 6CVlaWkkJBxmHX22GdDFrcjvwMNIbbyfQLuBq6IOh8nvu9vuItup7qemDG3Ms6TVwA7BD3j+ 3fGprtyW8Fd/RR2bW2+LWkMrqHffAr6Y6V3h5kd2G9Q8ZWpEJk+LG6Mk3fhZhmCnHhDu6CwN MeUvxXDVO+fqc3JjFm5OxhmfVeJKrbCEUJyM8ESWLoNHLqjywdZga4Q7P12g8DUQ1mRxYg/L HgZY3zfKOqcAEQEAAcLBfAQYAQgAJhYhBL4sQ7ueBCdcDgGOvnfybtNRzXKPBQJZuCyIAhsM BQkFo5qAAAoJEHfybtNRzXKPBVwQAKfFy9P7N3OsLDMB56A4Kf+ZT+d5cIx0Yiaf4n6w7m3i ImHHHk9FIetI4Xe54a2IXh4Bq5UkAGY0667eIs+Z1Ea6I2i27Sdo7DxGwq09Qnm/Y65ADvXs 3aBvokCcm7FsM1wky395m8xUos1681oV5oxgqeRI8/76qy0hD9WR65UW+HQgZRIcIjSel9vR XDaD2HLGPTTGr7u4v00UeTMs6qvPsa2PJagogrKY8RXdFtXvweQFz78NbXhluwix2Tb9ETPk LIpDrtzV73CaE2aqBG/KrboXT2C67BgFtnk7T7Y7iKq4/XvEdDWscz2wws91BOXuMMd4c/c4 OmGW9m3RBLufFrOag1q5yUS9QbFfyqL6dftJP3Zq/xe+mr7sbWbhPVCQFrH3r26mpmy841ym dwQnNcsbIGiBASBSKksOvIDYKa2Wy8htPmWFTEOPRpFXdGQ27awcjjnB42nngyCK5ukZDHi6 w0qK5DNQQCkiweevCIC6wc3p67jl1EMFY5+z+zdTPb3h7LeVnGqW0qBQl99vVFgzLxchKcl0 R/paSFgwqXCZhAKMuUHncJuynDOP7z5LirUeFI8qsBAJi1rXpQoLJTVcW72swZ42IdPiboqx NbTMiNOiE36GqMcTPfKylCbF45JNX4nF9ElM0E+Y8gi4cizJYBRr2FBJgay0b9Cp Message-ID: <99d1722c-8085-6a70-64df-2fdb2c20b574@FreeBSD.org> Date: Mon, 25 Jun 2018 00:36:45 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.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.26 Precedence: list List-Id: "SVN commit messages 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, 24 Jun 2018 21:44:49 -0000 On 24/06/2018 23:55, Ed Schouten wrote: > Hi Matt, > > 2018-05-17 9:06 GMT+02:00 Ed Schouten : >> Hi Matt, >> >> 2018-05-14 1:16 GMT+02:00 Matt Macy : >>> +Epochs do not have any lock ordering issues. Entering and leaving >> >> It looks like the man page is missing some newlines between sentences. >> >> Quick question: How does this work relate to RCU >> (https://en.wikipedia.org/wiki/Read-copy-update)? If there is any >> relation, should we mention it in the documentation? > > I never got a response to this. Any thoughts? Perhaps a little application of google can help. [keywords: epoch based reclamation] -- Andriy Gapon From owner-svn-src-all@freebsd.org Sun Jun 24 21:46:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 198D81014AB3; Sun, 24 Jun 2018 21:46:30 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C14C67DA50; Sun, 24 Jun 2018 21:46:29 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A2AC7244EC; Sun, 24 Jun 2018 21:46:29 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5OLkTQB005399; Sun, 24 Jun 2018 21:46:29 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5OLkTJs005398; Sun, 24 Jun 2018 21:46:29 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201806242146.w5OLkTJs005398@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Sun, 24 Jun 2018 21:46:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335610 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: sbruno X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 335610 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.26 Precedence: list List-Id: "SVN commit messages 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, 24 Jun 2018 21:46:30 -0000 Author: sbruno Date: Sun Jun 24 21:46:29 2018 New Revision: 335610 URL: https://svnweb.freebsd.org/changeset/base/335610 Log: Enable TCP_FASTOPEN by default for FreeBSD 12. Submitted by: kbowling Reviewed by: tuexen Differential Revision: https://reviews.freebsd.org/D15959 Modified: head/sys/netinet/tcp_fastopen.c Modified: head/sys/netinet/tcp_fastopen.c ============================================================================== --- head/sys/netinet/tcp_fastopen.c Sun Jun 24 21:36:37 2018 (r335609) +++ head/sys/netinet/tcp_fastopen.c Sun Jun 24 21:46:29 2018 (r335610) @@ -278,7 +278,7 @@ SYSCTL_UINT(_net_inet_tcp_fastopen, OID_AUTO, ccache_b CTLFLAG_VNET | CTLFLAG_RDTUN, &VNET_NAME(tcp_fastopen_ccache_buckets), 0, "Client cookie cache number of buckets (power of 2)"); -VNET_DEFINE(unsigned int, tcp_fastopen_client_enable) = 0; +VNET_DEFINE(unsigned int, tcp_fastopen_client_enable) = 1; static int sysctl_net_inet_tcp_fastopen_client_enable(SYSCTL_HANDLER_ARGS); SYSCTL_PROC(_net_inet_tcp_fastopen, OID_AUTO, client_enable, CTLFLAG_VNET | CTLTYPE_UINT | CTLFLAG_RW, NULL, 0, From owner-svn-src-all@freebsd.org Sun Jun 24 22:11:28 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2377610162B7; Sun, 24 Jun 2018 22:11:28 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C3C8A7F392; Sun, 24 Jun 2018 22:11:27 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-it0-f47.google.com (mail-it0-f47.google.com [209.85.214.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id 8E75B2582C; Sun, 24 Jun 2018 22:11:27 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-it0-f47.google.com with SMTP id j135-v6so9647792itj.1; Sun, 24 Jun 2018 15:11:27 -0700 (PDT) X-Gm-Message-State: APt69E1QPI/weSZjqUzOgDRap6E7O/FiIGMmt7FjFPkZoF9QRjgDZfuj 5bxzqHcqHjLAaOMt048E+3wwe9aEpvst9p2KtpI= X-Google-Smtp-Source: ADUXVKKMPCe3gCMHhB4HJeRQAj52gIQSuAQgR97MFeVnm2jkhViUfq1XbygeC0ALG67kB0lgyi/Wv9wjMjOxRoVTUw4= X-Received: by 2002:a02:4c9b:: with SMTP id q27-v6mr2744797jad.38.1529878286931; Sun, 24 Jun 2018 15:11:26 -0700 (PDT) MIME-Version: 1.0 References: <201805132316.w4DNG4oh092482@repo.freebsd.org> In-Reply-To: From: Matthew Macy Date: Sun, 24 Jun 2018 15:11:16 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r333590 - head/share/man/man9 To: Ed Schouten Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 24 Jun 2018 22:11:28 -0000 Sorry, I meant to respond. http://concurrencykit.org/presentations/ebr.pdf http://scalebsd.org/blog/2018/05/03/Why-is-munmap-single-threaded-and-what-can-we-do-about-it http://scalebsd.org/blog/2018/06/16/UDP-and-epoch-for-liveness-guarantees On Sun, Jun 24, 2018 at 13:56 Ed Schouten wrote: > Hi Matt, > > 2018-05-17 9:06 GMT+02:00 Ed Schouten : > > Hi Matt, > > > > 2018-05-14 1:16 GMT+02:00 Matt Macy : > >> +Epochs do not have any lock ordering issues. Entering and leaving > > > > It looks like the man page is missing some newlines between sentences. > > > > Quick question: How does this work relate to RCU > > (https://en.wikipedia.org/wiki/Read-copy-update)? If there is any > > relation, should we mention it in the documentation? > > I never got a response to this. Any thoughts? > > -- > Ed Schouten > Nuxi, 's-Hertogenbosch, the Netherlands > From owner-svn-src-all@freebsd.org Sun Jun 24 23:19:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C841110189A7; Sun, 24 Jun 2018 23:19:32 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 74AE081078; Sun, 24 Jun 2018 23:19:32 +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 5643D25351; Sun, 24 Jun 2018 23:19:32 +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 w5ONJWug050784; Sun, 24 Jun 2018 23:19:32 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5ONJWpG050783; Sun, 24 Jun 2018 23:19:32 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201806242319.w5ONJWpG050783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 24 Jun 2018 23:19:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335611 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: head/sys/arm/broadcom/bcm2835 X-SVN-Commit-Revision: 335611 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.26 Precedence: list List-Id: "SVN commit messages 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, 24 Jun 2018 23:19:33 -0000 Author: gonzo Date: Sun Jun 24 23:19:31 2018 New Revision: 335611 URL: https://svnweb.freebsd.org/changeset/base/335611 Log: [rpi] Fix compatiblity with upstream DTB for RPi 3B and 3B+ Upstream dtb switched to using brcm,bcm2837 for platform compatibility string. Patch platfrom and cpufreq compatiblity data accordingly. Submitted by: Sylvain Garrigues Tested by: db@ Differential Revision: https://reviews.freebsd.org/D15998 Modified: head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Sun Jun 24 21:46:29 2018 (r335610) +++ head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Sun Jun 24 23:19:31 2018 (r335611) @@ -127,6 +127,7 @@ static struct ofw_compat_data compat_data[] = { { "broadcom,bcm2708-vc", 1 }, { "brcm,bcm2709", 1 }, { "brcm,bcm2836", 1 }, + { "brcm,bcm2837", 1 }, { NULL, 0 } }; Modified: head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Sun Jun 24 21:46:29 2018 (r335610) +++ head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Sun Jun 24 23:19:31 2018 (r335611) @@ -154,4 +154,5 @@ static platform_method_t bcm2836_methods[] = { }; FDT_PLATFORM_DEF2(bcm2836, bcm2836_legacy, "bcm2836 (legacy)", 0, "brcm,bcm2709", 100); FDT_PLATFORM_DEF2(bcm2836, bcm2836, "bcm2836", 0, "brcm,bcm2836", 100); +FDT_PLATFORM_DEF2(bcm2836, bcm2837, "bcm2837", 0, "brcm,bcm2837", 100); #endif From owner-svn-src-all@freebsd.org Mon Jun 25 00:36:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D18E5101BAF4 for ; Mon, 25 Jun 2018 00:36:03 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7F0F983478 for ; Mon, 25 Jun 2018 00:36:03 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: from mail-yw0-f181.google.com (mail-yw0-f181.google.com [209.85.161.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: eadler) by smtp.freebsd.org (Postfix) with ESMTPSA id 48FA92665F for ; Mon, 25 Jun 2018 00:36:03 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: by mail-yw0-f181.google.com with SMTP id r19-v6so4191682ywc.10 for ; Sun, 24 Jun 2018 17:36:03 -0700 (PDT) X-Gm-Message-State: APt69E0S8/+54OvzCSd0fWV5xcwDuZH2KQyOqresFLHfCgnqXhUlY01d S0PpU0lGSgC9OylRy/uZ0qjQWRp7KfmKEVwr3pu85w== X-Google-Smtp-Source: ADUXVKKMh1kjqYATGKJM17DlF6rF3lXkqyEV0TC/Ft6F1Vipfg/mXFybj2wYDeE9maUmkoEQbsmJSQi8K5lQMoT64K4= X-Received: by 2002:a0d:cf01:: with SMTP id r1-v6mr4721140ywd.162.1529886962738; Sun, 24 Jun 2018 17:36:02 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:ef50:0:0:0:0:0 with HTTP; Sun, 24 Jun 2018 17:35:32 -0700 (PDT) In-Reply-To: <1529850923.24573.69.camel@freebsd.org> References: <201806241323.w5ODNRW2037739@repo.freebsd.org> <1529850923.24573.69.camel@freebsd.org> From: Eitan Adler Date: Sun, 24 Jun 2018 17:35:32 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r335602 - head/sbin/dhclient To: Ian Lepore Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 00:36:04 -0000 On 24 June 2018 at 07:35, Ian Lepore wrote: > On Sun, 2018-06-24 at 13:23 +0000, Eitan Adler wrote: >> Author: eadler >> Date: Sun Jun 24 13:23:27 2018 >> New Revision: 335602 >> URL: https://svnweb.freebsd.org/changeset/base/335602 >> >> Log: >> dhclient: build with WARNS=6 >> >> - add static in a number of places >> - initialize __progname rather than rely on magical extern values >> - use nitems() instead of manually spelling it out >> - unshadow 'idi' >> - teach 'error' that it is '__dead2' >> - add missing 'break' > > The changes related to __progname aren't correct. __progname is a bsd- > ism that goes back to at least 4.4BSD, Thanks! Is this correct then? Index: dhclient.c =================================================================== --- dhclient.c (revision 335611) +++ dhclient.c (working copy) @@ -149,7 +149,6 @@ int fork_privchld(int, int); #define MIN_MTU 68 static time_t scripttime; -static char *__progname; int findproto(char *cp, int n) @@ -379,12 +378,10 @@ main(int argc, char *argv[]) pid_t otherpid; cap_rights_t rights; - __progname = basename(argv[0]); - init_casper(); /* Initially, log errors to stderr as well as to syslogd. */ - cap_openlog(capsyslog, __progname, LOG_PID | LOG_NDELAY, DHCPD_LOG_FACILITY); + cap_openlog(capsyslog, getprogname(), LOG_PID | LOG_NDELAY, DHCPD_LOG_FACILITY); cap_setlogmask(capsyslog, LOG_UPTO(LOG_DEBUG)); while ((ch = getopt(argc, argv, "bc:dl:p:qu")) != -1) @@ -566,7 +563,7 @@ void usage(void) { - fprintf(stderr, "usage: %s [-bdqu] ", __progname); + fprintf(stderr, "usage: %s [-bdqu] ", getprogname()); fprintf(stderr, "[-c conffile] [-l leasefile] interface\n"); exit(1); } -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@freebsd.org Mon Jun 25 01:29:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65A6D101D91F; Mon, 25 Jun 2018 01:29:55 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 103A184B28; Mon, 25 Jun 2018 01:29:55 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D68C32680A; Mon, 25 Jun 2018 01:29:54 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5P1Tsgu017126; Mon, 25 Jun 2018 01:29:54 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5P1Ts5H017125; Mon, 25 Jun 2018 01:29:54 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201806250129.w5P1Ts5H017125@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 25 Jun 2018 01:29:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335612 - head/sbin/dhclient X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/sbin/dhclient X-SVN-Commit-Revision: 335612 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 01:29:55 -0000 Author: eadler Date: Mon Jun 25 01:29:54 2018 New Revision: 335612 URL: https://svnweb.freebsd.org/changeset/base/335612 Log: dhclient: recorrect __progname to getprogname() A more correct way to modernize code that uses __progname is to just replace each occurance of it with a call to getprogname(3) Reported by: ian Reviewed by: imp Modified: head/sbin/dhclient/dhclient.c Modified: head/sbin/dhclient/dhclient.c ============================================================================== --- head/sbin/dhclient/dhclient.c Sun Jun 24 23:19:31 2018 (r335611) +++ head/sbin/dhclient/dhclient.c Mon Jun 25 01:29:54 2018 (r335612) @@ -149,7 +149,6 @@ int fork_privchld(int, int); #define MIN_MTU 68 static time_t scripttime; -static char *__progname; int findproto(char *cp, int n) @@ -379,12 +378,10 @@ main(int argc, char *argv[]) pid_t otherpid; cap_rights_t rights; - __progname = basename(argv[0]); - init_casper(); /* Initially, log errors to stderr as well as to syslogd. */ - cap_openlog(capsyslog, __progname, LOG_PID | LOG_NDELAY, DHCPD_LOG_FACILITY); + cap_openlog(capsyslog, getprogname(), LOG_PID | LOG_NDELAY, DHCPD_LOG_FACILITY); cap_setlogmask(capsyslog, LOG_UPTO(LOG_DEBUG)); while ((ch = getopt(argc, argv, "bc:dl:p:qu")) != -1) @@ -566,7 +563,7 @@ void usage(void) { - fprintf(stderr, "usage: %s [-bdqu] ", __progname); + fprintf(stderr, "usage: %s [-bdqu] ", getprogname()); fprintf(stderr, "[-c conffile] [-l leasefile] interface\n"); exit(1); } From owner-svn-src-all@freebsd.org Mon Jun 25 06:57:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6AA611027976; Mon, 25 Jun 2018 06:57:11 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 211228E087; Mon, 25 Jun 2018 06:57:11 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F1F9129D2B; Mon, 25 Jun 2018 06:57:10 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5P6vAok084623; Mon, 25 Jun 2018 06:57:10 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5P6vAMk084622; Mon, 25 Jun 2018 06:57:10 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201806250657.w5P6vAMk084622@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Mon, 25 Jun 2018 06:57:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335613 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: ed X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 335613 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 06:57:11 -0000 Author: ed Date: Mon Jun 25 06:57:10 2018 New Revision: 335613 URL: https://svnweb.freebsd.org/changeset/base/335613 Log: Fix spelling of "reclamation". Modified: head/share/man/man9/epoch.9 Modified: head/share/man/man9/epoch.9 ============================================================================== --- head/share/man/man9/epoch.9 Mon Jun 25 01:29:54 2018 (r335612) +++ head/share/man/man9/epoch.9 Mon Jun 25 06:57:10 2018 (r335613) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 21, 2018 +.Dd June 25, 2018 .Dt EPOCH 9 .Os .Sh NAME @@ -39,7 +39,7 @@ .Nm epoch_wait , .Nm epoch_call , .Nm in_epoch , -.Nd kernel epoch based reclaimation +.Nd kernel epoch based reclamation .Sh SYNOPSIS .In sys/param.h .In sys/proc.h From owner-svn-src-all@freebsd.org Mon Jun 25 07:25:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 562D1102894B; Mon, 25 Jun 2018 07:25:42 +0000 (UTC) (envelope-from slavash@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F34C38F2C3; Mon, 25 Jun 2018 07:25:41 +0000 (UTC) (envelope-from slavash@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C93BC2A1D5; Mon, 25 Jun 2018 07:25:41 +0000 (UTC) (envelope-from slavash@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5P7PfMf000334; Mon, 25 Jun 2018 07:25:41 GMT (envelope-from slavash@FreeBSD.org) Received: (from slavash@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5P7Pfor000333; Mon, 25 Jun 2018 07:25:41 GMT (envelope-from slavash@FreeBSD.org) Message-Id: <201806250725.w5P7Pfor000333@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: slavash set sender to slavash@FreeBSD.org using -f From: Slava Shwartsman Date: Mon, 25 Jun 2018 07:25:41 +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: r335614 - stable/11/contrib/ofed/librdmacm/examples X-SVN-Group: stable-11 X-SVN-Commit-Author: slavash X-SVN-Commit-Paths: stable/11/contrib/ofed/librdmacm/examples X-SVN-Commit-Revision: 335614 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 07:25:42 -0000 Author: slavash Date: Mon Jun 25 07:25:41 2018 New Revision: 335614 URL: https://svnweb.freebsd.org/changeset/base/335614 Log: MFC r335282: Fix false positive on failure When running mckey, errors may happen in the init/connect stage. When leaving multicast groups, we override this value. Fix that by saving the return value from rdma_leave_multicast to different parameter, and only in case of failure in rdma_leave_multicast override it. Approved by: hselasky (mentor), kib (mentor) Sponsored by: Mellanox Technologies Modified: stable/11/contrib/ofed/librdmacm/examples/mckey.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/ofed/librdmacm/examples/mckey.c ============================================================================== --- stable/11/contrib/ofed/librdmacm/examples/mckey.c Mon Jun 25 06:57:10 2018 (r335613) +++ stable/11/contrib/ofed/librdmacm/examples/mckey.c Mon Jun 25 07:25:41 2018 (r335614) @@ -475,7 +475,7 @@ static int get_dst_addr(char *dst, struct sockaddr *ad static int run(void) { - int i, ret; + int i, ret, err; printf("mckey: starting %s\n", is_sender ? "client" : "server"); if (src_addr) { @@ -543,10 +543,12 @@ static int run(void) } out: for (i = 0; i < connections; i++) { - ret = rdma_leave_multicast(test.nodes[i].cma_id, + err = rdma_leave_multicast(test.nodes[i].cma_id, test.dst_addr); - if (ret) + if (err) { perror("mckey: failure leaving"); + ret = err; + } } return ret; } From owner-svn-src-all@freebsd.org Mon Jun 25 07:25:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4C37102898D for ; Mon, 25 Jun 2018 07:25:50 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3120B8F3AA for ; Mon, 25 Jun 2018 07:25:49 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-ed1-x52a.google.com with SMTP id b12-v6so4666923edt.8 for ; Mon, 25 Jun 2018 00:25:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=5pZ2+Nd/HXoqPkP0bHow2MDnT4rEPQ0ppwcAyzjg+Eo=; b=M1L1rxprmBC3z6f3yucz8EUzyzHuqyqnlNV7lKTp7sgxqS82TE25IL8VD86mSk5H9x GsDjTdS69QB55MZJh28qF5AUs+hxlVvDPCeEWTFzVQ47Tzc31sZPwRwHwrHKdsgyWq+N qfBSBXALo7nwAfD3vq7gdDgLt+w+nBWavGo8RobNxRcKiBbHZ7/ZZqMfER2RAiOC14Jq 6Yg3pH4NSQcsh7CYsuTu4KF1x/Yo51hjptLUBU7y6P1HrGnypfq3C4Nj0aUSTQwDWVoI b2UOzWdvg5bSqW0rkZzp8/hEdKdNdKbaPoou4lHubjm2a+nKhgCsLpn0/sl4c2+mjFxY 4GGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=5pZ2+Nd/HXoqPkP0bHow2MDnT4rEPQ0ppwcAyzjg+Eo=; b=iMW7KEJjYNjHifdHs6x38UxsftIXmJCUrmsjloHvfLBsq8Os0zYjYfaVaZUukrAWeW MxnccPnAluL2MLwJTleqtL0pc+12N3IuEDHuILP7ObjTQWFas0SYgJYHMYiRYN+8oIqi BfUXVJPpo8oZZRvOp8sH7eIzAGRIEIiYQKk1ReBHq7Y0V8yPsmpfajVGRZD3lq7N3UvQ C0ztZPGEJ0f+G4LKf3Ie0ZKgH3TeYgG62McO1UQgtOWFeAg2w5zEzxaOkMIOp2EB/E28 pvLeWFQS3FNHUwjDXGdkc+0AXL8sRdkBh7ErX2JfX3TjIc0mrg4JopijDz5oSENp7Sva Fxxg== X-Gm-Message-State: APt69E3dLQeRY6cdxRv5M/ShmutXQiHuPY5e99+kCzECHkibc1d8ArHf +bC0yJb8LkuEuKS68aLSjCxEuOXJBFRg26LOV4bP9Hu/ X-Google-Smtp-Source: ADUXVKJApnR7nxhKqn1Vum+EuIXMJ3s8O4gbknNFaUFt9gI+8lpCgvWMUAQxu09kmr0mbqYh9a9DiysddOxSFoxC3Zk= X-Received: by 2002:aa7:c542:: with SMTP id s2-v6mr10268824edr.224.1529911548059; Mon, 25 Jun 2018 00:25:48 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a50:8e0d:0:0:0:0:0 with HTTP; Mon, 25 Jun 2018 00:25:17 -0700 (PDT) In-Reply-To: <99d1722c-8085-6a70-64df-2fdb2c20b574@FreeBSD.org> References: <201805132316.w4DNG4oh092482@repo.freebsd.org> <99d1722c-8085-6a70-64df-2fdb2c20b574@FreeBSD.org> From: Ed Schouten Date: Mon, 25 Jun 2018 09:25:17 +0200 Message-ID: Subject: Re: svn commit: r333590 - head/share/man/man9 To: Andriy Gapon Cc: Matt Macy , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 07:25:51 -0000 Hi Andriy, Matthew, 2018-06-24 23:36 GMT+02:00 Andriy Gapon : > Perhaps a little application of google can help. > [keywords: epoch based reclamation] Based on the man page, it wasn't clear that this refers to a generally accepted construct or something that is specific to FreeBSD. Any objections if I were to extend the man page as follows? Index: epoch.9 =================================================================== --- epoch.9 (revision 335613) +++ epoch.9 (working copy) @@ -39,7 +39,7 @@ .Nm epoch_wait , .Nm epoch_call , .Nm in_epoch , -.Nd kernel epoch based reclamation +.Nd kernel Epoch Based Reclamation (EBR) .Sh SYNOPSIS .In sys/param.h .In sys/proc.h @@ -191,3 +191,10 @@ .Xr sleep 9 , .Xr sx 9 , .Xr timeout 9 +.Rs +.%A K. Fraser +.%T Practical lock-freedom +.%D February 2004 +.%P 79-81 +.%U https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-579.pdf +.Re -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands From owner-svn-src-all@freebsd.org Mon Jun 25 08:30:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31D3C1000974; Mon, 25 Jun 2018 08:30:07 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lf0-f67.google.com (mail-lf0-f67.google.com [209.85.215.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9135A7129A; Mon, 25 Jun 2018 08:30:06 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lf0-f67.google.com with SMTP id g21-v6so13747865lfb.4; Mon, 25 Jun 2018 01:30: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:subject:to:cc:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=Narjp8oP/8FhUOMK5fUWrVK59agh1aJ2yTQkMNg0stQ=; b=JrojDrEaCmFWks+6jjg3AhAo6FTnKMnpdSXNPR9gX2+rtvLeYt513Tp0734un1ovSc wnA7Gnf1TD46k6jrQ54WXOQehzbmW+89ha2EZljBNSq+LvLBuWFW5RJOkASbB7kO8ZnC 50CI56b730gtr/KFXDMl4HTrkzevIB4IHxYAB+3TtBmjRuN1k81xgUvCvPNclXI67EBk /deV0WvtWYS8UYN0wehPEU7CYQDE1fWmvZjKW8HaAfJDAtOkhcp2A13L/mlvtVBiVZSm pKgi01YZm4dJjcVVzP0pAdhuPOK7AnU1Tb9fuqGAME2tHZ1CvC1tauPHr6RT+tivwqOk U3BA== X-Gm-Message-State: APt69E0MhFvfywyNxDvuLLdQzU1be1BXaMoHgH5EGrWYelDEuTlBY2oq T3LSYnbGIZ4laUxgW/fk6pO1O+n6 X-Google-Smtp-Source: ADUXVKIKoAvas/CrOz8oBCvIWLm9ellC7R5tMYXpEHX0qNtwR1ilrUzTewh5RF84NWJih69797M7iw== X-Received: by 2002:a19:e20b:: with SMTP id z11-v6mr2073544lfg.10.1529914950519; Mon, 25 Jun 2018 01:22:30 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id o25-v6sm3054181lfg.41.2018.06.25.01.22.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jun 2018 01:22:29 -0700 (PDT) Subject: Re: svn commit: r333590 - head/share/man/man9 To: Ed Schouten Cc: Matt Macy , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201805132316.w4DNG4oh092482@repo.freebsd.org> <99d1722c-8085-6a70-64df-2fdb2c20b574@FreeBSD.org> From: Andriy Gapon Openpgp: preference=signencrypt Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= xsFNBFm4LIgBEADNB/3lT7f15UKeQ52xCFQx/GqHkSxEdVyLFZTmY3KyNPQGBtyvVyBfprJ7 mAeXZWfhat6cKNRAGZcL5EmewdQuUfQfBdYmKjbw3a9GFDsDNuhDA2QwFt8BmkiVMRYyvI7l N0eVzszWCUgdc3qqM6qqcgBaqsVmJluwpvwp4ZBXmch5BgDDDb1MPO8AZ2QZfIQmplkj8Y6Z AiNMknkmgaekIINSJX8IzRzKD5WwMsin70psE8dpL/iBsA2cpJGzWMObVTtCxeDKlBCNqM1i gTXta1ukdUT7JgLEFZk9ceYQQMJJtUwzWu1UHfZn0Fs29HTqawfWPSZVbulbrnu5q55R4PlQ /xURkWQUTyDpqUvb4JK371zhepXiXDwrrpnyyZABm3SFLkk2bHlheeKU6Yql4pcmSVym1AS4 dV8y0oHAfdlSCF6tpOPf2+K9nW1CFA8b/tw4oJBTtfZ1kxXOMdyZU5fiG7xb1qDgpQKgHUX8 7Rd2T1UVLVeuhYlXNw2F+a2ucY+cMoqz3LtpksUiBppJhw099gEXehcN2JbUZ2TueJdt1FdS ztnZmsHUXLxrRBtGwqnFL7GSd6snpGIKuuL305iaOGODbb9c7ne1JqBbkw1wh8ci6vvwGlzx rexzimRaBzJxlkjNfMx8WpCvYebGMydNoeEtkWldtjTNVsUAtQARAQABzR5BbmRyaXkgR2Fw b24gPGF2Z0BGcmVlQlNELm9yZz7CwZQEEwEIAD4WIQS+LEO7ngQnXA4Bjr538m7TUc1yjwUC WbgsiAIbIwUJBaOagAULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgAAKCRB38m7TUc1yj+JAEACV l9AK/nOWAt/9cufV2fRj0hdOqB1aCshtSrwHk/exXsDa4/FkmegxXQGY+3GWX3deIyesbVRL rYdtdK0dqJyT1SBqXK1h3/at9rxr9GQA6KWOxTjUFURsU7ok/6SIlm8uLRPNKO+yq0GDjgaO LzN+xykuBA0FlhQAXJnpZLcVfPJdWv7sSHGedL5ln8P8rxR+XnmsA5TUaaPcbhTB+mG+iKFj GghASDSfGqLWFPBlX/fpXikBDZ1gvOr8nyMY9nXhgfXpq3B6QCRYKPy58ChrZ5weeJZ29b7/ QdEO8NFNWHjSD9meiLdWQaqo9Y7uUxN3wySc/YUZxtS0bhAd8zJdNPsJYG8sXgKjeBQMVGuT eCAJFEYJqbwWvIXMfVWop4+O4xB+z2YE3jAbG/9tB/GSnQdVSj3G8MS80iLS58frnt+RSEw/ psahrfh0dh6SFHttE049xYiC+cM8J27Aaf0i9RflyITq57NuJm+AHJoU9SQUkIF0nc6lfA+o JRiyRlHZHKoRQkIg4aiKaZSWjQYRl5Txl0IZUP1dSWMX4s3XTMurC/pnja45dge/4ESOtJ9R 8XuIWg45Oq6MeIWdjKddGhRj3OohsltKgkEU3eLKYtB6qRTQypHHUawCXz88uYt5e3w4V16H lCpSTZV/EVHnNe45FVBlvK7k7HFfDDkryM7BTQRZuCyIARAAlq0slcsVboY/+IUJdcbEiJRW be9HKVz4SUchq0z9MZPX/0dcnvz/gkyYA+OuM78dNS7Mbby5dTvOqfpLJfCuhaNYOhlE0wY+ 1T6Tf1f4c/uA3U/YiadukQ3+6TJuYGAdRZD5EqYFIkreARTVWg87N9g0fT9BEqLw9lJtEGDY EWUE7L++B8o4uu3LQFEYxcrb4K/WKmgtmFcm77s0IKDrfcX4doV92QTIpLiRxcOmCC/OCYuO jB1oaaqXQzZrCutXRK0L5XN1Y1PYjIrEzHMIXmCDlLYnpFkK+itlXwlE2ZQxkfMruCWdQXye syl2fynAe8hvp7Mms9qU2r2K9EcJiR5N1t1C2/kTKNUhcRv7Yd/vwusK7BqJbhlng5ZgRx0m WxdntU/JLEntz3QBsBsWM9Y9wf2V4tLv6/DuDBta781RsCB/UrU2zNuOEkSixlUiHxw1dccI 6CVlaWkkJBxmHX22GdDFrcjvwMNIbbyfQLuBq6IOh8nvu9vuItup7qemDG3Ms6TVwA7BD3j+ 3fGprtyW8Fd/RR2bW2+LWkMrqHffAr6Y6V3h5kd2G9Q8ZWpEJk+LG6Mk3fhZhmCnHhDu6CwN MeUvxXDVO+fqc3JjFm5OxhmfVeJKrbCEUJyM8ESWLoNHLqjywdZga4Q7P12g8DUQ1mRxYg/L HgZY3zfKOqcAEQEAAcLBfAQYAQgAJhYhBL4sQ7ueBCdcDgGOvnfybtNRzXKPBQJZuCyIAhsM BQkFo5qAAAoJEHfybtNRzXKPBVwQAKfFy9P7N3OsLDMB56A4Kf+ZT+d5cIx0Yiaf4n6w7m3i ImHHHk9FIetI4Xe54a2IXh4Bq5UkAGY0667eIs+Z1Ea6I2i27Sdo7DxGwq09Qnm/Y65ADvXs 3aBvokCcm7FsM1wky395m8xUos1681oV5oxgqeRI8/76qy0hD9WR65UW+HQgZRIcIjSel9vR XDaD2HLGPTTGr7u4v00UeTMs6qvPsa2PJagogrKY8RXdFtXvweQFz78NbXhluwix2Tb9ETPk LIpDrtzV73CaE2aqBG/KrboXT2C67BgFtnk7T7Y7iKq4/XvEdDWscz2wws91BOXuMMd4c/c4 OmGW9m3RBLufFrOag1q5yUS9QbFfyqL6dftJP3Zq/xe+mr7sbWbhPVCQFrH3r26mpmy841ym dwQnNcsbIGiBASBSKksOvIDYKa2Wy8htPmWFTEOPRpFXdGQ27awcjjnB42nngyCK5ukZDHi6 w0qK5DNQQCkiweevCIC6wc3p67jl1EMFY5+z+zdTPb3h7LeVnGqW0qBQl99vVFgzLxchKcl0 R/paSFgwqXCZhAKMuUHncJuynDOP7z5LirUeFI8qsBAJi1rXpQoLJTVcW72swZ42IdPiboqx NbTMiNOiE36GqMcTPfKylCbF45JNX4nF9ElM0E+Y8gi4cizJYBRr2FBJgay0b9Cp Message-ID: <92f8270c-f726-7610-c209-3c35d2ad5b2c@FreeBSD.org> Date: Mon, 25 Jun 2018 11:22:28 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 08:30:07 -0000 On 25/06/2018 10:25, Ed Schouten wrote: > Hi Andriy, Matthew, > > 2018-06-24 23:36 GMT+02:00 Andriy Gapon : >> Perhaps a little application of google can help. >> [keywords: epoch based reclamation] > > Based on the man page, it wasn't clear that this refers to a generally > accepted construct or something that is specific to FreeBSD. Any > objections if I were to extend the man page as follows? Certainly not from me. Also, given that epoch(9) is a wrapper around (or based on) the implementation provided by Concurrency Kit, maybe we should have some kind of a gateway manual page for the latter. That page would provide an introduction to Concurrency Kit and links to its resources. Then epoch.9 could reference it. > Index: epoch.9 > =================================================================== > --- epoch.9 (revision 335613) > +++ epoch.9 (working copy) > @@ -39,7 +39,7 @@ > .Nm epoch_wait , > .Nm epoch_call , > .Nm in_epoch , > -.Nd kernel epoch based reclamation > +.Nd kernel Epoch Based Reclamation (EBR) > .Sh SYNOPSIS > .In sys/param.h > .In sys/proc.h > @@ -191,3 +191,10 @@ > .Xr sleep 9 , > .Xr sx 9 , > .Xr timeout 9 > +.Rs > +.%A K. Fraser > +.%T Practical lock-freedom > +.%D February 2004 > +.%P 79-81 > +.%U https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-579.pdf > +.Re > -- Andriy Gapon From owner-svn-src-all@freebsd.org Mon Jun 25 08:47:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 602D51001332; Mon, 25 Jun 2018 08:47:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1181371C92; Mon, 25 Jun 2018 08:47:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E2A9F2AE95; Mon, 25 Jun 2018 08:47:07 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5P8l7a3040903; Mon, 25 Jun 2018 08:47:07 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5P8l7oW040902; Mon, 25 Jun 2018 08:47:07 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806250847.w5P8l7oW040902@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 25 Jun 2018 08:47:07 +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: r335616 - stable/11/sys/dev/usb/serial X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/dev/usb/serial X-SVN-Commit-Revision: 335616 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 08:47:08 -0000 Author: avg Date: Mon Jun 25 08:47:07 2018 New Revision: 335616 URL: https://svnweb.freebsd.org/changeset/base/335616 Log: MFC r333997: uchcom: report detected product based on USB product ID Modified: stable/11/sys/dev/usb/serial/uchcom.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/serial/uchcom.c ============================================================================== --- stable/11/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:29:43 2018 (r335615) +++ stable/11/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:47:07 2018 (r335616) @@ -320,12 +320,16 @@ uchcom_attach(device_t dev) sc->sc_udev = uaa->device; - switch (uaa->info.bcdDevice) { - case UCHCOM_REV_CH340: + switch (uaa->info.idProduct) { + case USB_PRODUCT_WCH2_CH341SER: device_printf(dev, "CH340 detected\n"); break; - default: + case USB_PRODUCT_WCH2_CH341SER_2: device_printf(dev, "CH341 detected\n"); + break; + default: + device_printf(dev, "New CH340/CH341 product 0x%04x detected\n", + uaa->info.idProduct); break; } From owner-svn-src-all@freebsd.org Mon Jun 25 08:47:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADDE110013AF; Mon, 25 Jun 2018 08:47:55 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 589D071DF7; Mon, 25 Jun 2018 08:47:55 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 39C962AE96; Mon, 25 Jun 2018 08:47:55 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5P8ltUs041001; Mon, 25 Jun 2018 08:47:55 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5P8lt85041000; Mon, 25 Jun 2018 08:47:55 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806250847.w5P8lt85041000@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 25 Jun 2018 08:47:55 +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: r335617 - stable/10/sys/dev/usb/serial X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/dev/usb/serial X-SVN-Commit-Revision: 335617 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 08:47:55 -0000 Author: avg Date: Mon Jun 25 08:47:54 2018 New Revision: 335617 URL: https://svnweb.freebsd.org/changeset/base/335617 Log: MFC r333997: uchcom: report detected product based on USB product ID Modified: stable/10/sys/dev/usb/serial/uchcom.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/serial/uchcom.c ============================================================================== --- stable/10/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:47:07 2018 (r335616) +++ stable/10/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:47:54 2018 (r335617) @@ -320,12 +320,16 @@ uchcom_attach(device_t dev) sc->sc_udev = uaa->device; - switch (uaa->info.bcdDevice) { - case UCHCOM_REV_CH340: + switch (uaa->info.idProduct) { + case USB_PRODUCT_WCH2_CH341SER: device_printf(dev, "CH340 detected\n"); break; - default: + case USB_PRODUCT_WCH2_CH341SER_2: device_printf(dev, "CH341 detected\n"); + break; + default: + device_printf(dev, "New CH340/CH341 product 0x%04x detected\n", + uaa->info.idProduct); break; } From owner-svn-src-all@freebsd.org Mon Jun 25 08:48:40 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C10C8100144C; Mon, 25 Jun 2018 08:48:40 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6DDB871F38; Mon, 25 Jun 2018 08:48:40 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4FC242AE97; Mon, 25 Jun 2018 08:48:40 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5P8meWK041095; Mon, 25 Jun 2018 08:48:40 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5P8meYf041094; Mon, 25 Jun 2018 08:48:40 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806250848.w5P8meYf041094@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 25 Jun 2018 08:48:40 +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: r335618 - stable/11/sys/dev/usb/serial X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/dev/usb/serial X-SVN-Commit-Revision: 335618 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 08:48:40 -0000 Author: avg Date: Mon Jun 25 08:48:39 2018 New Revision: 335618 URL: https://svnweb.freebsd.org/changeset/base/335618 Log: MFC r333998: uchcom: add DPRINTF-s to aid debugging of the driver Modified: stable/11/sys/dev/usb/serial/uchcom.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/serial/uchcom.c ============================================================================== --- stable/11/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:47:54 2018 (r335617) +++ stable/11/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:48:39 2018 (r335618) @@ -414,6 +414,8 @@ uchcom_ctrl_write(struct uchcom_softc *sc, uint8_t req USETW(req.wIndex, index); USETW(req.wLength, 0); + DPRINTF("WR REQ 0x%02X VAL 0x%04X IDX 0x%04X\n", + reqno, value, index); ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, &req, NULL, 0, 1000); } @@ -430,6 +432,8 @@ uchcom_ctrl_read(struct uchcom_softc *sc, uint8_t reqn USETW(req.wIndex, index); USETW(req.wLength, buflen); + DPRINTF("RD REQ 0x%02X VAL 0x%04X IDX 0x%04X LEN %d\n", + reqno, value, index, buflen); ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, &req, buf, USB_SHORT_XFER_OK, 1000); } @@ -504,6 +508,7 @@ static void uchcom_update_version(struct uchcom_softc *sc) { uchcom_get_version(sc, &sc->sc_version); + DPRINTF("Chip version: 0x%02x\n", sc->sc_version); } static void From owner-svn-src-all@freebsd.org Mon Jun 25 08:49:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5619710014FA; Mon, 25 Jun 2018 08:49:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0809C72079; Mon, 25 Jun 2018 08:49:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DD4E52AE98; Mon, 25 Jun 2018 08:49:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5P8nDvF041184; Mon, 25 Jun 2018 08:49:13 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5P8nDMA041183; Mon, 25 Jun 2018 08:49:13 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806250849.w5P8nDMA041183@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 25 Jun 2018 08:49:13 +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: r335619 - stable/10/sys/dev/usb/serial X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/dev/usb/serial X-SVN-Commit-Revision: 335619 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 08:49:14 -0000 Author: avg Date: Mon Jun 25 08:49:13 2018 New Revision: 335619 URL: https://svnweb.freebsd.org/changeset/base/335619 Log: MFC r333998: uchcom: add DPRINTF-s to aid debugging of the driver Modified: stable/10/sys/dev/usb/serial/uchcom.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/serial/uchcom.c ============================================================================== --- stable/10/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:48:39 2018 (r335618) +++ stable/10/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:49:13 2018 (r335619) @@ -414,6 +414,8 @@ uchcom_ctrl_write(struct uchcom_softc *sc, uint8_t req USETW(req.wIndex, index); USETW(req.wLength, 0); + DPRINTF("WR REQ 0x%02X VAL 0x%04X IDX 0x%04X\n", + reqno, value, index); ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, &req, NULL, 0, 1000); } @@ -430,6 +432,8 @@ uchcom_ctrl_read(struct uchcom_softc *sc, uint8_t reqn USETW(req.wIndex, index); USETW(req.wLength, buflen); + DPRINTF("RD REQ 0x%02X VAL 0x%04X IDX 0x%04X LEN %d\n", + reqno, value, index, buflen); ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, &req, buf, USB_SHORT_XFER_OK, 1000); } @@ -504,6 +508,7 @@ static void uchcom_update_version(struct uchcom_softc *sc) { uchcom_get_version(sc, &sc->sc_version); + DPRINTF("Chip version: 0x%02x\n", sc->sc_version); } static void From owner-svn-src-all@freebsd.org Mon Jun 25 08:50:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29C7310015C0; Mon, 25 Jun 2018 08:50:07 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CF323721D8; Mon, 25 Jun 2018 08:50:06 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B15022AE9C; Mon, 25 Jun 2018 08:50:06 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5P8o6TN041317; Mon, 25 Jun 2018 08:50:06 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5P8o6Va041316; Mon, 25 Jun 2018 08:50:06 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806250850.w5P8o6Va041316@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 25 Jun 2018 08:50: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: r335620 - stable/11/sys/dev/usb/serial X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/dev/usb/serial X-SVN-Commit-Revision: 335620 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 08:50:07 -0000 Author: avg Date: Mon Jun 25 08:50:06 2018 New Revision: 335620 URL: https://svnweb.freebsd.org/changeset/base/335620 Log: MFC r333999: uchcom: add a hardware configuration tweak seen in Linux code Modified: stable/11/sys/dev/usb/serial/uchcom.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/serial/uchcom.c ============================================================================== --- stable/11/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:49:13 2018 (r335619) +++ stable/11/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:50:06 2018 (r335620) @@ -616,8 +616,12 @@ uchcom_set_baudrate(struct uchcom_softc *sc, uint32_t if (uchcom_calc_divider_settings(&dv, rate)) return; + /* + * According to linux code we need to set bit 7 of UCHCOM_REG_BPS_PRE, + * otherwise the chip will buffer data. + */ uchcom_write_reg(sc, - UCHCOM_REG_BPS_PRE, dv.dv_prescaler, + UCHCOM_REG_BPS_PRE, dv.dv_prescaler | 0x80, UCHCOM_REG_BPS_DIV, dv.dv_div); uchcom_write_reg(sc, UCHCOM_REG_BPS_MOD, dv.dv_mod, From owner-svn-src-all@freebsd.org Mon Jun 25 08:50:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2EA7410016A3; Mon, 25 Jun 2018 08:50:47 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D460E72361; Mon, 25 Jun 2018 08:50:46 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B15532AEB2; Mon, 25 Jun 2018 08:50:46 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5P8okdt043610; Mon, 25 Jun 2018 08:50:46 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5P8okBX043609; Mon, 25 Jun 2018 08:50:46 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806250850.w5P8okBX043609@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 25 Jun 2018 08:50:46 +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: r335621 - stable/10/sys/dev/usb/serial X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/dev/usb/serial X-SVN-Commit-Revision: 335621 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 08:50:47 -0000 Author: avg Date: Mon Jun 25 08:50:46 2018 New Revision: 335621 URL: https://svnweb.freebsd.org/changeset/base/335621 Log: MFC r333999: uchcom: add a hardware configuration tweak seen in Linux code Modified: stable/10/sys/dev/usb/serial/uchcom.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/serial/uchcom.c ============================================================================== --- stable/10/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:50:06 2018 (r335620) +++ stable/10/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:50:46 2018 (r335621) @@ -616,8 +616,12 @@ uchcom_set_baudrate(struct uchcom_softc *sc, uint32_t if (uchcom_calc_divider_settings(&dv, rate)) return; + /* + * According to linux code we need to set bit 7 of UCHCOM_REG_BPS_PRE, + * otherwise the chip will buffer data. + */ uchcom_write_reg(sc, - UCHCOM_REG_BPS_PRE, dv.dv_prescaler, + UCHCOM_REG_BPS_PRE, dv.dv_prescaler | 0x80, UCHCOM_REG_BPS_DIV, dv.dv_div); uchcom_write_reg(sc, UCHCOM_REG_BPS_MOD, dv.dv_mod, From owner-svn-src-all@freebsd.org Mon Jun 25 08:52:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76ACF1001B74; Mon, 25 Jun 2018 08:52:49 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2C2307283B; Mon, 25 Jun 2018 08:52:49 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0F01A2B028; Mon, 25 Jun 2018 08:52:49 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5P8qmax045926; Mon, 25 Jun 2018 08:52:48 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5P8qm8w045925; Mon, 25 Jun 2018 08:52:48 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806250852.w5P8qm8w045925@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 25 Jun 2018 08:52:48 +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: r335622 - stable/11/sys/dev/usb/serial X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/dev/usb/serial X-SVN-Commit-Revision: 335622 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 08:52:49 -0000 Author: avg Date: Mon Jun 25 08:52:48 2018 New Revision: 335622 URL: https://svnweb.freebsd.org/changeset/base/335622 Log: MFC r334000: uchcom: reject parity and double stop bits as unsupported Modified: stable/11/sys/dev/usb/serial/uchcom.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/serial/uchcom.c ============================================================================== --- stable/11/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:50:46 2018 (r335621) +++ stable/11/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:52:48 2018 (r335622) @@ -687,6 +687,10 @@ uchcom_pre_param(struct ucom_softc *ucom, struct termi default: return (EIO); } + if ((t->c_cflag & CSTOPB) != 0) + return (EIO); + if ((t->c_cflag & PARENB) != 0) + return (EIO); if (uchcom_calc_divider_settings(&dv, t->c_ospeed)) { return (EIO); From owner-svn-src-all@freebsd.org Mon Jun 25 08:53:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4CFEE1001DC4; Mon, 25 Jun 2018 08:53:31 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F101E72A31; Mon, 25 Jun 2018 08:53:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D1FA02B02A; Mon, 25 Jun 2018 08:53:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5P8rUE3046022; Mon, 25 Jun 2018 08:53:30 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5P8rU2c046021; Mon, 25 Jun 2018 08:53:30 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806250853.w5P8rU2c046021@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 25 Jun 2018 08:53:30 +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: r335623 - stable/10/sys/dev/usb/serial X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/dev/usb/serial X-SVN-Commit-Revision: 335623 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 08:53:31 -0000 Author: avg Date: Mon Jun 25 08:53:30 2018 New Revision: 335623 URL: https://svnweb.freebsd.org/changeset/base/335623 Log: MFC r334000: uchcom: reject parity and double stop bits as unsupported Modified: stable/10/sys/dev/usb/serial/uchcom.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/serial/uchcom.c ============================================================================== --- stable/10/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:52:48 2018 (r335622) +++ stable/10/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:53:30 2018 (r335623) @@ -686,6 +686,10 @@ uchcom_pre_param(struct ucom_softc *ucom, struct termi default: return (EIO); } + if ((t->c_cflag & CSTOPB) != 0) + return (EIO); + if ((t->c_cflag & PARENB) != 0) + return (EIO); if (uchcom_calc_divider_settings(&dv, t->c_ospeed)) { return (EIO); From owner-svn-src-all@freebsd.org Mon Jun 25 08:54:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E14591002073; Mon, 25 Jun 2018 08:54:46 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9109672BCD; Mon, 25 Jun 2018 08:54:46 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 72D762B02B; Mon, 25 Jun 2018 08:54:46 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5P8skZ9046139; Mon, 25 Jun 2018 08:54:46 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5P8skGM046138; Mon, 25 Jun 2018 08:54:46 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806250854.w5P8skGM046138@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 25 Jun 2018 08:54:46 +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: r335624 - stable/11/sys/dev/usb/serial X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/dev/usb/serial X-SVN-Commit-Revision: 335624 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 08:54:47 -0000 Author: avg Date: Mon Jun 25 08:54:46 2018 New Revision: 335624 URL: https://svnweb.freebsd.org/changeset/base/335624 Log: MFC r334001: uchcom: remove UCHCOM_REG_BREAK2 alias of UCHCOM_REG_LCR1 Modified: stable/11/sys/dev/usb/serial/uchcom.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/serial/uchcom.c ============================================================================== --- stable/11/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:53:30 2018 (r335623) +++ stable/11/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:54:46 2018 (r335624) @@ -120,7 +120,6 @@ SYSCTL_INT(_hw_usb_uchcom, OID_AUTO, debug, CTLFLAG_RW #define UCHCOM_REG_BPS_MOD 0x14 #define UCHCOM_REG_BPS_PAD 0x0F #define UCHCOM_REG_BREAK1 0x05 -#define UCHCOM_REG_BREAK2 0x18 #define UCHCOM_REG_LCR1 0x18 #define UCHCOM_REG_LCR2 0x25 @@ -133,12 +132,14 @@ SYSCTL_INT(_hw_usb_uchcom, OID_AUTO, debug, CTLFLAG_RW #define UCHCOM_DTR_MASK 0x20 #define UCHCOM_RTS_MASK 0x40 -#define UCHCOM_BRK1_MASK 0x01 -#define UCHCOM_BRK2_MASK 0x40 +#define UCHCOM_BRK_MASK 0x01 #define UCHCOM_LCR1_MASK 0xAF #define UCHCOM_LCR2_MASK 0x07 -#define UCHCOM_LCR1_PARENB 0x80 +#define UCHCOM_LCR1_RX 0x80 +#define UCHCOM_LCR1_TX 0x40 +#define UCHCOM_LCR1_PARENB 0x08 +#define UCHCOM_LCR1_CS8 0x03 #define UCHCOM_LCR2_PAREVEN 0x07 #define UCHCOM_LCR2_PARODD 0x06 #define UCHCOM_LCR2_PARMARK 0x05 @@ -554,17 +555,17 @@ uchcom_cfg_set_break(struct ucom_softc *ucom, uint8_t uint8_t brk1; uint8_t brk2; - uchcom_read_reg(sc, UCHCOM_REG_BREAK1, &brk1, UCHCOM_REG_BREAK2, &brk2); + uchcom_read_reg(sc, UCHCOM_REG_BREAK1, &brk1, UCHCOM_REG_LCR1, &brk2); if (onoff) { /* on - clear bits */ - brk1 &= ~UCHCOM_BRK1_MASK; - brk2 &= ~UCHCOM_BRK2_MASK; + brk1 &= ~UCHCOM_BRK_MASK; + brk2 &= ~UCHCOM_LCR1_TX; } else { /* off - set bits */ - brk1 |= UCHCOM_BRK1_MASK; - brk2 |= UCHCOM_BRK2_MASK; + brk1 |= UCHCOM_BRK_MASK; + brk2 |= UCHCOM_LCR1_TX; } - uchcom_write_reg(sc, UCHCOM_REG_BREAK1, brk1, UCHCOM_REG_BREAK2, brk2); + uchcom_write_reg(sc, UCHCOM_REG_BREAK1, brk1, UCHCOM_REG_LCR1, brk2); } static int From owner-svn-src-all@freebsd.org Mon Jun 25 08:55:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 584B11002106; Mon, 25 Jun 2018 08:55:20 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 005D572CF1; Mon, 25 Jun 2018 08:55:20 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D59B52B02C; Mon, 25 Jun 2018 08:55:19 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5P8tJUY046255; Mon, 25 Jun 2018 08:55:19 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5P8tJrX046254; Mon, 25 Jun 2018 08:55:19 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806250855.w5P8tJrX046254@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 25 Jun 2018 08:55:19 +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: r335625 - stable/10/sys/dev/usb/serial X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/dev/usb/serial X-SVN-Commit-Revision: 335625 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 08:55:20 -0000 Author: avg Date: Mon Jun 25 08:55:19 2018 New Revision: 335625 URL: https://svnweb.freebsd.org/changeset/base/335625 Log: MFC r334001: uchcom: remove UCHCOM_REG_BREAK2 alias of UCHCOM_REG_LCR1 Modified: stable/10/sys/dev/usb/serial/uchcom.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/serial/uchcom.c ============================================================================== --- stable/10/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:54:46 2018 (r335624) +++ stable/10/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:55:19 2018 (r335625) @@ -120,7 +120,6 @@ SYSCTL_INT(_hw_usb_uchcom, OID_AUTO, debug, CTLFLAG_RW #define UCHCOM_REG_BPS_MOD 0x14 #define UCHCOM_REG_BPS_PAD 0x0F #define UCHCOM_REG_BREAK1 0x05 -#define UCHCOM_REG_BREAK2 0x18 #define UCHCOM_REG_LCR1 0x18 #define UCHCOM_REG_LCR2 0x25 @@ -133,12 +132,14 @@ SYSCTL_INT(_hw_usb_uchcom, OID_AUTO, debug, CTLFLAG_RW #define UCHCOM_DTR_MASK 0x20 #define UCHCOM_RTS_MASK 0x40 -#define UCHCOM_BRK1_MASK 0x01 -#define UCHCOM_BRK2_MASK 0x40 +#define UCHCOM_BRK_MASK 0x01 #define UCHCOM_LCR1_MASK 0xAF #define UCHCOM_LCR2_MASK 0x07 -#define UCHCOM_LCR1_PARENB 0x80 +#define UCHCOM_LCR1_RX 0x80 +#define UCHCOM_LCR1_TX 0x40 +#define UCHCOM_LCR1_PARENB 0x08 +#define UCHCOM_LCR1_CS8 0x03 #define UCHCOM_LCR2_PAREVEN 0x07 #define UCHCOM_LCR2_PARODD 0x06 #define UCHCOM_LCR2_PARMARK 0x05 @@ -554,17 +555,17 @@ uchcom_cfg_set_break(struct ucom_softc *ucom, uint8_t uint8_t brk1; uint8_t brk2; - uchcom_read_reg(sc, UCHCOM_REG_BREAK1, &brk1, UCHCOM_REG_BREAK2, &brk2); + uchcom_read_reg(sc, UCHCOM_REG_BREAK1, &brk1, UCHCOM_REG_LCR1, &brk2); if (onoff) { /* on - clear bits */ - brk1 &= ~UCHCOM_BRK1_MASK; - brk2 &= ~UCHCOM_BRK2_MASK; + brk1 &= ~UCHCOM_BRK_MASK; + brk2 &= ~UCHCOM_LCR1_TX; } else { /* off - set bits */ - brk1 |= UCHCOM_BRK1_MASK; - brk2 |= UCHCOM_BRK2_MASK; + brk1 |= UCHCOM_BRK_MASK; + brk2 |= UCHCOM_LCR1_TX; } - uchcom_write_reg(sc, UCHCOM_REG_BREAK1, brk1, UCHCOM_REG_BREAK2, brk2); + uchcom_write_reg(sc, UCHCOM_REG_BREAK1, brk1, UCHCOM_REG_LCR1, brk2); } static int From owner-svn-src-all@freebsd.org Mon Jun 25 08:56:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 435A010021FC; Mon, 25 Jun 2018 08:56:31 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E492372E83; Mon, 25 Jun 2018 08:56:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C585B2B02D; Mon, 25 Jun 2018 08:56:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5P8uUAq046375; Mon, 25 Jun 2018 08:56:30 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5P8uUEv046374; Mon, 25 Jun 2018 08:56:30 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806250856.w5P8uUEv046374@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 25 Jun 2018 08:56:30 +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: r335626 - stable/11/sys/dev/usb/serial X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/dev/usb/serial X-SVN-Commit-Revision: 335626 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 08:56:31 -0000 Author: avg Date: Mon Jun 25 08:56:30 2018 New Revision: 335626 URL: https://svnweb.freebsd.org/changeset/base/335626 Log: MFC r334002: uchcom: extend hardware support to version 0x30 Modified: stable/11/sys/dev/usb/serial/uchcom.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/serial/uchcom.c ============================================================================== --- stable/11/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:55:19 2018 (r335625) +++ stable/11/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:56:30 2018 (r335626) @@ -124,6 +124,7 @@ SYSCTL_INT(_hw_usb_uchcom, OID_AUTO, debug, CTLFLAG_RW #define UCHCOM_REG_LCR2 0x25 #define UCHCOM_VER_20 0x20 +#define UCHCOM_VER_30 0x30 #define UCHCOM_BASE_UNKNOWN 0 #define UCHCOM_BPS_MOD_BASE 20000000 @@ -704,11 +705,26 @@ uchcom_cfg_param(struct ucom_softc *ucom, struct termi { struct uchcom_softc *sc = ucom->sc_parent; - uchcom_get_version(sc, 0); + uchcom_get_version(sc, NULL); uchcom_ctrl_write(sc, UCHCOM_REQ_RESET, 0, 0); uchcom_set_baudrate(sc, t->c_ospeed); - uchcom_read_reg(sc, 0x18, 0, 0x25, 0); - uchcom_write_reg(sc, 0x18, 0x50, 0x25, 0x00); + if (sc->sc_version < UCHCOM_VER_30) { + uchcom_read_reg(sc, UCHCOM_REG_LCR1, NULL, + UCHCOM_REG_LCR2, NULL); + uchcom_write_reg(sc, UCHCOM_REG_LCR1, 0x50, + UCHCOM_REG_LCR2, 0x00); + } else { + /* + * Set up line control: + * - enable transmit and receive + * - set 8n1 mode + * To do: support other sizes, parity, stop bits. + */ + uchcom_write_reg(sc, + UCHCOM_REG_LCR1, + UCHCOM_LCR1_RX | UCHCOM_LCR1_TX | UCHCOM_LCR1_CS8, + UCHCOM_REG_LCR2, 0x00); + } uchcom_update_status(sc); uchcom_ctrl_write(sc, UCHCOM_REQ_RESET, 0x501f, 0xd90a); uchcom_set_baudrate(sc, t->c_ospeed); From owner-svn-src-all@freebsd.org Mon Jun 25 08:57:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B2DF10022C8; Mon, 25 Jun 2018 08:57:04 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9C5AC72FC9; Mon, 25 Jun 2018 08:57:04 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7EC5A2B02E; Mon, 25 Jun 2018 08:57:04 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5P8v4gM046461; Mon, 25 Jun 2018 08:57:04 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5P8v4fl046460; Mon, 25 Jun 2018 08:57:04 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806250857.w5P8v4fl046460@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 25 Jun 2018 08:57:04 +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: r335627 - stable/10/sys/dev/usb/serial X-SVN-Group: stable-10 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/10/sys/dev/usb/serial X-SVN-Commit-Revision: 335627 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 08:57:05 -0000 Author: avg Date: Mon Jun 25 08:57:03 2018 New Revision: 335627 URL: https://svnweb.freebsd.org/changeset/base/335627 Log: MFC r334002: uchcom: extend hardware support to version 0x30 Modified: stable/10/sys/dev/usb/serial/uchcom.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/serial/uchcom.c ============================================================================== --- stable/10/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:56:30 2018 (r335626) +++ stable/10/sys/dev/usb/serial/uchcom.c Mon Jun 25 08:57:03 2018 (r335627) @@ -124,6 +124,7 @@ SYSCTL_INT(_hw_usb_uchcom, OID_AUTO, debug, CTLFLAG_RW #define UCHCOM_REG_LCR2 0x25 #define UCHCOM_VER_20 0x20 +#define UCHCOM_VER_30 0x30 #define UCHCOM_BASE_UNKNOWN 0 #define UCHCOM_BPS_MOD_BASE 20000000 @@ -703,11 +704,26 @@ uchcom_cfg_param(struct ucom_softc *ucom, struct termi { struct uchcom_softc *sc = ucom->sc_parent; - uchcom_get_version(sc, 0); + uchcom_get_version(sc, NULL); uchcom_ctrl_write(sc, UCHCOM_REQ_RESET, 0, 0); uchcom_set_baudrate(sc, t->c_ospeed); - uchcom_read_reg(sc, 0x18, 0, 0x25, 0); - uchcom_write_reg(sc, 0x18, 0x50, 0x25, 0x00); + if (sc->sc_version < UCHCOM_VER_30) { + uchcom_read_reg(sc, UCHCOM_REG_LCR1, NULL, + UCHCOM_REG_LCR2, NULL); + uchcom_write_reg(sc, UCHCOM_REG_LCR1, 0x50, + UCHCOM_REG_LCR2, 0x00); + } else { + /* + * Set up line control: + * - enable transmit and receive + * - set 8n1 mode + * To do: support other sizes, parity, stop bits. + */ + uchcom_write_reg(sc, + UCHCOM_REG_LCR1, + UCHCOM_LCR1_RX | UCHCOM_LCR1_TX | UCHCOM_LCR1_CS8, + UCHCOM_REG_LCR2, 0x00); + } uchcom_update_status(sc); uchcom_ctrl_write(sc, UCHCOM_REQ_RESET, 0x501f, 0xd90a); uchcom_set_baudrate(sc, t->c_ospeed); From owner-svn-src-all@freebsd.org Mon Jun 25 09:19:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8639F1002F85; Mon, 25 Jun 2018 09:19:51 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3864E73BBB; Mon, 25 Jun 2018 09:19:51 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 15A662B360; Mon, 25 Jun 2018 09:19:51 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5P9Jo4F057028; Mon, 25 Jun 2018 09:19:50 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5P9JoTM057027; Mon, 25 Jun 2018 09:19:50 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806250919.w5P9JoTM057027@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 25 Jun 2018 09:19:50 +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: r335628 - stable/11/sys/x86/x86 X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/x86/x86 X-SVN-Commit-Revision: 335628 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 09:19:51 -0000 Author: avg Date: Mon Jun 25 09:19:50 2018 New Revision: 335628 URL: https://svnweb.freebsd.org/changeset/base/335628 Log: MFC r333638: calibrate lapic timer in native_lapic_setup Modified: stable/11/sys/x86/x86/local_apic.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/x86/local_apic.c ============================================================================== --- stable/11/sys/x86/x86/local_apic.c Mon Jun 25 08:57:03 2018 (r335627) +++ stable/11/sys/x86/x86/local_apic.c Mon Jun 25 09:19:50 2018 (r335628) @@ -202,6 +202,9 @@ SYSCTL_INT(_hw_apic, OID_AUTO, eoi_suppression, CTLFLA SYSCTL_INT(_hw_apic, OID_AUTO, timer_tsc_deadline, CTLFLAG_RD, &lapic_timer_tsc_deadline, 0, ""); +static void lapic_calibrate_initcount(struct lapic *la); +static void lapic_calibrate_deadline(struct lapic *la); + static uint32_t lapic_read32(enum LAPIC_REGISTERS reg) { @@ -783,6 +786,13 @@ native_lapic_setup(int boot) intrcnt_add(buf, &la->la_timer_count); } + /* Calibrate the timer parameters using BSP. */ + if (boot && IS_BSP()) { + lapic_calibrate_initcount(la); + if (lapic_timer_tsc_deadline) + lapic_calibrate_deadline(la); + } + /* Setup the timer if configured. */ if (la->la_timer_mode != LAT_MODE_UNDEF) { KASSERT(la->la_timer_period != 0, ("lapic%u: zero divisor", @@ -917,7 +927,7 @@ native_lapic_disable_pmc(void) } static void -lapic_calibrate_initcount(struct eventtimer *et, struct lapic *la) +lapic_calibrate_initcount(struct lapic *la) { u_long value; @@ -943,7 +953,7 @@ lapic_calibrate_initcount(struct eventtimer *et, struc } static void -lapic_calibrate_deadline(struct eventtimer *et, struct lapic *la __unused) +lapic_calibrate_deadline(struct lapic *la __unused) { if (bootverbose) { @@ -985,11 +995,6 @@ lapic_et_start(struct eventtimer *et, sbintime_t first struct lapic *la; la = &lapics[PCPU_GET(apic_id)]; - if (et->et_frequency == 0) { - lapic_calibrate_initcount(et, la); - if (lapic_timer_tsc_deadline) - lapic_calibrate_deadline(et, la); - } if (period != 0) { lapic_change_mode(et, la, LAT_MODE_PERIODIC); la->la_timer_period = ((uint32_t)et->et_frequency * period) >> From owner-svn-src-all@freebsd.org Mon Jun 25 09:39:17 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49E8F1003EA8; Mon, 25 Jun 2018 09:39:17 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E084F74996; Mon, 25 Jun 2018 09:39:16 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BC8AA2B68E; Mon, 25 Jun 2018 09:39:16 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5P9dGeo067105; Mon, 25 Jun 2018 09:39:16 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5P9dGMA067104; Mon, 25 Jun 2018 09:39:16 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201806250939.w5P9dGMA067104@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Mon, 25 Jun 2018 09:39:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335629 - in head: share/man/man4 sys/dev/vt/hw/vga X-SVN-Group: head X-SVN-Commit-Author: royger X-SVN-Commit-Paths: in head: share/man/man4 sys/dev/vt/hw/vga X-SVN-Commit-Revision: 335629 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 09:39:17 -0000 Author: royger Date: Mon Jun 25 09:39:16 2018 New Revision: 335629 URL: https://svnweb.freebsd.org/changeset/base/335629 Log: vt: add option to ignore NO_VGA flag in ACPI To workaround buggy firmware that sets this flag when there's actually a VGA present. Reported and tested by: Yasuhiro KIMURA Sponsored by: Citrix Systems R&D Reviewed by: kib Differential revision: https://reviews.freebsd.org/D16003 Modified: head/share/man/man4/vt.4 head/sys/dev/vt/hw/vga/vt_vga.c Modified: head/share/man/man4/vt.4 ============================================================================== --- head/share/man/man4/vt.4 Mon Jun 25 09:19:50 2018 (r335628) +++ head/share/man/man4/vt.4 Mon Jun 25 09:39:16 2018 (r335629) @@ -44,6 +44,7 @@ In .Xr loader.conf 5 : .Cd hw.vga.textmode=1 +.Cd hw.vga.acpi_ignore_no_vga=1 .Cd kern.vty=vt .Cd kern.vt.color..rgb="" .Cd kern.vt.fb.default_mode="x" @@ -196,6 +197,10 @@ prompt or in Set to 1 to use virtual terminals in text mode instead of graphics mode. Features that require graphics mode, like loadable fonts, will be disabled. +.It Va hw.vga.acpi_ignore_no_vga +Set to 1 to force the usage of the VGA driver regardless of whether +ACPI IAPC_BOOT_ARCH signals no VGA support. +Can be used to workaround firmware bugs in the ACPI tables. .It Va kern.vty Set this value to .Ql vt Modified: head/sys/dev/vt/hw/vga/vt_vga.c ============================================================================== --- head/sys/dev/vt/hw/vga/vt_vga.c Mon Jun 25 09:19:50 2018 (r335628) +++ head/sys/dev/vt/hw/vga/vt_vga.c Mon Jun 25 09:39:16 2018 (r335629) @@ -1217,6 +1217,12 @@ vga_acpi_disabled(void) ACPI_TABLE_FADT *fadt; vm_paddr_t physaddr; uint16_t flags; + int ignore; + + TUNABLE_INT_FETCH("hw.vga.acpi_ignore_no_vga", &ignore); + + if (ignore) + return (false); physaddr = acpi_find_table(ACPI_SIG_FADT); if (physaddr == 0) From owner-svn-src-all@freebsd.org Mon Jun 25 10:30:25 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF8BA1005DAF; Mon, 25 Jun 2018 10:30:24 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5587B75F11; Mon, 25 Jun 2018 10:30:24 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-ed1-x533.google.com with SMTP id q24-v6so3422257edr.1; Mon, 25 Jun 2018 03:30:24 -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:user-agent; bh=vp1NsWE71vOk/lSTSqALtv3sf4qGSDylIZaP6Kk02Co=; b=UENmox5JOjn5FZzKOGbTJpD1sD7tSqVCyVBct22BM6MRiZ2Lm5pbQndboTscJmR3f6 E7eMtjojiIMjROBaP8Dia73mCLr5fjihE0kp+Ua8EPyg1L08EKoZin8vRonKCnyOu+iA ZiF3+Bwky3apB1f2gNAJQJ3+jQbD7KMWn9QxGmUql21+JTvG2oBtLgS5njDfqSs/exWB O01eaSVooVXWiixzyEKEBxC71vhDm3tNG8Aw3y+xPOzLo2SjSXUlxi7JV6XigQRd2w5S nhbwsp/SaPfSNwM3EFGVxonxaQr698FXVrPhssd+TV3ykGhbMoEG9ZAfp0ptvi/VdfiW sBmg== 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:user-agent; bh=vp1NsWE71vOk/lSTSqALtv3sf4qGSDylIZaP6Kk02Co=; b=q+YVKBvAhXrwufl9TAtpfVCmKEhQ8JappJP1Zg0qWfWBYUq8W4ujuzfY9e0Qb1zjww PIYUHlBAAK7NBikaevh8/eaeLF8rbOuOSlDWFxxAh52QxNPHn48KsYMRLB4TL+YSOxvk lXUtg+bxHgYRRHwJFt9p49VUlz2FK+iFh4PprJ69jDE4AEfJ/NNn0i5U+hAQxrNqsOtZ oO1u+enZxHTYwwEvUHJpiiJNrnfDLfAOZSI/o/Aj+J5X3gX/fyPOUUcp3UpmYLQEQYKA oU5KBtE1PaPZSV0pdCEVxU8Q6qAPFBqNIiqdGU3XmgJa57FdTDWw3aDKhpU8fWb9JZEl Ggag== X-Gm-Message-State: APt69E1lj3mwzGxsHNwmn/3qnNkeksE+Oh1wEqwYxAQYTIZ/xmq/2fC2 WdkwSXvpoilZz6TTUTQ0MFc= X-Google-Smtp-Source: ADUXVKLMgPInIVNYW53Gs9f2C7giE/j8jZCx+tn/62zLeRt67MWib6wFOGtupTXM96t89TowBpEyvw== X-Received: by 2002:a50:d690:: with SMTP id r16-v6mr2230794edi.259.1529922622861; Mon, 25 Jun 2018 03:30:22 -0700 (PDT) Received: from pesky ([37.153.233.130]) by smtp.gmail.com with ESMTPSA id d11-v6sm6397207edh.61.2018.06.25.03.30.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jun 2018 03:30:21 -0700 (PDT) Sender: Mark Johnston Date: Mon, 25 Jun 2018 06:30:20 -0400 From: Mark Johnston To: Konstantin Belousov Cc: Steven Hartland , Alan Cox , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r335171 - head/sys/vm Message-ID: <20180625103020.GF1232@pesky> References: <201806141941.w5EJf2qa069373@repo.freebsd.org> <603230da-cfe2-e3e2-bd9a-f5230b30e371@multiplay.co.uk> <20180615110303.GN2493@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180615110303.GN2493@kib.kiev.ua> User-Agent: Mutt/1.10.0 (2018-05-17) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 10:30:25 -0000 On Fri, Jun 15, 2018 at 02:03:03PM +0300, Konstantin Belousov wrote: > On Fri, Jun 15, 2018 at 11:03:06AM +0100, Steven Hartland wrote: > > On 15/06/2018 00:07, Alan Cox wrote: > > > > > >> On Jun 14, 2018, at 5:54 PM, Steven Hartland > > >> > >> > wrote: > > >> > > >> Out of interest, how would this exhibit itself? > > >> > > > > > > A panic in vm_page_insert_after(). > > > > > So just to confirm this couldn't cause random memory corruption of the > > parent process? > > No, or to put it more sincere, I highly doubt it. > > Also, I do not think that this Go issue will be solved serendipitously > by some FreeBSD bug fix. So far it is indicative that either the > situation is too unique for the Go runtime so it is not exposed by other > programs (which is quite doubtful), or this is a bug in Go runtime. > > The only way forward is to understand what exactly is broken for the > situation. This requires at least deep knowledge the Go garbage collector > internal working, which itself supposes understanding of the Go runtime > and Go environment. I do not mean explanation of the assert, but the > root cause that eventually triggers the assert. They are somewhat > disjoint in time, I believe. Is this problem summarized anywhere? In particular, is there a reasonably minimal test case that reproduces the problem? From owner-svn-src-all@freebsd.org Mon Jun 25 10:37:22 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 467C9100631D; Mon, 25 Jun 2018 10:37: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EFD10763C4; Mon, 25 Jun 2018 10:37:21 +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 CC78F2C053; Mon, 25 Jun 2018 10:37:21 +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 w5PAbLfQ097438; Mon, 25 Jun 2018 10:37:21 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5PAbLOM097436; Mon, 25 Jun 2018 10:37:21 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201806251037.w5PAbLOM097436@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Mon, 25 Jun 2018 10:37:21 +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: r335630 - stable/11/contrib/elftoolchain/libdwarf X-SVN-Group: stable-11 X-SVN-Commit-Author: markj X-SVN-Commit-Paths: stable/11/contrib/elftoolchain/libdwarf X-SVN-Commit-Revision: 335630 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 10:37:22 -0000 Author: markj Date: Mon Jun 25 10:37:21 2018 New Revision: 335630 URL: https://svnweb.freebsd.org/changeset/base/335630 Log: MFC r334881: Add DW_LANG_* definitions from DWARF 4 and 5. Modified: stable/11/contrib/elftoolchain/libdwarf/dwarf.h stable/11/contrib/elftoolchain/libdwarf/dwarf_dump.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/elftoolchain/libdwarf/dwarf.h ============================================================================== --- stable/11/contrib/elftoolchain/libdwarf/dwarf.h Mon Jun 25 09:39:16 2018 (r335629) +++ stable/11/contrib/elftoolchain/libdwarf/dwarf.h Mon Jun 25 10:37:21 2018 (r335630) @@ -523,6 +523,24 @@ #define DW_LANG_ObjC_plus_plus 0x0011 #define DW_LANG_UPC 0x0012 #define DW_LANG_D 0x0013 +#define DW_LANG_Python 0x0014 +#define DW_LANG_OpenCL 0x0015 +#define DW_LANG_Go 0x0016 +#define DW_LANG_Modula3 0x0017 +#define DW_LANG_Haskell 0x0018 +#define DW_LANG_C_plus_plus_03 0x0019 +#define DW_LANG_C_plus_plus_11 0x001a +#define DW_LANG_OCaml 0x001b +#define DW_LANG_Rust 0x001c +#define DW_LANG_C11 0x001d +#define DW_LANG_Swift 0x001e +#define DW_LANG_Julia 0x001f +#define DW_LANG_Dylan 0x0020 +#define DW_LANG_C_plus_plus_14 0x0021 +#define DW_LANG_Fortran03 0x0022 +#define DW_LANG_Fortran08 0x0023 +#define DW_LANG_RenderScript 0x0024 +#define DW_LANG_BLISS 0x0025 #define DW_LANG_lo_user 0x8000 #define DW_LANG_Mips_Assembler 0x8001 #define DW_LANG_hi_user 0xffff Modified: stable/11/contrib/elftoolchain/libdwarf/dwarf_dump.c ============================================================================== --- stable/11/contrib/elftoolchain/libdwarf/dwarf_dump.c Mon Jun 25 09:39:16 2018 (r335629) +++ stable/11/contrib/elftoolchain/libdwarf/dwarf_dump.c Mon Jun 25 10:37:21 2018 (r335630) @@ -788,6 +788,42 @@ dwarf_get_LANG_name(unsigned lang, const char **s) *s = "DW_LANG_UPC"; break; case DW_LANG_D: *s = "DW_LANG_D"; break; + case DW_LANG_Python: + *s = "DW_LANG_Python"; break; + case DW_LANG_OpenCL: + *s = "DW_LANG_OpenCL"; break; + case DW_LANG_Go: + *s = "DW_LANG_Go"; break; + case DW_LANG_Modula3: + *s = "DW_LANG_Modula3"; break; + case DW_LANG_Haskell: + *s = "DW_LANG_Haskell"; break; + case DW_LANG_C_plus_plus_03: + *s = "DW_LANG_C_plus_plus_03"; break; + case DW_LANG_C_plus_plus_11: + *s = "DW_LANG_C_plus_plus_11"; break; + case DW_LANG_OCaml: + *s = "DW_LANG_OCaml"; break; + case DW_LANG_Rust: + *s = "DW_LANG_Rust"; break; + case DW_LANG_C11: + *s = "DW_LANG_C11"; break; + case DW_LANG_Swift: + *s = "DW_LANG_Swift"; break; + case DW_LANG_Julia: + *s = "DW_LANG_Julia"; break; + case DW_LANG_Dylan: + *s = "DW_LANG_Dylan"; break; + case DW_LANG_C_plus_plus_14: + *s = "DW_LANG_C_plus_plus_14"; break; + case DW_LANG_Fortran03: + *s = "DW_LANG_Fortran03"; break; + case DW_LANG_Fortran08: + *s = "DW_LANG_Fortran08"; break; + case DW_LANG_RenderScript: + *s = "DW_LANG_RenderScript"; break; + case DW_LANG_BLISS: + *s = "DW_LANG_BLISS"; break; case DW_LANG_lo_user: *s = "DW_LANG_lo_user"; break; case DW_LANG_Mips_Assembler: From owner-svn-src-all@freebsd.org Mon Jun 25 10:52:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FD111006C01; Mon, 25 Jun 2018 10:52:42 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2357476BCC; Mon, 25 Jun 2018 10:52:42 +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 F32E02C36E; Mon, 25 Jun 2018 10:52:41 +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 w5PAqfwC007301; Mon, 25 Jun 2018 10:52:41 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5PAqf5r007300; Mon, 25 Jun 2018 10:52:41 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201806251052.w5PAqf5r007300@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 25 Jun 2018 10:52:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335631 - head/sys/dev/vt/hw/vga X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/dev/vt/hw/vga X-SVN-Commit-Revision: 335631 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 10:52:42 -0000 Author: kib Date: Mon Jun 25 10:52:41 2018 New Revision: 335631 URL: https://svnweb.freebsd.org/changeset/base/335631 Log: Always initialize the ignore local variable. Reviewed by: royger Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D16004 Modified: head/sys/dev/vt/hw/vga/vt_vga.c Modified: head/sys/dev/vt/hw/vga/vt_vga.c ============================================================================== --- head/sys/dev/vt/hw/vga/vt_vga.c Mon Jun 25 10:37:21 2018 (r335630) +++ head/sys/dev/vt/hw/vga/vt_vga.c Mon Jun 25 10:52:41 2018 (r335631) @@ -1219,6 +1219,7 @@ vga_acpi_disabled(void) uint16_t flags; int ignore; + ignore = 0; TUNABLE_INT_FETCH("hw.vga.acpi_ignore_no_vga", &ignore); if (ignore) From owner-svn-src-all@freebsd.org Mon Jun 25 11:01:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C98661006FAC; Mon, 25 Jun 2018 11:01:13 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 76FFA76E94; Mon, 25 Jun 2018 11:01:13 +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 582F82C3A1; Mon, 25 Jun 2018 11:01:13 +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 w5PB1D0n008678; Mon, 25 Jun 2018 11:01:13 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5PB1CH0008674; Mon, 25 Jun 2018 11:01:12 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201806251101.w5PB1CH0008674@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 25 Jun 2018 11:01:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335632 - in head/sys: dev/vt/hw/vga x86/include x86/isa x86/x86 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: dev/vt/hw/vga x86/include x86/isa x86/x86 X-SVN-Commit-Revision: 335632 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 11:01:14 -0000 Author: kib Date: Mon Jun 25 11:01:12 2018 New Revision: 335632 URL: https://svnweb.freebsd.org/changeset/base/335632 Log: Provide a helper function acpi_get_fadt_bootflags() to fetch the FADT x86 boot flags. Reviewed by: royger Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D16004 MFC after: 1 week Modified: head/sys/dev/vt/hw/vga/vt_vga.c head/sys/x86/include/x86_var.h head/sys/x86/isa/atrtc.c head/sys/x86/x86/cpu_machdep.c Modified: head/sys/dev/vt/hw/vga/vt_vga.c ============================================================================== --- head/sys/dev/vt/hw/vga/vt_vga.c Mon Jun 25 10:52:41 2018 (r335631) +++ head/sys/dev/vt/hw/vga/vt_vga.c Mon Jun 25 11:01:12 2018 (r335632) @@ -48,9 +48,8 @@ __FBSDID("$FreeBSD$"); #include #include - -#if ((defined(__amd64__) || defined(__i386__)) && defined(DEV_ACPI)) -#include +#if defined(__amd64__) || defined(__i386__) +#include #endif struct vga_softc { @@ -1213,36 +1212,18 @@ vga_initialize(struct vt_device *vd, int textmode) static bool vga_acpi_disabled(void) { -#if ((defined(__amd64__) || defined(__i386__)) && defined(DEV_ACPI)) - ACPI_TABLE_FADT *fadt; - vm_paddr_t physaddr; +#if (defined(__amd64__) || defined(__i386__) uint16_t flags; int ignore; ignore = 0; TUNABLE_INT_FETCH("hw.vga.acpi_ignore_no_vga", &ignore); - - if (ignore) - return (false); - - physaddr = acpi_find_table(ACPI_SIG_FADT); - if (physaddr == 0) - return (false); - - fadt = acpi_map_table(physaddr, ACPI_SIG_FADT); - if (fadt == NULL) { - printf("vt_vga: unable to map FADT ACPI table\n"); - return (false); - } - - flags = fadt->BootFlags; - acpi_unmap_table(fadt); - - if (flags & ACPI_FADT_NO_VGA) - return (true); -#endif - + if (ignore || !acpi_get_fadt_bootflags(&flags)) + return (false); + return ((flags & ACPI_FADT_NO_VGA) != 0); +#else return (false); +#endif } static int Modified: head/sys/x86/include/x86_var.h ============================================================================== --- head/sys/x86/include/x86_var.h Mon Jun 25 10:52:41 2018 (r335631) +++ head/sys/x86/include/x86_var.h Mon Jun 25 11:01:12 2018 (r335632) @@ -116,6 +116,7 @@ cpu_getmaxphyaddr(void) #endif } +bool acpi_get_fadt_bootflags(uint16_t *flagsp); void *alloc_fpusave(int flags); void busdma_swi(void); bool cpu_mwait_usable(void); Modified: head/sys/x86/isa/atrtc.c ============================================================================== --- head/sys/x86/isa/atrtc.c Mon Jun 25 10:52:41 2018 (r335631) +++ head/sys/x86/isa/atrtc.c Mon Jun 25 11:01:12 2018 (r335632) @@ -32,7 +32,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_acpi.h" #include "opt_isa.h" #include @@ -55,10 +54,8 @@ __FBSDID("$FreeBSD$"); #endif #include #include "clock_if.h" - -#ifdef DEV_ACPI #include -#endif +#include /* * atrtc_lock protects low-level access to individual hardware registers. @@ -261,29 +258,12 @@ static struct isa_pnp_id atrtc_ids[] = { static bool atrtc_acpi_disabled(void) { -#ifdef DEV_ACPI - ACPI_TABLE_FADT *fadt; - vm_paddr_t physaddr; uint16_t flags; - physaddr = acpi_find_table(ACPI_SIG_FADT); - if (physaddr == 0) + if (!acpi_get_fadt_bootflags(&flags)) return (false); - - fadt = acpi_map_table(physaddr, ACPI_SIG_FADT); - if (fadt == NULL) { - printf("at_rtc: unable to map FADT ACPI table\n"); - return (false); - } - - flags = fadt->BootFlags; - acpi_unmap_table(fadt); - - if (flags & ACPI_FADT_NO_CMOS_RTC) + return ((flags & ACPI_FADT_NO_CMOS_RTC) != 0); return (true); -#endif - - return (false); } static int Modified: head/sys/x86/x86/cpu_machdep.c ============================================================================== --- head/sys/x86/x86/cpu_machdep.c Mon Jun 25 10:52:41 2018 (r335631) +++ head/sys/x86/x86/cpu_machdep.c Mon Jun 25 11:01:12 2018 (r335632) @@ -41,6 +41,7 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_acpi.h" #include "opt_atpic.h" #include "opt_cpu.h" #include "opt_ddb.h" @@ -98,6 +99,8 @@ __FBSDID("$FreeBSD$"); #include +#include + #define STATE_RUNNING 0x0 #define STATE_MWAIT 0x1 #define STATE_SLEEPING 0x2 @@ -930,3 +933,23 @@ restore_wp(bool old_wp) load_cr0(rcr0() | CR0_WP); } +bool +acpi_get_fadt_bootflags(uint16_t *flagsp) +{ +#ifdef DEV_ACPI + ACPI_TABLE_FADT *fadt; + vm_paddr_t physaddr; + + physaddr = acpi_find_table(ACPI_SIG_FADT); + if (physaddr == 0) + return (false); + fadt = acpi_map_table(physaddr, ACPI_SIG_FADT); + if (fadt == NULL) + return (false); + *flagsp = fadt->BootFlags; + acpi_unmap_table(fadt); + return (true); +#else + return (false); +#endif +} From owner-svn-src-all@freebsd.org Mon Jun 25 11:12:22 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CDB0100764D; Mon, 25 Jun 2018 11:12:22 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E2DEA77562; Mon, 25 Jun 2018 11:12: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 C3F452C6A9; Mon, 25 Jun 2018 11:12: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 w5PBCLpV016863; Mon, 25 Jun 2018 11:12:21 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5PBCL1C016862; Mon, 25 Jun 2018 11:12:21 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201806251112.w5PBCL1C016862@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 25 Jun 2018 11:12:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335633 - head/sys/dev/vt/hw/vga X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/dev/vt/hw/vga X-SVN-Commit-Revision: 335633 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 11:12:22 -0000 Author: kib Date: Mon Jun 25 11:12:21 2018 New Revision: 335633 URL: https://svnweb.freebsd.org/changeset/base/335633 Log: Fix compilation. Pointy hat to: me Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/dev/vt/hw/vga/vt_vga.c Modified: head/sys/dev/vt/hw/vga/vt_vga.c ============================================================================== --- head/sys/dev/vt/hw/vga/vt_vga.c Mon Jun 25 11:01:12 2018 (r335632) +++ head/sys/dev/vt/hw/vga/vt_vga.c Mon Jun 25 11:12:21 2018 (r335633) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #if defined(__amd64__) || defined(__i386__) +#include #include #endif @@ -1212,7 +1213,7 @@ vga_initialize(struct vt_device *vd, int textmode) static bool vga_acpi_disabled(void) { -#if (defined(__amd64__) || defined(__i386__) +#if defined(__amd64__) || defined(__i386__) uint16_t flags; int ignore; From owner-svn-src-all@freebsd.org Mon Jun 25 11:22:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC7761007EC0; Mon, 25 Jun 2018 11:22:40 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lf0-f43.google.com (mail-lf0-f43.google.com [209.85.215.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 62D5377B26; Mon, 25 Jun 2018 11:22:40 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lf0-f43.google.com with SMTP id i15-v6so14144273lfc.2; Mon, 25 Jun 2018 04:22: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:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=UwSa+rf4BRIU1chdlFu6Q7Cp6dcjCAztgHzW5IpUf4E=; b=hc6xVn1dOq4+XM6yEA+pmH0c3sJnCzGY01cdKMtER1YUyFSnH4KjyidwM3gXLWO6lX i5/0hgDaidndoz6BvnwHdVFDzi0Zn36vZyTC4Phu5X3niheJ87fFj2p5kNnUO8xujg7/ p1cZfWmkiyZ+4/0Zj10tosGM6prcuvXXXiKnjDJKUyMpHi+m7m40A0CMBKNDc0sabyEE W0vmePkv3PdNm4nkATJHFY4CMA195Rj1L193z5cPNtL3GNwm3DYsW4cB9qGsnUpt7iKG IESAbKmUnh7TfI91FKSBfOAjkwldm2NdV6iKXHhe7sOW2vd+dMe4HdBw5RR/H6MCCDm+ kuOw== X-Gm-Message-State: APt69E1pwfzGQKzS7dxxTzlnndPAhIZTO1550EJia7SKpZoAS/6v3Wur 8xxzy39zI723vpzLSBlJ8rFI3mty X-Google-Smtp-Source: ADUXVKLf7ASvp55aIMrLXsMlPIOPw6/dxxdMrXnQmvS3xzhNEpVAT+l15cXNNDr0JE7/DEd/D0qEBw== X-Received: by 2002:a19:be52:: with SMTP id o79-v6mr5606966lff.108.1529925753120; Mon, 25 Jun 2018 04:22:33 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id j18-v6sm2360499ljc.11.2018.06.25.04.22.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jun 2018 04:22:32 -0700 (PDT) Subject: Re: svn commit: r335632 - in head/sys: dev/vt/hw/vga x86/include x86/isa x86/x86 To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201806251101.w5PB1CH0008674@repo.freebsd.org> From: Andriy Gapon Openpgp: preference=signencrypt Autocrypt: addr=avg@FreeBSD.org; prefer-encrypt=mutual; keydata= xsFNBFm4LIgBEADNB/3lT7f15UKeQ52xCFQx/GqHkSxEdVyLFZTmY3KyNPQGBtyvVyBfprJ7 mAeXZWfhat6cKNRAGZcL5EmewdQuUfQfBdYmKjbw3a9GFDsDNuhDA2QwFt8BmkiVMRYyvI7l N0eVzszWCUgdc3qqM6qqcgBaqsVmJluwpvwp4ZBXmch5BgDDDb1MPO8AZ2QZfIQmplkj8Y6Z AiNMknkmgaekIINSJX8IzRzKD5WwMsin70psE8dpL/iBsA2cpJGzWMObVTtCxeDKlBCNqM1i gTXta1ukdUT7JgLEFZk9ceYQQMJJtUwzWu1UHfZn0Fs29HTqawfWPSZVbulbrnu5q55R4PlQ /xURkWQUTyDpqUvb4JK371zhepXiXDwrrpnyyZABm3SFLkk2bHlheeKU6Yql4pcmSVym1AS4 dV8y0oHAfdlSCF6tpOPf2+K9nW1CFA8b/tw4oJBTtfZ1kxXOMdyZU5fiG7xb1qDgpQKgHUX8 7Rd2T1UVLVeuhYlXNw2F+a2ucY+cMoqz3LtpksUiBppJhw099gEXehcN2JbUZ2TueJdt1FdS ztnZmsHUXLxrRBtGwqnFL7GSd6snpGIKuuL305iaOGODbb9c7ne1JqBbkw1wh8ci6vvwGlzx rexzimRaBzJxlkjNfMx8WpCvYebGMydNoeEtkWldtjTNVsUAtQARAQABzR5BbmRyaXkgR2Fw b24gPGF2Z0BGcmVlQlNELm9yZz7CwZQEEwEIAD4WIQS+LEO7ngQnXA4Bjr538m7TUc1yjwUC WbgsiAIbIwUJBaOagAULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgAAKCRB38m7TUc1yj+JAEACV l9AK/nOWAt/9cufV2fRj0hdOqB1aCshtSrwHk/exXsDa4/FkmegxXQGY+3GWX3deIyesbVRL rYdtdK0dqJyT1SBqXK1h3/at9rxr9GQA6KWOxTjUFURsU7ok/6SIlm8uLRPNKO+yq0GDjgaO LzN+xykuBA0FlhQAXJnpZLcVfPJdWv7sSHGedL5ln8P8rxR+XnmsA5TUaaPcbhTB+mG+iKFj GghASDSfGqLWFPBlX/fpXikBDZ1gvOr8nyMY9nXhgfXpq3B6QCRYKPy58ChrZ5weeJZ29b7/ QdEO8NFNWHjSD9meiLdWQaqo9Y7uUxN3wySc/YUZxtS0bhAd8zJdNPsJYG8sXgKjeBQMVGuT eCAJFEYJqbwWvIXMfVWop4+O4xB+z2YE3jAbG/9tB/GSnQdVSj3G8MS80iLS58frnt+RSEw/ psahrfh0dh6SFHttE049xYiC+cM8J27Aaf0i9RflyITq57NuJm+AHJoU9SQUkIF0nc6lfA+o JRiyRlHZHKoRQkIg4aiKaZSWjQYRl5Txl0IZUP1dSWMX4s3XTMurC/pnja45dge/4ESOtJ9R 8XuIWg45Oq6MeIWdjKddGhRj3OohsltKgkEU3eLKYtB6qRTQypHHUawCXz88uYt5e3w4V16H lCpSTZV/EVHnNe45FVBlvK7k7HFfDDkryM7BTQRZuCyIARAAlq0slcsVboY/+IUJdcbEiJRW be9HKVz4SUchq0z9MZPX/0dcnvz/gkyYA+OuM78dNS7Mbby5dTvOqfpLJfCuhaNYOhlE0wY+ 1T6Tf1f4c/uA3U/YiadukQ3+6TJuYGAdRZD5EqYFIkreARTVWg87N9g0fT9BEqLw9lJtEGDY EWUE7L++B8o4uu3LQFEYxcrb4K/WKmgtmFcm77s0IKDrfcX4doV92QTIpLiRxcOmCC/OCYuO jB1oaaqXQzZrCutXRK0L5XN1Y1PYjIrEzHMIXmCDlLYnpFkK+itlXwlE2ZQxkfMruCWdQXye syl2fynAe8hvp7Mms9qU2r2K9EcJiR5N1t1C2/kTKNUhcRv7Yd/vwusK7BqJbhlng5ZgRx0m WxdntU/JLEntz3QBsBsWM9Y9wf2V4tLv6/DuDBta781RsCB/UrU2zNuOEkSixlUiHxw1dccI 6CVlaWkkJBxmHX22GdDFrcjvwMNIbbyfQLuBq6IOh8nvu9vuItup7qemDG3Ms6TVwA7BD3j+ 3fGprtyW8Fd/RR2bW2+LWkMrqHffAr6Y6V3h5kd2G9Q8ZWpEJk+LG6Mk3fhZhmCnHhDu6CwN MeUvxXDVO+fqc3JjFm5OxhmfVeJKrbCEUJyM8ESWLoNHLqjywdZga4Q7P12g8DUQ1mRxYg/L HgZY3zfKOqcAEQEAAcLBfAQYAQgAJhYhBL4sQ7ueBCdcDgGOvnfybtNRzXKPBQJZuCyIAhsM BQkFo5qAAAoJEHfybtNRzXKPBVwQAKfFy9P7N3OsLDMB56A4Kf+ZT+d5cIx0Yiaf4n6w7m3i ImHHHk9FIetI4Xe54a2IXh4Bq5UkAGY0667eIs+Z1Ea6I2i27Sdo7DxGwq09Qnm/Y65ADvXs 3aBvokCcm7FsM1wky395m8xUos1681oV5oxgqeRI8/76qy0hD9WR65UW+HQgZRIcIjSel9vR XDaD2HLGPTTGr7u4v00UeTMs6qvPsa2PJagogrKY8RXdFtXvweQFz78NbXhluwix2Tb9ETPk LIpDrtzV73CaE2aqBG/KrboXT2C67BgFtnk7T7Y7iKq4/XvEdDWscz2wws91BOXuMMd4c/c4 OmGW9m3RBLufFrOag1q5yUS9QbFfyqL6dftJP3Zq/xe+mr7sbWbhPVCQFrH3r26mpmy841ym dwQnNcsbIGiBASBSKksOvIDYKa2Wy8htPmWFTEOPRpFXdGQ27awcjjnB42nngyCK5ukZDHi6 w0qK5DNQQCkiweevCIC6wc3p67jl1EMFY5+z+zdTPb3h7LeVnGqW0qBQl99vVFgzLxchKcl0 R/paSFgwqXCZhAKMuUHncJuynDOP7z5LirUeFI8qsBAJi1rXpQoLJTVcW72swZ42IdPiboqx NbTMiNOiE36GqMcTPfKylCbF45JNX4nF9ElM0E+Y8gi4cizJYBRr2FBJgay0b9Cp Message-ID: <197a8c03-b27f-0ebb-7ce6-39a7392d5192@FreeBSD.org> Date: Mon, 25 Jun 2018 14:22:30 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <201806251101.w5PB1CH0008674@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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 11:22:41 -0000 On 25/06/2018 14:01, Konstantin Belousov wrote: > Modified: head/sys/x86/x86/cpu_machdep.c > ============================================================================== > --- head/sys/x86/x86/cpu_machdep.c Mon Jun 25 10:52:41 2018 (r335631) > +++ head/sys/x86/x86/cpu_machdep.c Mon Jun 25 11:01:12 2018 (r335632) Maybe acpi_machdep.c or some other file under x86/acpica would be better... > @@ -41,6 +41,7 @@ > #include > __FBSDID("$FreeBSD$"); > > +#include "opt_acpi.h" > #include "opt_atpic.h" > #include "opt_cpu.h" > #include "opt_ddb.h" > @@ -98,6 +99,8 @@ __FBSDID("$FreeBSD$"); > > #include > > +#include > + > #define STATE_RUNNING 0x0 > #define STATE_MWAIT 0x1 > #define STATE_SLEEPING 0x2 -- Andriy Gapon From owner-svn-src-all@freebsd.org Mon Jun 25 11:24:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DDF2B1007FBB; Mon, 25 Jun 2018 11:24:26 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8BBAD77CC7; Mon, 25 Jun 2018 11:24:26 +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 6CF402C845; Mon, 25 Jun 2018 11:24:26 +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 w5PBOQoR022547; Mon, 25 Jun 2018 11:24:26 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5PBOQg6022546; Mon, 25 Jun 2018 11:24:26 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201806251124.w5PBOQg6022546@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 25 Jun 2018 11:24:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335634 - head/sys/x86/x86 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/x86/x86 X-SVN-Commit-Revision: 335634 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 11:24:27 -0000 Author: kib Date: Mon Jun 25 11:24:26 2018 New Revision: 335634 URL: https://svnweb.freebsd.org/changeset/base/335634 Log: Do not access ISA timer if BIOS reports that there is no legacy devices present. On at least one machine where it would matter since the ISA timer is power gated when booted in the UEFI mode, BIOS still reports that the legacy devices are present. That is, user still have to manually disable TSC calibration on such machines. Hopefully it will be more useful in the future. Discussed with: Ben Widawsky Reviewed by: royger Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D16004 MFC after: 1 week Modified: head/sys/x86/x86/tsc.c Modified: head/sys/x86/x86/tsc.c ============================================================================== --- head/sys/x86/x86/tsc.c Mon Jun 25 11:12:21 2018 (r335633) +++ head/sys/x86/x86/tsc.c Mon Jun 25 11:24:26 2018 (r335634) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "cpufreq_if.h" @@ -81,8 +82,9 @@ SYSCTL_INT(_machdep, OID_AUTO, disable_tsc, CTLFLAG_RD "Disable x86 Time Stamp Counter"); static int tsc_skip_calibration; -SYSCTL_INT(_machdep, OID_AUTO, disable_tsc_calibration, CTLFLAG_RDTUN, - &tsc_skip_calibration, 0, "Disable TSC frequency calibration"); +SYSCTL_INT(_machdep, OID_AUTO, disable_tsc_calibration, CTLFLAG_RDTUN | + CTLFLAG_NOFETCH, &tsc_skip_calibration, 0, + "Disable TSC frequency calibration"); static void tsc_freq_changed(void *arg, const struct cf_level *level, int status); @@ -213,6 +215,7 @@ probe_tsc_freq(void) { u_int regs[4]; uint64_t tsc1, tsc2; + uint16_t bootflags; if (cpu_high >= 6) { do_cpuid(6, regs); @@ -272,6 +275,25 @@ probe_tsc_freq(void) break; } + if (!TUNABLE_INT_FETCH("machdep.disable_tsc_calibration", + &tsc_skip_calibration)) { + /* + * User did not give the order about calibration. + * If he did, we do not try to guess. + * + * Otherwise, if ACPI FADT reports that the platform + * is legacy-free and CPUID provides TSC frequency, + * use it. The calibration could fail anyway since + * ISA timer can be absent or power gated. + */ + if (acpi_get_fadt_bootflags(&bootflags) && + (bootflags & ACPI_FADT_LEGACY_DEVICES) == 0 && + tsc_freq_cpuid()) { + printf("Skipping TSC calibration since no legacy " + "devices reported by FADT and CPUID works\n"); + tsc_skip_calibration = 1; + } + } if (tsc_skip_calibration) { if (tsc_freq_cpuid()) ; From owner-svn-src-all@freebsd.org Mon Jun 25 11:29:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19B361009183; Mon, 25 Jun 2018 11:29:05 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BA99477ED0; Mon, 25 Jun 2018 11:29:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 977102C84A; Mon, 25 Jun 2018 11:29:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5PBT45Y022785; Mon, 25 Jun 2018 11:29:04 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5PBT4q8022784; Mon, 25 Jun 2018 11:29:04 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201806251129.w5PBT4q8022784@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 25 Jun 2018 11:29:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335635 - head/sys/amd64/include X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: head/sys/amd64/include X-SVN-Commit-Revision: 335635 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 11:29:05 -0000 Author: kib Date: Mon Jun 25 11:29:04 2018 New Revision: 335635 URL: https://svnweb.freebsd.org/changeset/base/335635 Log: Do not leave stray qword on top of stack for interrupts and exceptions without error code. Doing so it mis-aligned the stack. Since the only consumer of the SSE instructions with the alignment requirements is AES-NI module, and since the FPU context cannot be accessed in interrupts, the only situation where the alignment matter are the compat32 syscalls, as reported in the PR. PR: 229222 Reported and tested by: dewayne@heuristicsystems.com.au Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/include/asmacros.h Modified: head/sys/amd64/include/asmacros.h ============================================================================== --- head/sys/amd64/include/asmacros.h Mon Jun 25 11:24:26 2018 (r335634) +++ head/sys/amd64/include/asmacros.h Mon Jun 25 11:29:04 2018 (r335635) @@ -187,7 +187,7 @@ movq PCPU(KCR3),%rax movq %rax,%cr3 movq PCPU(RSP0),%rax - subq $PTI_SIZE,%rax + subq $PTI_SIZE - 8 * (1 - \has_err),%rax MOVE_STACKS ((PTI_SIZE / 8) - 1 + \has_err) movq %rax,%rsp popq %rdx From owner-svn-src-all@freebsd.org Mon Jun 25 11:43:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A0801009ABB; Mon, 25 Jun 2018 11:43:19 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 D5C7878DFC; Mon, 25 Jun 2018 11:43:18 +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 ESMTP id w5PBh8O3093614; Mon, 25 Jun 2018 14:43:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w5PBh8O3093614 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w5PBh8jW093613; Mon, 25 Jun 2018 14:43:08 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 25 Jun 2018 14:43:08 +0300 From: Konstantin Belousov To: Andriy Gapon Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r335632 - in head/sys: dev/vt/hw/vga x86/include x86/isa x86/x86 Message-ID: <20180625114308.GD2430@kib.kiev.ua> References: <201806251101.w5PB1CH0008674@repo.freebsd.org> <197a8c03-b27f-0ebb-7ce6-39a7392d5192@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <197a8c03-b27f-0ebb-7ce6-39a7392d5192@FreeBSD.org> User-Agent: Mutt/1.10.0 (2018-05-17) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 11:43:19 -0000 On Mon, Jun 25, 2018 at 02:22:30PM +0300, Andriy Gapon wrote: > On 25/06/2018 14:01, Konstantin Belousov wrote: > > Modified: head/sys/x86/x86/cpu_machdep.c > > ============================================================================== > > --- head/sys/x86/x86/cpu_machdep.c Mon Jun 25 10:52:41 2018 (r335631) > > +++ head/sys/x86/x86/cpu_machdep.c Mon Jun 25 11:01:12 2018 (r335632) > > Maybe acpi_machdep.c or some other file under x86/acpica would be better... I do not want to create a file for single 10-line function. I considered it and decided that this is silly. If you have plans for the other content, then sys/x86/acpi/acpi_machdep.c or similar may be a good idea indeed. From owner-svn-src-all@freebsd.org Mon Jun 25 11:44:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82FDA1009B72; Mon, 25 Jun 2018 11:44:42 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 30B0E78F68; Mon, 25 Jun 2018 11:44:42 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 115C02CB7F; Mon, 25 Jun 2018 11:44:42 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5PBif3v033346; Mon, 25 Jun 2018 11:44:41 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5PBifos033344; Mon, 25 Jun 2018 11:44:41 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201806251144.w5PBifos033344@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 25 Jun 2018 11:44:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335636 - in head: lib/libcasper/libcasper usr.bin/users X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in head: lib/libcasper/libcasper usr.bin/users X-SVN-Commit-Revision: 335636 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 11:44:42 -0000 Author: eadler Date: Mon Jun 25 11:44:41 2018 New Revision: 335636 URL: https://svnweb.freebsd.org/changeset/base/335636 Log: users(1): Use capsicum helpers for users In doing so also fix the libcasper.h header to work in C++. Modified: head/lib/libcasper/libcasper/libcasper.h head/usr.bin/users/users.cc Modified: head/lib/libcasper/libcasper/libcasper.h ============================================================================== --- head/lib/libcasper/libcasper/libcasper.h Mon Jun 25 11:29:04 2018 (r335635) +++ head/lib/libcasper/libcasper/libcasper.h Mon Jun 25 11:44:41 2018 (r335636) @@ -105,7 +105,7 @@ cap_init(void) { cap_channel_t *chan; - chan = malloc(sizeof(*chan)); + chan = (cap_channel_t *)malloc(sizeof(*chan)); if (chan != NULL) { chan->cch_fd = -1; } Modified: head/usr.bin/users/users.cc ============================================================================== --- head/usr.bin/users/users.cc Mon Jun 25 11:29:04 2018 (r335635) +++ head/usr.bin/users/users.cc Mon Jun 25 11:44:41 2018 (r335636) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -56,7 +57,7 @@ main(int argc, char **) setutxent(); - if (cap_enter() < 0 && errno != ENOSYS) + if (caph_enter()) err(1, "Failed to enter capability mode."); while ((ut = getutxent()) != NULL) From owner-svn-src-all@freebsd.org Mon Jun 25 11:44:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C8471009BB0; Mon, 25 Jun 2018 11:44:54 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4AA937907A; Mon, 25 Jun 2018 11:44:54 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2CAA62CB80; Mon, 25 Jun 2018 11:44:54 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5PBirou033396; Mon, 25 Jun 2018 11:44:53 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5PBirl1033395; Mon, 25 Jun 2018 11:44:53 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201806251144.w5PBirl1033395@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 25 Jun 2018 11:44:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335637 - head/usr.bin/rup X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/rup X-SVN-Commit-Revision: 335637 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 11:44:54 -0000 Author: eadler Date: Mon Jun 25 11:44:53 2018 New Revision: 335637 URL: https://svnweb.freebsd.org/changeset/base/335637 Log: rup: compile with WARNS=6 Modified: head/usr.bin/rup/Makefile head/usr.bin/rup/rup.c Modified: head/usr.bin/rup/Makefile ============================================================================== --- head/usr.bin/rup/Makefile Mon Jun 25 11:44:41 2018 (r335636) +++ head/usr.bin/rup/Makefile Mon Jun 25 11:44:53 2018 (r335637) @@ -2,7 +2,8 @@ PROG= rup -WARNS?= 3 LIBADD= rpcsvc + +NO_WCAST_ALIGN= # Size is explicitly handled .include Modified: head/usr.bin/rup/rup.c ============================================================================== --- head/usr.bin/rup/rup.c Mon Jun 25 11:44:41 2018 (r335636) +++ head/usr.bin/rup/rup.c Mon Jun 25 11:44:53 2018 (r335637) @@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$"); #define HOST_WIDTH 15 -struct host_list { +static struct host_list { struct host_list *next; struct in_addr addr; } *hosts; @@ -93,7 +93,7 @@ remember_host(struct in_addr addr) } static bool_t -rstat_reply(caddr_t replyp, struct sockaddr_in *raddrp) +rstat_reply(statstime *host_stat, struct sockaddr_in *raddrp) { struct tm *tmp_time; struct tm host_time; @@ -102,7 +102,6 @@ rstat_reply(caddr_t replyp, struct sockaddr_in *raddrp char hours_buf[16]; struct hostent *hp; char *host; - statstime *host_stat = (statstime *)replyp; time_t tmp_time_t; if (search_host(raddrp->sin_addr)) @@ -207,7 +206,7 @@ onehost(char *host) } addr.sin_addr.s_addr = *(int *)hp->h_addr; - rstat_reply((caddr_t)&host_stat, &addr); + rstat_reply(&host_stat, &addr); clnt_destroy(rstat_clnt); return (0); } @@ -242,7 +241,6 @@ main(int argc, char *argv[]) switch (ch) { default: usage(); - /*NOTREACHED*/ } setlinebuf(stdout); From owner-svn-src-all@freebsd.org Mon Jun 25 11:44:57 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E76F61009BC0; Mon, 25 Jun 2018 11:44:56 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 96A5A79086; Mon, 25 Jun 2018 11:44:56 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 77D0B2CB81; Mon, 25 Jun 2018 11:44:56 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5PBiu7E033442; Mon, 25 Jun 2018 11:44:56 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5PBiu3k033441; Mon, 25 Jun 2018 11:44:56 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201806251144.w5PBiu3k033441@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Mon, 25 Jun 2018 11:44:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335638 - head/usr.bin/rusers X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/rusers X-SVN-Commit-Revision: 335638 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 11:44:57 -0000 Author: eadler Date: Mon Jun 25 11:44:56 2018 New Revision: 335638 URL: https://svnweb.freebsd.org/changeset/base/335638 Log: rusers: modernize a bit Modified: head/usr.bin/rusers/rusers.c Modified: head/usr.bin/rusers/rusers.c ============================================================================== --- head/usr.bin/rusers/rusers.c Mon Jun 25 11:44:53 2018 (r335637) +++ head/usr.bin/rusers/rusers.c Mon Jun 25 11:44:56 2018 (r335638) @@ -94,9 +94,9 @@ remember_host(struct in_addr addr) } static int -rusers_reply(caddr_t replyp, struct sockaddr_in *raddrp) +rusers_reply(void *replyp, struct sockaddr_in *raddrp) { - u_int x; + unsigned int x; int idle; char date[32], idle_time[64], remote[64]; struct hostent *hp; @@ -190,14 +190,14 @@ onehost(char *host) if (rusers_clnt == NULL) errx(1, "%s", clnt_spcreateerror("")); - bzero((char *)&up, sizeof(up)); + memset(&up, 0, sizeof(up)); tv.tv_sec = 15; /* XXX ?? */ tv.tv_usec = 0; if (clnt_call(rusers_clnt, RUSERSPROC_NAMES, (xdrproc_t)xdr_void, NULL, (xdrproc_t)xdr_utmpidlearr, &up, tv) != RPC_SUCCESS) errx(1, "%s", clnt_sperror(rusers_clnt, "")); memcpy(&addr.sin_addr.s_addr, hp->h_addr, sizeof(addr.sin_addr.s_addr)); - rusers_reply((caddr_t)&up, &addr); + rusers_reply(&up, &addr); clnt_destroy(rusers_clnt); } @@ -207,7 +207,7 @@ allhosts(void) utmpidlearr up; enum clnt_stat clnt_stat; - bzero((char *)&up, sizeof(up)); + memset(&up, 0, sizeof(up)); clnt_stat = clnt_broadcast(RUSERSPROG, RUSERSVERS_IDLE, RUSERSPROC_NAMES, (xdrproc_t)xdr_void, NULL, (xdrproc_t)xdr_utmpidlearr, (char *)&up, From owner-svn-src-all@freebsd.org Mon Jun 25 11:46:45 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65E581009D81; Mon, 25 Jun 2018 11:46:45 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 B59BA7938C; Mon, 25 Jun 2018 11:46:44 +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 ESMTP id w5PBkY3A094723; Mon, 25 Jun 2018 14:46:37 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w5PBkY3A094723 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w5PBkXb6094721; Mon, 25 Jun 2018 14:46:33 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 25 Jun 2018 14:46:33 +0300 From: Konstantin Belousov To: Mark Johnston Cc: Steven Hartland , Alan Cox , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r335171 - head/sys/vm Message-ID: <20180625114633.GE2430@kib.kiev.ua> References: <201806141941.w5EJf2qa069373@repo.freebsd.org> <603230da-cfe2-e3e2-bd9a-f5230b30e371@multiplay.co.uk> <20180615110303.GN2493@kib.kiev.ua> <20180625103020.GF1232@pesky> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180625103020.GF1232@pesky> User-Agent: Mutt/1.10.0 (2018-05-17) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 11:46:45 -0000 On Mon, Jun 25, 2018 at 06:30:20AM -0400, Mark Johnston wrote: > On Fri, Jun 15, 2018 at 02:03:03PM +0300, Konstantin Belousov wrote: > > On Fri, Jun 15, 2018 at 11:03:06AM +0100, Steven Hartland wrote: > > > On 15/06/2018 00:07, Alan Cox wrote: > > > > > > > >> On Jun 14, 2018, at 5:54 PM, Steven Hartland > > > >> > > >> > wrote: > > > >> > > > >> Out of interest, how would this exhibit itself? > > > >> > > > > > > > > A panic in vm_page_insert_after(). > > > > > > > So just to confirm this couldn't cause random memory corruption of the > > > parent process? > > > > No, or to put it more sincere, I highly doubt it. > > > > Also, I do not think that this Go issue will be solved serendipitously > > by some FreeBSD bug fix. So far it is indicative that either the > > situation is too unique for the Go runtime so it is not exposed by other > > programs (which is quite doubtful), or this is a bug in Go runtime. > > > > The only way forward is to understand what exactly is broken for the > > situation. This requires at least deep knowledge the Go garbage collector > > internal working, which itself supposes understanding of the Go runtime > > and Go environment. I do not mean explanation of the assert, but the > > root cause that eventually triggers the assert. They are somewhat > > disjoint in time, I believe. > > Is this problem summarized anywhere? In particular, is there a > reasonably minimal test case that reproduces the problem? Go bug report has the reproducer. I do not remember if this is the same snippet that I used. https://github.com/golang/go/issues/15658 When I looked at it, it took tens of minutes to trigger on sandy bridge machine. Note that recent reporters indicate that they need to run the test for a whole day. It might be that there are more then one issues, and some of them are fixed. From owner-svn-src-all@freebsd.org Mon Jun 25 14:12:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9EC6410104B7; Mon, 25 Jun 2018 14:12:34 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F0337DF3A; Mon, 25 Jun 2018 14:12:34 +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 312E52E32E; Mon, 25 Jun 2018 14:12:34 +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 w5PECYV4010792; Mon, 25 Jun 2018 14:12:34 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5PECY3k010791; Mon, 25 Jun 2018 14:12:34 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201806251412.w5PECY3k010791@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 25 Jun 2018 14:12:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335639 - head/sys/arm64/linux X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/arm64/linux X-SVN-Commit-Revision: 335639 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 14:12:35 -0000 Author: emaste Date: Mon Jun 25 14:12:33 2018 New Revision: 335639 URL: https://svnweb.freebsd.org/changeset/base/335639 Log: Initial arm64 linuxulator linux_sysvec This is sufficient to run Linux arm64 'hello world' and other simple binaries. Reviewed by: andrew Sponsored by: Turing Robotic Industries Differential Revision: https://reviews.freebsd.org/D15834 Added: head/sys/arm64/linux/linux_sysvec.c (contents, props changed) Added: head/sys/arm64/linux/linux_sysvec.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/linux/linux_sysvec.c Mon Jun 25 14:12:33 2018 (r335639) @@ -0,0 +1,563 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 1994-1996 Søren Schmidt + * Copyright (c) 2018 Turing Robotic Industries Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +MODULE_VERSION(linux64elf, 1); + +#if defined(DEBUG) +SYSCTL_PROC(_compat_linux, OID_AUTO, debug, CTLTYPE_STRING | CTLFLAG_RW, 0, 0, + linux_sysctl_debug, "A", "64-bit Linux debugging control"); +#endif + +const char *linux_kplatform; +static int linux_szsigcode; +static vm_object_t linux_shared_page_obj; +static char *linux_shared_page_mapping; +extern char _binary_linux_locore_o_start; +extern char _binary_linux_locore_o_end; + +extern struct sysent linux_sysent[LINUX_SYS_MAXSYSCALL]; + +SET_DECLARE(linux_ioctl_handler_set, struct linux_ioctl_handler); + +static register_t *linux_copyout_strings(struct image_params *imgp); +static int linux_elf_fixup(register_t **stack_base, + struct image_params *iparams); +static bool linux_trans_osrel(const Elf_Note *note, int32_t *osrel); +static void linux_vdso_install(const void *param); +static void linux_vdso_deinstall(const void *param); +static void linux_set_syscall_retval(struct thread *td, int error); +static int linux_fetch_syscall_args(struct thread *td); +static void linux_exec_setregs(struct thread *td, struct image_params *imgp, + u_long stack); +static int linux_vsyscall(struct thread *td); + +/* DTrace init */ +LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE); + +/* DTrace probes */ +LIN_SDT_PROBE_DEFINE2(sysvec, linux_translate_traps, todo, "int", "int"); +LIN_SDT_PROBE_DEFINE0(sysvec, linux_exec_setregs, todo); +LIN_SDT_PROBE_DEFINE0(sysvec, linux_elf_fixup, todo); +LIN_SDT_PROBE_DEFINE0(sysvec, linux_rt_sigreturn, todo); +LIN_SDT_PROBE_DEFINE0(sysvec, linux_rt_sendsig, todo); +LIN_SDT_PROBE_DEFINE0(sysvec, linux_vsyscall, todo); +LIN_SDT_PROBE_DEFINE0(sysvec, linux_vdso_install, todo); +LIN_SDT_PROBE_DEFINE0(sysvec, linux_vdso_deinstall, todo); + +/* LINUXTODO: do we have traps to translate? */ +static int +linux_translate_traps(int signal, int trap_code) +{ + + LIN_SDT_PROBE2(sysvec, linux_translate_traps, todo, signal, trap_code); + return (signal); +} + +LINUX_VDSO_SYM_CHAR(linux_platform); + +static int +linux_fetch_syscall_args(struct thread *td) +{ + struct proc *p; + struct syscall_args *sa; + register_t *ap; + + p = td->td_proc; + ap = td->td_frame->tf_x; + sa = &td->td_sa; + + sa->code = td->td_frame->tf_x[8]; + /* LINUXTODO: generic syscall? */ + if (p->p_sysent->sv_mask) + sa->code &= p->p_sysent->sv_mask; + if (sa->code >= p->p_sysent->sv_size) + sa->callp = &p->p_sysent->sv_table[0]; + else + sa->callp = &p->p_sysent->sv_table[sa->code]; + + sa->narg = sa->callp->sy_narg; + if (sa->narg > 8) + panic("ARM64TODO: Could we have more than 8 args?"); + memcpy(sa->args, ap, 8 * sizeof(register_t)); + + td->td_retval[0] = 0; + return (0); +} + +static void +linux_set_syscall_retval(struct thread *td, int error) +{ + struct trapframe *frame; + + frame = td->td_frame; + + switch (error) { + case 0: + frame->tf_x[0] = td->td_retval[0]; + frame->tf_x[1] = td->td_retval[1]; + break; + case ERESTART: + /* LINUXTODO: verify */ + frame->tf_elr -= 4; + break; + case EJUSTRETURN: + break; + default: + frame->tf_x[0] = error; + break; + } +} + +static int +linux_elf_fixup(register_t **stack_base, struct image_params *imgp) +{ + Elf_Auxargs *args; + Elf_Auxinfo *argarray, *pos; + Elf_Addr *auxbase, *base; + struct ps_strings *arginfo; + struct proc *p; + int error, issetugid; + + LIN_SDT_PROBE0(sysvec, linux_elf_fixup, todo); + p = imgp->proc; + arginfo = (struct ps_strings *)p->p_sysent->sv_psstrings; + + KASSERT(curthread->td_proc == imgp->proc, + ("unsafe linux_elf_fixup(), should be curproc")); + base = (Elf64_Addr *)*stack_base; + args = (Elf64_Auxargs *)imgp->auxargs; + /* Auxargs after argc, and NULL-terminated argv and envv lists. */ + auxbase = base + 1 + imgp->args->argc + 1 + imgp->args->envc + 1; + argarray = pos = malloc(LINUX_AT_COUNT * sizeof(*pos), M_TEMP, + M_WAITOK | M_ZERO); + + issetugid = p->p_flag & P_SUGID ? 1 : 0; + AUXARGS_ENTRY(pos, LINUX_AT_SYSINFO_EHDR, + imgp->proc->p_sysent->sv_shared_page_base); +#if 0 /* LINUXTODO: implement arm64 LINUX_AT_HWCAP */ + AUXARGS_ENTRY(pos, LINUX_AT_HWCAP, cpu_feature); +#endif + AUXARGS_ENTRY(pos, LINUX_AT_CLKTCK, stclohz); + AUXARGS_ENTRY(pos, AT_PHDR, args->phdr); + AUXARGS_ENTRY(pos, AT_PHENT, args->phent); + AUXARGS_ENTRY(pos, AT_PHNUM, args->phnum); + AUXARGS_ENTRY(pos, AT_PAGESZ, args->pagesz); + AUXARGS_ENTRY(pos, AT_BASE, args->base); + AUXARGS_ENTRY(pos, AT_FLAGS, args->flags); + AUXARGS_ENTRY(pos, AT_ENTRY, args->entry); + AUXARGS_ENTRY(pos, AT_UID, imgp->proc->p_ucred->cr_ruid); + AUXARGS_ENTRY(pos, AT_EUID, imgp->proc->p_ucred->cr_svuid); + AUXARGS_ENTRY(pos, AT_GID, imgp->proc->p_ucred->cr_rgid); + AUXARGS_ENTRY(pos, AT_EGID, imgp->proc->p_ucred->cr_svgid); + AUXARGS_ENTRY(pos, LINUX_AT_SECURE, issetugid); +#if 0 /* LINUXTODO: implement arm64 LINUX_AT_PLATFORM */ + AUXARGS_ENTRY(pos, LINUX_AT_PLATFORM, PTROUT(linux_platform)); +#endif + AUXARGS_ENTRY(pos, LINUX_AT_RANDOM, imgp->canary); + if (imgp->execpathp != 0) + AUXARGS_ENTRY(pos, LINUX_AT_EXECFN, imgp->execpathp); + if (args->execfd != -1) + AUXARGS_ENTRY(pos, AT_EXECFD, args->execfd); + AUXARGS_ENTRY(pos, AT_NULL, 0); + free(imgp->auxargs, M_TEMP); + imgp->auxargs = NULL; + KASSERT(pos - argarray <= LINUX_AT_COUNT, ("Too many auxargs")); + + error = copyout(argarray, auxbase, sizeof(*argarray) * LINUX_AT_COUNT); + free(argarray, M_TEMP); + if (error != 0) + return (error); + + return (0); +} + +/* + * Copy strings out to the new process address space, constructing new arg + * and env vector tables. Return a pointer to the base so that it can be used + * as the initial stack pointer. + * LINUXTODO: deduplicate against other linuxulator archs + */ +static register_t * +linux_copyout_strings(struct image_params *imgp) +{ + char **vectp; + char *stringp, *destp; + register_t *stack_base; + struct ps_strings *arginfo; + char canary[LINUX_AT_RANDOM_LEN]; + size_t execpath_len; + struct proc *p; + int argc, envc; + + /* Calculate string base and vector table pointers. */ + if (imgp->execpath != NULL && imgp->auxargs != NULL) + execpath_len = strlen(imgp->execpath) + 1; + else + execpath_len = 0; + + p = imgp->proc; + arginfo = (struct ps_strings *)p->p_sysent->sv_psstrings; + destp = (caddr_t)arginfo - SPARE_USRSPACE - + roundup(sizeof(canary), sizeof(char *)) - + roundup(execpath_len, sizeof(char *)) - + roundup(ARG_MAX - imgp->args->stringspace, sizeof(char *)); + + if (execpath_len != 0) { + imgp->execpathp = (uintptr_t)arginfo - execpath_len; + copyout(imgp->execpath, (void *)imgp->execpathp, execpath_len); + } + + /* Prepare the canary for SSP. */ + arc4rand(canary, sizeof(canary), 0); + imgp->canary = (uintptr_t)arginfo - + roundup(execpath_len, sizeof(char *)) - + roundup(sizeof(canary), sizeof(char *)); + copyout(canary, (void *)imgp->canary, sizeof(canary)); + + vectp = (char **)destp; + if (imgp->auxargs) { + /* + * Allocate room on the stack for the ELF auxargs + * array. It has up to LINUX_AT_COUNT entries. + */ + vectp -= howmany(LINUX_AT_COUNT * sizeof(Elf64_Auxinfo), + sizeof(*vectp)); + } + + /* + * Allocate room for argc and the argv[] and env vectors including the + * terminating NULL pointers. + */ + vectp -= 1 + imgp->args->argc + 1 + imgp->args->envc + 1; + vectp = (char **)STACKALIGN(vectp); + + /* vectp also becomes our initial stack base. */ + stack_base = (register_t *)vectp; + + stringp = imgp->args->begin_argv; + argc = imgp->args->argc; + envc = imgp->args->envc; + + /* Copy out strings - arguments and environment. */ + copyout(stringp, destp, ARG_MAX - imgp->args->stringspace); + + /* Fill in "ps_strings" struct for ps, w, etc. */ + suword(&arginfo->ps_argvstr, (long)(intptr_t)vectp); + suword(&arginfo->ps_nargvstr, argc); + + suword(vectp++, argc); + /* Fill in argument portion of vector table. */ + for (; argc > 0; --argc) { + suword(vectp++, (long)(intptr_t)destp); + while (*stringp++ != 0) + destp++; + destp++; + } + + /* A null vector table pointer separates the argp's from the envp's. */ + suword(vectp++, 0); + + suword(&arginfo->ps_envstr, (long)(intptr_t)vectp); + suword(&arginfo->ps_nenvstr, envc); + + /* Fill in environment portion of vector table. */ + for (; envc > 0; --envc) { + suword(vectp++, (long)(intptr_t)destp); + while (*stringp++ != 0) + destp++; + destp++; + } + + /* The end of the vector table is a null pointer. */ + suword(vectp, 0); + return (stack_base); +} + +/* + * Reset registers to default values on exec. + */ +static void +linux_exec_setregs(struct thread *td, struct image_params *imgp, u_long stack) +{ + struct trapframe *regs = td->td_frame; + + /* LINUXTODO: validate */ + LIN_SDT_PROBE0(sysvec, linux_exec_setregs, todo); + + memset(regs, 0, sizeof(*regs)); + /* glibc start.S registers function pointer in x0 with atexit. */ + regs->tf_sp = stack; +#if 0 /* LINUXTODO: See if this is used. */ + regs->tf_lr = imgp->entry_addr; +#else + regs->tf_lr = 0xffffffffffffffff; +#endif + regs->tf_elr = imgp->entry_addr; +} + +int +linux_rt_sigreturn(struct thread *td, struct linux_rt_sigreturn_args *args) +{ + + /* LINUXTODO: implement */ + LIN_SDT_PROBE0(sysvec, linux_rt_sigreturn, todo); + return (EDOOFUS); +} + +static void +linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) +{ + + /* LINUXTODO: implement */ + LIN_SDT_PROBE0(sysvec, linux_rt_sendsig, todo); +} + +static int +linux_vsyscall(struct thread *td) +{ + + /* LINUXTODO: implement */ + LIN_SDT_PROBE0(sysvec, linux_vsyscall, todo); + return (EDOOFUS); +} + +struct sysentvec elf_linux_sysvec = { + .sv_size = LINUX_SYS_MAXSYSCALL, + .sv_table = linux_sysent, + .sv_mask = 0, + .sv_errsize = ELAST + 1, + .sv_errtbl = linux_errtbl, + .sv_transtrap = linux_translate_traps, + .sv_fixup = linux_elf_fixup, + .sv_sendsig = linux_rt_sendsig, + .sv_sigcode = &_binary_linux_locore_o_start, + .sv_szsigcode = &linux_szsigcode, + .sv_name = "Linux ELF64", + .sv_coredump = elf64_coredump, + .sv_imgact_try = linux_exec_imgact_try, + .sv_minsigstksz = LINUX_MINSIGSTKSZ, + .sv_pagesize = PAGE_SIZE, + .sv_minuser = VM_MIN_ADDRESS, + .sv_maxuser = VM_MAXUSER_ADDRESS, + .sv_usrstack = USRSTACK, + .sv_psstrings = PS_STRINGS, /* XXX */ + .sv_stackprot = VM_PROT_ALL, /* XXX */ + .sv_copyout_strings = linux_copyout_strings, + .sv_setregs = linux_exec_setregs, + .sv_fixlimit = NULL, + .sv_maxssiz = NULL, + .sv_flags = SV_ABI_LINUX | SV_LP64 | SV_SHP, + .sv_set_syscall_retval = linux_set_syscall_retval, + .sv_fetch_syscall_args = linux_fetch_syscall_args, + .sv_syscallnames = NULL, + .sv_shared_page_base = SHAREDPAGE, + .sv_shared_page_len = PAGE_SIZE, + .sv_schedtail = linux_schedtail, + .sv_thread_detach = linux_thread_detach, + .sv_trap = linux_vsyscall, +}; + +static void +linux_vdso_install(const void *param) +{ + + linux_szsigcode = (&_binary_linux_locore_o_end - + &_binary_linux_locore_o_start); + + if (linux_szsigcode > elf_linux_sysvec.sv_shared_page_len) + panic("invalid Linux VDSO size\n"); + + __elfN(linux_vdso_fixup)(&elf_linux_sysvec); + + linux_shared_page_obj = __elfN(linux_shared_page_init) + (&linux_shared_page_mapping); + + __elfN(linux_vdso_reloc)(&elf_linux_sysvec); + + memcpy(linux_shared_page_mapping, elf_linux_sysvec.sv_sigcode, + linux_szsigcode); + elf_linux_sysvec.sv_shared_page_obj = linux_shared_page_obj; + + printf("LINUXTODO: %s: fix linux_kplatform\n", __func__); +#if 0 + linux_kplatform = linux_shared_page_mapping + + (linux_platform - (caddr_t)elf_linux_sysvec.sv_shared_page_base); +#else + linux_kplatform = "arm64"; +#endif +} +SYSINIT(elf_linux_vdso_init, SI_SUB_EXEC, SI_ORDER_ANY, + linux_vdso_install, NULL); + +static void +linux_vdso_deinstall(const void *param) +{ + + LIN_SDT_PROBE0(sysvec, linux_vdso_deinstall, todo); + __elfN(linux_shared_page_fini)(linux_shared_page_obj); +} +SYSUNINIT(elf_linux_vdso_uninit, SI_SUB_EXEC, SI_ORDER_FIRST, + linux_vdso_deinstall, NULL); + +static char GNU_ABI_VENDOR[] = "GNU"; +static int GNU_ABI_LINUX = 0; + +/* LINUXTODO: deduplicate */ +static bool +linux_trans_osrel(const Elf_Note *note, int32_t *osrel) +{ + const Elf32_Word *desc; + uintptr_t p; + + p = (uintptr_t)(note + 1); + p += roundup2(note->n_namesz, sizeof(Elf32_Addr)); + + desc = (const Elf32_Word *)p; + if (desc[0] != GNU_ABI_LINUX) + return (false); + + *osrel = LINUX_KERNVER(desc[1], desc[2], desc[3]); + return (true); +} + +static Elf_Brandnote linux64_brandnote = { + .hdr.n_namesz = sizeof(GNU_ABI_VENDOR), + .hdr.n_descsz = 16, + .hdr.n_type = 1, + .vendor = GNU_ABI_VENDOR, + .flags = BN_TRANSLATE_OSREL, + .trans_osrel = linux_trans_osrel +}; + +static Elf64_Brandinfo linux_glibc2brand = { + .brand = ELFOSABI_LINUX, + .machine = EM_AARCH64, + .compat_3_brand = "Linux", + .emul_path = "/compat/linux", + .interp_path = "/lib64/ld-linux-x86-64.so.2", + .sysvec = &elf_linux_sysvec, + .interp_newpath = NULL, + .brand_note = &linux64_brandnote, + .flags = BI_CAN_EXEC_DYN | BI_BRAND_NOTE +}; + +Elf64_Brandinfo *linux_brandlist[] = { + &linux_glibc2brand, + NULL +}; + +static int +linux64_elf_modevent(module_t mod, int type, void *data) +{ + Elf64_Brandinfo **brandinfo; + struct linux_ioctl_handler**lihp; + int error; + + error = 0; + switch(type) { + case MOD_LOAD: + for (brandinfo = &linux_brandlist[0]; *brandinfo != NULL; + ++brandinfo) + if (elf64_insert_brand_entry(*brandinfo) < 0) + error = EINVAL; + if (error == 0) { + SET_FOREACH(lihp, linux_ioctl_handler_set) + linux_ioctl_register_handler(*lihp); + LIST_INIT(&futex_list); + mtx_init(&futex_mtx, "ftllk64", NULL, MTX_DEF); + stclohz = (stathz ? stathz : hz); + if (bootverbose) + printf("Linux arm64 ELF exec handler installed\n"); + } + break; + case MOD_UNLOAD: + for (brandinfo = &linux_brandlist[0]; *brandinfo != NULL; + ++brandinfo) + if (elf64_brand_inuse(*brandinfo)) + error = EBUSY; + if (error == 0) { + for (brandinfo = &linux_brandlist[0]; + *brandinfo != NULL; ++brandinfo) + if (elf64_remove_brand_entry(*brandinfo) < 0) + error = EINVAL; + } + if (error == 0) { + SET_FOREACH(lihp, linux_ioctl_handler_set) + linux_ioctl_unregister_handler(*lihp); + mtx_destroy(&futex_mtx); + if (bootverbose) + printf("Linux ELF exec handler removed\n"); + } else + printf("Could not deinstall ELF interpreter entry\n"); + break; + default: + return (EOPNOTSUPP); + } + return (error); +} + +static moduledata_t linux64_elf_mod = { + "linux64elf", + linux64_elf_modevent, + 0 +}; + +DECLARE_MODULE_TIED(linux64elf, linux64_elf_mod, SI_SUB_EXEC, SI_ORDER_ANY); +MODULE_DEPEND(linux64elf, linux_common, 1, 1, 1); +FEATURE(linux64, "AArch64 Linux 64bit support"); From owner-svn-src-all@freebsd.org Mon Jun 25 14:48:52 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B79D71011EB8; Mon, 25 Jun 2018 14:48:52 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (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 4EF907FBC0; Mon, 25 Jun 2018 14:48:52 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1fXSnL-000Lry-Uc; Mon, 25 Jun 2018 17:48:43 +0300 Date: Mon, 25 Jun 2018 17:48:43 +0300 From: Slawa Olhovchenkov To: Jeff Roberson Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r335579 - head/sys/vm Message-ID: <20180625144843.GB2488@zxy.spb.ru> References: <201806230810.w5N8AAr2037440@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201806230810.w5N8AAr2037440@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 14:48:52 -0000 On Sat, Jun 23, 2018 at 08:10:10AM +0000, Jeff Roberson wrote: > Author: jeff > Date: Sat Jun 23 08:10:09 2018 > New Revision: 335579 > URL: https://svnweb.freebsd.org/changeset/base/335579 > > Log: > Sort uma_zone fields according to 64 byte cache line with adjacent line > prefetch on 64bit architectures. Prior to this, two lines were needed > for the fast path and each line may fetch an unused adjacent neighbor. > - Move fields used by the fast path into a single line. > - Move constants into the adjacent line which is mostly used for > the spare bucket alloc 'medium path'. > - Unpad the mtx which is only used by the fast path and place it in > a line with rarely used data. This aligns the cachelines better and > eliminates 128 bytes of wasted space. > > This gives a 45% improvement on a will-it-scale test on a 24 core machine. Can this commint mergered to stable/11? Or this commit depends on other commits? From owner-svn-src-all@freebsd.org Mon Jun 25 14:54:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36543101229D; Mon, 25 Jun 2018 14:54:43 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D30FE80030; Mon, 25 Jun 2018 14:54:42 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-it0-f52.google.com (mail-it0-f52.google.com [209.85.214.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id 9AD77BE14; Mon, 25 Jun 2018 14:54:42 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-it0-f52.google.com with SMTP id j129-v6so5512672ita.2; Mon, 25 Jun 2018 07:54:42 -0700 (PDT) X-Gm-Message-State: APt69E3mWfsKZaQ+LOv9OU58Y7PHFr7svBUjJFxcRt4vAt3gl32v3tbx SSCWBu6YFqA3mxP50cnCfdYH2D4wF/wnE3EFKMU= X-Google-Smtp-Source: AAOMgpdtDJ3qFyqtadDmc9ugX6WC7PS6TS+Czg3g8rLXSB8/Wmds878VswcfuP/JTcynEY5i5dghqtyKpdCzP+gBbBY= X-Received: by 2002:a24:6c8a:: with SMTP id w132-v6mr1178333itb.4.1529938482181; Mon, 25 Jun 2018 07:54:42 -0700 (PDT) MIME-Version: 1.0 References: <201805132316.w4DNG4oh092482@repo.freebsd.org> <99d1722c-8085-6a70-64df-2fdb2c20b574@FreeBSD.org> <92f8270c-f726-7610-c209-3c35d2ad5b2c@FreeBSD.org> In-Reply-To: <92f8270c-f726-7610-c209-3c35d2ad5b2c@FreeBSD.org> From: Matthew Macy Date: Mon, 25 Jun 2018 07:54:31 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r333590 - head/share/man/man9 To: Andriy Gapon Cc: Ed Schouten , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 14:54:43 -0000 On Mon, Jun 25, 2018 at 01:30 Andriy Gapon wrote: > On 25/06/2018 10:25, Ed Schouten wrote: > > Hi Andriy, Matthew, > > > > 2018-06-24 23:36 GMT+02:00 Andriy Gapon : > >> Perhaps a little application of google can help. > >> [keywords: epoch based reclamation] > > > > Based on the man page, it wasn't clear that this refers to a generally > > accepted construct or something that is specific to FreeBSD. Any > > objections if I were to extend the man page as follows? > > Certainly not from me. > Also, given that epoch(9) is a wrapper around (or based on) the > implementation > provided by Concurrency Kit, maybe we should have some kind of a gateway > manual > page for the latter. That page would provide an introduction to > Concurrency Kit > and links to its resources. Then epoch.9 could reference it. > There are man pages included with CK. Certain ports install them. For reasons that he no longer recalls cognet chose to not install them. You'll need to discuss it with him. -M > > Index: epoch.9 > > =================================================================== > > --- epoch.9 (revision 335613) > > +++ epoch.9 (working copy) > > @@ -39,7 +39,7 @@ > > .Nm epoch_wait , > > .Nm epoch_call , > > .Nm in_epoch , > > -.Nd kernel epoch based reclamation > > +.Nd kernel Epoch Based Reclamation (EBR) > > .Sh SYNOPSIS > > .In sys/param.h > > .In sys/proc.h > > @@ -191,3 +191,10 @@ > > .Xr sleep 9 , > > .Xr sx 9 , > > .Xr timeout 9 > > +.Rs > > +.%A K. Fraser > > +.%T Practical lock-freedom > > +.%D February 2004 > > +.%P 79-81 > > +.%U https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-579.pdf > > +.Re > > > > > -- > Andriy Gapon > From owner-svn-src-all@freebsd.org Mon Jun 25 14:59:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1F7C10126A5 for ; Mon, 25 Jun 2018 14:59:15 +0000 (UTC) (envelope-from pdk@semihalf.com) Received: from mail-it0-x241.google.com (mail-it0-x241.google.com [IPv6:2607:f8b0:4001:c0b::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7A2548034C for ; Mon, 25 Jun 2018 14:59:15 +0000 (UTC) (envelope-from pdk@semihalf.com) Received: by mail-it0-x241.google.com with SMTP id v83-v6so12785504itc.3 for ; Mon, 25 Jun 2018 07:59:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=f5jHd/u/6bx5xS6P3hv4vJL3XLysr367N6nR3GG9N3o=; b=p+j+WUXpkR4bspwzuf8gTvhjnJvrDhRsR2ScOVAMDW9my4nM3AQkW7BTCsV90lyjGG vYHzaKddQGHLsrpgBu7uw6ME0c1mrdfEsv5eWsBbhFaJU3kBgW98UNCc0Qqvu9yrYrZ0 ClSzrDkpIcLBRgoPgnL2PZfw2rmNYJnttkaCZ8Du260YoI8kNoJdAqOvMyNp8cGsZ9r3 /yhkqbFF5b2GqkWYq86XOzazhGp3K4PDoeU+vSHcR28CfcnWtTYshW2zLTRr6LkA484L Jv9ErPArUq8BXKP+lSfjEUvbwsZ97+6y6l433qaJ/L/UFKLD4v3rabWcUnlsbgO5jB7q 0HKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=f5jHd/u/6bx5xS6P3hv4vJL3XLysr367N6nR3GG9N3o=; b=dkJ3STlyweAPd9cr0FuHu9sztnlKbF8UBBqjaDAFOv18nwFVEFDEmy9oXubsB1QYQj dlNQu+UBTSyEbM/6ORjHwR2suvV9mo4UcM/4RfqU5x3+lkZMVf/2iLp+B5V1bMZ+XmNH us7Tk+QLQU6LGjiyFSmxA7ldZI/C3y72wSow+vRXxq+gJxYDs6vkTfAqmDxcMh+WPQ7g cJ/0HG6o2nel/4/uBmUqILNxRQQ7PYWoF/idYY/O+0rmDJB8a8CXEMaqvZCkxKj+O7AN GPnCHv01Nw4QLheOyKAQsb4lTEizS6udYG39l38SVhJ8o2jkWY84rRfHPgvSCryH8EuM 8OxQ== X-Gm-Message-State: APt69E1rDW90ZUiPxmr1vdIfNYy2XRgamqI0NQ6PW3INe7ajB/GPhVzV DUwvuOtByvelC1nDEADS8sIR3sUHjuutdVmE1ld22g== X-Google-Smtp-Source: AAOMgpeWu7/Qy1tmk523vK3Z7GHz4FsySvlf8XegxE9C9KKb1fzDJ4zsQ1FOUgaeMefje18c5ujKz1KKjmCOrcZNPNs= X-Received: by 2002:a24:3c42:: with SMTP id m63-v6mr1198788ita.138.1529938754788; Mon, 25 Jun 2018 07:59:14 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:1545:0:0:0:0:0 with HTTP; Mon, 25 Jun 2018 07:59:14 -0700 (PDT) In-Reply-To: References: <201805291352.w4TDqPur045848@repo.freebsd.org> From: Patryk Duda Date: Mon, 25 Jun 2018 16:59:14 +0200 Message-ID: Subject: Re: svn commit: r334329 - head/sys/arm64/arm64 To: Andrew Turner Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 14:59:16 -0000 Any updates? 2018-06-21 14:41 GMT+02:00 Patryk Duda : > Hi, > > I'm trying to boot kernel on ThunderX2 but I've got following error: > > panic: efi_init: PA out of range, PA: 0xfafd0018 > > This error comes from PHYS_TO_DMAP macro. > I can workaround this issue by disabling EFI Runtime Services in > kernel config but it seems to be > a problem with discontignous DMAP mapping. > > > 2018-05-29 15:52 GMT+02:00 Andrew Turner : >> Author: andrew >> Date: Tue May 29 13:52:25 2018 >> New Revision: 334329 >> URL: https://svnweb.freebsd.org/changeset/base/334329 >> >> Log: >> On ThunderX2 we need to be careful to only map the memory the firmware >> lists in the EFI memory map. As such we need to reduce the mappings to >> restrict them to not be the full 1G block. For now reduce this to a 2M >> block, however this may be further restricted to be 4k page aligned as >> other SoCs may require. >> >> This allows ThunderX2 to boot reliably to userspace without performing >> any speculative memory accesses to invalid physical memory. >> >> This is a recommit of r334035 now that we can access the EFI Runtime data >> through the DMAP region. >> >> Tested by: tuexen >> Sponsored by: DARPA, AFRL >> >> Modified: >> head/sys/arm64/arm64/pmap.c >> >> Modified: head/sys/arm64/arm64/pmap.c >> ============================================================================== >> --- head/sys/arm64/arm64/pmap.c Tue May 29 13:43:16 2018 (r334328) >> +++ head/sys/arm64/arm64/pmap.c Tue May 29 13:52:25 2018 (r334329) >> @@ -590,33 +590,100 @@ pmap_early_vtophys(vm_offset_t l1pt, vm_offset_t va) >> return ((l2[l2_slot] & ~ATTR_MASK) + (va & L2_OFFSET)); >> } >> >> -static void >> -pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t min_pa, vm_paddr_t max_pa) >> +static vm_offset_t >> +pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t min_pa, >> + vm_offset_t freemempos) >> { >> + pt_entry_t *l2; >> vm_offset_t va; >> - vm_paddr_t pa; >> - u_int l1_slot; >> + vm_paddr_t l2_pa, pa; >> + u_int l1_slot, l2_slot, prev_l1_slot; >> int i; >> >> dmap_phys_base = min_pa & ~L1_OFFSET; >> dmap_phys_max = 0; >> dmap_max_addr = 0; >> + l2 = NULL; >> + prev_l1_slot = -1; >> >> +#define DMAP_TABLES ((DMAP_MAX_ADDRESS - DMAP_MIN_ADDRESS) >> L0_SHIFT) >> + memset(pagetable_dmap, 0, PAGE_SIZE * DMAP_TABLES); >> + >> for (i = 0; i < (physmap_idx * 2); i += 2) { >> - pa = physmap[i] & ~L1_OFFSET; >> + pa = physmap[i] & ~L2_OFFSET; >> va = pa - dmap_phys_base + DMAP_MIN_ADDRESS; >> >> - for (; va < DMAP_MAX_ADDRESS && pa < physmap[i + 1]; >> + /* Create L2 mappings at the start of the region */ >> + if ((pa & L1_OFFSET) != 0) { >> + l1_slot = ((va - DMAP_MIN_ADDRESS) >> L1_SHIFT); >> + if (l1_slot != prev_l1_slot) { >> + prev_l1_slot = l1_slot; >> + l2 = (pt_entry_t *)freemempos; >> + l2_pa = pmap_early_vtophys(kern_l1, >> + (vm_offset_t)l2); >> + freemempos += PAGE_SIZE; >> + >> + pmap_load_store(&pagetable_dmap[l1_slot], >> + (l2_pa & ~Ln_TABLE_MASK) | L1_TABLE); >> + >> + memset(l2, 0, PAGE_SIZE); >> + } >> + KASSERT(l2 != NULL, >> + ("pmap_bootstrap_dmap: NULL l2 map")); >> + for (; va < DMAP_MAX_ADDRESS && pa < physmap[i + 1]; >> + pa += L2_SIZE, va += L2_SIZE) { >> + /* >> + * We are on a boundary, stop to >> + * create a level 1 block >> + */ >> + if ((pa & L1_OFFSET) == 0) >> + break; >> + >> + l2_slot = pmap_l2_index(va); >> + KASSERT(l2_slot != 0, ("...")); >> + pmap_load_store(&l2[l2_slot], >> + (pa & ~L2_OFFSET) | ATTR_DEFAULT | ATTR_XN | >> + ATTR_IDX(CACHED_MEMORY) | L2_BLOCK); >> + } >> + KASSERT(va == (pa - dmap_phys_base + DMAP_MIN_ADDRESS), >> + ("...")); >> + } >> + >> + for (; va < DMAP_MAX_ADDRESS && pa < physmap[i + 1] && >> + (physmap[i + 1] - pa) >= L1_SIZE; >> pa += L1_SIZE, va += L1_SIZE) { >> l1_slot = ((va - DMAP_MIN_ADDRESS) >> L1_SHIFT); >> - /* We already have an entry */ >> - if (pagetable_dmap[l1_slot] != 0) >> - continue; >> pmap_load_store(&pagetable_dmap[l1_slot], >> (pa & ~L1_OFFSET) | ATTR_DEFAULT | ATTR_XN | >> ATTR_IDX(CACHED_MEMORY) | L1_BLOCK); >> } >> >> + /* Create L2 mappings at the end of the region */ >> + if (pa < physmap[i + 1]) { >> + l1_slot = ((va - DMAP_MIN_ADDRESS) >> L1_SHIFT); >> + if (l1_slot != prev_l1_slot) { >> + prev_l1_slot = l1_slot; >> + l2 = (pt_entry_t *)freemempos; >> + l2_pa = pmap_early_vtophys(kern_l1, >> + (vm_offset_t)l2); >> + freemempos += PAGE_SIZE; >> + >> + pmap_load_store(&pagetable_dmap[l1_slot], >> + (l2_pa & ~Ln_TABLE_MASK) | L1_TABLE); >> + >> + memset(l2, 0, PAGE_SIZE); >> + } >> + KASSERT(l2 != NULL, >> + ("pmap_bootstrap_dmap: NULL l2 map")); >> + for (; va < DMAP_MAX_ADDRESS && pa < physmap[i + 1]; >> + pa += L2_SIZE, va += L2_SIZE) { >> + l2_slot = pmap_l2_index(va); >> + pmap_load_store(&l2[l2_slot], >> + (pa & ~L2_OFFSET) | ATTR_DEFAULT | ATTR_XN | >> + ATTR_IDX(CACHED_MEMORY) | L2_BLOCK); >> + } >> + } >> + >> if (pa > dmap_phys_max) { >> dmap_phys_max = pa; >> dmap_max_addr = va; >> @@ -624,6 +691,8 @@ pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t mi >> } >> >> cpu_tlb_flushID(); >> + >> + return (freemempos); >> } >> >> static vm_offset_t >> @@ -729,8 +798,11 @@ pmap_bootstrap(vm_offset_t l0pt, vm_offset_t l1pt, vm_ >> max_pa = physmap[i + 1]; >> } >> >> + freemempos = KERNBASE + kernlen; >> + freemempos = roundup2(freemempos, PAGE_SIZE); >> + >> /* Create a direct map region early so we can use it for pa -> va */ >> - pmap_bootstrap_dmap(l1pt, min_pa, max_pa); >> + freemempos = pmap_bootstrap_dmap(l1pt, min_pa, freemempos); >> >> va = KERNBASE; >> start_pa = pa = KERNBASE - kern_delta; >> @@ -762,8 +834,6 @@ pmap_bootstrap(vm_offset_t l0pt, vm_offset_t l1pt, vm_ >> >> va = roundup2(va, L1_SIZE); >> >> - freemempos = KERNBASE + kernlen; >> - freemempos = roundup2(freemempos, PAGE_SIZE); >> /* Create the l2 tables up to VM_MAX_KERNEL_ADDRESS */ >> freemempos = pmap_bootstrap_l2(l1pt, va, freemempos); >> /* And the l3 tables for the early devmap */ >> _______________________________________________ >> svn-src-all@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/svn-src-all >> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-all@freebsd.org Mon Jun 25 15:09:57 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E4CD1012D16; Mon, 25 Jun 2018 15:09:57 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0551480C07; Mon, 25 Jun 2018 15:09:57 +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 D996F2EB32; Mon, 25 Jun 2018 15:09:56 +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 w5PF9uLl037661; Mon, 25 Jun 2018 15:09:56 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5PF9u9N037658; Mon, 25 Jun 2018 15:09:56 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806251509.w5PF9u9N037658@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 25 Jun 2018 15:09: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: r335640 - in stable/11: contrib/libpcap contrib/libpcap/ChmodBPF contrib/libpcap/Win32 contrib/libpcap/Win32/Prj contrib/libpcap/cmake contrib/libpcap/cmake/Modules contrib/libpcap/lbl ... X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11: contrib/libpcap contrib/libpcap/ChmodBPF contrib/libpcap/Win32 contrib/libpcap/Win32/Prj contrib/libpcap/cmake contrib/libpcap/cmake/Modules contrib/libpcap/lbl contrib/libpcap/missing c... X-SVN-Commit-Revision: 335640 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 15:09:58 -0000 Author: hselasky Date: Mon Jun 25 15:09:55 2018 New Revision: 335640 URL: https://svnweb.freebsd.org/changeset/base/335640 Log: MFC r334277, r334376, r334378 and r334418: MFV r333789: libpcap 1.9.0 (pre-release) - Update local copy of dlt.h with new DLT types. Sponsored by: Mellanox Technologies Added: stable/11/contrib/libpcap/CHANGES stable/11/contrib/libpcap/CMakeLists.txt (contents, props changed) stable/11/contrib/libpcap/CONTRIBUTING stable/11/contrib/libpcap/CREDITS stable/11/contrib/libpcap/ChmodBPF/ stable/11/contrib/libpcap/ChmodBPF/ChmodBPF (contents, props changed) stable/11/contrib/libpcap/ChmodBPF/StartupParameters.plist stable/11/contrib/libpcap/INSTALL.txt (contents, props changed) stable/11/contrib/libpcap/LICENSE stable/11/contrib/libpcap/Makefile-devel-adds (contents, props changed) stable/11/contrib/libpcap/Makefile.in (contents, props changed) stable/11/contrib/libpcap/README stable/11/contrib/libpcap/README.Win32 stable/11/contrib/libpcap/README.aix stable/11/contrib/libpcap/README.dag stable/11/contrib/libpcap/README.hpux stable/11/contrib/libpcap/README.linux stable/11/contrib/libpcap/README.macos stable/11/contrib/libpcap/README.septel stable/11/contrib/libpcap/README.sita stable/11/contrib/libpcap/README.tru64 stable/11/contrib/libpcap/TODO stable/11/contrib/libpcap/VERSION stable/11/contrib/libpcap/Win32/ stable/11/contrib/libpcap/Win32/Prj/ stable/11/contrib/libpcap/Win32/Prj/wpcap.sln stable/11/contrib/libpcap/Win32/Prj/wpcap.vcxproj stable/11/contrib/libpcap/Win32/Prj/wpcap.vcxproj.filters stable/11/contrib/libpcap/aclocal.m4 stable/11/contrib/libpcap/arcnet.h (contents, props changed) stable/11/contrib/libpcap/atmuni31.h (contents, props changed) stable/11/contrib/libpcap/bpf_dump.c (contents, props changed) stable/11/contrib/libpcap/bpf_filter.c (contents, props changed) stable/11/contrib/libpcap/bpf_image.c (contents, props changed) stable/11/contrib/libpcap/chmod_bpf (contents, props changed) stable/11/contrib/libpcap/cmake/ stable/11/contrib/libpcap/cmake/Modules/ stable/11/contrib/libpcap/cmake/Modules/FindDAG.cmake stable/11/contrib/libpcap/cmake/Modules/FindFseeko.cmake stable/11/contrib/libpcap/cmake/Modules/FindLFS.cmake stable/11/contrib/libpcap/cmake/Modules/FindPacket.cmake stable/11/contrib/libpcap/cmake/Modules/FindPthreads-w32.cmake stable/11/contrib/libpcap/cmake/Modules/FindSNF.cmake stable/11/contrib/libpcap/cmake/Modules/FindTC.cmake stable/11/contrib/libpcap/cmake/have_siocglifconf.c (contents, props changed) stable/11/contrib/libpcap/cmake_uninstall.cmake.in (contents, props changed) stable/11/contrib/libpcap/cmakeconfig.h.in (contents, props changed) stable/11/contrib/libpcap/config.guess (contents, props changed) stable/11/contrib/libpcap/config.h.in (contents, props changed) stable/11/contrib/libpcap/config.sub (contents, props changed) stable/11/contrib/libpcap/configure (contents, props changed) stable/11/contrib/libpcap/configure.ac stable/11/contrib/libpcap/diag-control.h (contents, props changed) stable/11/contrib/libpcap/dlpisubs.c (contents, props changed) stable/11/contrib/libpcap/dlpisubs.h (contents, props changed) stable/11/contrib/libpcap/etherent.c (contents, props changed) stable/11/contrib/libpcap/ethertype.h (contents, props changed) stable/11/contrib/libpcap/extract.h (contents, props changed) stable/11/contrib/libpcap/fad-getad.c (contents, props changed) stable/11/contrib/libpcap/fad-gifc.c (contents, props changed) stable/11/contrib/libpcap/fad-glifc.c (contents, props changed) stable/11/contrib/libpcap/fmtutils.c (contents, props changed) stable/11/contrib/libpcap/fmtutils.h (contents, props changed) stable/11/contrib/libpcap/ftmacros.h (contents, props changed) stable/11/contrib/libpcap/gencode.c (contents, props changed) stable/11/contrib/libpcap/gencode.h (contents, props changed) stable/11/contrib/libpcap/grammar.y stable/11/contrib/libpcap/ieee80211.h (contents, props changed) stable/11/contrib/libpcap/install-sh (contents, props changed) stable/11/contrib/libpcap/lbl/ stable/11/contrib/libpcap/lbl/os-aix4.h (contents, props changed) stable/11/contrib/libpcap/lbl/os-aix7.h (contents, props changed) stable/11/contrib/libpcap/lbl/os-hpux11.h (contents, props changed) stable/11/contrib/libpcap/lbl/os-osf4.h (contents, props changed) stable/11/contrib/libpcap/lbl/os-osf5.h (contents, props changed) stable/11/contrib/libpcap/lbl/os-solaris2.h (contents, props changed) stable/11/contrib/libpcap/lbl/os-sunos4.h (contents, props changed) stable/11/contrib/libpcap/lbl/os-ultrix4.h (contents, props changed) stable/11/contrib/libpcap/libpcap.pc.in (contents, props changed) stable/11/contrib/libpcap/llc.h (contents, props changed) stable/11/contrib/libpcap/missing/ stable/11/contrib/libpcap/missing/getopt.c (contents, props changed) stable/11/contrib/libpcap/missing/getopt.h (contents, props changed) stable/11/contrib/libpcap/missing/snprintf.c (contents, props changed) stable/11/contrib/libpcap/missing/strtok_r.c (contents, props changed) stable/11/contrib/libpcap/missing/win_snprintf.c (contents, props changed) stable/11/contrib/libpcap/mkdep (contents, props changed) stable/11/contrib/libpcap/msdos/ stable/11/contrib/libpcap/msdos/bin2c.c (contents, props changed) stable/11/contrib/libpcap/msdos/makefile (contents, props changed) stable/11/contrib/libpcap/msdos/makefile.dj (contents, props changed) stable/11/contrib/libpcap/msdos/makefile.wc (contents, props changed) stable/11/contrib/libpcap/msdos/pkt_rx0.asm stable/11/contrib/libpcap/msdos/pkt_rx1.s (contents, props changed) stable/11/contrib/libpcap/msdos/pktdrvr.c (contents, props changed) stable/11/contrib/libpcap/msdos/pktdrvr.h (contents, props changed) stable/11/contrib/libpcap/msdos/readme.dos stable/11/contrib/libpcap/nametoaddr.c (contents, props changed) stable/11/contrib/libpcap/nametoaddr.h (contents, props changed) stable/11/contrib/libpcap/nlpid.h (contents, props changed) stable/11/contrib/libpcap/nomkdep stable/11/contrib/libpcap/optimize.c (contents, props changed) stable/11/contrib/libpcap/optimize.h (contents, props changed) stable/11/contrib/libpcap/org.tcpdump.chmod_bpf.plist stable/11/contrib/libpcap/pcap/ stable/11/contrib/libpcap/pcap-bpf.c (contents, props changed) stable/11/contrib/libpcap/pcap-bpf.h (contents, props changed) stable/11/contrib/libpcap/pcap-bt-linux.c (contents, props changed) stable/11/contrib/libpcap/pcap-bt-linux.h (contents, props changed) stable/11/contrib/libpcap/pcap-bt-monitor-linux.c (contents, props changed) stable/11/contrib/libpcap/pcap-bt-monitor-linux.h (contents, props changed) stable/11/contrib/libpcap/pcap-common.c (contents, props changed) stable/11/contrib/libpcap/pcap-common.h (contents, props changed) stable/11/contrib/libpcap/pcap-config.1 (contents, props changed) stable/11/contrib/libpcap/pcap-config.in (contents, props changed) stable/11/contrib/libpcap/pcap-dag.c (contents, props changed) stable/11/contrib/libpcap/pcap-dag.h (contents, props changed) stable/11/contrib/libpcap/pcap-dbus.c (contents, props changed) stable/11/contrib/libpcap/pcap-dbus.h (contents, props changed) stable/11/contrib/libpcap/pcap-dll.rc stable/11/contrib/libpcap/pcap-dlpi.c (contents, props changed) stable/11/contrib/libpcap/pcap-dos.c (contents, props changed) stable/11/contrib/libpcap/pcap-dos.h (contents, props changed) stable/11/contrib/libpcap/pcap-enet.c (contents, props changed) stable/11/contrib/libpcap/pcap-filter.manmisc.in (contents, props changed) stable/11/contrib/libpcap/pcap-int.h (contents, props changed) stable/11/contrib/libpcap/pcap-libdlpi.c (contents, props changed) stable/11/contrib/libpcap/pcap-linktype.manmisc.in (contents, props changed) stable/11/contrib/libpcap/pcap-linux.c (contents, props changed) stable/11/contrib/libpcap/pcap-namedb.h (contents, props changed) stable/11/contrib/libpcap/pcap-netfilter-linux.c (contents, props changed) stable/11/contrib/libpcap/pcap-netfilter-linux.h (contents, props changed) stable/11/contrib/libpcap/pcap-netmap.c (contents, props changed) stable/11/contrib/libpcap/pcap-netmap.h (contents, props changed) stable/11/contrib/libpcap/pcap-new.c (contents, props changed) stable/11/contrib/libpcap/pcap-nit.c (contents, props changed) stable/11/contrib/libpcap/pcap-npf.c (contents, props changed) stable/11/contrib/libpcap/pcap-null.c (contents, props changed) stable/11/contrib/libpcap/pcap-pf.c (contents, props changed) stable/11/contrib/libpcap/pcap-rdmasniff.c (contents, props changed) stable/11/contrib/libpcap/pcap-rdmasniff.h (contents, props changed) stable/11/contrib/libpcap/pcap-rpcap-int.h (contents, props changed) stable/11/contrib/libpcap/pcap-rpcap.c (contents, props changed) stable/11/contrib/libpcap/pcap-rpcap.h (contents, props changed) stable/11/contrib/libpcap/pcap-savefile.manfile.in (contents, props changed) stable/11/contrib/libpcap/pcap-septel.c (contents, props changed) stable/11/contrib/libpcap/pcap-septel.h (contents, props changed) stable/11/contrib/libpcap/pcap-sita.c (contents, props changed) stable/11/contrib/libpcap/pcap-sita.h (contents, props changed) stable/11/contrib/libpcap/pcap-sita.html (contents, props changed) stable/11/contrib/libpcap/pcap-snf.c (contents, props changed) stable/11/contrib/libpcap/pcap-snf.h (contents, props changed) stable/11/contrib/libpcap/pcap-snit.c (contents, props changed) stable/11/contrib/libpcap/pcap-snoop.c (contents, props changed) stable/11/contrib/libpcap/pcap-tc.c (contents, props changed) stable/11/contrib/libpcap/pcap-tc.h (contents, props changed) stable/11/contrib/libpcap/pcap-tstamp.manmisc.in (contents, props changed) stable/11/contrib/libpcap/pcap-types.h (contents, props changed) stable/11/contrib/libpcap/pcap-usb-linux.c (contents, props changed) stable/11/contrib/libpcap/pcap-usb-linux.h (contents, props changed) stable/11/contrib/libpcap/pcap.3pcap.in (contents, props changed) stable/11/contrib/libpcap/pcap.c (contents, props changed) stable/11/contrib/libpcap/pcap.h (contents, props changed) stable/11/contrib/libpcap/pcap/bluetooth.h (contents, props changed) stable/11/contrib/libpcap/pcap/bpf.h (contents, props changed) stable/11/contrib/libpcap/pcap/can_socketcan.h (contents, props changed) stable/11/contrib/libpcap/pcap/compiler-tests.h (contents, props changed) stable/11/contrib/libpcap/pcap/dlt.h (contents, props changed) stable/11/contrib/libpcap/pcap/funcattrs.h (contents, props changed) stable/11/contrib/libpcap/pcap/ipnet.h (contents, props changed) stable/11/contrib/libpcap/pcap/namedb.h (contents, props changed) stable/11/contrib/libpcap/pcap/nflog.h (contents, props changed) stable/11/contrib/libpcap/pcap/pcap-inttypes.h (contents, props changed) stable/11/contrib/libpcap/pcap/pcap.h (contents, props changed) stable/11/contrib/libpcap/pcap/sll.h (contents, props changed) stable/11/contrib/libpcap/pcap/usb.h (contents, props changed) stable/11/contrib/libpcap/pcap/vlan.h (contents, props changed) stable/11/contrib/libpcap/pcap_activate.3pcap stable/11/contrib/libpcap/pcap_breakloop.3pcap stable/11/contrib/libpcap/pcap_can_set_rfmon.3pcap stable/11/contrib/libpcap/pcap_close.3pcap stable/11/contrib/libpcap/pcap_compile.3pcap.in (contents, props changed) stable/11/contrib/libpcap/pcap_create.3pcap stable/11/contrib/libpcap/pcap_datalink.3pcap.in (contents, props changed) stable/11/contrib/libpcap/pcap_datalink_name_to_val.3pcap stable/11/contrib/libpcap/pcap_datalink_val_to_name.3pcap stable/11/contrib/libpcap/pcap_dump.3pcap stable/11/contrib/libpcap/pcap_dump_close.3pcap stable/11/contrib/libpcap/pcap_dump_file.3pcap stable/11/contrib/libpcap/pcap_dump_flush.3pcap stable/11/contrib/libpcap/pcap_dump_ftell.3pcap stable/11/contrib/libpcap/pcap_dump_open.3pcap.in (contents, props changed) stable/11/contrib/libpcap/pcap_file.3pcap stable/11/contrib/libpcap/pcap_fileno.3pcap stable/11/contrib/libpcap/pcap_findalldevs.3pcap stable/11/contrib/libpcap/pcap_freecode.3pcap stable/11/contrib/libpcap/pcap_get_required_select_timeout.3pcap stable/11/contrib/libpcap/pcap_get_selectable_fd.3pcap stable/11/contrib/libpcap/pcap_get_tstamp_precision.3pcap.in (contents, props changed) stable/11/contrib/libpcap/pcap_geterr.3pcap stable/11/contrib/libpcap/pcap_inject.3pcap stable/11/contrib/libpcap/pcap_is_swapped.3pcap stable/11/contrib/libpcap/pcap_lib_version.3pcap stable/11/contrib/libpcap/pcap_list_datalinks.3pcap.in (contents, props changed) stable/11/contrib/libpcap/pcap_list_tstamp_types.3pcap.in (contents, props changed) stable/11/contrib/libpcap/pcap_lookupdev.3pcap stable/11/contrib/libpcap/pcap_lookupnet.3pcap stable/11/contrib/libpcap/pcap_loop.3pcap stable/11/contrib/libpcap/pcap_major_version.3pcap stable/11/contrib/libpcap/pcap_next_ex.3pcap stable/11/contrib/libpcap/pcap_offline_filter.3pcap stable/11/contrib/libpcap/pcap_open_dead.3pcap.in (contents, props changed) stable/11/contrib/libpcap/pcap_open_live.3pcap stable/11/contrib/libpcap/pcap_open_offline.3pcap.in (contents, props changed) stable/11/contrib/libpcap/pcap_set_buffer_size.3pcap stable/11/contrib/libpcap/pcap_set_datalink.3pcap stable/11/contrib/libpcap/pcap_set_immediate_mode.3pcap stable/11/contrib/libpcap/pcap_set_promisc.3pcap stable/11/contrib/libpcap/pcap_set_protocol.3pcap stable/11/contrib/libpcap/pcap_set_rfmon.3pcap stable/11/contrib/libpcap/pcap_set_snaplen.3pcap stable/11/contrib/libpcap/pcap_set_timeout.3pcap stable/11/contrib/libpcap/pcap_set_tstamp_precision.3pcap.in (contents, props changed) stable/11/contrib/libpcap/pcap_set_tstamp_type.3pcap.in (contents, props changed) stable/11/contrib/libpcap/pcap_setdirection.3pcap stable/11/contrib/libpcap/pcap_setfilter.3pcap stable/11/contrib/libpcap/pcap_setnonblock.3pcap stable/11/contrib/libpcap/pcap_snapshot.3pcap stable/11/contrib/libpcap/pcap_stats.3pcap stable/11/contrib/libpcap/pcap_statustostr.3pcap stable/11/contrib/libpcap/pcap_strerror.3pcap stable/11/contrib/libpcap/pcap_tstamp_type_name_to_val.3pcap stable/11/contrib/libpcap/pcap_tstamp_type_val_to_name.3pcap stable/11/contrib/libpcap/portability.h (contents, props changed) stable/11/contrib/libpcap/ppp.h (contents, props changed) stable/11/contrib/libpcap/rpcap-protocol.c (contents, props changed) stable/11/contrib/libpcap/rpcap-protocol.h (contents, props changed) stable/11/contrib/libpcap/savefile.c (contents, props changed) stable/11/contrib/libpcap/scanner.l stable/11/contrib/libpcap/sf-pcap.c (contents, props changed) stable/11/contrib/libpcap/sf-pcap.h (contents, props changed) stable/11/contrib/libpcap/sf-pcapng.c (contents, props changed) stable/11/contrib/libpcap/sf-pcapng.h (contents, props changed) stable/11/contrib/libpcap/sockutils.c (contents, props changed) stable/11/contrib/libpcap/sockutils.h (contents, props changed) stable/11/contrib/libpcap/sunatmpos.h (contents, props changed) stable/11/contrib/libpcap/tests/ stable/11/contrib/libpcap/tests/shb-option-too-long.pcapng (contents, props changed) stable/11/contrib/libpcap/varattrs.h (contents, props changed) Replaced: stable/11/contrib/libpcap/ Deleted: stable/11/lib/libpcap/pcap-netmap.c Modified: stable/11/contrib/ofed/usr.lib/3/Makefile stable/11/lib/Makefile stable/11/lib/libpcap/Makefile stable/11/lib/libpcap/config.h stable/11/share/mk/src.libnames.mk stable/11/sys/net/dlt.h Directory Properties: stable/11/ (props changed) Added: stable/11/contrib/libpcap/CHANGES ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/contrib/libpcap/CHANGES Mon Jun 25 15:09:55 2018 (r335640) @@ -0,0 +1,864 @@ +Wednesday, Jan. 25, 2017 guy@alum.mit.edu + Summary for 1.9.0 libpcap release + Man page improvements + Fix Linux cooked mode userspace filtering (GitHub pull request #429) + Fix compilation if IPv6 support not enabled + Fix some Linux memory-mapped capture buffer size issues + Don't fail if kernel filter can't be set on Linux (GitHub issue + #549) + Improve sorting of interfaces for pcap_findalldevs() + Don't list Linux usbmon devices if usbmon module isn't loaded + Report PCAP_ERROR_PERM_DENIED if no permission to open Linux usbmon + devices + Fix DLT_ type for Solaris IPNET devices + Always return an error message for errors finding DAG or Myricom + devices + If possible, don't require that a device be openable when + enumerating them for pcap_findalldevs() + Don't put incompletely-initialized addresses in the address list for + When finding Myricom devices, update description for regular + interfaces that are Myricom devices and handle SNF_FLAGS=0x2(port + aggregation enabled) + Fix compilation error in DAG support + Fix issues with CMake configuration + Add support for stream buffers larger than 2GB on newer DAG cards + Remove support for building against DAG versions without STREAMS + support (before dag-3.0.0 2007) + +Tuesday, Oct. 25, 2016 mcr@sandelman.ca + Summary for 1.8.1 libpcap release + Add a target in Makefile.in for Exuberant Ctags use: 'extags'. + Rename configure.in to configure.ac: autoconf 2.59 + Clean up the name-to-DLT mapping table. + Add some newer DLT_ values: IPMI_HPM_2,ZWAVE_R1_R2,ZWAVE_R3,WATTSTOPPER_DLM,ISO_14443,RDS + Clarify what the return values are for both success and failure. + Many changes to build on windows + Check for the "break the loop" condition in the inner loop for TPACKET_V3. + Fix handling of packet count in the TPACKET_V3 inner loop: GitHub issue #493. + Filter out duplicate looped back CAN frames. + Fix the handling of loopback filters for IPv6 packets. + Add a link-layer header type for RDS (IEC 62106) groups. + Use different intermediate folders for x86 and x64 builds on Windows. + On Linux, handle all CAN captures with pcap-linux.c, in cooked mode. + Removes the need for the "host-endian" link-layer header type. + Compile with '-Wused-but-marked-unused' in devel mode if supported + Have separate DLTs for big-endian and host-endian SocketCAN headers. + Reflect version.h being renamed to pcap_version.h. + Require that version.h be generated: all build procedures we support generate version.h (autoconf, CMake, MSVC)! + Properly check for sock_recv() errors. + Re-impose some of Winsock's limitations on sock_recv(). + Replace sprintf() with pcap_snprintf(). + Fix signature of pcap_stats_ex_remote(). + Initial cmake support for remote packet capture. + Have rpcap_remoteact_getsock() return a SOCKET and supply an "is active" flag. + Clean up {DAG, Septel, Myricom SNF}-only builds. + Do UTF-16-to-ASCII conversion into the right place. + pcap_create_interface() needs the interface name on Linux. + Clean up hardware time stamp support: the "any" device does not support any time stamp types. + Add support for capturing on FreeBSD usbusN interfaces. + Add a LINKTYPE/DLT_ value for FreeBSD USB. + Go back to using PCAP_API on Windows. + CMake support + Add TurboCap support from WinPcap. + Recognize 802.1ad nested VLAN tag in vlan filter. + +Thursday Sep. 3, 2015 guy@alum.mit.edu + Summary for 1.7.5 libpcap release + Man page cleanups. + Add some allocation failure checks. + Fix a number of Linux/ucLinux configure/build issues. + Fix some memory leaks. + Recognize 802.1ad nested VLAN tag in vlan filter. + Fix building Bluetooth Linux Monitor support with BlueZ 5.1+ + +Saturday Jun. 27, 2015 mcr@sandelman.ca + Summary for 1.7.4 libpcap release + Include fix for GitHub issue #424 -- out of tree builds. + +Friday Apr. 10, 2015 guy@alum.mit.edu + Summary for 1.7.3 libpcap release + Work around a Linux bonding driver bug. + +Thursday Feb. 12, 2015 guy@alum.mit.edu/mcr@sandelman.ca + Summary for 1.7.2 libpcap release + Support for filtering Geneve encapsulated packets. + Generalize encapsulation handling, fixing some bugs. + Don't add null addresses to address lists. + Add pcap_dump_open_append() to open for appending. + Fix the swapping of isochronous descriptors in Linux USB. + Attempt to handle TPACKET_V1 with 32-bit userland and 64-bit kernel. + +Wednesday Nov. 12, 2014 guy@alum.mit.edu/mcr@sandelman.ca + Summary for 1.7.0 libpcap release + Fix handling of zones for BPF on Solaris + new DLT for ZWAVE + clarifications for read timeouts. + Use BPF extensions in compiled filters, fixing VLAN filters + some fixes to compilation without stdint.h + EBUSY can now be returned by SNFv3 code. + Fix the range checks in BPF loads + Various DAG fixes. + Various Linux fixes. + +Monday Aug. 12, 2014 guy@alum.mit.edu + Summary for 1.6.2 libpcap release + Don't crash on filters testing a non-existent link-layer type + field. + Fix sending in non-blocking mode on Linux with memory-mapped + capture. + Fix timestamps when reading pcap-ng files on big-endian + machines. + +Saturday Jul. 19, 2014 mcr@sandelman.ca + Summary for 1.6.1 libpcap release + some fixes for the any device + changes for how --enable-XXX (--enable-sniffing, --enable-can) works + +Wednesday Jul. 2, 2014 mcr@sandelman.ca + Summary for 1.6.0 libpcap release + Don't support D-Bus sniffing on OS X + fixes for byte order issues with NFLOG captures + Handle using cooked mode for DLT_NETLINK in activate_new(). + on platforms where you can not capture on down interfaces, do not list them + but: do list interfaces which are down, if you can capture on them! + +Wednesday December 18, 2013 guy@alum.mit.edu +Summary for 1.5.3 libpcap release + Don't let packets that don't match the current filter get to the + application when TPACKET_V3 is used. (GitHub issue #331) + Fix handling of pcap_loop()/pcap_dispatch() with a packet count + of 0 on some platforms (including Linux with TPACKET_V3). + (GitHub issue #333) + Work around TPACKET_V3 deficiency that causes packets to be lost + when a timeout of 0 is specified. (GitHub issue #335) + Man page formatting fixes. + +Wednesday December 4, 2013 guy@alum.mit.edu +Summary for 1.5.2 libpcap release + Fix libpcap to work when compiled with TPACKET_V3 support and + running on a kernel without TPACKET_V3 support. (GitHub + issue #329) + +Wednesday November 20, 2013 guy@alum.mit.edu +Summary for 1.5.1 libpcap release + Report an error, rather than crashing, if an IPv6 address is + used for link-layer filtering. (Wireshark bug 9376) + +Wednesday October 30, 2013 guy@alum.mit.edu +Summary for 1.5.0 libpcap release + TPACKET_V3 support added for Linux + Point users to the the-tcpdump-group repository on GitHub rather + than the mcr repository + Checks added for malloc()/realloc()/etc. failures + Fixed build on Solaris 11 + Support filtering filtering E1 SS7 traffic on MTP2 layer Annex A + Use "ln -s" to link man pages by default + Add support for getting nanosecond-resolution time stamps when + capturing and reading capture files + Many changes to autoconf to deal better with non-GCC compilers + added many new DLT types + +Saturday April 6, 2013 guy@alum.mit.edu +Summary for 1.4.0 libpcap release + Add netfilter/nfqueue interface. + If we don't have support for IPv6 address resolution, support, + in filter expressions, what IPv6 stuff we can. + Fix pcap-config to include -lpthread if canusb support is + present + Try to fix "pcap_parse not defined" problems when --without-flex + and --without-bison are used when you have Flex and Bison + Fix some issues with the pcap_loop man page. + Fix pcap_getnonblock() and pcap_setnonblock() to fill in the + supplied error message buffer + Fix typo that, it appeared, would cause pcap-libdlpi.c not to + compile (perhaps systems with libdlpi also have BPF and use + that instead) + Catch attempts to call pcap_compile() on a non-activated pcap_t + Fix crash on Linux with CAN-USB support without usbfs + Fix addition of VLAN tags for Linux cooked captures + Check for both EOPNOTSUPP and EINVAL after SIOCETHTOOL ioctl, so + that the driver can report either one if it doesn't support + SIOCETHTOOL + Add DLT_INFINIBAND and DLT_SCTP + Describe "proto XXX" and "protochain XXX" in the pcap-filter man + page + Handle either directories, or symlinks to directories, that + correspond to interfaces in /sys/class/net + Fix handling of VLAN tag insertion to check, on Linux 3.x + kernels, for VLAN tag valid flag + Clean up some man pages + Support libnl3 as well as libnl1 and libnl2 on Linux + Fix handling of Bluetooth devices on 3.x Linux kernels + +Friday March 30, 2012. mcr@sandelman.ca +Summary for 1.3.0 libpcap release + Handle DLT_PFSYNC in {FreeBSD, other *BSD+Mac OS X, other}. + Linux: Don't fail if netfilter isn't enabled in the kernel. + Add new link-layer type for NFC Forum LLCP. + Put the CANUSB stuff into EXTRA_DIST, so it shows up in the release tarball. + Add LINKTYPE_NG40/DLT_NG40. + Add DLT_MPEG_2_TS/LINKTYPE_MPEG_2_TS for MPEG-2 transport streams. + [PATCH] Fix AIX-3.5 crash with read failure during stress + AIX fixes. + Introduce --disable-shared configure option. + Added initial support for canusb devices. + Include the pcap(3PCAP) additions as 1.2.1 changes. + many updates to documentation: pcap.3pcap.in + Improve 'inbound'/'outbound' capture filters under Linux. + Note the cleanup of handling of new DLT_/LINKTYPE_ values. + On Lion, don't build for PPC. + For mac80211 devices we need to clean up monitor mode on exit. + +Friday December 9, 2011. guy@alum.mit.edu. +Summary for 1.2.1 libpcap release + Update README file. + Fix typoes in README.linux file. + Clean up some compiler warnings. + Fix Linux compile problems and tests for ethtool.h. + Treat Debian/kFreeBSD and GNU/Hurd as systems with GNU + toolchains. + Support 802.1 QinQ as a form of VLAN in filters. + Treat "carp" as equivalent to "vrrp" in filters. + Fix code generated for "ip6 protochain". + Add some new link-layer header types. + Support capturing NetFilter log messages on Linux. + Clean up some error messages. + Turn off monitor mode on exit for mac80211 interfaces on Linux. + Fix problems turning monitor mode on for non-mac80211 interfaces + on Linux. + Properly fail if /sys/class/net or /proc/net/dev exist but can't + be opened. + Fail if pcap_activate() is called on an already-activated + pcap_t, and add a test program for that. + Fix filtering in pcap-ng files. + Don't build for PowerPC on Mac OS X Lion. + Simplify handling of new DLT_/LINKTYPE_ values. + Expand pcap(3PCAP) man page. + +Sunday July 24, 2011. mcr@sandelman.ca. +Summary for 1.2 libpcap release + All of the changes listed below for 1.1.1 and 1.1.2. + Changes to error handling for pcap_findalldevs(). + Fix the calculation of the frame size in memory-mapped captures. + Add a link-layer header type for STANAG 5066 D_PDUs. + Add a link-layer type for a variant of 3GPP TS 27.010. + Noted real nature of LINKTYPE_ARCNET. + Add a link-layer type for DVB-CI. + Fix configure-script discovery of VLAN acceleration support. + see http://netoptimizer.blogspot.com/2010/09/tcpdump-vs-vlan-tags.html + Linux, HP-UX, AIX, NetBSD and OpenBSD compilation/conflict fixes. + Protect against including AIX 5.x's having been included. + Add DLT_DBUS, for raw D-Bus messages. + Treat either EPERM or EACCES as "no soup for you". + Changes to permissions on DLPI systems. + Add DLT_IEEE802_15_4_NOFCS for 802.15.4 interfaces. + +Fri. August 6, 2010. guy@alum.mit.edu. +Summary for 1.1.2 libpcap release + Return DLT_ values, not raw LINKTYPE_ values from + pcap_datalink() when reading pcap-ng files + Add support for "wlan ra" and "wlan ta", to check the RA and TA + of WLAN frames that have them + Don't crash if "wlan addr{1,2,3,4}" are used without 802.11 + headers + Do filtering on USB and Bluetooth capturing + On FreeBSD/SPARC64, use -fPIC - it's apparently necessary + Check for valid port numbers (fit in a 16-bit unsigned field) in + "port" filters + Reject attempts to put savefiles into non-blocking mode + Check for "no such device" for the "get the media types" ioctl + in *BSD + Improve error messages from bpf_open(), and let it do the error + handling + Return more specific errors from pcap_can_set_rfmon(); fix + documentation + Update description fetching code for FreeBSD, fix code for + OpenBSD + Ignore /sys/net/dev files if we get ENODEV for them, not just + ENXIO; fixes handling of bonding devices on Linux + Fix check for a constant 0 argument to BPF_DIV + Use the right version of ar when cross-building + Free any filter set on a savefile when the savefile is closed + Include the CFLAGS setting when configure was run in the + compiler flags + Add support for 802.15.4 interfaces on Linux + +Thu. April 1, 2010. guy@alum.mit.edu. +Summary for 1.1.1 libpcap release + Update CHANGES to reflect more of the changes in 1.1.0. + Fix build on RHEL5. + Fix shared library build on AIX. + +Thu. March 11, 2010. ken@netfunctional.ca/guy@alum.mit.edu. +Summary for 1.1.0 libpcap release + Add SocketCAN capture support + Add Myricom SNF API support + Update Endace DAG and ERF support + Add support for shared libraries on Solaris, HP-UX, and AIX + Build, install, and un-install shared libraries by default; + don't build/install shared libraries on platforms we don't support + Fix building from a directory other than the source directory + Fix compiler warnings and builds on some platforms + Update config.guess and config.sub + Support monitor mode on mac80211 devices on Linux + Fix USB memory-mapped capturing on Linux; it requires a new DLT_ + value + On Linux, scan /sys/class/net for devices if we have it; scan + it, or /proc/net/dev if we don't have /sys/class/net, even if + we have getifaddrs(), as it'll find interfaces with no + addresses + Add limited support for reading pcap-ng files + Fix BPF driver-loading error handling on AIX + Support getting the full-length interface description on FreeBSD + In the lexical analyzer, free up any addrinfo structure we got back + from getaddrinfo(). + Add support for BPF and libdlpi in OpenSolaris (and SXCE) + Hyphenate "link-layer" everywhere + Add /sys/kernel/debug/usb/usbmon to the list of usbmon locations + In pcap_read_linux_mmap(), if there are no frames available, call + poll() even if we're in non-blocking mode, so we pick up + errors, and check for the errors in question. + Note that poll() works on BPF devices is Snow Leopard + If an ENXIO or ENETDOWN is received, it may mean the device has + gone away. Deal with it. + For BPF, raise the default capture buffer size to from 32k to 512k + Support ps_ifdrop on Linux + Added a bunch of #ifdef directives to make wpcap.dll (WinPcap) compile + under cygwin. + Changes to Linux mmapped captures. + Fix bug where create_ring would fail for particular snaplen and + buffer size combinations + Update pcap-config so that it handles libpcap requiring + additional libraries + Add workaround for threadsafeness on Windows + Add missing mapping for DLT_ENC <-> LINKTYPE_ENC + DLT: Add DLT_CAN_SOCKETCAN + DLT: Add Solaris ipnet + Don't check for DLT_IPNET if it's not defined + Add link-layer types for Fibre Channel FC-2 + Add link-layer types for Wireless HART + Add link-layer types for AOS + Add link-layer types for DECT + Autoconf fixes (AIX, HP-UX, OSF/1, Tru64 cleanups) + Install headers unconditionally, and include vlan.h/bluetooth.h if + enabled + Autoconf fixes+cleanup + Support enabling/disabling bluetooth (--{en,dis}able-bluetooth) + Support disabling SITA support (--without-sita) + Return -1 on failure to create packet ring (if supported but + creation failed) + Fix handling of 'any' device, so that it can be opened, and no longer + attempt to open it in Monitor mode + Add support for snapshot length for USB Memory-Mapped Interface + Fix configure and build on recent Linux kernels + Fix memory-mapped Linux capture to support pcap_next() and + pcap_next_ex() + Fixes for Linux USB capture + DLT: Add DLT_LINUX_EVDEV + DLT: Add DLT_GSMTAP_UM + DLT: Add DLT_GSMTAP_ABIS + +Mon. October 27, 2008. ken@netfunctional.ca. Summary for 1.0.0 libpcap release + Compile with IPv6 support by default + Compile with large file support on by default + Add pcap-config script, which deals with -I/-L flags for compiling + DLT: Add IPMB + DLT: Add LAPD + DLT: Add AX25 (AX.25 w/KISS header) + DLT: Add JUNIPER_ST + 802.15.4 support + Variable length 802.11 header support + X2E data type support + SITA ACN Interface support - see README.sita + Support for memory-mapped capture on Linux + Support for zerocopy BPF on platforms that support it + Support for setting buffer size when opening devices + Support for setting monitor mode when opening 802.11 devices + Better support for dealing with VLAN tagging/stripping on Linux + Fix dynamic library support on OSX + Return PCAP_ERROR_IFACE_NOT_UP if the interface isn't 'UP', so applications + can print better diagnostic information + Return PCAP_ERROR_PERM_DENIED if we don't have permission to open a device, so + applications can tell the user they need to go play with permissions + On Linux, ignore ENETDOWN so we can continue to capture packets if the + interface goes down and comes back up again. + On Linux, support new tpacket frame headers (2.6.27+) + On Mac OS X, add scripts for changing permissions on /dev/bpf* and launchd plist + On Solaris, support 'passive mode' on systems that support it + Fixes to autoconf and general build environment + Man page reorganization + cleanup + Autogenerate VERSION numbers better + +Mon. September 10, 2007. ken@xelerance.com. Summary for 0.9.8 libpcap release + Change build process to put public libpcap headers into pcap subir + DLT: Add value for IPMI IPMB packets + DLT: Add value for u10 Networks boards + Require for pf definitions - allows reading of pflog formatted + libpcap files on an OS other than where the file was generated + +Wed. April 25, 2007. ken@xelerance.com. Summary for 0.9.6 libpcap release + + Put the public libpcap headers into a pcap subdirectory in both the + source directory and the target include directory, and have include + files at the top-level directory to include those headers, for + backwards compatibility. + Add Bluetooth support + Add USB capturing support on Linux + Add support for the binary USB sniffing interface in Linux + Add support for new FreeBSD BIOCSDIRECTION ioctl + Add additional filter operations for 802.11 frame types + Add support for filtering on MTP2 frame types + Propagate some changes from the main branch, so the x.9 branch has + all the DLT_ and LINKTYPE_ values that the main branch does + Reserved a DLT_ and SAVEFILE_ value for PPI (Per Packet Info) + encapsulated packets + Add LINKTYPE_ for IEEE 802.15.4, with address fields padded as done + by Linux drivers + Add LINKTYPE_ value corresponding to DLT_IEEE802_16_MAC_CPS. + Add DLT for IEEE 802.16 (WiMAX) MAC Common Part Sublayer + Add DLT for Bluetooth HCI UART transport layer + When building a shared library, build with "-fPIC" on Linux to support x86_64 + Link with "$(CC) -shared" rather than "ld -shared" when building a + ".so" shared library + Add support for autoconf 2.60 + Fixes to discard unread packets when changing filters + Changes to handle name changes in the DAG library resulting from + switching to libtool. + Add support for new DAG ERF types. + Add an explicit "-ldag" when building the shared library, so the DAG + library dependency is explicit. + Mac OSX fixes for dealing with "wlt" devices + Fixes in add_or_find_if() & pcap_findalldevs() to optimize generating + device lists + Fixed a bug in pcap_open_live(). The return value of PacketSetHwFilter + was not checked. + +Tue. September 19, 2006. ken@xelerance.com. Summary for 0.9.5 libpcap release + + Support for LAPD frames with vISDN + Support for ERF on channelized T1/E1 cards via DAG API + Fix capitalization that caused issues crossc compiling on Linux + Better failure detection on PacketGetAdapterNames() + Fixes for MPLS packet generation (link layer) + OP_PACKET now matches the beginning of the packet, instead of + beginning+link-layer + Add DLT/LINKTYPE for carrying FRF.16 Multi-link Frame Relay + Fix allocation of buffer for list of link-layer types + Added a new DLT and LINKTYPE value for ARINC 653 Interpartition Communcation Messages + Fixed a typo in a DLT value: it should start with DLT_ and not LINKTYPE_ + Redefined DLT_CAN20B and LINKTYPE_CAN20B as #190 (as this is the right value for CAN). + Added definition for DLT_A429 and LINKTYPE_A429 as #184. + Added a new DLT and LINKTYPE value for CAN v2.0B frames. + Add support for DLT_JUNIPER_VP. + Don't double-count received packets on Linux systems that + support the PACKET_STATISTICS getsockopt() argument on + PF_PACKET sockets. + Add support for DLT_IEEE802_11 and DLT_IEEE802_11_RADIO link + layers in Windows + Add support to build libpcap.lib and wpcap.dll under Cygnus and + MingW32. + +Mon. September 5, 2005. ken@xelerance.com. Summary for 0.9.4 libpcap release + + Support for radiotap on Linux (Mike Kershaw) + Fixes for HP-UX + Support for additional Juniper link-layer types + Fixes for filters on MPLS-encapsulated packets + "vlan" filter fixed + "pppoed" and "pppoes" filters added; the latter modifies later + parts of the filter expression to look at the PPP headers and + headers in the PPP payload + +Tue. July 5, 2005. ken@xelerance.com. Summary for 0.9.3 libpcap release + + Fixes for compiling on nearly every platform, + including improved 64bit support + MSDOS Support + Add support for sending packets + OpenBSD pf format support + IrDA capture (Linux only) + +Tue. March 30, 2004. mcr@sandelman.ottawa.on.ca. Summary for 3.8.3 release + + Fixed minor problem in gencode.c that would appear on 64-bit + platforms. + Version number is now sane. + +Mon. March 29, 2004. mcr@sandelman.ottawa.on.ca. Summary for 3.8.2 release + + updates for autoconf 2.5 + fixes for ppp interfaces for freebsd 4.1 + pcap gencode can generate code for 802.11, IEEE1394, and pflog. + +Wed. November 12, 2003. mcr@sandelman.ottawa.on.ca. Summary for 0.8 release + + added pcap_findalldevs() + Win32 patches from NetGroup, Politecnico di Torino (Italy) + OpenBSD pf, DLT_PFLOG added + Many changes to ATM support. + lookup pcap_lookupnet() + Added DLT_ARCNET_LINUX, DLT_ENC, DLT_IEEE802_11_RADIO, DLT_SUNATM, + DLT_IP_OVER_FC, DLT_FRELAY, others. + Sigh. More AIX wonderfulness. + Document updates. + Changes to API: pcap_next_ex(), pcap_breakloop(), pcap_dump_flush(), + pcap_list_datalinks(), pcap_set_datalink(), + pcap_lib_version(), pcap_datalink_val_to_name(), + pcap_datalink_name_to_val(), new error returns. + +Tuesday, February 25, 2003. fenner@research.att.com. 0.7.2 release + + Support link types that use 802.2 always, never, and sometimes. + Don't decrease the size of the BPF buffer from the default. + Support frame relay. + Handle 32-bit timestamps in DLPI, and pass the right buffer size. + Handle Linux systems with modern kernel but without + SOL_PACKET in the userland headers. + Linux support for ARPHRD_RAWHDLC. + Handle 32-bit timestamps in snoop. + Support eg (Octane/O2xxx/O3xxx Gigabit) devices. + Add new reserved DLT types. + +Monday October 23, 2001. mcr@sandelman.ottawa.on.ca. Summary for 0.7 release + + Added pcap_findalldevs() call to get list of interfaces in a MI way. + + pcap_stats() has been documented as to what its counters mean on + each platform. + +Tuesday January 9, 2001. guy@alum.mit.edu. Summary for 0.6 release + + New Linux libpcap implementation, which, in 2.2 and later + kernels, uses PF_PACKET sockets and supports kernel packet + filtering (if compiled into the kernel), and supports the "any" + device for capturing on all interfaces. Cleans up promiscuous + mode better on pre-2.2 kernels, and has various other fixes + (handles 2.4 ARPHRD_IEEE802_TR, handles ISDN devices better, + doesn't show duplicate packets on loopback interface, etc.). + + Fixed HP-UX libpcap implementation to correctly get the PPA for + an interface, to allow interfaces to be opened by interface name. + + libpcap savefiles have system-independent link-layer type values + in the header, rather than sometimes platform-dependent DLT_ + values, to make it easier to exchange capture files between + different OSes. + + Non-standard capture files produced by some Linux tcpdumps, e.g. + the one from Red Hat Linux 6.2 and later, can now be read. + + Updated autoconf stock files. + + Filter expressions can filter on VLAN IDs and various OSI + protocols, and work on Token Ring (with non-source-routed + packets). + + "pcap_open_dead()" added to allow compiling filter expressions + to pcap code without opening a capture device or capture file. + + Header files fixed to allow use in C++ programs. + + Removed dependancy on native headers for packet layout. + Removed Linux specific headers that were shipped. + + Security fixes: Strcpy replaced with strlcpy, sprintf replaced + with snprintf. + + Fixed bug that could cause subsequent "pcap_compile()"s to fail + erroneously after one compile failed. + + Assorted other bug fixes. + + README.aix and README.linux files added to describe + platform-specific issues. + + "getifaddrs()" rather than SIOCGIFCONF used, if available. + +v0.5 Sat Jun 10 11:09:15 PDT 2000 + +itojun@iijlab.net +- Brought in KAME IPv6/IPsec bpf compiler. +- Fixes for NetBSD. +- Support added for OpenBSD DLT_LOOP and BSD/OS DLT_C_HDLC (Cisco HDLC), + and changes to work around different BSDs having different DLT_ types + with the same numeric value. + +Assar Westerlund +- Building outside the source code tree fixed. +- Changed to write out time stamps with 32-bit seconds and microseconds + fields, regardless of whether those fields are 32 bits or 64 bits in + the OS's native "struct timeval". +- Changed "pcap_lookupdev()" to dynamically grow the buffer into which + the list of interfaces is read as necessary in order to hold the + entire list. + +Greg Troxel +- Added a new "pcap_compile_nopcap()", which lets you compile a filter + expression into a BPF program without having an open live capture or + capture file. + +v0.4 Sat Jul 25 12:40:09 PDT 1998 + +- Fix endian problem with DLT_NULL devices. From FreeBSD via Bill + Fenner (fenner@parc.xerox.com) + +- Fix alignment problem with FDDI under DLPI. This was causing core + dumps under Solaris. + +- Added configure options to disable flex and bison. Resulted from a + bug report by barnett@grymoire.crd.ge.com (Bruce Barnett). Also added + options to disable gcc and to force a particular packet capture type. + +- Added support for Fore ATM interfaces (qaa and fa) under IRIX. Thanks + to John Hawkinson (jhawk@mit.edu) + +- Change Linux PPP and SLIP to use DLT_RAW since the kernel does not + supply any "link layer" data. + +- Change Linux to use SIOCGIFHWADDR ioctl to determine link layer type. + Thanks to Thomas Sailer (sailer@ife.ee.ethz.ch) + +- Change IRIX PPP to use DLT_RAW since the kernel does not supply any + "link layer" data. + +- Modified to support the new BSD/OS 2.1 PPP and SLIP link layer header + formats. + +- Added some new SGI snoop interface types. Thanks to Steve Alexander + (sca@refugee.engr.sgi.com) + +- Fixes for HP-UX 10.20 (which is similar to HP-UX 9). Thanks to + Richard Allen (ra@hp.is) and Steinar Haug (sthaug@nethelp.no) + +- Fddi supports broadcast as reported by Jeff Macdonald + (jeff@iacnet.com). Also correct ieee802 and arcnet. + +- Determine Linux pcap buffer size at run time or else it might not be + big enough for some interface types (e.g. FDDI). Thanks to Jes + Sorensen (Jes.Sorensen@cern.ch) + +- Fix some linux alignment problems. + +- Document promisc argument to pcap_open_live(). Reported by Ian Marsh + (ianm@sics.se) + +- Support Metricom radio packets under Linux. Thanks to Kevin Lai + (laik@gunpowder.stanford.edu) + +- Bind to interface name under Linux to avoid packets from multiple + interfaces on multi-homed hosts. Thanks to Kevin Lai + (laik@gunpowder.stanford.edu) + +- Change L_SET to SEEK_SET for HP-UX. Thanks to Roland Roberts + (rroberts@muller.com) + +- Fixed an uninitialized memory reference found by Kent Vander Velden + (graphix@iastate.edu) + +- Fixed lex pattern for IDs to allow leading digits. As reported by + Theo de Raadt (deraadt@cvs.openbsd.org) + +- Fixed Linux include file problems when using GNU libc. + +- Ifdef ARPHRD_FDDI since not all versions of the Linux kernel have it. + Reported reported by Eric Jacksch (jacksch@tenebris.ca) + +- Fixed bug in pcap_dispatch() that kept it from returning on packet + timeouts. + +- Changed ISLOOPBACK() macro when IFF_LOOPBACK isn't available to check + for "lo" followed by an eos or digit (newer versions of Linux + apparently call the loopback "lo" instead of "lo0"). + +- Fixed Linux networking include files to use ints instead of longs to + avoid problems with 64 bit longs on the alpha. Thanks to Cristian + Gafton (gafton@redhat.com) + +v0.3 Sat Nov 30 20:56:27 PST 1996 + +- Added Linux support. + +- Fixed savefile bugs. + +- Solaris x86 fix from Tim Rylance (t.rylance@elsevier.nl) + +- Add support for bpf kernel port filters. + +- Remove duplicate atalk protocol table entry. Thanks to Christian + Hopps (chopps@water.emich.edu) + +- Fixed pcap_lookupdev() to ignore nonexistent devices. This was + reported to happen under BSD/OS by David Vincenzetti + (vince@cryptonet.it) + +- Avoid solaris compiler warnings. Thanks to Bruce Barnett + (barnett@grymoire.crd.ge.com) + +v0.2.1 Sun Jul 14 03:02:26 PDT 1996 + +- Fixes for HP-UX 10. Thanks in part to to Thomas Wolfram + (wolf@prz.tu-berlin.de) and Rick Jones (raj@hpisrdq.cup.hp.com) + +- Added support for SINIX. Thanks to Andrej Borsenkow + (borsenkow.msk@sni.de) + +- Fixes for AIX (although this system is not yet supported). Thanks to + John Hawkinson (jhawk@mit.edu) + +- Use autoconf's idea of the top level directory in install targets. + Thanks to John Hawkinson. + +- Add missing autoconf packet capture result message. Thanks to Bill + Fenner (fenner@parc.xerox.com) + +- Fixed padding problems in the pf module. + +- Fixed some more alignment problems on the alpha. + +- Added explicit netmask support. Thanks to Steve Nuchia + (steve@research.oknet.com) + +- Fixed to handle raw ip addresses such as 0.0.0.1 without "left + justifing" + +- Add "sca" keyword (for DEC cluster services) as suggested by Terry + Kennedy (terry@spcvxa.spc.edu) + +- Add "atalk" keyword as suggested by John Hawkinson. + +- Add "igrp" keyword. + +- Fixed HID definition in grammar.y to be a string, not a value. + +- Use $CC when checking gcc version. Thanks to Carl Lindberg + (carl_lindberg@blacksmith.com) + +- Removed obsolete reference to pcap_immediate() from the man page. + Michael Stolarchuk (mts@terminator.rs.itd.umich.edu) + +- DLT_NULL has a 4 byte family header. Thanks to Jeffrey Honig + (jch@bsdi.com) + +v0.2 Sun Jun 23 02:28:42 PDT 1996 + +- Add support for HP-UX. Resulted from code contributed by Tom Murray + (tmurray@hpindck.cup.hp.com) and Philippe-Andri Prindeville + (philipp@res.enst.fr) + +- Update INSTALL with a reminder to install include files. Thanks to + Mark Andrews (mandrews@aw.sgi.com) + +- Fix bpf compiler alignment bug on the alpha. + +- Use autoconf to detect architectures that can't handle misaligned + accesses. + +- Added loopback support for snoop. Resulted from report Steve + Alexander (sca@engr.sgi.com) + +v0.1 Fri Apr 28 18:11:03 PDT 1995 + +- Fixed compiler and optimizer bugs. The BPF filter engine uses unsigned + comparison operators, while the code generator and optimizer assumed + signed semantics in several places. Thanks to Charlie Slater + (cslater@imatek.com) for pointing this out. + +- Removed FDDI ifdef's, they aren't really needed. Resulted from report + by Gary Veum (veum@boa.gsfc.nasa.gov). + +- Add pcap-null.c which allows offline use of libpcap on systems that + don't support live package capture. This feature resulting from a + request from Jan van Oorschot (j.p.m.voorschot@et.tudelft.nl). + +- Make bpf_compile() reentrant. Fix thanks to Pascal Hennequin + (Pascal.Hennequin@hugo.int-evry.fr). + +- Port to GNU autoconf. + +- Fix pcap-dlpi.c to work with isdn. Resulted from report by Flemming + Johansen (fsj@csd.cri.dk). + +- Handle multi-digit interface unit numbers (aka ppa's) under dlpi. + Resulted from report by Daniel Ehrlich (ehrlich@cse.psu.edu). + +- Fix pcap-dlpi.c to work in non-promiscuous mode. Resulted from report + by Jeff Murphy (jcmurphy@acsu.buffalo.edu). + +- Add support for "long jumps". Thanks to Jeffrey Mogul + (mogul@pa.dec.com). + +- Fix minor problems when compiling with BDEBUG as noticed by Scott + Bertilson (scott@unet.umn.edu). + +- Declare sys_errlist "const char *const" to avoid problems under + FreeBSD. Resulted from report by jher@eden.com. + +v0.0.6 Fri Apr 28 04:07:13 PDT 1995 + +- Add missing variable declaration missing from 0.0.6 + +v0.0.5 Fri Apr 28 00:22:21 PDT 1995 + +- Workaround for problems when pcap_read() returns 0 due to the timeout + expiring. + +v0.0.4 Thu Apr 20 20:41:48 PDT 1995 + +- Change configuration to not use gcc v2 flags with gcc v1. + +- Fixed a bug in pcap_next(); if pcap_dispatch() returns 0, pcap_next() + should also return 0. Thanks to Richard Stevens (rstevens@noao.edu). + +- Fixed configure to test for snoop before dlpi to avoid problems under + IRIX 5. Thanks to J. Eric Townsend (jet@abulafia.genmagic.com). + +- Hack around deficiency in Ultrix's make. + +- Fix two bugs related to the Solaris pre-5.3.2 bufmod bug; handle + savefiles that have more than snapshot bytes of data in them (so we + can read old savefiles) and avoid writing such files. + +- Added checkioctl which is used with gcc to check that the + "fixincludes" script has been run. + +v0.0.3 Tue Oct 18 18:13:46 PDT 1994 + +- Fixed configure to test for snoop before dlpi to avoid problems under + IRIX 5. Thanks to J. Eric Townsend (jet@abulafia.genmagic.com). + +v0.0.2 Wed Oct 12 20:56:37 PDT 1994 + +- Implement timeout in the dlpi pcap_open_live(). Thanks to Richard + Stevens. + +- Determine pcap link type from dlpi media type. Resulted from report + by Mahesh Jethanandani (mahesh@npix.com). + +v0.0.1 Fri Jun 24 14:50:57 PDT 1994 + +- Fixed bug in nit_setflags() in pcap-snit.c. The streams ioctl timeout + wasn't being initialized sometimes resulting in an "NIOCSFLAGS: + Invalid argument" error under OSF/1. Reported by Matt Day + (mday@artisoft.com) and Danny Mitzel (dmitzel@whitney.hitc.com). + +- Turn on FDDI support by default. + +v0.0 Mon Jun 20 19:20:16 PDT 1994 + +- Initial release. + +- Fixed bug with greater/less keywords, reported by Mark Andrews + (mandrews@alias.com). + +- Fix bug where '|' was defined as BPF_AND instead of BPF_OR, reported + by Elan Amir (elan@leeb.cs.berkeley.edu). + +- Machines with little-endian byte ordering are supported thanks to + Jeff Mogul. + +- Add hack for version 2.3 savefiles which don't have caplen and len + swapped thanks to Vern Paxson. + +- Added "&&" and "||" aliases for "and" and "or" thanks to Vern Paxson. + +- Added length, inbound and outbound keywords. Added: stable/11/contrib/libpcap/CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/contrib/libpcap/CMakeLists.txt Mon Jun 25 15:09:55 2018 (r335640) @@ -0,0 +1,2294 @@ +cmake_minimum_required(VERSION 2.8.6) + +# +# Apple doesn't build with an install_name starting with @rpath, and +# neither do we with autotools; don't do so with CMake, either, and +# suppress warnings about that. +# +if(POLICY CMP0042) + cmake_policy(SET CMP0042 OLD) +endif() + +set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules) + +project(pcap) + +# +# Try to enable as many C99 features as we can. +# At minimum, we want C++/C99-style // comments. +# +# Newer versions of compilers might default to supporting C99, but older +# versions may require a special flag. +# +# Prior to CMake 3.1, setting CMAKE_C_STANDARD will not have any effect, +# so, unless and until we require CMake 3.1 or later, we have to do it +# ourselves on pre-3.1 CMake, so we just do it ourselves on all versions +# of CMake. +# +# Note: with CMake 3.1 through 3.5, the only compilers for which CMake +# handles CMAKE_C_STANDARD are GCC and Clang. 3.6 adds support only +# for Intel C; 3.9 adds support for PGI C, Sun C, and IBM XL C, and +# 3.10 adds support for Cray C and IAR C, but no version of CMake has +# support for HP C. Therefore, even if we use CMAKE_C_STANDARD with +# compilers for which CMake supports it, we may still have to do it +# ourselves on other compilers. +# +# See the CMake documentation for the CMAKE__COMPILER_ID variables +# for a list of compiler IDs. +# +# We don't worry about MSVC; it doesn't have such a flag - either it +# doesn't support the C99 features we need at all, or it supports them +# regardless of the compiler flag. +# +# XXX - this just tests whether the option works and adds it if it does. +# We don't test whether it's necessary in order to get the C99 features +# that we use; if we ever have a user who tries to compile with a compiler +# that can't be made to support those features, we can add a test to make +# sure we actually *have* C99 support. +# +include(CheckCCompilerFlag) +macro(check_and_add_compiler_option _option) + message(STATUS "Checking C compiler flag ${_option}") + string(REPLACE "=" "-" _temp_option_variable ${_option}) + string(REGEX REPLACE "^-" "" _option_variable ${_temp_option_variable}) + check_c_compiler_flag("${_option}" ${_option_variable}) + if(${${_option_variable}}) + set(C_ADDITIONAL_FLAGS "${C_ADDITIONAL_FLAGS} ${_option}") + endif() +endmacro() + +set(C_ADDITIONAL_FLAGS "") +if(CMAKE_C_COMPILER_ID MATCHES "GNU" OR + CMAKE_C_COMPILER_ID MATCHES "Clang") + check_and_add_compiler_option("-std=gnu99") +elseif(CMAKE_C_COMPILER_ID MATCHES "XL") + # + # We want support for extensions picked up for GNU C compatibility, + # so we use -qlanglvl=extc99. + # + check_and_add_compiler_option("-qlanglvl=extc99") +elseif(CMAKE_C_COMPILER_ID MATCHES "HP") + check_and_add_compiler_option("-AC99") +elseif(CMAKE_C_COMPILER_ID MATCHES "Sun") + check_and_add_compiler_option("-xc99") +elseif(CMAKE_C_COMPILER_ID MATCHES "Intel") + check_and_add_compiler_option("-c99") +endif() + +# +# Build all runtimes in the top-level binary directory; that way, +# on Windows, the executables will be in the same directory as +# the DLLs, so the system will find pcap.dll when any of the +# executables are run. +# +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/run) + +################################################################### +# Parameters +################################################################### + +if(WIN32) + # + # On Windows, allow the library name to be overridden, for the + # benefit of projects that combine libpcap with their own + # kernel-mode code to support capturing. + # + set(LIBRARY_NAME pcap CACHE STRING "Library name") +else() + # + # On UN*X, it's always been libpcap. + # + set(LIBRARY_NAME pcap) +endif() + +option(INET6 "Enable IPv6" ON) +if(WIN32) + option(USE_STATIC_RT "Use static Runtime" ON) +endif(WIN32) +option(BUILD_SHARED_LIBS "Build shared libraries" ON) +if(WIN32) + set(PACKET_DLL_DIR "" CACHE PATH "Path to directory with include and lib subdirectories for packet.dll") +endif(WIN32) + +# To pacify those who hate the protochain instruction +option(NO_PROTOCHAIN "Disable protochain instruction" OFF) + +# +# Start out with the capture mechanism type unspecified; the user +# can explicitly specify it and, if they don't, we'll pick an +# appropriate one. +# +set(PCAP_TYPE "" CACHE STRING "Packet capture type") + +# +# Default to having remote capture support on Windows and, for now, to +# not having it on UN*X. +# +if(WIN32) + option(ENABLE_REMOTE "Enable remote capture" ON) +else() + option(ENABLE_REMOTE "Enable remote capture" OFF) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Mon Jun 25 15:29:12 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA3031013693; Mon, 25 Jun 2018 15:29:12 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from fry.fubar.geek.nz (fry.fubar.geek.nz [139.59.165.16]) by mx1.freebsd.org (Postfix) with ESMTP id 6386E81759; Mon, 25 Jun 2018 15:29:12 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from [IPv6:2001:630:212:2a8:ec62:daf7:95c1:3344] (unknown [IPv6:2001:630:212:2a8:ec62:daf7:95c1:3344]) by fry.fubar.geek.nz (Postfix) with ESMTPSA id E6D8A4E737; Mon, 25 Jun 2018 15:28:33 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) Subject: Re: svn commit: r334329 - head/sys/arm64/arm64 From: Andrew Turner In-Reply-To: Date: Mon, 25 Jun 2018 16:28:32 +0100 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <89A0025A-1048-4A12-AF3C-BC3BD2B99B86@freebsd.org> References: <201805291352.w4TDqPur045848@repo.freebsd.org> To: Patryk Duda X-Mailer: Apple Mail (2.3445.8.2) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 15:29:13 -0000 I=E2=80=99ve not seen this on the ThunderX2 I have access to with the = latest firmware. You=E2=80=99ll need to find out why the kernel is = trying to access the memory, and where it is in the EFI memory map. Andrew > On 21 Jun 2018, at 13:41, Patryk Duda wrote: >=20 > Hi, >=20 > I'm trying to boot kernel on ThunderX2 but I've got following error: >=20 > panic: efi_init: PA out of range, PA: 0xfafd0018 >=20 > This error comes from PHYS_TO_DMAP macro. > I can workaround this issue by disabling EFI Runtime Services in > kernel config but it seems to be > a problem with discontignous DMAP mapping. >=20 >=20 > 2018-05-29 15:52 GMT+02:00 Andrew Turner : >> Author: andrew >> Date: Tue May 29 13:52:25 2018 >> New Revision: 334329 >> URL: https://svnweb.freebsd.org/changeset/base/334329 >>=20 >> Log: >> On ThunderX2 we need to be careful to only map the memory the = firmware >> lists in the EFI memory map. As such we need to reduce the mappings = to >> restrict them to not be the full 1G block. For now reduce this to a = 2M >> block, however this may be further restricted to be 4k page aligned = as >> other SoCs may require. >>=20 >> This allows ThunderX2 to boot reliably to userspace without = performing >> any speculative memory accesses to invalid physical memory. >>=20 >> This is a recommit of r334035 now that we can access the EFI Runtime = data >> through the DMAP region. >>=20 >> Tested by: tuexen >> Sponsored by: DARPA, AFRL >>=20 >> Modified: >> head/sys/arm64/arm64/pmap.c >>=20 >> Modified: head/sys/arm64/arm64/pmap.c >> = =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/arm64/arm64/pmap.c Tue May 29 13:43:16 2018 = (r334328) >> +++ head/sys/arm64/arm64/pmap.c Tue May 29 13:52:25 2018 = (r334329) >> @@ -590,33 +590,100 @@ pmap_early_vtophys(vm_offset_t l1pt, = vm_offset_t va) >> return ((l2[l2_slot] & ~ATTR_MASK) + (va & L2_OFFSET)); >> } >>=20 >> -static void >> -pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t min_pa, = vm_paddr_t max_pa) >> +static vm_offset_t >> +pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t min_pa, >> + vm_offset_t freemempos) >> { >> + pt_entry_t *l2; >> vm_offset_t va; >> - vm_paddr_t pa; >> - u_int l1_slot; >> + vm_paddr_t l2_pa, pa; >> + u_int l1_slot, l2_slot, prev_l1_slot; >> int i; >>=20 >> dmap_phys_base =3D min_pa & ~L1_OFFSET; >> dmap_phys_max =3D 0; >> dmap_max_addr =3D 0; >> + l2 =3D NULL; >> + prev_l1_slot =3D -1; >>=20 >> +#define DMAP_TABLES ((DMAP_MAX_ADDRESS - = DMAP_MIN_ADDRESS) >> L0_SHIFT) >> + memset(pagetable_dmap, 0, PAGE_SIZE * DMAP_TABLES); >> + >> for (i =3D 0; i < (physmap_idx * 2); i +=3D 2) { >> - pa =3D physmap[i] & ~L1_OFFSET; >> + pa =3D physmap[i] & ~L2_OFFSET; >> va =3D pa - dmap_phys_base + DMAP_MIN_ADDRESS; >>=20 >> - for (; va < DMAP_MAX_ADDRESS && pa < physmap[i + 1]; >> + /* Create L2 mappings at the start of the region */ >> + if ((pa & L1_OFFSET) !=3D 0) { >> + l1_slot =3D ((va - DMAP_MIN_ADDRESS) >> = L1_SHIFT); >> + if (l1_slot !=3D prev_l1_slot) { >> + prev_l1_slot =3D l1_slot; >> + l2 =3D (pt_entry_t *)freemempos; >> + l2_pa =3D pmap_early_vtophys(kern_l1, >> + (vm_offset_t)l2); >> + freemempos +=3D PAGE_SIZE; >> + >> + = pmap_load_store(&pagetable_dmap[l1_slot], >> + (l2_pa & ~Ln_TABLE_MASK) | = L1_TABLE); >> + >> + memset(l2, 0, PAGE_SIZE); >> + } >> + KASSERT(l2 !=3D NULL, >> + ("pmap_bootstrap_dmap: NULL l2 map")); >> + for (; va < DMAP_MAX_ADDRESS && pa < = physmap[i + 1]; >> + pa +=3D L2_SIZE, va +=3D L2_SIZE) { >> + /* >> + * We are on a boundary, stop to >> + * create a level 1 block >> + */ >> + if ((pa & L1_OFFSET) =3D=3D 0) >> + break; >> + >> + l2_slot =3D pmap_l2_index(va); >> + KASSERT(l2_slot !=3D 0, ("...")); >> + pmap_load_store(&l2[l2_slot], >> + (pa & ~L2_OFFSET) | ATTR_DEFAULT = | ATTR_XN | >> + ATTR_IDX(CACHED_MEMORY) | = L2_BLOCK); >> + } >> + KASSERT(va =3D=3D (pa - dmap_phys_base + = DMAP_MIN_ADDRESS), >> + ("...")); >> + } >> + >> + for (; va < DMAP_MAX_ADDRESS && pa < physmap[i + 1] = && >> + (physmap[i + 1] - pa) >=3D L1_SIZE; >> pa +=3D L1_SIZE, va +=3D L1_SIZE) { >> l1_slot =3D ((va - DMAP_MIN_ADDRESS) >> = L1_SHIFT); >> - /* We already have an entry */ >> - if (pagetable_dmap[l1_slot] !=3D 0) >> - continue; >> pmap_load_store(&pagetable_dmap[l1_slot], >> (pa & ~L1_OFFSET) | ATTR_DEFAULT | ATTR_XN = | >> ATTR_IDX(CACHED_MEMORY) | L1_BLOCK); >> } >>=20 >> + /* Create L2 mappings at the end of the region */ >> + if (pa < physmap[i + 1]) { >> + l1_slot =3D ((va - DMAP_MIN_ADDRESS) >> = L1_SHIFT); >> + if (l1_slot !=3D prev_l1_slot) { >> + prev_l1_slot =3D l1_slot; >> + l2 =3D (pt_entry_t *)freemempos; >> + l2_pa =3D pmap_early_vtophys(kern_l1, >> + (vm_offset_t)l2); >> + freemempos +=3D PAGE_SIZE; >> + >> + = pmap_load_store(&pagetable_dmap[l1_slot], >> + (l2_pa & ~Ln_TABLE_MASK) | = L1_TABLE); >> + >> + memset(l2, 0, PAGE_SIZE); >> + } >> + KASSERT(l2 !=3D NULL, >> + ("pmap_bootstrap_dmap: NULL l2 map")); >> + for (; va < DMAP_MAX_ADDRESS && pa < = physmap[i + 1]; >> + pa +=3D L2_SIZE, va +=3D L2_SIZE) { >> + l2_slot =3D pmap_l2_index(va); >> + pmap_load_store(&l2[l2_slot], >> + (pa & ~L2_OFFSET) | ATTR_DEFAULT = | ATTR_XN | >> + ATTR_IDX(CACHED_MEMORY) | = L2_BLOCK); >> + } >> + } >> + >> if (pa > dmap_phys_max) { >> dmap_phys_max =3D pa; >> dmap_max_addr =3D va; >> @@ -624,6 +691,8 @@ pmap_bootstrap_dmap(vm_offset_t kern_l1, = vm_paddr_t mi >> } >>=20 >> cpu_tlb_flushID(); >> + >> + return (freemempos); >> } >>=20 >> static vm_offset_t >> @@ -729,8 +798,11 @@ pmap_bootstrap(vm_offset_t l0pt, vm_offset_t = l1pt, vm_ >> max_pa =3D physmap[i + 1]; >> } >>=20 >> + freemempos =3D KERNBASE + kernlen; >> + freemempos =3D roundup2(freemempos, PAGE_SIZE); >> + >> /* Create a direct map region early so we can use it for pa -> = va */ >> - pmap_bootstrap_dmap(l1pt, min_pa, max_pa); >> + freemempos =3D pmap_bootstrap_dmap(l1pt, min_pa, freemempos); >>=20 >> va =3D KERNBASE; >> start_pa =3D pa =3D KERNBASE - kern_delta; >> @@ -762,8 +834,6 @@ pmap_bootstrap(vm_offset_t l0pt, vm_offset_t = l1pt, vm_ >>=20 >> va =3D roundup2(va, L1_SIZE); >>=20 >> - freemempos =3D KERNBASE + kernlen; >> - freemempos =3D roundup2(freemempos, PAGE_SIZE); >> /* Create the l2 tables up to VM_MAX_KERNEL_ADDRESS */ >> freemempos =3D pmap_bootstrap_l2(l1pt, va, freemempos); >> /* And the l3 tables for the early devmap */ >> _______________________________________________ >> svn-src-all@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/svn-src-all >> To unsubscribe, send any mail to = "svn-src-all-unsubscribe@freebsd.org" >=20 From owner-svn-src-all@freebsd.org Mon Jun 25 15:43:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 666B6101403E; Mon, 25 Jun 2018 15:43:55 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B09DF82252; Mon, 25 Jun 2018 15:43:54 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w5PFhpNR099164; Mon, 25 Jun 2018 08:43:51 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w5PFhp8g099163; Mon, 25 Jun 2018 08:43:51 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201806251543.w5PFhp8g099163@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r335629 - in head: share/man/man4 sys/dev/vt/hw/vga In-Reply-To: <201806250939.w5P9dGMA067104@repo.freebsd.org> To: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Date: Mon, 25 Jun 2018 08:43:51 -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-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 15:43:55 -0000 > Author: royger > Date: Mon Jun 25 09:39:16 2018 > New Revision: 335629 > URL: https://svnweb.freebsd.org/changeset/base/335629 > > Log: > vt: add option to ignore NO_VGA flag in ACPI > > To workaround buggy firmware that sets this flag when there's actually > a VGA present. > > Reported and tested by: Yasuhiro KIMURA > Sponsored by: Citrix Systems R&D > Reviewed by: kib > Differential revision: https://reviews.freebsd.org/D16003 It is generally best to avoid double negatives, couldnt this of been better named? hw.vga.acp_force_vga > > Modified: > head/share/man/man4/vt.4 > head/sys/dev/vt/hw/vga/vt_vga.c > > Modified: head/share/man/man4/vt.4 > ============================================================================== > --- head/share/man/man4/vt.4 Mon Jun 25 09:19:50 2018 (r335628) > +++ head/share/man/man4/vt.4 Mon Jun 25 09:39:16 2018 (r335629) > @@ -44,6 +44,7 @@ > In > .Xr loader.conf 5 : > .Cd hw.vga.textmode=1 > +.Cd hw.vga.acpi_ignore_no_vga=1 > .Cd kern.vty=vt > .Cd kern.vt.color..rgb="" > .Cd kern.vt.fb.default_mode="x" > @@ -196,6 +197,10 @@ prompt or in > Set to 1 to use virtual terminals in text mode instead of graphics mode. > Features that require graphics mode, like loadable fonts, will be > disabled. > +.It Va hw.vga.acpi_ignore_no_vga > +Set to 1 to force the usage of the VGA driver regardless of whether > +ACPI IAPC_BOOT_ARCH signals no VGA support. > +Can be used to workaround firmware bugs in the ACPI tables. > .It Va kern.vty > Set this value to > .Ql vt > > Modified: head/sys/dev/vt/hw/vga/vt_vga.c > ============================================================================== > --- head/sys/dev/vt/hw/vga/vt_vga.c Mon Jun 25 09:19:50 2018 (r335628) > +++ head/sys/dev/vt/hw/vga/vt_vga.c Mon Jun 25 09:39:16 2018 (r335629) > @@ -1217,6 +1217,12 @@ vga_acpi_disabled(void) > ACPI_TABLE_FADT *fadt; > vm_paddr_t physaddr; > uint16_t flags; > + int ignore; > + > + TUNABLE_INT_FETCH("hw.vga.acpi_ignore_no_vga", &ignore); > + > + if (ignore) > + return (false); > > physaddr = acpi_find_table(ACPI_SIG_FADT); > if (physaddr == 0) > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Mon Jun 25 16:42:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA8DD1015EC1; Mon, 25 Jun 2018 16:42:50 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 707B883FDA; Mon, 25 Jun 2018 16:42:50 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 51F122FB1C; Mon, 25 Jun 2018 16:42:50 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5PGgoev088205; Mon, 25 Jun 2018 16:42:50 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5PGgoAf088203; Mon, 25 Jun 2018 16:42:50 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201806251642.w5PGgoAf088203@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 25 Jun 2018 16:42:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335641 - head/contrib/smbfs/lib/smb X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/contrib/smbfs/lib/smb X-SVN-Commit-Revision: 335641 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 16:42:51 -0000 Author: brooks Date: Mon Jun 25 16:42:49 2018 New Revision: 335641 URL: https://svnweb.freebsd.org/changeset/base/335641 Log: Fix a stack overflow in mount_smbfs when hostname is too long. The local hostname was blindly copied into the to the nn_name array. When the hostname exceeded 16 bytes, it would overflow. Truncate the hostname to 15 bytes plus a 0 terminator which is the "workstation name" suffix. Use defensive strlcpy() when filling nn_name in all cases. PR: 228354 Reported by: donald.buchholz@intel.com Reviewed by: jpaetzel, ian (prior version) Discussed with: Security Officer (gtetlow) MFC after: 3 days Security: Stack overflow with the hostname. Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D15936 Modified: head/contrib/smbfs/lib/smb/ctx.c head/contrib/smbfs/lib/smb/nbns_rq.c Modified: head/contrib/smbfs/lib/smb/ctx.c ============================================================================== --- head/contrib/smbfs/lib/smb/ctx.c Mon Jun 25 15:09:55 2018 (r335640) +++ head/contrib/smbfs/lib/smb/ctx.c Mon Jun 25 16:42:49 2018 (r335641) @@ -549,7 +549,9 @@ smb_ctx_resolve(struct smb_ctx *ctx) } nn.nn_scope = ctx->ct_nb->nb_scope; nn.nn_type = NBT_SERVER; - strcpy(nn.nn_name, ssn->ioc_srvname); + if (strlen(ssn->ioc_srvname) > NB_NAMELEN) + return NBERROR(NBERR_NAMETOOLONG); + strlcpy(nn.nn_name, ssn->ioc_srvname, sizeof(nn.nn_name)); error = nb_sockaddr(sap, &nn, &saserver); nb_snbfree(sap); if (error) { @@ -565,7 +567,11 @@ smb_ctx_resolve(struct smb_ctx *ctx) } nls_str_upper(ctx->ct_locname, ctx->ct_locname); } - strcpy(nn.nn_name, ctx->ct_locname); + /* + * Truncate the local host name to NB_NAMELEN-1 which gives a + * suffix of 0 which is "workstation name". + */ + strlcpy(nn.nn_name, ctx->ct_locname, NB_NAMELEN); nn.nn_type = NBT_WKSTA; nn.nn_scope = ctx->ct_nb->nb_scope; error = nb_sockaddr(NULL, &nn, &salocal); Modified: head/contrib/smbfs/lib/smb/nbns_rq.c ============================================================================== --- head/contrib/smbfs/lib/smb/nbns_rq.c Mon Jun 25 15:09:55 2018 (r335640) +++ head/contrib/smbfs/lib/smb/nbns_rq.c Mon Jun 25 16:42:49 2018 (r335641) @@ -74,7 +74,7 @@ nbns_resolvename(const char *name, struct nb_ctx *ctx, if (error) return error; bzero(&nn, sizeof(nn)); - strcpy(nn.nn_name, name); + strlcpy(nn.nn_name, name, sizeof(nn.nn_name)); nn.nn_scope = ctx->nb_scope; nn.nn_type = NBT_SERVER; rqp->nr_nmflags = NBNS_NMFLAG_RD; From owner-svn-src-all@freebsd.org Mon Jun 25 17:17:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1BC21017792; Mon, 25 Jun 2018 17:17:49 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5F90B856AB; Mon, 25 Jun 2018 17:17:49 +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 415BE28; Mon, 25 Jun 2018 17:17:49 +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 w5PHHnPs004217; Mon, 25 Jun 2018 17:17:49 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5PHHmBh004211; Mon, 25 Jun 2018 17:17:48 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201806251717.w5PHHmBh004211@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Mon, 25 Jun 2018 17:17:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335642 - head/usr.sbin/config X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.sbin/config X-SVN-Commit-Revision: 335642 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 17:17:50 -0000 Author: kevans Date: Mon Jun 25 17:17:47 2018 New Revision: 335642 URL: https://svnweb.freebsd.org/changeset/base/335642 Log: config(8): Add `envvar` support envvar allows adding individual environment variables to the kernel's static environment without the overhead of pulling in a full file. envvar in a config looks like: envvar some_var=5 All envvar-provided variables will be added after the env file is processed, so envvar keys that exist in the previous env will be overwritten by whatever value is set here in the kernel configuration directly. As an aside, envvar lines are intentionally tokenized differently from basically every other line. We used a named state when ENVVAR is encountered to gobble up the rest of the line, which will later be cleaned and validated in post-processing by sanitize_envline. This turns out to be the simplest and cleanest way to allow the flexibility that kenv does while not compromising on silly hacks. Reviewed by: ian (also contributor of sanitize_envline rewrite) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D15962 Modified: head/usr.sbin/config/config.5 head/usr.sbin/config/config.h head/usr.sbin/config/config.y head/usr.sbin/config/lang.l head/usr.sbin/config/main.c head/usr.sbin/config/mkmakefile.c Modified: head/usr.sbin/config/config.5 ============================================================================== --- head/usr.sbin/config/config.5 Mon Jun 25 16:42:49 2018 (r335641) +++ head/usr.sbin/config/config.5 Mon Jun 25 17:17:47 2018 (r335642) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 21, 2016 +.Dd June 22, 2018 .Dt CONFIG 5 .Os .Sh NAME @@ -124,6 +124,20 @@ the compiled-in environment instead, unless the boot e This directive is useful for setting kernel tunables in embedded environments that do not start from .Xr loader 8 . +.\" -------- ENVVAR -------- +.Pp +.It Ic envvar Ar setting +Specifies an individual environment setting to be added to the kernel's +compiled-in environment. +.Ar setting +must be of the form +.Dq Va name=value . +Optional quotes are supported in both name and value. +All environment variables specified with +.Ic envvar +will be set after any +.Ic env +files are included. .\" -------- FILES -------- .Pp .It Ic files Ar filename Modified: head/usr.sbin/config/config.h ============================================================================== --- head/usr.sbin/config/config.h Mon Jun 25 16:42:49 2018 (r335641) +++ head/usr.sbin/config/config.h Mon Jun 25 17:17:47 2018 (r335642) @@ -140,6 +140,13 @@ struct opt_list { SLIST_HEAD(, opt_list) otab; +struct envvar { + char *env_str; + STAILQ_ENTRY(envvar) envvar_next; +}; + +STAILQ_HEAD(envvar_head, envvar) envvars; + struct hint { char *hint_name; STAILQ_ENTRY(hint) hint_next; Modified: head/usr.sbin/config/config.y ============================================================================== --- head/usr.sbin/config/config.y Mon Jun 25 16:42:49 2018 (r335641) +++ head/usr.sbin/config/config.y Mon Jun 25 17:17:47 2018 (r335642) @@ -12,6 +12,7 @@ %token DEVICE %token NODEVICE %token ENV +%token ENVVAR %token EQUALS %token PLUSEQUALS %token HINTS @@ -26,6 +27,7 @@ %token INCLUDE %token FILES +%token ENVLINE %token ID %token NUMBER @@ -193,6 +195,15 @@ Config_spec: env = $2; envmode = 1; } | + ENVVAR ENVLINE { + struct envvar *envvar; + + envvar = (struct envvar *)calloc(1, sizeof (struct envvar)); + if (envvar == NULL) + err(EXIT_FAILURE, "calloc"); + envvar->env_str = $2; + STAILQ_INSERT_TAIL(&envvars, envvar, envvar_next); + } | HINTS ID { struct hint *hint; Modified: head/usr.sbin/config/lang.l ============================================================================== --- head/usr.sbin/config/lang.l Mon Jun 25 16:42:49 2018 (r335641) +++ head/usr.sbin/config/lang.l Mon Jun 25 17:17:47 2018 (r335642) @@ -70,6 +70,7 @@ struct kt { { "nodevice", NODEVICE }, { "nodevices", NODEVICE }, { "env", ENV }, + { "envvar", ENVVAR }, { "hints", HINTS }, { "ident", IDENT }, { "machine", ARCH }, /* MACHINE is defined in /sys/param.h */ @@ -105,7 +106,13 @@ int yyerror(const char *); ID [A-Za-z_][-A-Za-z_0-9]* PATH [./][-/.%^A-Za-z_0-9]+ %START TOEOL +%START ENVC %% +[^#\n]* { + BEGIN 0; + yylval.str = strdup(yytext); + return ENVLINE; + } {ID} { int i; @@ -115,6 +122,9 @@ PATH [./][-/.%^A-Za-z_0-9]+ yylval.str = strdup(yytext); return ID; } + /* We'll glom onto the rest of an envvar line */ + if (i == ENVVAR) + BEGIN ENVC; return i; } \\\"[^"]+\\\" { Modified: head/usr.sbin/config/main.c ============================================================================== --- head/usr.sbin/config/main.c Mon Jun 25 16:42:49 2018 (r335641) +++ head/usr.sbin/config/main.c Mon Jun 25 17:17:47 2018 (r335642) @@ -204,6 +204,7 @@ main(int argc, char **argv) STAILQ_INIT(&fntab); STAILQ_INIT(&ftab); STAILQ_INIT(&hints); + STAILQ_INIT(&envvars); if (yyparse()) exit(3); Modified: head/usr.sbin/config/mkmakefile.c ============================================================================== --- head/usr.sbin/config/mkmakefile.c Mon Jun 25 16:42:49 2018 (r335641) +++ head/usr.sbin/config/mkmakefile.c Mon Jun 25 17:17:47 2018 (r335642) @@ -46,6 +46,7 @@ static const char rcsid[] = #include #include #include +#include #include #include #include @@ -238,6 +239,63 @@ makehints(void) moveifchanged(path("hints.c.new"), path("hints.c")); } +static void +sanitize_envline(char *result, const char *src) +{ + const char *eq; + char c, *dst; + bool leading; + + /* If there is no '=' it's not a well-formed name=value line. */ + if ((eq = strchr(src, '=')) == NULL) { + *result = 0; + return; + } + dst = result; + + /* Copy chars before the '=', skipping any leading spaces/quotes. */ + leading = true; + while (src < eq) { + c = *src++; + if (leading && (isspace(c) || c == '"')) + continue; + *dst++ = c; + leading = false; + } + + /* If it was all leading space, we don't have a well-formed line. */ + if (leading) { + *result = 0; + return; + } + + /* Trim spaces/quotes immediately before the '=', then copy the '='. */ + while (isspace(dst[-1]) || dst[-1] == '"') + --dst; + *dst++ = *src++; + + /* Copy chars after the '=', skipping any leading whitespace. */ + leading = true; + while ((c = *src++) != 0) { + if (leading && (isspace(c) || c == '"')) + continue; + *dst++ = c; + leading = false; + } + + /* If it was all leading space, it's a valid 'var=' (nil value). */ + if (leading) { + *dst = 0; + return; + } + + /* Trim trailing whitespace and quotes. */ + while (isspace(dst[-1]) || dst[-1] == '"') + --dst; + + *dst = 0; +} + /* * Build env.c from the skeleton */ @@ -245,8 +303,8 @@ void makeenv(void) { FILE *ifp, *ofp; - char line[BUFSIZ]; - char *s; + char line[BUFSIZ], result[BUFSIZ], *linep; + struct envvar *envvar; if (env) { ifp = fopen(env, "r"); @@ -265,34 +323,19 @@ makeenv(void) fprintf(ofp, "char static_env[] = {\n"); if (ifp) { while (fgets(line, BUFSIZ, ifp) != NULL) { - /* zap trailing CR and/or LF */ - while ((s = strrchr(line, '\n')) != NULL) - *s = '\0'; - while ((s = strrchr(line, '\r')) != NULL) - *s = '\0'; - /* remove # comments */ - s = strchr(line, '#'); - if (s) - *s = '\0'; - /* remove any whitespace and " characters */ - s = line; - while (*s) { - if (*s == ' ' || *s == '\t' || *s == '"') { - while (*s) { - s[0] = s[1]; - s++; - } - /* start over */ - s = line; - continue; - } - s++; - } + sanitize_envline(result, line); /* anything left? */ - if (*line == '\0') + if (*result == '\0') continue; - fprintf(ofp, "\"%s\\0\"\n", line); + fprintf(ofp, "\"%s\\0\"\n", result); } + } + STAILQ_FOREACH(envvar, &envvars, envvar_next) { + linep = envvar->env_str; + sanitize_envline(result, linep); + if (*result == '\0') + continue; + fprintf(ofp, "\"%s\\0\"\n", result); } fprintf(ofp, "\"\\0\"\n};\n"); if (ifp) From owner-svn-src-all@freebsd.org Mon Jun 25 18:41:01 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B72E5101AB56; Mon, 25 Jun 2018 18:41:01 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-io0-x243.google.com (mail-io0-x243.google.com [IPv6:2607:f8b0:4001:c06::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C501E88E0C; Mon, 25 Jun 2018 18:41:00 +0000 (UTC) (envelope-from delphij@gmail.com) Received: by mail-io0-x243.google.com with SMTP id k16-v6so10739808ioa.8; Mon, 25 Jun 2018 11:41:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0QD2+R0K6Ser+sWwVjS/8ZaT1LeO8SrjAwB8rH/gn2g=; b=MF2gnPh6Ovn2vxrknZMmy1tx4v36kJgd3EeFTJ8DCExMJEG+6nMe7Ym+RI8Gx1qf8a Nwtqno0WvDU7CdwlCqIrdHKLHJ658Bb1FfLXxJMCoA8WHodJqhFYZn7ZuHW/cDu2vTVi ykSFOJpX5nJDrLz3okbAkZUbkVCfbp6DUTTnNVG8M5ZrR1maKnqZb94tfJjMA0DfiZkY zm+6oyMCfBGeWHce1N3sR2AVzifa2upOig36VKBBcFf51lSbUGz7/FKYnEyoqDbYc88W gv/hMYSb+Y/g/SVceCfCjXubSlMMUt4fcKHRr2Igl+lphV3EDEHHXWaDxECO6D0DkOKf 7xnw== 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=0QD2+R0K6Ser+sWwVjS/8ZaT1LeO8SrjAwB8rH/gn2g=; b=SYGvf9D6dIQ36vQIh6WQzuAMXhxyIXyh0Wh0hEkqLxz5rQixQNryYU1It/Ymu4UNnQ 5dG0pudKz/bumkONSL7NZ4xQjaEdi4iLkAYXClKXpTfJiZDbY8z1VAQ1AXEnSRIakR0N 2ew2nrAiSSBLbgsURe77KnJNFw+RKbscvcUj4JESMC2hIstvbFPgpVMMDgZ757Qxg9R+ f41FXHYBqIN9uDq/CDul7gEJtH418k9nuVCPaV2U5ewCvNSKoySPQiJfH13/WVax04Gc zYXUlQbHoG525TnyB4tL0kmZzaEEWObTSbhZmN8/BrmL1zOTP4lNWxeek8xURnSaXLhF tqjg== X-Gm-Message-State: APt69E2YYDju4Wr/gecf/n22wGqvRkoVYLwriuiKfu0t+6zz8XH0cD8x 6lk4wrYYjI6nuX3f9VDpEAYK9hdVl3jug6QfB5PqGg== X-Google-Smtp-Source: ADUXVKKITtstECG+5BMsuNtSiNQ4g6RC523oS+OTl1hzecvoTy+NLdVZHJ2PRxl4LFZKT94xRgfcOCca6L9/VuJIbQM= X-Received: by 2002:a6b:1ad1:: with SMTP id a200-v6mr10510012ioa.139.1529952059798; Mon, 25 Jun 2018 11:40:59 -0700 (PDT) MIME-Version: 1.0 References: <201806250129.w5P1Ts5H017125@repo.freebsd.org> In-Reply-To: <201806250129.w5P1Ts5H017125@repo.freebsd.org> From: Xin LI Date: Mon, 25 Jun 2018 11:40:48 -0700 Message-ID: Subject: Re: svn commit: r335612 - head/sbin/dhclient To: Eitan Adler Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 18:41:01 -0000 On Sun, Jun 24, 2018 at 6:30 PM Eitan Adler wrote: > > Author: eadler > Date: Mon Jun 25 01:29:54 2018 > New Revision: 335612 > URL: https://svnweb.freebsd.org/changeset/base/335612 > > Log: > dhclient: recorrect __progname to getprogname() > > A more correct way to modernize code that uses __progname is to just > replace each occurance of it with a call to getprogname(3) We should probably take a look at dhcpcd or ISC dhclient and teach whatever we have chosen sandbox, etc. The current FreeBSD dhclient is based on an ancient ISC dhclient fork with enhancements from OpenBSD (but not being kept up-to-date with OpenBSD) and do not support IPv6, etc. Cheers, From owner-svn-src-all@freebsd.org Mon Jun 25 18:53:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F09C101B20F; Mon, 25 Jun 2018 18:53:07 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E468B894D0; Mon, 25 Jun 2018 18:53:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AB7481128; Mon, 25 Jun 2018 18:53:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5PIr6c1054842; Mon, 25 Jun 2018 18:53:06 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5PIr6dp054840; Mon, 25 Jun 2018 18:53:06 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201806251853.w5PIr6dp054840@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 25 Jun 2018 18:53: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: r335643 - stable/11/share/mk X-SVN-Group: stable-11 X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: stable/11/share/mk X-SVN-Commit-Revision: 335643 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 18:53:07 -0000 Author: bdrewery Date: Mon Jun 25 18:53:06 2018 New Revision: 335643 URL: https://svnweb.freebsd.org/changeset/base/335643 Log: MFC r321427,r321445: r321427: PROGS: Fix ESTALE errors on NFS while cleaning in directories with PROGS. r321445: cleandir: Fix ESTALE errors from parallel removals. Modified: stable/11/share/mk/bsd.obj.mk stable/11/share/mk/bsd.progs.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/bsd.obj.mk ============================================================================== --- stable/11/share/mk/bsd.obj.mk Mon Jun 25 17:17:47 2018 (r335642) +++ stable/11/share/mk/bsd.obj.mk Mon Jun 25 18:53:06 2018 (r335643) @@ -157,6 +157,7 @@ whereobj: @echo ${.OBJDIR} .endif +# Same check in bsd.progs.mk .if ${CANONICALOBJDIR} != ${.CURDIR} && exists(${CANONICALOBJDIR}/) cleanobj: -rm -rf ${CANONICALOBJDIR} @@ -182,9 +183,9 @@ clean: .endif .ORDER: clean all -cleandir: cleanobj - .include + +cleandir: .WAIT cleanobj .if make(destroy*) && defined(OBJROOT) # this (rm -rf objdir) is much faster and more reliable than cleaning. Modified: stable/11/share/mk/bsd.progs.mk ============================================================================== --- stable/11/share/mk/bsd.progs.mk Mon Jun 25 17:17:47 2018 (r335642) +++ stable/11/share/mk/bsd.progs.mk Mon Jun 25 18:53:06 2018 (r335643) @@ -116,7 +116,16 @@ ${_PROGS_COMMON_OBJS}: .NOMETA .if !empty(PROGS) && !defined(_RECURSING_PROGS) && !defined(PROG) # tell progs.mk we might want to install things -PROGS_TARGETS+= checkdpadd clean cleandepend cleandir depend install +PROGS_TARGETS+= checkdpadd clean depend install +# Only handle removing depend files from the main process. +_PROG_MK.cleandir= CLEANDEPENDFILES= CLEANDEPENDDIRS= +_PROG_MK.cleanobj= CLEANDEPENDFILES= CLEANDEPENDDIRS= +# Only recurse on these if there is no objdir, meaning a normal +# 'clean' gets ran via the target defined in bsd.obj.mk. +# Same check from cleanobj: in bsd.obj.mk +.if ${CANONICALOBJDIR} == ${.CURDIR} || !exists(${CANONICALOBJDIR}/) +PROGS_TARGETS+= cleandir cleanobj +.endif # Ensure common objects are built before recursing. .if !empty(_PROGS_COMMON_OBJS) @@ -142,7 +151,7 @@ $p.$t: .PHONY .MAKE (cd ${.CURDIR} && \ DEPENDFILE=.depend.$p \ NO_SUBDIR=1 ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS=t \ - PROG=$p ${x.$p} ${@:E}) + ${_PROG_MK.${t}} PROG=$p ${x.$p} ${@:E}) .endfor .endfor From owner-svn-src-all@freebsd.org Mon Jun 25 19:24:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2776C101C78D; Mon, 25 Jun 2018 19:24:51 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D24FF8A6AC; Mon, 25 Jun 2018 19:24:50 +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 B4F40166E; Mon, 25 Jun 2018 19:24:50 +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 w5PJOowU070519; Mon, 25 Jun 2018 19:24:50 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5PJOoG0070518; Mon, 25 Jun 2018 19:24:50 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201806251924.w5PJOoG0070518@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 25 Jun 2018 19:24:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335644 - head/sys/compat/linux X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/compat/linux X-SVN-Commit-Revision: 335644 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 19:24:51 -0000 Author: emaste Date: Mon Jun 25 19:24:50 2018 New Revision: 335644 URL: https://svnweb.freebsd.org/changeset/base/335644 Log: Quiet unused fn warning for linuxulator w/o legacy syscalls Sponsored by: Turing Robotic Industries Modified: head/sys/compat/linux/linux_sysctl.c Modified: head/sys/compat/linux/linux_sysctl.c ============================================================================== --- head/sys/compat/linux/linux_sysctl.c Mon Jun 25 18:53:06 2018 (r335643) +++ head/sys/compat/linux/linux_sysctl.c Mon Jun 25 19:24:50 2018 (r335644) @@ -86,6 +86,7 @@ LIN_SDT_PROBE_DEFINE2(sysctl, linux_sysctl, wrong_leng LIN_SDT_PROBE_DEFINE1(sysctl, linux_sysctl, unsupported_sysctl, "char *"); LIN_SDT_PROBE_DEFINE1(sysctl, linux_sysctl, return, "int"); +#ifdef LINUX_LEGACY_SYSCALLS static int handle_string(struct l___sysctl_args *la, char *value) { @@ -115,7 +116,6 @@ handle_string(struct l___sysctl_args *la, char *value) return (0); } -#ifdef LINUX_LEGACY_SYSCALLS int linux_sysctl(struct thread *td, struct linux_sysctl_args *args) { From owner-svn-src-all@freebsd.org Mon Jun 25 19:55:17 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8E3ED101D3C8; Mon, 25 Jun 2018 19:55:17 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 36FB38B3B8; Mon, 25 Jun 2018 19:55:17 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1791A1B49; Mon, 25 Jun 2018 19:55:17 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5PJtGHG085870; Mon, 25 Jun 2018 19:55:16 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5PJtFQj085862; Mon, 25 Jun 2018 19:55:15 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201806251955.w5PJtFQj085862@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 25 Jun 2018 19:55:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335645 - in head: . etc/mtree lib lib/geom sbin/geom sbin/geom/class sbin/geom/core targets/pseudo/userland targets/pseudo/userland/lib X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in head: . etc/mtree lib lib/geom sbin/geom sbin/geom/class sbin/geom/core targets/pseudo/userland targets/pseudo/userland/lib X-SVN-Commit-Revision: 335645 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 19:55:17 -0000 Author: brooks Date: Mon Jun 25 19:55:15 2018 New Revision: 335645 URL: https://svnweb.freebsd.org/changeset/base/335645 Log: Normalize the g(eom,cache,part,...) build. Rather then combining hardlink creation for the geom(8) binary with shared library build, move libraries to src/lib/geom so they are built and installed normally. Create a common Makefile.classes which is included by both lib/geom/Makefile and sbin/geom/Makefile so the symlink and libraries stay in sync. The relocation of libraries allows libraries to be build for 32-bit compat. This also reduces the number of non-standard builds in the system. This commit is not sufficent to run a 32-bit /sbin/geom on a 64-bit system out of the box as it will look in the wrong place for libraries unless GEOM_LIBRARY_PATH is set appropriatly in the environment. Reviewed by: bdrewery Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D15360 Added: head/lib/geom/ - copied from r335644, head/sbin/geom/class/ Deleted: head/sbin/geom/Makefile.inc head/sbin/geom/class/ head/sbin/geom/core/Makefile Modified: head/Makefile.inc1 head/etc/mtree/BSD.lib32.dist head/lib/Makefile head/lib/geom/Makefile head/lib/geom/Makefile.inc head/sbin/geom/Makefile head/targets/pseudo/userland/Makefile.depend head/targets/pseudo/userland/lib/Makefile.depend Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Mon Jun 25 19:24:50 2018 (r335644) +++ head/Makefile.inc1 Mon Jun 25 19:55:15 2018 (r335645) @@ -952,7 +952,7 @@ _worldtmp: .PHONY @touch ${WORLDTMP}/${.TARGET} .for _dir in \ - lib lib/casper usr legacy/bin legacy/usr + lib lib/casper lib/geom usr legacy/bin legacy/usr mkdir -p ${WORLDTMP}/${_dir} .endfor mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ @@ -2507,6 +2507,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} \ ${_cddl_lib_libavl} \ ${_cddl_lib_libzfs_core} \ ${_cddl_lib_libctf} \ + lib/libufs \ lib/libutil lib/libpjdlog ${_lib_libypclnt} lib/libz lib/msun \ ${_secure_lib_libcrypto} ${_lib_libldns} \ ${_secure_lib_libssh} ${_secure_lib_libssl} Modified: head/etc/mtree/BSD.lib32.dist ============================================================================== --- head/etc/mtree/BSD.lib32.dist Mon Jun 25 19:24:50 2018 (r335644) +++ head/etc/mtree/BSD.lib32.dist Mon Jun 25 19:55:15 2018 (r335645) @@ -8,6 +8,8 @@ lib32 dtrace .. + geom + .. i18n .. .. Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Mon Jun 25 19:24:50 2018 (r335644) +++ head/lib/Makefile Mon Jun 25 19:55:15 2018 (r335645) @@ -24,6 +24,7 @@ SUBDIR_BOOTSTRAP= \ SUBDIR= ${SUBDIR_BOOTSTRAP} \ .WAIT \ + geom \ libalias \ libarchive \ libauditd \ @@ -100,6 +101,7 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \ # Inter-library dependencies. When the makefile for a library contains LDADD # libraries, those libraries should be listed as build order dependencies here. +SUBDIR_DEPEND_geom= libufs SUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd SUBDIR_DEPEND_libauditdm= libbsm SUBDIR_DEPEND_libbsnmp= ${_libnetgraph} Modified: head/lib/geom/Makefile ============================================================================== --- head/sbin/geom/class/Makefile Mon Jun 25 19:24:50 2018 (r335644) +++ head/lib/geom/Makefile Mon Jun 25 19:55:15 2018 (r335645) @@ -1,24 +1,6 @@ # $FreeBSD$ -.include +SUBDIR=${GEOM_CLASSES} -SUBDIR= cache -SUBDIR+=concat -.if ${MK_OPENSSL} != "no" -SUBDIR+=eli -.endif -SUBDIR+=journal -SUBDIR+=label -SUBDIR+=mirror -SUBDIR+=mountver -SUBDIR+=multipath -SUBDIR+=nop -SUBDIR+=part -SUBDIR+=raid -SUBDIR+=raid3 -SUBDIR+=sched -SUBDIR+=shsec -SUBDIR+=stripe -SUBDIR+=virstor - +.include "Makefile.inc" .include Modified: head/lib/geom/Makefile.inc ============================================================================== --- head/sbin/geom/class/Makefile.inc Mon Jun 25 19:24:50 2018 (r335644) +++ head/lib/geom/Makefile.inc Mon Jun 25 19:55:15 2018 (r335645) @@ -1,13 +1,16 @@ # $FreeBSD$ -SHLIBDIR?=${GEOM_CLASS_DIR} +.include + +SHLIBDIR=${GEOM_CLASS_DIR} SHLIB_NAME?=geom_${GEOM_CLASS}.so -LINKS= ${BINDIR}/geom ${BINDIR}/g${GEOM_CLASS} MAN= g${GEOM_CLASS}.8 SRCS+= geom_${GEOM_CLASS}.c subr.c +CFLAGS+=-I${SRCTOP}/sbin/geom +.PATH: ${SRCTOP}/sbin/geom/misc + NO_WMISSING_VARIABLE_DECLARATIONS= -CFLAGS+= -I${.CURDIR:H:H} - +.include "Makefile.classes" .include "../Makefile.inc" Modified: head/sbin/geom/Makefile ============================================================================== --- head/sbin/geom/Makefile Mon Jun 25 19:24:50 2018 (r335644) +++ head/sbin/geom/Makefile Mon Jun 25 19:55:15 2018 (r335645) @@ -1,28 +1,30 @@ # $FreeBSD$ -PACKAGE=runtime -.if defined(RESCUE) || defined(RELEASE_CRUNCH) +.include -.PATH: ${.CURDIR}/class/part \ - ${.CURDIR}/class/label \ - ${.CURDIR}/core \ - ${.CURDIR}/misc +.PATH: ${.CURDIR}/core ${.CURDIR}/misc -PROG= geom -SRCS= geom.c geom_label.c geom_part.c subr.c -MAN= +PACKAGE=runtime +PROG= geom +SRCS= geom.c subr.c +MAN= geom.8 +CFLAGS+= -I${.CURDIR} -I${.CURDIR}/core +CFLAGS+= -DGEOM_CLASS_DIR=\"${GEOM_CLASS_DIR}\" -WARNS?= 2 -CFLAGS+=-I${.CURDIR} -I${.CURDIR}/core -DSTATIC_GEOM_CLASSES +LIBADD= geom util -LIBADD= geom util +.if defined(RESCUE) || defined(RELEASE_CRUNCH) +.PATH: ${SRCTOP}/lib/geom/part \ + ${SRCTOP}/lib/geom/label -.include +SRCS+= geom_label.c geom_part.c +MAN= +WARNS?= 2 +CFLAGS+=-DSTATIC_GEOM_CLASSES .else - -SUBDIR= core class - -.include - +.include "${SRCTOP}/lib/geom/Makefile.classes" +LINKS= ${GEOM_CLASSES:S|^|${BINDIR}/geom ${BINDIR}/g|} .endif + +.include Modified: head/targets/pseudo/userland/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/Makefile.depend Mon Jun 25 19:24:50 2018 (r335644) +++ head/targets/pseudo/userland/Makefile.depend Mon Jun 25 19:55:15 2018 (r335645) @@ -70,22 +70,6 @@ DIRDEPS+= \ sbin/fsdb \ sbin/fsirand \ sbin/gbde \ - sbin/geom/class/cache \ - sbin/geom/class/concat \ - sbin/geom/class/eli \ - sbin/geom/class/journal \ - sbin/geom/class/label \ - sbin/geom/class/mirror \ - sbin/geom/class/mountver \ - sbin/geom/class/multipath \ - sbin/geom/class/nop \ - sbin/geom/class/part \ - sbin/geom/class/raid \ - sbin/geom/class/raid3 \ - sbin/geom/class/sched \ - sbin/geom/class/shsec \ - sbin/geom/class/stripe \ - sbin/geom/class/virstor \ sbin/geom/core \ sbin/ggate/ggatec \ sbin/ggate/ggated \ Modified: head/targets/pseudo/userland/lib/Makefile.depend ============================================================================== --- head/targets/pseudo/userland/lib/Makefile.depend Mon Jun 25 19:24:50 2018 (r335644) +++ head/targets/pseudo/userland/lib/Makefile.depend Mon Jun 25 19:55:15 2018 (r335645) @@ -8,6 +8,22 @@ DIRDEPS = \ lib/${CSU_DIR} \ lib/atf/libatf-c \ lib/atf/libatf-c++ \ + lib/geom/cache \ + lib/geom/concat \ + lib/geom/eli \ + lib/geom/journal \ + lib/geom/label \ + lib/geom/mirror \ + lib/geom/mountver \ + lib/geom/multipath \ + lib/geom/nop \ + lib/geom/part \ + lib/geom/raid \ + lib/geom/raid3 \ + lib/geom/sched \ + lib/geom/shsec \ + lib/geom/stripe \ + lib/geom/virstor \ lib/lib80211 \ lib/libalias/libalias \ lib/libalias/modules/cuseeme \ From owner-svn-src-all@freebsd.org Mon Jun 25 20:33:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D1A6101E275; Mon, 25 Jun 2018 20:33:05 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 541408C6D0; Mon, 25 Jun 2018 20:33:05 +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 3648321D2; Mon, 25 Jun 2018 20:33:05 +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 w5PKX5nM006560; Mon, 25 Jun 2018 20:33:05 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5PKX5Su006559; Mon, 25 Jun 2018 20:33:05 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201806252033.w5PKX5Su006559@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 25 Jun 2018 20:33:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335646 - head/sys/modules/linux64 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/modules/linux64 X-SVN-Commit-Revision: 335646 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 20:33:05 -0000 Author: emaste Date: Mon Jun 25 20:33:04 2018 New Revision: 335646 URL: https://svnweb.freebsd.org/changeset/base/335646 Log: linux64: add arm64 linuxulator build details The arm64 linuxulator needs different arguments for the objcopy invocation used to build the linux VDSO. These arguments are both arch- and OS-dependent, so I did not try to use some common setting for them. Reviewed by: imp Sponsored by: Turing Robotic Industries Differential Revision: https://reviews.freebsd.org/D16011 Modified: head/sys/modules/linux64/Makefile Modified: head/sys/modules/linux64/Makefile ============================================================================== --- head/sys/modules/linux64/Makefile Mon Jun 25 19:55:15 2018 (r335645) +++ head/sys/modules/linux64/Makefile Mon Jun 25 20:33:04 2018 (r335646) @@ -35,9 +35,16 @@ linux_locore.o: linux_locore.s linux_assym.h -Wl,-soname=${VDSO}.so.1,-warn-common -nostdlib \ ${.IMPSRC} -o ${.TARGET} +.if ${MACHINE_CPUARCH} == "aarch64" +OBJCOPY_TARGET=--output-target elf64-littleaarch64 --binary-architecture aarch64 +.elif ${MACHINE_CPUARCH} == "amd64" +OBJCOPY_TARGET=--output-target elf64-x86-64 --binary-architecture i386:x86-64 +.else +.error ${MACHINE_CPUARCH} not yet supported by linux64 +.endif ${VDSO}.so: linux_locore.o - ${OBJCOPY} --input-target binary --output-target elf64-x86-64 \ - -S -g --binary-architecture i386:x86-64 linux_locore.o ${.TARGET} + ${OBJCOPY} --input-target binary ${OBJCOPY_TARGET} -S -g \ + linux_locore.o ${.TARGET} strip -N _binary_linux_locore_o_size ${.TARGET} linux_support.o: assym.inc linux_assym.h From owner-svn-src-all@freebsd.org Mon Jun 25 21:54:40 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A7DC1022010; Mon, 25 Jun 2018 21:54:40 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0B87E8FB45; Mon, 25 Jun 2018 21:54:40 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E0E3A2EE0; Mon, 25 Jun 2018 21:54:39 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5PLsdJL048186; Mon, 25 Jun 2018 21:54:39 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5PLsd1O048185; Mon, 25 Jun 2018 21:54:39 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201806252154.w5PLsd1O048185@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Mon, 25 Jun 2018 21:54:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335647 - head/lib/geom X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: head/lib/geom X-SVN-Commit-Revision: 335647 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 21:54:40 -0000 Author: brd Date: Mon Jun 25 21:54:39 2018 New Revision: 335647 URL: https://svnweb.freebsd.org/changeset/base/335647 Log: Add a file missed in r335645. Approved by: brooks, allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D15360 Added: head/lib/geom/Makefile.classes (contents, props changed) Added: head/lib/geom/Makefile.classes ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/geom/Makefile.classes Mon Jun 25 21:54:39 2018 (r335647) @@ -0,0 +1,26 @@ +# $FreeBSD$ + +.if !defined(COMPAT_32BIT) +GEOM_CLASS_DIR?=/lib/geom +.else +GEOM_CLASS_DIR?=/usr/lib32/geom +.endif + +GEOM_CLASSES= cache +GEOM_CLASSES+= concat +.if ${MK_OPENSSL} != "no" +GEOM_CLASSES+= eli +.endif +GEOM_CLASSES+= journal +GEOM_CLASSES+= label +GEOM_CLASSES+= mirror +GEOM_CLASSES+= mountver +GEOM_CLASSES+= multipath +GEOM_CLASSES+= nop +GEOM_CLASSES+= part +GEOM_CLASSES+= raid +GEOM_CLASSES+= raid3 +GEOM_CLASSES+= sched +GEOM_CLASSES+= shsec +GEOM_CLASSES+= stripe +GEOM_CLASSES+= virstor From owner-svn-src-all@freebsd.org Mon Jun 25 22:05:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38DD7102270F; Mon, 25 Jun 2018 22:05:35 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D97E8703F3; Mon, 25 Jun 2018 22:05:34 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B2012309E; Mon, 25 Jun 2018 22:05:34 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5PM5YG2053815; Mon, 25 Jun 2018 22:05:34 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5PM5YZI053813; Mon, 25 Jun 2018 22:05:34 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201806252205.w5PM5YZI053813@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Mon, 25 Jun 2018 22:05:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335648 - head/sys/powerpc/include X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/include X-SVN-Commit-Revision: 335648 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 22:05:35 -0000 Author: jhibbits Date: Mon Jun 25 22:05:33 2018 New Revision: 335648 URL: https://svnweb.freebsd.org/changeset/base/335648 Log: Expose stopped cpu contexts to ddb on PowerPC Summary: In r220638, stoppcbs started being tracked. This never got exposed to ddb though, so kdb_thr_ctx() didn't know how to look them up. This allows switching to threads on stopped CPUs in kdb. Submitted by: Brandon Bergren Differential Revision: https://reviews.freebsd.org/D15986 Modified: head/sys/powerpc/include/kdb.h head/sys/powerpc/include/smp.h Modified: head/sys/powerpc/include/kdb.h ============================================================================== --- head/sys/powerpc/include/kdb.h Mon Jun 25 21:54:39 2018 (r335647) +++ head/sys/powerpc/include/kdb.h Mon Jun 25 22:05:33 2018 (r335648) @@ -40,6 +40,8 @@ void kdb_cpu_clear_singlestep(void); void kdb_cpu_set_singlestep(void); +#define KDB_STOPPEDPCB(pc) &stoppcbs[pc->pc_cpuid] + static __inline void kdb_cpu_sync_icache(unsigned char *addr, size_t size) { Modified: head/sys/powerpc/include/smp.h ============================================================================== --- head/sys/powerpc/include/smp.h Mon Jun 25 21:54:39 2018 (r335647) +++ head/sys/powerpc/include/smp.h Mon Jun 25 22:05:33 2018 (r335648) @@ -42,6 +42,7 @@ #ifndef LOCORE +#include #include void ipi_all_but_self(int ipi); @@ -58,6 +59,8 @@ void cpudep_ap_early_bootstrap(void); uintptr_t cpudep_ap_bootstrap(void); void cpudep_ap_setup(void); void machdep_ap_bootstrap(void); + +extern struct pcb stoppcbs[]; #endif /* !LOCORE */ #endif /* _KERNEL */ From owner-svn-src-all@freebsd.org Mon Jun 25 22:36:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1AD34102361D; Mon, 25 Jun 2018 22:36:27 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B83BD7112D; Mon, 25 Jun 2018 22:36:26 +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 9A00D38CA; Mon, 25 Jun 2018 22:36:26 +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 w5PMaQaQ069612; Mon, 25 Jun 2018 22:36:26 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5PMaQNP069610; Mon, 25 Jun 2018 22:36:26 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201806252236.w5PMaQNP069610@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 25 Jun 2018 22:36:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335649 - in head/sys/arm64: arm64 linux X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys/arm64: arm64 linux X-SVN-Commit-Revision: 335649 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.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 22:36:27 -0000 Author: andrew Date: Mon Jun 25 22:36:25 2018 New Revision: 335649 URL: https://svnweb.freebsd.org/changeset/base/335649 Log: Make cpu_set_syscall_retval common between the existing FreeBSD ABI and the Linuxulator. We need to translate error values onto Linux errno values and return them to userspace when a syscall fails. We also need to preserve x1 as all registers are preserved other than the return value. Reviewed by: emaste Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D16008 Modified: head/sys/arm64/arm64/vm_machdep.c head/sys/arm64/linux/linux_sysvec.c Modified: head/sys/arm64/arm64/vm_machdep.c ============================================================================== --- head/sys/arm64/arm64/vm_machdep.c Mon Jun 25 22:05:33 2018 (r335648) +++ head/sys/arm64/arm64/vm_machdep.c Mon Jun 25 22:36:25 2018 (r335649) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -154,7 +155,7 @@ cpu_set_syscall_retval(struct thread *td, int error) break; default: frame->tf_spsr |= PSR_C; /* carry bit */ - frame->tf_x[0] = error; + frame->tf_x[0] = SV_ABI_ERRNO(td->td_proc, error); break; } } Modified: head/sys/arm64/linux/linux_sysvec.c ============================================================================== --- head/sys/arm64/linux/linux_sysvec.c Mon Jun 25 22:05:33 2018 (r335648) +++ head/sys/arm64/linux/linux_sysvec.c Mon Jun 25 22:36:25 2018 (r335649) @@ -143,25 +143,9 @@ linux_fetch_syscall_args(struct thread *td) static void linux_set_syscall_retval(struct thread *td, int error) { - struct trapframe *frame; - frame = td->td_frame; - - switch (error) { - case 0: - frame->tf_x[0] = td->td_retval[0]; - frame->tf_x[1] = td->td_retval[1]; - break; - case ERESTART: - /* LINUXTODO: verify */ - frame->tf_elr -= 4; - break; - case EJUSTRETURN: - break; - default: - frame->tf_x[0] = error; - break; - } + td->td_retval[1] = td->td_frame->tf_x[1]; + cpu_set_syscall_retval(td, error); } static int From owner-svn-src-all@freebsd.org Mon Jun 25 23:40:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D1991024F9C; Mon, 25 Jun 2018 23:40:43 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (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 BE1B972980; Mon, 25 Jun 2018 23:40:42 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 54EC85A9F18; Mon, 25 Jun 2018 23:40:36 +0000 (UTC) Date: Mon, 25 Jun 2018 23:40:36 +0000 From: Brooks Davis To: Brad Davis Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r335647 - head/lib/geom Message-ID: <20180625234036.GB70655@spindle.one-eyed-alien.net> References: <201806252154.w5PLsd1O048185@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9amGYk9869ThD9tj" Content-Disposition: inline In-Reply-To: <201806252154.w5PLsd1O048185@repo.freebsd.org> User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 25 Jun 2018 23:40:43 -0000 --9amGYk9869ThD9tj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 25, 2018 at 09:54:39PM +0000, Brad Davis wrote: > Author: brd > Date: Mon Jun 25 21:54:39 2018 > New Revision: 335647 > URL: https://svnweb.freebsd.org/changeset/base/335647 >=20 > Log: > Add a file missed in r335645. > =20 > Approved by: brooks, allanjude (mentor) > Differential Revision: https://reviews.freebsd.org/D15360 Thanks for fixing this and sorry for the breakage. -- Brooks --9amGYk9869ThD9tj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJbMX1zAAoJEKzQXbSebgfAT5QH/3zP3kz647kSIJOTImel7oYl r8P5NS3ynfxXwLBD67UiTfnGTBV75lWIrpSHF6hOHNi4nSZQVfOHPCW8U/pE66iV PORZWkHizBA0irvp3zOzbV/OoDDr+GXsQfBCcVWb/zbgoivAFXZKh5cIbu3xzMdI MAVbR6bAhLXcSllAI8dgodWEtiINLzBVYReuWYgpJNVx/Ii1P6ytKWwatucDH7L+ bpL5wvPeQ/AnX0KempYNGpia6ktYZEVbssy8PTKvT6VkBWBJrodiYFl3wD9JZtWx 2Z/6eAd3Ox5H13BHrwPM/iua5mWWkq5izwEOdvJnprfnY56Cr9LQA6BjUyQYpaU= =G7sg -----END PGP SIGNATURE----- --9amGYk9869ThD9tj-- From owner-svn-src-all@freebsd.org Tue Jun 26 00:39:39 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 949A31027034; Tue, 26 Jun 2018 00:39:39 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 35063748BD; Tue, 26 Jun 2018 00:39:39 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 075CD4D16; Tue, 26 Jun 2018 00:39:39 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5Q0dcSk030984; Tue, 26 Jun 2018 00:39:38 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5Q0dcnh030983; Tue, 26 Jun 2018 00:39:38 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201806260039.w5Q0dcnh030983@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 26 Jun 2018 00:39:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335650 - head/sys/ufs/ffs X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/ufs/ffs X-SVN-Commit-Revision: 335650 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 00:39:39 -0000 Author: imp Date: Tue Jun 26 00:39:38 2018 New Revision: 335650 URL: https://svnweb.freebsd.org/changeset/base/335650 Log: Use buf + strategy rather than bypassing geom_vfs layer The reference counting that's done in the geom_vfs layer to prevent delivery of requests to defunct devices only works if all requests go through that layer. UFS was bypassing that layer for BIO_DELETE requests, sending them to the geom_consumer directly with g_io_request. Allocate a buf, fill it in, and call strategy on it instead. Submitted by: Chuck Silvers Reviewed by: scottl, imp, kirk Sponsored by: Netflix Differential: https://reviews.freebsd.org/D15456 Modified: head/sys/ufs/ffs/ffs_alloc.c Modified: head/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_alloc.c Mon Jun 25 22:36:25 2018 (r335649) +++ head/sys/ufs/ffs/ffs_alloc.c Tue Jun 26 00:39:38 2018 (r335650) @@ -88,6 +88,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -109,7 +110,7 @@ static ufs2_daddr_t static void ffs_blkfree_cg(struct ufsmount *, struct fs *, struct vnode *, ufs2_daddr_t, long, ino_t, struct workhead *); -static void ffs_blkfree_trim_completed(struct bio *); +static void ffs_blkfree_trim_completed(struct buf *); static void ffs_blkfree_trim_task(void *ctx, int pending __unused); #ifdef INVARIANTS static int ffs_checkblk(struct inode *, ufs2_daddr_t, long); @@ -2280,13 +2281,13 @@ ffs_blkfree_trim_task(ctx, pending) } static void -ffs_blkfree_trim_completed(bip) - struct bio *bip; +ffs_blkfree_trim_completed(bp) + struct buf *bp; { struct ffs_blkfree_trim_params *tp; - tp = bip->bio_caller2; - g_destroy_bio(bip); + tp = bp->b_fsprivate1; + free(bp, M_TEMP); TASK_INIT(&tp->task, 0, ffs_blkfree_trim_task, tp); taskqueue_enqueue(tp->ump->um_trim_tq, &tp->task); } @@ -2303,7 +2304,7 @@ ffs_blkfree(ump, fs, devvp, bno, size, inum, vtype, de struct workhead *dephd; { struct mount *mp; - struct bio *bip; + struct buf *bp; struct ffs_blkfree_trim_params *tp; /* @@ -2346,16 +2347,16 @@ ffs_blkfree(ump, fs, devvp, bno, size, inum, vtype, de } else tp->pdephd = NULL; - bip = g_alloc_bio(); - bip->bio_cmd = BIO_DELETE; - bip->bio_offset = dbtob(fsbtodb(fs, bno)); - bip->bio_done = ffs_blkfree_trim_completed; - bip->bio_length = size; - bip->bio_caller2 = tp; + bp = malloc(sizeof(*bp), M_TEMP, M_WAITOK | M_ZERO); + bp->b_iocmd = BIO_DELETE; + bp->b_iooffset = dbtob(fsbtodb(fs, bno)); + bp->b_iodone = ffs_blkfree_trim_completed; + bp->b_bcount = size; + bp->b_fsprivate1 = tp; mp = UFSTOVFS(ump); vn_start_secondary_write(NULL, &mp, 0); - g_io_request(bip, (struct g_consumer *)devvp->v_bufobj.bo_private); + g_vfs_strategy(ump->um_bo, bp); } #ifdef INVARIANTS From owner-svn-src-all@freebsd.org Tue Jun 26 02:05:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6EC2A10018A9; Tue, 26 Jun 2018 02:05:46 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1FE777822A; Tue, 26 Jun 2018 02:05:46 +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 F36585CB6; Tue, 26 Jun 2018 02:05:45 +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 w5Q25jZk077342; Tue, 26 Jun 2018 02:05:45 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5Q25jrN077341; Tue, 26 Jun 2018 02:05:45 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201806260205.w5Q25jrN077341@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 26 Jun 2018 02:05:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335651 - head/usr.sbin/config X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.sbin/config X-SVN-Commit-Revision: 335651 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 02:05:46 -0000 Author: kevans Date: Tue Jun 26 02:05:45 2018 New Revision: 335651 URL: https://svnweb.freebsd.org/changeset/base/335651 Log: config(8): Set envmode if we accept an envvar X-MFC-With: r335642 Modified: head/usr.sbin/config/config.y Modified: head/usr.sbin/config/config.y ============================================================================== --- head/usr.sbin/config/config.y Tue Jun 26 00:39:38 2018 (r335650) +++ head/usr.sbin/config/config.y Tue Jun 26 02:05:45 2018 (r335651) @@ -203,6 +203,7 @@ Config_spec: err(EXIT_FAILURE, "calloc"); envvar->env_str = $2; STAILQ_INSERT_TAIL(&envvars, envvar, envvar_next); + envmode = 1; } | HINTS ID { struct hint *hint; From owner-svn-src-all@freebsd.org Tue Jun 26 03:56:12 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88C5F10094DE; Tue, 26 Jun 2018 03:56:12 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3CBDE7C784; Tue, 26 Jun 2018 03:56:12 +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 1EE6C7008; Tue, 26 Jun 2018 03:56:12 +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 w5Q3uBFP034245; Tue, 26 Jun 2018 03:56:11 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5Q3uB64034240; Tue, 26 Jun 2018 03:56:11 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201806260356.w5Q3uB64034240@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 26 Jun 2018 03:56:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335652 - head/usr.sbin/config X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.sbin/config X-SVN-Commit-Revision: 335652 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 03:56:12 -0000 Author: kevans Date: Tue Jun 26 03:56:10 2018 New Revision: 335652 URL: https://svnweb.freebsd.org/changeset/base/335652 Log: config(8): Make 'env' files consistent with other file-accepting options Previously, only one 'env' file could be specified. Later 'env' directives would overwrite earlier 'env' directives. This is inconsistent with every other file-accepting directives which process files in order, including hints. A caveat applies to both hints and env that isn't mentioned: they're concatenated in the order of appearance, so they're not actually applied in the way one might think by supplying: hints x hints y Hints in x will take precedence over same-name hints in y due to how the kernel processes them, stopping at the first line that matches the hint we're searching for. Future work will flip the order of concatenation so that later files may still properly override earlier files. In practice, this likely doesn't matter at all due to the nature of the beast. Modified: head/usr.sbin/config/config.5 head/usr.sbin/config/config.h head/usr.sbin/config/config.y head/usr.sbin/config/mkmakefile.c Modified: head/usr.sbin/config/config.5 ============================================================================== --- head/usr.sbin/config/config.5 Tue Jun 26 02:05:45 2018 (r335651) +++ head/usr.sbin/config/config.5 Tue Jun 26 03:56:10 2018 (r335652) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 22, 2018 +.Dd June 26, 2018 .Dt CONFIG 5 .Os .Sh NAME @@ -124,6 +124,18 @@ the compiled-in environment instead, unless the boot e This directive is useful for setting kernel tunables in embedded environments that do not start from .Xr loader 8 . +.Pp +All +.Ic env +and +.Ic envvar +directives will be processed and added to the staitc environment in the order of +appearance. +Note that within +.Ar filename , +the first appearance of a given variable will be the first one seen by the +kernel, effectively shadowing any later appearances of the same variable within +.Ar filename . .\" -------- ENVVAR -------- .Pp .It Ic envvar Ar setting @@ -133,11 +145,13 @@ compiled-in environment. must be of the form .Dq Va name=value . Optional quotes are supported in both name and value. -All environment variables specified with -.Ic envvar -will be set after any +.Pp +All .Ic env -files are included. +and +.Ic envvar +directives will be processed and added to the staitc environment in the order of +appearance. .\" -------- FILES -------- .Pp .It Ic files Ar filename Modified: head/usr.sbin/config/config.h ============================================================================== --- head/usr.sbin/config/config.h Tue Jun 26 02:05:45 2018 (r335651) +++ head/usr.sbin/config/config.h Tue Jun 26 03:56:10 2018 (r335652) @@ -37,6 +37,7 @@ */ #include #include +#include #include #include @@ -142,6 +143,7 @@ SLIST_HEAD(, opt_list) otab; struct envvar { char *env_str; + bool env_is_file; STAILQ_ENTRY(envvar) envvar_next; }; @@ -175,7 +177,6 @@ SLIST_HEAD(, includepath) includepath; #define OPT_AUTOGEN "CONFIG_AUTOGENERATED" extern char *ident; -extern char *env; extern char kernconfstr[]; extern int do_trace; extern int envmode; Modified: head/usr.sbin/config/config.y ============================================================================== --- head/usr.sbin/config/config.y Tue Jun 26 02:05:45 2018 (r335651) +++ head/usr.sbin/config/config.y Tue Jun 26 03:56:10 2018 (r335652) @@ -82,7 +82,6 @@ struct device_head dtab; char *ident; -char *env; int envmode; int hintmode; int yyline; @@ -99,6 +98,7 @@ int yywrap(void); static void newdev(char *name); static void newfile(char *name); +static void newenvvar(char *name, bool is_file); static void rmdev_schedule(struct device_head *dh, char *name); static void newopt(struct opt_head *list, char *name, char *value, int append); static void rmopt_schedule(struct opt_head *list, char *name); @@ -191,20 +191,8 @@ Config_spec: | MAXUSERS NUMBER { maxusers = $2; } | PROFILE NUMBER { profiling = $2; } | - ENV ID { - env = $2; - envmode = 1; - } | - ENVVAR ENVLINE { - struct envvar *envvar; - - envvar = (struct envvar *)calloc(1, sizeof (struct envvar)); - if (envvar == NULL) - err(EXIT_FAILURE, "calloc"); - envvar->env_str = $2; - STAILQ_INSERT_TAIL(&envvars, envvar, envvar_next); - envmode = 1; - } | + ENV ID { newenvvar($2, true); } | + ENVVAR ENVLINE { newenvvar($2, false); } | HINTS ID { struct hint *hint; @@ -361,7 +349,21 @@ newfile(char *name) nl->f_name = name; STAILQ_INSERT_TAIL(&fntab, nl, f_next); } - + +static void +newenvvar(char *name, bool is_file) +{ + struct envvar *envvar; + + envvar = (struct envvar *)calloc(1, sizeof (struct envvar)); + if (envvar == NULL) + err(EXIT_FAILURE, "calloc"); + envvar->env_str = name; + envvar->env_is_file = is_file; + STAILQ_INSERT_TAIL(&envvars, envvar, envvar_next); + envmode = 1; +} + /* * Find a device in the list of devices. */ Modified: head/usr.sbin/config/mkmakefile.c ============================================================================== --- head/usr.sbin/config/mkmakefile.c Tue Jun 26 02:05:45 2018 (r335651) +++ head/usr.sbin/config/mkmakefile.c Tue Jun 26 03:56:10 2018 (r335652) @@ -306,13 +306,6 @@ makeenv(void) char line[BUFSIZ], result[BUFSIZ], *linep; struct envvar *envvar; - if (env) { - ifp = fopen(env, "r"); - if (ifp == NULL) - err(1, "%s", env); - } else { - ifp = NULL; - } ofp = fopen(path("env.c.new"), "w"); if (ofp == NULL) err(1, "%s", path("env.c.new")); @@ -321,21 +314,26 @@ makeenv(void) fprintf(ofp, "\n"); fprintf(ofp, "int envmode = %d;\n", envmode); fprintf(ofp, "char static_env[] = {\n"); - if (ifp) { - while (fgets(line, BUFSIZ, ifp) != NULL) { - sanitize_envline(result, line); - /* anything left? */ + STAILQ_FOREACH(envvar, &envvars, envvar_next) { + if (envvar->env_is_file) { + ifp = fopen(envvar->env_str, "r"); + if (ifp == NULL) + err(1, "%s", envvar->env_str); + while (fgets(line, BUFSIZ, ifp) != NULL) { + sanitize_envline(result, line); + /* anything left? */ + if (*result == '\0') + continue; + fprintf(ofp, "\"%s\\0\"\n", result); + } + fclose(ifp); + } else { + linep = envvar->env_str; + sanitize_envline(result, linep); if (*result == '\0') continue; fprintf(ofp, "\"%s\\0\"\n", result); } - } - STAILQ_FOREACH(envvar, &envvars, envvar_next) { - linep = envvar->env_str; - sanitize_envline(result, linep); - if (*result == '\0') - continue; - fprintf(ofp, "\"%s\\0\"\n", result); } fprintf(ofp, "\"\\0\"\n};\n"); if (ifp) From owner-svn-src-all@freebsd.org Tue Jun 26 04:02:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04B5D1009CEF; Tue, 26 Jun 2018 04:02:27 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A78817CDC4; Tue, 26 Jun 2018 04:02:26 +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 7060271BB; Tue, 26 Jun 2018 04:02:26 +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 w5Q42Qxf038512; Tue, 26 Jun 2018 04:02:26 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5Q42QFO038510; Tue, 26 Jun 2018 04:02:26 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201806260402.w5Q42QFO038510@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 26 Jun 2018 04:02:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335653 - head/usr.sbin/config X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.sbin/config X-SVN-Commit-Revision: 335653 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 04:02:27 -0000 Author: kevans Date: Tue Jun 26 04:02:25 2018 New Revision: 335653 URL: https://svnweb.freebsd.org/changeset/base/335653 Log: config(8): Flip the order of concatenation for `hints` and `env` As previously noted, kernel's processing of these means that the first appearance of a hint/variable wins. Flipping the order of concatenation means that later variables override earlier variables, as expected when one does: hints x hints y Where perhaps x is: hint.aw_sid.0.disable=1 and y is: hint.aw_sid.0.disable=0 The expectation would be that a later appearing variable would override an earlier appearing variable, such as with `device`/`nodevice`, device.hints, and other similarly structured data files. Modified: head/usr.sbin/config/config.5 head/usr.sbin/config/config.y Modified: head/usr.sbin/config/config.5 ============================================================================== --- head/usr.sbin/config/config.5 Tue Jun 26 03:56:10 2018 (r335652) +++ head/usr.sbin/config/config.5 Tue Jun 26 04:02:25 2018 (r335653) @@ -129,8 +129,9 @@ All .Ic env and .Ic envvar -directives will be processed and added to the staitc environment in the order of -appearance. +directives will be processed and added to the static environment in reversed +order of appearance so that later specified variables properly override earlier +specified variables. Note that within .Ar filename , the first appearance of a given variable will be the first one seen by the @@ -150,8 +151,9 @@ All .Ic env and .Ic envvar -directives will be processed and added to the staitc environment in the order of -appearance. +directives will be processed and added to the static environment in reversed +order of appearance so that later specified variables properly override earlier +specified variables. .\" -------- FILES -------- .Pp .It Ic files Ar filename @@ -178,7 +180,9 @@ The file must conform to the syntax specified by .Xr device.hints 5 . Multiple hints lines are allowed. -The resulting hints will be the files concatenated in the order of appearance. +The resulting hints will be the files concatenated in reverse order of +appearance so that hints in later files properly override hints in earlier +files. .\" -------- IDENT -------- .Pp .It Ic ident Ar name Modified: head/usr.sbin/config/config.y ============================================================================== --- head/usr.sbin/config/config.y Tue Jun 26 03:56:10 2018 (r335652) +++ head/usr.sbin/config/config.y Tue Jun 26 04:02:25 2018 (r335653) @@ -200,7 +200,7 @@ Config_spec: if (hint == NULL) err(EXIT_FAILURE, "calloc"); hint->hint_name = $2; - STAILQ_INSERT_TAIL(&hints, hint, hint_next); + STAILQ_INSERT_HEAD(&hints, hint, hint_next); hintmode = 1; } @@ -360,7 +360,7 @@ newenvvar(char *name, bool is_file) err(EXIT_FAILURE, "calloc"); envvar->env_str = name; envvar->env_is_file = is_file; - STAILQ_INSERT_TAIL(&envvars, envvar, envvar_next); + STAILQ_INSERT_HEAD(&envvars, envvar, envvar_next); envmode = 1; } From owner-svn-src-all@freebsd.org Tue Jun 26 04:06:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 47FBE1009FBD; Tue, 26 Jun 2018 04:06:50 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E1F177CFF3; Tue, 26 Jun 2018 04:06:49 +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 BD82671CD; Tue, 26 Jun 2018 04:06:49 +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 w5Q46neP039424; Tue, 26 Jun 2018 04:06:49 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5Q46nqw039423; Tue, 26 Jun 2018 04:06:49 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201806260406.w5Q46nqw039423@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Tue, 26 Jun 2018 04:06:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335654 - head/usr.sbin/config X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/usr.sbin/config X-SVN-Commit-Revision: 335654 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 04:06:50 -0000 Author: kevans Date: Tue Jun 26 04:06:49 2018 New Revision: 335654 URL: https://svnweb.freebsd.org/changeset/base/335654 Log: config(8): part of patch disappeared, don't close ifp at the end Modified: head/usr.sbin/config/mkmakefile.c Modified: head/usr.sbin/config/mkmakefile.c ============================================================================== --- head/usr.sbin/config/mkmakefile.c Tue Jun 26 04:02:25 2018 (r335653) +++ head/usr.sbin/config/mkmakefile.c Tue Jun 26 04:06:49 2018 (r335654) @@ -336,8 +336,6 @@ makeenv(void) } } fprintf(ofp, "\"\\0\"\n};\n"); - if (ifp) - fclose(ifp); fclose(ofp); moveifchanged(path("env.c.new"), path("env.c")); } From owner-svn-src-all@freebsd.org Tue Jun 26 05:21:29 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7793B100FB92; Tue, 26 Jun 2018 05:21:29 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0AD667FC44; Tue, 26 Jun 2018 05:21:28 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id E92241E46; Tue, 26 Jun 2018 05:21:27 +0000 (UTC) Date: Tue, 26 Jun 2018 05:21:27 +0000 From: Alexey Dokuchaev To: rgrimes@freebsd.org Cc: Roger Pau Monn?? , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r335629 - in head: share/man/man4 sys/dev/vt/hw/vga Message-ID: <20180626052127.GA19828@FreeBSD.org> References: <201806250939.w5P9dGMA067104@repo.freebsd.org> <201806251543.w5PFhp8g099163@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201806251543.w5PFhp8g099163@pdx.rh.CN85.dnsmgr.net> User-Agent: Mutt/1.9.5 (2018-04-13) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 05:21:29 -0000 On Mon, Jun 25, 2018 at 08:43:51AM -0700, Rodney W. Grimes wrote: > > New Revision: 335629 > > URL: https://svnweb.freebsd.org/changeset/base/335629 > > > > Log: > > vt: add option to ignore NO_VGA flag in ACPI > > > > To workaround buggy firmware that sets this flag when there's actually > > a VGA present. > > > > Reported and tested by: Yasuhiro KIMURA > > Sponsored by: Citrix Systems R&D > > Reviewed by: kib > > Differential revision: https://reviews.freebsd.org/D16003 > > It is generally best to avoid double negatives, > couldnt this of been better named? (hw.vga.acpi_force_vga) Yes please; I get constantly confused when calculating negatives and often get them wrong. ./danfe From owner-svn-src-all@freebsd.org Tue Jun 26 06:19:00 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A89B1012EB1; Tue, 26 Jun 2018 06:19:00 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C8D4881890; Tue, 26 Jun 2018 06:18:59 +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 9C8CF10795; Tue, 26 Jun 2018 06:18:59 +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 w5Q6Ixjs005817; Tue, 26 Jun 2018 06:18:59 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5Q6Ix2j005816; Tue, 26 Jun 2018 06:18:59 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201806260618.w5Q6Ix2j005816@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 26 Jun 2018 06:18:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335655 - head/sbin/fsck_msdosfs X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/sbin/fsck_msdosfs X-SVN-Commit-Revision: 335655 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 06:19:00 -0000 Author: delphij Date: Tue Jun 26 06:18:59 2018 New Revision: 335655 URL: https://svnweb.freebsd.org/changeset/base/335655 Log: Fix division by zero when reading boot block by postponing division until it is necessary and after we validated bytes per sector is non- zero. Obtained from: Android https://android-review.googlesource.com/c/platform/external/fsck_msdos/+/36362 MFC after: 2 weeks Modified: head/sbin/fsck_msdosfs/boot.c Modified: head/sbin/fsck_msdosfs/boot.c ============================================================================== --- head/sbin/fsck_msdosfs/boot.c Tue Jun 26 04:06:49 2018 (r335654) +++ head/sbin/fsck_msdosfs/boot.c Tue Jun 26 06:18:59 2018 (r335655) @@ -178,12 +178,8 @@ readboot(int dosfs, struct bootblock *boot) /* Check backup bpbFSInfo? XXX */ } - boot->ClusterOffset = (boot->bpbRootDirEnts * 32 + - boot->bpbBytesPerSec - 1) / boot->bpbBytesPerSec + - boot->bpbResSectors + boot->bpbFATs * boot->FATsecs - - CLUST_FIRST * boot->bpbSecPerClust; - - if (boot->bpbBytesPerSec % DOSBOOTBLOCKSIZE_REAL != 0) { + if (boot->bpbBytesPerSec % DOSBOOTBLOCKSIZE_REAL != 0 || + boot->bpbBytesPerSec == 0) { pfatal("Invalid sector size: %u", boot->bpbBytesPerSec); return FSFATAL; } @@ -196,6 +192,10 @@ readboot(int dosfs, struct bootblock *boot) boot->NumSectors = boot->bpbSectors; } else boot->NumSectors = boot->bpbHugeSectors; + boot->ClusterOffset = (boot->bpbRootDirEnts * 32 + + boot->bpbBytesPerSec - 1) / boot->bpbBytesPerSec + + boot->bpbResSectors + boot->bpbFATs * boot->FATsecs - + CLUST_FIRST * boot->bpbSecPerClust; boot->NumClusters = (boot->NumSectors - boot->ClusterOffset) / boot->bpbSecPerClust; From owner-svn-src-all@freebsd.org Tue Jun 26 07:11:01 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67F2310156ED; Tue, 26 Jun 2018 07:11:01 +0000 (UTC) (envelope-from royger@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1CF9F834E2; Tue, 26 Jun 2018 07:11:01 +0000 (UTC) (envelope-from royger@freebsd.org) Received: from localhost (94.red-83-39-197.dynamicip.rima-tde.net [83.39.197.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: royger) by smtp.freebsd.org (Postfix) with ESMTPSA id 7626712075; Tue, 26 Jun 2018 07:11:00 +0000 (UTC) (envelope-from royger@freebsd.org) Date: Tue, 26 Jun 2018 09:10:50 +0200 From: Roger Pau =?utf-8?B?TW9ubsOp?= To: Alexey Dokuchaev Cc: rgrimes@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r335629 - in head: share/man/man4 sys/dev/vt/hw/vga Message-ID: <20180626071050.cywzvicvddomiceh@mac.bytemobile.com> References: <201806250939.w5P9dGMA067104@repo.freebsd.org> <201806251543.w5PFhp8g099163@pdx.rh.CN85.dnsmgr.net> <20180626052127.GA19828@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180626052127.GA19828@FreeBSD.org> User-Agent: NeoMutt/20180512 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 07:11:01 -0000 On Tue, Jun 26, 2018 at 05:21:27AM +0000, Alexey Dokuchaev wrote: > On Mon, Jun 25, 2018 at 08:43:51AM -0700, Rodney W. Grimes wrote: > > > New Revision: 335629 > > > URL: https://svnweb.freebsd.org/changeset/base/335629 > > > > > > Log: > > > vt: add option to ignore NO_VGA flag in ACPI > > > > > > To workaround buggy firmware that sets this flag when there's actually > > > a VGA present. > > > > > > Reported and tested by: Yasuhiro KIMURA > > > Sponsored by: Citrix Systems R&D > > > Reviewed by: kib > > > Differential revision: https://reviews.freebsd.org/D16003 > > > > It is generally best to avoid double negatives, > > couldnt this of been better named? (hw.vga.acpi_force_vga) > > Yes please; I get constantly confused when calculating negatives and > often get them wrong. This is specifically done to workaround a firmware bug where some buggy firmwares set the NO_VGA flag in ACPI. So the option does exactly what the name says, it ignores the NO_VGA flag in ACPI. IMO acpi_force_vga is not as descriptive as the current name. Roger. From owner-svn-src-all@freebsd.org Tue Jun 26 08:31:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 85E29101964B; Tue, 26 Jun 2018 08:31:09 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 35F0585FB4; Tue, 26 Jun 2018 08:31:09 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 16E4B11D11; Tue, 26 Jun 2018 08:31:09 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5Q8V8b1074254; Tue, 26 Jun 2018 08:31:08 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5Q8V8jH074251; Tue, 26 Jun 2018 08:31:08 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806260831.w5Q8V8jH074251@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 26 Jun 2018 08:31:08 +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: r335656 - in stable/11/sys: dev/acpica kern sys X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/11/sys: dev/acpica kern sys X-SVN-Commit-Revision: 335656 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 08:31:09 -0000 Author: avg Date: Tue Jun 26 08:31:08 2018 New Revision: 335656 URL: https://svnweb.freebsd.org/changeset/base/335656 Log: MFC r333994: stop and restart kernel event timers in the suspend / resume cycle Modified: stable/11/sys/dev/acpica/acpi.c stable/11/sys/kern/kern_clocksource.c stable/11/sys/sys/systm.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/acpica/acpi.c ============================================================================== --- stable/11/sys/dev/acpica/acpi.c Tue Jun 26 06:18:59 2018 (r335655) +++ stable/11/sys/dev/acpica/acpi.c Tue Jun 26 08:31:08 2018 (r335656) @@ -2909,6 +2909,7 @@ acpi_EnterSleepState(struct acpi_softc *sc, int state) if (sc->acpi_sleep_delay > 0) DELAY(sc->acpi_sleep_delay * 1000000); + suspendclock(); intr = intr_disable(); if (state != ACPI_STATE_S1) { sleep_result = acpi_sleep_machdep(sc, state); @@ -2979,6 +2980,8 @@ acpi_EnterSleepState(struct acpi_softc *sc, int state) * process. This handles both the error and success cases. */ backout: + if (slp_state >= ACPI_SS_SLP_PREP) + resumeclock(); if (slp_state >= ACPI_SS_GPE_SET) { acpi_wake_prep_walk(state); sc->acpi_sstate = ACPI_STATE_S0; Modified: stable/11/sys/kern/kern_clocksource.c ============================================================================== --- stable/11/sys/kern/kern_clocksource.c Tue Jun 26 06:18:59 2018 (r335655) +++ stable/11/sys/kern/kern_clocksource.c Tue Jun 26 08:31:08 2018 (r335656) @@ -692,6 +692,22 @@ cpu_initclocks_ap(void) spinlock_exit(); } +void +suspendclock(void) +{ + ET_LOCK(); + configtimer(0); + ET_UNLOCK(); +} + +void +resumeclock(void) +{ + ET_LOCK(); + configtimer(1); + ET_UNLOCK(); +} + /* * Switch to profiling clock rates. */ Modified: stable/11/sys/sys/systm.h ============================================================================== --- stable/11/sys/sys/systm.h Tue Jun 26 06:18:59 2018 (r335655) +++ stable/11/sys/sys/systm.h Tue Jun 26 08:31:08 2018 (r335656) @@ -318,6 +318,8 @@ void startprofclock(struct proc *); void stopprofclock(struct proc *); void cpu_startprofclock(void); void cpu_stopprofclock(void); +void suspendclock(void); +void resumeclock(void); sbintime_t cpu_idleclock(void); void cpu_activeclock(void); void cpu_new_callout(int cpu, sbintime_t bt, sbintime_t bt_opt); From owner-svn-src-all@freebsd.org Tue Jun 26 08:36:00 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D393C10199D4; Tue, 26 Jun 2018 08:35:59 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 82A5586362; Tue, 26 Jun 2018 08:35:59 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 63C6311E70; Tue, 26 Jun 2018 08:35:59 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5Q8ZxDd075952; Tue, 26 Jun 2018 08:35:59 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5Q8Zw0j075948; Tue, 26 Jun 2018 08:35:58 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806260835.w5Q8Zw0j075948@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 26 Jun 2018 08:35:58 +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: r335657 - in stable/11/sys: amd64/include dev/acpica i386/include x86/x86 X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/11/sys: amd64/include dev/acpica i386/include x86/x86 X-SVN-Commit-Revision: 335657 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 08:36:00 -0000 Author: avg Date: Tue Jun 26 08:35:58 2018 New Revision: 335657 URL: https://svnweb.freebsd.org/changeset/base/335657 Log: MFC r334204,r334338: re-synchronize TSC-s on SMP systems after resume Modified: stable/11/sys/amd64/include/clock.h stable/11/sys/dev/acpica/acpi.c stable/11/sys/i386/include/clock.h stable/11/sys/x86/x86/tsc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/include/clock.h ============================================================================== --- stable/11/sys/amd64/include/clock.h Tue Jun 26 08:31:08 2018 (r335656) +++ stable/11/sys/amd64/include/clock.h Tue Jun 26 08:35:58 2018 (r335657) @@ -34,6 +34,7 @@ void clock_init(void); void startrtclock(void); void init_TSC(void); +void resume_TSC(void); #define HAS_TIMER_SPKR 1 int timer_spkr_acquire(void); Modified: stable/11/sys/dev/acpica/acpi.c ============================================================================== --- stable/11/sys/dev/acpica/acpi.c Tue Jun 26 08:31:08 2018 (r335656) +++ stable/11/sys/dev/acpica/acpi.c Tue Jun 26 08:35:58 2018 (r335657) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #if defined(__i386__) || defined(__amd64__) +#include #include #endif #include @@ -2991,6 +2992,10 @@ backout: if (slp_state >= ACPI_SS_SLP_PREP) AcpiLeaveSleepState(state); if (slp_state >= ACPI_SS_SLEPT) { +#if defined(__i386__) || defined(__amd64__) + /* NB: we are still using ACPI timecounter at this point. */ + resume_TSC(); +#endif acpi_resync_clock(sc); acpi_enable_fixed_events(sc); } Modified: stable/11/sys/i386/include/clock.h ============================================================================== --- stable/11/sys/i386/include/clock.h Tue Jun 26 08:31:08 2018 (r335656) +++ stable/11/sys/i386/include/clock.h Tue Jun 26 08:35:58 2018 (r335657) @@ -32,6 +32,7 @@ void clock_init(void); void startrtclock(void); void timer_restore(void); void init_TSC(void); +void resume_TSC(void); #define HAS_TIMER_SPKR 1 int timer_spkr_acquire(void); Modified: stable/11/sys/x86/x86/tsc.c ============================================================================== --- stable/11/sys/x86/x86/tsc.c Tue Jun 26 08:31:08 2018 (r335656) +++ stable/11/sys/x86/x86/tsc.c Tue Jun 26 08:35:58 2018 (r335657) @@ -450,7 +450,7 @@ adj_smp_tsc(void *arg) } static int -test_tsc(void) +test_tsc(int adj_max_count) { uint64_t *data, *tsc; u_int i, size, adj; @@ -466,7 +466,7 @@ retry: smp_tsc = 1; /* XXX */ smp_rendezvous(smp_no_rendezvous_barrier, comp_smp_tsc, smp_no_rendezvous_barrier, data); - if (!smp_tsc && adj < smp_tsc_adjust) { + if (!smp_tsc && adj < adj_max_count) { adj++; smp_rendezvous(smp_no_rendezvous_barrier, adj_smp_tsc, smp_no_rendezvous_barrier, data); @@ -504,19 +504,6 @@ retry: #undef N -#else - -/* - * The function is not called, it is provided to avoid linking failure - * on uniprocessor kernel. - */ -static int -test_tsc(void) -{ - - return (0); -} - #endif /* SMP */ static void @@ -577,9 +564,12 @@ init_TSC_tc(void) * non-zero value. The TSC seems unreliable in virtualized SMP * environments, so it is set to a negative quality in those cases. */ +#ifdef SMP if (mp_ncpus > 1) - tsc_timecounter.tc_quality = test_tsc(); - else if (tsc_is_invariant) + tsc_timecounter.tc_quality = test_tsc(smp_tsc_adjust); + else +#endif /* SMP */ + if (tsc_is_invariant) tsc_timecounter.tc_quality = 1000; max_freq >>= tsc_shift; @@ -613,6 +603,32 @@ init: } } SYSINIT(tsc_tc, SI_SUB_SMP, SI_ORDER_ANY, init_TSC_tc, NULL); + +void +resume_TSC(void) +{ +#ifdef SMP + int quality; + + /* If TSC was not good on boot, it is unlikely to become good now. */ + if (tsc_timecounter.tc_quality < 0) + return; + /* Nothing to do with UP. */ + if (mp_ncpus < 2) + return; + + /* + * If TSC was good, a single synchronization should be enough, + * but honour smp_tsc_adjust if it's set. + */ + quality = test_tsc(MAX(smp_tsc_adjust, 1)); + if (quality != tsc_timecounter.tc_quality) { + printf("TSC timecounter quality changed: %d -> %d\n", + tsc_timecounter.tc_quality, quality); + tsc_timecounter.tc_quality = quality; + } +#endif /* SMP */ +} /* * When cpufreq levels change, find out about the (new) max frequency. We From owner-svn-src-all@freebsd.org Tue Jun 26 08:56:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A8C2101C9AB; Tue, 26 Jun 2018 08:56:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 38560875E1; Tue, 26 Jun 2018 08:56:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1564E121A9; Tue, 26 Jun 2018 08:56:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5Q8uYhh086338; Tue, 26 Jun 2018 08:56:34 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5Q8uY5k086337; Tue, 26 Jun 2018 08:56:34 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806260856.w5Q8uY5k086337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 26 Jun 2018 08:56:34 +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: r335658 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 335658 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 08:56:35 -0000 Author: avg Date: Tue Jun 26 08:56:34 2018 New Revision: 335658 URL: https://svnweb.freebsd.org/changeset/base/335658 Log: MFC r333268: for bus suspend, detach and shutdown iterate children in reverse order Modified: stable/11/sys/kern/subr_bus.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/subr_bus.c ============================================================================== --- stable/11/sys/kern/subr_bus.c Tue Jun 26 08:35:58 2018 (r335657) +++ stable/11/sys/kern/subr_bus.c Tue Jun 26 08:56:34 2018 (r335658) @@ -3697,7 +3697,11 @@ bus_generic_detach(device_t dev) if (dev->state != DS_ATTACHED) return (EBUSY); - TAILQ_FOREACH(child, &dev->children, link) { + /* + * Detach children in the reverse order. + * See bus_generic_suspend for details. + */ + TAILQ_FOREACH_REVERSE(child, &dev->children, device_list, link) { if ((error = device_detach(child)) != 0) return (error); } @@ -3717,7 +3721,11 @@ bus_generic_shutdown(device_t dev) { device_t child; - TAILQ_FOREACH(child, &dev->children, link) { + /* + * Shut down children in the reverse order. + * See bus_generic_suspend for details. + */ + TAILQ_FOREACH_REVERSE(child, &dev->children, device_list, link) { device_shutdown(child); } @@ -3770,15 +3778,23 @@ int bus_generic_suspend(device_t dev) { int error; - device_t child, child2; + device_t child; - TAILQ_FOREACH(child, &dev->children, link) { + /* + * Suspend children in the reverse order. + * For most buses all children are equal, so the order does not matter. + * Other buses, such as acpi, carefully order their child devices to + * express implicit dependencies between them. For such buses it is + * safer to bring down devices in the reverse order. + */ + TAILQ_FOREACH_REVERSE(child, &dev->children, device_list, link) { error = BUS_SUSPEND_CHILD(dev, child); - if (error) { - for (child2 = TAILQ_FIRST(&dev->children); - child2 && child2 != child; - child2 = TAILQ_NEXT(child2, link)) - BUS_RESUME_CHILD(dev, child2); + if (error != 0) { + child = TAILQ_NEXT(child, link); + if (child != NULL) { + TAILQ_FOREACH_FROM(child, &dev->children, link) + BUS_RESUME_CHILD(dev, child); + } return (error); } } From owner-svn-src-all@freebsd.org Tue Jun 26 09:04:26 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC87A101D0CE; Tue, 26 Jun 2018 09:04:25 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8E16388493; Tue, 26 Jun 2018 09:04:25 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6EC0412338; Tue, 26 Jun 2018 09:04:25 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5Q94PHN091334; Tue, 26 Jun 2018 09:04:25 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5Q94OLa091330; Tue, 26 Jun 2018 09:04:24 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201806260904.w5Q94OLa091330@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 26 Jun 2018 09:04: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: r335659 - in stable/11/sys: dev/uart kern sys x86/acpica X-SVN-Group: stable-11 X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in stable/11/sys: dev/uart kern sys x86/acpica X-SVN-Commit-Revision: 335659 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 09:04:26 -0000 Author: avg Date: Tue Jun 26 09:04:24 2018 New Revision: 335659 URL: https://svnweb.freebsd.org/changeset/base/335659 Log: MFC r334340: add support for console resuming, implement it for uart, use on x86 Modified: stable/11/sys/dev/uart/uart_tty.c stable/11/sys/kern/kern_cons.c stable/11/sys/sys/cons.h stable/11/sys/x86/acpica/acpi_wakeup.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/uart/uart_tty.c ============================================================================== --- stable/11/sys/dev/uart/uart_tty.c Tue Jun 26 08:56:34 2018 (r335658) +++ stable/11/sys/dev/uart/uart_tty.c Tue Jun 26 09:04:24 2018 (r335659) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); static cn_probe_t uart_cnprobe; static cn_init_t uart_cninit; +static cn_init_t uart_cnresume; static cn_term_t uart_cnterm; static cn_getc_t uart_cngetc; static cn_putc_t uart_cnputc; @@ -67,7 +68,10 @@ static tsw_modem_t uart_tty_modem; static tsw_free_t uart_tty_free; static tsw_busy_t uart_tty_busy; -CONSOLE_DRIVER(uart); +CONSOLE_DRIVER( + uart, + .cn_resume = uart_cnresume, +); static struct uart_devinfo uart_console; @@ -110,6 +114,13 @@ uart_cninit(struct consdev *cp) di->type = UART_DEV_CONSOLE; uart_add_sysdev(di); uart_init(di); +} + +static void +uart_cnresume(struct consdev *cp) +{ + + uart_init(cp->cn_arg); } static void Modified: stable/11/sys/kern/kern_cons.c ============================================================================== --- stable/11/sys/kern/kern_cons.c Tue Jun 26 08:56:34 2018 (r335658) +++ stable/11/sys/kern/kern_cons.c Tue Jun 26 09:04:24 2018 (r335659) @@ -382,6 +382,19 @@ cnungrab() } } +void +cnresume() +{ + struct cn_device *cnd; + struct consdev *cn; + + STAILQ_FOREACH(cnd, &cn_devlist, cnd_next) { + cn = cnd->cnd_cn; + if (cn->cn_ops->cn_resume != NULL) + cn->cn_ops->cn_resume(cn); + } +} + /* * Low level console routines. */ Modified: stable/11/sys/sys/cons.h ============================================================================== --- stable/11/sys/sys/cons.h Tue Jun 26 08:56:34 2018 (r335658) +++ stable/11/sys/sys/cons.h Tue Jun 26 09:04:24 2018 (r335659) @@ -64,6 +64,8 @@ struct consdev_ops { /* grab console for exclusive kernel use */ cn_ungrab_t *cn_ungrab; /* ungrab console */ + cn_init_t *cn_resume; + /* set up console after sleep, optional */ }; struct consdev { @@ -103,8 +105,9 @@ extern struct tty *constty; /* Temporary virtual conso }; \ DATA_SET(cons_set, name) -#define CONSOLE_DRIVER(name) \ +#define CONSOLE_DRIVER(name, ...) \ static const struct consdev_ops name##_consdev_ops = { \ + /* Mandatory methods. */ \ .cn_probe = name##_cnprobe, \ .cn_init = name##_cninit, \ .cn_term = name##_cnterm, \ @@ -112,6 +115,8 @@ extern struct tty *constty; /* Temporary virtual conso .cn_putc = name##_cnputc, \ .cn_grab = name##_cngrab, \ .cn_ungrab = name##_cnungrab, \ + /* Optional fields. */ \ + __VA_ARGS__ \ }; \ CONSOLE_DEVICE(name##_consdev, name##_consdev_ops, NULL) @@ -124,6 +129,7 @@ void cnremove(struct consdev *); void cnselect(struct consdev *); void cngrab(void); void cnungrab(void); +void cnresume(void); int cncheckc(void); int cngetc(void); void cngets(char *, size_t, int); Modified: stable/11/sys/x86/acpica/acpi_wakeup.c ============================================================================== --- stable/11/sys/x86/acpica/acpi_wakeup.c Tue Jun 26 08:56:34 2018 (r335658) +++ stable/11/sys/x86/acpica/acpi_wakeup.c Tue Jun 26 09:04:24 2018 (r335659) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -265,6 +266,12 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state) for (;;) ia32_pause(); } else { + /* + * Re-initialize console hardware as soon as possibe. + * No console output (e.g. printf) is allowed before + * this point. + */ + cnresume(); #ifdef __amd64__ fpuresume(susppcbs[0]->sp_fpususpend); #else From owner-svn-src-all@freebsd.org Tue Jun 26 09:12:10 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAA0A101D668 for ; Tue, 26 Jun 2018 09:12:09 +0000 (UTC) (envelope-from pdk@semihalf.com) Received: from mail-it0-x242.google.com (mail-it0-x242.google.com [IPv6:2607:f8b0:4001:c0b::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8755B88B0B for ; Tue, 26 Jun 2018 09:12:09 +0000 (UTC) (envelope-from pdk@semihalf.com) Received: by mail-it0-x242.google.com with SMTP id u4-v6so1245112itg.0 for ; Tue, 26 Jun 2018 02:12:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=uB5ehacNo3impMcvOCnrwQg8p1EkX6VNcvMSXWUUxUk=; b=OMpPH9pctBNIN555XykVT+nExX+Qe+JYPpRMA9daN1C0El3Ae/htRcSB9pYAqoaRQW 1cr/c1/T/YjeotyiN/EGbM9zm/CVPM941LYtLabq5IwNlxOVS/A0N8pzk9OB5knZnZWN KbuW15X9pi1Jd9pGyC5d84+22LvKRCmHWirQM5LiN6fPgsShPAJYziFSTp+/u0u5hinP AlTm8xYjEB1Iu1aBgAzHOexExo1TTetpPRQZkqfSROxW0JiRQQd/Oyyq7zaoSMKTwxm5 5Dq9EYKYKhf4GIHwGHWvE1ekitEGwbY7trUxVbFQ79vIPQa+PIHbVFyzdj6NeMpJhgjc KD4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=uB5ehacNo3impMcvOCnrwQg8p1EkX6VNcvMSXWUUxUk=; b=pqr0uUv++pPIQB0JnVmTBFsHQEVG6I+rnn/mebapHap+t+p3NbMXVeVL6nmT6hIC1s sn9QSK42cVpeSBAKKHMtimM32xqFwXFMDVqJgBqpsZMFhZrW0yfFR560sTZqgMcOMezX DvB+Suw0Ew6cXmLvLdAc9yiFVVE9jEiXtwmi8UAc3Fm2OH0jtiadlcvNeJLW67ETZo2K 0LZc50uHc7Xolj4U2rL4zhoGJWHpSv8dU439grHiM3nXdAKgEmy/H15NI9FWbyiPaEcq Ae0DX+KaKyJNRvfd7FwMBeYaZEUCGFw+OrL0xU/OeVBdqo9WW3r29S7CogCXGNgmUNtY C0Sg== X-Gm-Message-State: APt69E3RIxDsKoEzj4Buun34zC3Lo54JIjszM232cW/2fd5WPHmwYr/w Nov7ZwZ77LiJxqJa/2TaYyee6Wr2UUDE88gff3w3msphPpw= X-Google-Smtp-Source: AAOMgpdEgWNBfHFLFyY/2lUuHy9dQINi2pN14Alh6KaL3oVewokXtYRePWrIWkaj/5RNC/la16rhhoPojZEYNJixsQg= X-Received: by 2002:a24:78c9:: with SMTP id p192-v6mr783490itc.143.1530004328917; Tue, 26 Jun 2018 02:12:08 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:1545:0:0:0:0:0 with HTTP; Tue, 26 Jun 2018 02:12:06 -0700 (PDT) In-Reply-To: <89A0025A-1048-4A12-AF3C-BC3BD2B99B86@freebsd.org> References: <201805291352.w4TDqPur045848@repo.freebsd.org> <89A0025A-1048-4A12-AF3C-BC3BD2B99B86@freebsd.org> From: Patryk Duda Date: Tue, 26 Jun 2018 11:12:06 +0200 Message-ID: Subject: Re: svn commit: r334329 - head/sys/arm64/arm64 To: Andrew Turner Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 09:12:10 -0000 Could you provide some details about firmware? I would like to reproduce it on our ThunderX2. 2018-06-25 17:28 GMT+02:00 Andrew Turner : > I=E2=80=99ve not seen this on the ThunderX2 I have access to with the lat= est firmware. You=E2=80=99ll need to find out why the kernel is trying to a= ccess the memory, and where it is in the EFI memory map. > > Andrew > >> On 21 Jun 2018, at 13:41, Patryk Duda wrote: >> >> Hi, >> >> I'm trying to boot kernel on ThunderX2 but I've got following error: >> >> panic: efi_init: PA out of range, PA: 0xfafd0018 >> >> This error comes from PHYS_TO_DMAP macro. >> I can workaround this issue by disabling EFI Runtime Services in >> kernel config but it seems to be >> a problem with discontignous DMAP mapping. >> >> >> 2018-05-29 15:52 GMT+02:00 Andrew Turner : >>> Author: andrew >>> Date: Tue May 29 13:52:25 2018 >>> New Revision: 334329 >>> URL: https://svnweb.freebsd.org/changeset/base/334329 >>> >>> Log: >>> On ThunderX2 we need to be careful to only map the memory the firmware >>> lists in the EFI memory map. As such we need to reduce the mappings to >>> restrict them to not be the full 1G block. For now reduce this to a 2M >>> block, however this may be further restricted to be 4k page aligned as >>> other SoCs may require. >>> >>> This allows ThunderX2 to boot reliably to userspace without performing >>> any speculative memory accesses to invalid physical memory. >>> >>> This is a recommit of r334035 now that we can access the EFI Runtime d= ata >>> through the DMAP region. >>> >>> Tested by: tuexen >>> Sponsored by: DARPA, AFRL >>> >>> Modified: >>> head/sys/arm64/arm64/pmap.c >>> >>> Modified: head/sys/arm64/arm64/pmap.c >>> =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/arm64/arm64/pmap.c Tue May 29 13:43:16 2018 (r33432= 8) >>> +++ head/sys/arm64/arm64/pmap.c Tue May 29 13:52:25 2018 (r33432= 9) >>> @@ -590,33 +590,100 @@ pmap_early_vtophys(vm_offset_t l1pt, vm_offset_t= va) >>> return ((l2[l2_slot] & ~ATTR_MASK) + (va & L2_OFFSET)); >>> } >>> >>> -static void >>> -pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t min_pa, vm_paddr_t= max_pa) >>> +static vm_offset_t >>> +pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t min_pa, >>> + vm_offset_t freemempos) >>> { >>> + pt_entry_t *l2; >>> vm_offset_t va; >>> - vm_paddr_t pa; >>> - u_int l1_slot; >>> + vm_paddr_t l2_pa, pa; >>> + u_int l1_slot, l2_slot, prev_l1_slot; >>> int i; >>> >>> dmap_phys_base =3D min_pa & ~L1_OFFSET; >>> dmap_phys_max =3D 0; >>> dmap_max_addr =3D 0; >>> + l2 =3D NULL; >>> + prev_l1_slot =3D -1; >>> >>> +#define DMAP_TABLES ((DMAP_MAX_ADDRESS - DMAP_MIN_ADDRESS) = >> L0_SHIFT) >>> + memset(pagetable_dmap, 0, PAGE_SIZE * DMAP_TABLES); >>> + >>> for (i =3D 0; i < (physmap_idx * 2); i +=3D 2) { >>> - pa =3D physmap[i] & ~L1_OFFSET; >>> + pa =3D physmap[i] & ~L2_OFFSET; >>> va =3D pa - dmap_phys_base + DMAP_MIN_ADDRESS; >>> >>> - for (; va < DMAP_MAX_ADDRESS && pa < physmap[i + 1]; >>> + /* Create L2 mappings at the start of the region */ >>> + if ((pa & L1_OFFSET) !=3D 0) { >>> + l1_slot =3D ((va - DMAP_MIN_ADDRESS) >> L1_SHIF= T); >>> + if (l1_slot !=3D prev_l1_slot) { >>> + prev_l1_slot =3D l1_slot; >>> + l2 =3D (pt_entry_t *)freemempos; >>> + l2_pa =3D pmap_early_vtophys(kern_l1, >>> + (vm_offset_t)l2); >>> + freemempos +=3D PAGE_SIZE; >>> + >>> + pmap_load_store(&pagetable_dmap[l1_slot= ], >>> + (l2_pa & ~Ln_TABLE_MASK) | L1_TABLE= ); >>> + >>> + memset(l2, 0, PAGE_SIZE); >>> + } >>> + KASSERT(l2 !=3D NULL, >>> + ("pmap_bootstrap_dmap: NULL l2 map")); >>> + for (; va < DMAP_MAX_ADDRESS && pa < physmap[i = + 1]; >>> + pa +=3D L2_SIZE, va +=3D L2_SIZE) { >>> + /* >>> + * We are on a boundary, stop to >>> + * create a level 1 block >>> + */ >>> + if ((pa & L1_OFFSET) =3D=3D 0) >>> + break; >>> + >>> + l2_slot =3D pmap_l2_index(va); >>> + KASSERT(l2_slot !=3D 0, ("...")); >>> + pmap_load_store(&l2[l2_slot], >>> + (pa & ~L2_OFFSET) | ATTR_DEFAULT | = ATTR_XN | >>> + ATTR_IDX(CACHED_MEMORY) | L2_BLOCK)= ; >>> + } >>> + KASSERT(va =3D=3D (pa - dmap_phys_base + DMAP_M= IN_ADDRESS), >>> + ("...")); >>> + } >>> + >>> + for (; va < DMAP_MAX_ADDRESS && pa < physmap[i + 1] && >>> + (physmap[i + 1] - pa) >=3D L1_SIZE; >>> pa +=3D L1_SIZE, va +=3D L1_SIZE) { >>> l1_slot =3D ((va - DMAP_MIN_ADDRESS) >> L1_SHIFT= ); >>> - /* We already have an entry */ >>> - if (pagetable_dmap[l1_slot] !=3D 0) >>> - continue; >>> pmap_load_store(&pagetable_dmap[l1_slot], >>> (pa & ~L1_OFFSET) | ATTR_DEFAULT | ATTR_XN | >>> ATTR_IDX(CACHED_MEMORY) | L1_BLOCK); >>> } >>> >>> + /* Create L2 mappings at the end of the region */ >>> + if (pa < physmap[i + 1]) { >>> + l1_slot =3D ((va - DMAP_MIN_ADDRESS) >> L1_SHIF= T); >>> + if (l1_slot !=3D prev_l1_slot) { >>> + prev_l1_slot =3D l1_slot; >>> + l2 =3D (pt_entry_t *)freemempos; >>> + l2_pa =3D pmap_early_vtophys(kern_l1, >>> + (vm_offset_t)l2); >>> + freemempos +=3D PAGE_SIZE; >>> + >>> + pmap_load_store(&pagetable_dmap[l1_slot= ], >>> + (l2_pa & ~Ln_TABLE_MASK) | L1_TABLE= ); >>> + >>> + memset(l2, 0, PAGE_SIZE); >>> + } >>> + KASSERT(l2 !=3D NULL, >>> + ("pmap_bootstrap_dmap: NULL l2 map")); >>> + for (; va < DMAP_MAX_ADDRESS && pa < physmap[i = + 1]; >>> + pa +=3D L2_SIZE, va +=3D L2_SIZE) { >>> + l2_slot =3D pmap_l2_index(va); >>> + pmap_load_store(&l2[l2_slot], >>> + (pa & ~L2_OFFSET) | ATTR_DEFAULT | = ATTR_XN | >>> + ATTR_IDX(CACHED_MEMORY) | L2_BLOCK)= ; >>> + } >>> + } >>> + >>> if (pa > dmap_phys_max) { >>> dmap_phys_max =3D pa; >>> dmap_max_addr =3D va; >>> @@ -624,6 +691,8 @@ pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t= mi >>> } >>> >>> cpu_tlb_flushID(); >>> + >>> + return (freemempos); >>> } >>> >>> static vm_offset_t >>> @@ -729,8 +798,11 @@ pmap_bootstrap(vm_offset_t l0pt, vm_offset_t l1pt,= vm_ >>> max_pa =3D physmap[i + 1]; >>> } >>> >>> + freemempos =3D KERNBASE + kernlen; >>> + freemempos =3D roundup2(freemempos, PAGE_SIZE); >>> + >>> /* Create a direct map region early so we can use it for pa -> v= a */ >>> - pmap_bootstrap_dmap(l1pt, min_pa, max_pa); >>> + freemempos =3D pmap_bootstrap_dmap(l1pt, min_pa, freemempos); >>> >>> va =3D KERNBASE; >>> start_pa =3D pa =3D KERNBASE - kern_delta; >>> @@ -762,8 +834,6 @@ pmap_bootstrap(vm_offset_t l0pt, vm_offset_t l1pt, = vm_ >>> >>> va =3D roundup2(va, L1_SIZE); >>> >>> - freemempos =3D KERNBASE + kernlen; >>> - freemempos =3D roundup2(freemempos, PAGE_SIZE); >>> /* Create the l2 tables up to VM_MAX_KERNEL_ADDRESS */ >>> freemempos =3D pmap_bootstrap_l2(l1pt, va, freemempos); >>> /* And the l3 tables for the early devmap */ >>> _______________________________________________ >>> svn-src-all@freebsd.org mailing list >>> https://lists.freebsd.org/mailman/listinfo/svn-src-all >>> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" >> > From owner-svn-src-all@freebsd.org Tue Jun 26 09:30:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A16A4101E003; Tue, 26 Jun 2018 09:30:15 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FB8289342; Tue, 26 Jun 2018 09:30:15 +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 3198912682; Tue, 26 Jun 2018 09:30:15 +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 w5Q9UFOZ002160; Tue, 26 Jun 2018 09:30:15 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5Q9UF3u002159; Tue, 26 Jun 2018 09:30:15 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201806260930.w5Q9UF3u002159@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 26 Jun 2018 09:30:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335660 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 335660 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 09:30:15 -0000 Author: markj Date: Tue Jun 26 09:30:14 2018 New Revision: 335660 URL: https://svnweb.freebsd.org/changeset/base/335660 Log: Add missing MLINK. MFC after: 3 days Modified: head/share/man/man9/Makefile Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Tue Jun 26 09:04:24 2018 (r335659) +++ head/share/man/man9/Makefile Tue Jun 26 09:30:14 2018 (r335660) @@ -453,6 +453,7 @@ MLINKS+=altq.9 ALTQ.9 MLINKS+=atomic.9 atomic_add.9 \ atomic.9 atomic_clear.9 \ atomic.9 atomic_cmpset.9 \ + atomic.9 atomic_fcmpset.9 \ atomic.9 atomic_fetchadd.9 \ atomic.9 atomic_load.9 \ atomic.9 atomic_readandclear.9 \ From owner-svn-src-all@freebsd.org Tue Jun 26 13:29:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5812102629D; Tue, 26 Jun 2018 13:29:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6AA697037E; Tue, 26 Jun 2018 13:29:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4BBD614D4B; Tue, 26 Jun 2018 13:29:50 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5QDTokO023755; Tue, 26 Jun 2018 13:29:50 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5QDTobM023754; Tue, 26 Jun 2018 13:29:50 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201806261329.w5QDTobM023754@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 26 Jun 2018 13:29:50 +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: r335661 - stable/11/release/doc/en_US.ISO8859-1/errata X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/release/doc/en_US.ISO8859-1/errata X-SVN-Commit-Revision: 335661 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 13:29:50 -0000 Author: gjb Date: Tue Jun 26 13:29:49 2018 New Revision: 335661 URL: https://svnweb.freebsd.org/changeset/base/335661 Log: Document an issue with emulators/virtualbox-ose reported in Bugzilla 228535. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Tue Jun 26 09:30:14 2018 (r335660) +++ stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Tue Jun 26 13:29:49 2018 (r335661) @@ -173,6 +173,23 @@ boot for more information and updates as the issue is investigated. + + + [2018-06-26] An issue had been discovered late in the + release cycle where a system crash could occur after + installing emulators/virtualbox-ose from + upstream package mirrors via &man.pkg.8;. + + Building emulators/virtualbox-ose from + the &man.ports.7; collection has been observed to work + around the crash. + + See PR 228535 + for more information. + From owner-svn-src-all@freebsd.org Tue Jun 26 13:53:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BAD641027D43; Tue, 26 Jun 2018 13:53:34 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6E8AA714CD; Tue, 26 Jun 2018 13:53:34 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4FB4B1524B; Tue, 26 Jun 2018 13:53:34 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5QDrYZu038544; Tue, 26 Jun 2018 13:53:34 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5QDrYhh038543; Tue, 26 Jun 2018 13:53:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201806261353.w5QDrYhh038543@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 26 Jun 2018 13:53:34 +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: r335662 - stable/11/release/doc/en_US.ISO8859-1/hardware X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/release/doc/en_US.ISO8859-1/hardware X-SVN-Commit-Revision: 335662 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 13:53:34 -0000 Author: gjb Date: Tue Jun 26 13:53:33 2018 New Revision: 335662 URL: https://svnweb.freebsd.org/changeset/base/335662 Log: Add a few missing drivers to the 11-STABLE hardware page. Submitted by: Grzegorz Junka list1 _@t_ gjunka.com Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Tue Jun 26 13:29:49 2018 (r335661) +++ stable/11/release/doc/en_US.ISO8859-1/hardware/article.xml Tue Jun 26 13:53:33 2018 (r335662) @@ -822,6 +822,8 @@ &hwlist.age; + &hwlist.alc; + &hwlist.ale; &hwlist.aue; @@ -855,6 +857,8 @@ &hwlist.cxgbe; + &hwlist.cxgbev; + &hwlist.dc; &hwlist.de; @@ -896,6 +900,8 @@ &hwlist.lge; + &hwlist.liquidio; + &hwlist.mlx4en; &hwlist.mlx5en; @@ -1094,6 +1100,8 @@ &hwlist.ctau; &hwlist.cm; + + &hwlist.mos; From owner-svn-src-all@freebsd.org Tue Jun 26 14:01:04 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D3C81027FC9; Tue, 26 Jun 2018 14:01:04 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0FAFD718AB; Tue, 26 Jun 2018 14:01:04 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E533D1528C; Tue, 26 Jun 2018 14:01:03 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5QE13fl039922; Tue, 26 Jun 2018 14:01:03 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5QE13n5039921; Tue, 26 Jun 2018 14:01:03 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201806261401.w5QE13n5039921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 26 Jun 2018 14:01: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: r335663 - stable/11/release/doc/en_US.ISO8859-1/errata X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/release/doc/en_US.ISO8859-1/errata X-SVN-Commit-Revision: 335663 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 14:01:04 -0000 Author: gjb Date: Tue Jun 26 14:01:03 2018 New Revision: 335663 URL: https://svnweb.freebsd.org/changeset/base/335663 Log: Document that a few device drivers were omitted from the 11.2 hardware page. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Tue Jun 26 13:53:33 2018 (r335662) +++ stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Tue Jun 26 14:01:03 2018 (r335663) @@ -190,6 +190,19 @@ boot xlink:href="https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228535">228535 for more information. + + + [2018-06-26] It was discovered after the releng/11.2 branch was tagged + for &os; 11.2-RELEASE that a few device drivers were + missing from the hardware + page. The missing drivers, &man.alc.4;, &man.cxgbev.4;, + &man.liquidio.4;, and &man.mos.4; were added to the + 11-STABLE hardware + page. + From owner-svn-src-all@freebsd.org Tue Jun 26 14:07:12 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6ABCF1028353; Tue, 26 Jun 2018 14:07:12 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2170471D13; Tue, 26 Jun 2018 14:07:12 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F2EDE153F3; Tue, 26 Jun 2018 14:07:11 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5QE7BS2044177; Tue, 26 Jun 2018 14:07:11 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5QE7B2Q044176; Tue, 26 Jun 2018 14:07:11 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201806261407.w5QE7B2Q044176@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Tue, 26 Jun 2018 14:07:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335664 - head/sys/dev/xen/netback X-SVN-Group: head X-SVN-Commit-Author: royger X-SVN-Commit-Paths: head/sys/dev/xen/netback X-SVN-Commit-Revision: 335664 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 14:07:12 -0000 Author: royger Date: Tue Jun 26 14:07:11 2018 New Revision: 335664 URL: https://svnweb.freebsd.org/changeset/base/335664 Log: xen-netback: fix LOR lock order reversal: (sleepable after non-sleepable) 1st 0xfffffe00357ff538 xnb_softc (xen netback softc lock) @ /usr/src/sys/dev/xen/netback/netback.c:1069 2nd 0xffffffff81fdccb0 intrsrc (intrsrc) @ /usr/src/sys/x86/x86/intr_machdep.c:224 There's no need to hold the lock since the cleaning of the interrupt cannot happen in parallel due to the XNBF_IN_SHUTDOWN flag being set. Note that the locking in netback needs some improvement or clarification. While there also remove a double newline. Sponsored by: Citrix Systems R&D Modified: head/sys/dev/xen/netback/netback.c Modified: head/sys/dev/xen/netback/netback.c ============================================================================== --- head/sys/dev/xen/netback/netback.c Tue Jun 26 14:01:03 2018 (r335663) +++ head/sys/dev/xen/netback/netback.c Tue Jun 26 14:07:11 2018 (r335664) @@ -662,6 +662,7 @@ xnb_disconnect(struct xnb_softc *xnb) mtx_lock(&xnb->rx_lock); mtx_unlock(&xnb->rx_lock); + mtx_lock(&xnb->sc_lock); /* Free malloc'd softc member variables */ if (xnb->bridge != NULL) { free(xnb->bridge, M_XENSTORE); @@ -689,6 +690,8 @@ xnb_disconnect(struct xnb_softc *xnb) sizeof(struct xnb_ring_config)); xnb->flags &= ~XNBF_RING_CONNECTED; + mtx_unlock(&xnb->sc_lock); + return (0); } @@ -1066,17 +1069,14 @@ xnb_shutdown(struct xnb_softc *xnb) if_free(xnb->xnb_ifp); xnb->xnb_ifp = NULL; } - mtx_lock(&xnb->sc_lock); xnb_disconnect(xnb); - mtx_unlock(&xnb->sc_lock); if (xenbus_get_state(xnb->dev) < XenbusStateClosing) xenbus_set_state(xnb->dev, XenbusStateClosing); mtx_lock(&xnb->sc_lock); xnb->flags &= ~XNBF_IN_SHUTDOWN; - /* Indicate to xnb_detach() that is it safe to proceed. */ wakeup(xnb); From owner-svn-src-all@freebsd.org Tue Jun 26 14:30:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2961F102909E; Tue, 26 Jun 2018 14:30:34 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D000E72C83; Tue, 26 Jun 2018 14:30:33 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B0F771571B; Tue, 26 Jun 2018 14:30:33 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5QEUXhu054317; Tue, 26 Jun 2018 14:30:33 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5QEUXLi054316; Tue, 26 Jun 2018 14:30:33 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201806261430.w5QEUXLi054316@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 26 Jun 2018 14:30:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335665 - head X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 335665 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 14:30:34 -0000 Author: gjb Date: Tue Jun 26 14:30:33 2018 New Revision: 335665 URL: https://svnweb.freebsd.org/changeset/base/335665 Log: Use the 'Updating from Source' Handbook section in UPDATING. PR: 229345 (related) Sponsored by: The FreeBSD Foundation Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Jun 26 14:07:11 2018 (r335664) +++ head/UPDATING Tue Jun 26 14:30:33 2018 (r335665) @@ -6,7 +6,7 @@ COMMON ITEMS: section later in the file. These instru basically know what you are doing. If not, then please consult the FreeBSD handbook: - https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/current-stable.html + https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. From owner-svn-src-all@freebsd.org Tue Jun 26 14:39:28 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D6509102950A; Tue, 26 Jun 2018 14:39:28 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 87FC5731C4; Tue, 26 Jun 2018 14:39:28 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 65360158BF; Tue, 26 Jun 2018 14:39:28 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5QEdS7u059508; Tue, 26 Jun 2018 14:39:28 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5QEdS9c059507; Tue, 26 Jun 2018 14:39:28 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201806261439.w5QEdS9c059507@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Tue, 26 Jun 2018 14:39:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335666 - head/sys/x86/xen X-SVN-Group: head X-SVN-Commit-Author: royger X-SVN-Commit-Paths: head/sys/x86/xen X-SVN-Commit-Revision: 335666 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 14:39:29 -0000 Author: royger Date: Tue Jun 26 14:39:27 2018 New Revision: 335666 URL: https://svnweb.freebsd.org/changeset/base/335666 Log: xen: limit the number of hypercall pages to 1 The interface already guarantees that the number of hypercall pages is always going to be 1, see the comment in interface/arch-x86/cpuid.h Sponsored by: Citrix Systems R&D Modified: head/sys/x86/xen/hvm.c Modified: head/sys/x86/xen/hvm.c ============================================================================== --- head/sys/x86/xen/hvm.c Tue Jun 26 14:30:33 2018 (r335665) +++ head/sys/x86/xen/hvm.c Tue Jun 26 14:39:27 2018 (r335666) @@ -124,7 +124,6 @@ static int xen_hvm_init_hypercall_stubs(enum xen_hvm_init_type init_type) { uint32_t base, regs[4]; - int i; if (xen_pv_domain()) { /* hypercall page is already set in the PV case */ @@ -167,9 +166,10 @@ xen_hvm_init_hypercall_stubs(enum xen_hvm_init_type in * Find the hypercall pages. */ do_cpuid(base + 2, regs); + if (regs[0] != 1) + return (EINVAL); - for (i = 0; i < regs[0]; i++) - wrmsr(regs[1], vtophys(&hypercall_page + i * PAGE_SIZE) + i); + wrmsr(regs[1], vtophys(&hypercall_page)); return (0); } From owner-svn-src-all@freebsd.org Tue Jun 26 14:48:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A7DD1029D7F; Tue, 26 Jun 2018 14:48:24 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0CA9C73A5D; Tue, 26 Jun 2018 14:48:24 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DF55A15A4E; Tue, 26 Jun 2018 14:48:23 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5QEmNp4064710; Tue, 26 Jun 2018 14:48:23 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5QEmNJN064709; Tue, 26 Jun 2018 14:48:23 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201806261448.w5QEmNJN064709@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 26 Jun 2018 14:48:23 +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: r335667 - stable/11/release/doc/en_US.ISO8859-1/errata X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/release/doc/en_US.ISO8859-1/errata X-SVN-Commit-Revision: 335667 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 14:48:24 -0000 Author: gjb Date: Tue Jun 26 14:48:23 2018 New Revision: 335667 URL: https://svnweb.freebsd.org/changeset/base/335667 Log: Add an errata note that the URL in UPDATING for source-based upgrades is incorrect. PR: 229345 Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Tue Jun 26 14:39:27 2018 (r335666) +++ stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Tue Jun 26 14:48:23 2018 (r335667) @@ -203,6 +203,14 @@ boot xlink:href="https://www.FreeBSD.org/relnotes/11-STABLE/hardware/support.html">hardware page. + + + [2018-06-26] The URL to the + instructions for source-based upgrades in + UPDATING incorrectly points to a page + that no longer exists. The correct URL is . + From owner-svn-src-all@freebsd.org Tue Jun 26 15:00:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4FD1A102A450; Tue, 26 Jun 2018 15:00:55 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 05C0874325; Tue, 26 Jun 2018 15:00:55 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DB07615C31; Tue, 26 Jun 2018 15:00:54 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5QF0sOh071234; Tue, 26 Jun 2018 15:00:54 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5QF0s1I071232; Tue, 26 Jun 2018 15:00:54 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201806261500.w5QF0s1I071232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Tue, 26 Jun 2018 15:00:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335668 - head/sys/x86/xen X-SVN-Group: head X-SVN-Commit-Author: royger X-SVN-Commit-Paths: head/sys/x86/xen X-SVN-Commit-Revision: 335668 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 15:00:55 -0000 Author: royger Date: Tue Jun 26 15:00:54 2018 New Revision: 335668 URL: https://svnweb.freebsd.org/changeset/base/335668 Log: xen: obtain vCPU ID from CPUID The Xen vCPU ID can be fetched from the cpuid instead of inferring it from the ACPI ID. Sponsored by: Citrix Systems R&D Modified: head/sys/x86/xen/hvm.c Modified: head/sys/x86/xen/hvm.c ============================================================================== --- head/sys/x86/xen/hvm.c Tue Jun 26 14:48:23 2018 (r335667) +++ head/sys/x86/xen/hvm.c Tue Jun 26 15:00:54 2018 (r335668) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -103,6 +104,9 @@ TUNABLE_INT("hw.xen.disable_pv_disks", &xen_disable_pv TUNABLE_INT("hw.xen.disable_pv_nics", &xen_disable_pv_nics); /*---------------------- XEN Hypervisor Probe and Setup ----------------------*/ + +static uint32_t cpuid_base; + static uint32_t xen_hvm_cpuid_base(void) { @@ -123,21 +127,21 @@ xen_hvm_cpuid_base(void) static int xen_hvm_init_hypercall_stubs(enum xen_hvm_init_type init_type) { - uint32_t base, regs[4]; + uint32_t regs[4]; if (xen_pv_domain()) { /* hypercall page is already set in the PV case */ return (0); } - base = xen_hvm_cpuid_base(); - if (base == 0) + cpuid_base = xen_hvm_cpuid_base(); + if (cpuid_base == 0) return (ENXIO); if (init_type == XEN_HVM_INIT_COLD) { int major, minor; - do_cpuid(base + 1, regs); + do_cpuid(cpuid_base + 1, regs); major = regs[0] >> 16; minor = regs[0] & 0xffff; @@ -165,7 +169,7 @@ xen_hvm_init_hypercall_stubs(enum xen_hvm_init_type in /* * Find the hypercall pages. */ - do_cpuid(base + 2, regs); + do_cpuid(cpuid_base + 2, regs); if (regs[0] != 1) return (EINVAL); @@ -371,31 +375,14 @@ xen_hvm_sysinit(void *arg __unused) { xen_hvm_init(XEN_HVM_INIT_COLD); } +SYSINIT(xen_hvm_init, SI_SUB_HYPERVISOR, SI_ORDER_FIRST, xen_hvm_sysinit, NULL); static void -xen_set_vcpu_id(void) -{ - struct pcpu *pc; - int i; - - if (!xen_hvm_domain()) - return; - - /* Set vcpu_id to acpi_id */ - CPU_FOREACH(i) { - pc = pcpu_find(i); - pc->pc_vcpu_id = pc->pc_acpi_id; - if (bootverbose) - printf("XEN: CPU %u has VCPU ID %u\n", - i, pc->pc_vcpu_id); - } -} - -static void xen_hvm_cpu_init(void) { struct vcpu_register_vcpu_info info; struct vcpu_info *vcpu_info; + uint32_t regs[4]; int cpu, rc; if (!xen_domain()) @@ -410,6 +397,22 @@ xen_hvm_cpu_init(void) return; } + /* + * Set vCPU ID. If available fetch the ID from CPUID, if not just use + * the ACPI ID. + */ + KASSERT(cpuid_base != 0, ("Invalid base Xen CPUID leaf")); + cpuid_count(cpuid_base + 4, 0, regs); + PCPU_SET(vcpu_id, (regs[0] & XEN_HVM_CPUID_VCPU_ID_PRESENT) ? + regs[1] : PCPU_GET(acpi_id)); + + /* + * Set the vCPU info. + * + * NB: the vCPU info for vCPUs < 32 can be fetched from the shared info + * page, but in order to make sure the mapping code is correct always + * attempt to map the vCPU info at a custom place. + */ vcpu_info = DPCPU_PTR(vcpu_local_info); cpu = PCPU_GET(vcpu_id); info.mfn = vtophys(vcpu_info) >> PAGE_SHIFT; @@ -421,7 +424,4 @@ xen_hvm_cpu_init(void) else DPCPU_SET(vcpu_info, vcpu_info); } - -SYSINIT(xen_hvm_init, SI_SUB_HYPERVISOR, SI_ORDER_FIRST, xen_hvm_sysinit, NULL); SYSINIT(xen_hvm_cpu_init, SI_SUB_INTR, SI_ORDER_FIRST, xen_hvm_cpu_init, NULL); -SYSINIT(xen_set_vcpu_id, SI_SUB_CPU, SI_ORDER_ANY, xen_set_vcpu_id, NULL); From owner-svn-src-all@freebsd.org Tue Jun 26 15:55:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DDF3410000FA; Tue, 26 Jun 2018 15:55:32 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3289D764BB; Tue, 26 Jun 2018 15:55:32 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w5QFtULc003982; Tue, 26 Jun 2018 08:55:30 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w5QFtURn003981; Tue, 26 Jun 2018 08:55:30 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201806261555.w5QFtURn003981@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r335629 - in head: share/man/man4 sys/dev/vt/hw/vga In-Reply-To: <20180626071050.cywzvicvddomiceh@mac.bytemobile.com> To: "Roger Pau Monn?" Date: Tue, 26 Jun 2018 08:55:30 -0700 (PDT) CC: Alexey Dokuchaev , rgrimes@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@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-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 15:55:33 -0000 > On Tue, Jun 26, 2018 at 05:21:27AM +0000, Alexey Dokuchaev wrote: > > On Mon, Jun 25, 2018 at 08:43:51AM -0700, Rodney W. Grimes wrote: > > > > New Revision: 335629 > > > > URL: https://svnweb.freebsd.org/changeset/base/335629 > > > > > > > > Log: > > > > vt: add option to ignore NO_VGA flag in ACPI > > > > > > > > To workaround buggy firmware that sets this flag when there's actually > > > > a VGA present. > > > > > > > > Reported and tested by: Yasuhiro KIMURA > > > > Sponsored by: Citrix Systems R&D > > > > Reviewed by: kib > > > > Differential revision: https://reviews.freebsd.org/D16003 > > > > > > It is generally best to avoid double negatives, > > > couldnt this of been better named? (hw.vga.acpi_force_vga) > > > > Yes please; I get constantly confused when calculating negatives and > > often get them wrong. > > This is specifically done to workaround a firmware bug where some > buggy firmwares set the NO_VGA flag in ACPI. We are not conflicted about working around the buggy ACPI. > So the option does > exactly what the name says, it ignores the NO_VGA flag in ACPI. IMO > acpi_force_vga is not as descriptive as the current name. Interestingly that is the text you use to describe it in the man page, so it seems as if it is good for the description, but not good for the name of the flag itself? .It Va hw.vga.acpi_ignore_no_vga Set to 1 to force the usage of the VGA driver regardless of whether ACPI IAPC_BOOT_ARCH signals no VGA support. Can be used to workaround firmware bugs in the ACPI tables. This does not mention the ACPI table entry being over ridden, if (flags & ACPI_FADT_NO_VGA) Further digging I believe you have placed this in the wrong part of the hierarchy. You put it in hw.vga, and it really should be in hw.acpi. Maybe hw.acpi.bootflags.ignore.no_vga. Are there any other bootflags we may want to ignore? Regards, -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Tue Jun 26 16:00:17 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B02FF1000363; Tue, 26 Jun 2018 16:00:17 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 61231766F5; Tue, 26 Jun 2018 16:00:17 +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 3D97B165EF; Tue, 26 Jun 2018 16:00:17 +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 w5QG0Hu6002004; Tue, 26 Jun 2018 16:00:17 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5QG0Him002003; Tue, 26 Jun 2018 16:00:17 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806261600.w5QG0Him002003@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 26 Jun 2018 16:00:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335669 - head/lib/libusb X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/lib/libusb X-SVN-Commit-Revision: 335669 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 16:00:17 -0000 Author: hselasky Date: Tue Jun 26 16:00:16 2018 New Revision: 335669 URL: https://svnweb.freebsd.org/changeset/base/335669 Log: Improve the userspace USB string reading function in LibUSB. Some USB devices does not allow a partial descriptor readout. Found by: bz @ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/lib/libusb/libusb20.c Modified: head/lib/libusb/libusb20.c ============================================================================== --- head/lib/libusb/libusb20.c Tue Jun 26 15:00:54 2018 (r335668) +++ head/lib/libusb/libusb20.c Tue Jun 26 16:00:16 2018 (r335669) @@ -814,6 +814,7 @@ libusb20_dev_req_string_sync(struct libusb20_device *p { struct LIBUSB20_CONTROL_SETUP_DECODED req; int error; + int flags; /* make sure memory is initialised */ memset(ptr, 0, len); @@ -840,22 +841,24 @@ libusb20_dev_req_string_sync(struct libusb20_device *p error = libusb20_dev_request_sync(pdev, &req, ptr, NULL, 1000, LIBUSB20_TRANSFER_SINGLE_SHORT_NOT_OK); if (error) { - return (error); + /* try to request full string */ + req.wLength = 255; + flags = 0; + } else { + /* extract length and request full string */ + req.wLength = *(uint8_t *)ptr; + flags = LIBUSB20_TRANSFER_SINGLE_SHORT_NOT_OK; } - req.wLength = *(uint8_t *)ptr; /* bytes */ if (req.wLength > len) { /* partial string read */ req.wLength = len; } - error = libusb20_dev_request_sync(pdev, &req, - ptr, NULL, 1000, LIBUSB20_TRANSFER_SINGLE_SHORT_NOT_OK); - - if (error) { + error = libusb20_dev_request_sync(pdev, &req, ptr, NULL, 1000, flags); + if (error) return (error); - } - if (((uint8_t *)ptr)[1] != LIBUSB20_DT_STRING) { + + if (((uint8_t *)ptr)[1] != LIBUSB20_DT_STRING) return (LIBUSB20_ERROR_OTHER); - } return (0); /* success */ } From owner-svn-src-all@freebsd.org Tue Jun 26 16:16:10 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38CE81000F0B; Tue, 26 Jun 2018 16:16:10 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DCBCB771C6; Tue, 26 Jun 2018 16:16:09 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BDE1D16914; Tue, 26 Jun 2018 16:16:09 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5QGG9WW012062; Tue, 26 Jun 2018 16:16:09 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5QGG9LT012061; Tue, 26 Jun 2018 16:16:09 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201806261616.w5QGG9LT012061@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 26 Jun 2018 16:16: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: r335670 - in stable: 10 11 X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable: 10 11 X-SVN-Commit-Revision: 335670 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 16:16:10 -0000 Author: gjb Date: Tue Jun 26 16:16:08 2018 New Revision: 335670 URL: https://svnweb.freebsd.org/changeset/base/335670 Log: MFC r325107, r335665: r325107 (eadler, partial): Update the updating URL in UPDATING. r335665: Use the 'Updating from Source' Handbook section in UPDATING. PR: 229345 Submitted by: Niels Bakker Approved by: re (marius, insta-MFC) Sponsored by: The FreeBSD Foundation Modified: stable/11/UPDATING Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/UPDATING Directory Properties: stable/10/ (props changed) Modified: stable/11/UPDATING ============================================================================== --- stable/11/UPDATING Tue Jun 26 16:00:16 2018 (r335669) +++ stable/11/UPDATING Tue Jun 26 16:16:08 2018 (r335670) @@ -6,7 +6,7 @@ COMMON ITEMS: section later in the file. These instru basically know what you are doing. If not, then please consult the FreeBSD handbook: - https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/updating-src.html + https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. From owner-svn-src-all@freebsd.org Tue Jun 26 16:16:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D45481000F06; Tue, 26 Jun 2018 16:16:09 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 88FFF771C3; Tue, 26 Jun 2018 16:16:09 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 677A916913; Tue, 26 Jun 2018 16:16:09 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5QGG91V012056; Tue, 26 Jun 2018 16:16:09 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5QGG99r012055; Tue, 26 Jun 2018 16:16:09 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201806261616.w5QGG99r012055@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 26 Jun 2018 16:16:09 +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: r335670 - in stable: 10 11 X-SVN-Group: stable-10 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: in stable: 10 11 X-SVN-Commit-Revision: 335670 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 16:16:10 -0000 Author: gjb Date: Tue Jun 26 16:16:08 2018 New Revision: 335670 URL: https://svnweb.freebsd.org/changeset/base/335670 Log: MFC r325107, r335665: r325107 (eadler, partial): Update the updating URL in UPDATING. r335665: Use the 'Updating from Source' Handbook section in UPDATING. PR: 229345 Submitted by: Niels Bakker Approved by: re (marius, insta-MFC) Sponsored by: The FreeBSD Foundation Modified: stable/10/UPDATING Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/UPDATING Directory Properties: stable/11/ (props changed) Modified: stable/10/UPDATING ============================================================================== --- stable/10/UPDATING Tue Jun 26 16:00:16 2018 (r335669) +++ stable/10/UPDATING Tue Jun 26 16:16:08 2018 (r335670) @@ -6,7 +6,7 @@ COMMON ITEMS: section later in the file. These instru basically know what you are doing. If not, then please consult the FreeBSD handbook: - https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/updating-src.html + https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before running portupgrade. From owner-svn-src-all@freebsd.org Tue Jun 26 16:18:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A779410010D0 for ; Tue, 26 Jun 2018 16:18:48 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (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 2BBE877499 for ; Tue, 26 Jun 2018 16:18:48 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: 9658fb4f-795c-11e8-b829-b3adae557cda X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id 9658fb4f-795c-11e8-b829-b3adae557cda; Tue, 26 Jun 2018 16:18:40 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w5QGIdX9099056; Tue, 26 Jun 2018 10:18:39 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1530029919.24573.74.camel@freebsd.org> Subject: Re: svn commit: r335629 - in head: share/man/man4 sys/dev/vt/hw/vga From: Ian Lepore To: rgrimes@freebsd.org, Roger Pau Monn? Cc: Alexey Dokuchaev , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Date: Tue, 26 Jun 2018 10:18:39 -0600 In-Reply-To: <201806261555.w5QFtURn003981@pdx.rh.CN85.dnsmgr.net> References: <201806261555.w5QFtURn003981@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 16:18:48 -0000 On Tue, 2018-06-26 at 08:55 -0700, Rodney W. Grimes wrote: > > > > On Tue, Jun 26, 2018 at 05:21:27AM +0000, Alexey Dokuchaev wrote: > > > > > > On Mon, Jun 25, 2018 at 08:43:51AM -0700, Rodney W. Grimes wrote: > > > > > > > > > > > > > > New Revision: 335629 > > > > > URL: https://svnweb.freebsd.org/changeset/base/335629 > > > > > > > > > > Log: > > > > >   vt: add option to ignore NO_VGA flag in ACPI > > > > >    > > > > >   To workaround buggy firmware that sets this flag when > > > > > there's actually > > > > >   a VGA present. > > > > >    > > > > >   Reported and tested by: Yasuhiro KIMURA > > > > e.org> > > > > >   Sponsored by: Citrix Systems R&D > > > > >   Reviewed by: kib > > > > >   Differential revision: https://reviews.freebsd.org/D > > > > > 16003 > > > > It is generally best to avoid double negatives, > > > > couldnt this of been better named? (hw.vga.acpi_force_vga) > > > Yes please; I get constantly confused when calculating negatives > > > and > > > often get them wrong. > > This is specifically done to workaround a firmware bug where some > > buggy firmwares set the NO_VGA flag in ACPI. > We are not conflicted about working around the buggy ACPI. > > > > > So the option does > > exactly what the name says, it ignores the NO_VGA flag in ACPI. IMO > > acpi_force_vga is not as descriptive as the current name. > Interestingly that is the text you use to describe it in the man > page, so it seems as if it is good for the description, but not > good for the name of the flag itself? > > .It Va hw.vga.acpi_ignore_no_vga > Set to 1 to force the usage of the VGA driver regardless of whether > ACPI IAPC_BOOT_ARCH signals no VGA support. > Can be used to workaround firmware bugs in the ACPI tables. > > This does not mention the ACPI table entry being over ridden, > if (flags & ACPI_FADT_NO_VGA) > > Further digging I believe you have placed this in the wrong > part of the hierarchy.  You put it in hw.vga, and it really > should be in hw.acpi. > Maybe hw.acpi.bootflags.ignore.no_vga. > > Are there any other bootflags we may want to ignore? > > Regards, There is ACPI_FADT_NO_CMOS_RTC, with an associated tunable hw.atrtc.enabled (default is -1), which can be:   -1 - enabled unless acpi says ACPI_FADT_NO_CMOS_RTC    0 - unconditionally disabled    1 - unconditionally enabled The idea was that if RTC is provided by EFI runtime services, this flag would indicate that old-school CMOS RTC drivers should not be used.  But, predictably, it turns out there are bioses that set this flag even when booting in legacy non-efi mode, leading to a need to ignore the flag and force use of the old driver. -- Ian From owner-svn-src-all@freebsd.org Tue Jun 26 16:20:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CEE6E10011F5; Tue, 26 Jun 2018 16:20:20 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 787337763A; Tue, 26 Jun 2018 16:20:20 +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 4C39E1691A; Tue, 26 Jun 2018 16:20:20 +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 w5QGKJtJ012356; Tue, 26 Jun 2018 16:20:19 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5QGKJtr012355; Tue, 26 Jun 2018 16:20:19 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201806261620.w5QGKJtr012355@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 26 Jun 2018 16:20:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335671 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 335671 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 16:20:21 -0000 Author: cem Date: Tue Jun 26 16:20:19 2018 New Revision: 335671 URL: https://svnweb.freebsd.org/changeset/base/335671 Log: atomic.9: Add missing MLINK for testandclear, thread_fence routines Missed in r299912, r326982. X-MFC-With: r299912, r326982 Sponsored by: Dell EMC Isilon Modified: head/share/man/man9/Makefile Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Tue Jun 26 16:16:08 2018 (r335670) +++ head/share/man/man9/Makefile Tue Jun 26 16:20:19 2018 (r335671) @@ -461,7 +461,9 @@ MLINKS+=atomic.9 atomic_add.9 \ atomic.9 atomic_store.9 \ atomic.9 atomic_subtract.9 \ atomic.9 atomic_swap.9 \ - atomic.9 atomic_testandset.9 + atomic.9 atomic_testandclear.9 \ + atomic.9 atomic_testandset.9 \ + atomic.9 atomic_thread_fence.9 MLINKS+=bhnd.9 BHND_MATCH_BOARD_TYPE.9 \ bhnd.9 BHND_MATCH_BOARD_VENDOR.9 \ bhnd.9 BHND_MATCH_CHIP_ID.9 \ From owner-svn-src-all@freebsd.org Tue Jun 26 16:50:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1C8F10026BE; Tue, 26 Jun 2018 16:50:41 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A36327909B; Tue, 26 Jun 2018 16:50:41 +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 8608F16E10; Tue, 26 Jun 2018 16:50:41 +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 w5QGofNu030352; Tue, 26 Jun 2018 16:50:41 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5QGofgg030351; Tue, 26 Jun 2018 16:50:41 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201806261650.w5QGofgg030351@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 26 Jun 2018 16:50:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335672 - head/sys/modules X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/modules X-SVN-Commit-Revision: 335672 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 16:50:42 -0000 Author: emaste Date: Tue Jun 26 16:50:41 2018 New Revision: 335672 URL: https://svnweb.freebsd.org/changeset/base/335672 Log: Build linprocfs and linsysfs also on arm64 Sponsored by: Turing Robotic Industries Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Tue Jun 26 16:20:19 2018 (r335671) +++ head/sys/modules/Makefile Tue Jun 26 16:50:41 2018 (r335672) @@ -218,8 +218,6 @@ SUBDIR= \ libalias \ libiconv \ libmchain \ - ${_linprocfs} \ - ${_linsysfs} \ ${_linux} \ ${_linux_common} \ ${_linux64} \ @@ -493,6 +491,12 @@ SUBDIR+= iscsi SUBDIR+= iscsi_initiator .endif +.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} != "amd64" || \ + ${MACHINE_CPUARCH} == "i386" +SUBDIR+= linprocfs +SUBDIR+= linsysfs +.endif + .if ${MK_NAND} != "no" || defined(ALL_MODULES) _nandfs= nandfs _nandsim= nandsim @@ -607,8 +611,6 @@ _iser= iser .endif _ix= ix _ixv= ixv -_linprocfs= linprocfs -_linsysfs= linsysfs _linux= linux .if ${MK_SOURCELESS_UCODE} != "no" _lio= lio From owner-svn-src-all@freebsd.org Tue Jun 26 18:07:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A98A10079DB; Tue, 26 Jun 2018 18:07:18 +0000 (UTC) (envelope-from woodsb02@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3CC1B7BE72; Tue, 26 Jun 2018 18:07:18 +0000 (UTC) (envelope-from woodsb02@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1EED517ADD; Tue, 26 Jun 2018 18:07:18 +0000 (UTC) (envelope-from woodsb02@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5QI7I2p072093; Tue, 26 Jun 2018 18:07:18 GMT (envelope-from woodsb02@FreeBSD.org) Received: (from woodsb02@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5QI7Hod072088; Tue, 26 Jun 2018 18:07:17 GMT (envelope-from woodsb02@FreeBSD.org) Message-Id: <201806261807.w5QI7Hod072088@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: woodsb02 set sender to woodsb02@FreeBSD.org using -f From: Ben Woods Date: Tue, 26 Jun 2018 18:07:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335673 - in head: etc/defaults etc/rc.d lib/geom/eli share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: woodsb02 X-SVN-Commit-Paths: in head: etc/defaults etc/rc.d lib/geom/eli share/man/man5 X-SVN-Commit-Revision: 335673 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 18:07:18 -0000 Author: woodsb02 (ports committer) Date: Tue Jun 26 18:07:16 2018 New Revision: 335673 URL: https://svnweb.freebsd.org/changeset/base/335673 Log: geli attach multiple providers Allow attaching of multiple geli providers at once if they use same passphrase and keyfiles. This is helpful when the providers being attached are not used for boot, and therefore the existing code to first try the cached password when tasting the providers during boot does not apply. Multiple providers with the same passphrase and keyfiles can be attached at the same time during system start-up by adding the following to rc.conf: geli_groups="storage backup" geli_storage_flags="-k /etc/geli/storage.keys" geli_storage_devices="ada0 ada1" geli_backup_flags="-j /etc/geli/backup.passfile -k /etc/geli/backup.keys" geli_backup_devices="ada2 ada3" Reviewed by: wblock, delphij, jilles Approved by: sobomax (src), bcr (doc) Differential Revision: https://reviews.freebsd.org/D12644 Modified: head/etc/defaults/rc.conf head/etc/rc.d/geli head/lib/geom/eli/geli.8 head/lib/geom/eli/geom_eli.c head/share/man/man5/rc.conf.5 Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Tue Jun 26 16:50:41 2018 (r335672) +++ head/etc/defaults/rc.conf Tue Jun 26 18:07:16 2018 (r335673) @@ -79,6 +79,8 @@ gbde_lockdir="/etc" # Where to look for gbde lockfiles # GELI disk encryption configuration. geli_devices="" # List of devices to automatically attach in addition to # GELI devices listed in /etc/fstab. +geli_groups="" # List of groups containing devices to automatically + # attach with the same keyfiles and passphrase geli_tries="" # Number of times to attempt attaching geli device. # If empty, kern.geom.eli.tries will be used. geli_default_flags="" # Default flags for geli(8). @@ -90,6 +92,11 @@ geli_autodetach="YES" # Automatically detach on last c #geli_da1_flags="-p -k /etc/geli/da1.keys" #geli_da1_autodetach="NO" #geli_mirror_home_flags="-k /etc/geli/home.keys" +#geli_groups="storage backup" +#geli_storage_flags="-k /etc/geli/storage.keys" +#geli_storage_devices="ada0 ada1" +#geli_backup_flags="-j /etc/geli/backup.passfile -k /etc/geli/backup.keys" +#geli_backup_devices="ada2 ada3" root_rw_mount="YES" # Set to NO to inhibit remounting root read-write. root_hold_delay="30" # Time to wait for root mount hold release. Modified: head/etc/rc.d/geli ============================================================================== --- head/etc/rc.d/geli Tue Jun 26 16:50:41 2018 (r335672) +++ head/etc/rc.d/geli Tue Jun 26 18:07:16 2018 (r335673) @@ -34,7 +34,7 @@ name="geli" desc="GELI disk encryption" -start_precmd='[ -n "$(geli_make_list)" ]' +start_precmd='[ -n "$(geli_make_list)" -o -n "${geli_groups}" ]' start_cmd="geli_start" stop_cmd="geli_stop" required_modules="geom_eli:g_eli" @@ -72,11 +72,47 @@ geli_start() done fi done + + for group in ${geli_groups}; do + group_=`ltr ${group} '/-' '_'` + + eval "flags=\${geli_${group_}_flags}" + if [ -z "${flags}" ]; then + flags=${geli_default_flags} + fi + + eval "providers=\${geli_${group_}_devices}" + if [ -z "${providers}" ]; then + echo "No devices listed in geli group ${group}." + continue + fi + + if [ -e "/dev/${providers%% *}" -a ! -e "/dev/${providers%% *}.eli" ]; then + echo "Configuring Disk Encryption for geli group ${group}, containing ${providers}." + count=1 + while [ ${count} -le ${geli_tries} ]; do + geli attach ${flags} ${providers} + if [ -e "/dev/${providers%% *}.eli" ]; then + break + fi + echo "Attach failed; attempt ${count} of ${geli_tries}." + count=$((count+1)) + done + fi + done } geli_stop() { devices=`geli_make_list` + + for group in ${geli_groups}; do + group_=`ltr ${group} '/-' '_'` + + eval "providers=\${geli_${group_}_devices}" + + devices="${devices} ${providers}" + done for provider in ${devices}; do if [ -e "/dev/${provider}.eli" ]; then Modified: head/lib/geom/eli/geli.8 ============================================================================== --- head/lib/geom/eli/geli.8 Tue Jun 26 16:50:41 2018 (r335672) +++ head/lib/geom/eli/geli.8 Tue Jun 26 18:07:16 2018 (r335673) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 9, 2018 +.Dd June 27, 2018 .Dt GELI 8 .Os .Sh NAME @@ -71,7 +71,7 @@ utility: .Op Fl n Ar keyno .Op Fl j Ar passfile .Op Fl k Ar keyfile -.Ar prov +.Ar prov ... .Nm .Cm detach .Op Fl fl @@ -192,8 +192,7 @@ entered via prompt or read from one or more passfiles; one or more files. .It Allows encryption of the root partition. -The user will be asked for the -passphrase before the root file system is mounted. +The user is asked for the passphrase before the root filesystem is mounted. .It Strengthens the passphrase component of the User Key with: .Rs @@ -217,12 +216,12 @@ so that if a user has to quickly destroy key material, it is possible to get the data back by restoring keys from backup. .It -Providers can be configured to automatically detach on last close -(so users do not have to remember to detach providers after unmounting -the file systems). +Providers can be configured to automatically detach on last close, +so users do not have to remember to detach providers after unmounting +the filesystems. .It -Allows attaching a provider with a random, one-time Master Key - -useful for swap partitions and temporary file systems. +Allows attaching a provider with a random, one-time Master Key, +which is useful for swap partitions and temporary filesystems. .It Allows verification of data integrity (data authentication). .It @@ -380,17 +379,23 @@ This option is helpful when creating a provider that m versions. Consult the .Sx HISTORY -section to find which metadata version is supported by which FreeBSD version. +section to find which metadata version is supported by which +.Fx +version. Note that using an older version of metadata may limit the number of features available. .El .It Cm attach -Attach the given provider. -The encrypted Master Key will be loaded from the metadata and decrypted -using the given passphrase/keyfile and a new GEOM provider will be created -using the given provider's name with an +Attach the given providers. +The encrypted Master Keys are loaded from the metadata and decrypted +using the given passphrase/keyfile and new GEOM providers are created +using the specified provider names. +A .Qq .eli -suffix. +suffix is added to the user specified provider names. +Multiple providers can only be attached with a single +.Cm attach +command if they all have the same passphrase and keyfiles. .Pp Additional options include: .Bl -tag -width ".Fl j Ar passfile" @@ -398,11 +403,11 @@ Additional options include: Do a dry-run decryption. This is useful to verify passphrase and keyfile without decrypting the device. .It Fl d -If specified, a decrypted provider will be detached automatically on last close. -This can help with scarce memory so the user does not have to remember to detach the -provider after unmounting the file system. -It only works when the provider was opened for writing, so it will not work if -the file system on the provider is mounted read-only. +If specified, the decrypted providers are detached automatically on last close, +so the user does not have to remember to detach +providers after unmounting the filesystems. +This only works when providers were opened for writing, and will not work if +the filesystems on the providers were mounted read-only. Probably a better choice is the .Fl l option for the @@ -419,6 +424,7 @@ For more information see the description of the option for the .Cm init subcommand. +The same passfiles are used for all listed providers. .It Fl k Ar keyfile Specifies a file which contains the keyfile component of the User Key (or part of it). @@ -427,14 +433,15 @@ For more information see the description of the option for the .Cm init subcommand. +The same keyfiles are used for all listed providers. .It Fl p -Do not use a passphrase as a component of the User Key. +Do not use a passphrase as a component of the User Keys. Cannot be combined with the .Fl j option. .It Fl r -Attach read-only provider. -It will not be opened for writing. +Attach read-only providers. +They are not opened for writing. .El .It Cm detach Detach the given providers, which means remove the devfs entry @@ -445,14 +452,15 @@ Additional options include: .It Fl f Force detach - detach even if the provider is open. .It Fl l -Mark provider to detach on last close. +Mark provider to detach on last close, after the last filesystem has been +unmounted. If this option is specified, the provider will not be detached while it is open, but will be automatically detached when it is closed for the last time even if it was only opened for reading. .El .It Cm onetime Attach the given providers with a random, one-time (ephemeral) Master Key. -The command can be used to encrypt swap partitions or temporary file systems. +The command can be used to encrypt swap partitions or temporary filesystems. .Pp Additional options include: .Bl -tag -width ".Fl a Ar sectorsize" @@ -467,10 +475,10 @@ For more information, see the description of the .Cm init subcommand. .It Fl d -Detach on last close. -Note: this option is not usable for temporary file systems as the provider will -be detached after creating the file system on it. -It still can (and should be) used for swap partitions. +Detach on last close, after the last filesystem has been unmounted. +Note: this option is not usable for temporary filesystems as the provider is +detached after the filesystem has been created. +It still can, and should, be used for swap partitions. For more information, see the description of the .Cm attach subcommand. @@ -643,17 +651,17 @@ and .El .It Cm suspend Suspend device by waiting for all inflight requests to finish, clearing all -sensitive information (like the Master Key and Data Keys) from kernel memory, +sensitive information such as the Master Key and Data Keys from kernel memory, and blocking all further I/O requests until the .Cm resume subcommand is executed. -This functionality is useful for laptops: when one wants to suspend a -laptop, one does not want to leave an encrypted device attached. -Instead of closing all files and directories opened from a file system located -on an encrypted device, unmounting the file system, and detaching the device, -the +This functionality is useful for laptops. +Suspending a laptop should not leave an encrypted device attached. +The .Cm suspend -subcommand can be used. +subcommand can be used rather than closing all files and directories from +filesystems on the encrypted device, unmounting the filesystem, and +detaching the device. Any access to the encrypted device will be blocked until the Master Key is reloaded through the .Cm resume @@ -664,8 +672,8 @@ The subcommand does not work with devices created with the .Cm onetime subcommand. -Please note that sensitive data might still be present in memory after -suspending an encrypted device due to the file system cache, etc. +Please note that sensitive data might still be present in memory locations +such as the filesystem cache after suspending an encrypted device. .Pp Additional options include: .Bl -tag -width ".Fl a" @@ -678,23 +686,23 @@ devices. Resume previously suspended device. The caller must ensure that executing this subcommand does not access the suspended device, leading to a deadlock. -For example suspending a device which contains the file system where the +For example, suspending a device which contains the filesystem where the .Nm -utility is stored is bad idea. +utility is stored is a bad idea. .Pp Additional options include: .Bl -tag -width ".Fl j Ar passfile" .It Fl j Ar passfile -Specifies a file which contains the passphrase component of the User Key -(or part of it). +Specifies a file which contains the passphrase component of the User Key, +or part of it. For more information see the description of the .Fl J option for the .Cm init subcommand. .It Fl k Ar keyfile -Specifies a file which contains the keyfile component of the User Key -(or part of it). +Specifies a file which contains the keyfile component of the User Key, +or part of it. For more information see the description of the .Fl K option for the @@ -810,18 +818,17 @@ If set to 3, the maximum amount of debug information is printed. .It Va kern.geom.eli.tries : No 3 Number of times a user is asked for the passphrase. -This is only used for providers which are attached on boot -(before the root file system is mounted). +This is only used for providers which are attached on boot, +before the root filesystem is mounted. If set to 0, attaching providers on boot will be disabled. This variable should be set in .Pa /boot/loader.conf . .It Va kern.geom.eli.overwrites : No 5 -Specifies how many times the Master Key will be overwritten +Specifies how many times the Master Key is overwritten with random values when it is destroyed. After this operation it is filled with zeros. .It Va kern.geom.eli.visible_passphrase : No 0 -If set to 1, the passphrase entered on boot (before the root -file system is mounted) will be visible. +If set to 1, the passphrase entered on boot will be visible. This alternative should be used with caution as the entered passphrase can be logged and exposed via .Xr dmesg 8 . @@ -860,7 +867,7 @@ Exit status is 0 on success, and 1 if the command fail Initialize a provider which is going to be encrypted with a passphrase and random data from a file on the user's pen drive. Use 4kB sector size. -Attach the provider, create a file system, and mount it. +Attach the provider, create a filesystem, and mount it. Do the work. Unmount the provider and detach it: .Bd -literal -offset indent @@ -915,7 +922,7 @@ Encrypted swap partition setup: .Ed .Pp The example below shows how to configure two providers which will be attached -on boot (before the root file system is mounted). +on boot, before the root filesystem is mounted. One of them is using passphrase and three keyfile parts and the other is using only a keyfile in one part: .Bd -literal -offset indent @@ -993,7 +1000,7 @@ geli: Cannot read metadata from /dev/da0: Invalid argu Enter passphrase: .Ed .Pp -If an encrypted file system is extended, it is necessary to relocate and +If an encrypted filesystem is extended, it is necessary to relocate and update the metadata: .Bd -literal -offset indent # gpart create -s GPT ada0 Modified: head/lib/geom/eli/geom_eli.c ============================================================================== --- head/lib/geom/eli/geom_eli.c Tue Jun 26 16:50:41 2018 (r335672) +++ head/lib/geom/eli/geom_eli.c Tue Jun 26 18:07:16 2018 (r335673) @@ -62,7 +62,14 @@ uint32_t version = G_ELI_VERSION; #define GELI_BACKUP_DIR "/var/backups/" #define GELI_ENC_ALGO "aes" +#define BUFSIZE 1024 +/* + * Passphrase cached when attaching multiple providers, in order to be more + * user-friendly if they are using the same passphrase. + */ +static char cached_passphrase[BUFSIZE] = ""; + static void eli_main(struct gctl_req *req, unsigned flags); static void eli_init(struct gctl_req *req); static void eli_attach(struct gctl_req *req); @@ -86,7 +93,7 @@ static int eli_backup_create(struct gctl_req *req, con * * init [-bdgPTv] [-a aalgo] [-B backupfile] [-e ealgo] [-i iterations] [-l keylen] [-J newpassfile] [-K newkeyfile] [-s sectorsize] [-V version] prov * label - alias for 'init' - * attach [-Cdprv] [-n keyno] [-j passfile] [-k keyfile] prov + * attach [-Cdprv] [-n keyno] [-j passfile] [-k keyfile] prov ... * detach [-fl] prov ... * stop - alias for 'detach' * onetime [-d] [-a aalgo] [-e ealgo] [-l keylen] prov @@ -154,7 +161,7 @@ struct g_command class_commands[] = { { 'r', "readonly", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - "[-Cdprv] [-n keyno] [-j passfile] [-k keyfile] prov" + "[-Cdprv] [-n keyno] [-j passfile] [-k keyfile] prov ..." }, { "detach", 0, NULL, { @@ -275,8 +282,6 @@ struct g_command class_commands[] = { static int verbose = 0; -#define BUFSIZE 1024 - static int eli_protect(struct gctl_req *req) { @@ -411,7 +416,7 @@ eli_genkey_files(struct gctl_req *req, bool new, const passbufsize) { gctl_error(req, "Passphrase in %s too long.", file); - bzero(buf, sizeof(buf)); + explicit_bzero(buf, sizeof(buf)); return (-1); } if (p != NULL) @@ -421,7 +426,7 @@ eli_genkey_files(struct gctl_req *req, bool new, const error = errno; if (strcmp(file, "-") != 0) close(fd); - bzero(buf, sizeof(buf)); + explicit_bzero(buf, sizeof(buf)); if (done == -1) { gctl_error(req, "Cannot read %s %s: %s.", type, file, strerror(error)); @@ -442,7 +447,7 @@ eli_genkey_passphrase_prompt(struct gctl_req *req, boo new ? "Enter new passphrase: " : "Enter passphrase: ", passbuf, passbufsize, RPP_ECHO_OFF | RPP_REQUIRE_TTY); if (p == NULL) { - bzero(passbuf, passbufsize); + explicit_bzero(passbuf, passbufsize); gctl_error(req, "Cannot read passphrase: %s.", strerror(errno)); return (-1); @@ -455,7 +460,7 @@ eli_genkey_passphrase_prompt(struct gctl_req *req, boo tmpbuf, sizeof(tmpbuf), RPP_ECHO_OFF | RPP_REQUIRE_TTY); if (p == NULL) { - bzero(passbuf, passbufsize); + explicit_bzero(passbuf, passbufsize); gctl_error(req, "Cannot read passphrase: %s.", strerror(errno)); @@ -463,11 +468,11 @@ eli_genkey_passphrase_prompt(struct gctl_req *req, boo } if (strcmp(passbuf, tmpbuf) != 0) { - bzero(passbuf, passbufsize); + explicit_bzero(passbuf, passbufsize); fprintf(stderr, "They didn't match.\n"); continue; } - bzero(tmpbuf, sizeof(tmpbuf)); + explicit_bzero(tmpbuf, sizeof(tmpbuf)); } return (0); } @@ -482,6 +487,10 @@ eli_genkey_passphrase(struct gctl_req *req, struct g_e bool nopassphrase; int nfiles; + /* + * Return error if the 'do not use passphrase' flag was given but a + * passfile was provided. + */ nopassphrase = gctl_get_int(req, new ? "nonewpassphrase" : "nopassphrase"); if (nopassphrase) { @@ -494,20 +503,32 @@ eli_genkey_passphrase(struct gctl_req *req, struct g_e return (0); } + /* + * Return error if using a provider which does not require a passphrase + * but the 'do not use passphrase' flag was not given. + */ if (!new && md->md_iterations == -1) { gctl_error(req, "Missing -p flag."); return (-1); } passbuf[0] = '\0'; - nfiles = eli_genkey_files(req, new, "passfile", NULL, passbuf, - sizeof(passbuf)); - if (nfiles == -1) - return (-1); - else if (nfiles == 0) { - if (eli_genkey_passphrase_prompt(req, new, passbuf, - sizeof(passbuf)) == -1) { + + /* Use cached passphrase if defined. */ + if (strlen(cached_passphrase) > 0) { + strlcpy(passbuf, cached_passphrase, sizeof(passbuf)); + } else { + nfiles = eli_genkey_files(req, new, "passfile", NULL, passbuf, + sizeof(passbuf)); + if (nfiles == -1) { return (-1); + } else if (nfiles == 0) { + if (eli_genkey_passphrase_prompt(req, new, passbuf, + sizeof(passbuf)) == -1) { + return (-1); + } } + /* Cache the passphrase for other providers. */ + strlcpy(cached_passphrase, passbuf, sizeof(cached_passphrase)); } /* * Field md_iterations equal to -1 means "choose some sane @@ -537,9 +558,9 @@ eli_genkey_passphrase(struct gctl_req *req, struct g_e pkcs5v2_genkey(dkey, sizeof(dkey), md->md_salt, sizeof(md->md_salt), passbuf, md->md_iterations); g_eli_crypto_hmac_update(ctxp, dkey, sizeof(dkey)); - bzero(dkey, sizeof(dkey)); + explicit_bzero(dkey, sizeof(dkey)); } - bzero(passbuf, sizeof(passbuf)); + explicit_bzero(passbuf, sizeof(passbuf)); return (0); } @@ -645,13 +666,13 @@ eli_metadata_store(struct gctl_req *req, const char *p if (fd == -1) { gctl_error(req, "Cannot open %s: %s.", prov, strerror(errno)); - bzero(sector, sizeof(sector)); + explicit_bzero(sector, sizeof(sector)); return (-1); } if (write(fd, sector, sizeof(sector)) != sizeof(sector)) { gctl_error(req, "Cannot write metadata to %s: %s.", prov, strerror(errno)); - bzero(sector, sizeof(sector)); + explicit_bzero(sector, sizeof(sector)); close(fd); return (-1); } @@ -662,11 +683,11 @@ eli_metadata_store(struct gctl_req *req, const char *p if (error != 0) { gctl_error(req, "Cannot write metadata to %s: %s.", prov, strerror(errno)); - bzero(sector, sizeof(sector)); + explicit_bzero(sector, sizeof(sector)); return (-1); } } - bzero(sector, sizeof(sector)); + explicit_bzero(sector, sizeof(sector)); return (0); } @@ -697,7 +718,7 @@ eli_init(struct gctl_req *req) return; } - bzero(&md, sizeof(md)); + explicit_bzero(&md, sizeof(md)); strlcpy(md.md_magic, G_ELI_MAGIC, sizeof(md.md_magic)); val = gctl_get_intmax(req, "mdversion"); if (val == -1) { @@ -828,25 +849,25 @@ eli_init(struct gctl_req *req) /* Generate user key. */ if (eli_genkey(req, &md, key, true) == NULL) { - bzero(key, sizeof(key)); - bzero(&md, sizeof(md)); + explicit_bzero(key, sizeof(key)); + explicit_bzero(&md, sizeof(md)); return; } /* Encrypt the first and the only Master Key. */ error = g_eli_mkey_encrypt(md.md_ealgo, key, md.md_keylen, md.md_mkeys); - bzero(key, sizeof(key)); + explicit_bzero(key, sizeof(key)); if (error != 0) { - bzero(&md, sizeof(md)); + explicit_bzero(&md, sizeof(md)); gctl_error(req, "Cannot encrypt Master Key: %s.", strerror(error)); return; } eli_metadata_encode(&md, sector); - bzero(&md, sizeof(md)); + explicit_bzero(&md, sizeof(md)); error = g_metadata_store(prov, sector, sizeof(sector)); - bzero(sector, sizeof(sector)); + explicit_bzero(sector, sizeof(sector)); if (error != 0) { gctl_error(req, "Cannot store metadata on %s: %s.", prov, strerror(error)); @@ -886,38 +907,75 @@ static void eli_attach(struct gctl_req *req) { struct g_eli_metadata md; - unsigned char key[G_ELI_USERKEYLEN]; + struct gctl_req *r; const char *prov; off_t mediasize; - int nargs; + int i, nargs, nparams, param; + const int one = 1; nargs = gctl_get_int(req, "nargs"); - if (nargs != 1) { - gctl_error(req, "Invalid number of arguments."); + if (nargs == 0) { + gctl_error(req, "Too few arguments."); return; } - prov = gctl_get_ascii(req, "arg0"); - if (eli_metadata_read(req, prov, &md) == -1) - return; + unsigned char key[G_ELI_USERKEYLEN]; - mediasize = g_get_mediasize(prov); - if (md.md_provsize != (uint64_t)mediasize) { - gctl_error(req, "Provider size mismatch."); - return; - } + /* + * Determine number of parameters in the parent geom request before the + * nargs parameter and list of providers. + */ + nparams = req->narg - nargs - 1; - if (eli_genkey(req, &md, key, false) == NULL) { - bzero(key, sizeof(key)); - return; - } + /* Create new child geom request for each provider and issue to kernel */ + for (i = 0; i < nargs; i++) { + r = gctl_get_handle(); - gctl_ro_param(req, "key", sizeof(key), key); - if (gctl_issue(req) == NULL) { - if (verbose) - printf("Attached to %s.\n", prov); + /* Copy each parameter from the parent request to the child request */ + for (param = 0; param < nparams; param++) { + gctl_ro_param(r, req->arg[param].name, req->arg[param].len, req->arg[param].value); + } + + /* Add a single provider to the parameter list of the child */ + gctl_ro_param(r, "nargs", sizeof(one), &one); + prov = gctl_get_ascii(req, "arg%d", i); + gctl_ro_param(r, "arg0", -1, prov); + + if (eli_metadata_read(r, prov, &md) == -1) + return; + + mediasize = g_get_mediasize(prov); + if (md.md_provsize != (uint64_t)mediasize) { + gctl_error(r, "Provider size mismatch."); + return; + } + + if (eli_genkey(r, &md, key, false) == NULL) { + explicit_bzero(key, sizeof(key)); + return; + } + + gctl_ro_param(r, "key", sizeof(key), key); + + if (gctl_issue(r) == NULL) { + if (verbose) + printf("Attached to %s.\n", prov); + } + + /* Print error for this request, and set parent request error message */ + if (r->error != NULL && r->error[0] != '\0') { + warnx("%s", r->error); + gctl_error(req, "At least one provider failed to attach."); + } + + gctl_free(r); + + /* Clear the derived key */ + explicit_bzero(key, sizeof(key)); } - bzero(key, sizeof(key)); + + /* Clear the cached passphrase */ + explicit_bzero(cached_passphrase, sizeof(cached_passphrase)); } static void @@ -989,7 +1047,7 @@ eli_configure_detached(struct gctl_req *req, const cha if (changed) eli_metadata_store(req, prov, &md); - bzero(&md, sizeof(md)); + explicit_bzero(&md, sizeof(md)); } static void @@ -1090,7 +1148,7 @@ eli_setkey_attached(struct gctl_req *req, struct g_eli /* Generate key for Master Key encryption. */ if (eli_genkey(req, md, key, true) == NULL) { - bzero(key, sizeof(key)); + explicit_bzero(key, sizeof(key)); return; } /* @@ -1105,7 +1163,7 @@ eli_setkey_attached(struct gctl_req *req, struct g_eli gctl_ro_param(req, "key", sizeof(key), key); gctl_issue(req); - bzero(key, sizeof(key)); + explicit_bzero(key, sizeof(key)); } static void @@ -1125,15 +1183,15 @@ eli_setkey_detached(struct gctl_req *req, const char * /* Generate key for Master Key decryption. */ if (eli_genkey(req, md, key, false) == NULL) { - bzero(key, sizeof(key)); + explicit_bzero(key, sizeof(key)); return; } /* Decrypt Master Key. */ error = g_eli_mkey_decrypt_any(md, key, mkey, &nkey); - bzero(key, sizeof(key)); + explicit_bzero(key, sizeof(key)); if (error != 0) { - bzero(md, sizeof(*md)); + explicit_bzero(md, sizeof(*md)); if (error == -1) gctl_error(req, "Wrong key for %s.", prov); else /* if (error > 0) */ { @@ -1179,20 +1237,20 @@ eli_setkey_detached(struct gctl_req *req, const char * md->md_keys |= (1 << nkey); bcopy(mkey, mkeydst, sizeof(mkey)); - bzero(mkey, sizeof(mkey)); + explicit_bzero(mkey, sizeof(mkey)); /* Generate key for Master Key encryption. */ if (eli_genkey(req, md, key, true) == NULL) { - bzero(key, sizeof(key)); - bzero(md, sizeof(*md)); + explicit_bzero(key, sizeof(key)); + explicit_bzero(md, sizeof(*md)); return; } /* Encrypt the Master-Key with the new key. */ error = g_eli_mkey_encrypt(md->md_ealgo, key, md->md_keylen, mkeydst); - bzero(key, sizeof(key)); + explicit_bzero(key, sizeof(key)); if (error != 0) { - bzero(md, sizeof(*md)); + explicit_bzero(md, sizeof(*md)); gctl_error(req, "Cannot encrypt Master Key: %s.", strerror(error)); return; @@ -1200,7 +1258,7 @@ eli_setkey_detached(struct gctl_req *req, const char * /* Store metadata with fresh key. */ eli_metadata_store(req, prov, md); - bzero(md, sizeof(*md)); + explicit_bzero(md, sizeof(*md)); } static void @@ -1281,7 +1339,7 @@ eli_delkey_detached(struct gctl_req *req, const char * } eli_metadata_store(req, prov, &md); - bzero(&md, sizeof(md)); + explicit_bzero(&md, sizeof(md)); } static void @@ -1329,7 +1387,7 @@ eli_resume(struct gctl_req *req) } if (eli_genkey(req, &md, key, false) == NULL) { - bzero(key, sizeof(key)); + explicit_bzero(key, sizeof(key)); return; } @@ -1338,7 +1396,7 @@ eli_resume(struct gctl_req *req) if (verbose) printf("Resumed %s.\n", prov); } - bzero(key, sizeof(key)); + explicit_bzero(key, sizeof(key)); } static int @@ -1508,7 +1566,7 @@ eli_backup_create(struct gctl_req *req, const char *pr ret = 0; out: if (sector != NULL) { - bzero(sector, secsize); + explicit_bzero(sector, secsize); free(sector); } return (ret); @@ -1672,7 +1730,7 @@ out: if (provfd != -1) (void)g_close(provfd); if (sector != NULL) { - bzero(sector, secsize); + explicit_bzero(sector, secsize); free(sector); } } Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Tue Jun 26 16:50:41 2018 (r335672) +++ head/share/man/man5/rc.conf.5 Tue Jun 26 18:07:16 2018 (r335673) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 21, 2018 +.Dd June 27, 2018 .Dt RC.CONF 5 .Os .Sh NAME @@ -2011,6 +2011,13 @@ List of devices to automatically attach on boot. Note that .eli devices from .Pa /etc/fstab are automatically appended to this list. +.It Va geli_groups +.Pq Vt str +List of groups containing devices to automatically attach on boot with the same +keyfiles and passphrase. +This must be accompanied with a corresponding +.Va geli_ Ns Ao Ar group Ac Ns Va _devices +variable. .It Va geli_tries .Pq Vt int Number of times user is asked for the pass-phrase. @@ -2022,8 +2029,10 @@ sysctl variable. Default flags to use by .Xr geli 8 when configuring disk encryption. -Flags can be configured for every device separately by defining +Flags can be configured for every device separately by defining the .Va geli_ Ns Ao Ar device Ac Ns Va _flags +variable, and for every group separately by defining the +.Va geli_ Ns Ao Ar group Ac Ns Va _flags variable. .It Va geli_autodetach .Pq Vt str @@ -2031,7 +2040,7 @@ Specifies if GELI devices should be marked for detach file systems are mounted. Default is .Dq Li YES . -This can be changed for every device separately by defining +This can be changed for every device separately by defining the .Va geli_ Ns Ao Ar device Ac Ns Va _autodetach variable. .It Va root_rw_mount From owner-svn-src-all@freebsd.org Tue Jun 26 18:29:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EB501100F7C4; Tue, 26 Jun 2018 18:29:57 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9D2D67D0C5; Tue, 26 Jun 2018 18:29:57 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7B47217E67; Tue, 26 Jun 2018 18:29:57 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5QITv2e082669; Tue, 26 Jun 2018 18:29:57 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5QITuqI082667; Tue, 26 Jun 2018 18:29:56 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201806261829.w5QITuqI082667@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Tue, 26 Jun 2018 18:29:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335674 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 335674 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 18:29:58 -0000 Author: alc Date: Tue Jun 26 18:29:56 2018 New Revision: 335674 URL: https://svnweb.freebsd.org/changeset/base/335674 Log: Update the physical page selection strategy used by vm_page_import() so that it does not cause rapid fragmentation of the free physical memory. Reviewed by: jeff, markj (an earlier version) Differential Revision: https://reviews.freebsd.org/D15976 Modified: head/sys/vm/vm_page.c head/sys/vm/vm_phys.c head/sys/vm/vm_phys.h Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Tue Jun 26 18:07:16 2018 (r335673) +++ head/sys/vm/vm_page.c Tue Jun 26 18:29:56 2018 (r335674) @@ -2235,24 +2235,16 @@ static int vm_page_import(void *arg, void **store, int cnt, int domain, int flags) { struct vm_domain *vmd; - vm_page_t m; - int i, j, n; + int i; vmd = arg; /* Only import if we can bring in a full bucket. */ if (cnt == 1 || !vm_domain_allocate(vmd, VM_ALLOC_NORMAL, cnt)) return (0); domain = vmd->vmd_domain; - n = 64; /* Starting stride, arbitrary. */ vm_domain_free_lock(vmd); - for (i = 0; i < cnt; i+=n) { - n = vm_phys_alloc_npages(domain, VM_FREELIST_DEFAULT, &m, - MIN(n, cnt-i)); - if (n == 0) - break; - for (j = 0; j < n; j++) - store[i+j] = m++; - } + i = vm_phys_alloc_npages(domain, VM_FREEPOOL_DEFAULT, cnt, + (vm_page_t *)store); vm_domain_free_unlock(vmd); if (cnt != i) vm_domain_freecnt_inc(vmd, cnt - i); Modified: head/sys/vm/vm_phys.c ============================================================================== --- head/sys/vm/vm_phys.c Tue Jun 26 18:07:16 2018 (r335673) +++ head/sys/vm/vm_phys.c Tue Jun 26 18:29:56 2018 (r335674) @@ -605,6 +605,76 @@ vm_phys_split_pages(vm_page_t m, int oind, struct vm_f } /* + * Tries to allocate the specified number of pages from the specified pool + * within the specified domain. Returns the actual number of allocated pages + * and a pointer to each page through the array ma[]. + * + * The returned pages may not be physically contiguous. However, in contrast to + * performing multiple, back-to-back calls to vm_phys_alloc_pages(..., 0), + * calling this function once to allocate the desired number of pages will avoid + * wasted time in vm_phys_split_pages(). + * + * The free page queues for the specified domain must be locked. + */ +int +vm_phys_alloc_npages(int domain, int pool, int npages, vm_page_t ma[]) +{ + struct vm_freelist *alt, *fl; + vm_page_t m; + int avail, end, flind, freelist, i, need, oind, pind; + + KASSERT(domain >= 0 && domain < vm_ndomains, + ("vm_phys_alloc_npages: domain %d is out of range", domain)); + KASSERT(pool < VM_NFREEPOOL, + ("vm_phys_alloc_npages: pool %d is out of range", pool)); + KASSERT(npages <= 1 << (VM_NFREEORDER - 1), + ("vm_phys_alloc_npages: npages %d is out of range", npages)); + vm_domain_free_assert_locked(VM_DOMAIN(domain)); + i = 0; + for (freelist = 0; freelist < VM_NFREELIST; freelist++) { + flind = vm_freelist_to_flind[freelist]; + if (flind < 0) + continue; + fl = vm_phys_free_queues[domain][flind][pool]; + for (oind = 0; oind < VM_NFREEORDER; oind++) { + while ((m = TAILQ_FIRST(&fl[oind].pl)) != NULL) { + vm_freelist_rem(fl, m, oind); + avail = 1 << oind; + need = imin(npages - i, avail); + for (end = i + need; i < end;) + ma[i++] = m++; + if (need < avail) { + vm_phys_free_contig(m, avail - need); + return (npages); + } else if (i == npages) + return (npages); + } + } + for (oind = VM_NFREEORDER - 1; oind >= 0; oind--) { + for (pind = 0; pind < VM_NFREEPOOL; pind++) { + alt = vm_phys_free_queues[domain][flind][pind]; + while ((m = TAILQ_FIRST(&alt[oind].pl)) != + NULL) { + vm_freelist_rem(alt, m, oind); + vm_phys_set_pool(pool, m, oind); + avail = 1 << oind; + need = imin(npages - i, avail); + for (end = i + need; i < end;) + ma[i++] = m++; + if (need < avail) { + vm_phys_free_contig(m, avail - + need); + return (npages); + } else if (i == npages) + return (npages); + } + } + } + } + return (i); +} + +/* * Allocate a contiguous, power of two-sized set of physical pages * from the free lists. * @@ -622,26 +692,6 @@ vm_phys_alloc_pages(int domain, int pool, int order) return (m); } return (NULL); -} - -int -vm_phys_alloc_npages(int domain, int pool, vm_page_t *mp, int cnt) -{ - vm_page_t m; - int order, freelist; - - for (freelist = 0; freelist < VM_NFREELIST; freelist++) { - for (order = fls(cnt) -1; order >= 0; order--) { - m = vm_phys_alloc_freelist_pages(domain, freelist, - pool, order); - if (m != NULL) { - *mp = m; - return (1 << order); - } - } - } - *mp = NULL; - return (0); } /* Modified: head/sys/vm/vm_phys.h ============================================================================== --- head/sys/vm/vm_phys.h Tue Jun 26 18:07:16 2018 (r335673) +++ head/sys/vm/vm_phys.h Tue Jun 26 18:29:56 2018 (r335674) @@ -77,8 +77,8 @@ vm_page_t vm_phys_alloc_contig(int domain, u_long npag vm_paddr_t high, u_long alignment, vm_paddr_t boundary); vm_page_t vm_phys_alloc_freelist_pages(int domain, int freelist, int pool, int order); +int vm_phys_alloc_npages(int domain, int pool, int npages, vm_page_t ma[]); vm_page_t vm_phys_alloc_pages(int domain, int pool, int order); -int vm_phys_alloc_npages(int domain, int pool, vm_page_t *m, int cnt); int vm_phys_domain_match(int prefer, vm_paddr_t low, vm_paddr_t high); int vm_phys_fictitious_reg_range(vm_paddr_t start, vm_paddr_t end, vm_memattr_t memattr); From owner-svn-src-all@freebsd.org Tue Jun 26 18:53:53 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4D3C101199D; Tue, 26 Jun 2018 18:53:52 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 95CB67E4A7; Tue, 26 Jun 2018 18:53:52 +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 76F0018394; Tue, 26 Jun 2018 18:53:52 +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 w5QIrqbJ097675; Tue, 26 Jun 2018 18:53:52 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5QIrqIT097674; Tue, 26 Jun 2018 18:53:52 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201806261853.w5QIrqIT097674@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Tue, 26 Jun 2018 18:53:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335675 - head/contrib/file/magic/Magdir X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: head/contrib/file/magic/Magdir X-SVN-Commit-Revision: 335675 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 18:53:53 -0000 Author: gonzo Date: Tue Jun 26 18:53:52 2018 New Revision: 335675 URL: https://svnweb.freebsd.org/changeset/base/335675 Log: Fix file(1) dumpdate reporting for dump(8) files Magic file for dump(8) had this dump and previous dump dates reversed. Fix order for all three flavours of the dump(8) format. This fix was committed to upstream repo as magic/Magdir/dump,v 1.17 and will be merged during next vendor import. PR: 223155 MFC after: 2 weeks Modified: head/contrib/file/magic/Magdir/dump Modified: head/contrib/file/magic/Magdir/dump ============================================================================== --- head/contrib/file/magic/Magdir/dump Tue Jun 26 18:29:56 2018 (r335674) +++ head/contrib/file/magic/Magdir/dump Tue Jun 26 18:53:52 2018 (r335675) @@ -6,8 +6,8 @@ # We specify both byte orders in order to recognize byte-swapped dumps. # 0 name new-dump-be ->4 bedate x Previous dump %s, ->8 bedate x This dump %s, +>4 bedate x This dump %s, +>8 bedate x Previous dump %s, >12 belong >0 Volume %d, >692 belong 0 Level zero, type: >692 belong >0 Level %d, type: @@ -25,8 +25,8 @@ >888 belong >0 Flags %x 0 name old-dump-be -#>4 bedate x Previous dump %s, -#>8 bedate x This dump %s, +#>4 bedate x This dump %s, +#>8 bedate x Previous dump %s, >12 belong >0 Volume %d, >692 belong 0 Level zero, type: >692 belong >0 Level %d, type: @@ -44,8 +44,8 @@ >888 belong >0 Flags %x 0 name ufs2-dump-be ->896 beqdate x Previous dump %s, ->904 beqdate x This dump %s, +>896 beqdate x This dump %s, +>904 beqdate x Previous dump %s, >12 belong >0 Volume %d, >692 belong 0 Level zero, type: >692 belong >0 Level %d, type: From owner-svn-src-all@freebsd.org Tue Jun 26 19:13:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 122A61012810; Tue, 26 Jun 2018 19:13:50 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BAD587F7F2; Tue, 26 Jun 2018 19:13: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 9BC2918706; Tue, 26 Jun 2018 19:13: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 w5QJDn43008530; Tue, 26 Jun 2018 19:13:49 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5QJDnLr008529; Tue, 26 Jun 2018 19:13:49 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201806261913.w5QJDnLr008529@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 26 Jun 2018 19:13:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335676 - head/sys/modules X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/modules X-SVN-Commit-Revision: 335676 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 19:13:50 -0000 Author: emaste Date: Tue Jun 26 19:13:49 2018 New Revision: 335676 URL: https://svnweb.freebsd.org/changeset/base/335676 Log: Correct linprocfs/linsysfs arch check in r335672 Pointy hat to: emaste Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Tue Jun 26 18:53:52 2018 (r335675) +++ head/sys/modules/Makefile Tue Jun 26 19:13:49 2018 (r335676) @@ -491,7 +491,7 @@ SUBDIR+= iscsi SUBDIR+= iscsi_initiator .endif -.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} != "amd64" || \ +.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ ${MACHINE_CPUARCH} == "i386" SUBDIR+= linprocfs SUBDIR+= linsysfs From owner-svn-src-all@freebsd.org Tue Jun 26 19:26:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7ADF910138D4; Tue, 26 Jun 2018 19:26:08 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2C44D805D1; Tue, 26 Jun 2018 19:26:08 +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 0D4B7188CA; Tue, 26 Jun 2018 19:26:08 +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 w5QJQ7GP013624; Tue, 26 Jun 2018 19:26:07 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5QJQ7RV013623; Tue, 26 Jun 2018 19:26:07 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201806261926.w5QJQ7RV013623@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 26 Jun 2018 19:26:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335677 - head/tests/sys/audit X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/tests/sys/audit X-SVN-Commit-Revision: 335677 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 19:26:30 -0000 Author: asomers Date: Tue Jun 26 19:26:07 2018 New Revision: 335677 URL: https://svnweb.freebsd.org/changeset/base/335677 Log: audit(4): add tests for pipe, posix_openpt, shm_open, and shm_unlink Submitted by: aniketp MFC after: 2 weeks Sponsored by: Google, Inc. (GSoC 2018) Differential Revision: https://reviews.freebsd.org/D15963 Modified: head/tests/sys/audit/inter-process.c Modified: head/tests/sys/audit/inter-process.c ============================================================================== --- head/tests/sys/audit/inter-process.c Tue Jun 26 19:13:49 2018 (r335676) +++ head/tests/sys/audit/inter-process.c Tue Jun 26 19:26:07 2018 (r335677) @@ -36,6 +36,7 @@ #include #include +#include #include #include "utils.h" @@ -47,7 +48,6 @@ struct msgstr { }; typedef struct msgstr msgstr_t; - static pid_t pid; static int msqid, shmid, semid; static union semun semarg; @@ -57,6 +57,7 @@ static struct shmid_ds shmbuff; static struct semid_ds sembuff; static char ipcregex[BUFFSIZE]; static const char *auclass = "ip"; +static char path[BUFFSIZE] = "/fileforaudit"; static unsigned short semvals[BUFFSIZE]; @@ -1398,6 +1399,194 @@ ATF_TC_CLEANUP(semctl_illegal_command, tc) } +ATF_TC_WITH_CLEANUP(shm_open_success); +ATF_TC_HEAD(shm_open_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "shm_open(2) call"); +} + +ATF_TC_BODY(shm_open_success, tc) +{ + pid = getpid(); + snprintf(ipcregex, sizeof(ipcregex), "shm_open.*%d.*ret.*success", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE(shm_open(SHM_ANON, O_CREAT | O_TRUNC | O_RDWR, 0600) != -1); + check_audit(fds, ipcregex, pipefd); +} + +ATF_TC_CLEANUP(shm_open_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(shm_open_failure); +ATF_TC_HEAD(shm_open_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "shm_open(2) call"); +} + +ATF_TC_BODY(shm_open_failure, tc) +{ + const char *regex = "shm_open.*fileforaudit.*return,failure"; + FILE *pipefd = setup(fds, auclass); + /* Failure reason: File does not exist */ + ATF_REQUIRE_EQ(-1, shm_open(path, O_TRUNC | O_RDWR, 0600)); + check_audit(fds, regex, pipefd); +} + +ATF_TC_CLEANUP(shm_open_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(shm_unlink_success); +ATF_TC_HEAD(shm_unlink_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "shm_unlink(2) call"); +} + +ATF_TC_BODY(shm_unlink_success, tc) +{ + /* Build an absolute path to a file in the test-case directory */ + char dirpath[50]; + ATF_REQUIRE(getcwd(dirpath, sizeof(dirpath)) != NULL); + strlcat(dirpath, path, sizeof(dirpath)); + ATF_REQUIRE(shm_open(dirpath, O_CREAT | O_TRUNC | O_RDWR, 0600) != -1); + + const char *regex = "shm_unlink.*fileforaudit.*return,success"; + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, shm_unlink(dirpath)); + check_audit(fds, regex, pipefd); +} + +ATF_TC_CLEANUP(shm_unlink_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(shm_unlink_failure); +ATF_TC_HEAD(shm_unlink_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "shm_unlink(2) call"); +} + +ATF_TC_BODY(shm_unlink_failure, tc) +{ + const char *regex = "shm_unlink.*fileforaudit.*return,failure"; + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(-1, shm_unlink(path)); + check_audit(fds, regex, pipefd); +} + +ATF_TC_CLEANUP(shm_unlink_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(pipe_success); +ATF_TC_HEAD(pipe_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "pipe(2) call"); +} + +ATF_TC_BODY(pipe_success, tc) +{ + int filedesc[2]; + pid = getpid(); + snprintf(ipcregex, sizeof(ipcregex), "pipe.*%d.*return,success", pid); + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, pipe(filedesc)); + check_audit(fds, ipcregex, pipefd); + + close(filedesc[0]); + close(filedesc[1]); +} + +ATF_TC_CLEANUP(pipe_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(pipe_failure); +ATF_TC_HEAD(pipe_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "pipe(2) call"); +} + +ATF_TC_BODY(pipe_failure, tc) +{ + pid = getpid(); + snprintf(ipcregex, sizeof(ipcregex), "pipe.*%d.*return.failure", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(-1, pipe(NULL)); + check_audit(fds, ipcregex, pipefd); +} + +ATF_TC_CLEANUP(pipe_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(posix_openpt_success); +ATF_TC_HEAD(posix_openpt_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "posix_openpt(2) call"); +} + +ATF_TC_BODY(posix_openpt_success, tc) +{ + int filedesc; + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE((filedesc = posix_openpt(O_RDWR | O_NOCTTY)) != -1); + /* Check for the presence of filedesc in the audit record */ + snprintf(ipcregex, sizeof(ipcregex), + "posix_openpt.*return,success,%d", filedesc); + check_audit(fds, ipcregex, pipefd); + close(filedesc); +} + +ATF_TC_CLEANUP(posix_openpt_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(posix_openpt_failure); +ATF_TC_HEAD(posix_openpt_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "posix_openpt(2) call"); +} + +ATF_TC_BODY(posix_openpt_failure, tc) +{ + const char *regex = "posix_openpt.*return,failure : Invalid argument"; + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(-1, posix_openpt(-1)); + check_audit(fds, regex, pipefd); +} + +ATF_TC_CLEANUP(posix_openpt_failure, tc) +{ + cleanup(); +} + + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, msgget_success); @@ -1456,6 +1645,16 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, semctl_rmid_success); ATF_TP_ADD_TC(tp, semctl_rmid_failure); ATF_TP_ADD_TC(tp, semctl_illegal_command); + + ATF_TP_ADD_TC(tp, shm_open_success); + ATF_TP_ADD_TC(tp, shm_open_failure); + ATF_TP_ADD_TC(tp, shm_unlink_success); + ATF_TP_ADD_TC(tp, shm_unlink_failure); + + ATF_TP_ADD_TC(tp, pipe_success); + ATF_TP_ADD_TC(tp, pipe_failure); + ATF_TP_ADD_TC(tp, posix_openpt_success); + ATF_TP_ADD_TC(tp, posix_openpt_failure); return (atf_no_error()); } From owner-svn-src-all@freebsd.org Tue Jun 26 19:57:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F871101604A; Tue, 26 Jun 2018 19:57:48 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 00F2581AFC; Tue, 26 Jun 2018 19:57:48 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D6E2918DBC; Tue, 26 Jun 2018 19:57:47 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5QJvleQ029038; Tue, 26 Jun 2018 19:57:47 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5QJvl86029037; Tue, 26 Jun 2018 19:57:47 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201806261957.w5QJvl86029037@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Tue, 26 Jun 2018 19:57:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335678 - head/lib/libcasper/services/cap_pwd X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/lib/libcasper/services/cap_pwd X-SVN-Commit-Revision: 335678 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 19:57:48 -0000 Author: oshogbo Date: Tue Jun 26 19:57:47 2018 New Revision: 335678 URL: https://svnweb.freebsd.org/changeset/base/335678 Log: [libcasper] Use explicit_bzero instead of memset to clear pwd struct Submitted by: David Carlier Differential Revision: https://reviews.freebsd.org/D16015 Modified: head/lib/libcasper/services/cap_pwd/cap_pwd.c Modified: head/lib/libcasper/services/cap_pwd/cap_pwd.c ============================================================================== --- head/lib/libcasper/services/cap_pwd/cap_pwd.c Tue Jun 26 19:26:07 2018 (r335677) +++ head/lib/libcasper/services/cap_pwd/cap_pwd.c Tue Jun 26 19:57:47 2018 (r335678) @@ -100,7 +100,7 @@ passwd_unpack(const nvlist_t *nvl, struct passwd *pwd, if (!nvlist_exists_string(nvl, "pw_name")) return (EINVAL); - memset(pwd, 0, sizeof(*pwd)); + explicit_bzero(pwd, sizeof(*pwd)); error = passwd_unpack_string(nvl, "pw_name", &pwd->pw_name, &buffer, &bufsize); From owner-svn-src-all@freebsd.org Tue Jun 26 20:26:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0782F10187E4; Tue, 26 Jun 2018 20:26:58 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B103782DBB; Tue, 26 Jun 2018 20:26:57 +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 9310D192A3; Tue, 26 Jun 2018 20:26:57 +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 w5QKQvje044000; Tue, 26 Jun 2018 20:26:57 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5QKQvjD043999; Tue, 26 Jun 2018 20:26:57 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201806262026.w5QKQvjD043999@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Tue, 26 Jun 2018 20:26:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335679 - head/tests/sys/audit X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/tests/sys/audit X-SVN-Commit-Revision: 335679 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 20:26:58 -0000 Author: asomers Date: Tue Jun 26 20:26:57 2018 New Revision: 335679 URL: https://svnweb.freebsd.org/changeset/base/335679 Log: audit(4): add tests for the process-control audit class Tested syscalls include rfork(2), chdir(2), fchdir(2), chroot(2), getresuid(2), getresgid(2), setpriority(2), setgroups(2), setpgrp(2), setrlimit(2), setlogin(2), mlock(2), munlock(2), minherit(2), rtprio(2), profil(2), ktrace(2), ptrace(2), fork(2), umask(2), setuid(2), setgid(2), seteuid(2), and setegid(2). The last six are only tested in the success case, either because they're infalliable or a failure is difficult to cause on-demand. Submitted by: aniketp MFC after: 2 weeks Sponsored by: Google, Inc. (GSoC 2018) Differential Revision: https://reviews.freebsd.org/D15966 Added: head/tests/sys/audit/process-control.c (contents, props changed) Modified: head/tests/sys/audit/Makefile Modified: head/tests/sys/audit/Makefile ============================================================================== --- head/tests/sys/audit/Makefile Tue Jun 26 19:57:47 2018 (r335678) +++ head/tests/sys/audit/Makefile Tue Jun 26 20:26:57 2018 (r335679) @@ -14,6 +14,7 @@ ATF_TESTS_C+= ioctl ATF_TESTS_C+= network ATF_TESTS_C+= inter-process ATF_TESTS_C+= administrative +ATF_TESTS_C+= process-control SRCS.file-attribute-access+= file-attribute-access.c SRCS.file-attribute-access+= utils.c @@ -39,6 +40,8 @@ SRCS.inter-process+= inter-process.c SRCS.inter-process+= utils.c SRCS.administrative+= administrative.c SRCS.administrative+= utils.c +SRCS.process-control+= process-control.c +SRCS.process-control+= utils.c TEST_METADATA+= timeout="30" TEST_METADATA+= required_user="root" Added: head/tests/sys/audit/process-control.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/audit/process-control.c Tue Jun 26 20:26:57 2018 (r335679) @@ -0,0 +1,1265 @@ +/*- + * Copyright (c) 2018 Aniket Pandey + * + * 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 + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * 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 + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "utils.h" + +static pid_t pid; +static int filedesc, status; +static struct pollfd fds[1]; +static char pcregex[80]; +static const char *auclass = "pc"; + + +ATF_TC_WITH_CLEANUP(fork_success); +ATF_TC_HEAD(fork_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "fork(2) call"); +} + +ATF_TC_BODY(fork_success, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "fork.*%d.*return,success", pid); + + FILE *pipefd = setup(fds, auclass); + /* Check if fork(2) succeded. If so, exit from the child process */ + ATF_REQUIRE((pid = fork()) != -1); + if (pid) + check_audit(fds, pcregex, pipefd); + else + _exit(0); + +} + +ATF_TC_CLEANUP(fork_success, tc) +{ + cleanup(); +} + +/* + * No fork(2) in failure mode since possibilities for failure are only when + * user is not privileged or when the number of processes exceed KERN_MAXPROC. + */ + + +ATF_TC_WITH_CLEANUP(rfork_success); +ATF_TC_HEAD(rfork_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "rfork(2) call"); +} + +ATF_TC_BODY(rfork_success, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "rfork.*%d.*return,success", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE((pid = rfork(RFPROC)) != -1); + if (pid) + check_audit(fds, pcregex, pipefd); + else + _exit(0); + +} + +ATF_TC_CLEANUP(rfork_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(rfork_failure); +ATF_TC_HEAD(rfork_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "rfork(2) call"); +} + +ATF_TC_BODY(rfork_failure, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "rfork.*%d.*return,failure", pid); + + FILE *pipefd = setup(fds, auclass); + /* Failure reason: Invalid argument */ + ATF_REQUIRE_EQ(-1, rfork(-1)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(rfork_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(chdir_success); +ATF_TC_HEAD(chdir_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "chdir(2) call"); +} + +ATF_TC_BODY(chdir_success, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "chdir.*/.*%d.*return,success", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, chdir("/")); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(chdir_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(chdir_failure); +ATF_TC_HEAD(chdir_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "chdir(2) call"); +} + +ATF_TC_BODY(chdir_failure, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "chdir.*%d.*return,failure", pid); + + FILE *pipefd = setup(fds, auclass); + /* Failure reason: Bad address */ + ATF_REQUIRE_EQ(-1, chdir(NULL)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(chdir_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(fchdir_success); +ATF_TC_HEAD(fchdir_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "fchdir(2) call"); +} + +ATF_TC_BODY(fchdir_success, tc) +{ + /* Build an absolute path to the test-case directory */ + char dirpath[50]; + ATF_REQUIRE(getcwd(dirpath, sizeof(dirpath)) != NULL); + ATF_REQUIRE((filedesc = open(dirpath, O_RDONLY)) != -1); + + /* Audit record generated by fchdir(2) does not contain filedesc */ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "fchdir.*%d.*return,success", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, fchdir(filedesc)); + check_audit(fds, pcregex, pipefd); + close(filedesc); +} + +ATF_TC_CLEANUP(fchdir_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(fchdir_failure); +ATF_TC_HEAD(fchdir_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "fchdir(2) call"); +} + +ATF_TC_BODY(fchdir_failure, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "fchdir.*%d.*return,failure", pid); + + FILE *pipefd = setup(fds, auclass); + /* Failure reason: Bad directory address */ + ATF_REQUIRE_EQ(-1, fchdir(-1)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(fchdir_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(chroot_success); +ATF_TC_HEAD(chroot_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "chroot(2) call"); +} + +ATF_TC_BODY(chroot_success, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "chroot.*%d.*return,success", pid); + + FILE *pipefd = setup(fds, auclass); + /* We don't want to change the root directory, hence '/' */ + ATF_REQUIRE_EQ(0, chroot("/")); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(chroot_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(chroot_failure); +ATF_TC_HEAD(chroot_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "chroot(2) call"); +} + +ATF_TC_BODY(chroot_failure, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "chroot.*%d.*return,failure", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(-1, chroot(NULL)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(chroot_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(umask_success); +ATF_TC_HEAD(umask_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "umask(2) call"); +} + +ATF_TC_BODY(umask_success, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "umask.*%d.*return,success", pid); + + FILE *pipefd = setup(fds, auclass); + umask(0); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(umask_success, tc) +{ + cleanup(); +} + +/* + * umask(2) system call never fails. Hence, no test case for failure mode + */ + + +ATF_TC_WITH_CLEANUP(setuid_success); +ATF_TC_HEAD(setuid_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "setuid(2) call"); +} + +ATF_TC_BODY(setuid_success, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "setuid.*%d.*return,success", pid); + + FILE *pipefd = setup(fds, auclass); + /* Since we're privileged, we'll let ourselves be privileged! */ + ATF_REQUIRE_EQ(0, setuid(0)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(setuid_success, tc) +{ + cleanup(); +} + +/* + * setuid(2) fails only when the current user is not root. So no test case for + * failure mode since the required_user="root" + */ + + +ATF_TC_WITH_CLEANUP(seteuid_success); +ATF_TC_HEAD(seteuid_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "seteuid(2) call"); +} + +ATF_TC_BODY(seteuid_success, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "seteuid.*%d.*return,success", pid); + + FILE *pipefd = setup(fds, auclass); + /* This time, we'll let ourselves be 'effectively' privileged! */ + ATF_REQUIRE_EQ(0, seteuid(0)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(seteuid_success, tc) +{ + cleanup(); +} + +/* + * seteuid(2) fails only when the current user is not root. So no test case for + * failure mode since the required_user="root" + */ + + +ATF_TC_WITH_CLEANUP(setgid_success); +ATF_TC_HEAD(setgid_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "setgid(2) call"); +} + +ATF_TC_BODY(setgid_success, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "setgid.*%d.*return,success", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, setgid(0)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(setgid_success, tc) +{ + cleanup(); +} + +/* + * setgid(2) fails only when the current user is not root. So no test case for + * failure mode since the required_user="root" + */ + + +ATF_TC_WITH_CLEANUP(setegid_success); +ATF_TC_HEAD(setegid_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "setegid(2) call"); +} + +ATF_TC_BODY(setegid_success, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "setegid.*%d.*return,success", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, setegid(0)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(setegid_success, tc) +{ + cleanup(); +} + +/* + * setegid(2) fails only when the current user is not root. So no test case for + * failure mode since the required_user="root" + */ + + +ATF_TC_WITH_CLEANUP(setregid_success); +ATF_TC_HEAD(setregid_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "setregid(2) call"); +} + +ATF_TC_BODY(setregid_success, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "setregid.*%d.*return,success", pid); + + FILE *pipefd = setup(fds, auclass); + /* setregid(-1, -1) does not change any real or effective GIDs */ + ATF_REQUIRE_EQ(0, setregid(-1, -1)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(setregid_success, tc) +{ + cleanup(); +} + +/* + * setregid(2) fails only when the current user is not root. So no test case for + * failure mode since the required_user="root" + */ + + +ATF_TC_WITH_CLEANUP(setreuid_success); +ATF_TC_HEAD(setreuid_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "setreuid(2) call"); +} + +ATF_TC_BODY(setreuid_success, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "setreuid.*%d.*return,success", pid); + + FILE *pipefd = setup(fds, auclass); + /* setreuid(-1, -1) does not change any real or effective UIDs */ + ATF_REQUIRE_EQ(0, setreuid(-1, -1)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(setreuid_success, tc) +{ + cleanup(); +} + +/* + * setregid(2) fails only when the current user is not root. So no test case for + * failure mode since the required_user="root" + */ + + +ATF_TC_WITH_CLEANUP(setresuid_success); +ATF_TC_HEAD(setresuid_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "setresuid(2) call"); +} + +ATF_TC_BODY(setresuid_success, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "setresuid.*%d.*return,success", pid); + + FILE *pipefd = setup(fds, auclass); + /* setresuid(-1, -1, -1) does not change real, effective & saved UIDs */ + ATF_REQUIRE_EQ(0, setresuid(-1, -1, -1)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(setresuid_success, tc) +{ + cleanup(); +} + +/* + * setresuid(2) fails only when the current user is not root. So no test case + * for failure mode since the required_user="root" + */ + + +ATF_TC_WITH_CLEANUP(setresgid_success); +ATF_TC_HEAD(setresgid_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "setresgid(2) call"); +} + +ATF_TC_BODY(setresgid_success, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "setresgid.*%d.*ret.*success", pid); + + FILE *pipefd = setup(fds, auclass); + /* setresgid(-1, -1, -1) does not change real, effective & saved GIDs */ + ATF_REQUIRE_EQ(0, setresgid(-1, -1, -1)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(setresgid_success, tc) +{ + cleanup(); +} + +/* + * setresgid(2) fails only when the current user is not root. So no test case + * for failure mode since the required_user="root" + */ + + +ATF_TC_WITH_CLEANUP(getresuid_success); +ATF_TC_HEAD(getresuid_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "getresuid(2) call"); +} + +ATF_TC_BODY(getresuid_success, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "getresuid.*%d.*ret.*success", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, getresuid(NULL, NULL, NULL)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(getresuid_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(getresuid_failure); +ATF_TC_HEAD(getresuid_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "getresuid(2) call"); +} + +ATF_TC_BODY(getresuid_failure, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "getresuid.*%d.*ret.*failure", pid); + + FILE *pipefd = setup(fds, auclass); + /* Failure reason: Invalid address "-1" */ + ATF_REQUIRE_EQ(-1, getresuid((uid_t *)-1, NULL, NULL)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(getresuid_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(getresgid_success); +ATF_TC_HEAD(getresgid_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "getresgid(2) call"); +} + +ATF_TC_BODY(getresgid_success, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "getresgid.*%d.*ret.*success", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, getresgid(NULL, NULL, NULL)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(getresgid_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(getresgid_failure); +ATF_TC_HEAD(getresgid_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "getresgid(2) call"); +} + +ATF_TC_BODY(getresgid_failure, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "getresgid.*%d.*ret.*failure", pid); + + FILE *pipefd = setup(fds, auclass); + /* Failure reason: Invalid address "-1" */ + ATF_REQUIRE_EQ(-1, getresgid((gid_t *)-1, NULL, NULL)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(getresgid_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(setpriority_success); +ATF_TC_HEAD(setpriority_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "setpriority(2) call"); +} + +ATF_TC_BODY(setpriority_success, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "setpriority.*%d.*success", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, setpriority(PRIO_PROCESS, 0, 0)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(setpriority_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(setpriority_failure); +ATF_TC_HEAD(setpriority_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "setpriority(2) call"); +} + +ATF_TC_BODY(setpriority_failure, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "setpriority.*%d.*failure", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(-1, setpriority(-1, -1, -1)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(setpriority_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(setgroups_success); +ATF_TC_HEAD(setgroups_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "setgroups(2) call"); +} + +ATF_TC_BODY(setgroups_success, tc) +{ + gid_t gids[5]; + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "setgroups.*%d.*ret.*success", pid); + /* Retrieve the current group access list to be used with setgroups */ + ATF_REQUIRE(getgroups(sizeof(gids)/sizeof(gids[0]), gids) != -1); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, setgroups(sizeof(gids)/sizeof(gids[0]), gids)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(setgroups_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(setgroups_failure); +ATF_TC_HEAD(setgroups_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "setgroups(2) call"); +} + +ATF_TC_BODY(setgroups_failure, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "setgroups.*%d.*ret.*failure", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(-1, setgroups(-1, NULL)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(setgroups_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(setpgrp_success); +ATF_TC_HEAD(setpgrp_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "setpgrp(2) call"); +} + +ATF_TC_BODY(setpgrp_success, tc) +{ + /* Main procedure is carried out from within the child process */ + ATF_REQUIRE((pid = fork()) != -1); + if (pid) { + ATF_REQUIRE(wait(&status) != -1); + } else { + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "setpgrp.*%d.*success", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, setpgrp(0, 0)); + check_audit(fds, pcregex, pipefd); + } +} + +ATF_TC_CLEANUP(setpgrp_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(setpgrp_failure); +ATF_TC_HEAD(setpgrp_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "setpgrp(2) call"); +} + +ATF_TC_BODY(setpgrp_failure, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "setpgrp.*%d.*return,failure", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(-1, setpgrp(-1, -1)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(setpgrp_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(setrlimit_success); +ATF_TC_HEAD(setrlimit_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "setrlimit(2) call"); +} + +ATF_TC_BODY(setrlimit_success, tc) +{ + struct rlimit rlp; + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "setrlimit.*%d.*ret.*success", pid); + /* Retrieve the system resource consumption limit to be used later on */ + ATF_REQUIRE_EQ(0, getrlimit(RLIMIT_FSIZE, &rlp)); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, setrlimit(RLIMIT_FSIZE, &rlp)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(setrlimit_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(setrlimit_failure); +ATF_TC_HEAD(setrlimit_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "setrlimit(2) call"); +} + +ATF_TC_BODY(setrlimit_failure, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "setrlimit.*%d.*ret.*failure", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(-1, setrlimit(RLIMIT_FSIZE, NULL)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(setrlimit_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(mlock_success); +ATF_TC_HEAD(mlock_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "mlock(2) call"); +} + +ATF_TC_BODY(mlock_success, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "mlock.*%d.*return,success", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, mlock(NULL, 0)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(mlock_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(mlock_failure); +ATF_TC_HEAD(mlock_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "mlock(2) call"); +} + +ATF_TC_BODY(mlock_failure, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "mlock.*%d.*return,failure", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(-1, mlock((void *)(-1), -1)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(mlock_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(munlock_success); +ATF_TC_HEAD(munlock_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "munlock(2) call"); +} + +ATF_TC_BODY(munlock_success, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "munlock.*%d.*return,success", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, munlock(NULL, 0)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(munlock_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(munlock_failure); +ATF_TC_HEAD(munlock_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "munlock(2) call"); +} + +ATF_TC_BODY(munlock_failure, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "munlock.*%d.*return,failure", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(-1, munlock((void *)(-1), -1)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(munlock_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(minherit_success); +ATF_TC_HEAD(minherit_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "minherit(2) call"); +} + +ATF_TC_BODY(minherit_success, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "minherit.*%d.*return,success", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, minherit(NULL, 0, INHERIT_ZERO)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(minherit_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(minherit_failure); +ATF_TC_HEAD(minherit_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "minherit(2) call"); +} + +ATF_TC_BODY(minherit_failure, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "minherit.*%d.*return,failure", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(-1, minherit((void *)(-1), -1, 0)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(minherit_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(setlogin_success); +ATF_TC_HEAD(setlogin_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "setlogin(2) call"); +} + +ATF_TC_BODY(setlogin_success, tc) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Tue Jun 26 21:56:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 890AB101D056; Tue, 26 Jun 2018 21:56:07 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 37026861A0; Tue, 26 Jun 2018 21:56:07 +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 191C01A148; Tue, 26 Jun 2018 21:56:07 +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 w5QLu6dE089522; Tue, 26 Jun 2018 21:56:06 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5QLu6c0089521; Tue, 26 Jun 2018 21:56:06 GMT (envelope-from np@FreeBSD.org) Message-Id: <201806262156.w5QLu6c0089521@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 26 Jun 2018 21:56:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335680 - head/usr.sbin/cxgbetool X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/usr.sbin/cxgbetool X-SVN-Commit-Revision: 335680 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 21:56:07 -0000 Author: np Date: Tue Jun 26 21:56:06 2018 New Revision: 335680 URL: https://svnweb.freebsd.org/changeset/base/335680 Log: cxgbetool(8): Reject invalid VLAN values. Submitted by: Krishnamraju Eraparaju @ Chelsio MFC after: 1 week Sponsored by: Chelsio Communications Modified: head/usr.sbin/cxgbetool/cxgbetool.c Modified: head/usr.sbin/cxgbetool/cxgbetool.c ============================================================================== --- head/usr.sbin/cxgbetool/cxgbetool.c Tue Jun 26 20:26:57 2018 (r335679) +++ head/usr.sbin/cxgbetool/cxgbetool.c Tue Jun 26 21:56:06 2018 (r335680) @@ -1102,6 +1102,8 @@ del_filter(uint32_t idx, int hashfilter) return doit(CHELSIO_T4_DEL_FILTER, &t); } +#define MAX_VLANID (4095) + static int set_filter(uint32_t idx, int argc, const char *argv[], int hash) { @@ -1308,7 +1310,8 @@ set_filter(uint32_t idx, int argc, const char *argv[], t.fs.newvlan == VLAN_INSERT) { t.fs.vlan = strtoul(argv[start_arg + 1] + 1, &p, 0); - if (p == argv[start_arg + 1] + 1 || p[0] != 0) { + if (p == argv[start_arg + 1] + 1 || p[0] != 0 || + t.fs.vlan > MAX_VLANID) { warnx("invalid vlan \"%s\"", argv[start_arg + 1]); return (EINVAL); From owner-svn-src-all@freebsd.org Tue Jun 26 23:19:56 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 934021020FB8; Tue, 26 Jun 2018 23:19:56 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 41C5B893D6; Tue, 26 Jun 2018 23:19:56 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0A2841AEAE; Tue, 26 Jun 2018 23:19:56 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5QNJtko030385; Tue, 26 Jun 2018 23:19:55 GMT (envelope-from stevek@FreeBSD.org) Received: (from stevek@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5QNJtQd030384; Tue, 26 Jun 2018 23:19:55 GMT (envelope-from stevek@FreeBSD.org) Message-Id: <201806262319.w5QNJtQd030384@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: stevek set sender to stevek@FreeBSD.org using -f From: "Stephen J. Kiernan" Date: Tue, 26 Jun 2018 23:19:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335681 - head/sbin/veriexecctl X-SVN-Group: head X-SVN-Commit-Author: stevek X-SVN-Commit-Paths: head/sbin/veriexecctl X-SVN-Commit-Revision: 335681 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 23:19:56 -0000 Author: stevek Date: Tue Jun 26 23:19:55 2018 New Revision: 335681 URL: https://svnweb.freebsd.org/changeset/base/335681 Log: Revert r335402 While useful as an example, veriexecctl, as it is, has very little practical use, since there is nothing ensuring the integrity of the manifest of hashes. A more appropriate set of utilities will replace it. Deleted: head/sbin/veriexecctl/ From owner-svn-src-all@freebsd.org Tue Jun 26 23:28:04 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4508E1021490; Tue, 26 Jun 2018 23:28:04 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E41B1898B2; Tue, 26 Jun 2018 23:28:03 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C51AC1B04A; Tue, 26 Jun 2018 23:28:03 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5QNS3vZ035406; Tue, 26 Jun 2018 23:28:03 GMT (envelope-from stevek@FreeBSD.org) Received: (from stevek@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5QNS3Vd035405; Tue, 26 Jun 2018 23:28:03 GMT (envelope-from stevek@FreeBSD.org) Message-Id: <201806262328.w5QNS3Vd035405@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: stevek set sender to stevek@FreeBSD.org using -f From: "Stephen J. Kiernan" Date: Tue, 26 Jun 2018 23:28:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335682 - head/sys/modules X-SVN-Group: head X-SVN-Commit-Author: stevek X-SVN-Commit-Paths: head/sys/modules X-SVN-Commit-Revision: 335682 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.26 Precedence: list List-Id: "SVN commit messages 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, 26 Jun 2018 23:28:04 -0000 Author: stevek Date: Tue Jun 26 23:28:03 2018 New Revision: 335682 URL: https://svnweb.freebsd.org/changeset/base/335682 Log: Partial revert of r335399 and r335400: Unhook the MAC/veriexec, fingerprint handlers, and veriexec modules from the kernel modules Makefile. Reviewed by: sjg Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Tue Jun 26 23:19:55 2018 (r335681) +++ head/sys/modules/Makefile Tue Jun 26 23:28:03 2018 (r335682) @@ -235,12 +235,6 @@ SUBDIR= \ mac_seeotheruids \ mac_stub \ mac_test \ - mac_veriexec \ - mac_veriexec_rmd160 \ - mac_veriexec_sha1 \ - mac_veriexec_sha256 \ - mac_veriexec_sha384 \ - mac_veriexec_sha512 \ malo \ md \ mdio \ @@ -392,7 +386,6 @@ SUBDIR= \ uinput \ unionfs \ usb \ - veriexec \ ${_vesa} \ ${_virtio} \ vge \ From owner-svn-src-all@freebsd.org Wed Jun 27 01:28:10 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5B4810267FE; Wed, 27 Jun 2018 01:28:10 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 493678D0AB; Wed, 27 Jun 2018 01:28:10 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2A7C31C3E9; Wed, 27 Jun 2018 01:28:10 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5R1SAWJ096205; Wed, 27 Jun 2018 01:28:10 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5R1SAYo096204; Wed, 27 Jun 2018 01:28:10 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201806270128.w5R1SAYo096204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 27 Jun 2018 01:28:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335683 - head/usr.sbin/powerd X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.sbin/powerd X-SVN-Commit-Revision: 335683 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 01:28:10 -0000 Author: eadler Date: Wed Jun 27 01:28:09 2018 New Revision: 335683 URL: https://svnweb.freebsd.org/changeset/base/335683 Log: powerd: correct ifdef check for ppc Reviewed by: jhibbits Modified: head/usr.sbin/powerd/powerd.c Modified: head/usr.sbin/powerd/powerd.c ============================================================================== --- head/usr.sbin/powerd/powerd.c Tue Jun 26 23:28:03 2018 (r335682) +++ head/usr.sbin/powerd/powerd.c Wed Jun 27 01:28:09 2018 (r335683) @@ -293,7 +293,7 @@ acline_init(void) acline_mode = ac_sysctl; if (vflag) warnx("using sysctl for AC line status"); -#if __powerpc__ +#ifdef __powerpc__ } else if (sysctlnametomib(PMUAC, acline_mib, &acline_mib_len) == 0) { acline_mode = ac_sysctl; if (vflag) From owner-svn-src-all@freebsd.org Wed Jun 27 01:51:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46AB7102735D; Wed, 27 Jun 2018 01:51:19 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EDFD08DAA4; Wed, 27 Jun 2018 01:51:18 +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 CF1761C839; Wed, 27 Jun 2018 01:51:18 +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 w5R1pIBw008038; Wed, 27 Jun 2018 01:51:18 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5R1pIws008036; Wed, 27 Jun 2018 01:51:18 GMT (envelope-from np@FreeBSD.org) Message-Id: <201806270151.w5R1pIws008036@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 27 Jun 2018 01:51:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335684 - head/sys/dev/cxgbe X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe X-SVN-Commit-Revision: 335684 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 01:51:19 -0000 Author: np Date: Wed Jun 27 01:51:17 2018 New Revision: 335684 URL: https://svnweb.freebsd.org/changeset/base/335684 Log: cxgbe(4): Do not leak the filters in the hashfilter table on module unload. MFC after: 1 week Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/t4_filter.c head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Wed Jun 27 01:28:09 2018 (r335683) +++ head/sys/dev/cxgbe/adapter.h Wed Jun 27 01:51:17 2018 (r335684) @@ -1260,6 +1260,7 @@ int t4_filter_rpl(struct sge_iq *, const struct rss_he int t4_hashfilter_ao_rpl(struct sge_iq *, const struct rss_header *, struct mbuf *); int t4_hashfilter_tcb_rpl(struct sge_iq *, const struct rss_header *, struct mbuf *); int t4_del_hashfilter_rpl(struct sge_iq *, const struct rss_header *, struct mbuf *); +void free_hftid_tab(struct tid_info *); static inline struct wrqe * alloc_wrqe(int wr_len, struct sge_wrq *wrq) Modified: head/sys/dev/cxgbe/t4_filter.c ============================================================================== --- head/sys/dev/cxgbe/t4_filter.c Wed Jun 27 01:28:09 2018 (r335683) +++ head/sys/dev/cxgbe/t4_filter.c Wed Jun 27 01:51:17 2018 (r335684) @@ -70,6 +70,46 @@ static int set_hashfilter(struct adapter *, struct t4_ static int del_hashfilter(struct adapter *, struct t4_filter *); static int configure_hashfilter_tcb(struct adapter *, struct filter_entry *); +static int +alloc_hftid_tab(struct tid_info *t, int flags) +{ + + MPASS(t->ntids > 0); + MPASS(t->hftid_tab == NULL); + + t->hftid_tab = malloc(sizeof(*t->hftid_tab) * t->ntids, M_CXGBE, + M_ZERO | flags); + if (t->hftid_tab == NULL) + return (ENOMEM); + mtx_init(&t->hftid_lock, "T4 hashfilters", 0, MTX_DEF); + cv_init(&t->hftid_cv, "t4hfcv"); + + return (0); +} + +void +free_hftid_tab(struct tid_info *t) +{ + int i; + + if (t->hftid_tab != NULL) { + MPASS(t->ntids > 0); + for (i = 0; t->tids_in_use > 0 && i < t->ntids; i++) { + if (t->hftid_tab[i] == NULL) + continue; + free(t->hftid_tab[i], M_CXGBE); + t->tids_in_use--; + } + free(t->hftid_tab, M_CXGBE); + t->hftid_tab = NULL; + } + + if (mtx_initialized(&t->hftid_lock)) { + mtx_destroy(&t->hftid_lock); + cv_destroy(&t->hftid_cv); + } +} + static void insert_hftid(struct adapter *sc, int tid, void *ctx, int ntids) { @@ -653,14 +693,9 @@ set_filter(struct adapter *sc, struct t4_filter *t) } if (t->fs.hash) { if (__predict_false(ti->hftid_tab == NULL)) { - ti->hftid_tab = malloc(sizeof(*ti->hftid_tab) * ti->ntids, - M_CXGBE, M_NOWAIT | M_ZERO); - if (ti->hftid_tab == NULL) { - rc = ENOMEM; + rc = alloc_hftid_tab(&sc->tids, M_NOWAIT); + if (rc != 0) goto done; - } - mtx_init(&ti->hftid_lock, "T4 hashfilters", 0, MTX_DEF); - cv_init(&ti->hftid_cv, "t4hfcv"); } if (__predict_false(sc->tids.atid_tab == NULL)) { rc = alloc_atid_tab(&sc->tids, M_NOWAIT); Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Wed Jun 27 01:28:09 2018 (r335683) +++ head/sys/dev/cxgbe/t4_main.c Wed Jun 27 01:51:17 2018 (r335684) @@ -1403,7 +1403,8 @@ t4_detach_common(device_t dev) free(sc->sge.iqmap, M_CXGBE); free(sc->sge.eqmap, M_CXGBE); free(sc->tids.ftid_tab, M_CXGBE); - free(sc->tids.hftid_tab, M_CXGBE); + if (sc->tids.hftid_tab) + free_hftid_tab(&sc->tids); free(sc->tids.atid_tab, M_CXGBE); free(sc->tids.tid_tab, M_CXGBE); free(sc->tt.tls_rx_ports, M_CXGBE); @@ -1419,10 +1420,6 @@ t4_detach_common(device_t dev) if (mtx_initialized(&sc->tids.ftid_lock)) { mtx_destroy(&sc->tids.ftid_lock); cv_destroy(&sc->tids.ftid_cv); - } - if (mtx_initialized(&sc->tids.hftid_lock)) { - mtx_destroy(&sc->tids.hftid_lock); - cv_destroy(&sc->tids.hftid_cv); } if (mtx_initialized(&sc->tids.atid_lock)) mtx_destroy(&sc->tids.atid_lock); From owner-svn-src-all@freebsd.org Wed Jun 27 02:55:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C08CF1029AFF; Wed, 27 Jun 2018 02:55:31 +0000 (UTC) (envelope-from daichi@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7254F8F750; Wed, 27 Jun 2018 02:55:31 +0000 (UTC) (envelope-from daichi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4FFD41D25C; Wed, 27 Jun 2018 02:55:31 +0000 (UTC) (envelope-from daichi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5R2tVYF041692; Wed, 27 Jun 2018 02:55:31 GMT (envelope-from daichi@FreeBSD.org) Received: (from daichi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5R2tVKB041691; Wed, 27 Jun 2018 02:55:31 GMT (envelope-from daichi@FreeBSD.org) Message-Id: <201806270255.w5R2tVKB041691@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: daichi set sender to daichi@FreeBSD.org using -f From: Daichi GOTO Date: Wed, 27 Jun 2018 02:55:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335685 - head/usr.bin/top X-SVN-Group: head X-SVN-Commit-Author: daichi X-SVN-Commit-Paths: head/usr.bin/top X-SVN-Commit-Revision: 335685 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 02:55:31 -0000 Author: daichi Date: Wed Jun 27 02:55:30 2018 New Revision: 335685 URL: https://svnweb.freebsd.org/changeset/base/335685 Log: top(1): increased the maximum length of command shown by "-a" Reviewed by: eadler Approved by: gnn (mentor) Differential Revision: https://reviews.freebsd.org/D16006 Modified: head/usr.bin/top/machine.c Modified: head/usr.bin/top/machine.c ============================================================================== --- head/usr.bin/top/machine.c Wed Jun 27 01:51:17 2018 (r335684) +++ head/usr.bin/top/machine.c Wed Jun 27 02:55:30 2018 (r335685) @@ -871,7 +871,7 @@ format_next_process(struct handle * xhandle, char *(*g long p_tot, s_tot; char *cmdbuf = NULL; char **args; - const int cmdlen = 128; + const int cmdlen = 256; static struct sbuf* procbuf = NULL; /* clean up from last time. */ From owner-svn-src-all@freebsd.org Wed Jun 27 03:29:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F8AC102ABD7; Wed, 27 Jun 2018 03:29:37 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D8975908EA; Wed, 27 Jun 2018 03:29:36 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B416D1D7CA; Wed, 27 Jun 2018 03:29:36 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5R3Ta3p057986; Wed, 27 Jun 2018 03:29:36 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5R3TaSI057985; Wed, 27 Jun 2018 03:29:36 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201806270329.w5R3TaSI057985@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 27 Jun 2018 03:29:36 +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: r335686 - stable/11/usr.bin/rctl X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/usr.bin/rctl X-SVN-Commit-Revision: 335686 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 03:29:37 -0000 Author: eadler Date: Wed Jun 27 03:29:36 2018 New Revision: 335686 URL: https://svnweb.freebsd.org/changeset/base/335686 Log: MFC r334208: rctl:correct use of "vmem" instead of "vmemoryuse" PR: 228482 Modified: stable/11/usr.bin/rctl/rctl.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/rctl/rctl.8 ============================================================================== --- stable/11/usr.bin/rctl/rctl.8 Wed Jun 27 02:55:30 2018 (r335685) +++ stable/11/usr.bin/rctl/rctl.8 Wed Jun 27 03:29:36 2018 (r335686) @@ -137,13 +137,13 @@ Resources which limit bytes may use prefixes from defines what entity the .Em amount gets accounted for. -For example, rule "loginclass:users:vmem:deny=100M/process" means +For example, rule "loginclass:users:vmemoryuse:deny=100M/process" means that each process of any user belonging to login class "users" may allocate up to 100MB of virtual memory. -Rule "loginclass:users:vmem:deny=100M/user" would mean that for each +Rule "loginclass:users:vmemoryuse:deny=100M/user" would mean that for each user belonging to the login class "users", the sum of virtual memory allocated by all the processes of that user will not exceed 100MB. -Rule "loginclass:users:vmem:deny=100M/loginclass" would mean that the sum of +Rule "loginclass:users:vmemoryuse:deny=100M/loginclass" would mean that the sum of virtual memory allocated by all processes of all users belonging to that login class will not exceed 100MB. .El From owner-svn-src-all@freebsd.org Wed Jun 27 03:50:12 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5991E102C24A; Wed, 27 Jun 2018 03:50:12 +0000 (UTC) (envelope-from miwi@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0672E917C4; Wed, 27 Jun 2018 03:50:12 +0000 (UTC) (envelope-from miwi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D588C1DB16; Wed, 27 Jun 2018 03:50:11 +0000 (UTC) (envelope-from miwi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5R3oBLW067893; Wed, 27 Jun 2018 03:50:11 GMT (envelope-from miwi@FreeBSD.org) Received: (from miwi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5R3oBMN067892; Wed, 27 Jun 2018 03:50:11 GMT (envelope-from miwi@FreeBSD.org) Message-Id: <201806270350.w5R3oBMN067892@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: miwi set sender to miwi@FreeBSD.org using -f From: Martin Wilke Date: Wed, 27 Jun 2018 03:50:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335687 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: miwi X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 335687 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 03:50:12 -0000 Author: miwi Date: Wed Jun 27 03:50:11 2018 New Revision: 335687 URL: https://svnweb.freebsd.org/changeset/base/335687 Log: - Added myself to committers-src.dot Approved by: araujo (mentor) Differential Revision: https://reviews.freebsd.org/D16030 Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Wed Jun 27 03:29:36 2018 (r335686) +++ head/share/misc/committers-src.dot Wed Jun 27 03:50:11 2018 (r335687) @@ -251,6 +251,7 @@ maxim [label="Maxim Konovalov\nmaxim@FreeBSD.org\n2002 mdf [label="Matthew Fleming\nmdf@FreeBSD.org\n2010/06/04"] mdodd [label="Matthew N. Dodd\nmdodd@FreeBSD.org\n1999/07/27"] melifaro [label="Alexander V. Chernikov\nmelifaro@FreeBSD.org\n2011/10/04"] +miwi [label="Martin Wilke\nmiwi@FreeBSD.org\n2011/02/18\n2018/06/14"] mizhka [label="Michael Zhilin\nmizhka@FreeBSD.org\n2016/07/19"] mjacob [label="Matt Jacob\nmjacob@FreeBSD.org\n1997/08/13"] mjg [label="Mateusz Guzik\nmjg@FreeBSD.org\n2012/06/04"] @@ -396,6 +397,8 @@ andre -> qingli andrew -> manu anholt -> jkim + +araujo -> miwi avg -> art avg -> eugen From owner-svn-src-all@freebsd.org Wed Jun 27 03:58:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1314102C76A; Wed, 27 Jun 2018 03:58:03 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5F3EF91CB4; Wed, 27 Jun 2018 03:58:03 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 405651DCAB; Wed, 27 Jun 2018 03:58:03 +0000 (UTC) (envelope-from araujo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5R3w3GY073215; Wed, 27 Jun 2018 03:58:03 GMT (envelope-from araujo@FreeBSD.org) Received: (from araujo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5R3w2LB073213; Wed, 27 Jun 2018 03:58:02 GMT (envelope-from araujo@FreeBSD.org) Message-Id: <201806270358.w5R3w2LB073213@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: araujo set sender to araujo@FreeBSD.org using -f From: Marcelo Araujo Date: Wed, 27 Jun 2018 03:58: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: r335688 - stable/11/usr.sbin/bhyve X-SVN-Group: stable-11 X-SVN-Commit-Author: araujo X-SVN-Commit-Paths: stable/11/usr.sbin/bhyve X-SVN-Commit-Revision: 335688 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 03:58:04 -0000 Author: araujo Date: Wed Jun 27 03:58:02 2018 New Revision: 335688 URL: https://svnweb.freebsd.org/changeset/base/335688 Log: MFC r333622, r334019, r334084 r333622: vq_getchain() can return -1 if some descriptor(s) are invalid and prints a diagnostic message. So we do a sanity checking on the return value of vq_getchain(). Spotted by: gcc49 Reviewed by: avg Sponsored by: iXsystems Inc. Differential Revision: https://reviews.freebsd.org/D15388 r334019: Include atkbdc header where there are declared the prototype functions atkbdc_event and atkbdc_init. Sponsored by: iXsystems Inc. r334084: pthread_rwlock_unlock(3) returns 0 if successful, otherwise an error number will be returned to indicate the error, so I'm applying an assert(3) to do a sanity check of the return value. Reported by: Coverity CID: 1391235, 1193654 and 1193651 Reviewed by: grehan Sponsored by: iXsystems Inc. Differential Revision: https://reviews.freebsd.org/D15533 Modified: stable/11/usr.sbin/bhyve/atkbdc.c stable/11/usr.sbin/bhyve/mem.c stable/11/usr.sbin/bhyve/pci_virtio_console.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bhyve/atkbdc.c ============================================================================== --- stable/11/usr.sbin/bhyve/atkbdc.c Wed Jun 27 03:50:11 2018 (r335687) +++ stable/11/usr.sbin/bhyve/atkbdc.c Wed Jun 27 03:58:02 2018 (r335688) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include "acpi.h" +#include "atkbdc.h" #include "inout.h" #include "pci_emul.h" #include "pci_irq.h" Modified: stable/11/usr.sbin/bhyve/mem.c ============================================================================== --- stable/11/usr.sbin/bhyve/mem.c Wed Jun 27 03:50:11 2018 (r335687) +++ stable/11/usr.sbin/bhyve/mem.c Wed Jun 27 03:58:02 2018 (r335688) @@ -123,6 +123,7 @@ mmio_rb_add(struct mmio_rb_tree *rbt, struct mmio_rb_r static void mmio_rb_dump(struct mmio_rb_tree *rbt) { + int perror; struct mmio_rb_range *np; pthread_rwlock_rdlock(&mmio_rwlock); @@ -130,7 +131,8 @@ mmio_rb_dump(struct mmio_rb_tree *rbt) printf(" %lx:%lx, %s\n", np->mr_base, np->mr_end, np->mr_param.name); } - pthread_rwlock_unlock(&mmio_rwlock); + perror = pthread_rwlock_unlock(&mmio_rwlock); + assert(perror == 0); } #endif @@ -164,7 +166,7 @@ emulate_mem(struct vmctx *ctx, int vcpu, uint64_t padd { struct mmio_rb_range *entry; - int err, immutable; + int err, perror, immutable; pthread_rwlock_rdlock(&mmio_rwlock); /* @@ -182,7 +184,8 @@ emulate_mem(struct vmctx *ctx, int vcpu, uint64_t padd /* Update the per-vCPU cache */ mmio_hint[vcpu] = entry; } else if (mmio_rb_lookup(&mmio_rb_fallback, paddr, &entry)) { - pthread_rwlock_unlock(&mmio_rwlock); + perror = pthread_rwlock_unlock(&mmio_rwlock); + assert(perror == 0); return (ESRCH); } } @@ -201,15 +204,20 @@ emulate_mem(struct vmctx *ctx, int vcpu, uint64_t padd * config space window as 'immutable' the deadlock can be avoided. */ immutable = (entry->mr_param.flags & MEM_F_IMMUTABLE); - if (immutable) - pthread_rwlock_unlock(&mmio_rwlock); + if (immutable) { + perror = pthread_rwlock_unlock(&mmio_rwlock); + assert(perror == 0); + } err = vmm_emulate_instruction(ctx, vcpu, paddr, vie, paging, mem_read, mem_write, &entry->mr_param); - if (!immutable) - pthread_rwlock_unlock(&mmio_rwlock); + if (!immutable) { + perror = pthread_rwlock_unlock(&mmio_rwlock); + assert(perror == 0); + } + return (err); } @@ -217,7 +225,7 @@ static int register_mem_int(struct mmio_rb_tree *rbt, struct mem_range *memp) { struct mmio_rb_range *entry, *mrp; - int err; + int err, perror; err = 0; @@ -230,7 +238,8 @@ register_mem_int(struct mmio_rb_tree *rbt, struct mem_ pthread_rwlock_wrlock(&mmio_rwlock); if (mmio_rb_lookup(rbt, memp->base, &entry) != 0) err = mmio_rb_add(rbt, mrp); - pthread_rwlock_unlock(&mmio_rwlock); + perror = pthread_rwlock_unlock(&mmio_rwlock); + assert(perror == 0); if (err) free(mrp); } else @@ -258,7 +267,7 @@ unregister_mem(struct mem_range *memp) { struct mem_range *mr; struct mmio_rb_range *entry = NULL; - int err, i; + int err, perror, i; pthread_rwlock_wrlock(&mmio_rwlock); err = mmio_rb_lookup(&mmio_rb_root, memp->base, &entry); @@ -275,7 +284,8 @@ unregister_mem(struct mem_range *memp) mmio_hint[i] = NULL; } } - pthread_rwlock_unlock(&mmio_rwlock); + perror = pthread_rwlock_unlock(&mmio_rwlock); + assert(perror == 0); if (entry) free(entry); Modified: stable/11/usr.sbin/bhyve/pci_virtio_console.c ============================================================================== --- stable/11/usr.sbin/bhyve/pci_virtio_console.c Wed Jun 27 03:50:11 2018 (r335687) +++ stable/11/usr.sbin/bhyve/pci_virtio_console.c Wed Jun 27 03:58:02 2018 (r335688) @@ -556,6 +556,7 @@ pci_vtcon_notify_tx(void *vsc, struct vqueue_info *vq) while (vq_has_descs(vq)) { n = vq_getchain(vq, &idx, iov, 1, flags); + assert(n >= 1); if (port != NULL) port->vsp_cb(port, port->vsp_arg, iov, 1); From owner-svn-src-all@freebsd.org Wed Jun 27 04:10:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36C68102CEE2; Wed, 27 Jun 2018 04:10:49 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CDA8F9223E; Wed, 27 Jun 2018 04:10:48 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AFE081DE73; Wed, 27 Jun 2018 04:10:48 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5R4AmwE078901; Wed, 27 Jun 2018 04:10:48 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5R4Amxa078898; Wed, 27 Jun 2018 04:10:48 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201806270410.w5R4Amxa078898@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 27 Jun 2018 04:10:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335689 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 335689 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 04:10:49 -0000 Author: imp Date: Wed Jun 27 04:10:48 2018 New Revision: 335689 URL: https://svnweb.freebsd.org/changeset/base/335689 Log: Create new devctl_safe_quote_sb to copy a source string into a struct sbuf to make it safe. Callers are expected to add the " " around it, if needed. Sponsored by: Netflix Differential Review: https://reviews.freebsd.org/D16026 Modified: head/sys/kern/subr_bus.c head/sys/sys/bus.h Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Wed Jun 27 03:58:02 2018 (r335688) +++ head/sys/kern/subr_bus.c Wed Jun 27 04:10:48 2018 (r335689) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -880,6 +881,29 @@ devctl_safe_quote(char *dst, const char *src, size_t l *walker++ = *src++; } *walker = '\0'; +} + +/** + * @brief safely quotes strings that might have double quotes in them. + * + * The devctl protocol relies on quoted strings having matching quotes. + * This routine quotes any internal quotes so the resulting string + * is safe to pass to snprintf to construct, for example pnp info strings. + * Strings are always terminated with a NUL, but may be truncated if longer + * than @p len bytes after quotes. + * + * @param sb sbuf to place the characters into + * @param src Original buffer. + */ +void +devctl_safe_quote_sb(struct sbuf *sb, const char *src) +{ + + while (*src != '\0') { + if (*src == '"' || *src == '\\') + sbuf_putc(sb, '\\'); + sbuf_putc(sb, *src++); + } } /* End of /dev/devctl code */ Modified: head/sys/sys/bus.h ============================================================================== --- head/sys/sys/bus.h Wed Jun 27 03:58:02 2018 (r335688) +++ head/sys/sys/bus.h Wed Jun 27 04:10:48 2018 (r335689) @@ -156,7 +156,9 @@ void devctl_notify(const char *__system, const char *_ const char *__type, const char *__data); void devctl_queue_data_f(char *__data, int __flags); void devctl_queue_data(char *__data); -void devctl_safe_quote(char *__dst, const char *__src, size_t len); +void devctl_safe_quote(char *__dst, const char *__src, size_t __len); +struct sbuf; +void devctl_safe_quote_sb(struct sbuf *__sb, const char *__src); /** * Device name parsers. Hook to allow device enumerators to map From owner-svn-src-all@freebsd.org Wed Jun 27 04:11:10 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93268102CF34; Wed, 27 Jun 2018 04:11:10 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48CFF92474; Wed, 27 Jun 2018 04:11:10 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 29F921DE8C; Wed, 27 Jun 2018 04:11:10 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5R4B9L3078995; Wed, 27 Jun 2018 04:11:09 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5R4B9ZB078994; Wed, 27 Jun 2018 04:11:09 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201806270411.w5R4B9ZB078994@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 27 Jun 2018 04:11:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335690 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 335690 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 04:11:10 -0000 Author: imp Date: Wed Jun 27 04:11:09 2018 New Revision: 335690 URL: https://svnweb.freebsd.org/changeset/base/335690 Log: Fix devctl generation for core files. We have a problem with vn_fullpath_global when the file exists. Work around it by printing the full path if the core file name starts with /, or current working directory followed by the filename if not. Sponsored by: Netflix Differential Review: https://reviews.freebsd.org/D16026 Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Wed Jun 27 04:10:48 2018 (r335689) +++ head/sys/kern/kern_sig.c Wed Jun 27 04:11:09 2018 (r335690) @@ -3431,24 +3431,6 @@ out: return (0); } -static int -coredump_sanitise_path(const char *path) -{ - size_t i; - - /* - * Only send a subset of ASCII to devd(8) because it - * might pass these strings to sh -c. - */ - for (i = 0; path[i]; i++) - if (!(isalpha(path[i]) || isdigit(path[i])) && - path[i] != '/' && path[i] != '.' && - path[i] != '-') - return (0); - - return (1); -} - /* * Dump a process' core. The main routine does some * policy checking, and creates the name of the coredump; @@ -3469,11 +3451,8 @@ coredump(struct thread *td) char *name; /* name of corefile */ void *rl_cookie; off_t limit; - char *data = NULL; char *fullpath, *freepath = NULL; - size_t len; - static const char comm_name[] = "comm="; - static const char core_name[] = "core="; + struct sbuf *sb; PROC_LOCK_ASSERT(p, MA_OWNED); MPASS((p->p_flag & P_HADTHREADS) == 0 || p->p_singlethread == td); @@ -3556,23 +3535,35 @@ coredump(struct thread *td) */ if (error != 0 || coredump_devctl == 0) goto out; - len = MAXPATHLEN * 2 + sizeof(comm_name) - 1 + - sizeof(' ') + sizeof(core_name) - 1; - data = malloc(len, M_TEMP, M_WAITOK); + sb = sbuf_new_auto(); if (vn_fullpath_global(td, p->p_textvp, &fullpath, &freepath) != 0) - goto out; - if (!coredump_sanitise_path(fullpath)) - goto out; - snprintf(data, len, "%s%s ", comm_name, fullpath); + goto out2; + sbuf_printf(sb, "comm=\""); + devctl_safe_quote_sb(sb, fullpath); free(freepath, M_TEMP); - freepath = NULL; - if (vn_fullpath_global(td, vp, &fullpath, &freepath) != 0) - goto out; - if (!coredump_sanitise_path(fullpath)) - goto out; - strlcat(data, core_name, len); - strlcat(data, fullpath, len); - devctl_notify("kernel", "signal", "coredump", data); + sbuf_printf(sb, "\" core=\""); + + /* + * We can't lookup core file vp directly. When we're replacing a core, and + * other random times, we flush the name cache, so it will fail. Instead, + * if the path of the core is relative, add the current dir in front if it. + */ + if (name[0] != '/') { + fullpath = malloc(MAXPATHLEN, M_TEMP, M_WAITOK); + if (kern___getcwd(td, fullpath, UIO_SYSSPACE, MAXPATHLEN, MAXPATHLEN) != 0) { + free(fullpath, M_TEMP); + goto out2; + } + devctl_safe_quote_sb(sb, fullpath); + free(fullpath, M_TEMP); + sbuf_putc(sb, '/'); + } + devctl_safe_quote_sb(sb, name); + sbuf_printf(sb, "\""); + if (sbuf_finish(sb) == 0) + devctl_notify("kernel", "signal", "coredump", sbuf_data(sb)); +out2: + sbuf_delete(sb); out: error1 = vn_close(vp, FWRITE, cred, td); if (error == 0) @@ -3580,8 +3571,6 @@ out: #ifdef AUDIT audit_proc_coredump(td, name, error); #endif - free(freepath, M_TEMP); - free(data, M_TEMP); free(name, M_TEMP); return (error); } From owner-svn-src-all@freebsd.org Wed Jun 27 04:11:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 513D2102CF61; Wed, 27 Jun 2018 04:11:18 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CA5B59253B; Wed, 27 Jun 2018 04:11:16 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 10FF21DE92; Wed, 27 Jun 2018 04:11:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5R4BE34079049; Wed, 27 Jun 2018 04:11:14 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5R4BECJ079048; Wed, 27 Jun 2018 04:11:14 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201806270411.w5R4BECJ079048@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 27 Jun 2018 04:11:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335691 - head/sys/dev/pccard X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/pccard X-SVN-Commit-Revision: 335691 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 04:11:18 -0000 Author: imp Date: Wed Jun 27 04:11:14 2018 New Revision: 335691 URL: https://svnweb.freebsd.org/changeset/base/335691 Log: pccard: recode to use devctl_safe_quote_sb instead of devctl_safe_quote. Sponsored by: Netflix Differential Review: https://reviews.freebsd.org/D16026 Modified: head/sys/dev/pccard/pccard.c Modified: head/sys/dev/pccard/pccard.c ============================================================================== --- head/sys/dev/pccard/pccard.c Wed Jun 27 04:11:09 2018 (r335690) +++ head/sys/dev/pccard/pccard.c Wed Jun 27 04:11:14 2018 (r335691) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -1036,13 +1037,18 @@ pccard_child_pnpinfo_str(device_t bus, device_t child, struct pccard_ivar *devi = PCCARD_IVAR(child); struct pccard_function *pf = devi->pf; struct pccard_softc *sc = PCCARD_SOFTC(bus); - char cis0[128], cis1[128]; + struct sbuf sb; - devctl_safe_quote(cis0, sc->card.cis1_info[0], sizeof(cis0)); - devctl_safe_quote(cis1, sc->card.cis1_info[1], sizeof(cis1)); - snprintf(buf, buflen, "manufacturer=0x%04x product=0x%04x " - "cisvendor=\"%s\" cisproduct=\"%s\" function_type=%d", - sc->card.manufacturer, sc->card.product, cis0, cis1, pf->function); + sbuf_new(&sb, buf, buflen, SBUF_FIXEDLEN | SBUF_INCLUDENUL); + sbuf_printf(&sb, "manufacturer=0x%04x product=0x%04x " + "cisvendor=\"", sc->card.manufacturer, sc->card.product); + devctl_safe_quote_sb(&sb, sc->card.cis1_info[0]); + sbuf_printf(&sb, "\" cisproduct=\""); + devctl_safe_quote_sb(&sb, sc->card.cis1_info[1]); + sbuf_printf(&sb, "\" function_type=%d", pf->function); + sbuf_finish(&sb); + sbuf_delete(&sb); + return (0); } From owner-svn-src-all@freebsd.org Wed Jun 27 04:11:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B631F102CF80; Wed, 27 Jun 2018 04:11:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6159192572; Wed, 27 Jun 2018 04:11:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2AD3D1DE99; Wed, 27 Jun 2018 04:11:20 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5R4BJg7079104; Wed, 27 Jun 2018 04:11:19 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5R4BJHu079102; Wed, 27 Jun 2018 04:11:19 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201806270411.w5R4BJHu079102@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 27 Jun 2018 04:11:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335692 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 335692 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 04:11:21 -0000 Author: imp Date: Wed Jun 27 04:11:19 2018 New Revision: 335692 URL: https://svnweb.freebsd.org/changeset/base/335692 Log: Remove devctl_safe_quote since it's now unused. Sponsored by: Netflix Differential Review: https://reviews.freebsd.org/D16026 Modified: head/sys/kern/subr_bus.c head/sys/sys/bus.h Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Wed Jun 27 04:11:14 2018 (r335691) +++ head/sys/kern/subr_bus.c Wed Jun 27 04:11:19 2018 (r335692) @@ -860,38 +860,6 @@ sysctl_devctl_queue(SYSCTL_HANDLER_ARGS) * Strings are always terminated with a NUL, but may be truncated if longer * than @p len bytes after quotes. * - * @param dst Buffer to hold the string. Must be at least @p len bytes long - * @param src Original buffer. - * @param len Length of buffer pointed to by @dst, including trailing NUL - */ -void -devctl_safe_quote(char *dst, const char *src, size_t len) -{ - char *walker = dst, *ep = dst + len - 1; - - if (len == 0) - return; - while (src != NULL && walker < ep) - { - if (*src == '"' || *src == '\\') { - if (ep - walker < 2) - break; - *walker++ = '\\'; - } - *walker++ = *src++; - } - *walker = '\0'; -} - -/** - * @brief safely quotes strings that might have double quotes in them. - * - * The devctl protocol relies on quoted strings having matching quotes. - * This routine quotes any internal quotes so the resulting string - * is safe to pass to snprintf to construct, for example pnp info strings. - * Strings are always terminated with a NUL, but may be truncated if longer - * than @p len bytes after quotes. - * * @param sb sbuf to place the characters into * @param src Original buffer. */ Modified: head/sys/sys/bus.h ============================================================================== --- head/sys/sys/bus.h Wed Jun 27 04:11:14 2018 (r335691) +++ head/sys/sys/bus.h Wed Jun 27 04:11:19 2018 (r335692) @@ -156,7 +156,6 @@ void devctl_notify(const char *__system, const char *_ const char *__type, const char *__data); void devctl_queue_data_f(char *__data, int __flags); void devctl_queue_data(char *__data); -void devctl_safe_quote(char *__dst, const char *__src, size_t __len); struct sbuf; void devctl_safe_quote_sb(struct sbuf *__sb, const char *__src); From owner-svn-src-all@freebsd.org Wed Jun 27 04:37:25 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 450BB102DDA8; Wed, 27 Jun 2018 04:37:25 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EA9CA932F2; Wed, 27 Jun 2018 04:37:24 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CBB571E336; Wed, 27 Jun 2018 04:37:24 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5R4bOZu093573; Wed, 27 Jun 2018 04:37:24 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5R4bNRQ093566; Wed, 27 Jun 2018 04:37:23 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201806270437.w5R4bNRQ093566@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 27 Jun 2018 04:37:23 +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: r335693 - stable/11/usr.bin/mail X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11/usr.bin/mail X-SVN-Commit-Revision: 335693 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 04:37:25 -0000 Author: eadler Date: Wed Jun 27 04:37:22 2018 New Revision: 335693 URL: https://svnweb.freebsd.org/changeset/base/335693 Log: MFC r302776, r302799: mail(1): Bring some fixes from other BSDs. - Use varargs properly - Use pid_t - Better handling of error conditions on forked jobs. - Some prototype and warning cleanups. Fix missing forked job changes from r302776 in wait_child(). Modified: stable/11/usr.bin/mail/cmd1.c stable/11/usr.bin/mail/cmd2.c stable/11/usr.bin/mail/cmd3.c stable/11/usr.bin/mail/edit.c stable/11/usr.bin/mail/extern.h stable/11/usr.bin/mail/fio.c stable/11/usr.bin/mail/getname.c stable/11/usr.bin/mail/popen.c Modified: stable/11/usr.bin/mail/cmd1.c ============================================================================== --- stable/11/usr.bin/mail/cmd1.c Wed Jun 27 04:11:19 2018 (r335692) +++ stable/11/usr.bin/mail/cmd1.c Wed Jun 27 04:37:22 2018 (r335693) @@ -439,7 +439,7 @@ folders(void) } if ((cmd = value("LISTER")) == NULL) cmd = "ls"; - (void)run_command(cmd, 0, -1, -1, dirname, NULL, NULL); + (void)run_command(cmd, 0, -1, -1, dirname, NULL); return (0); } Modified: stable/11/usr.bin/mail/cmd2.c ============================================================================== --- stable/11/usr.bin/mail/cmd2.c Wed Jun 27 04:11:19 2018 (r335692) +++ stable/11/usr.bin/mail/cmd2.c Wed Jun 27 04:37:22 2018 (r335693) @@ -130,8 +130,9 @@ hitit: * so we can discard when the user quits. */ int -save(char str[]) +save(void *v) { + char *str = v; return (save1(str, 1, "save", saveignore)); } @@ -140,8 +141,9 @@ save(char str[]) * Copy a message to a file without affected its saved-ness */ int -copycmd(char str[]) +copycmd(void *v) { + char *str = v; return (save1(str, 0, "copy", saveignore)); } Modified: stable/11/usr.bin/mail/cmd3.c ============================================================================== --- stable/11/usr.bin/mail/cmd3.c Wed Jun 27 04:11:19 2018 (r335692) +++ stable/11/usr.bin/mail/cmd3.c Wed Jun 27 04:37:22 2018 (r335693) @@ -79,7 +79,7 @@ dosh(char *str __unused) if ((sh = value("SHELL")) == NULL) sh = _PATH_CSHELL; - (void)run_command(sh, 0, -1, -1, NULL, NULL, NULL); + (void)run_command(sh, 0, -1, -1, NULL); (void)signal(SIGINT, sigint); printf("\n"); return (0); @@ -102,7 +102,7 @@ bangexp(char *str, size_t strsize) n = sizeof(bangbuf); while (*cp != '\0') { if (*cp == '!') { - if (n < strlen(lastbang)) { + if (n < (int)strlen(lastbang)) { overf: printf("Command buffer overflow\n"); return (-1); Modified: stable/11/usr.bin/mail/edit.c ============================================================================== --- stable/11/usr.bin/mail/edit.c Wed Jun 27 04:11:19 2018 (r335692) +++ stable/11/usr.bin/mail/edit.c Wed Jun 27 04:37:22 2018 (r335693) @@ -180,7 +180,7 @@ run_editor(FILE *fp, off_t size, int type, int readonl nf = NULL; if ((edit = value(type == 'e' ? "EDITOR" : "VISUAL")) == NULL) edit = type == 'e' ? _PATH_EX : _PATH_VI; - if (run_command(edit, 0, -1, -1, tempname, NULL, NULL) < 0) { + if (run_command(edit, 0, -1, -1, tempname, NULL) < 0) { (void)rm(tempname); goto out; } Modified: stable/11/usr.bin/mail/extern.h ============================================================================== --- stable/11/usr.bin/mail/extern.h Wed Jun 27 04:11:19 2018 (r335692) +++ stable/11/usr.bin/mail/extern.h Wed Jun 27 04:37:22 2018 (r335693) @@ -49,7 +49,7 @@ char *copyin(char *, char **); char *detract(struct name *, int); char *expand(char *); char *getdeadletter(void); -char *getname(int); +char *getname(uid_t); char *hfield(const char *, struct message *); FILE *infix(struct header *, FILE *); char *ishfield(char [], char *, const char *); @@ -95,7 +95,7 @@ void collhup(int); void collint(int); void collstop(int); void commands(void); -int copycmd(char []); +int copycmd(void *v); int core(void); int count(struct name *); int delete(int []); @@ -130,7 +130,7 @@ int getfold(char *, int); int gethfield(FILE *, char [], int, char **); int getmsglist(char *, int *, int); int getrawlist(char [], char **, int); -int getuserid(char []); +uid_t getuserid(char []); int grabh(struct header *, int); int group(char **); void hangup(int); @@ -198,8 +198,8 @@ int respond(int *); int retfield(char *[]); int rexit(int); int rm(char *); -int run_command(char *, sigset_t *, int, int, char *, char *, char *); -int save(char []); +int run_command(char *, sigset_t *, int, int, ...); +int save(void *v); int save1(char [], int, const char *, struct ignoretab *); void savedeadletter(FILE *); int saveigfield(char *[]); @@ -223,7 +223,7 @@ void sort(char **); int source(char **); void spreserve(void); void sreset(void); -int start_command(char *, sigset_t *, int, int, char *, char *, char *); +int start_command(char *, sigset_t *, int, int, ...); void statusput(struct message *, FILE *, char *); void stop(int); int stouch(int []); Modified: stable/11/usr.bin/mail/fio.c ============================================================================== --- stable/11/usr.bin/mail/fio.c Wed Jun 27 04:11:19 2018 (r335692) +++ stable/11/usr.bin/mail/fio.c Wed Jun 27 04:37:22 2018 (r335693) @@ -235,7 +235,7 @@ makemessage(FILE *f, int omsgCount) size -= (omsgCount + 1) * sizeof(struct message); (void)fflush(f); (void)lseek(fileno(f), (off_t)sizeof(*message), 0); - if (read(fileno(f), (char *)&message[omsgCount], size) != size) + if (read(fileno(f), (void *)&message[omsgCount], size) != size) errx(1, "Message temporary file corrupted"); message[msgCount].m_size = 0; message[msgCount].m_lines = 0; Modified: stable/11/usr.bin/mail/getname.c ============================================================================== --- stable/11/usr.bin/mail/getname.c Wed Jun 27 04:11:19 2018 (r335692) +++ stable/11/usr.bin/mail/getname.c Wed Jun 27 04:37:22 2018 (r335693) @@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$"); * Search the passwd file for a uid. Return name on success, NULL on failure. */ char * -getname(int uid) +getname(uid_t uid) { struct passwd *pw; @@ -58,7 +58,7 @@ getname(int uid) * Convert the passed name to a user id and return it. Return -1 * on error. */ -int +uid_t getuserid(char name[]) { struct passwd *pw; Modified: stable/11/usr.bin/mail/popen.c ============================================================================== --- stable/11/usr.bin/mail/popen.c Wed Jun 27 04:11:19 2018 (r335692) +++ stable/11/usr.bin/mail/popen.c Wed Jun 27 04:37:22 2018 (r335693) @@ -38,6 +38,8 @@ __FBSDID("$FreeBSD$"); #include "rcv.h" #include #include +#include +#include #include "extern.h" #define READ 0 @@ -46,22 +48,23 @@ __FBSDID("$FreeBSD$"); struct fp { FILE *fp; int pipe; - int pid; + pid_t pid; struct fp *link; }; static struct fp *fp_head; struct child { - int pid; + pid_t pid; char done; char free; int status; struct child *link; }; -static struct child *child; -static struct child *findchild(int); +static struct child *child, *child_freelist = NULL; + static void delchild(struct child *); -static int file_pid(FILE *); +static pid_t file_pid(FILE *); +static pid_t start_commandv(char *, sigset_t *, int, int, va_list); FILE * Fopen(const char *path, const char *mode) @@ -90,6 +93,7 @@ Fdopen(int fd, const char *mode) int Fclose(FILE *fp) { + unregister_file(fp); return (fclose(fp)); } @@ -99,7 +103,7 @@ Popen(char *cmd, const char *mode) { int p[2]; int myside, hisside, fd0, fd1; - int pid; + pid_t pid; sigset_t nset; FILE *fp; @@ -109,15 +113,15 @@ Popen(char *cmd, const char *mode) (void)fcntl(p[WRITE], F_SETFD, 1); if (*mode == 'r') { myside = p[READ]; - fd0 = -1; - hisside = fd1 = p[WRITE]; + hisside = fd0 = fd1 = p[WRITE]; } else { myside = p[WRITE]; hisside = fd0 = p[READ]; fd1 = -1; } (void)sigemptyset(&nset); - if ((pid = start_command(cmd, &nset, fd0, fd1, NULL, NULL, NULL)) < 0) { + pid = start_command(value("SHELL"), &nset, fd0, fd1, "-c", cmd, NULL); + if (pid < 0) { (void)close(p[READ]); (void)close(p[WRITE]); return (NULL); @@ -158,7 +162,7 @@ close_all_files(void) } void -register_file(FILE *fp, int pipe, int pid) +register_file(FILE *fp, int pipe, pid_t pid) { struct fp *fpp; @@ -186,7 +190,7 @@ unregister_file(FILE *fp) /*NOTREACHED*/ } -int +pid_t file_pid(FILE *fp) { struct fp *p; @@ -200,30 +204,17 @@ file_pid(FILE *fp) /* * Run a command without a shell, with optional arguments and splicing - * of stdin and stdout. The command name can be a sequence of words. + * of stdin (-1 means none) and stdout. The command name can be a sequence + * of words. * Signals must be handled by the caller. - * "Mask" contains the signals to ignore in the new process. - * SIGINT is enabled unless it's in the mask. + * "nset" contains the signals to ignore in the new process. + * SIGINT is enabled unless it's in "nset". */ -/*VARARGS4*/ -int -run_command(char *cmd, sigset_t *mask, int infd, int outfd, char *a0, - char *a1, char *a2) +static pid_t +start_commandv(char *cmd, sigset_t *nset, int infd, int outfd, va_list args) { - int pid; + pid_t pid; - if ((pid = start_command(cmd, mask, infd, outfd, a0, a1, a2)) < 0) - return (-1); - return (wait_command(pid)); -} - -/*VARARGS4*/ -int -start_command(char *cmd, sigset_t *mask, int infd, int outfd, char *a0, - char *a1, char *a2) -{ - int pid; - if ((pid = fork()) < 0) { warn("fork"); return (-1); @@ -232,11 +223,10 @@ start_command(char *cmd, sigset_t *mask, int infd, int char *argv[100]; int i = getrawlist(cmd, argv, sizeof(argv) / sizeof(*argv)); - if ((argv[i++] = a0) != NULL && - (argv[i++] = a1) != NULL && - (argv[i++] = a2) != NULL) - argv[i] = NULL; - prepare_child(mask, infd, outfd); + while ((argv[i++] = va_arg(args, char *))) + ; + argv[i] = NULL; + prepare_child(nset, infd, outfd); execvp(argv[0], argv); warn("%s", argv[0]); _exit(1); @@ -244,6 +234,32 @@ start_command(char *cmd, sigset_t *mask, int infd, int return (pid); } +int +run_command(char *cmd, sigset_t *nset, int infd, int outfd, ...) +{ + pid_t pid; + va_list args; + + va_start(args, outfd); + pid = start_commandv(cmd, nset, infd, outfd, args); + va_end(args); + if (pid < 0) + return -1; + return wait_command(pid); +} + +int +start_command(char *cmd, sigset_t *nset, int infd, int outfd, ...) +{ + va_list args; + int r; + + va_start(args, outfd); + r = start_commandv(cmd, nset, infd, outfd, args); + va_end(args); + return r; +} + void prepare_child(sigset_t *nset, int infd, int outfd) { @@ -268,7 +284,7 @@ prepare_child(sigset_t *nset, int infd, int outfd) } int -wait_command(int pid) +wait_command(pid_t pid) { if (wait_child(pid) < 0) { @@ -279,7 +295,7 @@ wait_command(int pid) } static struct child * -findchild(int pid) +findchild(pid_t pid, int dont_alloc) { struct child **cpp; @@ -287,9 +303,16 @@ findchild(int pid) cpp = &(*cpp)->link) ; if (*cpp == NULL) { - *cpp = malloc(sizeof(struct child)); - if (*cpp == NULL) - err(1, "Out of memory"); + if (dont_alloc) + return(NULL); + if (child_freelist) { + *cpp = child_freelist; + child_freelist = (*cpp)->link; + } else { + *cpp = malloc(sizeof(struct child)); + if (*cpp == NULL) + err(1, "malloc"); + } (*cpp)->pid = pid; (*cpp)->done = (*cpp)->free = 0; (*cpp)->link = NULL; @@ -305,19 +328,22 @@ delchild(struct child *cp) for (cpp = &child; *cpp != cp; cpp = &(*cpp)->link) ; *cpp = cp->link; - (void)free(cp); + cp->link = child_freelist; + child_freelist = cp; } /*ARGSUSED*/ void sigchild(int signo __unused) { - int pid; + pid_t pid; int status; struct child *cp; + int save_errno; + save_errno = errno; while ((pid = waitpid(-1, &status, WNOHANG)) > 0) { - cp = findchild(pid); + cp = findchild(pid, 1); if (cp->free) delchild(cp); else { @@ -325,6 +351,7 @@ sigchild(int signo __unused) cp->status = status; } } + errno = save_errno; } int wait_status; @@ -333,41 +360,51 @@ int wait_status; * Wait for a specific child to die. */ int -wait_child(int pid) +wait_child(pid_t pid) { - sigset_t nset, oset; struct child *cp; + sigset_t nset, oset; + pid_t rv = 0; (void)sigemptyset(&nset); (void)sigaddset(&nset, SIGCHLD); - (void)sigprocmask(SIG_BLOCK, &nset, &oset); - - cp = findchild(pid); - - while (!cp->done) - (void)sigsuspend(&oset); - wait_status = cp->status; - delchild(cp); + (void)sigprocmask(SIG_BLOCK, &nset, &oset); + /* + * If we have not already waited on the pid (via sigchild) + * wait on it now. Otherwise, use the wait status stashed + * by sigchild. + */ + cp = findchild(pid, 1); + if (cp == NULL || !cp->done) + rv = waitpid(pid, &wait_status, 0); + else + wait_status = cp->status; + if (cp != NULL) + delchild(cp); (void)sigprocmask(SIG_SETMASK, &oset, NULL); - return ((WIFEXITED(wait_status) && WEXITSTATUS(wait_status)) ? -1 : 0); + if (rv == -1 || (WIFEXITED(wait_status) && WEXITSTATUS(wait_status))) + return -1; + else + return 0; } /* * Mark a child as don't care. */ void -free_child(int pid) +free_child(pid_t pid) { + struct child *cp; sigset_t nset, oset; - struct child *cp = findchild(pid); (void)sigemptyset(&nset); (void)sigaddset(&nset, SIGCHLD); - (void)sigprocmask(SIG_BLOCK, &nset, &oset); - - if (cp->done) - delchild(cp); - else - cp->free = 1; + (void)sigprocmask(SIG_BLOCK, &nset, &oset); + if ((cp = findchild(pid, 0)) != NULL) { + if (cp->done) + delchild(cp); + else + cp->free = 1; + } (void)sigprocmask(SIG_SETMASK, &oset, NULL); } From owner-svn-src-all@freebsd.org Wed Jun 27 04:56:04 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EBAE0102EEBC; Wed, 27 Jun 2018 04:56:03 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9D81F93FB7; Wed, 27 Jun 2018 04:56:03 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7E8941E663; Wed, 27 Jun 2018 04:56:03 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5R4u3oA003716; Wed, 27 Jun 2018 04:56:03 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5R4u29X003709; Wed, 27 Jun 2018 04:56:02 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201806270456.w5R4u29X003709@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 27 Jun 2018 04:56:02 +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: r335694 - stable/10/usr.bin/mail X-SVN-Group: stable-10 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/10/usr.bin/mail X-SVN-Commit-Revision: 335694 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 04:56:04 -0000 Author: eadler Date: Wed Jun 27 04:56:01 2018 New Revision: 335694 URL: https://svnweb.freebsd.org/changeset/base/335694 Log: MFC r302776, r302799: mail(1): Bring some fixes from other BSDs. - Use varargs properly - Use pid_t - Better handling of error conditions on forked jobs. - Some prototype and warning cleanups. Fix missing forked job changes from r302776 in wait_child(). Modified: stable/10/usr.bin/mail/cmd1.c stable/10/usr.bin/mail/cmd2.c stable/10/usr.bin/mail/cmd3.c stable/10/usr.bin/mail/edit.c stable/10/usr.bin/mail/extern.h stable/10/usr.bin/mail/fio.c stable/10/usr.bin/mail/getname.c stable/10/usr.bin/mail/popen.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/mail/cmd1.c ============================================================================== --- stable/10/usr.bin/mail/cmd1.c Wed Jun 27 04:37:22 2018 (r335693) +++ stable/10/usr.bin/mail/cmd1.c Wed Jun 27 04:56:01 2018 (r335694) @@ -439,7 +439,7 @@ folders(void) } if ((cmd = value("LISTER")) == NULL) cmd = "ls"; - (void)run_command(cmd, 0, -1, -1, dirname, NULL, NULL); + (void)run_command(cmd, 0, -1, -1, dirname, NULL); return (0); } Modified: stable/10/usr.bin/mail/cmd2.c ============================================================================== --- stable/10/usr.bin/mail/cmd2.c Wed Jun 27 04:37:22 2018 (r335693) +++ stable/10/usr.bin/mail/cmd2.c Wed Jun 27 04:56:01 2018 (r335694) @@ -130,8 +130,9 @@ hitit: * so we can discard when the user quits. */ int -save(char str[]) +save(void *v) { + char *str = v; return (save1(str, 1, "save", saveignore)); } @@ -140,8 +141,9 @@ save(char str[]) * Copy a message to a file without affected its saved-ness */ int -copycmd(char str[]) +copycmd(void *v) { + char *str = v; return (save1(str, 0, "copy", saveignore)); } Modified: stable/10/usr.bin/mail/cmd3.c ============================================================================== --- stable/10/usr.bin/mail/cmd3.c Wed Jun 27 04:37:22 2018 (r335693) +++ stable/10/usr.bin/mail/cmd3.c Wed Jun 27 04:56:01 2018 (r335694) @@ -79,7 +79,7 @@ dosh(char *str __unused) if ((sh = value("SHELL")) == NULL) sh = _PATH_CSHELL; - (void)run_command(sh, 0, -1, -1, NULL, NULL, NULL); + (void)run_command(sh, 0, -1, -1, NULL); (void)signal(SIGINT, sigint); printf("\n"); return (0); @@ -102,7 +102,7 @@ bangexp(char *str, size_t strsize) n = sizeof(bangbuf); while (*cp != '\0') { if (*cp == '!') { - if (n < strlen(lastbang)) { + if (n < (int)strlen(lastbang)) { overf: printf("Command buffer overflow\n"); return (-1); Modified: stable/10/usr.bin/mail/edit.c ============================================================================== --- stable/10/usr.bin/mail/edit.c Wed Jun 27 04:37:22 2018 (r335693) +++ stable/10/usr.bin/mail/edit.c Wed Jun 27 04:56:01 2018 (r335694) @@ -180,7 +180,7 @@ run_editor(FILE *fp, off_t size, int type, int readonl nf = NULL; if ((edit = value(type == 'e' ? "EDITOR" : "VISUAL")) == NULL) edit = type == 'e' ? _PATH_EX : _PATH_VI; - if (run_command(edit, 0, -1, -1, tempname, NULL, NULL) < 0) { + if (run_command(edit, 0, -1, -1, tempname, NULL) < 0) { (void)rm(tempname); goto out; } Modified: stable/10/usr.bin/mail/extern.h ============================================================================== --- stable/10/usr.bin/mail/extern.h Wed Jun 27 04:37:22 2018 (r335693) +++ stable/10/usr.bin/mail/extern.h Wed Jun 27 04:56:01 2018 (r335694) @@ -49,7 +49,7 @@ char *copyin(char *, char **); char *detract(struct name *, int); char *expand(char *); char *getdeadletter(void); -char *getname(int); +char *getname(uid_t); char *hfield(const char *, struct message *); FILE *infix(struct header *, FILE *); char *ishfield(char [], char *, const char *); @@ -95,7 +95,7 @@ void collhup(int); void collint(int); void collstop(int); void commands(void); -int copycmd(char []); +int copycmd(void *v); int core(void); int count(struct name *); int delete(int []); @@ -130,7 +130,7 @@ int getfold(char *, int); int gethfield(FILE *, char [], int, char **); int getmsglist(char *, int *, int); int getrawlist(char [], char **, int); -int getuserid(char []); +uid_t getuserid(char []); int grabh(struct header *, int); int group(char **); void hangup(int); @@ -198,8 +198,8 @@ int respond(int *); int retfield(char *[]); int rexit(int); int rm(char *); -int run_command(char *, sigset_t *, int, int, char *, char *, char *); -int save(char []); +int run_command(char *, sigset_t *, int, int, ...); +int save(void *v); int save1(char [], int, const char *, struct ignoretab *); void savedeadletter(FILE *); int saveigfield(char *[]); @@ -223,7 +223,7 @@ void sort(char **); int source(char **); void spreserve(void); void sreset(void); -int start_command(char *, sigset_t *, int, int, char *, char *, char *); +int start_command(char *, sigset_t *, int, int, ...); void statusput(struct message *, FILE *, char *); void stop(int); int stouch(int []); Modified: stable/10/usr.bin/mail/fio.c ============================================================================== --- stable/10/usr.bin/mail/fio.c Wed Jun 27 04:37:22 2018 (r335693) +++ stable/10/usr.bin/mail/fio.c Wed Jun 27 04:56:01 2018 (r335694) @@ -235,7 +235,7 @@ makemessage(FILE *f, int omsgCount) size -= (omsgCount + 1) * sizeof(struct message); (void)fflush(f); (void)lseek(fileno(f), (off_t)sizeof(*message), 0); - if (read(fileno(f), (char *)&message[omsgCount], size) != size) + if (read(fileno(f), (void *)&message[omsgCount], size) != size) errx(1, "Message temporary file corrupted"); message[msgCount].m_size = 0; message[msgCount].m_lines = 0; Modified: stable/10/usr.bin/mail/getname.c ============================================================================== --- stable/10/usr.bin/mail/getname.c Wed Jun 27 04:37:22 2018 (r335693) +++ stable/10/usr.bin/mail/getname.c Wed Jun 27 04:56:01 2018 (r335694) @@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$"); * Search the passwd file for a uid. Return name on success, NULL on failure. */ char * -getname(int uid) +getname(uid_t uid) { struct passwd *pw; @@ -58,7 +58,7 @@ getname(int uid) * Convert the passed name to a user id and return it. Return -1 * on error. */ -int +uid_t getuserid(char name[]) { struct passwd *pw; Modified: stable/10/usr.bin/mail/popen.c ============================================================================== --- stable/10/usr.bin/mail/popen.c Wed Jun 27 04:37:22 2018 (r335693) +++ stable/10/usr.bin/mail/popen.c Wed Jun 27 04:56:01 2018 (r335694) @@ -38,6 +38,8 @@ __FBSDID("$FreeBSD$"); #include "rcv.h" #include #include +#include +#include #include "extern.h" #define READ 0 @@ -46,22 +48,23 @@ __FBSDID("$FreeBSD$"); struct fp { FILE *fp; int pipe; - int pid; + pid_t pid; struct fp *link; }; static struct fp *fp_head; struct child { - int pid; + pid_t pid; char done; char free; int status; struct child *link; }; -static struct child *child; -static struct child *findchild(int); +static struct child *child, *child_freelist = NULL; + static void delchild(struct child *); -static int file_pid(FILE *); +static pid_t file_pid(FILE *); +static pid_t start_commandv(char *, sigset_t *, int, int, va_list); FILE * Fopen(const char *path, const char *mode) @@ -90,6 +93,7 @@ Fdopen(int fd, const char *mode) int Fclose(FILE *fp) { + unregister_file(fp); return (fclose(fp)); } @@ -99,7 +103,7 @@ Popen(char *cmd, const char *mode) { int p[2]; int myside, hisside, fd0, fd1; - int pid; + pid_t pid; sigset_t nset; FILE *fp; @@ -109,15 +113,15 @@ Popen(char *cmd, const char *mode) (void)fcntl(p[WRITE], F_SETFD, 1); if (*mode == 'r') { myside = p[READ]; - fd0 = -1; - hisside = fd1 = p[WRITE]; + hisside = fd0 = fd1 = p[WRITE]; } else { myside = p[WRITE]; hisside = fd0 = p[READ]; fd1 = -1; } (void)sigemptyset(&nset); - if ((pid = start_command(cmd, &nset, fd0, fd1, NULL, NULL, NULL)) < 0) { + pid = start_command(value("SHELL"), &nset, fd0, fd1, "-c", cmd, NULL); + if (pid < 0) { (void)close(p[READ]); (void)close(p[WRITE]); return (NULL); @@ -158,7 +162,7 @@ close_all_files(void) } void -register_file(FILE *fp, int pipe, int pid) +register_file(FILE *fp, int pipe, pid_t pid) { struct fp *fpp; @@ -186,7 +190,7 @@ unregister_file(FILE *fp) /*NOTREACHED*/ } -int +pid_t file_pid(FILE *fp) { struct fp *p; @@ -200,30 +204,17 @@ file_pid(FILE *fp) /* * Run a command without a shell, with optional arguments and splicing - * of stdin and stdout. The command name can be a sequence of words. + * of stdin (-1 means none) and stdout. The command name can be a sequence + * of words. * Signals must be handled by the caller. - * "Mask" contains the signals to ignore in the new process. - * SIGINT is enabled unless it's in the mask. + * "nset" contains the signals to ignore in the new process. + * SIGINT is enabled unless it's in "nset". */ -/*VARARGS4*/ -int -run_command(char *cmd, sigset_t *mask, int infd, int outfd, char *a0, - char *a1, char *a2) +static pid_t +start_commandv(char *cmd, sigset_t *nset, int infd, int outfd, va_list args) { - int pid; + pid_t pid; - if ((pid = start_command(cmd, mask, infd, outfd, a0, a1, a2)) < 0) - return (-1); - return (wait_command(pid)); -} - -/*VARARGS4*/ -int -start_command(char *cmd, sigset_t *mask, int infd, int outfd, char *a0, - char *a1, char *a2) -{ - int pid; - if ((pid = fork()) < 0) { warn("fork"); return (-1); @@ -232,11 +223,10 @@ start_command(char *cmd, sigset_t *mask, int infd, int char *argv[100]; int i = getrawlist(cmd, argv, sizeof(argv) / sizeof(*argv)); - if ((argv[i++] = a0) != NULL && - (argv[i++] = a1) != NULL && - (argv[i++] = a2) != NULL) - argv[i] = NULL; - prepare_child(mask, infd, outfd); + while ((argv[i++] = va_arg(args, char *))) + ; + argv[i] = NULL; + prepare_child(nset, infd, outfd); execvp(argv[0], argv); warn("%s", argv[0]); _exit(1); @@ -244,6 +234,32 @@ start_command(char *cmd, sigset_t *mask, int infd, int return (pid); } +int +run_command(char *cmd, sigset_t *nset, int infd, int outfd, ...) +{ + pid_t pid; + va_list args; + + va_start(args, outfd); + pid = start_commandv(cmd, nset, infd, outfd, args); + va_end(args); + if (pid < 0) + return -1; + return wait_command(pid); +} + +int +start_command(char *cmd, sigset_t *nset, int infd, int outfd, ...) +{ + va_list args; + int r; + + va_start(args, outfd); + r = start_commandv(cmd, nset, infd, outfd, args); + va_end(args); + return r; +} + void prepare_child(sigset_t *nset, int infd, int outfd) { @@ -268,7 +284,7 @@ prepare_child(sigset_t *nset, int infd, int outfd) } int -wait_command(int pid) +wait_command(pid_t pid) { if (wait_child(pid) < 0) { @@ -279,7 +295,7 @@ wait_command(int pid) } static struct child * -findchild(int pid) +findchild(pid_t pid, int dont_alloc) { struct child **cpp; @@ -287,9 +303,16 @@ findchild(int pid) cpp = &(*cpp)->link) ; if (*cpp == NULL) { - *cpp = malloc(sizeof(struct child)); - if (*cpp == NULL) - err(1, "Out of memory"); + if (dont_alloc) + return(NULL); + if (child_freelist) { + *cpp = child_freelist; + child_freelist = (*cpp)->link; + } else { + *cpp = malloc(sizeof(struct child)); + if (*cpp == NULL) + err(1, "malloc"); + } (*cpp)->pid = pid; (*cpp)->done = (*cpp)->free = 0; (*cpp)->link = NULL; @@ -305,19 +328,22 @@ delchild(struct child *cp) for (cpp = &child; *cpp != cp; cpp = &(*cpp)->link) ; *cpp = cp->link; - (void)free(cp); + cp->link = child_freelist; + child_freelist = cp; } /*ARGSUSED*/ void sigchild(int signo __unused) { - int pid; + pid_t pid; int status; struct child *cp; + int save_errno; + save_errno = errno; while ((pid = waitpid(-1, &status, WNOHANG)) > 0) { - cp = findchild(pid); + cp = findchild(pid, 1); if (cp->free) delchild(cp); else { @@ -325,6 +351,7 @@ sigchild(int signo __unused) cp->status = status; } } + errno = save_errno; } int wait_status; @@ -333,41 +360,51 @@ int wait_status; * Wait for a specific child to die. */ int -wait_child(int pid) +wait_child(pid_t pid) { - sigset_t nset, oset; struct child *cp; + sigset_t nset, oset; + pid_t rv = 0; (void)sigemptyset(&nset); (void)sigaddset(&nset, SIGCHLD); - (void)sigprocmask(SIG_BLOCK, &nset, &oset); - - cp = findchild(pid); - - while (!cp->done) - (void)sigsuspend(&oset); - wait_status = cp->status; - delchild(cp); + (void)sigprocmask(SIG_BLOCK, &nset, &oset); + /* + * If we have not already waited on the pid (via sigchild) + * wait on it now. Otherwise, use the wait status stashed + * by sigchild. + */ + cp = findchild(pid, 1); + if (cp == NULL || !cp->done) + rv = waitpid(pid, &wait_status, 0); + else + wait_status = cp->status; + if (cp != NULL) + delchild(cp); (void)sigprocmask(SIG_SETMASK, &oset, NULL); - return ((WIFEXITED(wait_status) && WEXITSTATUS(wait_status)) ? -1 : 0); + if (rv == -1 || (WIFEXITED(wait_status) && WEXITSTATUS(wait_status))) + return -1; + else + return 0; } /* * Mark a child as don't care. */ void -free_child(int pid) +free_child(pid_t pid) { + struct child *cp; sigset_t nset, oset; - struct child *cp = findchild(pid); (void)sigemptyset(&nset); (void)sigaddset(&nset, SIGCHLD); - (void)sigprocmask(SIG_BLOCK, &nset, &oset); - - if (cp->done) - delchild(cp); - else - cp->free = 1; + (void)sigprocmask(SIG_BLOCK, &nset, &oset); + if ((cp = findchild(pid, 0)) != NULL) { + if (cp->done) + delchild(cp); + else + cp->free = 1; + } (void)sigprocmask(SIG_SETMASK, &oset, NULL); } From owner-svn-src-all@freebsd.org Wed Jun 27 04:58:40 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C674510000A9; Wed, 27 Jun 2018 04:58:40 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7946294185; Wed, 27 Jun 2018 04:58:40 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5933B1E665; Wed, 27 Jun 2018 04:58:40 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5R4weeY003856; Wed, 27 Jun 2018 04:58:40 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5R4weYW003855; Wed, 27 Jun 2018 04:58:40 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201806270458.w5R4weYW003855@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 27 Jun 2018 04:58:40 +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: r335695 - stable/11 X-SVN-Group: stable-11 X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: stable/11 X-SVN-Commit-Revision: 335695 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 04:58:41 -0000 Author: eadler Date: Wed Jun 27 04:58:39 2018 New Revision: 335695 URL: https://svnweb.freebsd.org/changeset/base/335695 Log: MFC r302776, r302799: mail(1): Bring some fixes from other BSDs. - Use varargs properly - Use pid_t - Better handling of error conditions on forked jobs. - Some prototype and warning cleanups. Fix missing forked job changes from r302776 in wait_child(). Modified: Directory Properties: stable/11/ (props changed) From owner-svn-src-all@freebsd.org Wed Jun 27 06:49:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80BE6100A03A; Wed, 27 Jun 2018 06:49:21 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 270DD97286; Wed, 27 Jun 2018 06:49:21 +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 025FB1F87C; Wed, 27 Jun 2018 06:49:21 +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 w5R6nKee059526; Wed, 27 Jun 2018 06:49:20 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5R6nKYj059524; Wed, 27 Jun 2018 06:49:20 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201806270649.w5R6nKYj059524@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 27 Jun 2018 06:49:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335696 - head/sbin/fsck_msdosfs X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/sbin/fsck_msdosfs X-SVN-Commit-Revision: 335696 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 06:49:21 -0000 Author: delphij Date: Wed Jun 27 06:49:20 2018 New Revision: 335696 URL: https://svnweb.freebsd.org/changeset/base/335696 Log: Detect exFAT filesystems and abort if found and tighten BPB sanity check. Obtained from: Android https://android-review.googlesource.com/61827 MFC after: 2 weeks Modified: head/sbin/fsck_msdosfs/Makefile head/sbin/fsck_msdosfs/boot.c Modified: head/sbin/fsck_msdosfs/Makefile ============================================================================== --- head/sbin/fsck_msdosfs/Makefile Wed Jun 27 04:58:39 2018 (r335695) +++ head/sbin/fsck_msdosfs/Makefile Wed Jun 27 06:49:20 2018 (r335696) @@ -9,6 +9,8 @@ PROG= fsck_msdosfs MAN= fsck_msdosfs.8 SRCS= main.c check.c boot.c fat.c dir.c fsutil.c +DEBUG_FLAGS+= -g + CFLAGS+= -I${FSCK} .include Modified: head/sbin/fsck_msdosfs/boot.c ============================================================================== --- head/sbin/fsck_msdosfs/boot.c Wed Jun 27 04:58:39 2018 (r335695) +++ head/sbin/fsck_msdosfs/boot.c Wed Jun 27 06:49:20 2018 (r335696) @@ -82,6 +82,11 @@ readboot(int dosfs, struct bootblock *boot) boot->FATsecs = boot->bpbFATsmall; + if (boot->bpbBytesPerSec % DOSBOOTBLOCKSIZE_REAL != 0 || + boot->bpbBytesPerSec / DOSBOOTBLOCKSIZE_REAL == 0) { + pfatal("Invalid sector size: %u", boot->bpbBytesPerSec); + return FSFATAL; + } if (!boot->bpbRootDirEnts) boot->flags |= FAT32; if (boot->flags & FAT32) { @@ -102,6 +107,22 @@ readboot(int dosfs, struct bootblock *boot) boot->bpbFSInfo = block[48] + (block[49] << 8); boot->bpbBackup = block[50] + (block[51] << 8); + /* If the OEM Name field is EXFAT, it's not FAT32, so bail */ + if (!memcmp(&block[3], "EXFAT ", 8)) { + pfatal("exFAT filesystem is not supported."); + return FSFATAL; + } + + /* check basic parameters */ + if ((boot->bpbFSInfo == 0) || (boot->bpbSecPerClust == 0)) { + /* + * Either the BIOS Parameter Block has been corrupted, + * or this is not a FAT32 filesystem, most likely an + * exFAT filesystem. + */ + pfatal("Invalid FAT32 Extended BIOS Parameter Block"); + return FSFATAL; + } if (lseek(dosfs, boot->bpbFSInfo * boot->bpbBytesPerSec, SEEK_SET) != boot->bpbFSInfo * boot->bpbBytesPerSec || read(dosfs, fsinfo, sizeof fsinfo) != sizeof fsinfo) { @@ -178,11 +199,6 @@ readboot(int dosfs, struct bootblock *boot) /* Check backup bpbFSInfo? XXX */ } - if (boot->bpbBytesPerSec % DOSBOOTBLOCKSIZE_REAL != 0 || - boot->bpbBytesPerSec == 0) { - pfatal("Invalid sector size: %u", boot->bpbBytesPerSec); - return FSFATAL; - } if (boot->bpbSecPerClust == 0) { pfatal("Invalid cluster size: %u", boot->bpbSecPerClust); return FSFATAL; From owner-svn-src-all@freebsd.org Wed Jun 27 06:50:25 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB975100A173; Wed, 27 Jun 2018 06:50:25 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7E2D297425; Wed, 27 Jun 2018 06:50:25 +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 60E391F882; Wed, 27 Jun 2018 06:50:25 +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 w5R6oPEk059649; Wed, 27 Jun 2018 06:50:25 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5R6oPHN059648; Wed, 27 Jun 2018 06:50:25 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201806270650.w5R6oPHN059648@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 27 Jun 2018 06:50:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335697 - head/sbin/fsck_msdosfs X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/sbin/fsck_msdosfs X-SVN-Commit-Revision: 335697 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 06:50:26 -0000 Author: delphij Date: Wed Jun 27 06:50:24 2018 New Revision: 335697 URL: https://svnweb.freebsd.org/changeset/base/335697 Log: Revert Makefile@335696 that sneaked into the commit. X-MFC with: 335696 MFC after: 2 weeks Modified: head/sbin/fsck_msdosfs/Makefile Modified: head/sbin/fsck_msdosfs/Makefile ============================================================================== --- head/sbin/fsck_msdosfs/Makefile Wed Jun 27 06:49:20 2018 (r335696) +++ head/sbin/fsck_msdosfs/Makefile Wed Jun 27 06:50:24 2018 (r335697) @@ -9,8 +9,6 @@ PROG= fsck_msdosfs MAN= fsck_msdosfs.8 SRCS= main.c check.c boot.c fat.c dir.c fsutil.c -DEBUG_FLAGS+= -g - CFLAGS+= -I${FSCK} .include From owner-svn-src-all@freebsd.org Wed Jun 27 07:00:01 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32D22100AB0B for ; Wed, 27 Jun 2018 07:00:01 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-yw0-x233.google.com (mail-yw0-x233.google.com [IPv6:2607:f8b0:4002:c05::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BAAB497BB8 for ; Wed, 27 Jun 2018 07:00:00 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-yw0-x233.google.com with SMTP id p129-v6so334262ywg.7 for ; Wed, 27 Jun 2018 00:00:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=hagwpEx3PMTNM/5joEFz067hGnb5jhJOldTOXGrq8dI=; b=XFy0F7V9K5QyBLKvoekKeBZHNeOySTiILjKcdPmQIUgDNTkFZVgGqbaqQ3zEYOuUU8 vMuZ6/UisNtHsXkvsJo4SZMs01IDP0H5/H8CqnlXOyndLzaYut3hwtohidkcKQNWvRYq h2MiPXkPinN5dKXo4DK7MjCg8aezAfQYOiZ6SWXpaEc6VQudVvjLDtIrgYHYDVrGkzsD upbd2D7RmEPcLJqwnNmMCP53SGLle0la/Ml/aJxsVhFuqflmaipNVh+fyGBTxDmmr1ZC hJY6zGtKt5eS1J3kd83KBiXUNUl3nEJydq0Mf8zIDW+y8Yu/RgXdWcBFEla8vmBW4PxF Sjqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=hagwpEx3PMTNM/5joEFz067hGnb5jhJOldTOXGrq8dI=; b=nmanBTB2zYZg7m/itdFQU05Rt0ISzgGD092NRjxGKDnzTVAfTkmgcC/bdIDAbv8IGS PpdPxDiy8GpTSVJP8lTnWotiVjAt9Qo+ILa8wq8qcYYWVKXBUqTMjDB4+LGRY13axuZW VbhLBhhxGPvRdYQGnEAobRE1YogFhR3E1fMP0WuOkFbAiVImjWWdzcnlOfukG45wfg/d RWQWEsVw0Lk18XLTTfAoR6hx0YhAOk9mLkhaiqJ9NV6AtpqIXFz7mkHjCsn3wM8LQdWZ gqiAEZV5y4gWl8jymPIENPpDzGQGSB5QXUSqGpEEN84mSVjVACAtTMxXxJD3vUaDbS2v gGEQ== X-Gm-Message-State: APt69E3yJHqkdIEkKUQZi8hG8z/fyOKBIKMaeSNf0BPaxh2knHyiYo2K lO+baRTKlyDp52cUJW1FUGHal2pME7Rxk0JPZufYFw== X-Google-Smtp-Source: AAOMgpfLeXgaA+EKXYxirPIxumnH7y08JcnmqaF48hfRM+1T8FWV7KkrlbUQKxZCHs0I2dPHJoj9FcMG8Rb18wBpbzM= X-Received: by 2002:a81:351:: with SMTP id 78-v6mr2344488ywd.104.1530082800196; Wed, 27 Jun 2018 00:00:00 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:db86:0:0:0:0:0 with HTTP; Tue, 26 Jun 2018 23:59:59 -0700 (PDT) In-Reply-To: <201806270411.w5R4B9ZB078994@repo.freebsd.org> References: <201806270411.w5R4B9ZB078994@repo.freebsd.org> From: Oliver Pinter Date: Wed, 27 Jun 2018 08:59:59 +0200 Message-ID: Subject: Re: svn commit: r335690 - head/sys/kern To: Warner Losh Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 07:00:01 -0000 On Wednesday, June 27, 2018, Warner Losh wrote: > Author: imp > Date: Wed Jun 27 04:11:09 2018 > New Revision: 335690 > URL: https://svnweb.freebsd.org/changeset/base/335690 > > Log: > Fix devctl generation for core files. > > We have a problem with vn_fullpath_global when the file exists. Work > around it by printing the full path if the core file name starts with /, > or current working directory followed by the filename if not. > > Sponsored by: Netflix > Differential Review: https://reviews.freebsd.org/D16026 > > Modified: > head/sys/kern/kern_sig.c > > Modified: head/sys/kern/kern_sig.c > ============================================================ > ================== > --- head/sys/kern/kern_sig.c Wed Jun 27 04:10:48 2018 (r335689) > +++ head/sys/kern/kern_sig.c Wed Jun 27 04:11:09 2018 (r335690) > @@ -3431,24 +3431,6 @@ out: > return (0); > } > > -static int > -coredump_sanitise_path(const char *path) > -{ > - size_t i; > - > - /* > - * Only send a subset of ASCII to devd(8) because it > - * might pass these strings to sh -c. > - */ > - for (i = 0; path[i]; i++) > - if (!(isalpha(path[i]) || isdigit(path[i])) && > - path[i] != '/' && path[i] != '.' && > - path[i] != '-') > - return (0); This part of code existed to prevent shell code injection via file names. After this commit we lose this. > - > - return (1); > -} > - > /* > * Dump a process' core. The main routine does some > * policy checking, and creates the name of the coredump; > @@ -3469,11 +3451,8 @@ coredump(struct thread *td) > char *name; /* name of corefile */ > void *rl_cookie; > off_t limit; > - char *data = NULL; > char *fullpath, *freepath = NULL; > - size_t len; > - static const char comm_name[] = "comm="; > - static const char core_name[] = "core="; > + struct sbuf *sb; > > PROC_LOCK_ASSERT(p, MA_OWNED); > MPASS((p->p_flag & P_HADTHREADS) == 0 || p->p_singlethread == td); > @@ -3556,23 +3535,35 @@ coredump(struct thread *td) > */ > if (error != 0 || coredump_devctl == 0) > goto out; > - len = MAXPATHLEN * 2 + sizeof(comm_name) - 1 + > - sizeof(' ') + sizeof(core_name) - 1; > - data = malloc(len, M_TEMP, M_WAITOK); > + sb = sbuf_new_auto(); > if (vn_fullpath_global(td, p->p_textvp, &fullpath, &freepath) != 0) > - goto out; > - if (!coredump_sanitise_path(fullpath)) > - goto out; > - snprintf(data, len, "%s%s ", comm_name, fullpath); > + goto out2; > + sbuf_printf(sb, "comm=\""); > + devctl_safe_quote_sb(sb, fullpath); > free(freepath, M_TEMP); > - freepath = NULL; > - if (vn_fullpath_global(td, vp, &fullpath, &freepath) != 0) > - goto out; > - if (!coredump_sanitise_path(fullpath)) > - goto out; > - strlcat(data, core_name, len); > - strlcat(data, fullpath, len); > - devctl_notify("kernel", "signal", "coredump", data); > + sbuf_printf(sb, "\" core=\""); > + > + /* > + * We can't lookup core file vp directly. When we're replacing a > core, and > + * other random times, we flush the name cache, so it will fail. > Instead, > + * if the path of the core is relative, add the current dir in > front if it. > + */ > + if (name[0] != '/') { > + fullpath = malloc(MAXPATHLEN, M_TEMP, M_WAITOK); > + if (kern___getcwd(td, fullpath, UIO_SYSSPACE, MAXPATHLEN, > MAXPATHLEN) != 0) { > + free(fullpath, M_TEMP); > + goto out2; > + } > + devctl_safe_quote_sb(sb, fullpath); > + free(fullpath, M_TEMP); > + sbuf_putc(sb, '/'); > + } > + devctl_safe_quote_sb(sb, name); > + sbuf_printf(sb, "\""); > + if (sbuf_finish(sb) == 0) > + devctl_notify("kernel", "signal", "coredump", > sbuf_data(sb)); > +out2: > + sbuf_delete(sb); > out: > error1 = vn_close(vp, FWRITE, cred, td); > if (error == 0) > @@ -3580,8 +3571,6 @@ out: > #ifdef AUDIT > audit_proc_coredump(td, name, error); > #endif > - free(freepath, M_TEMP); > - free(data, M_TEMP); > free(name, M_TEMP); > return (error); > } > _______________________________________________ > 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 Wed Jun 27 07:18:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 155EB100EC02; Wed, 27 Jun 2018 07:18:55 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B777C707AE; Wed, 27 Jun 2018 07:18:54 +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 9963E1FD59; Wed, 27 Jun 2018 07:18:54 +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 w5R7IsN5074566; Wed, 27 Jun 2018 07:18:54 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5R7IsMD074565; Wed, 27 Jun 2018 07:18:54 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201806270718.w5R7IsMD074565@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 27 Jun 2018 07:18:54 +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: r335698 - stable/11/share/examples/bhyve X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/share/examples/bhyve X-SVN-Commit-Revision: 335698 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 07:18:55 -0000 Author: kib Date: Wed Jun 27 07:18:54 2018 New Revision: 335698 URL: https://svnweb.freebsd.org/changeset/base/335698 Log: MFC r335604: bhyve/vmrun.sh: make -L functional. Modified: stable/11/share/examples/bhyve/vmrun.sh Directory Properties: stable/11/ (props changed) Modified: stable/11/share/examples/bhyve/vmrun.sh ============================================================================== --- stable/11/share/examples/bhyve/vmrun.sh Wed Jun 27 06:50:24 2018 (r335697) +++ stable/11/share/examples/bhyve/vmrun.sh Wed Jun 27 07:18:54 2018 (r335698) @@ -132,7 +132,7 @@ vncport=${DEFAULT_VNCPORT} vncsize=${DEFAULT_VNCSIZE} tablet="" -while getopts aAc:C:d:e:Ef:F:g:hH:iI:l:m:n:p:P:t:Tuvw c ; do +while getopts aAc:C:d:e:Ef:F:g:hH:iI:l:L:m:n:p:P:t:Tuvw c ; do case $c in a) bhyverun_opt="${bhyverun_opt} -a" From owner-svn-src-all@freebsd.org Wed Jun 27 07:24:08 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC27A100F34D; Wed, 27 Jun 2018 07:24:08 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5C80C70E42; Wed, 27 Jun 2018 07:24:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3F1651FEEA; Wed, 27 Jun 2018 07:24:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5R7O8t7079483; Wed, 27 Jun 2018 07:24:08 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5R7O712079480; Wed, 27 Jun 2018 07:24:07 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806270724.w5R7O712079480@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 27 Jun 2018 07:24:07 +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: r335699 - in stable/11/sys: kern sys X-SVN-Group: stable-11 X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: in stable/11/sys: kern sys X-SVN-Commit-Revision: 335699 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 07:24:08 -0000 Author: hselasky Date: Wed Jun 27 07:24:07 2018 New Revision: 335699 URL: https://svnweb.freebsd.org/changeset/base/335699 Log: MFC r335461: Permit the kernel environment to set an array of numeric values for a single sysctl(9) node. Reviewed by: kib@, imp@, jhb@ Differential Revision: https://reviews.freebsd.org/D15802 Sponsored by: Mellanox Technologies Modified: stable/11/sys/kern/kern_environment.c stable/11/sys/kern/kern_sysctl.c stable/11/sys/sys/systm.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_environment.c ============================================================================== --- stable/11/sys/kern/kern_environment.c Wed Jun 27 07:18:54 2018 (r335698) +++ stable/11/sys/kern/kern_environment.c Wed Jun 27 07:24:07 2018 (r335699) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -512,6 +513,141 @@ getenv_string(const char *name, char *data, int size) strlcpy(data, cp, size); } return (cp != NULL); +} + +/* + * Return an array of integers at the given type size and signedness. + */ +int +getenv_array(const char *name, void *pdata, int size, int *psize, + int type_size, bool allow_signed) +{ + char buf[KENV_MNAMELEN + 1 + KENV_MVALLEN + 1]; + uint8_t shift; + int64_t value; + int64_t old; + char *end; + char *ptr; + int n; + + if (getenv_string(name, buf, sizeof(buf)) == 0) + return (0); + + /* get maximum number of elements */ + size /= type_size; + + n = 0; + + for (ptr = buf; *ptr != 0; ) { + + value = strtoq(ptr, &end, 0); + + /* check if signed numbers are allowed */ + if (value < 0 && !allow_signed) + goto error; + + /* check for invalid value */ + if (ptr == end) + goto error; + + /* check for valid suffix */ + switch (*end) { + case 't': + case 'T': + shift = 40; + end++; + break; + case 'g': + case 'G': + shift = 30; + end++; + break; + case 'm': + case 'M': + shift = 20; + end++; + break; + case 'k': + case 'K': + shift = 10; + end++; + break; + case ' ': + case '\t': + case ',': + case 0: + shift = 0; + break; + default: + /* garbage after numeric value */ + goto error; + } + + /* skip till next value, if any */ + while (*end == '\t' || *end == ',' || *end == ' ') + end++; + + /* update pointer */ + ptr = end; + + /* apply shift */ + old = value; + value <<= shift; + + /* overflow check */ + if ((value >> shift) != old) + goto error; + + /* check for buffer overflow */ + if (n >= size) + goto error; + + /* store value according to type size */ + switch (type_size) { + case 1: + if (allow_signed) { + if (value < SCHAR_MIN || value > SCHAR_MAX) + goto error; + } else { + if (value < 0 || value > UCHAR_MAX) + goto error; + } + ((uint8_t *)pdata)[n] = (uint8_t)value; + break; + case 2: + if (allow_signed) { + if (value < SHRT_MIN || value > SHRT_MAX) + goto error; + } else { + if (value < 0 || value > USHRT_MAX) + goto error; + } + ((uint16_t *)pdata)[n] = (uint16_t)value; + break; + case 4: + if (allow_signed) { + if (value < INT_MIN || value > INT_MAX) + goto error; + } else { + if (value > UINT_MAX) + goto error; + } + ((uint32_t *)pdata)[n] = (uint32_t)value; + break; + case 8: + ((uint64_t *)pdata)[n] = (uint64_t)value; + break; + default: + goto error; + } + n++; + } + *psize = n * type_size; + + if (n != 0) + return (1); /* success */ +error: + return (0); /* failure */ } /* Modified: stable/11/sys/kern/kern_sysctl.c ============================================================================== --- stable/11/sys/kern/kern_sysctl.c Wed Jun 27 07:18:54 2018 (r335698) +++ stable/11/sys/kern/kern_sysctl.c Wed Jun 27 07:24:07 2018 (r335699) @@ -191,13 +191,8 @@ sysctl_load_tunable_by_oid_locked(struct sysctl_oid *o char path[96]; ssize_t rem = sizeof(path); ssize_t len; - uint8_t val_8; - uint16_t val_16; - uint32_t val_32; - int val_int; - long val_long; - int64_t val_64; - quad_t val_quad; + uint8_t data[512] __aligned(sizeof(uint64_t)); + int size; int error; path[--rem] = 0; @@ -225,85 +220,88 @@ sysctl_load_tunable_by_oid_locked(struct sysctl_oid *o switch (oidp->oid_kind & CTLTYPE) { case CTLTYPE_INT: - if (getenv_int(path + rem, &val_int) == 0) + if (getenv_array(path + rem, data, sizeof(data), &size, + sizeof(int), GETENV_SIGNED) == 0) return; - req.newlen = sizeof(val_int); - req.newptr = &val_int; + req.newlen = size; + req.newptr = data; break; case CTLTYPE_UINT: - if (getenv_uint(path + rem, (unsigned int *)&val_int) == 0) + if (getenv_array(path + rem, data, sizeof(data), &size, + sizeof(int), GETENV_UNSIGNED) == 0) return; - req.newlen = sizeof(val_int); - req.newptr = &val_int; + req.newlen = size; + req.newptr = data; break; case CTLTYPE_LONG: - if (getenv_long(path + rem, &val_long) == 0) + if (getenv_array(path + rem, data, sizeof(data), &size, + sizeof(long), GETENV_SIGNED) == 0) return; - req.newlen = sizeof(val_long); - req.newptr = &val_long; + req.newlen = size; + req.newptr = data; break; case CTLTYPE_ULONG: - if (getenv_ulong(path + rem, (unsigned long *)&val_long) == 0) + if (getenv_array(path + rem, data, sizeof(data), &size, + sizeof(long), GETENV_UNSIGNED) == 0) return; - req.newlen = sizeof(val_long); - req.newptr = &val_long; + req.newlen = size; + req.newptr = data; break; case CTLTYPE_S8: - if (getenv_int(path + rem, &val_int) == 0) + if (getenv_array(path + rem, data, sizeof(data), &size, + sizeof(int8_t), GETENV_SIGNED) == 0) return; - val_8 = val_int; - req.newlen = sizeof(val_8); - req.newptr = &val_8; + req.newlen = size; + req.newptr = data; break; case CTLTYPE_S16: - if (getenv_int(path + rem, &val_int) == 0) + if (getenv_array(path + rem, data, sizeof(data), &size, + sizeof(int16_t), GETENV_SIGNED) == 0) return; - val_16 = val_int; - req.newlen = sizeof(val_16); - req.newptr = &val_16; + req.newlen = size; + req.newptr = data; break; case CTLTYPE_S32: - if (getenv_long(path + rem, &val_long) == 0) + if (getenv_array(path + rem, data, sizeof(data), &size, + sizeof(int32_t), GETENV_SIGNED) == 0) return; - val_32 = val_long; - req.newlen = sizeof(val_32); - req.newptr = &val_32; + req.newlen = size; + req.newptr = data; break; case CTLTYPE_S64: - if (getenv_quad(path + rem, &val_quad) == 0) + if (getenv_array(path + rem, data, sizeof(data), &size, + sizeof(int64_t), GETENV_SIGNED) == 0) return; - val_64 = val_quad; - req.newlen = sizeof(val_64); - req.newptr = &val_64; + req.newlen = size; + req.newptr = data; break; case CTLTYPE_U8: - if (getenv_uint(path + rem, (unsigned int *)&val_int) == 0) + if (getenv_array(path + rem, data, sizeof(data), &size, + sizeof(uint8_t), GETENV_UNSIGNED) == 0) return; - val_8 = val_int; - req.newlen = sizeof(val_8); - req.newptr = &val_8; + req.newlen = size; + req.newptr = data; break; case CTLTYPE_U16: - if (getenv_uint(path + rem, (unsigned int *)&val_int) == 0) + if (getenv_array(path + rem, data, sizeof(data), &size, + sizeof(uint16_t), GETENV_UNSIGNED) == 0) return; - val_16 = val_int; - req.newlen = sizeof(val_16); - req.newptr = &val_16; + req.newlen = size; + req.newptr = data; break; case CTLTYPE_U32: - if (getenv_ulong(path + rem, (unsigned long *)&val_long) == 0) + if (getenv_array(path + rem, data, sizeof(data), &size, + sizeof(uint32_t), GETENV_UNSIGNED) == 0) return; - val_32 = val_long; - req.newlen = sizeof(val_32); - req.newptr = &val_32; + req.newlen = size; + req.newptr = data; break; case CTLTYPE_U64: - /* XXX there is no getenv_uquad() */ - if (getenv_quad(path + rem, &val_quad) == 0) + if (getenv_array(path + rem, data, sizeof(data), &size, + sizeof(uint64_t), GETENV_UNSIGNED) == 0) return; - val_64 = val_quad; - req.newlen = sizeof(val_64); - req.newptr = &val_64; + req.newlen = size; + req.newptr = data; break; case CTLTYPE_STRING: penv = kern_getenv(path + rem); Modified: stable/11/sys/sys/systm.h ============================================================================== --- stable/11/sys/sys/systm.h Wed Jun 27 07:18:54 2018 (r335698) +++ stable/11/sys/sys/systm.h Wed Jun 27 07:24:07 2018 (r335699) @@ -345,6 +345,11 @@ int kern_setenv(const char *name, const char *value); int kern_unsetenv(const char *name); int testenv(const char *name); +int getenv_array(const char *name, void *data, int size, int *psize, + int type_size, bool allow_signed); +#define GETENV_UNSIGNED false /* negative numbers not allowed */ +#define GETENV_SIGNED true /* negative numbers allowed */ + typedef uint64_t (cpu_tick_f)(void); void set_cputicker(cpu_tick_f *func, uint64_t freq, unsigned var); extern cpu_tick_f *cpu_ticks; From owner-svn-src-all@freebsd.org Wed Jun 27 12:08:13 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E60E1102048E; Wed, 27 Jun 2018 12:08:12 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 99CA47A4FC; Wed, 27 Jun 2018 12:08:12 +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 76D3E22C70; Wed, 27 Jun 2018 12:08:12 +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 w5RC8C4n021861; Wed, 27 Jun 2018 12:08:12 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RC8CNa021860; Wed, 27 Jun 2018 12:08:12 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201806271208.w5RC8CNa021860@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 27 Jun 2018 12:08:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335700 - head/sys/dev/usb X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/usb X-SVN-Commit-Revision: 335700 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 12:08:13 -0000 Author: hselasky Date: Wed Jun 27 12:08:12 2018 New Revision: 335700 URL: https://svnweb.freebsd.org/changeset/base/335700 Log: Improve the kernel's USB descriptor reading function. Some USB devices does not allow a partial descriptor readout. Found by: bz@ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/usb/usb_request.c Modified: head/sys/dev/usb/usb_request.c ============================================================================== --- head/sys/dev/usb/usb_request.c Wed Jun 27 07:24:07 2018 (r335699) +++ head/sys/dev/usb/usb_request.c Wed Jun 27 12:08:12 2018 (r335700) @@ -990,7 +990,7 @@ usbd_req_get_desc(struct usb_device *udev, uint8_t retries) { struct usb_device_request req; - uint8_t *buf; + uint8_t *buf = desc; usb_error_t err; DPRINTFN(4, "id=%d, type=%d, index=%d, max_len=%d\n", @@ -1012,6 +1012,32 @@ usbd_req_get_desc(struct usb_device *udev, err = usbd_do_request_flags(udev, mtx, &req, desc, 0, NULL, 500 /* ms */); + if (err != 0 && err != USB_ERR_TIMEOUT && + min_len != max_len) { + /* clear descriptor data */ + memset(desc, 0, max_len); + + /* try to read full descriptor length */ + USETW(req.wLength, max_len); + + err = usbd_do_request_flags(udev, mtx, &req, + desc, USB_SHORT_XFER_OK, NULL, 500 /* ms */); + + if (err == 0) { + /* verify length */ + if (buf[0] > max_len) + buf[0] = max_len; + else if (buf[0] < 2) + err = USB_ERR_INVAL; + + min_len = buf[0]; + + /* enforce descriptor type */ + buf[1] = type; + goto done; + } + } + if (err) { if (!retries) { goto done; @@ -1022,7 +1048,6 @@ usbd_req_get_desc(struct usb_device *udev, continue; } - buf = desc; if (min_len == max_len) { From owner-svn-src-all@freebsd.org Wed Jun 27 13:42:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD5D11024DDC for ; Wed, 27 Jun 2018 13:42:54 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x235.google.com (mail-io0-x235.google.com [IPv6:2607:f8b0:4001:c06::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 375F17DC76 for ; Wed, 27 Jun 2018 13:42:54 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x235.google.com with SMTP id u23-v6so1927599ioc.13 for ; Wed, 27 Jun 2018 06:42:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=FxnEn9fQeSI/IgJc6bLz7fQs3tQZJeBX0LGRKqSrz4w=; b=mB3Jgv6mDQlyTZQ4qNzbLV1Aymt7kXXoAv08X35QMPVf0JV0ys7kznNQVsIRLu2E9O GGBkSTZN8Adh/i94KJ8GDm6zwtgdXn9eXQnG5zVG6ugjXtRtRayMELH5Lfd6JzZ94bUn r9unjFrH1I4fR25OgQI1fIF8Xtm3fzlLoH02QFBi2pqUQvXzoCapY/1qo9TQu3OIaFbT idN4MGOuSWvYP/CrRhr4g14DmQ9vYt0vTmzYu/A72AtonFg52ACS+AWUr/o8Rph57fnE UG8a8uiptjFUYDE6F0BxpxFiRNmME4SeySg7gxldVlVKB6jaxwSXkPT2loPVE7VJTSb2 Db6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=FxnEn9fQeSI/IgJc6bLz7fQs3tQZJeBX0LGRKqSrz4w=; b=tRPRsMupYekFWOm8nL8RQhE8XorVMe1gVc6Oe68t77nKCwlzwgf7TwzibDs5zLFXR+ pwhg0JSTPs+2qdbe1C2ndTs0//niASnWlPm91mhk7UE6Ce6XN/1+gDdUZCIqZtvoL7iv B+5bFmKsvA44cLVfvt4nIPFzDtPRGIgYey8GFyD78fivon/yKrBDYS1SQSsVj3VkFUeM Ga4zTuNOXPbgERMT6qBpabd8Hnxxr9qC3EAPjI5lks9ICpLn3qVG1x8jCamSTOxuRBeo Q/DsZ3kyU9S8vLP48OkxgDw44bo4wVog8Nu0/PAiHLGLIdHsi9Geu1vonFkQxiuqslRm bl1A== X-Gm-Message-State: APt69E0zNlMGkAQ621KMewzoRYUpgvdXDFh6xfwHbxiZH0R3sHS2pSjT shJ02d2gvf4s7pAsXYR4dGETOHToMbaJ7gBrNDiUIw== X-Google-Smtp-Source: AAOMgpdWRaSNHnjAv3c/7cNrzEXqEJdWrKY+MVlNFTr0XT3poCt4+tun/m62WDwArBsRUkEK5mnY7DiPtAiv/qbfaTk= X-Received: by 2002:a6b:280a:: with SMTP id o10-v6mr4923595ioo.168.1530106973357; Wed, 27 Jun 2018 06:42:53 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:5945:0:0:0:0:0 with HTTP; Wed, 27 Jun 2018 06:42:52 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: References: <201806270411.w5R4B9ZB078994@repo.freebsd.org> From: Warner Losh Date: Wed, 27 Jun 2018 07:42:52 -0600 X-Google-Sender-Auth: 25bztZkERnEoLp6Ezc9AjS7EeAg Message-ID: Subject: Re: svn commit: r335690 - head/sys/kern To: Oliver Pinter Cc: Warner Losh , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 13:42:55 -0000 On Wed, Jun 27, 2018 at 12:59 AM, Oliver Pinter < oliver.pinter@hardenedbsd.org> wrote: > > > On Wednesday, June 27, 2018, Warner Losh wrote: > >> Author: imp >> Date: Wed Jun 27 04:11:09 2018 >> New Revision: 335690 >> URL: https://svnweb.freebsd.org/changeset/base/335690 >> >> Log: >> Fix devctl generation for core files. >> >> We have a problem with vn_fullpath_global when the file exists. Work >> around it by printing the full path if the core file name starts with /, >> or current working directory followed by the filename if not. >> >> Sponsored by: Netflix >> Differential Review: https://reviews.freebsd.org/D16026 >> >> Modified: >> head/sys/kern/kern_sig.c >> >> Modified: head/sys/kern/kern_sig.c >> ============================================================ >> ================== >> --- head/sys/kern/kern_sig.c Wed Jun 27 04:10:48 2018 (r335689) >> +++ head/sys/kern/kern_sig.c Wed Jun 27 04:11:09 2018 (r335690) >> @@ -3431,24 +3431,6 @@ out: >> return (0); >> } >> >> -static int >> -coredump_sanitise_path(const char *path) >> -{ >> - size_t i; >> - >> - /* >> - * Only send a subset of ASCII to devd(8) because it >> - * might pass these strings to sh -c. >> - */ >> - for (i = 0; path[i]; i++) >> - if (!(isalpha(path[i]) || isdigit(path[i])) && >> - path[i] != '/' && path[i] != '.' && >> - path[i] != '-') >> - return (0); > > > This part of code existed to prevent shell code injection via file names. > After this commit we lose this. > It's devd's job to prevent that, not the kernel's. Warner From owner-svn-src-all@freebsd.org Wed Jun 27 13:45:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19E571024F6F for ; Wed, 27 Jun 2018 13:45:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 95CA07DE2A for ; Wed, 27 Jun 2018 13:45:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x231.google.com with SMTP id r24-v6so1940021ioh.9 for ; Wed, 27 Jun 2018 06:45:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=XIVqNMlkqL1hFBs6wF3NoVMfBV5lwoL5u6d2dbtltaA=; b=Y+DPohSjmVUVKfdLOir8DBdOWcoDnw7S5p19viMuNCn7EAzQiN0P8OSUHnsh0hX1qT VqznJToh60S5ysmNGxM0uIIa5aMYUjFmmhUSHDK+FjUWmU1P09M7piGAQhs37/kdwFSa 4XnIAJ9Q8+oY/BM8f/B4eee2JSDom5HvXIJ/muwtK612SucxBEm4CbJRMRKe2Bef6PhI d5vaFOjthEj9CH7Nepm1DXuaxgTC0MXrd8bo/18NlL8y48+P+6WaIlDRm8rbGb3PB7yM +AfitzMkW9FdkRkKaDYE9K6JoNDYfysTtrNnqggs9LsOikm/mqqMdFoiRPnltbDeBb1M mD7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=XIVqNMlkqL1hFBs6wF3NoVMfBV5lwoL5u6d2dbtltaA=; b=TnYC1pGD2JxlhQ/vuQ2k7Qmxs6GkJ1jiui5FEQGHAN15q+yeBX3FS6u9x7nrHWKoCC x+SR/UBIukSP4iYYamOnfLICzVglJMja7vJpegsgik3p6C2MdmqdgKelnIi/KGwW8YEz i1NrPF7SmYuCJCzNnvQMuNT+Pv/fa8lUeRygtqw/2xaqicScH5HIKJzgcVGirYfbkO+G EC4AL3ftiJ5KghR3OVA0fpWO6MuKGEsOYHOOVbLaDnBUPr3HWPqjwgvPdySpl3HpfCPY 0bZtoz/PUbY1Wnqh8hf5fucLE9xU4Lg93w5bvyLgPEVlpjxQK/9kXrbIa5td4aeFXNDl R+ug== X-Gm-Message-State: APt69E0ziU+/Xxk3ipoUJUAwqQqQU0MKIUBLH3HH1QC5JvnAX+428YLC tTbESxrP4i6wU01DPz3ZSh/SjsyslKsdqDH8uBpE/g== X-Google-Smtp-Source: AAOMgpfdvcks1gRQpDCGr+hsDl5IEGO376WPESUKnDFylVfcVzT65l2r0+dn8txNgpBOPkCFoR/IlSgbHiZKLDzJO10= X-Received: by 2002:a6b:29c4:: with SMTP id p187-v6mr4797884iop.299.1530107116989; Wed, 27 Jun 2018 06:45:16 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:5945:0:0:0:0:0 with HTTP; Wed, 27 Jun 2018 06:45:16 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: References: <201806270411.w5R4B9ZB078994@repo.freebsd.org> From: Warner Losh Date: Wed, 27 Jun 2018 07:45:16 -0600 X-Google-Sender-Auth: jXxUqLfk-DX0jwRvOtLUlt320qQ Message-ID: Subject: Re: svn commit: r335690 - head/sys/kern To: Oliver Pinter Cc: Warner Losh , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 13:45:18 -0000 On Wed, Jun 27, 2018 at 7:42 AM, Warner Losh wrote: > > > On Wed, Jun 27, 2018 at 12:59 AM, Oliver Pinter < > oliver.pinter@hardenedbsd.org> wrote: > >> >> >> On Wednesday, June 27, 2018, Warner Losh wrote: >> >>> Author: imp >>> Date: Wed Jun 27 04:11:09 2018 >>> New Revision: 335690 >>> URL: https://svnweb.freebsd.org/changeset/base/335690 >>> >>> Log: >>> Fix devctl generation for core files. >>> >>> We have a problem with vn_fullpath_global when the file exists. Work >>> around it by printing the full path if the core file name starts with >>> /, >>> or current working directory followed by the filename if not. >>> >>> Sponsored by: Netflix >>> Differential Review: https://reviews.freebsd.org/D16026 >>> >>> Modified: >>> head/sys/kern/kern_sig.c >>> >>> Modified: head/sys/kern/kern_sig.c >>> ============================================================ >>> ================== >>> --- head/sys/kern/kern_sig.c Wed Jun 27 04:10:48 2018 (r335689) >>> +++ head/sys/kern/kern_sig.c Wed Jun 27 04:11:09 2018 (r335690) >>> @@ -3431,24 +3431,6 @@ out: >>> return (0); >>> } >>> >>> -static int >>> -coredump_sanitise_path(const char *path) >>> -{ >>> - size_t i; >>> - >>> - /* >>> - * Only send a subset of ASCII to devd(8) because it >>> - * might pass these strings to sh -c. >>> - */ >>> - for (i = 0; path[i]; i++) >>> - if (!(isalpha(path[i]) || isdigit(path[i])) && >>> - path[i] != '/' && path[i] != '.' && >>> - path[i] != '-') >>> - return (0); >> >> >> This part of code existed to prevent shell code injection via file names. >> After this commit we lose this. >> > > It's devd's job to prevent that, not the kernel's. > Though the default action doesn't at the moment... I'll fix that with proper quoting. Warner From owner-svn-src-all@freebsd.org Wed Jun 27 13:45:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D5381024F94 for ; Wed, 27 Jun 2018 13:45:27 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-wr0-x235.google.com (mail-wr0-x235.google.com [IPv6:2a00:1450:400c:c0c::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F0F867DF0C for ; Wed, 27 Jun 2018 13:45:26 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-wr0-x235.google.com with SMTP id k16-v6so2123120wro.0 for ; Wed, 27 Jun 2018 06:45:26 -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:user-agent; bh=D/sygKQnfFe7jlq9GA4eLJ8Fm/t+adFvYKLp4+ivVZg=; b=RmT1R41b2fG8eKI30A7aXx3U5O+3UVyq7p2cehT/MKsrfX4dovRjL+ih/p2nTnRzkP EvjPDu/+qOpbOXUAlVSz3NvLZoyjkSq4hqAD4jjpJW9HZLsJ2xytPgIy8zsKVEckk2YZ 6FmWq7AJeeZcpc4+4Gx9+7fiKkd6Gt4vlm4L5n0Ql0ESUCRY8esPqCg5OczAutSLHJiC 2M4xIkgJCvg5IiAfEqMK9DsRSS9M8dlDQAYLVIznbhlFqbzuT3HsUPZFXyvRaclnu+EJ 9TwamOtJRYQieMCMvlFv31I8iHRPsjqVGEH49YSloxNEE9MmBh4qNogtncLpXuvX/vgb JEww== 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:user-agent; bh=D/sygKQnfFe7jlq9GA4eLJ8Fm/t+adFvYKLp4+ivVZg=; b=R9+bn4O+ZLMD4oQWyYaeYmODyigw7vuD0EOi+9OeJjXO5RUlNPmEsXgGzxDVmEOzmp 4o7rsVOVv1G1wtx9+hi/Uv4pTtbInqR29X578GvuDmDMH6LGOYQlmmLLr4o7IxAetVno dC6iiR4/WiTN9BFB0sV625wY6xbBwID0dsvsHkUUtx4p3h2u21xqIrl6VXEydFQWR5YM stNmaYwdGBpJ8AvG+sosg4ppwmTkp1EBKNO7F0IZHRpy25C48e8dY/DGUkYiKdHj4aZl s+CFDVtMMu3c1GQ6r77wwHT9N1cykYIVWKWYywNcc0j1yJliNHCS6qIEFpEGBIERaWBR ZjNQ== X-Gm-Message-State: APt69E1jb2uPpggrZVuT1Ji8A0UAPkScO/gPOR0SzLD7AGMe9/Q60V+k 0I//akun9S+kk+Iq3ngErB08Zg== X-Google-Smtp-Source: AAOMgpd6la9lYGQweD64qxtROIIb1Af/tFaI8Zp9sqLgKxbMGJmtOumEcDia5cEjOKQkRWBIP1Hokw== X-Received: by 2002:adf:bd89:: with SMTP id l9-v6mr5380139wrh.266.1530107125403; Wed, 27 Jun 2018 06:45:25 -0700 (PDT) Received: from mutt-hbsd ([46.29.248.238]) by smtp.gmail.com with ESMTPSA id s2-v6sm6639224wrn.75.2018.06.27.06.45.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Jun 2018 06:45:24 -0700 (PDT) Date: Wed, 27 Jun 2018 09:44:55 -0400 From: Shawn Webb To: Warner Losh Cc: Oliver Pinter , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Warner Losh Subject: Re: svn commit: r335690 - head/sys/kern Message-ID: <20180627134455.k6jvum4pnuejas3x@mutt-hbsd> References: <201806270411.w5R4B9ZB078994@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="kllacfhio377jhyz" Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD mutt-hbsd 12.0-CURRENT FreeBSD 12.0-CURRENT X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: NeoMutt/20180323 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 13:45:27 -0000 --kllacfhio377jhyz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 27, 2018 at 07:42:52AM -0600, Warner Losh wrote: > On Wed, Jun 27, 2018 at 12:59 AM, Oliver Pinter < > oliver.pinter@hardenedbsd.org> wrote: >=20 > > > > > > On Wednesday, June 27, 2018, Warner Losh wrote: > > > >> Author: imp > >> Date: Wed Jun 27 04:11:09 2018 > >> New Revision: 335690 > >> URL: https://svnweb.freebsd.org/changeset/base/335690 > >> > >> Log: > >> Fix devctl generation for core files. > >> > >> We have a problem with vn_fullpath_global when the file exists. Work > >> around it by printing the full path if the core file name starts wit= h /, > >> or current working directory followed by the filename if not. > >> > >> Sponsored by: Netflix > >> Differential Review: https://reviews.freebsd.org/D16026 > >> > >> Modified: > >> head/sys/kern/kern_sig.c > >> > >> Modified: head/sys/kern/kern_sig.c > >> =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/kern/kern_sig.c Wed Jun 27 04:10:48 2018 (r3356= 89) > >> +++ head/sys/kern/kern_sig.c Wed Jun 27 04:11:09 2018 (r3356= 90) > >> @@ -3431,24 +3431,6 @@ out: > >> return (0); > >> } > >> > >> -static int > >> -coredump_sanitise_path(const char *path) > >> -{ > >> - size_t i; > >> - > >> - /* > >> - * Only send a subset of ASCII to devd(8) because it > >> - * might pass these strings to sh -c. > >> - */ > >> - for (i =3D 0; path[i]; i++) > >> - if (!(isalpha(path[i]) || isdigit(path[i])) && > >> - path[i] !=3D '/' && path[i] !=3D '.' && > >> - path[i] !=3D '-') > >> - return (0); > > > > > > This part of code existed to prevent shell code injection via file name= s. > > After this commit we lose this. > > >=20 > It's devd's job to prevent that, not the kernel's. Has devd been updated? Or is this particular vulnerability manifest again? --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD Tor-ified Signal: +1 443-546-8752 Tor+XMPP+OTR: lattera@is.a.hacker.sx GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --kllacfhio377jhyz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAlszlNIACgkQaoRlj1JF bu4lyRAAtxbhqWlQb9g9q7Jn8chInkludGnPqDRsC1Md7vrqT8dSbIQE1PsD5grQ I4Z0yTrJC1f5gmY1NXNyTyF8G0jHHMpjXOKAusDw/hHIE8aWm+2fBvVjQJMqchN8 DmeV+xKYNC1A7seTDbGQz9Vyqu8kKec7DFt6+SemA6TEj2Y8LPGGYWVGrrF+grZp MlIlubf3uf07wAdua6+mgUEGa1qHfrTbC+84FxLmuOD6IlbVhAJNaaSPMhHNYtIS E4bpaatFSscE9qePrSfNQagFlwyKR1kUtHkuKgEZ4OFLVFYvGTb9OXsbyRRpjfd+ RLABFk79zd57xlI9zNj1MSSyeXTC7Ue/MdbjiyEOK85+lt73A+FEFh4IxV1IQExr vNtgud5wW/8DPNK8xHHY0xLEaL4KrrM4EO5IdxjMNS7Wcn8VHnw87xp7i4vIG2k9 zsHrcQXb+TdGeLFBSlZ6MOs3Zv5r7KjKmqLLSf2DRqFKSBucwtU1bSfWZK0lYwne hix29eTQyz3aZmPW/M8reNnOqRCGfewFVhpK62CA9M4tgQBmoz0I5ZUoUfYytqPh DAwBVaCp5nmIWxn/IcLubnQeiGLK1XkEUuHWeuqICrMfDYBZ8fULA8ukJwjVjw+X kxWYNlyHIXapJgVa2QNlu+tH0kC3JYfSSe2/8alXfW40ROizTVc= =l2nY -----END PGP SIGNATURE----- --kllacfhio377jhyz-- From owner-svn-src-all@freebsd.org Wed Jun 27 13:46:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1373B10250C3 for ; Wed, 27 Jun 2018 13:46:30 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 95FEA7E087 for ; Wed, 27 Jun 2018 13:46:29 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x231.google.com with SMTP id g7-v6so1940387ioh.11 for ; Wed, 27 Jun 2018 06:46:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=+jD43cHCtWepohF0TDojnoVq2uC4A293dXvj4LwsQnM=; b=WMpmfD5VCRKGsgjhFQziBg99NVqzRulbLHKEWwGICPfkMeAazASsRbfwMJf2TgutQ1 qym1+489lRBx5QIgD0vZy1R40xp8rQ4AarjJnejkfHoPNKQNxhSBxukoZGg4Su2jMruU /L+IAgm8qGVRWMJu9S6gPpQUy6QASYbnTwausb7oxQY9J1yIb33l05bSIwxf9hgFm+77 Ad+Iw/NlYA3+sW35sbKCuOgF9vCyfIoY6CPfI2KJU+rzojpkMgaAjUN9I+rw71n6UGdz kfuR8V3pZW138LxIxt2I4vEI5YxOqoRZF1HAwIcqoEQac83L1/rzCxOCZHllPG/Gk7rz XoeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=+jD43cHCtWepohF0TDojnoVq2uC4A293dXvj4LwsQnM=; b=unkQh2s0gQ01xS0d9+M7UmnvwhF7jXci2R5RxfxArA2U03Oed/GxrqGamuXelclUbN bawTMYv3eDYyGxQtI+Gd96JpvFuxlD0hDrvolMuNbkbpllopugr0mR6ruJjUYau+ns06 OhTsrxt8dBvLxUyTNU7hnRAxMPwyoDDV/wJtaQcwghvK+q/a3q9wiyHEsYNZ8zpkhrqK +XqzMsorQo36PPiN/UQ1Sy105BtOnvf3EKQAxNNoHZvdtWkobUFP1J2y6WPLHplsLw8T 9XN+VcWD42L27ONDmwhhtQbu+gfaH5nNjTZRKdA43qlSxkIwXLxJ+6WJWQ9hBAdCGnLr C4vg== X-Gm-Message-State: APt69E3poaz0vjMEh9NjYFAjY61Gm/MYzlsNukZ6QOr5dTFznUbFK8RS r245+RhzqSyl08UkvYC1yG6toCXLgG2z8ScBmKXL+w== X-Google-Smtp-Source: AAOMgpdcLIrZfVePHBV3BfCb5VwjWQHPPyuuB6FNyZhz/c7ncYVjjI//i4KnNW6JSzWeCrW9qQsQYz3mH4egmjkHqmo= X-Received: by 2002:a6b:280a:: with SMTP id o10-v6mr4937149ioo.168.1530107188987; Wed, 27 Jun 2018 06:46:28 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:5945:0:0:0:0:0 with HTTP; Wed, 27 Jun 2018 06:46:28 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: <20180627134455.k6jvum4pnuejas3x@mutt-hbsd> References: <201806270411.w5R4B9ZB078994@repo.freebsd.org> <20180627134455.k6jvum4pnuejas3x@mutt-hbsd> From: Warner Losh Date: Wed, 27 Jun 2018 07:46:28 -0600 X-Google-Sender-Auth: UNndCKCC8dRb_FcLPhxSgp_OYsM Message-ID: Subject: Re: svn commit: r335690 - head/sys/kern To: Shawn Webb Cc: Oliver Pinter , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Warner Losh Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 13:46:30 -0000 On Wed, Jun 27, 2018 at 7:44 AM, Shawn Webb wrote: > On Wed, Jun 27, 2018 at 07:42:52AM -0600, Warner Losh wrote: > > On Wed, Jun 27, 2018 at 12:59 AM, Oliver Pinter < > > oliver.pinter@hardenedbsd.org> wrote: > > > > > > > > > > > On Wednesday, June 27, 2018, Warner Losh wrote: > > > > > >> Author: imp > > >> Date: Wed Jun 27 04:11:09 2018 > > >> New Revision: 335690 > > >> URL: https://svnweb.freebsd.org/changeset/base/335690 > > >> > > >> Log: > > >> Fix devctl generation for core files. > > >> > > >> We have a problem with vn_fullpath_global when the file exists. Work > > >> around it by printing the full path if the core file name starts > with /, > > >> or current working directory followed by the filename if not. > > >> > > >> Sponsored by: Netflix > > >> Differential Review: https://reviews.freebsd.org/D16026 > > >> > > >> Modified: > > >> head/sys/kern/kern_sig.c > > >> > > >> Modified: head/sys/kern/kern_sig.c > > >> ============================================================ > > >> ================== > > >> --- head/sys/kern/kern_sig.c Wed Jun 27 04:10:48 2018 > (r335689) > > >> +++ head/sys/kern/kern_sig.c Wed Jun 27 04:11:09 2018 > (r335690) > > >> @@ -3431,24 +3431,6 @@ out: > > >> return (0); > > >> } > > >> > > >> -static int > > >> -coredump_sanitise_path(const char *path) > > >> -{ > > >> - size_t i; > > >> - > > >> - /* > > >> - * Only send a subset of ASCII to devd(8) because it > > >> - * might pass these strings to sh -c. > > >> - */ > > >> - for (i = 0; path[i]; i++) > > >> - if (!(isalpha(path[i]) || isdigit(path[i])) && > > >> - path[i] != '/' && path[i] != '.' && > > >> - path[i] != '-') > > >> - return (0); > > > > > > > > > This part of code existed to prevent shell code injection via file > names. > > > After this commit we lose this. > > > > > > > It's devd's job to prevent that, not the kernel's. > > Has devd been updated? Or is this particular vulnerability manifest > again? > devd is fine as far as I know, apart from the default action. I'm fixing that now. Warner From owner-svn-src-all@freebsd.org Wed Jun 27 14:05:59 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22F471025CD1; Wed, 27 Jun 2018 14:05:59 +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 760FA7F4AF; Wed, 27 Jun 2018 14:05:58 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id YB50fkkhpbP3IYB52f2X94; Wed, 27 Jun 2018 08:05:56 -0600 X-Authority-Analysis: v=2.3 cv=P64UeBIu c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=7mUfYlMuFuIA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=Fqx1Y7KROrde_W_7gYsA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 6E63B10A; Wed, 27 Jun 2018 07:05:54 -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 w5RE5r5s038732; Wed, 27 Jun 2018 07:05:53 -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 w5RE5rQ0038721; Wed, 27 Jun 2018 07:05:53 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201806271405.w5RE5rQ0038721@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: "Stephen J. Kiernan" cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r335681 - head/sbin/veriexecctl In-Reply-To: Message from "Stephen J. Kiernan" of "Tue, 26 Jun 2018 23:19:55 -0000." <201806262319.w5QNJtQd030384@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 27 Jun 2018 07:05:53 -0700 X-CMAE-Envelope: MS4wfEMjhyKn2cp0dzUwHj562qjpOgrE5ViSwVvSDgdACuhUzFupnycobpEJEoqQ2mFQnouhRyUo6TKFb2Z7UnK5KFT64Fr4b+L85MnnSVDBXUmByy/dIqF7 Iu9vxOSgUQZ23T73v84CoLMy1f186ZvKZf+RUzlpoFb9BY44CKAHnWLK8az3Q/oz8GFagykvQQK04zlY6dQ6qFyUUymN0QQVDZwWbQsp0xvFTuu0uREUxMcQ 0sbsrVDHqSG89JdeyaQS+eokDnkurZMWc4XA44WW2Ing8abxtLOwPhnXNH8+r4Ra X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 14:05:59 -0000 In message <201806262319.w5QNJtQd030384@repo.freebsd.org>, "Stephen J. Kiernan" writes: > Author: stevek > Date: Tue Jun 26 23:19:55 2018 > New Revision: 335681 > URL: https://svnweb.freebsd.org/changeset/base/335681 > > Log: > Revert r335402 > > While useful as an example, veriexecctl, as it is, has very little practica > l > use, since there is nothing ensuring the integrity of the manifest of hashe > s. > A more appropriate set of utilities will replace it. > > Deleted: > head/sbin/veriexecctl/ > Don't forget ObsoleteFiles.inc. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Wed Jun 27 14:09:29 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91416102612B; Wed, 27 Jun 2018 14:09:29 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (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 DD49F7F7AE; Wed, 27 Jun 2018 14:09:28 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id YB8KfklhbbP3IYB8Mf2XuH; Wed, 27 Jun 2018 08:09:22 -0600 X-Authority-Analysis: v=2.3 cv=P64UeBIu c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=7mUfYlMuFuIA:10 a=VxmjJ2MpAAAA:8 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=62Xd9QDoN93t4Cl1Ua8A:9 a=CjuIK1q_8ugA:10 a=FeUWKIZeehMA:10 a=7gXAzLPJhVmCkEl4_tsf:22 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id B0E2511C; Wed, 27 Jun 2018 07:09:20 -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 w5RE9KbQ062879; Wed, 27 Jun 2018 07:09:20 -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 w5RE9KRg062864; Wed, 27 Jun 2018 07:09:20 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201806271409.w5RE9KRg062864@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Cy Schubert cc: "Stephen J. Kiernan" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r335681 - head/sbin/veriexecctl In-Reply-To: Message from Cy Schubert of "Wed, 27 Jun 2018 07:05:53 -0700." <201806271405.w5RE5rQ0038721@slippy.cwsent.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 27 Jun 2018 07:09:20 -0700 X-CMAE-Envelope: MS4wfBqYLhzrEMcBcAeJ+aILA075EJjbyDLrU0uAMxrzLGfhpbW/+1sOsCUFgb2NB2wxrEb+fJg5mt+YnWRyUP6w7ORil6cHi3pGV2wYZnp+7zvp4oEM3HQS cIAKdXrO2t/n/86VBSzERDqiVnuuNvyt9czsT72ywfqEA1Qyiu9yOJe1z1eBi8p/GpF80koaqSgu7FvL1nrAaHH8av+0SIC62iEVllaMjJ2BN62mBVDRZicA W1BehbIUJyXoitliLey4O3FpYHu9WXABTKpfT6GvCiXE2/kEjcOINgTH8dkBPDm9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 14:09:29 -0000 In message <201806271405.w5RE5rQ0038721@slippy.cwsent.com>, Cy Schubert writes: > In message <201806262319.w5QNJtQd030384@repo.freebsd.org>, "Stephen J. > Kiernan" > writes: > > Author: stevek > > Date: Tue Jun 26 23:19:55 2018 > > New Revision: 335681 > > URL: https://svnweb.freebsd.org/changeset/base/335681 > > > > Log: > > Revert r335402 > > > > While useful as an example, veriexecctl, as it is, has very little practi > ca > > l > > use, since there is nothing ensuring the integrity of the manifest of has > he > > s. > > A more appropriate set of utilities will replace it. > > > > Deleted: > > head/sbin/veriexecctl/ > > > > Don't forget ObsoleteFiles.inc. Nevermind. Looks like it never installed in the first place. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Wed Jun 27 14:29:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0375B1027223; Wed, 27 Jun 2018 14:29:14 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A5B4080654; Wed, 27 Jun 2018 14:29:13 +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 87A732445C; Wed, 27 Jun 2018 14:29:13 +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 w5RETDup094480; Wed, 27 Jun 2018 14:29:13 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RETDG1094479; Wed, 27 Jun 2018 14:29:13 GMT (envelope-from np@FreeBSD.org) Message-Id: <201806271429.w5RETDG1094479@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 27 Jun 2018 14:29:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335701 - head/sys/dev/cxgbe/cxgbei X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/dev/cxgbe/cxgbei X-SVN-Commit-Revision: 335701 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 14:29:14 -0000 Author: np Date: Wed Jun 27 14:29:13 2018 New Revision: 335701 URL: https://svnweb.freebsd.org/changeset/base/335701 Log: cxgbe/cxgbei: Fix harmful typo in the iSCSI offload driver. Reported by: gcc8 (via mmacy@) MFC after: 3 days Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/cxgbei/cxgbei.c Modified: head/sys/dev/cxgbe/cxgbei/cxgbei.c ============================================================================== --- head/sys/dev/cxgbe/cxgbei/cxgbei.c Wed Jun 27 12:08:12 2018 (r335700) +++ head/sys/dev/cxgbe/cxgbei/cxgbei.c Wed Jun 27 14:29:13 2018 (r335701) @@ -670,7 +670,7 @@ start_worker_threads(void) i + 1, worker_thread_count, rc); mtx_destroy(&cwt->cwt_lock); cv_destroy(&cwt->cwt_cv); - bzero(&cwt, sizeof(*cwt)); + bzero(cwt, sizeof(*cwt)); if (i == 0) { free(cwt_softc, M_CXGBE); worker_thread_count = 0; From owner-svn-src-all@freebsd.org Wed Jun 27 14:45:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58E521027C48; Wed, 27 Jun 2018 14:45:15 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 05ADE81214; Wed, 27 Jun 2018 14:45:15 +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 B7C9524780; Wed, 27 Jun 2018 14:45:14 +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 w5REjEC7005163; Wed, 27 Jun 2018 14:45:14 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5REjEjM005161; Wed, 27 Jun 2018 14:45:14 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201806271445.w5REjEjM005161@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 27 Jun 2018 14:45:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335702 - in head/sys: compat/linux sys vm X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/sys: compat/linux sys vm X-SVN-Commit-Revision: 335702 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 14:45:15 -0000 Author: emaste Date: Wed Jun 27 14:45:13 2018 New Revision: 335702 URL: https://svnweb.freebsd.org/changeset/base/335702 Log: Split kern_break from sys_break and use it in linuxulator Previously the linuxulator's linux_brk invoked the FreeBSD sys_break syscall implementation directly. Instead, move the bulk of the existing implementation to kern_break, and call that from both sys_break and linux_brk. This also addresses a minor bug in linux_brk in that we now return the actual (rounded up) break address, rather than the requested value. Reviewed by: brooks (earlier version) Sponsored by: Turing Robotic Industries Differential Revision: https://reviews.freebsd.org/D16019 Modified: head/sys/compat/linux/linux_misc.c head/sys/sys/syscallsubr.h head/sys/vm/vm_unix.c Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Wed Jun 27 14:29:13 2018 (r335701) +++ head/sys/compat/linux/linux_misc.c Wed Jun 27 14:45:13 2018 (r335702) @@ -232,22 +232,18 @@ int linux_brk(struct thread *td, struct linux_brk_args *args) { struct vmspace *vm = td->td_proc->p_vmspace; - vm_offset_t new, old; - struct break_args /* { - char * nsize; - } */ tmp; + uintptr_t new, old; #ifdef DEBUG if (ldebug(brk)) printf(ARGS(brk, "%p"), (void *)(uintptr_t)args->dsend); #endif - old = (vm_offset_t)vm->vm_daddr + ctob(vm->vm_dsize); - new = (vm_offset_t)args->dsend; - tmp.nsize = (char *)new; - if (((caddr_t)new > vm->vm_daddr) && !sys_break(td, &tmp)) - td->td_retval[0] = (long)new; + old = (uintptr_t)vm->vm_daddr + ctob(vm->vm_dsize); + new = (uintptr_t)args->dsend; + if ((caddr_t)new > vm->vm_daddr && !kern_break(td, &new)) + td->td_retval[0] = (register_t)new; else - td->td_retval[0] = (long)old; + td->td_retval[0] = (register_t)old; return (0); } Modified: head/sys/sys/syscallsubr.h ============================================================================== --- head/sys/sys/syscallsubr.h Wed Jun 27 14:29:13 2018 (r335701) +++ head/sys/sys/syscallsubr.h Wed Jun 27 14:45:13 2018 (r335702) @@ -76,6 +76,7 @@ int kern_adjtime(struct thread *td, struct timeval *de int kern_alternate_path(struct thread *td, const char *prefix, const char *path, enum uio_seg pathseg, char **pathbuf, int create, int dirfd); int kern_bindat(struct thread *td, int dirfd, int fd, struct sockaddr *sa); +int kern_break(struct thread *td, uintptr_t *addr); int kern_cap_ioctls_limit(struct thread *td, int fd, u_long *cmds, size_t ncmds); int kern_cap_rights_limit(struct thread *td, int fd, cap_rights_t *rights); Modified: head/sys/vm/vm_unix.c ============================================================================== --- head/sys/vm/vm_unix.c Wed Jun 27 14:29:13 2018 (r335701) +++ head/sys/vm/vm_unix.c Wed Jun 27 14:45:13 2018 (r335702) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -69,6 +70,22 @@ int sys_break(struct thread *td, struct break_args *uap) { #if !defined(__aarch64__) && !defined(__riscv__) + uintptr_t addr; + int error; + + addr = (uintptr_t)uap->nsize; + error = kern_break(td, &addr); + if (error == 0) + td->td_retval[0] = addr; + return (error); +#else /* defined(__aarch64__) || defined(__riscv__) */ + return (ENOSYS); +#endif /* defined(__aarch64__) || defined(__riscv__) */ +} + +int +kern_break(struct thread *td, uintptr_t *addr) +{ struct vmspace *vm = td->td_proc->p_vmspace; vm_map_t map = &vm->vm_map; vm_offset_t new, old, base; @@ -82,7 +99,7 @@ sys_break(struct thread *td, struct break_args *uap) vmemlim = lim_cur(td, RLIMIT_VMEM); do_map_wirefuture = FALSE; - new = round_page((vm_offset_t)uap->nsize); + new = round_page(*addr); vm_map_lock(map); base = round_page((vm_offset_t) vm->vm_daddr); @@ -226,12 +243,9 @@ done: VM_MAP_WIRE_USER|VM_MAP_WIRE_NOHOLES); if (error == 0) - td->td_retval[0] = new; + *addr = new; return (error); -#else /* defined(__aarch64__) || defined(__riscv__) */ - return (ENOSYS); -#endif /* defined(__aarch64__) || defined(__riscv__) */ } #ifdef COMPAT_FREEBSD11 From owner-svn-src-all@freebsd.org Wed Jun 27 15:28:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2BFD910297BE; Wed, 27 Jun 2018 15:28:11 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D324C82989; Wed, 27 Jun 2018 15:28:10 +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 B514024E1B; Wed, 27 Jun 2018 15:28:10 +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 w5RFSAhQ025740; Wed, 27 Jun 2018 15:28:10 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RFSA7l025737; Wed, 27 Jun 2018 15:28:10 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201806271528.w5RFSA7l025737@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Wed, 27 Jun 2018 15:28:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335703 - head/tests/sys/audit X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/tests/sys/audit X-SVN-Commit-Revision: 335703 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 15:28:11 -0000 Author: asomers Date: Wed Jun 27 15:28:09 2018 New Revision: 335703 URL: https://svnweb.freebsd.org/changeset/base/335703 Log: audit(4): fix Coverity issues Fix several incorrect buffer size arguments and a file descriptor leak. Submitted by: aniketp Reported by: Coverity CID: 1393489 1393501 1393509 1393510 1393514 1393515 1393516 CID: 1393517 1393518 1393519 MFC after: 2 weeks X-MFC-With: 335284 X-MFC-With: 335318 X-MFC-With: 335320 Sponsored by: Google, Inc. (GSoC 2018) Differential Revision: https://reviews.freebsd.org/D16000 Modified: head/tests/sys/audit/administrative.c head/tests/sys/audit/file-attribute-access.c head/tests/sys/audit/file-attribute-modify.c Modified: head/tests/sys/audit/administrative.c ============================================================================== --- head/tests/sys/audit/administrative.c Wed Jun 27 14:45:13 2018 (r335702) +++ head/tests/sys/audit/administrative.c Wed Jun 27 15:28:09 2018 (r335703) @@ -163,7 +163,7 @@ ATF_TC_BODY(nfs_getfh_success, tc) snprintf(adregex, sizeof(adregex), "nfs_getfh.*%d.*ret.*success", pid); /* File needs to exist to call getfh(2) */ - ATF_REQUIRE(filedesc = open(path, O_CREAT, mode) != -1); + ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1); FILE *pipefd = setup(fds, auclass); ATF_REQUIRE_EQ(0, getfh(path, &fhp)); check_audit(fds, adregex, pipefd); Modified: head/tests/sys/audit/file-attribute-access.c ============================================================================== --- head/tests/sys/audit/file-attribute-access.c Wed Jun 27 14:45:13 2018 (r335702) +++ head/tests/sys/audit/file-attribute-access.c Wed Jun 27 15:28:09 2018 (r335703) @@ -44,9 +44,9 @@ static pid_t pid; static fhandle_t fht; static int filedesc, fhdesc; static char extregex[80]; +static char buff[] = "ezio"; static struct stat statbuff; static struct statfs statfsbuff; -static const char *buff = "ezio"; static const char *auclass = "fa"; static const char *name = "authorname"; static const char *path = "fileforaudit"; Modified: head/tests/sys/audit/file-attribute-modify.c ============================================================================== --- head/tests/sys/audit/file-attribute-modify.c Wed Jun 27 14:45:13 2018 (r335702) +++ head/tests/sys/audit/file-attribute-modify.c Wed Jun 27 15:28:09 2018 (r335703) @@ -46,7 +46,7 @@ static int filedesc, retval; static struct pollfd fds[1]; static mode_t mode = 0777; static char extregex[80]; -static const char *buff = "ezio"; +static char buff[] = "ezio"; static const char *auclass = "fm"; static const char *name = "authorname"; static const char *path = "fileforaudit"; From owner-svn-src-all@freebsd.org Wed Jun 27 16:56:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8AEB8102CC66; Wed, 27 Jun 2018 16:56:47 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D84F85FEF; Wed, 27 Jun 2018 16:56:47 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1EACC25CDF; Wed, 27 Jun 2018 16:56:47 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RGukUB072755; Wed, 27 Jun 2018 16:56:46 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RGukYs072754; Wed, 27 Jun 2018 16:56:46 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201806271656.w5RGukYs072754@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 27 Jun 2018 16:56:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335704 - head/lib/libc/tests/ssp X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/lib/libc/tests/ssp X-SVN-Commit-Revision: 335704 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 16:56:47 -0000 Author: bdrewery Date: Wed Jun 27 16:56:46 2018 New Revision: 335704 URL: https://svnweb.freebsd.org/changeset/base/335704 Log: Rework check for libclang_rt to see if the needed library exists. Currently libclang_rt is not provided for cross-building and as such is not connected to cross-tools. For building clang once in universe it is likely that libclang_rt won't exist for the universe toolchain but even if it did it would not support anything but the native arch. So explicitly check for support before enabling h_raw. MFC after: 1 week Reviewed by: dim Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D16012 Modified: head/lib/libc/tests/ssp/Makefile Modified: head/lib/libc/tests/ssp/Makefile ============================================================================== --- head/lib/libc/tests/ssp/Makefile Wed Jun 27 15:28:09 2018 (r335703) +++ head/lib/libc/tests/ssp/Makefile Wed Jun 27 16:56:46 2018 (r335704) @@ -1,9 +1,5 @@ # $FreeBSD$ -# XXX This is a workaround to allow i386 to cross-compile on an amd64 host. -.include -# XXX --- - .include NO_WERROR= @@ -35,21 +31,16 @@ PROGS+= h_memset # probably needs to be fixed as it's currently hardcoded. # # sanitizer is not tested or supported for ARM right now. sbruno -.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" -.if ${COMPILER_TYPE} == "clang" && ${MK_TOOLCHAIN} == "yes" -.if ${COMPILER_VERSION} < 30500 || 30700 <= ${COMPILER_VERSION} - -# XXX This is a workaround to allow i386 to cross-compile on an amd64 host. -.if ${MACHINE_CPUARCH} == ${_HOST_ARCH} -# XXX --- - -PROGS+= h_raw - -# XXX This is a workaround to allow i386 to cross-compile on an amd64 host. +.if ${COMPILER_TYPE} == "clang" && !defined(_SKIP_BUILD) && \ + (!defined(_RECURSING_PROGS) || ${PROG} == "h_raw") +.if !defined(_CLANG_RESOURCE_DIR) +_CLANG_RESOURCE_DIR!= ${CC:N${CCACHE_BIN}} -print-resource-dir +.export _CLANG_RESOURCE_DIR .endif -# XXX --- - -.endif +_libclang_rt_arch= ${MACHINE_ARCH:S/amd64/x86_64/:C/hf$//:S/mipsn32/mips64/} +_libclang_rt_ubsan= ${_CLANG_RESOURCE_DIR}/lib/freebsd/libclang_rt.ubsan_standalone-${_libclang_rt_arch}.a +.if exists(${_libclang_rt_ubsan}) +PROGS+= h_raw .endif .endif PROGS+= h_read From owner-svn-src-all@freebsd.org Wed Jun 27 16:57:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBEDF102CD3B; Wed, 27 Jun 2018 16:57:48 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7A2EC86186; Wed, 27 Jun 2018 16:57:48 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5C7F825CE3; Wed, 27 Jun 2018 16:57:48 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RGvmMs072846; Wed, 27 Jun 2018 16:57:48 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RGvm5T072845; Wed, 27 Jun 2018 16:57:48 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201806271657.w5RGvm5T072845@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 27 Jun 2018 16:57:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335705 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 335705 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 16:57:49 -0000 Author: bdrewery Date: Wed Jun 27 16:57:47 2018 New Revision: 335705 URL: https://svnweb.freebsd.org/changeset/base/335705 Log: Use dependent options to auto enable _SUPPORT and CLANG_FULL options. MFC after: 1 week Reviewed by: sbruno, dim Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D16018 Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Wed Jun 27 16:56:46 2018 (r335704) +++ head/share/mk/src.opts.mk Wed Jun 27 16:57:47 2018 (r335705) @@ -207,8 +207,29 @@ __DEFAULT_NO_OPTIONS = \ ZONEINFO_LEAPSECONDS_SUPPORT \ ZONEINFO_OLD_TIMEZONES_SUPPORT \ +# LEFT/RIGHT. Left options which default to "yes" unless their corresponding +# RIGHT option is disabled. +__DEFAULT_DEPENDENT_OPTIONS= \ + CLANG_FULL/CLANG \ +# MK_*_SUPPORT options which default to "yes" unless their corresponding +# MK_* variable is set to "no". # +.for var in \ + BLACKLIST \ + BZIP2 \ + INET \ + INET6 \ + KERBEROS \ + KVM \ + NETGRAPH \ + PAM \ + TESTS \ + WIRELESS +__DEFAULT_DEPENDENT_OPTIONS+= ${var}_SUPPORT/${var} +.endfor + +# # Default behaviour of some options depends on the architecture. Unfortunately # this means that we have to test TARGET_ARCH (the buildworld case) as well # as MACHINE_ARCH (the non-buildworld case). Normally TARGET_ARCH is not @@ -236,7 +257,7 @@ __TT=${MACHINE} .if ${COMPILER_FEATURES:Mc++11} && (${__T} == "aarch64" || \ ${__T} == "amd64" || ${__TT} == "arm" || ${__T} == "i386") # Clang is enabled, and will be installed as the default /usr/bin/cc. -__DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC LLD +__DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_IS_CC LLD __DEFAULT_YES_OPTIONS+=LLVM_TARGET_AARCH64 LLVM_TARGET_ARM LLVM_TARGET_MIPS __DEFAULT_YES_OPTIONS+=LLVM_TARGET_POWERPC LLVM_TARGET_SPARC LLVM_TARGET_X86 __DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX GPL_DTC @@ -244,14 +265,14 @@ __DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX GPL_DTC # If an external compiler that supports C++11 is used as ${CC} and Clang # supports the target, then Clang is enabled but GCC is installed as the # default /usr/bin/cc. -__DEFAULT_YES_OPTIONS+=CLANG CLANG_FULL GCC GCC_BOOTSTRAP GNUCXX GPL_DTC LLD +__DEFAULT_YES_OPTIONS+=CLANG GCC GCC_BOOTSTRAP GNUCXX GPL_DTC LLD __DEFAULT_YES_OPTIONS+=LLVM_TARGET_AARCH64 LLVM_TARGET_ARM LLVM_TARGET_MIPS __DEFAULT_YES_OPTIONS+=LLVM_TARGET_POWERPC LLVM_TARGET_SPARC LLVM_TARGET_X86 __DEFAULT_NO_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC .else # Everything else disables Clang, and uses GCC instead. __DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX GPL_DTC -__DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC LLD +__DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_IS_CC LLD __DEFAULT_NO_OPTIONS+=LLVM_TARGET_AARCH64 LLVM_TARGET_ARM LLVM_TARGET_MIPS __DEFAULT_NO_OPTIONS+=LLVM_TARGET_POWERPC LLVM_TARGET_SPARC LLVM_TARGET_X86 .endif @@ -491,28 +512,6 @@ MK_${vv:H}:= ${MK_${vv:T}} # # Set defaults for the MK_*_SUPPORT variables. # - -# -# MK_*_SUPPORT options which default to "yes" unless their corresponding -# MK_* variable is set to "no". -# -.for var in \ - BLACKLIST \ - BZIP2 \ - INET \ - INET6 \ - KERBEROS \ - KVM \ - NETGRAPH \ - PAM \ - TESTS \ - WIRELESS -.if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no" -MK_${var}_SUPPORT:= no -.else -MK_${var}_SUPPORT:= yes -.endif -.endfor .if !${COMPILER_FEATURES:Mc++11} MK_LLDB:= no From owner-svn-src-all@freebsd.org Wed Jun 27 16:57:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 902FA102CD5C; Wed, 27 Jun 2018 16:57:54 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F371A8620B; Wed, 27 Jun 2018 16:57:53 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 17A2325CE4; Wed, 27 Jun 2018 16:57:53 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RGvqil072899; Wed, 27 Jun 2018 16:57:52 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RGvqwZ072896; Wed, 27 Jun 2018 16:57:52 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201806271657.w5RGvqwZ072896@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 27 Jun 2018 16:57:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335706 - in head: . share/mk tools/build/options X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: in head: . share/mk tools/build/options X-SVN-Commit-Revision: 335706 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 16:57:54 -0000 Author: bdrewery Date: Wed Jun 27 16:57:51 2018 New Revision: 335706 URL: https://svnweb.freebsd.org/changeset/base/335706 Log: Add LLVM_TARGET_ALL option. LLVM_TARGET_* will auto be set based on LLVM_TARGET_ALL and MK_CLANG. If LLVM_TARGET_ALL is disabled, during a cross-build, then SYSTEM_COMPILER and SYSTEM_LINKER are auto disabled. This option should be used by users rather than the per-arch LLVM_TARGET options as it is simpler to maintain for them should the supported target list change. MFC after: 2 weeks Reviewed by: sbruno, dim Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D16020 Added: head/tools/build/options/WITHOUT_LLVM_TARGET_ALL (contents, props changed) head/tools/build/options/WITH_LLVM_TARGET_ALL (contents, props changed) Modified: head/Makefile.inc1 head/share/mk/src.opts.mk Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Jun 27 16:57:47 2018 (r335705) +++ head/Makefile.inc1 Wed Jun 27 16:57:51 2018 (r335706) @@ -130,6 +130,15 @@ MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/:C/hf$// TARGET_ABI?= unknown TARGET_TRIPLE?= ${TARGET_ARCH:S/amd64/x86_64/:C/hf$//:S/mipsn32/mips64/}-${TARGET_ABI}-freebsd12.0 +# If all targets are disabled for system llvm then don't expect it to work +# for cross-builds. +.if ${MK_LLVM_TARGET_ALL} == "no" && \ + ${MACHINE} != ${TARGET} && ${MACHINE_ARCH} != ${TARGET_ARCH} && \ + !make(showconfig) +MK_SYSTEM_COMPILER= no +MK_SYSTEM_LINKER= no +.endif + # Handle external binutils. .if defined(CROSS_TOOLCHAIN_PREFIX) CROSS_BINUTILS_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Wed Jun 27 16:57:47 2018 (r335705) +++ head/share/mk/src.opts.mk Wed Jun 27 16:57:51 2018 (r335706) @@ -211,6 +211,7 @@ __DEFAULT_NO_OPTIONS = \ # RIGHT option is disabled. __DEFAULT_DEPENDENT_OPTIONS= \ CLANG_FULL/CLANG \ + LLVM_TARGET_ALL/CLANG \ # MK_*_SUPPORT options which default to "yes" unless their corresponding # MK_* variable is set to "no". @@ -249,6 +250,27 @@ __TT=${TARGET} __TT=${MACHINE} .endif +# All supported backends for LLVM_TARGET_XXX +__LLVM_TARGETS= \ + aarch64 \ + arm \ + mips \ + powerpc \ + sparc \ + x86 +__LLVM_TARGET_FILT= C/(amd64|i386)/x86/:S/sparc64/sparc/:S/arm64/aarch64/ +# Default the given TARGET_ARCH's LLVM_TARGET support to the value of +# MK_CLANG. +# Default the rest of the LLVM_TARGETs to the value of MK_LLVM_TARGET_ALL +# which is based on MK_CLANG. +.for __llt in ${__LLVM_TARGETS} +.if ${__llt} != ${__T:${__LLVM_TARGET_FILT}} +__DEFAULT_DEPENDENT_OPTIONS+= LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/LLVM_TARGET_ALL +.else +__DEFAULT_DEPENDENT_OPTIONS+= LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/CLANG +.endif +.endfor + .include # If the compiler is not C++11 capable, disable Clang and use GCC instead. # This means that architectures that have GCC 4.2 as default can not @@ -258,23 +280,17 @@ __TT=${MACHINE} ${__T} == "amd64" || ${__TT} == "arm" || ${__T} == "i386") # Clang is enabled, and will be installed as the default /usr/bin/cc. __DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_IS_CC LLD -__DEFAULT_YES_OPTIONS+=LLVM_TARGET_AARCH64 LLVM_TARGET_ARM LLVM_TARGET_MIPS -__DEFAULT_YES_OPTIONS+=LLVM_TARGET_POWERPC LLVM_TARGET_SPARC LLVM_TARGET_X86 __DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX GPL_DTC .elif ${COMPILER_FEATURES:Mc++11} && ${__T:Mriscv*} == "" && ${__T} != "sparc64" # If an external compiler that supports C++11 is used as ${CC} and Clang # supports the target, then Clang is enabled but GCC is installed as the # default /usr/bin/cc. __DEFAULT_YES_OPTIONS+=CLANG GCC GCC_BOOTSTRAP GNUCXX GPL_DTC LLD -__DEFAULT_YES_OPTIONS+=LLVM_TARGET_AARCH64 LLVM_TARGET_ARM LLVM_TARGET_MIPS -__DEFAULT_YES_OPTIONS+=LLVM_TARGET_POWERPC LLVM_TARGET_SPARC LLVM_TARGET_X86 __DEFAULT_NO_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC .else # Everything else disables Clang, and uses GCC instead. __DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX GPL_DTC __DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_IS_CC LLD -__DEFAULT_NO_OPTIONS+=LLVM_TARGET_AARCH64 LLVM_TARGET_ARM LLVM_TARGET_MIPS -__DEFAULT_NO_OPTIONS+=LLVM_TARGET_POWERPC LLVM_TARGET_SPARC LLVM_TARGET_X86 .endif # In-tree binutils/gcc are older versions without modern architecture support. .if ${__T} == "aarch64" || ${__T:Mriscv*} != "" Added: head/tools/build/options/WITHOUT_LLVM_TARGET_ALL ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_LLVM_TARGET_ALL Wed Jun 27 16:57:51 2018 (r335706) @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to only build the required LLVM target support. +This option is preferred to specific target support options. Added: head/tools/build/options/WITH_LLVM_TARGET_ALL ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_LLVM_TARGET_ALL Wed Jun 27 16:57:51 2018 (r335706) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to build support for all LLVM targets. From owner-svn-src-all@freebsd.org Wed Jun 27 16:57:57 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E343102CD7C; Wed, 27 Jun 2018 16:57:57 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1B8768627B; Wed, 27 Jun 2018 16:57:57 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F093525CE5; Wed, 27 Jun 2018 16:57:56 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RGvu9X072945; Wed, 27 Jun 2018 16:57:56 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RGvupg072943; Wed, 27 Jun 2018 16:57:56 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201806271657.w5RGvupg072943@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 27 Jun 2018 16:57:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335707 - in head: . tools/build/options X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: in head: . tools/build/options X-SVN-Commit-Revision: 335707 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 16:57:57 -0000 Author: bdrewery Date: Wed Jun 27 16:57:56 2018 New Revision: 335707 URL: https://svnweb.freebsd.org/changeset/base/335707 Log: Clang: Only build needed target for bootstrap compiler. This will disable the new LLVM_TARGET_ALL option which will only enable the required target. This only impacts the bootstrap compiler in WORLDTMP, not the target compiler that will be installed. MFC after: 2 weeks Reviewed by: sbruno, dim (earlier version) Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D16021 Modified: head/Makefile.inc1 head/tools/build/options/WITH_LLVM_TARGET_ALL Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Jun 27 16:57:51 2018 (r335706) +++ head/Makefile.inc1 Wed Jun 27 16:57:56 2018 (r335707) @@ -686,6 +686,9 @@ TMAKE= \ XMAKE= ${BMAKE} \ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ MK_GDB=no MK_TESTS=no +.if empty(.MAKEOVERRIDES:MMK_LLVM_TARGET_ALL) +XMAKE+= MK_LLVM_TARGET_ALL=no +.endif # kernel-tools stage KTMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ Modified: head/tools/build/options/WITH_LLVM_TARGET_ALL ============================================================================== --- head/tools/build/options/WITH_LLVM_TARGET_ALL Wed Jun 27 16:57:51 2018 (r335706) +++ head/tools/build/options/WITH_LLVM_TARGET_ALL Wed Jun 27 16:57:56 2018 (r335707) @@ -1,2 +1,4 @@ .\" $FreeBSD$ Set to build support for all LLVM targets. +This option is always applied to the bootstrap compiler for buildworld when +LLVM is used. From owner-svn-src-all@freebsd.org Wed Jun 27 16:58:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2EBA8102CDAC; Wed, 27 Jun 2018 16:58:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3CE4C86351; Wed, 27 Jun 2018 16:58:01 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7E2CB25CE6; Wed, 27 Jun 2018 16:58:00 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RGw01x073003; Wed, 27 Jun 2018 16:58:00 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RGw0RY073002; Wed, 27 Jun 2018 16:58:00 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201806271658.w5RGw0RY073002@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 27 Jun 2018 16:58:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335708 - head X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 335708 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 16:58:03 -0000 Author: bdrewery Date: Wed Jun 27 16:57:59 2018 New Revision: 335708 URL: https://svnweb.freebsd.org/changeset/base/335708 Log: tinderbox: Give details about kernel builds. This is a bit noisy now but it was silent before leading to wondering if it was doing anything. MFC after: 1 week Suggested by: rpokala Sponsored by: Dell EMC Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Wed Jun 27 16:57:56 2018 (r335707) +++ head/Makefile Wed Jun 27 16:57:59 2018 (r335708) @@ -590,10 +590,13 @@ universe_${target}_done: @echo ">> ${target} completed on `LC_ALL=C date`" .endfor .if make(universe_kernconfs) || make(universe_kernels) -universe_kernels: universe_kernconfs .PHONY .if !defined(TARGET) TARGET!= uname -m .endif +universe_kernels_prologue: .PHONY + @echo ">> ${TARGET} kernels started on `LC_ALL=C date`" +universe_kernels: universe_kernconfs .PHONY + @echo ">> ${TARGET} kernels completed on `LC_ALL=C date`" .if defined(MAKE_ALL_KERNELS) _THINNER=cat .elif defined(MAKE_LINT_KERNELS) @@ -606,7 +609,7 @@ KERNCONFS!= cd ${KERNSRCDIR}/${TARGET}/conf && \ -type f -maxdepth 0 \ ! -name DEFAULTS ! -name NOTES | \ ${_THINNER} -universe_kernconfs: .PHONY +universe_kernconfs: universe_kernels_prologue .PHONY .for kernel in ${KERNCONFS} TARGET_ARCH_${kernel}!= cd ${KERNSRCDIR}/${TARGET}/conf && \ config -m ${KERNSRCDIR}/${TARGET}/conf/${kernel} 2> /dev/null | \ @@ -616,6 +619,7 @@ TARGET_ARCH_${kernel}!= cd ${KERNSRCDIR}/${TARGET}/con .endif universe_kernconfs: universe_kernconf_${TARGET}_${kernel} universe_kernconf_${TARGET}_${kernel}: .MAKE + @echo ">> ${TARGET}.${TARGET_ARCH_${kernel}} ${kernel} kernel started on `LC_ALL=C date`" @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ ${SUB_MAKE} ${JFLAG} buildkernel \ TARGET=${TARGET} \ @@ -625,6 +629,7 @@ universe_kernconf_${TARGET}_${kernel}: .MAKE > _.${TARGET}.${kernel} 2>&1 || \ (echo "${TARGET} ${kernel} kernel failed," \ "check _.${TARGET}.${kernel} for details"| ${MAKEFAIL})) + @echo ">> ${TARGET}.${TARGET_ARCH_${kernel}} ${kernel} kernel completed on `LC_ALL=C date`" .endfor .endif # make(universe_kernels) universe: universe_epilogue From owner-svn-src-all@freebsd.org Wed Jun 27 16:58:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD065102CDC5; Wed, 27 Jun 2018 16:58:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 665CF863A3; Wed, 27 Jun 2018 16:58:04 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EDA0825CE7; Wed, 27 Jun 2018 16:58:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RGw3RO073048; Wed, 27 Jun 2018 16:58:03 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RGw3ZX073047; Wed, 27 Jun 2018 16:58:03 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201806271658.w5RGw3ZX073047@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 27 Jun 2018 16:58:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335709 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 335709 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 16:58:06 -0000 Author: bdrewery Date: Wed Jun 27 16:58:03 2018 New Revision: 335709 URL: https://svnweb.freebsd.org/changeset/base/335709 Log: CCACHE_BUILD: Avoid ccache when looking up compiler metadata. MFC after: 2 weeks Sponsored by: Dell EMC Modified: head/share/mk/bsd.compiler.mk Modified: head/share/mk/bsd.compiler.mk ============================================================================== --- head/share/mk/bsd.compiler.mk Wed Jun 27 16:57:59 2018 (r335708) +++ head/share/mk/bsd.compiler.mk Wed Jun 27 16:58:03 2018 (r335709) @@ -148,7 +148,7 @@ ${X_}COMPILER_TYPE= none ${X_}COMPILER_VERSION= 0 ${X_}COMPILER_FREEBSD_VERSION= 0 .elif !defined(${X_}COMPILER_TYPE) || !defined(${X_}COMPILER_VERSION) -_v!= ${${cc}} --version || echo 0.0.0 +_v!= ${${cc}:N${CCACHE_BIN}} --version || echo 0.0.0 .if !defined(${X_}COMPILER_TYPE) . if ${${cc}:T:M*gcc*} @@ -171,7 +171,7 @@ ${X_}COMPILER_VERSION!=echo "${_v:M[1-9].[0-9]*}" | aw .undef _v .endif .if !defined(${X_}COMPILER_FREEBSD_VERSION) -${X_}COMPILER_FREEBSD_VERSION!= { echo "__FreeBSD_cc_version" | ${${cc}} -E - 2>/dev/null || echo __FreeBSD_cc_version; } | sed -n '$$p' +${X_}COMPILER_FREEBSD_VERSION!= { echo "__FreeBSD_cc_version" | ${${cc}:N${CCACHE_BIN}} -E - 2>/dev/null || echo __FreeBSD_cc_version; } | sed -n '$$p' # If we get a literal "__FreeBSD_cc_version" back then the compiler # is a non-FreeBSD build that doesn't support it or some other error # occurred. From owner-svn-src-all@freebsd.org Wed Jun 27 16:58:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 01F1B102CDDE; Wed, 27 Jun 2018 16:58:09 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6157A8646E; Wed, 27 Jun 2018 16:58:07 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9B16525CF2; Wed, 27 Jun 2018 16:58:07 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RGw7Lf073096; Wed, 27 Jun 2018 16:58:07 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RGw7KS073095; Wed, 27 Jun 2018 16:58:07 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201806271658.w5RGw7KS073095@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 27 Jun 2018 16:58:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335710 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 335710 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 16:58:09 -0000 Author: bdrewery Date: Wed Jun 27 16:58:07 2018 New Revision: 335710 URL: https://svnweb.freebsd.org/changeset/base/335710 Log: CCACHE_BUILD: Don't try using ccache for compile-linking .c files. Without -c ccache just executes the real compiler. MFC after: 2 weeks Sponsored by: Dell EMC Modified: head/share/mk/bsd.suffixes.mk Modified: head/share/mk/bsd.suffixes.mk ============================================================================== --- head/share/mk/bsd.suffixes.mk Wed Jun 27 16:58:03 2018 (r335709) +++ head/share/mk/bsd.suffixes.mk Wed Jun 27 16:58:07 2018 (r335710) @@ -5,7 +5,7 @@ chmod a+x ${.TARGET} .c: - ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} + ${CC:N${CCACHE_BIN}} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} ${CTFCONVERT_CMD} .c.o: From owner-svn-src-all@freebsd.org Wed Jun 27 16:58:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A02D102CE28; Wed, 27 Jun 2018 16:58:19 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 69B0786539; Wed, 27 Jun 2018 16:58:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EB22825CF3; Wed, 27 Jun 2018 16:58:11 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RGwBn8073148; Wed, 27 Jun 2018 16:58:11 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RGwBBU073143; Wed, 27 Jun 2018 16:58:11 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201806271658.w5RGwBBU073143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 27 Jun 2018 16:58:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335711 - in head: . share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: in head: . share/mk X-SVN-Commit-Revision: 335711 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 16:58:19 -0000 Author: bdrewery Date: Wed Jun 27 16:58:10 2018 New Revision: 335711 URL: https://svnweb.freebsd.org/changeset/base/335711 Log: tinderbox: Only build clang/lld once if needed. Need to handle LLD_BOOTSTRAP separately (for archs like i386). This would be much better off with an off-by-default option like SHARED_TOOLCHAIN that universe force-enabled. Then a normal buildworld would store the toolchain there if enabled and otherwise in WORLDTMP with only the 1 arch selected. MFC after: 3 weeks Sponsored by: Dell EMC Modified: head/Makefile head/Makefile.inc1 head/share/mk/src.sys.obj.mk Modified: head/Makefile ============================================================================== --- head/Makefile Wed Jun 27 16:58:07 2018 (r335710) +++ head/Makefile Wed Jun 27 16:58:10 2018 (r335711) @@ -169,7 +169,7 @@ META_TGT_WHITELIST+= \ buildworld everything kernel-toolchain kernel-toolchains kernel \ kernels libraries native-xtools showconfig test-system-compiler \ test-system-linker tinderbox toolchain \ - toolchains universe world worlds xdev xdev-build + toolchains universe universe-toolchain world worlds xdev xdev-build .ORDER: buildworld installworld .ORDER: buildworld distrib-dirs @@ -480,7 +480,8 @@ worlds: .PHONY # with a reasonable chance of success, regardless of how old your # existing system is. # -.if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets) +.if make(universe) || make(universe_kernels) || make(tinderbox) || \ + make(targets) || make(universe-toolchain) TARGETS?=amd64 arm arm64 i386 mips powerpc riscv sparc64 _UNIVERSE_TARGETS= ${TARGETS} TARGET_ARCHES_arm?= arm armeb armv6 armv7 @@ -542,6 +543,36 @@ universe_prologue: .PHONY .if defined(DOING_TINDERBOX) @rm -f ${FAILFILE} .endif + +universe-toolchain: .PHONY universe_prologue + @echo "--------------------------------------------------------------" + @echo "> Toolchain bootstrap started on `LC_ALL=C date`" + @echo "--------------------------------------------------------------" + ${_+_}@cd ${.CURDIR}; \ + env PATH=${PATH} ${SUB_MAKE} ${JFLAG} kernel-toolchain \ + TARGET=${MACHINE} TARGET_ARCH=${MACHINE_ARCH} \ + OBJTOP="${HOST_OBJTOP}" \ + WITHOUT_SYSTEM_COMPILER=yes \ + WITHOUT_SYSTEM_LINKER=yes \ + TOOLS_PREFIX_UNDEF= \ + kernel-toolchain \ + MK_LLVM_TARGET_ALL=yes \ + > _.${.TARGET} 2>&1 || \ + (echo "${.TARGET} failed," \ + "check _.${.TARGET} for details" | \ + ${MAKEFAIL}; false) + @if [ ! -e "${HOST_OBJTOP}/tmp/usr/bin/cc" ]; then \ + echo "Missing host compiler at ${HOST_OBJTOP}/tmp/usr/bin/cc?" >&2; \ + false; \ + fi + @if [ ! -e "${HOST_OBJTOP}/tmp/usr/bin/ld" ]; then \ + echo "Missing host linker at ${HOST_OBJTOP}/tmp/usr/bin/cc?" >&2; \ + false; \ + fi + @echo "--------------------------------------------------------------" + @echo "> Toolchain bootstrap completed on `LC_ALL=C date`" + @echo "--------------------------------------------------------------" + .for target in ${_UNIVERSE_TARGETS} universe: universe_${target} universe_epilogue: universe_${target} @@ -550,10 +581,56 @@ universe_${target}_prologue: universe_prologue .PHONY @echo ">> ${target} started on `LC_ALL=C date`" universe_${target}_worlds: .PHONY +.if !make(targets) && !make(universe-toolchain) +.for target_arch in ${TARGET_ARCHES_${target}} +.if !defined(_need_clang_${target}_${target_arch}) +_need_clang_${target}_${target_arch} != \ + env TARGET=${target} TARGET_ARCH=${target_arch} \ + ${SUB_MAKE} -C ${.CURDIR} -f Makefile.inc1 test-system-compiler \ + -V MK_CLANG_BOOTSTRAP +.export _need_clang_${target}_${target_arch} +.endif +.if !defined(_need_lld_${target}_${target_arch}) +_need_lld_${target}_${target_arch} != \ + env TARGET=${target} TARGET_ARCH=${target_arch} \ + ${SUB_MAKE} -C ${.CURDIR} -f Makefile.inc1 test-system-linker \ + -V MK_LLD_BOOTSTRAP +.export _need_lld_${target}_${target_arch} +.endif +# Setup env for each arch to use the one clang. +.if defined(_need_clang_${target}_${target_arch}) && \ + ${_need_clang_${target}_${target_arch}} != "no" +# No check on existing XCC or CROSS_BINUTILS_PREFIX, etc, is needed since +# we use the test-system-compiler logic to determine if clang needs to be +# built. It will be no from that logic if already using an external +# toolchain or /usr/bin/cc. +# XXX: Passing HOST_OBJTOP into the PATH would allow skipping legacy, +# bootstrap-tools, and cross-tools. Need to ensure each tool actually +# supports all TARGETS though. +MAKE_PARAMS_${target}+= \ + XCC="${HOST_OBJTOP}/tmp/usr/bin/cc" \ + XCXX="${HOST_OBJTOP}/tmp/usr/bin/c++" \ + XCPP="${HOST_OBJTOP}/tmp/usr/bin/cpp" +.endif +.if defined(_need_lld_${target}_${target_arch}) && \ + ${_need_lld_${target}_${target_arch}} != "no" +MAKE_PARAMS_${target}+= \ + XLD="${HOST_OBJTOP}/tmp/usr/bin/ld" +.endif +.endfor +.endif # !make(targets) + .if !defined(MAKE_JUST_KERNELS) universe_${target}_done: universe_${target}_worlds .PHONY .for target_arch in ${TARGET_ARCHES_${target}} universe_${target}_worlds: universe_${target}_${target_arch} .PHONY +.if (defined(_need_clang_${target}_${target_arch}) && \ + ${_need_clang_${target}_${target_arch}} != "no") || \ + (defined(_need_lld_${target}_${target_arch}) && \ + ${_need_lld_${target}_${target_arch}} != "no") +universe_${target}_${target_arch}: universe-toolchain +universe_${target}_prologue: universe-toolchain +.endif universe_${target}_${target_arch}: universe_${target}_prologue .MAKE .PHONY @echo ">> ${target}.${target_arch} ${UNIVERSE_TARGET} started on `LC_ALL=C date`" @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Jun 27 16:58:07 2018 (r335710) +++ head/Makefile.inc1 Wed Jun 27 16:58:10 2018 (r335711) @@ -645,7 +645,7 @@ CROSSENV+= ${TARGET_CFLAGS} # bootstrap-tools stage BMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ - TOOLS_PREFIX=${WORLDTMP} \ + TOOLS_PREFIX=${TOOLS_PREFIX_UNDEF:U${WORLDTMP}} \ PATH=${BPATH}:${PATH} \ WORLDTMP=${WORLDTMP} \ MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" @@ -694,7 +694,8 @@ XMAKE+= MK_LLVM_TARGET_ALL=no KTMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ PATH=${BPATH}:${PATH} \ WORLDTMP=${WORLDTMP} -KTMAKE= TOOLS_PREFIX=${WORLDTMP} \ +KTMAKE= \ + TOOLS_PREFIX=${TOOLS_PREFIX_UNDEF:U${WORLDTMP}} \ ${KTMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ DESTDIR= \ OBJTOP='${WORLDTMP}/obj-kernel-tools' \ Modified: head/share/mk/src.sys.obj.mk ============================================================================== --- head/share/mk/src.sys.obj.mk Wed Jun 27 16:58:07 2018 (r335710) +++ head/share/mk/src.sys.obj.mk Wed Jun 27 16:58:10 2018 (r335711) @@ -220,4 +220,11 @@ OBJROOT= ${SRCTOP}/ .endif .endif # defined(NO_OBJ) +.if !defined(HOST_TARGET) +# we need HOST_TARGET etc below. +.include +.export HOST_TARGET +.endif +HOST_OBJTOP?= ${OBJROOT}${HOST_TARGET} + .endif # ${MK_DIRDEPS_BUILD} == "no" From owner-svn-src-all@freebsd.org Wed Jun 27 17:04:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 170B1102D4E3; Wed, 27 Jun 2018 17:04:02 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B09F386FBD; Wed, 27 Jun 2018 17:04:01 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 791751DC39; Wed, 27 Jun 2018 17:04:01 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id A38519697; Wed, 27 Jun 2018 17:04:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id 3AhMGwYVxE7H; Wed, 27 Jun 2018 17:03:58 +0000 (UTC) Subject: Re: svn commit: r335711 - in head: . share/mk DKIM-Filter: OpenDKIM Filter v2.10.3 mail.xzibition.com D5BDD9691 From: Bryan Drewery To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201806271658.w5RGwBBU073143@repo.freebsd.org> Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Autocrypt: addr=bdrewery@FreeBSD.org; prefer-encrypt=mutual; keydata= xsBNBFJphmsBCADiFgmS4bIzwZijrS31SjEMzg+n5zNellgM+HkShwehpqCiyhXdWrvH6dTZ a6u50pbUIX7doTR7W7PQHCjCTqtpwvcj0eulZva+iHFp+XrbgSFHn+VVXgkYP2MFySyZRFab D2qqzJBEJofhpv4HvY6uQI5K99pMqKr1Z/lHqsijYYu4RH2OfwB5PinId7xeldzWEonVoCr+ rfxzO/UrgA6v/3layGZcKNHFjmc3NqoN1DXtdaEHqtjIozzbndVkH6lkFvIpIrI6i5ox8pwp VxsxLCr/4Musd5CWgHiet5kSw2SzNeA8FbxdLYCpXNVu+uBACEbCUP+CSNy3NVfEUxsBABEB AAHNJEJyeWFuIERyZXdlcnkgPGJkcmV3ZXJ5QEZyZWVCU0Qub3JnPsLAgAQTAQoAKgIbAwUL CQgHAwUVCgkICwUWAwIBAAIeAQIXgAIZAQUCWujOIgUJCmB7NwAKCRA113G7bkaXz/xpB/9b /UWIPbieY1IeIuHF2pyYPE7Hytkh3HVsxMA0F5Ma2AYQsXZZeKNKWrF7RPyDyDwUklLHJkhm k3EfClBbHxf08kMIm1vWCJRtgxic9knY/bzYGiWMpHjg3cSd1XfrYH1autYqTZAjDwIkgOjU dR//Tbn4V36sY7y2jz+kdMVWvK53U32aZqiwBbCn4DPe1wSZcUs17mV/0uZdIoGdj74B1orN A/0py5vHYo6HcbBNoaR8pKRLf5VZNRsxqGIMhTucx4SJWcHpuRBWYyvJSFzwvxdK4ZD4Yqoc kFGPVtOXktVMai9exrLvP3G77fKMu8DI6j4QRU4wCesnHuIfRPFuzsBNBFJphmsBCACiVFPf kNfaFtUSuY0395ueo/rMyHPGPQ2iwvERFCpeFGSQSgagpenNHLpFQKTg/dl6FOoST5tqyxMq fyHGHDzzU51bvA/IfaGoNi/BIhTe/toZNMRvpcI3PLjiGcnJnuwCCbAVOAGdb+t5cZtpNdOI cKYmrYG3u9RiBpe6dTF+qLrD/8Bs1wjhduQ8fcNNgnkXu8xDH4ZxY0lIc3QgvYWp9vimlQe6 iKjUd2/DX28ETZcD5h6pYV331KMPTrEI0p0yvFijUZce8c1XHFyL1j9sBAha5qpszJl6Uq5i LolhKRcGfcdmtD72vHQjUYglUyudSJUVyo2gMYjdbiFKzJulABEBAAHCwGUEGAEKAA8CGwwF AlrozigFCQpgez0ACgkQNddxu25Gl8+m5Af/R3VEdxNMAcDIes9ADhQyofj20SPV3eCJ3HYR OebTSuNdOudGt4AAyA8Ks94u9hiIp5IGsc6RDsT9W7O2vgXhd6eV3eiY5Oif5xLIYrIDVu1Y 1GyRxRrPEn/QOqDN6uFZCPwK1aOapGcYCrO9lB0gMuTVfgHanU61rgC9tMX0OoAOyRd+V3/M 8lDNhjJdF/IpO3SdYzKfkwduy4qamw4Gphcx/RfYQvYLq/eDkP8d50PphWdboqWBwNRHayro W/07OGzfxM5fJ5mBsXPQcO2QcRjkyHf6xCM6Hi1qQL4OnXMNE/ZTX0lnOj1/pH93TlzSHZMP TaiiA/MBD3vGsXBmBg== Organization: FreeBSD Message-ID: <3f653aa3-9d38-ce88-66fb-fe321b0abd34@FreeBSD.org> Date: Wed, 27 Jun 2018 10:03:59 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <201806271658.w5RGwBBU073143@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RsHhLTiGrpxie7y7fUKbjzLd8At0Bhk3s" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 17:04:02 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --RsHhLTiGrpxie7y7fUKbjzLd8At0Bhk3s Content-Type: multipart/mixed; boundary="rV772ndTI0eUJZypF1xQ6o6pOOhgaWnDY"; protected-headers="v1" From: Bryan Drewery To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <3f653aa3-9d38-ce88-66fb-fe321b0abd34@FreeBSD.org> Subject: Re: svn commit: r335711 - in head: . share/mk References: <201806271658.w5RGwBBU073143@repo.freebsd.org> In-Reply-To: <201806271658.w5RGwBBU073143@repo.freebsd.org> --rV772ndTI0eUJZypF1xQ6o6pOOhgaWnDY Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 6/27/2018 9:58 AM, Bryan Drewery wrote: > Author: bdrewery > Date: Wed Jun 27 16:58:10 2018 > New Revision: 335711 > URL: https://svnweb.freebsd.org/changeset/base/335711 >=20 > Log: > tinderbox: Only build clang/lld once if needed. > =20 > Need to handle LLD_BOOTSTRAP separately (for archs like i386). > This would be much better off with an off-by-default option like > SHARED_TOOLCHAIN that universe force-enabled. Then a normal buildwor= ld > would store the toolchain there if enabled and otherwise in WORLDTMP > with only the 1 arch selected. I plan to work towards this footnote. I wanted to get something workable in before the major rework of buildworld's WORLDTMP to support a SHARED_WORLDTMP kind of thing. That was much more work that was slowing down a working solution here. --=20 Regards, Bryan Drewery --rV772ndTI0eUJZypF1xQ6o6pOOhgaWnDY-- --RsHhLTiGrpxie7y7fUKbjzLd8At0Bhk3s 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 iQEcBAEBAgAGBQJbM8N/AAoJEDXXcbtuRpfPh3UH+gNvNKb+sKB9h0bJE6PlDrqx HvOekFm3BRqGTrY7su3TAbF8Cus5ia2aXN0hnC9cE+dVvkejOpLfr32z8jf1qZ3O sWuk78rDFSHgwSlj1xBkoFuh1Fw8ixbIhnhV52NQT0bMfKkEUzbqdvQHaWaAKBk3 mBoJ9hbPxwXWo/mPGCs0/fl/+gK5jvHEPbTCUOxRtTwAHkspg5cXZk9M0+uiG+9a 2COBvEJRIBcG+KESpdCaUhv0p+8iMP1HZUShdwWNwX/yaBS8liMk+L2Iouz/ap8H p3/Zv3vyKTevT9+6w9Qi9tYGU+ealK+97+dlkaULx/x/d+8tglPsrf9LAorx3ao= =hbx4 -----END PGP SIGNATURE----- --RsHhLTiGrpxie7y7fUKbjzLd8At0Bhk3s-- From owner-svn-src-all@freebsd.org Wed Jun 27 17:13:40 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 121D4102E253; Wed, 27 Jun 2018 17:13:40 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B57DF887DB; Wed, 27 Jun 2018 17:13:39 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 964ED2603E; Wed, 27 Jun 2018 17:13:39 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RHDdTD082865; Wed, 27 Jun 2018 17:13:39 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RHDbMR082853; Wed, 27 Jun 2018 17:13:37 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201806271713.w5RHDbMR082853@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 27 Jun 2018 17:13:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335712 - head/tools/build/options X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/tools/build/options X-SVN-Commit-Revision: 335712 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 17:13:40 -0000 Author: bdrewery Date: Wed Jun 27 17:13:36 2018 New Revision: 335712 URL: https://svnweb.freebsd.org/changeset/base/335712 Log: Push users towards LLVM_TARGET_ALL. MFC after: 1 week Modified: head/tools/build/options/WITHOUT_LLVM_TARGET_AARCH64 head/tools/build/options/WITHOUT_LLVM_TARGET_ARM head/tools/build/options/WITHOUT_LLVM_TARGET_MIPS head/tools/build/options/WITHOUT_LLVM_TARGET_POWERPC head/tools/build/options/WITHOUT_LLVM_TARGET_SPARC head/tools/build/options/WITHOUT_LLVM_TARGET_X86 head/tools/build/options/WITH_LLVM_TARGET_AARCH64 head/tools/build/options/WITH_LLVM_TARGET_ARM head/tools/build/options/WITH_LLVM_TARGET_MIPS head/tools/build/options/WITH_LLVM_TARGET_POWERPC head/tools/build/options/WITH_LLVM_TARGET_SPARC head/tools/build/options/WITH_LLVM_TARGET_X86 Modified: head/tools/build/options/WITHOUT_LLVM_TARGET_AARCH64 ============================================================================== --- head/tools/build/options/WITHOUT_LLVM_TARGET_AARCH64 Wed Jun 27 16:58:10 2018 (r335711) +++ head/tools/build/options/WITHOUT_LLVM_TARGET_AARCH64 Wed Jun 27 17:13:36 2018 (r335712) @@ -1,2 +1,5 @@ .\" $FreeBSD$ Set to not build LLVM target support for AArch64. +The +.Va LLVM_TARGET_ALL +option should be used rather than this in most cases. Modified: head/tools/build/options/WITHOUT_LLVM_TARGET_ARM ============================================================================== --- head/tools/build/options/WITHOUT_LLVM_TARGET_ARM Wed Jun 27 16:58:10 2018 (r335711) +++ head/tools/build/options/WITHOUT_LLVM_TARGET_ARM Wed Jun 27 17:13:36 2018 (r335712) @@ -1,2 +1,5 @@ .\" $FreeBSD$ Set to not build LLVM target support for ARM. +The +.Va LLVM_TARGET_ALL +option should be used rather than this in most cases. Modified: head/tools/build/options/WITHOUT_LLVM_TARGET_MIPS ============================================================================== --- head/tools/build/options/WITHOUT_LLVM_TARGET_MIPS Wed Jun 27 16:58:10 2018 (r335711) +++ head/tools/build/options/WITHOUT_LLVM_TARGET_MIPS Wed Jun 27 17:13:36 2018 (r335712) @@ -1,2 +1,5 @@ .\" $FreeBSD$ Set to not build LLVM target support for MIPS. +The +.Va LLVM_TARGET_ALL +option should be used rather than this in most cases. Modified: head/tools/build/options/WITHOUT_LLVM_TARGET_POWERPC ============================================================================== --- head/tools/build/options/WITHOUT_LLVM_TARGET_POWERPC Wed Jun 27 16:58:10 2018 (r335711) +++ head/tools/build/options/WITHOUT_LLVM_TARGET_POWERPC Wed Jun 27 17:13:36 2018 (r335712) @@ -1,2 +1,5 @@ .\" $FreeBSD$ Set to not build LLVM target support for PowerPC. +The +.Va LLVM_TARGET_ALL +option should be used rather than this in most cases. Modified: head/tools/build/options/WITHOUT_LLVM_TARGET_SPARC ============================================================================== --- head/tools/build/options/WITHOUT_LLVM_TARGET_SPARC Wed Jun 27 16:58:10 2018 (r335711) +++ head/tools/build/options/WITHOUT_LLVM_TARGET_SPARC Wed Jun 27 17:13:36 2018 (r335712) @@ -1,2 +1,5 @@ .\" $FreeBSD$ Set to not build LLVM target support for SPARC. +The +.Va LLVM_TARGET_ALL +option should be used rather than this in most cases. Modified: head/tools/build/options/WITHOUT_LLVM_TARGET_X86 ============================================================================== --- head/tools/build/options/WITHOUT_LLVM_TARGET_X86 Wed Jun 27 16:58:10 2018 (r335711) +++ head/tools/build/options/WITHOUT_LLVM_TARGET_X86 Wed Jun 27 17:13:36 2018 (r335712) @@ -1,2 +1,5 @@ .\" $FreeBSD$ Set to not build LLVM target support for X86. +The +.Va LLVM_TARGET_ALL +option should be used rather than this in most cases. Modified: head/tools/build/options/WITH_LLVM_TARGET_AARCH64 ============================================================================== --- head/tools/build/options/WITH_LLVM_TARGET_AARCH64 Wed Jun 27 16:58:10 2018 (r335711) +++ head/tools/build/options/WITH_LLVM_TARGET_AARCH64 Wed Jun 27 17:13:36 2018 (r335712) @@ -1,2 +1,5 @@ .\" $FreeBSD$ Set to build LLVM target support for AArch64. +The +.Va LLVM_TARGET_ALL +option should be used rather than this in most cases. Modified: head/tools/build/options/WITH_LLVM_TARGET_ARM ============================================================================== --- head/tools/build/options/WITH_LLVM_TARGET_ARM Wed Jun 27 16:58:10 2018 (r335711) +++ head/tools/build/options/WITH_LLVM_TARGET_ARM Wed Jun 27 17:13:36 2018 (r335712) @@ -1,2 +1,5 @@ .\" $FreeBSD$ Set to build LLVM target support for ARM. +The +.Va LLVM_TARGET_ALL +option should be used rather than this in most cases. Modified: head/tools/build/options/WITH_LLVM_TARGET_MIPS ============================================================================== --- head/tools/build/options/WITH_LLVM_TARGET_MIPS Wed Jun 27 16:58:10 2018 (r335711) +++ head/tools/build/options/WITH_LLVM_TARGET_MIPS Wed Jun 27 17:13:36 2018 (r335712) @@ -1,2 +1,5 @@ .\" $FreeBSD$ Set to build LLVM target support for MIPS. +The +.Va LLVM_TARGET_ALL +option should be used rather than this in most cases. Modified: head/tools/build/options/WITH_LLVM_TARGET_POWERPC ============================================================================== --- head/tools/build/options/WITH_LLVM_TARGET_POWERPC Wed Jun 27 16:58:10 2018 (r335711) +++ head/tools/build/options/WITH_LLVM_TARGET_POWERPC Wed Jun 27 17:13:36 2018 (r335712) @@ -1,2 +1,5 @@ .\" $FreeBSD$ Set to build LLVM target support for PowerPC. +The +.Va LLVM_TARGET_ALL +option should be used rather than this in most cases. Modified: head/tools/build/options/WITH_LLVM_TARGET_SPARC ============================================================================== --- head/tools/build/options/WITH_LLVM_TARGET_SPARC Wed Jun 27 16:58:10 2018 (r335711) +++ head/tools/build/options/WITH_LLVM_TARGET_SPARC Wed Jun 27 17:13:36 2018 (r335712) @@ -1,2 +1,5 @@ .\" $FreeBSD$ Set to build LLVM target support for SPARC. +The +.Va LLVM_TARGET_ALL +option should be used rather than this in most cases. Modified: head/tools/build/options/WITH_LLVM_TARGET_X86 ============================================================================== --- head/tools/build/options/WITH_LLVM_TARGET_X86 Wed Jun 27 16:58:10 2018 (r335711) +++ head/tools/build/options/WITH_LLVM_TARGET_X86 Wed Jun 27 17:13:36 2018 (r335712) @@ -1,2 +1,5 @@ .\" $FreeBSD$ Set to build LLVM target support for X86. +The +.Va LLVM_TARGET_ALL +option should be used rather than this in most cases. From owner-svn-src-all@freebsd.org Wed Jun 27 17:18:13 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2994B102E687; Wed, 27 Jun 2018 17:18:13 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CA37A88CF8; Wed, 27 Jun 2018 17:18:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ABFB52605D; Wed, 27 Jun 2018 17:18:12 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RHICLc083109; Wed, 27 Jun 2018 17:18:12 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RHICPu083108; Wed, 27 Jun 2018 17:18:12 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201806271718.w5RHICPu083108@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 27 Jun 2018 17:18:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335713 - head/share/man/man5 X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/share/man/man5 X-SVN-Commit-Revision: 335713 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 17:18:13 -0000 Author: bdrewery Date: Wed Jun 27 17:18:12 2018 New Revision: 335713 URL: https://svnweb.freebsd.org/changeset/base/335713 Log: Regenerate Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Wed Jun 27 17:13:36 2018 (r335712) +++ head/share/man/man5/src.conf.5 Wed Jun 27 17:18:12 2018 (r335713) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd June 22, 2018 +.Dd June 27, 2018 .Dt SRC.CONF 5 .Os .Sh NAME @@ -183,11 +183,13 @@ Set this if you do not want to build .Xr blacklistd 8 and .Xr blacklistctl 8 . -When set, it enforces these options: +When set, these options are also in effect: .Pp -.Bl -item -compact -.It -.Va WITHOUT_BLACKLIST_SUPPORT +.Bl -inset -compact +.It Va WITHOUT_BLACKLIST_SUPPORT +(unless +.Va WITH_BLACKLIST_SUPPORT +is set explicitly) .El .It Va WITHOUT_BLACKLIST_SUPPORT Set to build some programs without @@ -228,11 +230,13 @@ Set to not build contributed bzip2 software as a part .Bf -symbolic The option has no effect yet. .Ef -When set, it enforces these options: +When set, these options are also in effect: .Pp -.Bl -item -compact -.It -.Va WITHOUT_BZIP2_SUPPORT +.Bl -inset -compact +.It Va WITHOUT_BZIP2_SUPPORT +(unless +.Va WITH_BZIP2_SUPPORT +is set explicitly) .El .It Va WITHOUT_BZIP2_SUPPORT Set to build some programs without optional bzip2 support. @@ -317,6 +321,39 @@ When set, it enforces these options: .It .Va WITHOUT_LLVM_COV .El +.Pp +When set, these options are also in effect: +.Pp +.Bl -inset -compact +.It Va WITHOUT_LLVM_TARGET_AARCH64 +(unless +.Va WITH_LLVM_TARGET_AARCH64 +is set explicitly) +.It Va WITHOUT_LLVM_TARGET_ALL +(unless +.Va WITH_LLVM_TARGET_ALL +is set explicitly) +.It Va WITHOUT_LLVM_TARGET_ARM +(unless +.Va WITH_LLVM_TARGET_ARM +is set explicitly) +.It Va WITHOUT_LLVM_TARGET_MIPS +(unless +.Va WITH_LLVM_TARGET_MIPS +is set explicitly) +.It Va WITHOUT_LLVM_TARGET_POWERPC +(unless +.Va WITH_LLVM_TARGET_POWERPC +is set explicitly) +.It Va WITHOUT_LLVM_TARGET_SPARC +(unless +.Va WITH_LLVM_TARGET_SPARC +is set explicitly) +.It Va WITHOUT_LLVM_TARGET_X86 +(unless +.Va WITH_LLVM_TARGET_X86 +is set explicitly) +.El .It Va WITH_CLANG Set to build the Clang C/C++ compiler during the normal phase of the build. .Pp @@ -405,8 +442,6 @@ When set, it enforces these options: .It .Va WITHOUT_KERBEROS .It -.Va WITHOUT_KERBEROS_SUPPORT -.It .Va WITHOUT_OPENSSH .It .Va WITHOUT_OPENSSL @@ -470,8 +505,6 @@ When set, it enforces these options: .Va WITHOUT_LLVM_COV .It .Va WITHOUT_TESTS -.It -.Va WITHOUT_TESTS_SUPPORT .El .It Va WITH_CXX Set to build @@ -860,13 +893,6 @@ and .Xr truss 1 . .It Va WITHOUT_KERBEROS Set this to not build Kerberos 5 (KTH Heimdal). -When set, it enforces these options: -.Pp -.Bl -item -compact -.It -.Va WITHOUT_KERBEROS_SUPPORT -.El -.Pp When set, these options are also in effect: .Pp .Bl -inset -compact @@ -874,6 +900,10 @@ When set, these options are also in effect: (unless .Va WITH_GSSAPI is set explicitly) +.It Va WITHOUT_KERBEROS_SUPPORT +(unless +.Va WITH_KERBEROS_SUPPORT +is set explicitly) .El .It Va WITHOUT_KERBEROS_SUPPORT Set to build some programs without Kerberos support, like @@ -897,11 +927,13 @@ library as a part of the base system. .Bf -symbolic The option has no effect yet. .Ef -When set, it enforces these options: +When set, these options are also in effect: .Pp -.Bl -item -compact -.It -.Va WITHOUT_KVM_SUPPORT +.Bl -inset -compact +.It Va WITHOUT_KVM_SUPPORT +(unless +.Va WITH_KVM_SUPPORT +is set explicitly) .El .It Va WITHOUT_KVM_SUPPORT Set to build some programs without optional @@ -1021,61 +1053,134 @@ This is a default setting on amd64/amd64, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, riscv/riscv64 and riscv/riscv64sf. .It Va WITHOUT_LLVM_TARGET_AARCH64 Set to not build LLVM target support for AArch64. +The +.Va LLVM_TARGET_ALL +option should be used rather than this in most cases. .Pp This is a default setting on riscv/riscv64, riscv/riscv64sf and sparc64/sparc64. .It Va WITH_LLVM_TARGET_AARCH64 Set to build LLVM target support for AArch64. +The +.Va LLVM_TARGET_ALL +option should be used rather than this in most cases. .Pp This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. +.It Va WITHOUT_LLVM_TARGET_ALL +Set to only build the required LLVM target support. +This option is preferred to specific target support options. +.Pp +This is a default setting on +riscv/riscv64, riscv/riscv64sf and sparc64/sparc64. +When set, these options are also in effect: +.Pp +.Bl -inset -compact +.It Va WITHOUT_LLVM_TARGET_AARCH64 +(unless +.Va WITH_LLVM_TARGET_AARCH64 +is set explicitly) .It Va WITHOUT_LLVM_TARGET_ARM +(unless +.Va WITH_LLVM_TARGET_ARM +is set explicitly) +.It Va WITHOUT_LLVM_TARGET_MIPS +(unless +.Va WITH_LLVM_TARGET_MIPS +is set explicitly) +.It Va WITHOUT_LLVM_TARGET_POWERPC +(unless +.Va WITH_LLVM_TARGET_POWERPC +is set explicitly) +.It Va WITHOUT_LLVM_TARGET_SPARC +(unless +.Va WITH_LLVM_TARGET_SPARC +is set explicitly) +.El +.It Va WITH_LLVM_TARGET_ALL +Set to build support for all LLVM targets. +This option is always applied to the bootstrap compiler for buildworld when +LLVM is used. +.Pp +This is a default setting on +amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. +.It Va WITHOUT_LLVM_TARGET_ARM Set to not build LLVM target support for ARM. +The +.Va LLVM_TARGET_ALL +option should be used rather than this in most cases. .Pp This is a default setting on riscv/riscv64, riscv/riscv64sf and sparc64/sparc64. .It Va WITH_LLVM_TARGET_ARM Set to build LLVM target support for ARM. +The +.Va LLVM_TARGET_ALL +option should be used rather than this in most cases. .Pp This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. .It Va WITHOUT_LLVM_TARGET_MIPS Set to not build LLVM target support for MIPS. +The +.Va LLVM_TARGET_ALL +option should be used rather than this in most cases. .Pp This is a default setting on riscv/riscv64, riscv/riscv64sf and sparc64/sparc64. .It Va WITH_LLVM_TARGET_MIPS Set to build LLVM target support for MIPS. +The +.Va LLVM_TARGET_ALL +option should be used rather than this in most cases. .Pp This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. .It Va WITHOUT_LLVM_TARGET_POWERPC Set to not build LLVM target support for PowerPC. +The +.Va LLVM_TARGET_ALL +option should be used rather than this in most cases. .Pp This is a default setting on riscv/riscv64, riscv/riscv64sf and sparc64/sparc64. .It Va WITH_LLVM_TARGET_POWERPC Set to build LLVM target support for PowerPC. +The +.Va LLVM_TARGET_ALL +option should be used rather than this in most cases. .Pp This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. .It Va WITHOUT_LLVM_TARGET_SPARC Set to not build LLVM target support for SPARC. +The +.Va LLVM_TARGET_ALL +option should be used rather than this in most cases. .Pp This is a default setting on riscv/riscv64, riscv/riscv64sf and sparc64/sparc64. .It Va WITH_LLVM_TARGET_SPARC Set to build LLVM target support for SPARC. +The +.Va LLVM_TARGET_ALL +option should be used rather than this in most cases. .Pp This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. .It Va WITHOUT_LLVM_TARGET_X86 Set to not build LLVM target support for X86. +The +.Va LLVM_TARGET_ALL +option should be used rather than this in most cases. .Pp This is a default setting on riscv/riscv64, riscv/riscv64sf and sparc64/sparc64. .It Va WITH_LLVM_TARGET_X86 Set to build LLVM target support for X86. +The +.Va LLVM_TARGET_ALL +option should be used rather than this in most cases. .Pp This is a default setting on amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpcspe. @@ -1264,10 +1369,17 @@ When set, it enforces these options: .Va WITHOUT_ATM .It .Va WITHOUT_BLUETOOTH -.It -.Va WITHOUT_NETGRAPH_SUPPORT .El +.Pp +When set, these options are also in effect: +.Pp +.Bl -inset -compact .It Va WITHOUT_NETGRAPH_SUPPORT +(unless +.Va WITH_NETGRAPH_SUPPORT +is set explicitly) +.El +.It Va WITHOUT_NETGRAPH_SUPPORT Set to build libraries, programs, and kernel modules without netgraph support. .It Va WITHOUT_NIS Set to not build @@ -1316,8 +1428,6 @@ When set, it enforces these options: .It .Va WITHOUT_KERBEROS .It -.Va WITHOUT_KERBEROS_SUPPORT -.It .Va WITHOUT_OPENSSH .El .Pp @@ -1334,11 +1444,13 @@ Set to not build PAM library and modules. .Bf -symbolic This option is deprecated and does nothing. .Ef -When set, it enforces these options: +When set, these options are also in effect: .Pp -.Bl -item -compact -.It -.Va WITHOUT_PAM_SUPPORT +.Bl -inset -compact +.It Va WITHOUT_PAM_SUPPORT +(unless +.Va WITH_PAM_SUPPORT +is set explicitly) .El .It Va WITHOUT_PAM_SUPPORT Set to build some programs without PAM support, particularly @@ -1592,10 +1704,17 @@ When set, it enforces these options: .Bl -item -compact .It .Va WITHOUT_DTRACE_TESTS -.It -.Va WITHOUT_TESTS_SUPPORT .El +.Pp +When set, these options are also in effect: +.Pp +.Bl -inset -compact .It Va WITHOUT_TESTS_SUPPORT +(unless +.Va WITH_TESTS_SUPPORT +is set explicitly) +.El +.It Va WITHOUT_TESTS_SUPPORT Set to disables the build of all test-related dependencies, including ATF. .Pp This is a default setting on @@ -1692,11 +1811,13 @@ Set to not build programs used for 802.11 wireless net .Xr wpa_supplicant 8 and .Xr hostapd 8 . -When set, it enforces these options: +When set, these options are also in effect: .Pp -.Bl -item -compact -.It -.Va WITHOUT_WIRELESS_SUPPORT +.Bl -inset -compact +.It Va WITHOUT_WIRELESS_SUPPORT +(unless +.Va WITH_WIRELESS_SUPPORT +is set explicitly) .El .It Va WITHOUT_WIRELESS_SUPPORT Set to build libraries, programs, and kernel modules without From owner-svn-src-all@freebsd.org Wed Jun 27 17:29:28 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD0B7102ED86; Wed, 27 Jun 2018 17:29:28 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8456D894B5; Wed, 27 Jun 2018 17:29:28 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 62C69261FB; Wed, 27 Jun 2018 17:29:28 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RHTSov088094; Wed, 27 Jun 2018 17:29:28 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RHTSTK088093; Wed, 27 Jun 2018 17:29:28 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201806271729.w5RHTSTK088093@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 27 Jun 2018 17:29:28 +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: r335714 - stable/11/release/doc/en_US.ISO8859-1/errata X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/release/doc/en_US.ISO8859-1/errata X-SVN-Commit-Revision: 335714 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 17:29:29 -0000 Author: gjb Date: Wed Jun 27 17:29:27 2018 New Revision: 335714 URL: https://svnweb.freebsd.org/changeset/base/335714 Log: Add an entry about an incorrectly-listed driver name in the 11.2 announcement. Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Wed Jun 27 17:18:12 2018 (r335713) +++ stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Wed Jun 27 17:29:27 2018 (r335714) @@ -211,6 +211,13 @@ boot that no longer exists. The correct URL is . + + + [2018-06-27] The announcement email for &os; 11.2 + incorrectly states the ocs_fw(4) driver + had been added; this should have stated + &man.ocs.fc.4;. + From owner-svn-src-all@freebsd.org Wed Jun 27 17:39:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 275F5102F4D1; Wed, 27 Jun 2018 17:39:48 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C860689CD6; Wed, 27 Jun 2018 17:39:47 +0000 (UTC) (envelope-from rpokala@freebsd.org) Received: from [192.168.1.4] (c-71-198-162-232.hsd1.ca.comcast.net [71.198.162.232]) (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 0A47A1F23B; Wed, 27 Jun 2018 17:39:46 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/10.e.1.180613 Date: Wed, 27 Jun 2018 10:39:43 -0700 Subject: Re: svn commit: r335708 - head From: Ravi Pokala To: Bryan Drewery , , , Message-ID: Thread-Topic: svn commit: r335708 - head References: <201806271658.w5RGw0RY073002@repo.freebsd.org> In-Reply-To: <201806271658.w5RGw0RY073002@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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 17:39:48 -0000 -----Original Message----- From: on behalf of Bryan Drewery Date: 2018-06-27, Wednesday at 09:58 To: , , Subject: svn commit: r335708 - head > Author: bdrewery > Date: Wed Jun 27 16:57:59 2018 > New Revision: 335708 > URL: https://svnweb.freebsd.org/changeset/base/335708 > > Log: > tinderbox: Give details about kernel builds. > > This is a bit noisy now but it was silent before leading to > wondering if it was doing anything. > > MFC after: 1 week > Suggested by: rpokala > Sponsored by: Dell EMC > > Modified: > head/Makefile \o/ Yay! Thank you sir! -Ravi (rpokala@) From owner-svn-src-all@freebsd.org Wed Jun 27 17:40:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BDE22102F55D; Wed, 27 Jun 2018 17:40:30 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1091289E41; Wed, 27 Jun 2018 17:40:30 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E75CB263A1; Wed, 27 Jun 2018 17:40:29 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RHeTFL093903; Wed, 27 Jun 2018 17:40:29 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RHeT9I093902; Wed, 27 Jun 2018 17:40:29 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201806271740.w5RHeT9I093902@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 27 Jun 2018 17:40:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335715 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 335715 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 17:40:30 -0000 Author: gjb Date: Wed Jun 27 17:40:29 2018 New Revision: 335715 URL: https://svnweb.freebsd.org/changeset/base/335715 Log: Add FreeBSD 11.2. Sponsored by: The FreeBSD Foundation Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Wed Jun 27 17:29:27 2018 (r335714) +++ head/share/misc/bsd-family-tree Wed Jun 27 17:40:29 2018 (r335715) @@ -372,6 +372,8 @@ FreeBSD 5.2 | | | | | | | v | | | | | | | | DragonFly 5.2.1 | | | | v | | + | FreeBSD | | | | + | 11.2 | | | | | v | | | | | | | | | FreeBSD 12 -current | NetBSD -current OpenBSD -current DragonFly -current @@ -746,6 +748,7 @@ NetBSD 7.1.2 2018-03-15 [NBD] OpenBSD 6.3 2018-04-02 [OBD] DragonFly 5.2.0 2018-04-10 [DFB] DragonFly 5.2.1 2018-05-20 [DFB] +FreeBSD 11.2 2018-06-27 [FBD] Bibliography ------------------------ From owner-svn-src-all@freebsd.org Wed Jun 27 18:11:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D5BC1030B9E; Wed, 27 Jun 2018 18:11:48 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EC7B68B156; Wed, 27 Jun 2018 18:11:47 +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 CDBEB268E3; Wed, 27 Jun 2018 18:11:47 +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 w5RIBlWg012239; Wed, 27 Jun 2018 18:11:47 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RIBlTu012238; Wed, 27 Jun 2018 18:11:47 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201806271811.w5RIBlTu012238@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 27 Jun 2018 18:11:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335716 - head/gnu/usr.bin/cc/cc_tools X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/gnu/usr.bin/cc/cc_tools X-SVN-Commit-Revision: 335716 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 18:11:48 -0000 Author: jhb Date: Wed Jun 27 18:11:47 2018 New Revision: 335716 URL: https://svnweb.freebsd.org/changeset/base/335716 Log: Don't hardcode the TOOLS_PREFIX for the startfiles directories. GCC 4.2 prefixes these directories with --sysroot meaning that during buildworld they have a double sysroot. Reviewed by: bdrewery Sponsored by: DARPA / AFRL Differential Revision: https://reviews.freebsd.org/D14780 Modified: head/gnu/usr.bin/cc/cc_tools/freebsd-native.h Modified: head/gnu/usr.bin/cc/cc_tools/freebsd-native.h ============================================================================== --- head/gnu/usr.bin/cc/cc_tools/freebsd-native.h Wed Jun 27 17:40:29 2018 (r335715) +++ head/gnu/usr.bin/cc/cc_tools/freebsd-native.h Wed Jun 27 18:11:47 2018 (r335716) @@ -43,8 +43,8 @@ /usr/lib directory. */ #undef MD_STARTFILE_PREFIX /* We don't need one for now. */ -#define STANDARD_STARTFILE_PREFIX PREFIX"/lib/" -#define STARTFILE_PREFIX_SPEC PREFIX"/lib/" +#define STANDARD_STARTFILE_PREFIX "/usr/lib/" +#define STARTFILE_PREFIX_SPEC "/usr/lib/" #if 0 #define LIBGCC_SPEC "%{shared: -lgcc_pic} \ From owner-svn-src-all@freebsd.org Wed Jun 27 18:14:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2BD01030DB2; Wed, 27 Jun 2018 18:14:34 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B6CC8B4AE; Wed, 27 Jun 2018 18:14:34 +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 256BD26A22; Wed, 27 Jun 2018 18:14:34 +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 w5RIEXfH014104; Wed, 27 Jun 2018 18:14:33 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RIEX1Q014101; Wed, 27 Jun 2018 18:14:33 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201806271814.w5RIEX1Q014101@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 27 Jun 2018 18:14:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335717 - in head: contrib/gcc gnu/usr.bin/cc gnu/usr.bin/cc/cc_tools X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head: contrib/gcc gnu/usr.bin/cc gnu/usr.bin/cc/cc_tools X-SVN-Commit-Revision: 335717 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 18:14:34 -0000 Author: jhb Date: Wed Jun 27 18:14:33 2018 New Revision: 335717 URL: https://svnweb.freebsd.org/changeset/base/335717 Log: Fix GCC 4.2.1 to honor --sysroot for includes. - Change the C++ directory entries to honor --sysroot if it is set. - Don't define CROSS_INCLUDE_DIR for the cross compiler. Instead, set TARGET_SYSTEM_ROOT to point to WORLDTMP and always define STANDARD_INCLUDE_DIR. - Change STANDARD_INCLUDE_DIR and the C++ include directories to just start with "/usr" always. The compiler will prepend the sysroot when doing cross-builds. GCC_INCLUDE_DIR (which contains headers that ship with the compiler such as intrinsincs rather than OS-supplied headers) remains hardcoded to look in TOOLS_PREFIX. Reviewed by: bdrewery (older version) Sponsored by: DARPA / AFRL Differential Revision: https://reviews.freebsd.org/D15127 Modified: head/contrib/gcc/cppdefault.c head/gnu/usr.bin/cc/Makefile.inc head/gnu/usr.bin/cc/cc_tools/freebsd-native.h Modified: head/contrib/gcc/cppdefault.c ============================================================================== --- head/contrib/gcc/cppdefault.c Wed Jun 27 18:11:47 2018 (r335716) +++ head/contrib/gcc/cppdefault.c Wed Jun 27 18:14:33 2018 (r335717) @@ -48,7 +48,7 @@ const struct default_include cpp_include_defaults[] = { #ifdef GPLUSPLUS_INCLUDE_DIR /* Pick up GNU C++ generic include files. */ - { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, 0, 0 }, + { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, 1, 0 }, #endif #ifdef GPLUSPLUS_TOOL_INCLUDE_DIR /* Pick up GNU C++ target-dependent include files. */ @@ -56,7 +56,7 @@ const struct default_include cpp_include_defaults[] #endif #ifdef GPLUSPLUS_BACKWARD_INCLUDE_DIR /* Pick up GNU C++ backward and deprecated include files. */ - { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, 0, 0 }, + { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, 1, 0 }, #endif #ifdef LOCAL_INCLUDE_DIR /* /usr/local/include comes before the fixincluded header files. */ Modified: head/gnu/usr.bin/cc/Makefile.inc ============================================================================== --- head/gnu/usr.bin/cc/Makefile.inc Wed Jun 27 18:11:47 2018 (r335716) +++ head/gnu/usr.bin/cc/Makefile.inc Wed Jun 27 18:14:33 2018 (r335717) @@ -25,6 +25,7 @@ CSTD?= gnu89 .if ${TARGET_ARCH} != ${MACHINE_ARCH} CFLAGS+= -DCROSS_DIRECTORY_STRUCTURE +CFLAGS+= -DTARGET_SYSTEM_ROOT=\"${TOOLS_PREFIX}\" .endif .if ${TARGET_CPUARCH} == "arm" Modified: head/gnu/usr.bin/cc/cc_tools/freebsd-native.h ============================================================================== --- head/gnu/usr.bin/cc/cc_tools/freebsd-native.h Wed Jun 27 18:11:47 2018 (r335716) +++ head/gnu/usr.bin/cc/cc_tools/freebsd-native.h Wed Jun 27 18:14:33 2018 (r335717) @@ -15,14 +15,10 @@ #undef LOCAL_INCLUDE_DIR /* We don't wish to support one. */ /* Look for the include files in the system-defined places. */ -#define GPLUSPLUS_INCLUDE_DIR PREFIX"/include/c++/"GCCVER -#define GPLUSPLUS_BACKWARD_INCLUDE_DIR PREFIX"/include/c++/"GCCVER"/backward" +#define GPLUSPLUS_INCLUDE_DIR "/usr/include/c++/"GCCVER +#define GPLUSPLUS_BACKWARD_INCLUDE_DIR "/usr/include/c++/"GCCVER"/backward" #define GCC_INCLUDE_DIR PREFIX"/include/gcc/"GCCVER -#ifdef CROSS_DIRECTORY_STRUCTURE -#define CROSS_INCLUDE_DIR PREFIX"/include" -#else -#define STANDARD_INCLUDE_DIR PREFIX"/include" -#endif +#define STANDARD_INCLUDE_DIR "/usr/include" /* Under FreeBSD, the normal location of the compiler back ends is the /usr/libexec directory. From owner-svn-src-all@freebsd.org Wed Jun 27 18:43:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 215141000E42; Wed, 27 Jun 2018 18:43:35 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9D1CF8C387; Wed, 27 Jun 2018 18:43:34 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 78A1926E28; Wed, 27 Jun 2018 18:43:34 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RIhYqE029517; Wed, 27 Jun 2018 18:43:34 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RIhYqW029516; Wed, 27 Jun 2018 18:43:34 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201806271843.w5RIhYqW029516@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 27 Jun 2018 18:43:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335718 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 335718 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 18:43:35 -0000 Author: bdrewery Date: Wed Jun 27 18:43:34 2018 New Revision: 335718 URL: https://svnweb.freebsd.org/changeset/base/335718 Log: Follow-up r335706: Fix LLVM_TARGET_ALL handling to use TARGET_ARCH. Pointyhat to: bdrewery MFC after: 2 weeks X-MFC-with: r335706 Reported by: Mark Millard Sponsored by: Dell EMC Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Wed Jun 27 18:14:33 2018 (r335717) +++ head/share/mk/src.opts.mk Wed Jun 27 18:43:34 2018 (r335718) @@ -264,7 +264,7 @@ __LLVM_TARGET_FILT= C/(amd64|i386)/x86/:S/sparc64/spar # Default the rest of the LLVM_TARGETs to the value of MK_LLVM_TARGET_ALL # which is based on MK_CLANG. .for __llt in ${__LLVM_TARGETS} -.if ${__llt} != ${__T:${__LLVM_TARGET_FILT}} +.if ${__llt} != ${__TT:${__LLVM_TARGET_FILT}} __DEFAULT_DEPENDENT_OPTIONS+= LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/LLVM_TARGET_ALL .else __DEFAULT_DEPENDENT_OPTIONS+= LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/CLANG From owner-svn-src-all@freebsd.org Wed Jun 27 18:51:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B0BC100192C; Wed, 27 Jun 2018 18:51:55 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CC00F8CAD2; Wed, 27 Jun 2018 18:51:54 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id A024B1FE39; Wed, 27 Jun 2018 18:51:54 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id DE577989A; Wed, 27 Jun 2018 18:51:53 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id vq5zxlvV184X; Wed, 27 Jun 2018 18:51:51 +0000 (UTC) Subject: Re: svn commit: r335718 - head/share/mk DKIM-Filter: OpenDKIM Filter v2.10.3 mail.xzibition.com 02CB19895 From: Bryan Drewery To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201806271843.w5RIhYqW029516@repo.freebsd.org> Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Autocrypt: addr=bdrewery@FreeBSD.org; prefer-encrypt=mutual; keydata= xsBNBFJphmsBCADiFgmS4bIzwZijrS31SjEMzg+n5zNellgM+HkShwehpqCiyhXdWrvH6dTZ a6u50pbUIX7doTR7W7PQHCjCTqtpwvcj0eulZva+iHFp+XrbgSFHn+VVXgkYP2MFySyZRFab D2qqzJBEJofhpv4HvY6uQI5K99pMqKr1Z/lHqsijYYu4RH2OfwB5PinId7xeldzWEonVoCr+ rfxzO/UrgA6v/3layGZcKNHFjmc3NqoN1DXtdaEHqtjIozzbndVkH6lkFvIpIrI6i5ox8pwp VxsxLCr/4Musd5CWgHiet5kSw2SzNeA8FbxdLYCpXNVu+uBACEbCUP+CSNy3NVfEUxsBABEB AAHNJEJyeWFuIERyZXdlcnkgPGJkcmV3ZXJ5QEZyZWVCU0Qub3JnPsLAgAQTAQoAKgIbAwUL CQgHAwUVCgkICwUWAwIBAAIeAQIXgAIZAQUCWujOIgUJCmB7NwAKCRA113G7bkaXz/xpB/9b /UWIPbieY1IeIuHF2pyYPE7Hytkh3HVsxMA0F5Ma2AYQsXZZeKNKWrF7RPyDyDwUklLHJkhm k3EfClBbHxf08kMIm1vWCJRtgxic9knY/bzYGiWMpHjg3cSd1XfrYH1autYqTZAjDwIkgOjU dR//Tbn4V36sY7y2jz+kdMVWvK53U32aZqiwBbCn4DPe1wSZcUs17mV/0uZdIoGdj74B1orN A/0py5vHYo6HcbBNoaR8pKRLf5VZNRsxqGIMhTucx4SJWcHpuRBWYyvJSFzwvxdK4ZD4Yqoc kFGPVtOXktVMai9exrLvP3G77fKMu8DI6j4QRU4wCesnHuIfRPFuzsBNBFJphmsBCACiVFPf kNfaFtUSuY0395ueo/rMyHPGPQ2iwvERFCpeFGSQSgagpenNHLpFQKTg/dl6FOoST5tqyxMq fyHGHDzzU51bvA/IfaGoNi/BIhTe/toZNMRvpcI3PLjiGcnJnuwCCbAVOAGdb+t5cZtpNdOI cKYmrYG3u9RiBpe6dTF+qLrD/8Bs1wjhduQ8fcNNgnkXu8xDH4ZxY0lIc3QgvYWp9vimlQe6 iKjUd2/DX28ETZcD5h6pYV331KMPTrEI0p0yvFijUZce8c1XHFyL1j9sBAha5qpszJl6Uq5i LolhKRcGfcdmtD72vHQjUYglUyudSJUVyo2gMYjdbiFKzJulABEBAAHCwGUEGAEKAA8CGwwF AlrozigFCQpgez0ACgkQNddxu25Gl8+m5Af/R3VEdxNMAcDIes9ADhQyofj20SPV3eCJ3HYR OebTSuNdOudGt4AAyA8Ks94u9hiIp5IGsc6RDsT9W7O2vgXhd6eV3eiY5Oif5xLIYrIDVu1Y 1GyRxRrPEn/QOqDN6uFZCPwK1aOapGcYCrO9lB0gMuTVfgHanU61rgC9tMX0OoAOyRd+V3/M 8lDNhjJdF/IpO3SdYzKfkwduy4qamw4Gphcx/RfYQvYLq/eDkP8d50PphWdboqWBwNRHayro W/07OGzfxM5fJ5mBsXPQcO2QcRjkyHf6xCM6Hi1qQL4OnXMNE/ZTX0lnOj1/pH93TlzSHZMP TaiiA/MBD3vGsXBmBg== Organization: FreeBSD Message-ID: Date: Wed, 27 Jun 2018 11:51:50 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <201806271843.w5RIhYqW029516@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="J4XFwegjzPyWtxghhtxEeIVLkrYJEPv8A" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 18:51:55 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --J4XFwegjzPyWtxghhtxEeIVLkrYJEPv8A Content-Type: multipart/mixed; boundary="Zhq3fmlVQKgAhNGnkW2HcZfiF2UAc4TRA"; protected-headers="v1" From: Bryan Drewery To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r335718 - head/share/mk References: <201806271843.w5RIhYqW029516@repo.freebsd.org> In-Reply-To: <201806271843.w5RIhYqW029516@repo.freebsd.org> --Zhq3fmlVQKgAhNGnkW2HcZfiF2UAc4TRA Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 6/27/2018 11:43 AM, Bryan Drewery wrote: > Author: bdrewery > Date: Wed Jun 27 18:43:34 2018 > New Revision: 335718 > URL: https://svnweb.freebsd.org/changeset/base/335718 >=20 > Log: > Follow-up r335706: Fix LLVM_TARGET_ALL handling to use TARGET_ARCH. Oops, I meant to say TARGET here. I intended for this to use TARGET as it does now. __T __TT, great names :( > =20 > Pointyhat to: bdrewery > MFC after: 2 weeks > X-MFC-with: r335706 > Reported by: Mark Millard > Sponsored by: Dell EMC >=20 > Modified: > head/share/mk/src.opts.mk >=20 > Modified: head/share/mk/src.opts.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/share/mk/src.opts.mk Wed Jun 27 18:14:33 2018 (r335717) > +++ head/share/mk/src.opts.mk Wed Jun 27 18:43:34 2018 (r335718) > @@ -264,7 +264,7 @@ __LLVM_TARGET_FILT=3D C/(amd64|i386)/x86/:S/sparc64= /spar > # Default the rest of the LLVM_TARGETs to the value of MK_LLVM_TARGET_= ALL > # which is based on MK_CLANG. > .for __llt in ${__LLVM_TARGETS} > -.if ${__llt} !=3D ${__T:${__LLVM_TARGET_FILT}} > +.if ${__llt} !=3D ${__TT:${__LLVM_TARGET_FILT}} > __DEFAULT_DEPENDENT_OPTIONS+=3D LLVM_TARGET_${__llt:${__LLVM_TARGET_FI= LT}:tu}/LLVM_TARGET_ALL > .else > __DEFAULT_DEPENDENT_OPTIONS+=3D LLVM_TARGET_${__llt:${__LLVM_TARGET_FI= LT}:tu}/CLANG >=20 --=20 Regards, Bryan Drewery --Zhq3fmlVQKgAhNGnkW2HcZfiF2UAc4TRA-- --J4XFwegjzPyWtxghhtxEeIVLkrYJEPv8A 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 iQEcBAEBAgAGBQJbM9zGAAoJEDXXcbtuRpfPyWwIAJzpaztZtny6N5Kp8yHsvEr/ PWpHLEjTAtenDQKax+zIQtM0famSjcGgDh6sB4TituFob0uri3+uBksIhMHQOzVi +I9pbH1OM/C7wEgklICOyeHSF3/EAciC6pvFL2DF6rAVpg+HOSmwwKCSzAvOtHdD Yz26VmcKG1+vmtLliOHHuEpYDlueve47mbV/feumS89zhJwghzfYtDWR5s5Ix3jb 49waTWNMWUldbFvQ5FfomDcMvaKaSA0DTXE1r4ShxEeGvR8ATwlFAUmo81m5HRl2 3L+WIKtlaTh95fJWdjxBGlNPQIKT3L50TXWN/W+whOkWL3zpTgcItjGnJonW6P4= =fmCq -----END PGP SIGNATURE----- --J4XFwegjzPyWtxghhtxEeIVLkrYJEPv8A-- From owner-svn-src-all@freebsd.org Wed Jun 27 19:10:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 386B310029F0; Wed, 27 Jun 2018 19:10:34 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DF4E38D54B; Wed, 27 Jun 2018 19:10:33 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BD61A27174; Wed, 27 Jun 2018 19:10:33 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RJAXWE038091; Wed, 27 Jun 2018 19:10:33 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RJAXX1038089; Wed, 27 Jun 2018 19:10:33 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201806271910.w5RJAXX1038089@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Wed, 27 Jun 2018 19:10:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335719 - in head: . release/packages X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: in head: . release/packages X-SVN-Commit-Revision: 335719 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 19:10:34 -0000 Author: brd Date: Wed Jun 27 19:10:32 2018 New Revision: 335719 URL: https://svnweb.freebsd.org/changeset/base/335719 Log: Chase the pwd_mkdb endian changes. Approved by: bapt (mentor) Modified: head/Makefile.inc1 head/release/packages/generate-ucl.sh head/release/packages/runtime.ucl Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Jun 27 18:43:34 2018 (r335718) +++ head/Makefile.inc1 Wed Jun 27 19:10:32 2018 (r335719) @@ -1804,14 +1804,12 @@ create-kernel-packages-flavor${flavor:C,^""$,${_defaul awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \ -v kernel=yes -v _kernconf=${INSTALLKERNEL} ; \ cap_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VCAP_MKDB_ENDIAN` ; \ - pwd_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VPWD_MKDB_ENDIAN` ; \ sed -e "s/%VERSION%/${PKG_VERSION}/" \ -e "s/%PKGNAME%/kernel-${INSTALLKERNEL:tl}${flavor}/" \ -e "s/%KERNELDIR%/kernel/" \ -e "s/%COMMENT%/FreeBSD ${INSTALLKERNEL} kernel ${flavor}/" \ -e "s/%DESC%/FreeBSD ${INSTALLKERNEL} kernel ${flavor}/" \ -e "s/%CAP_MKDB_ENDIAN%/$${cap_arg}/g" \ - -e "s/%PWD_MKDB_ENDIAN%/$${pwd_arg}/g" \ -e "s/ %VCS_REVISION%/${VCS_REVISION}/" \ ${SRCDIR}/release/packages/kernel.ucl \ > ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.ucl ; \ @@ -1840,14 +1838,12 @@ create-kernel-packages-extra-flavor${flavor:C,^""$,${_ awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \ -v kernel=yes -v _kernconf=${_kernel} ; \ cap_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VCAP_MKDB_ENDIAN` ; \ - pwd_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VPWD_MKDB_ENDIAN` ; \ sed -e "s/%VERSION%/${PKG_VERSION}/" \ -e "s/%PKGNAME%/kernel-${_kernel:tl}${flavor}/" \ -e "s/%KERNELDIR%/kernel.${_kernel}/" \ -e "s/%COMMENT%/FreeBSD ${_kernel} kernel ${flavor}/" \ -e "s/%DESC%/FreeBSD ${_kernel} kernel ${flavor}/" \ -e "s/%CAP_MKDB_ENDIAN%/$${cap_arg}/g" \ - -e "s/%PWD_MKDB_ENDIAN%/$${pwd_arg}/g" \ -e "s/ %VCS_REVISION%/${VCS_REVISION}/" \ ${SRCDIR}/release/packages/kernel.ucl \ > ${KSTAGEDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.ucl ; \ Modified: head/release/packages/generate-ucl.sh ============================================================================== --- head/release/packages/generate-ucl.sh Wed Jun 27 18:43:34 2018 (r335718) +++ head/release/packages/generate-ucl.sh Wed Jun 27 19:10:32 2018 (r335719) @@ -132,13 +132,11 @@ main() { cp "${uclsource}" "${uclfile}" cap_arg="$(make -C ${srctree}/etc -VCAP_MKDB_ENDIAN)" - pwd_arg="$(make -C ${srctree}/etc -VPWD_MKDB_ENDIAN)" sed -i '' -e "s/%VERSION%/${PKG_VERSION}/" \ -e "s/%PKGNAME%/${origname}/" \ -e "s/%COMMENT%/${comment}/" \ -e "s/%DESC%/${desc}/" \ -e "s/%CAP_MKDB_ENDIAN%/${cap_arg}/g" \ - -e "s/%PWD_MKDB_ENDIAN%/${pwd_arg}/g" \ -e "s/%PKGDEPS%/${pkgdeps}/" \ ${uclfile} return 0 Modified: head/release/packages/runtime.ucl ============================================================================== --- head/release/packages/runtime.ucl Wed Jun 27 18:43:34 2018 (r335718) +++ head/release/packages/runtime.ucl Wed Jun 27 19:10:32 2018 (r335719) @@ -19,7 +19,7 @@ EOD scripts: { post-install = < Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91CBA1002EF1; Wed, 27 Jun 2018 19:14:18 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 407EA8D9C0; Wed, 27 Jun 2018 19:14:18 +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 1E98D272F9; Wed, 27 Jun 2018 19:14:18 +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 w5RJEH9K042824; Wed, 27 Jun 2018 19:14:17 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RJE94Y042787; Wed, 27 Jun 2018 19:14:09 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201806271914.w5RJE94Y042787@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 27 Jun 2018 19:14:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r335720 - in vendor/llvm/dist-release_60: . include/llvm/CodeGen include/llvm/IR lib/Analysis lib/CodeGen lib/ExecutionEngine/RuntimeDyld lib/IR lib/MC lib/Support lib/Target/AArch64 li... X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/llvm/dist-release_60: . include/llvm/CodeGen include/llvm/IR lib/Analysis lib/CodeGen lib/ExecutionEngine/RuntimeDyld lib/IR lib/MC lib/Support lib/Target/AArch64 lib/Target/AMDGPU lib/Targe... X-SVN-Commit-Revision: 335720 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 19:14:19 -0000 Author: dim Date: Wed Jun 27 19:14:09 2018 New Revision: 335720 URL: https://svnweb.freebsd.org/changeset/base/335720 Log: Vendor import of llvm 6.0.1 release r335540: https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_601/final@335540 Added: vendor/llvm/dist-release_60/lib/Target/X86/X86FlagsCopyLowering.cpp (contents, props changed) vendor/llvm/dist-release_60/test/Analysis/MemorySSA/pr36883.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/inlineasm-S-constraint.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/spill-stack-realignment.mir vendor/llvm/dist-release_60/test/CodeGen/AMDGPU/ctpop16.ll vendor/llvm/dist-release_60/test/CodeGen/Hexagon/ifcvt-diamond-ret.mir vendor/llvm/dist-release_60/test/CodeGen/MIR/PowerPC/ifcvt-diamond-ret.mir vendor/llvm/dist-release_60/test/CodeGen/Mips/indirect-jump-hazard/ vendor/llvm/dist-release_60/test/CodeGen/Mips/indirect-jump-hazard/calls.ll vendor/llvm/dist-release_60/test/CodeGen/Mips/indirect-jump-hazard/guards-verify-call.mir vendor/llvm/dist-release_60/test/CodeGen/Mips/indirect-jump-hazard/guards-verify-tailcall.mir vendor/llvm/dist-release_60/test/CodeGen/Mips/indirect-jump-hazard/jumptables.ll vendor/llvm/dist-release_60/test/CodeGen/Mips/indirect-jump-hazard/long-branch.ll vendor/llvm/dist-release_60/test/CodeGen/Mips/indirect-jump-hazard/long-calls.ll vendor/llvm/dist-release_60/test/CodeGen/Mips/indirect-jump-hazard/unsupported-micromips.ll vendor/llvm/dist-release_60/test/CodeGen/Mips/indirect-jump-hazard/unsupported-mips32.ll vendor/llvm/dist-release_60/test/CodeGen/Mips/inlineasm-cnstrnt-bad-l1.ll vendor/llvm/dist-release_60/test/CodeGen/PowerPC/no-dup-of-bdnz.ll vendor/llvm/dist-release_60/test/CodeGen/PowerPC/pr35402.ll vendor/llvm/dist-release_60/test/CodeGen/Thumb/PR36658.mir vendor/llvm/dist-release_60/test/CodeGen/X86/domain-reassignment-implicit-def.ll vendor/llvm/dist-release_60/test/CodeGen/X86/domain-reassignment-test.ll vendor/llvm/dist-release_60/test/CodeGen/X86/flags-copy-lowering.mir vendor/llvm/dist-release_60/test/CodeGen/X86/pr37264.ll vendor/llvm/dist-release_60/test/DebugInfo/X86/live-debug-vars-discard-invalid.mir vendor/llvm/dist-release_60/test/ExecutionEngine/RuntimeDyld/PowerPC/Inputs/ vendor/llvm/dist-release_60/test/ExecutionEngine/RuntimeDyld/PowerPC/Inputs/ppc64_elf_module_b.s (contents, props changed) vendor/llvm/dist-release_60/test/ExecutionEngine/RuntimeDyld/PowerPC/ppc64_elf.s (contents, props changed) vendor/llvm/dist-release_60/test/MC/Mips/unsupported-relocation.s (contents, props changed) vendor/llvm/dist-release_60/test/Transforms/ArgumentPromotion/musttail.ll vendor/llvm/dist-release_60/test/Transforms/CallSiteSplitting/musttail.ll vendor/llvm/dist-release_60/test/Transforms/DeadArgElim/musttail-caller.ll vendor/llvm/dist-release_60/test/Transforms/GlobalOpt/musttail_cc.ll vendor/llvm/dist-release_60/test/Transforms/IPConstantProp/musttail-call.ll vendor/llvm/dist-release_60/test/Transforms/JumpThreading/header-succ.ll vendor/llvm/dist-release_60/test/Transforms/MergeFunc/inline-asm.ll vendor/llvm/dist-release_60/test/Transforms/MergeFunc/weak-small.ll Deleted: vendor/llvm/dist-release_60/test/CodeGen/X86/clobber-fi0.ll vendor/llvm/dist-release_60/test/CodeGen/X86/eflags-copy-expansion.mir Modified: vendor/llvm/dist-release_60/CMakeLists.txt vendor/llvm/dist-release_60/include/llvm/CodeGen/MachineBasicBlock.h vendor/llvm/dist-release_60/include/llvm/CodeGen/TargetInstrInfo.h vendor/llvm/dist-release_60/include/llvm/IR/IntrinsicsPowerPC.td vendor/llvm/dist-release_60/lib/Analysis/GlobalsModRef.cpp vendor/llvm/dist-release_60/lib/Analysis/MemorySSA.cpp vendor/llvm/dist-release_60/lib/CodeGen/IfConversion.cpp vendor/llvm/dist-release_60/lib/CodeGen/LiveDebugVariables.cpp vendor/llvm/dist-release_60/lib/CodeGen/MachineBasicBlock.cpp vendor/llvm/dist-release_60/lib/CodeGen/MachineBlockPlacement.cpp vendor/llvm/dist-release_60/lib/CodeGen/PeepholeOptimizer.cpp vendor/llvm/dist-release_60/lib/CodeGen/TargetInstrInfo.cpp vendor/llvm/dist-release_60/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp vendor/llvm/dist-release_60/lib/IR/Core.cpp vendor/llvm/dist-release_60/lib/MC/MCObjectFileInfo.cpp vendor/llvm/dist-release_60/lib/Support/CMakeLists.txt vendor/llvm/dist-release_60/lib/Support/Host.cpp vendor/llvm/dist-release_60/lib/Target/AArch64/AArch64AsmPrinter.cpp vendor/llvm/dist-release_60/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp vendor/llvm/dist-release_60/lib/Target/AArch64/AArch64FrameLowering.cpp vendor/llvm/dist-release_60/lib/Target/AArch64/AArch64ISelLowering.cpp vendor/llvm/dist-release_60/lib/Target/AArch64/AArch64InstrInfo.td vendor/llvm/dist-release_60/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp vendor/llvm/dist-release_60/lib/Target/AMDGPU/SIISelLowering.cpp vendor/llvm/dist-release_60/lib/Target/AMDGPU/SIInstructions.td vendor/llvm/dist-release_60/lib/Target/ARM/ARMBaseInstrInfo.cpp vendor/llvm/dist-release_60/lib/Target/ARM/ARMComputeBlockSize.cpp vendor/llvm/dist-release_60/lib/Target/Mips/AsmParser/MipsAsmParser.cpp vendor/llvm/dist-release_60/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp vendor/llvm/dist-release_60/lib/Target/Mips/MicroMips32r6InstrInfo.td vendor/llvm/dist-release_60/lib/Target/Mips/MicroMipsInstrInfo.td vendor/llvm/dist-release_60/lib/Target/Mips/Mips.td vendor/llvm/dist-release_60/lib/Target/Mips/Mips32r6InstrInfo.td vendor/llvm/dist-release_60/lib/Target/Mips/Mips64InstrInfo.td vendor/llvm/dist-release_60/lib/Target/Mips/Mips64r6InstrInfo.td vendor/llvm/dist-release_60/lib/Target/Mips/MipsDSPInstrFormats.td vendor/llvm/dist-release_60/lib/Target/Mips/MipsFastISel.cpp vendor/llvm/dist-release_60/lib/Target/Mips/MipsISelLowering.cpp vendor/llvm/dist-release_60/lib/Target/Mips/MipsInstrFormats.td vendor/llvm/dist-release_60/lib/Target/Mips/MipsInstrInfo.cpp vendor/llvm/dist-release_60/lib/Target/Mips/MipsInstrInfo.td vendor/llvm/dist-release_60/lib/Target/Mips/MipsLongBranch.cpp vendor/llvm/dist-release_60/lib/Target/Mips/MipsSEISelLowering.cpp vendor/llvm/dist-release_60/lib/Target/Mips/MipsSubtarget.cpp vendor/llvm/dist-release_60/lib/Target/Mips/MipsSubtarget.h vendor/llvm/dist-release_60/lib/Target/NVPTX/NVPTXTargetMachine.cpp vendor/llvm/dist-release_60/lib/Target/PowerPC/PPCISelLowering.cpp vendor/llvm/dist-release_60/lib/Target/PowerPC/PPCInstrInfo.cpp vendor/llvm/dist-release_60/lib/Target/X86/CMakeLists.txt vendor/llvm/dist-release_60/lib/Target/X86/Disassembler/X86Disassembler.cpp vendor/llvm/dist-release_60/lib/Target/X86/X86.h vendor/llvm/dist-release_60/lib/Target/X86/X86DomainReassignment.cpp vendor/llvm/dist-release_60/lib/Target/X86/X86FastISel.cpp vendor/llvm/dist-release_60/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist-release_60/lib/Target/X86/X86ISelLowering.h vendor/llvm/dist-release_60/lib/Target/X86/X86InstrArithmetic.td vendor/llvm/dist-release_60/lib/Target/X86/X86InstrCompiler.td vendor/llvm/dist-release_60/lib/Target/X86/X86InstrInfo.cpp vendor/llvm/dist-release_60/lib/Target/X86/X86InstrInfo.h vendor/llvm/dist-release_60/lib/Target/X86/X86InstrInfo.td vendor/llvm/dist-release_60/lib/Target/X86/X86InstrSystem.td vendor/llvm/dist-release_60/lib/Target/X86/X86RegisterInfo.td vendor/llvm/dist-release_60/lib/Target/X86/X86Schedule.td vendor/llvm/dist-release_60/lib/Target/X86/X86ScheduleAtom.td vendor/llvm/dist-release_60/lib/Target/X86/X86TargetMachine.cpp vendor/llvm/dist-release_60/lib/Transforms/IPO/ArgumentPromotion.cpp vendor/llvm/dist-release_60/lib/Transforms/IPO/DeadArgumentElimination.cpp vendor/llvm/dist-release_60/lib/Transforms/IPO/GlobalOpt.cpp vendor/llvm/dist-release_60/lib/Transforms/IPO/MergeFunctions.cpp vendor/llvm/dist-release_60/lib/Transforms/InstCombine/InstructionCombining.cpp vendor/llvm/dist-release_60/lib/Transforms/Scalar/CallSiteSplitting.cpp vendor/llvm/dist-release_60/lib/Transforms/Scalar/DivRemPairs.cpp vendor/llvm/dist-release_60/lib/Transforms/Scalar/JumpThreading.cpp vendor/llvm/dist-release_60/lib/Transforms/Scalar/SCCP.cpp vendor/llvm/dist-release_60/lib/Transforms/Utils/FunctionComparator.cpp vendor/llvm/dist-release_60/test/CodeGen/AArch64/arm64-indexed-vector-ldst-2.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/arm64-zero-cycle-zeroing.ll vendor/llvm/dist-release_60/test/CodeGen/AArch64/falkor-hwpf-fix.mir vendor/llvm/dist-release_60/test/CodeGen/ARM/peephole-phi.mir vendor/llvm/dist-release_60/test/CodeGen/Mips/const-mult.ll vendor/llvm/dist-release_60/test/CodeGen/Mips/inlineasm-cnstrnt-reg.ll vendor/llvm/dist-release_60/test/CodeGen/PowerPC/convert-rr-to-ri-instrs.mir vendor/llvm/dist-release_60/test/CodeGen/X86/GlobalISel/add-scalar.ll vendor/llvm/dist-release_60/test/CodeGen/X86/O0-pipeline.ll vendor/llvm/dist-release_60/test/CodeGen/X86/cmpxchg-clobber-flags.ll vendor/llvm/dist-release_60/test/CodeGen/X86/copy-eflags.ll vendor/llvm/dist-release_60/test/CodeGen/X86/fast-isel-shift.ll vendor/llvm/dist-release_60/test/CodeGen/X86/ipra-reg-usage.ll vendor/llvm/dist-release_60/test/CodeGen/X86/mul-i1024.ll vendor/llvm/dist-release_60/test/CodeGen/X86/peephole-na-phys-copy-folding.ll vendor/llvm/dist-release_60/test/CodeGen/X86/win64_frame.ll vendor/llvm/dist-release_60/test/CodeGen/X86/x86-repmov-copy-eflags.ll vendor/llvm/dist-release_60/test/DebugInfo/X86/dbg-value-inlined-parameter.ll vendor/llvm/dist-release_60/test/MC/ELF/cfi-large-model.s vendor/llvm/dist-release_60/test/Transforms/InstCombine/gep-addrspace.ll vendor/llvm/dist-release_60/tools/llvm-config/CMakeLists.txt Modified: vendor/llvm/dist-release_60/CMakeLists.txt ============================================================================== --- vendor/llvm/dist-release_60/CMakeLists.txt Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/CMakeLists.txt Wed Jun 27 19:14:09 2018 (r335720) @@ -24,7 +24,7 @@ if(NOT DEFINED LLVM_VERSION_MINOR) set(LLVM_VERSION_MINOR 0) endif() if(NOT DEFINED LLVM_VERSION_PATCH) - set(LLVM_VERSION_PATCH 0) + set(LLVM_VERSION_PATCH 1) endif() if(NOT DEFINED LLVM_VERSION_SUFFIX) set(LLVM_VERSION_SUFFIX "") Modified: vendor/llvm/dist-release_60/include/llvm/CodeGen/MachineBasicBlock.h ============================================================================== --- vendor/llvm/dist-release_60/include/llvm/CodeGen/MachineBasicBlock.h Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/include/llvm/CodeGen/MachineBasicBlock.h Wed Jun 27 19:14:09 2018 (r335720) @@ -449,6 +449,13 @@ class MachineBasicBlock (public) /// Replace successor OLD with NEW and update probability info. void replaceSuccessor(MachineBasicBlock *Old, MachineBasicBlock *New); + /// Copy a successor (and any probability info) from original block to this + /// block's. Uses an iterator into the original blocks successors. + /// + /// This is useful when doing a partial clone of successors. Afterward, the + /// probabilities may need to be normalized. + void copySuccessor(MachineBasicBlock *Orig, succ_iterator I); + /// Transfers all the successors from MBB to this machine basic block (i.e., /// copies all the successors FromMBB and remove all the successors from /// FromMBB). Modified: vendor/llvm/dist-release_60/include/llvm/CodeGen/TargetInstrInfo.h ============================================================================== --- vendor/llvm/dist-release_60/include/llvm/CodeGen/TargetInstrInfo.h Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/include/llvm/CodeGen/TargetInstrInfo.h Wed Jun 27 19:14:09 2018 (r335720) @@ -421,7 +421,8 @@ class TargetInstrInfo : public MCInstrInfo { (public) /// Build the equivalent inputs of a REG_SEQUENCE for the given \p MI /// and \p DefIdx. /// \p [out] InputRegs of the equivalent REG_SEQUENCE. Each element of - /// the list is modeled as . + /// the list is modeled as . Operands with the undef + /// flag are not added to this list. /// E.g., REG_SEQUENCE %1:sub1, sub0, %2, sub1 would produce /// two elements: /// - %1:sub1, sub0 @@ -446,7 +447,8 @@ class TargetInstrInfo : public MCInstrInfo { (public) /// - %1:sub1, sub0 /// /// \returns true if it is possible to build such an input sequence - /// with the pair \p MI, \p DefIdx. False otherwise. + /// with the pair \p MI, \p DefIdx and the operand has no undef flag set. + /// False otherwise. /// /// \pre MI.isExtractSubreg() or MI.isExtractSubregLike(). /// @@ -465,7 +467,8 @@ class TargetInstrInfo : public MCInstrInfo { (public) /// - InsertedReg: %1:sub1, sub3 /// /// \returns true if it is possible to build such an input sequence - /// with the pair \p MI, \p DefIdx. False otherwise. + /// with the pair \p MI, \p DefIdx and the operand has no undef flag set. + /// False otherwise. /// /// \pre MI.isInsertSubreg() or MI.isInsertSubregLike(). /// Modified: vendor/llvm/dist-release_60/include/llvm/IR/IntrinsicsPowerPC.td ============================================================================== --- vendor/llvm/dist-release_60/include/llvm/IR/IntrinsicsPowerPC.td Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/include/llvm/IR/IntrinsicsPowerPC.td Wed Jun 27 19:14:09 2018 (r335720) @@ -36,8 +36,12 @@ let TargetPrefix = "ppc" in { // All intrinsics start // Intrinsics used to generate ctr-based loops. These should only be // generated by the PowerPC backend! + // The branch intrinsic is marked as NoDuplicate because loop rotation will + // attempt to duplicate it forming loops where a block reachable from one + // instance of it can contain another. def int_ppc_mtctr : Intrinsic<[], [llvm_anyint_ty], []>; - def int_ppc_is_decremented_ctr_nonzero : Intrinsic<[llvm_i1_ty], [], []>; + def int_ppc_is_decremented_ctr_nonzero : + Intrinsic<[llvm_i1_ty], [], [IntrNoDuplicate]>; // Intrinsics for [double]word extended forms of divide instructions def int_ppc_divwe : GCCBuiltin<"__builtin_divwe">, Modified: vendor/llvm/dist-release_60/lib/Analysis/GlobalsModRef.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/Analysis/GlobalsModRef.cpp Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/lib/Analysis/GlobalsModRef.cpp Wed Jun 27 19:14:09 2018 (r335720) @@ -502,6 +502,8 @@ void GlobalsAAResult::AnalyzeCallGraph(CallGraph &CG, } FunctionInfo &FI = FunctionInfos[F]; + Handles.emplace_front(*this, F); + Handles.front().I = Handles.begin(); bool KnowNothing = false; // Collect the mod/ref properties due to called functions. We only compute Modified: vendor/llvm/dist-release_60/lib/Analysis/MemorySSA.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/Analysis/MemorySSA.cpp Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/lib/Analysis/MemorySSA.cpp Wed Jun 27 19:14:09 2018 (r335720) @@ -153,9 +153,14 @@ class MemoryLocOrCall { (public) if (IsCall != Other.IsCall) return false; - if (IsCall) - return CS.getCalledValue() == Other.CS.getCalledValue(); - return Loc == Other.Loc; + if (!IsCall) + return Loc == Other.Loc; + + if (CS.getCalledValue() != Other.CS.getCalledValue()) + return false; + + return CS.arg_size() == Other.CS.arg_size() && + std::equal(CS.arg_begin(), CS.arg_end(), Other.CS.arg_begin()); } private: @@ -179,12 +184,18 @@ template <> struct DenseMapInfo { } static unsigned getHashValue(const MemoryLocOrCall &MLOC) { - if (MLOC.IsCall) - return hash_combine(MLOC.IsCall, - DenseMapInfo::getHashValue( - MLOC.getCS().getCalledValue())); - return hash_combine( - MLOC.IsCall, DenseMapInfo::getHashValue(MLOC.getLoc())); + if (!MLOC.IsCall) + return hash_combine( + MLOC.IsCall, + DenseMapInfo::getHashValue(MLOC.getLoc())); + + hash_code hash = + hash_combine(MLOC.IsCall, DenseMapInfo::getHashValue( + MLOC.getCS().getCalledValue())); + + for (const Value *Arg : MLOC.getCS().args()) + hash = hash_combine(hash, DenseMapInfo::getHashValue(Arg)); + return hash; } static bool isEqual(const MemoryLocOrCall &LHS, const MemoryLocOrCall &RHS) { Modified: vendor/llvm/dist-release_60/lib/CodeGen/IfConversion.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/CodeGen/IfConversion.cpp Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/lib/CodeGen/IfConversion.cpp Wed Jun 27 19:14:09 2018 (r335720) @@ -1714,20 +1714,25 @@ bool IfConverter::IfConvertDiamondCommon( } // Remove the duplicated instructions at the beginnings of both paths. - // Skip dbg_value instructions + // Skip dbg_value instructions. MachineBasicBlock::iterator DI1 = MBB1.getFirstNonDebugInstr(); MachineBasicBlock::iterator DI2 = MBB2.getFirstNonDebugInstr(); BBI1->NonPredSize -= NumDups1; BBI2->NonPredSize -= NumDups1; // Skip past the dups on each side separately since there may be - // differing dbg_value entries. + // differing dbg_value entries. NumDups1 can include a "return" + // instruction, if it's not marked as "branch". for (unsigned i = 0; i < NumDups1; ++DI1) { + if (DI1 == MBB1.end()) + break; if (!DI1->isDebugValue()) ++i; } while (NumDups1 != 0) { ++DI2; + if (DI2 == MBB2.end()) + break; if (!DI2->isDebugValue()) --NumDups1; } @@ -1738,11 +1743,16 @@ bool IfConverter::IfConvertDiamondCommon( Redefs.stepForward(MI, Dummy); } } + BBI.BB->splice(BBI.BB->end(), &MBB1, MBB1.begin(), DI1); MBB2.erase(MBB2.begin(), DI2); - // The branches have been checked to match, so it is safe to remove the branch - // in BB1 and rely on the copy in BB2 + // The branches have been checked to match, so it is safe to remove the + // branch in BB1 and rely on the copy in BB2. The complication is that + // the blocks may end with a return instruction, which may or may not + // be marked as "branch". If it's not, then it could be included in + // "dups1", leaving the blocks potentially empty after moving the common + // duplicates. #ifndef NDEBUG // Unanalyzable branches must match exactly. Check that now. if (!BBI1->IsBrAnalyzable) @@ -1768,11 +1778,14 @@ bool IfConverter::IfConvertDiamondCommon( if (RemoveBranch) BBI2->NonPredSize -= TII->removeBranch(*BBI2->BB); else { - do { - assert(DI2 != MBB2.begin()); - DI2--; - } while (DI2->isBranch() || DI2->isDebugValue()); - DI2++; + // Make DI2 point to the end of the range where the common "tail" + // instructions could be found. + while (DI2 != MBB2.begin()) { + MachineBasicBlock::iterator Prev = std::prev(DI2); + if (!Prev->isBranch() && !Prev->isDebugValue()) + break; + DI2 = Prev; + } } while (NumDups2 != 0) { // NumDups2 only counted non-dbg_value instructions, so this won't @@ -1833,11 +1846,15 @@ bool IfConverter::IfConvertDiamondCommon( // a non-predicated in BBI2, then we don't want to predicate the one from // BBI2. The reason is that if we merged these blocks, we would end up with // two predicated terminators in the same block. + // Also, if the branches in MBB1 and MBB2 were non-analyzable, then don't + // predicate them either. They were checked to be identical, and so the + // same branch would happen regardless of which path was taken. if (!MBB2.empty() && (DI2 == MBB2.end())) { MachineBasicBlock::iterator BBI1T = MBB1.getFirstTerminator(); MachineBasicBlock::iterator BBI2T = MBB2.getFirstTerminator(); - if (BBI1T != MBB1.end() && TII->isPredicated(*BBI1T) && - BBI2T != MBB2.end() && !TII->isPredicated(*BBI2T)) + bool BB1Predicated = BBI1T != MBB1.end() && TII->isPredicated(*BBI1T); + bool BB2NonPredicated = BBI2T != MBB2.end() && !TII->isPredicated(*BBI2T); + if (BB2NonPredicated && (BB1Predicated || !BBI2->IsBrAnalyzable)) --DI2; } Modified: vendor/llvm/dist-release_60/lib/CodeGen/LiveDebugVariables.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/CodeGen/LiveDebugVariables.cpp Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/lib/CodeGen/LiveDebugVariables.cpp Wed Jun 27 19:14:09 2018 (r335720) @@ -514,6 +514,39 @@ bool LDVImpl::handleDebugValue(MachineInstr &MI, SlotI return false; } + // Detect invalid DBG_VALUE instructions, with a debug-use of a virtual + // register that hasn't been defined yet. If we do not remove those here, then + // the re-insertion of the DBG_VALUE instruction after register allocation + // will be incorrect. + // TODO: If earlier passes are corrected to generate sane debug information + // (and if the machine verifier is improved to catch this), then these checks + // could be removed or replaced by asserts. + bool Discard = false; + if (MI.getOperand(0).isReg() && + TargetRegisterInfo::isVirtualRegister(MI.getOperand(0).getReg())) { + const unsigned Reg = MI.getOperand(0).getReg(); + if (!LIS->hasInterval(Reg)) { + // The DBG_VALUE is described by a virtual register that does not have a + // live interval. Discard the DBG_VALUE. + Discard = true; + DEBUG(dbgs() << "Discarding debug info (no LIS interval): " + << Idx << " " << MI); + } else { + // The DBG_VALUE is only valid if either Reg is live out from Idx, or Reg + // is defined dead at Idx (where Idx is the slot index for the instruction + // preceeding the DBG_VALUE). + const LiveInterval &LI = LIS->getInterval(Reg); + LiveQueryResult LRQ = LI.Query(Idx); + if (!LRQ.valueOutOrDead()) { + // We have found a DBG_VALUE with the value in a virtual register that + // is not live. Discard the DBG_VALUE. + Discard = true; + DEBUG(dbgs() << "Discarding debug info (reg not live): " + << Idx << " " << MI); + } + } + } + // Get or create the UserValue for (variable,offset) here. bool IsIndirect = MI.getOperand(1).isImm(); if (IsIndirect) @@ -522,7 +555,13 @@ bool LDVImpl::handleDebugValue(MachineInstr &MI, SlotI const DIExpression *Expr = MI.getDebugExpression(); UserValue *UV = getUserValue(Var, Expr, MI.getDebugLoc()); - UV->addDef(Idx, MI.getOperand(0), IsIndirect); + if (!Discard) + UV->addDef(Idx, MI.getOperand(0), IsIndirect); + else { + MachineOperand MO = MachineOperand::CreateReg(0U, false); + MO.setIsDebug(); + UV->addDef(Idx, MO, false); + } return true; } Modified: vendor/llvm/dist-release_60/lib/CodeGen/MachineBasicBlock.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/CodeGen/MachineBasicBlock.cpp Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/lib/CodeGen/MachineBasicBlock.cpp Wed Jun 27 19:14:09 2018 (r335720) @@ -646,6 +646,14 @@ void MachineBasicBlock::replaceSuccessor(MachineBasicB removeSuccessor(OldI); } +void MachineBasicBlock::copySuccessor(MachineBasicBlock *Orig, + succ_iterator I) { + if (Orig->Probs.empty()) + addSuccessor(*I, Orig->getSuccProbability(I)); + else + addSuccessorWithoutProb(*I); +} + void MachineBasicBlock::addPredecessor(MachineBasicBlock *Pred) { Predecessors.push_back(Pred); } Modified: vendor/llvm/dist-release_60/lib/CodeGen/MachineBlockPlacement.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/CodeGen/MachineBlockPlacement.cpp Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/lib/CodeGen/MachineBlockPlacement.cpp Wed Jun 27 19:14:09 2018 (r335720) @@ -513,6 +513,11 @@ class MachineBlockPlacement : public MachineFunctionPa bool runOnMachineFunction(MachineFunction &F) override; + bool allowTailDupPlacement() const { + assert(F); + return TailDupPlacement && !F->getTarget().requiresStructuredCFG(); + } + void getAnalysisUsage(AnalysisUsage &AU) const override { AU.addRequired(); AU.addRequired(); @@ -1018,7 +1023,7 @@ MachineBlockPlacement::getBestTrellisSuccessor( MachineBasicBlock *Succ1 = BestA.Dest; MachineBasicBlock *Succ2 = BestB.Dest; // Check to see if tail-duplication would be profitable. - if (TailDupPlacement && shouldTailDuplicate(Succ2) && + if (allowTailDupPlacement() && shouldTailDuplicate(Succ2) && canTailDuplicateUnplacedPreds(BB, Succ2, Chain, BlockFilter) && isProfitableToTailDup(BB, Succ2, MBPI->getEdgeProbability(BB, Succ1), Chain, BlockFilter)) { @@ -1044,7 +1049,7 @@ MachineBlockPlacement::getBestTrellisSuccessor( return Result; } -/// When the option TailDupPlacement is on, this method checks if the +/// When the option allowTailDupPlacement() is on, this method checks if the /// fallthrough candidate block \p Succ (of block \p BB) can be tail-duplicated /// into all of its unplaced, unfiltered predecessors, that are not BB. bool MachineBlockPlacement::canTailDuplicateUnplacedPreds( @@ -1493,7 +1498,7 @@ MachineBlockPlacement::selectBestSuccessor( if (hasBetterLayoutPredecessor(BB, Succ, SuccChain, SuccProb, RealSuccProb, Chain, BlockFilter)) { // If tail duplication would make Succ profitable, place it. - if (TailDupPlacement && shouldTailDuplicate(Succ)) + if (allowTailDupPlacement() && shouldTailDuplicate(Succ)) DupCandidates.push_back(std::make_tuple(SuccProb, Succ)); continue; } @@ -1702,7 +1707,7 @@ void MachineBlockPlacement::buildChain( auto Result = selectBestSuccessor(BB, Chain, BlockFilter); MachineBasicBlock* BestSucc = Result.BB; bool ShouldTailDup = Result.ShouldTailDup; - if (TailDupPlacement) + if (allowTailDupPlacement()) ShouldTailDup |= (BestSucc && shouldTailDuplicate(BestSucc)); // If an immediate successor isn't available, look for the best viable @@ -1724,7 +1729,7 @@ void MachineBlockPlacement::buildChain( // Placement may have changed tail duplication opportunities. // Check for that now. - if (TailDupPlacement && BestSucc && ShouldTailDup) { + if (allowTailDupPlacement() && BestSucc && ShouldTailDup) { // If the chosen successor was duplicated into all its predecessors, // don't bother laying it out, just go round the loop again with BB as // the chain end. @@ -2758,7 +2763,7 @@ bool MachineBlockPlacement::runOnMachineFunction(Machi TailDupSize = TailDupPlacementAggressiveThreshold; } - if (TailDupPlacement) { + if (allowTailDupPlacement()) { MPDT = &getAnalysis(); if (MF.getFunction().optForSize()) TailDupSize = 1; Modified: vendor/llvm/dist-release_60/lib/CodeGen/PeepholeOptimizer.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/CodeGen/PeepholeOptimizer.cpp Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/lib/CodeGen/PeepholeOptimizer.cpp Wed Jun 27 19:14:09 2018 (r335720) @@ -1882,6 +1882,8 @@ ValueTrackerResult ValueTracker::getNextSourceFromCopy return ValueTrackerResult(); // Otherwise, we want the whole source. const MachineOperand &Src = Def->getOperand(1); + if (Src.isUndef()) + return ValueTrackerResult(); return ValueTrackerResult(Src.getReg(), Src.getSubReg()); } @@ -1925,6 +1927,8 @@ ValueTrackerResult ValueTracker::getNextSourceFromBitc } const MachineOperand &Src = Def->getOperand(SrcIdx); + if (Src.isUndef()) + return ValueTrackerResult(); return ValueTrackerResult(Src.getReg(), Src.getSubReg()); } @@ -2093,6 +2097,10 @@ ValueTrackerResult ValueTracker::getNextSourceFromPHI( for (unsigned i = 1, e = Def->getNumOperands(); i < e; i += 2) { auto &MO = Def->getOperand(i); assert(MO.isReg() && "Invalid PHI instruction"); + // We have no code to deal with undef operands. They shouldn't happen in + // normal programs anyway. + if (MO.isUndef()) + return ValueTrackerResult(); Res.addSource(MO.getReg(), MO.getSubReg()); } @@ -2149,9 +2157,14 @@ ValueTrackerResult ValueTracker::getNextSource() { // If we can still move up in the use-def chain, move to the next // definition. if (!TargetRegisterInfo::isPhysicalRegister(Reg) && OneRegSrc) { - Def = MRI.getVRegDef(Reg); - DefIdx = MRI.def_begin(Reg).getOperandNo(); - DefSubReg = Res.getSrcSubReg(0); + MachineRegisterInfo::def_iterator DI = MRI.def_begin(Reg); + if (DI != MRI.def_end()) { + Def = DI->getParent(); + DefIdx = DI.getOperandNo(); + DefSubReg = Res.getSrcSubReg(0); + } else { + Def = nullptr; + } return Res; } } Modified: vendor/llvm/dist-release_60/lib/CodeGen/TargetInstrInfo.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/CodeGen/TargetInstrInfo.cpp Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/lib/CodeGen/TargetInstrInfo.cpp Wed Jun 27 19:14:09 2018 (r335720) @@ -1151,6 +1151,8 @@ bool TargetInstrInfo::getRegSequenceInputs( for (unsigned OpIdx = 1, EndOpIdx = MI.getNumOperands(); OpIdx != EndOpIdx; OpIdx += 2) { const MachineOperand &MOReg = MI.getOperand(OpIdx); + if (MOReg.isUndef()) + continue; const MachineOperand &MOSubIdx = MI.getOperand(OpIdx + 1); assert(MOSubIdx.isImm() && "One of the subindex of the reg_sequence is not an immediate"); @@ -1174,6 +1176,8 @@ bool TargetInstrInfo::getExtractSubregInputs( // Def = EXTRACT_SUBREG v0.sub1, sub0. assert(DefIdx == 0 && "EXTRACT_SUBREG only has one def"); const MachineOperand &MOReg = MI.getOperand(1); + if (MOReg.isUndef()) + return false; const MachineOperand &MOSubIdx = MI.getOperand(2); assert(MOSubIdx.isImm() && "The subindex of the extract_subreg is not an immediate"); @@ -1198,6 +1202,8 @@ bool TargetInstrInfo::getInsertSubregInputs( assert(DefIdx == 0 && "INSERT_SUBREG only has one def"); const MachineOperand &MOBaseReg = MI.getOperand(1); const MachineOperand &MOInsertedReg = MI.getOperand(2); + if (MOInsertedReg.isUndef()) + return false; const MachineOperand &MOSubIdx = MI.getOperand(3); assert(MOSubIdx.isImm() && "One of the subindex of the reg_sequence is not an immediate"); Modified: vendor/llvm/dist-release_60/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp Wed Jun 27 19:14:09 2018 (r335720) @@ -1422,7 +1422,8 @@ RuntimeDyldELF::processRelocationRef( SectionEntry &Section = Sections[SectionID]; uint8_t *Target = Section.getAddressWithOffset(Offset); bool RangeOverflow = false; - if (!Value.SymbolName && SymType != SymbolRef::ST_Unknown) { + bool IsExtern = Value.SymbolName || SymType == SymbolRef::ST_Unknown; + if (!IsExtern) { if (AbiVariant != 2) { // In the ELFv1 ABI, a function call may point to the .opd entry, // so the final symbol value is calculated based on the relocation @@ -1432,21 +1433,24 @@ RuntimeDyldELF::processRelocationRef( } else { // In the ELFv2 ABI, a function symbol may provide a local entry // point, which must be used for direct calls. - uint8_t SymOther = Symbol->getOther(); - Value.Addend += ELF::decodePPC64LocalEntryOffset(SymOther); + if (Value.SectionID == SectionID){ + uint8_t SymOther = Symbol->getOther(); + Value.Addend += ELF::decodePPC64LocalEntryOffset(SymOther); + } } uint8_t *RelocTarget = Sections[Value.SectionID].getAddressWithOffset(Value.Addend); int64_t delta = static_cast(Target - RelocTarget); // If it is within 26-bits branch range, just set the branch target - if (SignExtend64<26>(delta) == delta) { + if (SignExtend64<26>(delta) != delta) { + RangeOverflow = true; + } else if ((AbiVariant != 2) || + (AbiVariant == 2 && Value.SectionID == SectionID)) { RelocationEntry RE(SectionID, Offset, RelType, Value.Addend); addRelocationForSection(RE, Value.SectionID); - } else { - RangeOverflow = true; } } - if (Value.SymbolName || SymType == SymbolRef::ST_Unknown || + if (IsExtern || (AbiVariant == 2 && Value.SectionID != SectionID) || RangeOverflow) { // It is an external symbol (either Value.SymbolName is set, or // SymType is SymbolRef::ST_Unknown) or out of range. @@ -1503,10 +1507,10 @@ RuntimeDyldELF::processRelocationRef( RelType, 0); Section.advanceStubOffset(getMaxStubSize()); } - if (Value.SymbolName || SymType == SymbolRef::ST_Unknown) { + if (IsExtern || (AbiVariant == 2 && Value.SectionID != SectionID)) { // Restore the TOC for external calls if (AbiVariant == 2) - writeInt32BE(Target + 4, 0xE8410018); // ld r2,28(r1) + writeInt32BE(Target + 4, 0xE8410018); // ld r2,24(r1) else writeInt32BE(Target + 4, 0xE8410028); // ld r2,40(r1) } Modified: vendor/llvm/dist-release_60/lib/IR/Core.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/IR/Core.cpp Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/lib/IR/Core.cpp Wed Jun 27 19:14:09 2018 (r335720) @@ -359,11 +359,9 @@ LLVMContextRef LLVMGetTypeContext(LLVMTypeRef Ty) { return wrap(&unwrap(Ty)->getContext()); } -#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) -LLVM_DUMP_METHOD void LLVMDumpType(LLVMTypeRef Ty) { - return unwrap(Ty)->dump(); +void LLVMDumpType(LLVMTypeRef Ty) { + return unwrap(Ty)->print(errs(), /*IsForDebug=*/true); } -#endif char *LLVMPrintTypeToString(LLVMTypeRef Ty) { std::string buf; @@ -658,7 +656,7 @@ void LLVMSetValueName(LLVMValueRef Val, const char *Na unwrap(Val)->setName(Name); } -LLVM_DUMP_METHOD void LLVMDumpValue(LLVMValueRef Val) { +void LLVMDumpValue(LLVMValueRef Val) { unwrap(Val)->print(errs(), /*IsForDebug=*/true); } Modified: vendor/llvm/dist-release_60/lib/MC/MCObjectFileInfo.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/MC/MCObjectFileInfo.cpp Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/lib/MC/MCObjectFileInfo.cpp Wed Jun 27 19:14:09 2018 (r335720) @@ -289,6 +289,8 @@ void MCObjectFileInfo::initELFMCObjectFileInfo(const T case Triple::mips64el: FDECFIEncoding = dwarf::DW_EH_PE_sdata8; break; + case Triple::ppc64: + case Triple::ppc64le: case Triple::x86_64: FDECFIEncoding = dwarf::DW_EH_PE_pcrel | (Large ? dwarf::DW_EH_PE_sdata8 : dwarf::DW_EH_PE_sdata4); Modified: vendor/llvm/dist-release_60/lib/Support/CMakeLists.txt ============================================================================== --- vendor/llvm/dist-release_60/lib/Support/CMakeLists.txt Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/lib/Support/CMakeLists.txt Wed Jun 27 19:14:09 2018 (r335720) @@ -13,8 +13,13 @@ elseif( CMAKE_HOST_UNIX ) if( HAVE_LIBDL ) set(system_libs ${system_libs} ${CMAKE_DL_LIBS}) endif() - if( HAVE_BACKTRACE ) - set(system_libs ${system_libs} ${Backtrace_LIBRARIES}) + if( HAVE_BACKTRACE AND NOT "${Backtrace_LIBRARIES}" STREQUAL "" ) + # On BSDs, CMake returns a fully qualified path to the backtrace library. + # We need to remove the path and the 'lib' prefix, to make it look like a + # regular short library name, suitable for appending to a -l link flag. + get_filename_component(Backtrace_LIBFILE ${Backtrace_LIBRARIES} NAME_WE) + STRING(REGEX REPLACE "^lib" "" Backtrace_LIBFILE ${Backtrace_LIBFILE}) + set(system_libs ${system_libs} ${Backtrace_LIBFILE}) endif() if(LLVM_ENABLE_TERMINFO) if(HAVE_TERMINFO) Modified: vendor/llvm/dist-release_60/lib/Support/Host.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/Support/Host.cpp Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/lib/Support/Host.cpp Wed Jun 27 19:14:09 2018 (r335720) @@ -1009,7 +1009,7 @@ StringRef sys::getHostCPUName() { #include "llvm/Support/X86TargetParser.def" // Now check types. -#define X86_CPU_SUBTYPE(ARCHNAME, ENUM) \ +#define X86_CPU_TYPE(ARCHNAME, ENUM) \ if (Type == X86::ENUM) \ return ARCHNAME; #include "llvm/Support/X86TargetParser.def" Modified: vendor/llvm/dist-release_60/lib/Target/AArch64/AArch64AsmPrinter.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/Target/AArch64/AArch64AsmPrinter.cpp Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/lib/Target/AArch64/AArch64AsmPrinter.cpp Wed Jun 27 19:14:09 2018 (r335720) @@ -299,6 +299,11 @@ void AArch64AsmPrinter::printOperand(const MachineInst printOffset(MO.getOffset(), O); break; } + case MachineOperand::MO_BlockAddress: { + MCSymbol *Sym = GetBlockAddressSymbol(MO.getBlockAddress()); + Sym->print(O, MAI); + break; + } } } Modified: vendor/llvm/dist-release_60/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp Wed Jun 27 19:14:09 2018 (r335720) @@ -46,6 +46,7 @@ #include "llvm/Pass.h" #include "llvm/Support/Casting.h" #include "llvm/Support/Debug.h" +#include "llvm/Support/DebugCounter.h" #include "llvm/Support/raw_ostream.h" #include #include @@ -60,6 +61,8 @@ STATISTIC(NumCollisionsAvoided, "Number of HW prefetch tag collisions avoided"); STATISTIC(NumCollisionsNotAvoided, "Number of HW prefetch tag collisions not avoided due to lack of regsiters"); +DEBUG_COUNTER(FixCounter, "falkor-hwpf", + "Controls which tag collisions are avoided"); namespace { @@ -728,6 +731,21 @@ void FalkorHWPFFix::runOnLoop(MachineLoop &L, MachineF bool Fixed = false; DEBUG(dbgs() << "Attempting to fix tag collision: " << MI); + + if (!DebugCounter::shouldExecute(FixCounter)) { + DEBUG(dbgs() << "Skipping fix due to debug counter:\n " << MI); + continue; + } + + // Add the non-base registers of MI as live so we don't use them as + // scratch registers. + for (unsigned OpI = 0, OpE = MI.getNumOperands(); OpI < OpE; ++OpI) { + if (OpI == static_cast(LdI.BaseRegIdx)) + continue; + MachineOperand &MO = MI.getOperand(OpI); + if (MO.isReg() && MO.readsReg()) + LR.addReg(MO.getReg()); + } for (unsigned ScratchReg : AArch64::GPR64RegClass) { if (!LR.available(ScratchReg) || MRI.isReserved(ScratchReg)) Modified: vendor/llvm/dist-release_60/lib/Target/AArch64/AArch64FrameLowering.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/Target/AArch64/AArch64FrameLowering.cpp Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/lib/Target/AArch64/AArch64FrameLowering.cpp Wed Jun 27 19:14:09 2018 (r335720) @@ -917,6 +917,8 @@ int AArch64FrameLowering::resolveFrameIndexReference(c int FPOffset = MFI.getObjectOffset(FI) + FixedObject + 16; int Offset = MFI.getObjectOffset(FI) + MFI.getStackSize(); bool isFixed = MFI.isFixedObjectIndex(FI); + bool isCSR = !isFixed && MFI.getObjectOffset(FI) >= + -((int)AFI->getCalleeSavedStackSize()); // Use frame pointer to reference fixed objects. Use it for locals if // there are VLAs or a dynamically realigned SP (and thus the SP isn't @@ -930,6 +932,12 @@ int AArch64FrameLowering::resolveFrameIndexReference(c // Argument access should always use the FP. if (isFixed) { UseFP = hasFP(MF); + } else if (isCSR && RegInfo->needsStackRealignment(MF)) { + // References to the CSR area must use FP if we're re-aligning the stack + // since the dynamically-sized alignment padding is between the SP/BP and + // the CSR area. + assert(hasFP(MF) && "Re-aligned stack must have frame pointer"); + UseFP = true; } else if (hasFP(MF) && !RegInfo->hasBasePointer(MF) && !RegInfo->needsStackRealignment(MF)) { // Use SP or FP, whichever gives us the best chance of the offset @@ -947,9 +955,9 @@ int AArch64FrameLowering::resolveFrameIndexReference(c } } - assert((isFixed || !RegInfo->needsStackRealignment(MF) || !UseFP) && + assert(((isFixed || isCSR) || !RegInfo->needsStackRealignment(MF) || !UseFP) && "In the presence of dynamic stack pointer realignment, " - "non-argument objects cannot be accessed through the frame pointer"); + "non-argument/CSR objects cannot be accessed through the frame pointer"); if (UseFP) { FrameReg = RegInfo->getFrameRegister(MF); Modified: vendor/llvm/dist-release_60/lib/Target/AArch64/AArch64ISelLowering.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/Target/AArch64/AArch64ISelLowering.cpp Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/lib/Target/AArch64/AArch64ISelLowering.cpp Wed Jun 27 19:14:09 2018 (r335720) @@ -4930,7 +4930,8 @@ bool AArch64TargetLowering::isOffsetFoldingLegal( bool AArch64TargetLowering::isFPImmLegal(const APFloat &Imm, EVT VT) const { // We can materialize #0.0 as fmov $Rd, XZR for 64-bit and 32-bit cases. // FIXME: We should be able to handle f128 as well with a clever lowering. - if (Imm.isPosZero() && (VT == MVT::f16 || VT == MVT::f64 || VT == MVT::f32)) { + if (Imm.isPosZero() && (VT == MVT::f64 || VT == MVT::f32 || + (VT == MVT::f16 && Subtarget->hasFullFP16()))) { DEBUG(dbgs() << "Legal fp imm: materialize 0 using the zero register\n"); return true; } @@ -5066,7 +5067,7 @@ SDValue AArch64TargetLowering::getRecipEstimate(SDValu // Table of Constraints // TODO: This is the current set of constraints supported by ARM for the -// compiler, not all of them may make sense, e.g. S may be difficult to support. +// compiler, not all of them may make sense. // // r - A general register // w - An FP/SIMD register of some size in the range v0-v31 @@ -5126,6 +5127,8 @@ AArch64TargetLowering::getConstraintType(StringRef Con // currently handle addresses it is the same as 'r'. case 'Q': return C_Memory; + case 'S': // A symbolic address + return C_Other; } } return TargetLowering::getConstraintType(Constraint); @@ -5250,6 +5253,23 @@ void AArch64TargetLowering::LowerAsmOperandForConstrai Result = DAG.getRegister(AArch64::WZR, MVT::i32); break; } + case 'S': { + // An absolute symbolic address or label reference. + if (const GlobalAddressSDNode *GA = dyn_cast(Op)) { + Result = DAG.getTargetGlobalAddress(GA->getGlobal(), SDLoc(Op), + GA->getValueType(0)); + } else if (const BlockAddressSDNode *BA = + dyn_cast(Op)) { + Result = + DAG.getTargetBlockAddress(BA->getBlockAddress(), BA->getValueType(0)); + } else if (const ExternalSymbolSDNode *ES = + dyn_cast(Op)) { + Result = + DAG.getTargetExternalSymbol(ES->getSymbol(), ES->getValueType(0)); + } else + return; + break; + } case 'I': case 'J': @@ -9637,6 +9657,15 @@ static SDValue performPostLD1Combine(SDNode *N, if (LD->getOpcode() != ISD::LOAD) return SDValue(); + // The vector lane must be a constant in the LD1LANE opcode. + SDValue Lane; + if (IsLaneOp) { + Lane = N->getOperand(2); + auto *LaneC = dyn_cast(Lane); + if (!LaneC || LaneC->getZExtValue() >= VT.getVectorNumElements()) + return SDValue(); + } + LoadSDNode *LoadSDN = cast(LD); EVT MemVT = LoadSDN->getMemoryVT(); // Check if memory operand is the same type as the vector element. @@ -9693,7 +9722,7 @@ static SDValue performPostLD1Combine(SDNode *N, Ops.push_back(LD->getOperand(0)); // Chain if (IsLaneOp) { Ops.push_back(Vector); // The vector to be inserted - Ops.push_back(N->getOperand(2)); // The lane to be inserted in the vector + Ops.push_back(Lane); // The lane to be inserted in the vector } Ops.push_back(Addr); Ops.push_back(Inc); Modified: vendor/llvm/dist-release_60/lib/Target/AArch64/AArch64InstrInfo.td ============================================================================== --- vendor/llvm/dist-release_60/lib/Target/AArch64/AArch64InstrInfo.td Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/lib/Target/AArch64/AArch64InstrInfo.td Wed Jun 27 19:14:09 2018 (r335720) @@ -2713,7 +2713,7 @@ defm FMOV : UnscaledConversion<"fmov">; // Add pseudo ops for FMOV 0 so we can mark them as isReMaterializable let isReMaterializable = 1, isCodeGenOnly = 1, isAsCheapAsAMove = 1 in { def FMOVH0 : Pseudo<(outs FPR16:$Rd), (ins), [(set f16:$Rd, (fpimm0))]>, - Sched<[WriteF]>; + Sched<[WriteF]>, Requires<[HasFullFP16]>; def FMOVS0 : Pseudo<(outs FPR32:$Rd), (ins), [(set f32:$Rd, (fpimm0))]>, Sched<[WriteF]>; def FMOVD0 : Pseudo<(outs FPR64:$Rd), (ins), [(set f64:$Rd, (fpimm0))]>, Modified: vendor/llvm/dist-release_60/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp Wed Jun 27 19:14:09 2018 (r335720) @@ -147,6 +147,7 @@ extern "C" void LLVMInitializeAMDGPUTarget() { initializeR600PacketizerPass(*PR); initializeR600ExpandSpecialInstrsPassPass(*PR); initializeR600VectorRegMergerPass(*PR); + initializeGlobalISel(*PR); initializeAMDGPUDAGToDAGISelPass(*PR); initializeSILowerI1CopiesPass(*PR); initializeSIFixSGPRCopiesPass(*PR); Modified: vendor/llvm/dist-release_60/lib/Target/AMDGPU/SIISelLowering.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/Target/AMDGPU/SIISelLowering.cpp Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/lib/Target/AMDGPU/SIISelLowering.cpp Wed Jun 27 19:14:09 2018 (r335720) @@ -358,6 +358,7 @@ SITargetLowering::SITargetLowering(const TargetMachine setOperationAction(ISD::CTTZ_ZERO_UNDEF, MVT::i16, Promote); setOperationAction(ISD::CTLZ, MVT::i16, Promote); setOperationAction(ISD::CTLZ_ZERO_UNDEF, MVT::i16, Promote); + setOperationAction(ISD::CTPOP, MVT::i16, Promote); setOperationAction(ISD::SELECT_CC, MVT::i16, Expand); Modified: vendor/llvm/dist-release_60/lib/Target/AMDGPU/SIInstructions.td ============================================================================== --- vendor/llvm/dist-release_60/lib/Target/AMDGPU/SIInstructions.td Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/lib/Target/AMDGPU/SIInstructions.td Wed Jun 27 19:14:09 2018 (r335720) @@ -726,6 +726,10 @@ def : GCNPat < (i32 (add (i32 (ctpop i32:$popcnt)), i32:$val)), (V_BCNT_U32_B32_e64 $popcnt, $val) >; +def : GCNPat < + (i16 (add (i16 (trunc (ctpop i32:$popcnt))), i16:$val)), + (V_BCNT_U32_B32_e64 $popcnt, $val) +>; /********** ============================================ **********/ /********** Extraction, Insertion, Building and Casting **********/ Modified: vendor/llvm/dist-release_60/lib/Target/ARM/ARMBaseInstrInfo.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/Target/ARM/ARMBaseInstrInfo.cpp Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/lib/Target/ARM/ARMBaseInstrInfo.cpp Wed Jun 27 19:14:09 2018 (r335720) @@ -4864,12 +4864,14 @@ bool ARMBaseInstrInfo::getRegSequenceLikeInputs( // Populate the InputRegs accordingly. // rY const MachineOperand *MOReg = &MI.getOperand(1); - InputRegs.push_back( - RegSubRegPairAndIdx(MOReg->getReg(), MOReg->getSubReg(), ARM::ssub_0)); + if (!MOReg->isUndef()) + InputRegs.push_back(RegSubRegPairAndIdx(MOReg->getReg(), + MOReg->getSubReg(), ARM::ssub_0)); // rZ MOReg = &MI.getOperand(2); - InputRegs.push_back( - RegSubRegPairAndIdx(MOReg->getReg(), MOReg->getSubReg(), ARM::ssub_1)); + if (!MOReg->isUndef()) + InputRegs.push_back(RegSubRegPairAndIdx(MOReg->getReg(), + MOReg->getSubReg(), ARM::ssub_1)); return true; } llvm_unreachable("Target dependent opcode missing"); @@ -4888,6 +4890,8 @@ bool ARMBaseInstrInfo::getExtractSubregLikeInputs( // rX = EXTRACT_SUBREG dZ, ssub_0 // rY = EXTRACT_SUBREG dZ, ssub_1 const MachineOperand &MOReg = MI.getOperand(2); + if (MOReg.isUndef()) + return false; InputReg.Reg = MOReg.getReg(); InputReg.SubReg = MOReg.getSubReg(); InputReg.SubIdx = DefIdx == 0 ? ARM::ssub_0 : ARM::ssub_1; @@ -4907,6 +4911,8 @@ bool ARMBaseInstrInfo::getInsertSubregLikeInputs( // dX = VSETLNi32 dY, rZ, imm const MachineOperand &MOBaseReg = MI.getOperand(1); const MachineOperand &MOInsertedReg = MI.getOperand(2); + if (MOInsertedReg.isUndef()) + return false; const MachineOperand &MOIndex = MI.getOperand(3); BaseReg.Reg = MOBaseReg.getReg(); BaseReg.SubReg = MOBaseReg.getSubReg(); Modified: vendor/llvm/dist-release_60/lib/Target/ARM/ARMComputeBlockSize.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/Target/ARM/ARMComputeBlockSize.cpp Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/lib/Target/ARM/ARMComputeBlockSize.cpp Wed Jun 27 19:14:09 2018 (r335720) @@ -35,6 +35,7 @@ mayOptimizeThumb2Instruction(const MachineInstr *MI) { case ARM::tBcc: // optimizeThumb2JumpTables. case ARM::t2BR_JT: + case ARM::tBR_JTr: return true; } return false; Modified: vendor/llvm/dist-release_60/lib/Target/Mips/AsmParser/MipsAsmParser.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/Target/Mips/AsmParser/MipsAsmParser.cpp Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/lib/Target/Mips/AsmParser/MipsAsmParser.cpp Wed Jun 27 19:14:09 2018 (r335720) @@ -5136,6 +5136,7 @@ unsigned MipsAsmParser::checkTargetMatchPredicate(MCIn // It also applies for registers Rt and Rs of microMIPSr6 jalrc.hb instruction // and registers Rd and Base for microMIPS lwp instruction case Mips::JALR_HB: + case Mips::JALR_HB64: case Mips::JALRC_HB_MMR6: case Mips::JALRC_MMR6: if (Inst.getOperand(0).getReg() == Inst.getOperand(1).getReg()) Modified: vendor/llvm/dist-release_60/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp ============================================================================== --- vendor/llvm/dist-release_60/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp Wed Jun 27 19:14:09 2018 (r335720) @@ -225,6 +225,8 @@ unsigned MipsELFObjectWriter::getRelocType(MCContext & switch (Kind) { case Mips::fixup_Mips_NONE: return ELF::R_MIPS_NONE; + case FK_Data_1: + report_fatal_error("MIPS does not support one byte relocations"); case Mips::fixup_Mips_16: case FK_Data_2: return IsPCRel ? ELF::R_MIPS_PC16 : ELF::R_MIPS_16; Modified: vendor/llvm/dist-release_60/lib/Target/Mips/MicroMips32r6InstrInfo.td ============================================================================== --- vendor/llvm/dist-release_60/lib/Target/Mips/MicroMips32r6InstrInfo.td Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/lib/Target/Mips/MicroMips32r6InstrInfo.td Wed Jun 27 19:14:09 2018 (r335720) @@ -1886,6 +1886,12 @@ let AddedComplexity = 41 in { def TAILCALL_MMR6 : TailCall, ISA_MICROMIPS32R6; +def TAILCALLREG_MMR6 : TailCallReg, ISA_MICROMIPS32R6; + +def PseudoIndirectBranch_MMR6 : PseudoIndirectBranchBase, + ISA_MICROMIPS32R6; + def : MipsPat<(MipsTailCall (iPTR tglobaladdr:$dst)), (TAILCALL_MMR6 tglobaladdr:$dst)>, ISA_MICROMIPS32R6; Modified: vendor/llvm/dist-release_60/lib/Target/Mips/MicroMipsInstrInfo.td ============================================================================== --- vendor/llvm/dist-release_60/lib/Target/Mips/MicroMipsInstrInfo.td Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/lib/Target/Mips/MicroMipsInstrInfo.td Wed Jun 27 19:14:09 2018 (r335720) @@ -1003,6 +1003,12 @@ let DecoderNamespace = "MicroMips", Predicates = [InMi def TAILCALL_MM : TailCall, ISA_MIPS1_NOT_32R6_64R6; +def TAILCALLREG_MM : TailCallReg, + ISA_MICROMIPS32_NOT_MIPS32R6; + +def PseudoIndirectBranch_MM : PseudoIndirectBranchBase, + ISA_MICROMIPS32_NOT_MIPS32R6; + let DecoderNamespace = "MicroMips" in { def RDHWR_MM : MMRel, R6MMR6Rel, ReadHardware, RDHWR_FM_MM, ISA_MICROMIPS32_NOT_MIPS32R6; Modified: vendor/llvm/dist-release_60/lib/Target/Mips/Mips.td ============================================================================== --- vendor/llvm/dist-release_60/lib/Target/Mips/Mips.td Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/lib/Target/Mips/Mips.td Wed Jun 27 19:14:09 2018 (r335720) @@ -193,6 +193,10 @@ def FeatureMT : SubtargetFeature<"mt", "HasMT", "true" def FeatureLongCalls : SubtargetFeature<"long-calls", "UseLongCalls", "true", "Disable use of the jal instruction">; +def FeatureUseIndirectJumpsHazard : SubtargetFeature<"use-indirect-jump-hazard", + "UseIndirectJumpsHazard", + "true", "Use indirect jump" + " guards to prevent certain speculation based attacks">; //===----------------------------------------------------------------------===// // Mips processors supported. //===----------------------------------------------------------------------===// Modified: vendor/llvm/dist-release_60/lib/Target/Mips/Mips32r6InstrInfo.td ============================================================================== --- vendor/llvm/dist-release_60/lib/Target/Mips/Mips32r6InstrInfo.td Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/lib/Target/Mips/Mips32r6InstrInfo.td Wed Jun 27 19:14:09 2018 (r335720) @@ -1036,3 +1036,42 @@ def : MipsPat<(select i32:$cond, immz, i32:$f), (SELEQZ i32:$f, i32:$cond)>, ISA_MIPS32R6; } + +// Pseudo instructions +let isCall = 1, isTerminator = 1, isReturn = 1, isBarrier = 1, hasDelaySlot = 1, + hasExtraSrcRegAllocReq = 1, isCTI = 1, Defs = [AT] in { + class TailCallRegR6 : + PseudoSE<(outs), (ins RO:$rs), [(MipsTailCall RO:$rs)], II_JR>, + PseudoInstExpansion<(JumpInst RT:$rt, RO:$rs)>; +} + +class PseudoIndirectBranchBaseR6 : + MipsPseudo<(outs), (ins RO:$rs), [(brind RO:$rs)], + II_IndirectBranchPseudo>, + PseudoInstExpansion<(JumpInst RT:$rt, RO:$rs)> { + let isTerminator=1; + let isBarrier=1; + let hasDelaySlot = 1; + let isBranch = 1; + let isIndirectBranch = 1; + bit isCTI = 1; +} + + +let AdditionalPredicates = [NotInMips16Mode, NotInMicroMips, + NoIndirectJumpGuards] in { + def TAILCALLR6REG : TailCallRegR6, ISA_MIPS32R6; + def PseudoIndirectBranchR6 : PseudoIndirectBranchBaseR6, + ISA_MIPS32R6; +} + +let AdditionalPredicates = [NotInMips16Mode, NotInMicroMips, + UseIndirectJumpsHazard] in { + def TAILCALLHBR6REG : TailCallReg, ISA_MIPS32R6; + def PseudoIndrectHazardBranchR6 : PseudoIndirectBranchBase, + ISA_MIPS32R6; +} + Modified: vendor/llvm/dist-release_60/lib/Target/Mips/Mips64InstrInfo.td ============================================================================== --- vendor/llvm/dist-release_60/lib/Target/Mips/Mips64InstrInfo.td Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/lib/Target/Mips/Mips64InstrInfo.td Wed Jun 27 19:14:09 2018 (r335720) @@ -240,13 +240,32 @@ let isCodeGenOnly = 1 in { def BGTZ64 : CBranchZero<"bgtz", brtarget, setgt, GPR64Opnd>, BGEZ_FM<7, 0>; def BLEZ64 : CBranchZero<"blez", brtarget, setle, GPR64Opnd>, BGEZ_FM<6, 0>; def BLTZ64 : CBranchZero<"bltz", brtarget, setlt, GPR64Opnd>, BGEZ_FM<1, 0>; - def JALR64Pseudo : JumpLinkRegPseudo; + let AdditionalPredicates = [NoIndirectJumpGuards] in + def JALR64Pseudo : JumpLinkRegPseudo; } +let AdditionalPredicates = [NotInMicroMips], + DecoderNamespace = "Mips64" in { + def JR_HB64 : JR_HB_DESC, JR_HB_ENC, ISA_MIPS32_NOT_32R6_64R6; + def JALR_HB64 : JALR_HB_DESC, JALR_HB_ENC, ISA_MIPS32R2; +} +def PseudoReturn64 : PseudoReturnBase; -def TAILCALLREG64 : TailCallReg; +let AdditionalPredicates = [NotInMips16Mode, NotInMicroMips, + NoIndirectJumpGuards] in { + def TAILCALLREG64 : TailCallReg, ISA_MIPS3_NOT_32R6_64R6, + PTR_64; + def PseudoIndirectBranch64 : PseudoIndirectBranchBase, + ISA_MIPS3_NOT_32R6_64R6; +} -def PseudoReturn64 : PseudoReturnBase; -def PseudoIndirectBranch64 : PseudoIndirectBranchBase; +let AdditionalPredicates = [NotInMips16Mode, NotInMicroMips, + UseIndirectJumpsHazard] in { + def TAILCALLREGHB64 : TailCallReg, + ISA_MIPS32R2_NOT_32R6_64R6, PTR_64; + def PseudoIndirectHazardBranch64 : PseudoIndirectBranchBase, + ISA_MIPS32R2_NOT_32R6_64R6; +} /// Multiply and Divide Instructions. let AdditionalPredicates = [NotInMicroMips] in { @@ -536,6 +555,10 @@ def DMTC2 : MTC3OP<"dmtc2", COP2Opnd, GPR64Opnd, II_DM ISA_MIPS3; } + +let AdditionalPredicates = [UseIndirectJumpsHazard] in + def JALRHB64Pseudo : JumpLinkRegPseudo; + //===----------------------------------------------------------------------===// // Arbitrary patterns that map to one or more instructions //===----------------------------------------------------------------------===// @@ -843,7 +866,8 @@ let AdditionalPredicates = [NotInMicroMips] in { def : MipsInstAlias<"dext $rt, $rs, $pos, $size", (DEXTU GPR64Opnd:$rt, GPR64Opnd:$rs, uimm5_plus32:$pos, uimm5_plus1:$size), 0>, ISA_MIPS64R2; - + def : MipsInstAlias<"jalr.hb $rs", (JALR_HB64 RA_64, GPR64Opnd:$rs), 1>, + ISA_MIPS64; // Two operand (implicit 0 selector) versions: def : MipsInstAlias<"dmtc0 $rt, $rd", (DMTC0 COP0Opnd:$rd, GPR64Opnd:$rt, 0), 0>; Modified: vendor/llvm/dist-release_60/lib/Target/Mips/Mips64r6InstrInfo.td ============================================================================== --- vendor/llvm/dist-release_60/lib/Target/Mips/Mips64r6InstrInfo.td Wed Jun 27 19:10:32 2018 (r335719) +++ vendor/llvm/dist-release_60/lib/Target/Mips/Mips64r6InstrInfo.td Wed Jun 27 19:14:09 2018 (r335720) @@ -104,6 +104,16 @@ class JIC64_DESC : JMP_IDX_COMPACT_DESC_BASE<"jic", jm class LL64_R6_DESC : LL_R6_DESC_BASE<"ll", GPR32Opnd, mem_simm9, II_LL>; class SC64_R6_DESC : SC_R6_DESC_BASE<"sc", GPR32Opnd, II_SC>; + +class JR_HB64_R6_DESC : JR_HB_DESC_BASE<"jr.hb", GPR64Opnd> { + bit isBranch = 1; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Jun 27 19:14:22 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 380941002EF7; Wed, 27 Jun 2018 19:14:22 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BC1F98D9CE; Wed, 27 Jun 2018 19:14:21 +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 84250272FA; Wed, 27 Jun 2018 19:14:21 +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 w5RJEL7E042870; Wed, 27 Jun 2018 19:14:21 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RJELpe042869; Wed, 27 Jun 2018 19:14:21 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201806271914.w5RJELpe042869@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 27 Jun 2018 19:14:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r335721 - vendor/llvm/llvm-release_601-r335540 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/llvm/llvm-release_601-r335540 X-SVN-Commit-Revision: 335721 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 19:14:22 -0000 Author: dim Date: Wed Jun 27 19:14:21 2018 New Revision: 335721 URL: https://svnweb.freebsd.org/changeset/base/335721 Log: Tag llvm 6.0.1 release r335540. Added: vendor/llvm/llvm-release_601-r335540/ - copied from r335720, vendor/llvm/dist-release_60/ From owner-svn-src-all@freebsd.org Wed Jun 27 19:14:38 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 201CA1002F73; Wed, 27 Jun 2018 19:14:38 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C35278DBA3; Wed, 27 Jun 2018 19:14:37 +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 8D2C7272FB; Wed, 27 Jun 2018 19:14:37 +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 w5RJEbf3042948; Wed, 27 Jun 2018 19:14:37 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RJEWPJ042921; Wed, 27 Jun 2018 19:14:32 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201806271914.w5RJEWPJ042921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 27 Jun 2018 19:14:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r335722 - in vendor/clang/dist-release_60: docs include/clang/Basic include/clang/Driver lib/AST lib/Basic lib/Basic/Targets lib/CodeGen lib/Driver lib/Driver/ToolChains lib/Driver/Tool... X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/clang/dist-release_60: docs include/clang/Basic include/clang/Driver lib/AST lib/Basic lib/Basic/Targets lib/CodeGen lib/Driver lib/Driver/ToolChains lib/Driver/ToolChains/Arch lib/Frontend ... X-SVN-Commit-Revision: 335722 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 19:14:38 -0000 Author: dim Date: Wed Jun 27 19:14:32 2018 New Revision: 335722 URL: https://svnweb.freebsd.org/changeset/base/335722 Log: Vendor import of clang 6.0.1 release r335540: https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_601/final@335540 Added: vendor/clang/dist-release_60/test/CodeGen/ms_struct-long-double.c (contents, props changed) vendor/clang/dist-release_60/test/Driver/Inputs/empty.cfg vendor/clang/dist-release_60/test/Driver/config-file4.c (contents, props changed) vendor/clang/dist-release_60/test/Driver/mips-indirect-branch.c (contents, props changed) vendor/clang/dist-release_60/test/Index/Inputs/reparse-issue.h (contents, props changed) vendor/clang/dist-release_60/test/Index/Inputs/reparse-issue.h-0 vendor/clang/dist-release_60/test/Index/Inputs/reparse-issue.h-1 vendor/clang/dist-release_60/test/Index/reparsed-live-issue.cpp (contents, props changed) Modified: vendor/clang/dist-release_60/docs/UsersManual.rst vendor/clang/dist-release_60/include/clang/Basic/DiagnosticDriverKinds.td vendor/clang/dist-release_60/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist-release_60/include/clang/Driver/CLCompatOptions.td vendor/clang/dist-release_60/include/clang/Driver/Options.td vendor/clang/dist-release_60/lib/AST/ExprConstant.cpp vendor/clang/dist-release_60/lib/AST/RecordLayoutBuilder.cpp vendor/clang/dist-release_60/lib/Basic/Targets/AArch64.cpp vendor/clang/dist-release_60/lib/Basic/Targets/Mips.h vendor/clang/dist-release_60/lib/Basic/Targets/X86.cpp vendor/clang/dist-release_60/lib/Basic/Targets/X86.h vendor/clang/dist-release_60/lib/Basic/Version.cpp vendor/clang/dist-release_60/lib/CodeGen/TargetInfo.cpp vendor/clang/dist-release_60/lib/Driver/Driver.cpp vendor/clang/dist-release_60/lib/Driver/ToolChains/Arch/Mips.cpp vendor/clang/dist-release_60/lib/Driver/ToolChains/Arch/Mips.h vendor/clang/dist-release_60/lib/Driver/ToolChains/Clang.cpp vendor/clang/dist-release_60/lib/Driver/ToolChains/CrossWindows.cpp vendor/clang/dist-release_60/lib/Driver/ToolChains/MinGW.cpp vendor/clang/dist-release_60/lib/Frontend/ASTUnit.cpp vendor/clang/dist-release_60/lib/Frontend/CompilerInvocation.cpp vendor/clang/dist-release_60/lib/Headers/avx512vlbitalgintrin.h vendor/clang/dist-release_60/lib/Headers/avx512vlvbmi2intrin.h vendor/clang/dist-release_60/lib/Headers/avx512vlvnniintrin.h vendor/clang/dist-release_60/lib/Sema/SemaDecl.cpp vendor/clang/dist-release_60/test/CodeGen/aarch64-inline-asm.c vendor/clang/dist-release_60/test/CodeGen/attr-target-x86.c vendor/clang/dist-release_60/test/CodeGen/avx512vlbitalg-builtins.c vendor/clang/dist-release_60/test/CodeGen/avx512vlvbmi2-builtins.c vendor/clang/dist-release_60/test/CodeGen/avx512vlvnni-builtins.c vendor/clang/dist-release_60/test/CodeGen/decl.c vendor/clang/dist-release_60/test/CodeGen/function-attributes.c vendor/clang/dist-release_60/test/CodeGen/mingw-long-double.c vendor/clang/dist-release_60/test/CodeGenCXX/const-init-cxx11.cpp vendor/clang/dist-release_60/test/CodeGenCXX/cxx0x-initializer-references.cpp vendor/clang/dist-release_60/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp vendor/clang/dist-release_60/test/CodeGenObjCXX/arc-cxx11-init-list.mm vendor/clang/dist-release_60/test/Driver/clang_f_opts.c vendor/clang/dist-release_60/test/Driver/mingw-libgcc.c vendor/clang/dist-release_60/test/Driver/mips-features.c vendor/clang/dist-release_60/test/Driver/windows-cross.c vendor/clang/dist-release_60/test/SemaCXX/constant-expression-cxx11.cpp vendor/clang/dist-release_60/test/SemaCXX/warn-missing-variable-declarations.cpp vendor/clang/dist-release_60/tools/driver/driver.cpp Modified: vendor/clang/dist-release_60/docs/UsersManual.rst ============================================================================== --- vendor/clang/dist-release_60/docs/UsersManual.rst Wed Jun 27 19:14:21 2018 (r335721) +++ vendor/clang/dist-release_60/docs/UsersManual.rst Wed Jun 27 19:14:32 2018 (r335722) @@ -2741,7 +2741,7 @@ Execute ``clang-cl /?`` to see a list of supported opt /Gv Set __vectorcall as a default calling convention /Gw- Don't put each data item in its own section /Gw Put each data item in its own section - /GX- Enable exception handling + /GX- Disable exception handling /GX Enable exception handling /Gy- Don't put each function in its own section /Gy Put each function in its own section Modified: vendor/clang/dist-release_60/include/clang/Basic/DiagnosticDriverKinds.td ============================================================================== --- vendor/clang/dist-release_60/include/clang/Basic/DiagnosticDriverKinds.td Wed Jun 27 19:14:21 2018 (r335721) +++ vendor/clang/dist-release_60/include/clang/Basic/DiagnosticDriverKinds.td Wed Jun 27 19:14:32 2018 (r335722) @@ -326,6 +326,10 @@ def warn_drv_unsupported_abicalls : Warning< "ignoring '-mabicalls' option as it cannot be used with " "non position-independent code and the N64 ABI">, InGroup; +def err_drv_unsupported_indirect_jump_opt : Error< + "'-mindirect-jump=%0' is unsupported with the '%1' architecture">; +def err_drv_unknown_indirect_jump_opt : Error< + "unknown '-mindirect-jump=' option '%0'">; def warn_drv_unable_to_find_directory_expected : Warning< "unable to find %0 directory, expected to be in '%1'">, Modified: vendor/clang/dist-release_60/include/clang/Basic/DiagnosticSemaKinds.td ============================================================================== --- vendor/clang/dist-release_60/include/clang/Basic/DiagnosticSemaKinds.td Wed Jun 27 19:14:21 2018 (r335721) +++ vendor/clang/dist-release_60/include/clang/Basic/DiagnosticSemaKinds.td Wed Jun 27 19:14:32 2018 (r335722) @@ -759,6 +759,10 @@ def warn_cxx_ms_struct : Warning<"ms_struct may not produce Microsoft-compatible layouts for classes " "with base classes or virtual functions">, DefaultError, InGroup; +def warn_npot_ms_struct : + Warning<"ms_struct may not produce Microsoft-compatible layouts with fundamental " + "data types with sizes that aren't a power of two">, + DefaultError, InGroup; def err_section_conflict : Error<"%0 causes a section type conflict with %1">; def err_no_base_classes : Error<"invalid use of '__super', %0 has no base classes">; def err_invalid_super_scope : Error<"invalid use of '__super', " Modified: vendor/clang/dist-release_60/include/clang/Driver/CLCompatOptions.td ============================================================================== --- vendor/clang/dist-release_60/include/clang/Driver/CLCompatOptions.td Wed Jun 27 19:14:21 2018 (r335721) +++ vendor/clang/dist-release_60/include/clang/Driver/CLCompatOptions.td Wed Jun 27 19:14:32 2018 (r335722) @@ -238,7 +238,7 @@ def _SLASH_Fo : CLCompileJoined<"Fo">, def _SLASH_GX : CLFlag<"GX">, HelpText<"Enable exception handling">; def _SLASH_GX_ : CLFlag<"GX-">, - HelpText<"Enable exception handling">; + HelpText<"Disable exception handling">; def _SLASH_imsvc : CLJoinedOrSeparate<"imsvc">, HelpText<"Add directory to system include search path, as if part of %INCLUDE%">, MetaVarName<"">; Modified: vendor/clang/dist-release_60/include/clang/Driver/Options.td ============================================================================== --- vendor/clang/dist-release_60/include/clang/Driver/Options.td Wed Jun 27 19:14:21 2018 (r335721) +++ vendor/clang/dist-release_60/include/clang/Driver/Options.td Wed Jun 27 19:14:32 2018 (r335722) @@ -1100,7 +1100,8 @@ def fthinlto_index_EQ : Joined<["-"], "fthinlto-index= HelpText<"Perform ThinLTO importing using provided function summary index">; def fmacro_backtrace_limit_EQ : Joined<["-"], "fmacro-backtrace-limit=">, Group, Flags<[DriverOption, CoreOption]>; -def fmerge_all_constants : Flag<["-"], "fmerge-all-constants">, Group; +def fmerge_all_constants : Flag<["-"], "fmerge-all-constants">, Group, + Flags<[CC1Option]>, HelpText<"Allow merging of constants">; def fmessage_length_EQ : Joined<["-"], "fmessage-length=">, Group; def fms_extensions : Flag<["-"], "fms-extensions">, Group, Flags<[CC1Option, CoreOption]>, HelpText<"Accept some non-standard constructs supported by the Microsoft compiler">; @@ -1249,7 +1250,7 @@ def fveclib : Joined<["-"], "fveclib=">, Group, Group, HelpText<"Disallow implicit conversions between vectors with a different number of elements or different element types">, Flags<[CC1Option]>; def fno_merge_all_constants : Flag<["-"], "fno-merge-all-constants">, Group, - Flags<[CC1Option]>, HelpText<"Disallow merging of constants">; + HelpText<"Disallow merging of constants">; def fno_modules : Flag <["-"], "fno-modules">, Group, Flags<[DriverOption]>; def fno_implicit_module_maps : Flag <["-"], "fno-implicit-module-maps">, Group, @@ -1992,6 +1993,9 @@ def mbranch_likely : Flag<["-"], "mbranch-likely">, Gr IgnoredGCCCompat; def mno_branch_likely : Flag<["-"], "mno-branch-likely">, Group, IgnoredGCCCompat; +def mindirect_jump_EQ : Joined<["-"], "mindirect-jump=">, + Group, + HelpText<"Change indirect jump instructions to inhibit speculation">; def mdsp : Flag<["-"], "mdsp">, Group; def mno_dsp : Flag<["-"], "mno-dsp">, Group; def mdspr2 : Flag<["-"], "mdspr2">, Group; @@ -2559,6 +2563,8 @@ def mrtm : Flag<["-"], "mrtm">, Group, Group; def mrdseed : Flag<["-"], "mrdseed">, Group; def mno_rdseed : Flag<["-"], "mno-rdseed">, Group; +def msahf : Flag<["-"], "msahf">, Group; +def mno_sahf : Flag<["-"], "mno-sahf">, Group; def msgx : Flag<["-"], "msgx">, Group; def mno_sgx : Flag<["-"], "mno-sgx">, Group; def msha : Flag<["-"], "msha">, Group; Modified: vendor/clang/dist-release_60/lib/AST/ExprConstant.cpp ============================================================================== --- vendor/clang/dist-release_60/lib/AST/ExprConstant.cpp Wed Jun 27 19:14:21 2018 (r335721) +++ vendor/clang/dist-release_60/lib/AST/ExprConstant.cpp Wed Jun 27 19:14:32 2018 (r335722) @@ -61,14 +61,22 @@ namespace { static QualType getType(APValue::LValueBase B) { if (!B) return QualType(); - if (const ValueDecl *D = B.dyn_cast()) + if (const ValueDecl *D = B.dyn_cast()) { // FIXME: It's unclear where we're supposed to take the type from, and - // this actually matters for arrays of unknown bound. Using the type of - // the most recent declaration isn't clearly correct in general. Eg: + // this actually matters for arrays of unknown bound. Eg: // // extern int arr[]; void f() { extern int arr[3]; }; // constexpr int *p = &arr[1]; // valid? - return cast(D->getMostRecentDecl())->getType(); + // + // For now, we take the array bound from the most recent declaration. + for (auto *Redecl = cast(D->getMostRecentDecl()); Redecl; + Redecl = cast_or_null(Redecl->getPreviousDecl())) { + QualType T = Redecl->getType(); + if (!T->isIncompleteArrayType()) + return T; + } + return D->getType(); + } const Expr *Base = B.get(); @@ -8535,9 +8543,6 @@ bool IntExprEvaluator::VisitBinaryOperator(const Binar (LHSValue.Base && isZeroSized(RHSValue))) return Error(E); // Pointers with different bases cannot represent the same object. - // (Note that clang defaults to -fmerge-all-constants, which can - // lead to inconsistent results for comparisons involving the address - // of a constant; this generally doesn't matter in practice.) return Success(E->getOpcode() == BO_NE, E); } Modified: vendor/clang/dist-release_60/lib/AST/RecordLayoutBuilder.cpp ============================================================================== --- vendor/clang/dist-release_60/lib/AST/RecordLayoutBuilder.cpp Wed Jun 27 19:14:21 2018 (r335721) +++ vendor/clang/dist-release_60/lib/AST/RecordLayoutBuilder.cpp Wed Jun 27 19:14:32 2018 (r335722) @@ -1751,7 +1751,34 @@ void ItaniumRecordLayoutBuilder::LayoutField(const Fie QualType T = Context.getBaseElementType(D->getType()); if (const BuiltinType *BTy = T->getAs()) { CharUnits TypeSize = Context.getTypeSizeInChars(BTy); - if (TypeSize > FieldAlign) + + if (!llvm::isPowerOf2_64(TypeSize.getQuantity())) { + assert( + !Context.getTargetInfo().getTriple().isWindowsMSVCEnvironment() && + "Non PowerOf2 size in MSVC mode"); + // Base types with sizes that aren't a power of two don't work + // with the layout rules for MS structs. This isn't an issue in + // MSVC itself since there are no such base data types there. + // On e.g. x86_32 mingw and linux, long double is 12 bytes though. + // Any structs involving that data type obviously can't be ABI + // compatible with MSVC regardless of how it is laid out. + + // Since ms_struct can be mass enabled (via a pragma or via the + // -mms-bitfields command line parameter), this can trigger for + // structs that don't actually need MSVC compatibility, so we + // need to be able to sidestep the ms_struct layout for these types. + + // Since the combination of -mms-bitfields together with structs + // like max_align_t (which contains a long double) for mingw is + // quite comon (and GCC handles it silently), just handle it + // silently there. For other targets that have ms_struct enabled + // (most probably via a pragma or attribute), trigger a diagnostic + // that defaults to an error. + if (!Context.getTargetInfo().getTriple().isWindowsGNUEnvironment()) + Diag(D->getLocation(), diag::warn_npot_ms_struct); + } + if (TypeSize > FieldAlign && + llvm::isPowerOf2_64(TypeSize.getQuantity())) FieldAlign = TypeSize; } } Modified: vendor/clang/dist-release_60/lib/Basic/Targets/AArch64.cpp ============================================================================== --- vendor/clang/dist-release_60/lib/Basic/Targets/AArch64.cpp Wed Jun 27 19:14:21 2018 (r335721) +++ vendor/clang/dist-release_60/lib/Basic/Targets/AArch64.cpp Wed Jun 27 19:14:32 2018 (r335722) @@ -299,7 +299,40 @@ ArrayRef AArch64TargetInfo::getGCCRegNam } const TargetInfo::GCCRegAlias AArch64TargetInfo::GCCRegAliases[] = { - {{"w31"}, "wsp"}, {{"x29"}, "fp"}, {{"x30"}, "lr"}, {{"x31"}, "sp"}, + {{"w31"}, "wsp"}, + {{"x31"}, "sp"}, + // GCC rN registers are aliases of xN registers. + {{"r0"}, "x0"}, + {{"r1"}, "x1"}, + {{"r2"}, "x2"}, + {{"r3"}, "x3"}, + {{"r4"}, "x4"}, + {{"r5"}, "x5"}, + {{"r6"}, "x6"}, + {{"r7"}, "x7"}, + {{"r8"}, "x8"}, + {{"r9"}, "x9"}, + {{"r10"}, "x10"}, + {{"r11"}, "x11"}, + {{"r12"}, "x12"}, + {{"r13"}, "x13"}, + {{"r14"}, "x14"}, + {{"r15"}, "x15"}, + {{"r16"}, "x16"}, + {{"r17"}, "x17"}, + {{"r18"}, "x18"}, + {{"r19"}, "x19"}, + {{"r20"}, "x20"}, + {{"r21"}, "x21"}, + {{"r22"}, "x22"}, + {{"r23"}, "x23"}, + {{"r24"}, "x24"}, + {{"r25"}, "x25"}, + {{"r26"}, "x26"}, + {{"r27"}, "x27"}, + {{"r28"}, "x28"}, + {{"r29", "x29"}, "fp"}, + {{"r30", "x30"}, "lr"}, // The S/D/Q and W/X registers overlap, but aren't really aliases; we // don't want to substitute one of these for a different-sized one. }; Modified: vendor/clang/dist-release_60/lib/Basic/Targets/Mips.h ============================================================================== --- vendor/clang/dist-release_60/lib/Basic/Targets/Mips.h Wed Jun 27 19:14:21 2018 (r335721) +++ vendor/clang/dist-release_60/lib/Basic/Targets/Mips.h Wed Jun 27 19:14:32 2018 (r335722) @@ -54,6 +54,7 @@ class LLVM_LIBRARY_VISIBILITY MipsTargetInfo : public enum DspRevEnum { NoDSP, DSP1, DSP2 } DspRev; bool HasMSA; bool DisableMadd4; + bool UseIndirectJumpHazard; protected: bool HasFP64; @@ -64,7 +65,8 @@ class LLVM_LIBRARY_VISIBILITY MipsTargetInfo : public : TargetInfo(Triple), IsMips16(false), IsMicromips(false), IsNan2008(false), IsAbs2008(false), IsSingleFloat(false), IsNoABICalls(false), CanUseBSDABICalls(false), FloatABI(HardFloat), - DspRev(NoDSP), HasMSA(false), DisableMadd4(false), HasFP64(false) { + DspRev(NoDSP), HasMSA(false), DisableMadd4(false), + UseIndirectJumpHazard(false), HasFP64(false) { TheCXXABI.set(TargetCXXABI::GenericMIPS); setABI((getTriple().getArch() == llvm::Triple::mips || @@ -338,6 +340,8 @@ class LLVM_LIBRARY_VISIBILITY MipsTargetInfo : public IsAbs2008 = false; else if (Feature == "+noabicalls") IsNoABICalls = true; + else if (Feature == "+use-indirect-jump-hazard") + UseIndirectJumpHazard = true; } setDataLayout(); Modified: vendor/clang/dist-release_60/lib/Basic/Targets/X86.cpp ============================================================================== --- vendor/clang/dist-release_60/lib/Basic/Targets/X86.cpp Wed Jun 27 19:14:21 2018 (r335721) +++ vendor/clang/dist-release_60/lib/Basic/Targets/X86.cpp Wed Jun 27 19:14:32 2018 (r335722) @@ -198,6 +198,7 @@ bool X86TargetInfo::initFeatureMap( LLVM_FALLTHROUGH; case CK_Core2: setFeatureEnabledImpl(Features, "ssse3", true); + setFeatureEnabledImpl(Features, "sahf", true); LLVM_FALLTHROUGH; case CK_Yonah: case CK_Prescott: @@ -239,6 +240,7 @@ bool X86TargetInfo::initFeatureMap( setFeatureEnabledImpl(Features, "ssse3", true); setFeatureEnabledImpl(Features, "fxsr", true); setFeatureEnabledImpl(Features, "cx16", true); + setFeatureEnabledImpl(Features, "sahf", true); break; case CK_KNM: @@ -269,6 +271,7 @@ bool X86TargetInfo::initFeatureMap( setFeatureEnabledImpl(Features, "xsaveopt", true); setFeatureEnabledImpl(Features, "xsave", true); setFeatureEnabledImpl(Features, "movbe", true); + setFeatureEnabledImpl(Features, "sahf", true); break; case CK_K6_2: @@ -282,6 +285,7 @@ bool X86TargetInfo::initFeatureMap( setFeatureEnabledImpl(Features, "sse4a", true); setFeatureEnabledImpl(Features, "lzcnt", true); setFeatureEnabledImpl(Features, "popcnt", true); + setFeatureEnabledImpl(Features, "sahf", true); LLVM_FALLTHROUGH; case CK_K8SSE3: setFeatureEnabledImpl(Features, "sse3", true); @@ -315,6 +319,7 @@ bool X86TargetInfo::initFeatureMap( setFeatureEnabledImpl(Features, "prfchw", true); setFeatureEnabledImpl(Features, "cx16", true); setFeatureEnabledImpl(Features, "fxsr", true); + setFeatureEnabledImpl(Features, "sahf", true); break; case CK_ZNVER1: @@ -338,6 +343,7 @@ bool X86TargetInfo::initFeatureMap( setFeatureEnabledImpl(Features, "prfchw", true); setFeatureEnabledImpl(Features, "rdrnd", true); setFeatureEnabledImpl(Features, "rdseed", true); + setFeatureEnabledImpl(Features, "sahf", true); setFeatureEnabledImpl(Features, "sha", true); setFeatureEnabledImpl(Features, "sse4a", true); setFeatureEnabledImpl(Features, "xsave", true); @@ -372,6 +378,7 @@ bool X86TargetInfo::initFeatureMap( setFeatureEnabledImpl(Features, "cx16", true); setFeatureEnabledImpl(Features, "fxsr", true); setFeatureEnabledImpl(Features, "xsave", true); + setFeatureEnabledImpl(Features, "sahf", true); break; } if (!TargetInfo::initFeatureMap(Features, Diags, CPU, FeaturesVec)) @@ -768,6 +775,8 @@ bool X86TargetInfo::handleTargetFeatures(std::vector(Feature) @@ -1240,6 +1249,7 @@ bool X86TargetInfo::isValidFeatureName(StringRef Name) .Case("rdrnd", true) .Case("rdseed", true) .Case("rtm", true) + .Case("sahf", true) .Case("sgx", true) .Case("sha", true) .Case("shstk", true) @@ -1313,6 +1323,7 @@ bool X86TargetInfo::hasFeature(StringRef Feature) cons .Case("retpoline", HasRetpoline) .Case("retpoline-external-thunk", HasRetpolineExternalThunk) .Case("rtm", HasRTM) + .Case("sahf", HasLAHFSAHF) .Case("sgx", HasSGX) .Case("sha", HasSHA) .Case("shstk", HasSHSTK) Modified: vendor/clang/dist-release_60/lib/Basic/Targets/X86.h ============================================================================== --- vendor/clang/dist-release_60/lib/Basic/Targets/X86.h Wed Jun 27 19:14:21 2018 (r335721) +++ vendor/clang/dist-release_60/lib/Basic/Targets/X86.h Wed Jun 27 19:14:32 2018 (r335722) @@ -98,6 +98,7 @@ class LLVM_LIBRARY_VISIBILITY X86TargetInfo : public T bool HasPREFETCHWT1 = false; bool HasRetpoline = false; bool HasRetpolineExternalThunk = false; + bool HasLAHFSAHF = false; /// \brief Enumeration of all of the X86 CPUs supported by Clang. /// Modified: vendor/clang/dist-release_60/lib/Basic/Version.cpp ============================================================================== --- vendor/clang/dist-release_60/lib/Basic/Version.cpp Wed Jun 27 19:14:21 2018 (r335721) +++ vendor/clang/dist-release_60/lib/Basic/Version.cpp Wed Jun 27 19:14:32 2018 (r335722) @@ -36,7 +36,7 @@ std::string getClangRepositoryPath() { // If the SVN_REPOSITORY is empty, try to use the SVN keyword. This helps us // pick up a tag in an SVN export, for example. - StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_600/final/lib/Basic/Version.cpp $"); + StringRef SVNRepository("$URL: https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_601/final/lib/Basic/Version.cpp $"); if (URL.empty()) { URL = SVNRepository.slice(SVNRepository.find(':'), SVNRepository.find("/lib/Basic")); Modified: vendor/clang/dist-release_60/lib/CodeGen/TargetInfo.cpp ============================================================================== --- vendor/clang/dist-release_60/lib/CodeGen/TargetInfo.cpp Wed Jun 27 19:14:21 2018 (r335721) +++ vendor/clang/dist-release_60/lib/CodeGen/TargetInfo.cpp Wed Jun 27 19:14:32 2018 (r335722) @@ -1931,13 +1931,8 @@ void X86_32TargetCodeGenInfo::setTargetAttributes( return; if (const FunctionDecl *FD = dyn_cast_or_null(D)) { if (FD->hasAttr()) { - // Get the LLVM function. llvm::Function *Fn = cast(GV); - - // Now add the 'alignstack' attribute with a value of 16. - llvm::AttrBuilder B; - B.addStackAlignmentAttr(16); - Fn->addAttributes(llvm::AttributeList::FunctionIndex, B); + Fn->addFnAttr("stackrealign"); } if (FD->hasAttr()) { llvm::Function *Fn = cast(GV); @@ -2292,13 +2287,8 @@ class X86_64TargetCodeGenInfo : public TargetCodeGenIn return; if (const FunctionDecl *FD = dyn_cast_or_null(D)) { if (FD->hasAttr()) { - // Get the LLVM function. - auto *Fn = cast(GV); - - // Now add the 'alignstack' attribute with a value of 16. - llvm::AttrBuilder B; - B.addStackAlignmentAttr(16); - Fn->addAttributes(llvm::AttributeList::FunctionIndex, B); + llvm::Function *Fn = cast(GV); + Fn->addFnAttr("stackrealign"); } if (FD->hasAttr()) { llvm::Function *Fn = cast(GV); @@ -2429,13 +2419,8 @@ void WinX86_64TargetCodeGenInfo::setTargetAttributes( return; if (const FunctionDecl *FD = dyn_cast_or_null(D)) { if (FD->hasAttr()) { - // Get the LLVM function. - auto *Fn = cast(GV); - - // Now add the 'alignstack' attribute with a value of 16. - llvm::AttrBuilder B; - B.addStackAlignmentAttr(16); - Fn->addAttributes(llvm::AttributeList::FunctionIndex, B); + llvm::Function *Fn = cast(GV); + Fn->addFnAttr("stackrealign"); } if (FD->hasAttr()) { llvm::Function *Fn = cast(GV); Modified: vendor/clang/dist-release_60/lib/Driver/Driver.cpp ============================================================================== --- vendor/clang/dist-release_60/lib/Driver/Driver.cpp Wed Jun 27 19:14:21 2018 (r335721) +++ vendor/clang/dist-release_60/lib/Driver/Driver.cpp Wed Jun 27 19:14:32 2018 (r335722) @@ -858,11 +858,14 @@ Compilation *Driver::BuildCompilation(ArrayRefgetOption().matches(options::OPT_config)) + continue; + unsigned Index = Args.MakeIndex(Opt->getSpelling()); const Arg *BaseArg = &Opt->getBaseArg(); if (BaseArg == Opt) BaseArg = nullptr; Arg *Copy = new llvm::opt::Arg(Opt->getOption(), Opt->getSpelling(), - Args.size(), BaseArg); + Index, BaseArg); Copy->getValues() = Opt->getValues(); if (Opt->isClaimed()) Copy->claim(); Modified: vendor/clang/dist-release_60/lib/Driver/ToolChains/Arch/Mips.cpp ============================================================================== --- vendor/clang/dist-release_60/lib/Driver/ToolChains/Arch/Mips.cpp Wed Jun 27 19:14:21 2018 (r335721) +++ vendor/clang/dist-release_60/lib/Driver/ToolChains/Arch/Mips.cpp Wed Jun 27 19:14:32 2018 (r335722) @@ -343,6 +343,28 @@ void mips::getMIPSTargetFeatures(const Driver &D, cons AddTargetFeature(Args, Features, options::OPT_mno_madd4, options::OPT_mmadd4, "nomadd4"); AddTargetFeature(Args, Features, options::OPT_mmt, options::OPT_mno_mt, "mt"); + + if (Arg *A = Args.getLastArg(options::OPT_mindirect_jump_EQ)) { + StringRef Val = StringRef(A->getValue()); + if (Val == "hazard") { + Arg *B = + Args.getLastArg(options::OPT_mmicromips, options::OPT_mno_micromips); + Arg *C = Args.getLastArg(options::OPT_mips16, options::OPT_mno_mips16); + + if (B && B->getOption().matches(options::OPT_mmicromips)) + D.Diag(diag::err_drv_unsupported_indirect_jump_opt) + << "hazard" << "micromips"; + else if (C && C->getOption().matches(options::OPT_mips16)) + D.Diag(diag::err_drv_unsupported_indirect_jump_opt) + << "hazard" << "mips16"; + else if (mips::supportsIndirectJumpHazardBarrier(CPUName)) + Features.push_back("+use-indirect-jump-hazard"); + else + D.Diag(diag::err_drv_unsupported_indirect_jump_opt) + << "hazard" << CPUName; + } else + D.Diag(diag::err_drv_unknown_indirect_jump_opt) << Val; + } } mips::IEEE754Standard mips::getIEEE754Standard(StringRef &CPU) { @@ -446,4 +468,21 @@ bool mips::shouldUseFPXX(const ArgList &Args, const ll UseFPXX = false; return UseFPXX; +} + +bool mips::supportsIndirectJumpHazardBarrier(StringRef &CPU) { + // Supporting the hazard barrier method of dealing with indirect + // jumps requires MIPSR2 support. + return llvm::StringSwitch(CPU) + .Case("mips32r2", true) + .Case("mips32r3", true) + .Case("mips32r5", true) + .Case("mips32r6", true) + .Case("mips64r2", true) + .Case("mips64r3", true) + .Case("mips64r5", true) + .Case("mips64r6", true) + .Case("octeon", true) + .Case("p5600", true) + .Default(false); } Modified: vendor/clang/dist-release_60/lib/Driver/ToolChains/Arch/Mips.h ============================================================================== --- vendor/clang/dist-release_60/lib/Driver/ToolChains/Arch/Mips.h Wed Jun 27 19:14:21 2018 (r335721) +++ vendor/clang/dist-release_60/lib/Driver/ToolChains/Arch/Mips.h Wed Jun 27 19:14:32 2018 (r335722) @@ -53,6 +53,7 @@ bool isFPXXDefault(const llvm::Triple &Triple, StringR bool shouldUseFPXX(const llvm::opt::ArgList &Args, const llvm::Triple &Triple, StringRef CPUName, StringRef ABIName, mips::FloatABI FloatABI); +bool supportsIndirectJumpHazardBarrier(StringRef &CPU); } // end namespace mips } // end namespace target Modified: vendor/clang/dist-release_60/lib/Driver/ToolChains/Clang.cpp ============================================================================== --- vendor/clang/dist-release_60/lib/Driver/ToolChains/Clang.cpp Wed Jun 27 19:14:21 2018 (r335721) +++ vendor/clang/dist-release_60/lib/Driver/ToolChains/Clang.cpp Wed Jun 27 19:14:32 2018 (r335722) @@ -3288,9 +3288,9 @@ void Clang::ConstructJob(Compilation &C, const JobActi Args.AddLastArg(CmdArgs, options::OPT_fveclib); - if (!Args.hasFlag(options::OPT_fmerge_all_constants, - options::OPT_fno_merge_all_constants)) - CmdArgs.push_back("-fno-merge-all-constants"); + if (Args.hasFlag(options::OPT_fmerge_all_constants, + options::OPT_fno_merge_all_constants, false)) + CmdArgs.push_back("-fmerge-all-constants"); // LLVM Code Generator Options. Modified: vendor/clang/dist-release_60/lib/Driver/ToolChains/CrossWindows.cpp ============================================================================== --- vendor/clang/dist-release_60/lib/Driver/ToolChains/CrossWindows.cpp Wed Jun 27 19:14:21 2018 (r335721) +++ vendor/clang/dist-release_60/lib/Driver/ToolChains/CrossWindows.cpp Wed Jun 27 19:14:32 2018 (r335722) @@ -127,7 +127,8 @@ void tools::CrossWindows::Linker::ConstructJob( } CmdArgs.push_back("-shared"); - CmdArgs.push_back("-Bdynamic"); + CmdArgs.push_back(Args.hasArg(options::OPT_static) ? "-Bstatic" + : "-Bdynamic"); CmdArgs.push_back("--enable-auto-image-base"); Modified: vendor/clang/dist-release_60/lib/Driver/ToolChains/MinGW.cpp ============================================================================== --- vendor/clang/dist-release_60/lib/Driver/ToolChains/MinGW.cpp Wed Jun 27 19:14:21 2018 (r335721) +++ vendor/clang/dist-release_60/lib/Driver/ToolChains/MinGW.cpp Wed Jun 27 19:14:32 2018 (r335722) @@ -141,22 +141,21 @@ void tools::MinGW::Linker::ConstructJob(Compilation &C CmdArgs.push_back("console"); } + if (Args.hasArg(options::OPT_mdll)) + CmdArgs.push_back("--dll"); + else if (Args.hasArg(options::OPT_shared)) + CmdArgs.push_back("--shared"); if (Args.hasArg(options::OPT_static)) CmdArgs.push_back("-Bstatic"); - else { - if (Args.hasArg(options::OPT_mdll)) - CmdArgs.push_back("--dll"); - else if (Args.hasArg(options::OPT_shared)) - CmdArgs.push_back("--shared"); + else CmdArgs.push_back("-Bdynamic"); - if (Args.hasArg(options::OPT_mdll) || Args.hasArg(options::OPT_shared)) { - CmdArgs.push_back("-e"); - if (TC.getArch() == llvm::Triple::x86) - CmdArgs.push_back("_DllMainCRTStartup@12"); - else - CmdArgs.push_back("DllMainCRTStartup"); - CmdArgs.push_back("--enable-auto-image-base"); - } + if (Args.hasArg(options::OPT_mdll) || Args.hasArg(options::OPT_shared)) { + CmdArgs.push_back("-e"); + if (TC.getArch() == llvm::Triple::x86) + CmdArgs.push_back("_DllMainCRTStartup@12"); + else + CmdArgs.push_back("DllMainCRTStartup"); + CmdArgs.push_back("--enable-auto-image-base"); } CmdArgs.push_back("-o"); Modified: vendor/clang/dist-release_60/lib/Frontend/ASTUnit.cpp ============================================================================== --- vendor/clang/dist-release_60/lib/Frontend/ASTUnit.cpp Wed Jun 27 19:14:21 2018 (r335721) +++ vendor/clang/dist-release_60/lib/Frontend/ASTUnit.cpp Wed Jun 27 19:14:32 2018 (r335722) @@ -1259,6 +1259,7 @@ ASTUnit::getMainBufferWithPrecompiledPreamble( Preamble.reset(); PreambleDiagnostics.clear(); TopLevelDeclsInPreamble.clear(); + PreambleSrcLocCache.clear(); PreambleRebuildCounter = 1; } } Modified: vendor/clang/dist-release_60/lib/Frontend/CompilerInvocation.cpp ============================================================================== --- vendor/clang/dist-release_60/lib/Frontend/CompilerInvocation.cpp Wed Jun 27 19:14:21 2018 (r335721) +++ vendor/clang/dist-release_60/lib/Frontend/CompilerInvocation.cpp Wed Jun 27 19:14:32 2018 (r335722) @@ -552,7 +552,7 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, Arg Args.hasFlag(OPT_ffine_grained_bitfield_accesses, OPT_fno_fine_grained_bitfield_accesses, false); Opts.DwarfDebugFlags = Args.getLastArgValue(OPT_dwarf_debug_flags); - Opts.MergeAllConstants = !Args.hasArg(OPT_fno_merge_all_constants); + Opts.MergeAllConstants = Args.hasArg(OPT_fmerge_all_constants); Opts.NoCommon = Args.hasArg(OPT_fno_common); Opts.NoImplicitFloat = Args.hasArg(OPT_no_implicit_float); Opts.OptimizeSize = getOptimizationLevelSize(Args); Modified: vendor/clang/dist-release_60/lib/Headers/avx512vlbitalgintrin.h ============================================================================== --- vendor/clang/dist-release_60/lib/Headers/avx512vlbitalgintrin.h Wed Jun 27 19:14:21 2018 (r335721) +++ vendor/clang/dist-release_60/lib/Headers/avx512vlbitalgintrin.h Wed Jun 27 19:14:32 2018 (r335722) @@ -54,23 +54,23 @@ _mm256_maskz_popcnt_epi16(__mmask16 __U, __m256i __B) } static __inline__ __m128i __DEFAULT_FN_ATTRS -_mm128_popcnt_epi16(__m128i __A) +_mm_popcnt_epi16(__m128i __A) { return (__m128i) __builtin_ia32_vpopcntw_128((__v8hi) __A); } static __inline__ __m128i __DEFAULT_FN_ATTRS -_mm128_mask_popcnt_epi16(__m128i __A, __mmask8 __U, __m128i __B) +_mm_mask_popcnt_epi16(__m128i __A, __mmask8 __U, __m128i __B) { return (__m128i) __builtin_ia32_selectw_128((__mmask8) __U, - (__v8hi) _mm128_popcnt_epi16(__B), + (__v8hi) _mm_popcnt_epi16(__B), (__v8hi) __A); } static __inline__ __m128i __DEFAULT_FN_ATTRS -_mm128_maskz_popcnt_epi16(__mmask8 __U, __m128i __B) +_mm_maskz_popcnt_epi16(__mmask8 __U, __m128i __B) { - return _mm128_mask_popcnt_epi16((__m128i) _mm_setzero_si128(), + return _mm_mask_popcnt_epi16((__m128i) _mm_setzero_si128(), __U, __B); } @@ -98,29 +98,29 @@ _mm256_maskz_popcnt_epi8(__mmask32 __U, __m256i __B) } static __inline__ __m128i __DEFAULT_FN_ATTRS -_mm128_popcnt_epi8(__m128i __A) +_mm_popcnt_epi8(__m128i __A) { return (__m128i) __builtin_ia32_vpopcntb_128((__v16qi) __A); } static __inline__ __m128i __DEFAULT_FN_ATTRS -_mm128_mask_popcnt_epi8(__m128i __A, __mmask16 __U, __m128i __B) +_mm_mask_popcnt_epi8(__m128i __A, __mmask16 __U, __m128i __B) { return (__m128i) __builtin_ia32_selectb_128((__mmask16) __U, - (__v16qi) _mm128_popcnt_epi8(__B), + (__v16qi) _mm_popcnt_epi8(__B), (__v16qi) __A); } static __inline__ __m128i __DEFAULT_FN_ATTRS -_mm128_maskz_popcnt_epi8(__mmask16 __U, __m128i __B) +_mm_maskz_popcnt_epi8(__mmask16 __U, __m128i __B) { - return _mm128_mask_popcnt_epi8((__m128i) _mm_setzero_si128(), + return _mm_mask_popcnt_epi8((__m128i) _mm_setzero_si128(), __U, __B); } static __inline__ __mmask32 __DEFAULT_FN_ATTRS -_mm256_mask_bitshuffle_epi32_mask(__mmask32 __U, __m256i __A, __m256i __B) +_mm256_mask_bitshuffle_epi64_mask(__mmask32 __U, __m256i __A, __m256i __B) { return (__mmask32) __builtin_ia32_vpshufbitqmb256_mask((__v32qi) __A, (__v32qi) __B, @@ -128,15 +128,15 @@ _mm256_mask_bitshuffle_epi32_mask(__mmask32 __U, __m25 } static __inline__ __mmask32 __DEFAULT_FN_ATTRS -_mm256_bitshuffle_epi32_mask(__m256i __A, __m256i __B) +_mm256_bitshuffle_epi64_mask(__m256i __A, __m256i __B) { - return _mm256_mask_bitshuffle_epi32_mask((__mmask32) -1, + return _mm256_mask_bitshuffle_epi64_mask((__mmask32) -1, __A, __B); } static __inline__ __mmask16 __DEFAULT_FN_ATTRS -_mm128_mask_bitshuffle_epi16_mask(__mmask16 __U, __m128i __A, __m128i __B) +_mm_mask_bitshuffle_epi64_mask(__mmask16 __U, __m128i __A, __m128i __B) { return (__mmask16) __builtin_ia32_vpshufbitqmb128_mask((__v16qi) __A, (__v16qi) __B, @@ -144,9 +144,9 @@ _mm128_mask_bitshuffle_epi16_mask(__mmask16 __U, __m12 } static __inline__ __mmask16 __DEFAULT_FN_ATTRS -_mm128_bitshuffle_epi16_mask(__m128i __A, __m128i __B) +_mm_bitshuffle_epi64_mask(__m128i __A, __m128i __B) { - return _mm128_mask_bitshuffle_epi16_mask((__mmask16) -1, + return _mm_mask_bitshuffle_epi64_mask((__mmask16) -1, __A, __B); } Modified: vendor/clang/dist-release_60/lib/Headers/avx512vlvbmi2intrin.h ============================================================================== --- vendor/clang/dist-release_60/lib/Headers/avx512vlvbmi2intrin.h Wed Jun 27 19:14:21 2018 (r335721) +++ vendor/clang/dist-release_60/lib/Headers/avx512vlvbmi2intrin.h Wed Jun 27 19:14:32 2018 (r335722) @@ -31,13 +31,8 @@ /* Define the default attributes for the functions in this file. */ #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("avx512vl,avx512vbmi2"))) -static __inline __m128i __DEFAULT_FN_ATTRS -_mm128_setzero_hi(void) { - return (__m128i)(__v8hi){ 0, 0, 0, 0, 0, 0, 0, 0 }; -} - static __inline__ __m128i __DEFAULT_FN_ATTRS -_mm128_mask_compress_epi16(__m128i __S, __mmask8 __U, __m128i __D) +_mm_mask_compress_epi16(__m128i __S, __mmask8 __U, __m128i __D) { return (__m128i) __builtin_ia32_compresshi128_mask ((__v8hi) __D, (__v8hi) __S, @@ -45,15 +40,15 @@ _mm128_mask_compress_epi16(__m128i __S, __mmask8 __U, } static __inline__ __m128i __DEFAULT_FN_ATTRS -_mm128_maskz_compress_epi16(__mmask8 __U, __m128i __D) +_mm_maskz_compress_epi16(__mmask8 __U, __m128i __D) { return (__m128i) __builtin_ia32_compresshi128_mask ((__v8hi) __D, - (__v8hi) _mm128_setzero_hi(), + (__v8hi) _mm_setzero_si128(), __U); } static __inline__ __m128i __DEFAULT_FN_ATTRS -_mm128_mask_compress_epi8(__m128i __S, __mmask16 __U, __m128i __D) +_mm_mask_compress_epi8(__m128i __S, __mmask16 __U, __m128i __D) { return (__m128i) __builtin_ia32_compressqi128_mask ((__v16qi) __D, (__v16qi) __S, @@ -61,29 +56,29 @@ _mm128_mask_compress_epi8(__m128i __S, __mmask16 __U, } static __inline__ __m128i __DEFAULT_FN_ATTRS -_mm128_maskz_compress_epi8(__mmask16 __U, __m128i __D) +_mm_maskz_compress_epi8(__mmask16 __U, __m128i __D) { return (__m128i) __builtin_ia32_compressqi128_mask ((__v16qi) __D, - (__v16qi) _mm128_setzero_hi(), + (__v16qi) _mm_setzero_si128(), __U); } static __inline__ void __DEFAULT_FN_ATTRS -_mm128_mask_compressstoreu_epi16(void *__P, __mmask8 __U, __m128i __D) +_mm_mask_compressstoreu_epi16(void *__P, __mmask8 __U, __m128i __D) { __builtin_ia32_compressstorehi128_mask ((__v8hi *) __P, (__v8hi) __D, __U); } static __inline__ void __DEFAULT_FN_ATTRS -_mm128_mask_compressstoreu_epi8(void *__P, __mmask16 __U, __m128i __D) +_mm_mask_compressstoreu_epi8(void *__P, __mmask16 __U, __m128i __D) { __builtin_ia32_compressstoreqi128_mask ((__v16qi *) __P, (__v16qi) __D, __U); } static __inline__ __m128i __DEFAULT_FN_ATTRS -_mm128_mask_expand_epi16(__m128i __S, __mmask8 __U, __m128i __D) +_mm_mask_expand_epi16(__m128i __S, __mmask8 __U, __m128i __D) { return (__m128i) __builtin_ia32_expandhi128_mask ((__v8hi) __D, (__v8hi) __S, @@ -91,15 +86,15 @@ _mm128_mask_expand_epi16(__m128i __S, __mmask8 __U, __ } static __inline__ __m128i __DEFAULT_FN_ATTRS -_mm128_maskz_expand_epi16(__mmask8 __U, __m128i __D) +_mm_maskz_expand_epi16(__mmask8 __U, __m128i __D) { return (__m128i) __builtin_ia32_expandhi128_mask ((__v8hi) __D, - (__v8hi) _mm128_setzero_hi(), + (__v8hi) _mm_setzero_si128(), __U); } static __inline__ __m128i __DEFAULT_FN_ATTRS -_mm128_mask_expand_epi8(__m128i __S, __mmask16 __U, __m128i __D) +_mm_mask_expand_epi8(__m128i __S, __mmask16 __U, __m128i __D) { return (__m128i) __builtin_ia32_expandqi128_mask ((__v16qi) __D, (__v16qi) __S, @@ -107,15 +102,15 @@ _mm128_mask_expand_epi8(__m128i __S, __mmask16 __U, __ } static __inline__ __m128i __DEFAULT_FN_ATTRS -_mm128_maskz_expand_epi8(__mmask16 __U, __m128i __D) +_mm_maskz_expand_epi8(__mmask16 __U, __m128i __D) { return (__m128i) __builtin_ia32_expandqi128_mask ((__v16qi) __D, - (__v16qi) _mm128_setzero_hi(), + (__v16qi) _mm_setzero_si128(), __U); } static __inline__ __m128i __DEFAULT_FN_ATTRS -_mm128_mask_expandloadu_epi16(__m128i __S, __mmask8 __U, void const *__P) +_mm_mask_expandloadu_epi16(__m128i __S, __mmask8 __U, void const *__P) { return (__m128i) __builtin_ia32_expandloadhi128_mask ((const __v8hi *)__P, (__v8hi) __S, @@ -123,15 +118,15 @@ _mm128_mask_expandloadu_epi16(__m128i __S, __mmask8 __ } static __inline__ __m128i __DEFAULT_FN_ATTRS -_mm128_maskz_expandloadu_epi16(__mmask8 __U, void const *__P) +_mm_maskz_expandloadu_epi16(__mmask8 __U, void const *__P) { return (__m128i) __builtin_ia32_expandloadhi128_mask ((const __v8hi *)__P, - (__v8hi) _mm128_setzero_hi(), + (__v8hi) _mm_setzero_si128(), __U); } static __inline__ __m128i __DEFAULT_FN_ATTRS -_mm128_mask_expandloadu_epi8(__m128i __S, __mmask16 __U, void const *__P) +_mm_mask_expandloadu_epi8(__m128i __S, __mmask16 __U, void const *__P) { return (__m128i) __builtin_ia32_expandloadqi128_mask ((const __v16qi *)__P, (__v16qi) __S, @@ -139,19 +134,13 @@ _mm128_mask_expandloadu_epi8(__m128i __S, __mmask16 __ } static __inline__ __m128i __DEFAULT_FN_ATTRS -_mm128_maskz_expandloadu_epi8(__mmask16 __U, void const *__P) +_mm_maskz_expandloadu_epi8(__mmask16 __U, void const *__P) { return (__m128i) __builtin_ia32_expandloadqi128_mask ((const __v16qi *)__P, - (__v16qi) _mm128_setzero_hi(), + (__v16qi) _mm_setzero_si128(), __U); } -static __inline __m256i __DEFAULT_FN_ATTRS -_mm256_setzero_hi(void) { - return (__m256i)(__v16hi){ 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 }; -} - static __inline__ __m256i __DEFAULT_FN_ATTRS _mm256_mask_compress_epi16(__m256i __S, __mmask16 __U, __m256i __D) { @@ -164,7 +153,7 @@ static __inline__ __m256i __DEFAULT_FN_ATTRS _mm256_maskz_compress_epi16(__mmask16 __U, __m256i __D) { return (__m256i) __builtin_ia32_compresshi256_mask ((__v16hi) __D, - (__v16hi) _mm256_setzero_hi(), + (__v16hi) _mm256_setzero_si256(), __U); } @@ -180,7 +169,7 @@ static __inline__ __m256i __DEFAULT_FN_ATTRS _mm256_maskz_compress_epi8(__mmask32 __U, __m256i __D) { return (__m256i) __builtin_ia32_compressqi256_mask ((__v32qi) __D, - (__v32qi) _mm256_setzero_hi(), + (__v32qi) _mm256_setzero_si256(), __U); } @@ -210,7 +199,7 @@ static __inline__ __m256i __DEFAULT_FN_ATTRS _mm256_maskz_expand_epi16(__mmask16 __U, __m256i __D) { return (__m256i) __builtin_ia32_expandhi256_mask ((__v16hi) __D, - (__v16hi) _mm256_setzero_hi(), + (__v16hi) _mm256_setzero_si256(), __U); } @@ -226,7 +215,7 @@ static __inline__ __m256i __DEFAULT_FN_ATTRS _mm256_maskz_expand_epi8(__mmask32 __U, __m256i __D) { return (__m256i) __builtin_ia32_expandqi256_mask ((__v32qi) __D, - (__v32qi) _mm256_setzero_hi(), + (__v32qi) _mm256_setzero_si256(), __U); } @@ -242,7 +231,7 @@ static __inline__ __m256i __DEFAULT_FN_ATTRS _mm256_maskz_expandloadu_epi16(__mmask16 __U, void const *__P) { return (__m256i) __builtin_ia32_expandloadhi256_mask ((const __v16hi *)__P, - (__v16hi) _mm256_setzero_hi(), + (__v16hi) _mm256_setzero_si256(), __U); } @@ -258,7 +247,7 @@ static __inline__ __m256i __DEFAULT_FN_ATTRS _mm256_maskz_expandloadu_epi8(__mmask32 __U, void const *__P) { return (__m256i) __builtin_ia32_expandloadqi256_mask ((const __v32qi *)__P, - (__v32qi) _mm256_setzero_hi(), + (__v32qi) _mm256_setzero_si256(), __U); } @@ -270,23 +259,23 @@ _mm256_maskz_expandloadu_epi8(__mmask32 __U, void cons (__mmask8)(U)); }) #define _mm256_maskz_shldi_epi64(U, A, B, I) \ - _mm256_mask_shldi_epi64(_mm256_setzero_hi(), (U), (A), (B), (I)) + _mm256_mask_shldi_epi64(_mm256_setzero_si256(), (U), (A), (B), (I)) #define _mm256_shldi_epi64(A, B, I) \ _mm256_mask_shldi_epi64(_mm256_undefined_si256(), (__mmask8)(-1), (A), (B), (I)) -#define _mm128_mask_shldi_epi64(S, U, A, B, I) __extension__ ({ \ +#define _mm_mask_shldi_epi64(S, U, A, B, I) __extension__ ({ \ (__m128i)__builtin_ia32_vpshldq128_mask((__v2di)(A), \ (__v2di)(B), \ (int)(I), \ (__v2di)(S), \ (__mmask8)(U)); }) -#define _mm128_maskz_shldi_epi64(U, A, B, I) \ - _mm128_mask_shldi_epi64(_mm128_setzero_hi(), (U), (A), (B), (I)) +#define _mm_maskz_shldi_epi64(U, A, B, I) \ + _mm_mask_shldi_epi64(_mm_setzero_si128(), (U), (A), (B), (I)) -#define _mm128_shldi_epi64(A, B, I) \ - _mm128_mask_shldi_epi64(_mm_undefined_si128(), (__mmask8)(-1), (A), (B), (I)) +#define _mm_shldi_epi64(A, B, I) \ + _mm_mask_shldi_epi64(_mm_undefined_si128(), (__mmask8)(-1), (A), (B), (I)) #define _mm256_mask_shldi_epi32(S, U, A, B, I) __extension__ ({ \ (__m256i)__builtin_ia32_vpshldd256_mask((__v8si)(A), \ @@ -296,23 +285,23 @@ _mm256_maskz_expandloadu_epi8(__mmask32 __U, void cons (__mmask8)(U)); }) #define _mm256_maskz_shldi_epi32(U, A, B, I) \ - _mm256_mask_shldi_epi32(_mm256_setzero_hi(), (U), (A), (B), (I)) + _mm256_mask_shldi_epi32(_mm256_setzero_si256(), (U), (A), (B), (I)) #define _mm256_shldi_epi32(A, B, I) \ _mm256_mask_shldi_epi32(_mm256_undefined_si256(), (__mmask8)(-1), (A), (B), (I)) -#define _mm128_mask_shldi_epi32(S, U, A, B, I) __extension__ ({ \ +#define _mm_mask_shldi_epi32(S, U, A, B, I) __extension__ ({ \ (__m128i)__builtin_ia32_vpshldd128_mask((__v4si)(A), \ (__v4si)(B), \ (int)(I), \ (__v4si)(S), \ (__mmask8)(U)); }) -#define _mm128_maskz_shldi_epi32(U, A, B, I) \ - _mm128_mask_shldi_epi32(_mm128_setzero_hi(), (U), (A), (B), (I)) +#define _mm_maskz_shldi_epi32(U, A, B, I) \ + _mm_mask_shldi_epi32(_mm_setzero_si128(), (U), (A), (B), (I)) -#define _mm128_shldi_epi32(A, B, I) \ - _mm128_mask_shldi_epi32(_mm_undefined_si128(), (__mmask8)(-1), (A), (B), (I)) +#define _mm_shldi_epi32(A, B, I) \ + _mm_mask_shldi_epi32(_mm_undefined_si128(), (__mmask8)(-1), (A), (B), (I)) #define _mm256_mask_shldi_epi16(S, U, A, B, I) __extension__ ({ \ (__m256i)__builtin_ia32_vpshldw256_mask((__v16hi)(A), \ @@ -322,23 +311,23 @@ _mm256_maskz_expandloadu_epi8(__mmask32 __U, void cons (__mmask16)(U)); }) #define _mm256_maskz_shldi_epi16(U, A, B, I) \ - _mm256_mask_shldi_epi16(_mm256_setzero_hi(), (U), (A), (B), (I)) + _mm256_mask_shldi_epi16(_mm256_setzero_si256(), (U), (A), (B), (I)) #define _mm256_shldi_epi16(A, B, I) \ _mm256_mask_shldi_epi16(_mm256_undefined_si256(), (__mmask8)(-1), (A), (B), (I)) -#define _mm128_mask_shldi_epi16(S, U, A, B, I) __extension__ ({ \ +#define _mm_mask_shldi_epi16(S, U, A, B, I) __extension__ ({ \ (__m128i)__builtin_ia32_vpshldw128_mask((__v8hi)(A), \ (__v8hi)(B), \ (int)(I), \ (__v8hi)(S), \ (__mmask8)(U)); }) -#define _mm128_maskz_shldi_epi16(U, A, B, I) \ - _mm128_mask_shldi_epi16(_mm128_setzero_hi(), (U), (A), (B), (I)) +#define _mm_maskz_shldi_epi16(U, A, B, I) \ + _mm_mask_shldi_epi16(_mm_setzero_si128(), (U), (A), (B), (I)) -#define _mm128_shldi_epi16(A, B, I) \ - _mm128_mask_shldi_epi16(_mm_undefined_si128(), (__mmask8)(-1), (A), (B), (I)) +#define _mm_shldi_epi16(A, B, I) \ + _mm_mask_shldi_epi16(_mm_undefined_si128(), (__mmask8)(-1), (A), (B), (I)) #define _mm256_mask_shrdi_epi64(S, U, A, B, I) __extension__ ({ \ (__m256i)__builtin_ia32_vpshrdq256_mask((__v4di)(A), \ @@ -348,23 +337,23 @@ _mm256_maskz_expandloadu_epi8(__mmask32 __U, void cons (__mmask8)(U)); }) #define _mm256_maskz_shrdi_epi64(U, A, B, I) \ - _mm256_mask_shrdi_epi64(_mm256_setzero_hi(), (U), (A), (B), (I)) + _mm256_mask_shrdi_epi64(_mm256_setzero_si256(), (U), (A), (B), (I)) #define _mm256_shrdi_epi64(A, B, I) \ _mm256_mask_shrdi_epi64(_mm256_undefined_si256(), (__mmask8)(-1), (A), (B), (I)) -#define _mm128_mask_shrdi_epi64(S, U, A, B, I) __extension__ ({ \ +#define _mm_mask_shrdi_epi64(S, U, A, B, I) __extension__ ({ \ (__m128i)__builtin_ia32_vpshrdq128_mask((__v2di)(A), \ (__v2di)(B), \ (int)(I), \ (__v2di)(S), \ (__mmask8)(U)); }) -#define _mm128_maskz_shrdi_epi64(U, A, B, I) \ - _mm128_mask_shrdi_epi64(_mm128_setzero_hi(), (U), (A), (B), (I)) +#define _mm_maskz_shrdi_epi64(U, A, B, I) \ + _mm_mask_shrdi_epi64(_mm_setzero_si128(), (U), (A), (B), (I)) -#define _mm128_shrdi_epi64(A, B, I) \ - _mm128_mask_shrdi_epi64(_mm_undefined_si128(), (__mmask8)(-1), (A), (B), (I)) +#define _mm_shrdi_epi64(A, B, I) \ + _mm_mask_shrdi_epi64(_mm_undefined_si128(), (__mmask8)(-1), (A), (B), (I)) #define _mm256_mask_shrdi_epi32(S, U, A, B, I) __extension__ ({ \ (__m256i)__builtin_ia32_vpshrdd256_mask((__v8si)(A), \ @@ -374,23 +363,23 @@ _mm256_maskz_expandloadu_epi8(__mmask32 __U, void cons (__mmask8)(U)); }) #define _mm256_maskz_shrdi_epi32(U, A, B, I) \ - _mm256_mask_shrdi_epi32(_mm256_setzero_hi(), (U), (A), (B), (I)) + _mm256_mask_shrdi_epi32(_mm256_setzero_si256(), (U), (A), (B), (I)) #define _mm256_shrdi_epi32(A, B, I) \ _mm256_mask_shrdi_epi32(_mm256_undefined_si256(), (__mmask8)(-1), (A), (B), (I)) -#define _mm128_mask_shrdi_epi32(S, U, A, B, I) __extension__ ({ \ +#define _mm_mask_shrdi_epi32(S, U, A, B, I) __extension__ ({ \ (__m128i)__builtin_ia32_vpshrdd128_mask((__v4si)(A), \ (__v4si)(B), \ (int)(I), \ (__v4si)(S), \ (__mmask8)(U)); }) -#define _mm128_maskz_shrdi_epi32(U, A, B, I) \ - _mm128_mask_shrdi_epi32(_mm128_setzero_hi(), (U), (A), (B), (I)) +#define _mm_maskz_shrdi_epi32(U, A, B, I) \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Wed Jun 27 19:14:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7795E1002F83; Wed, 27 Jun 2018 19:14:41 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 26F298DBC9; Wed, 27 Jun 2018 19:14:41 +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 E38CD272FC; Wed, 27 Jun 2018 19:14:40 +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 w5RJEe4A042994; Wed, 27 Jun 2018 19:14:40 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RJEeRM042993; Wed, 27 Jun 2018 19:14:40 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201806271914.w5RJEeRM042993@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 27 Jun 2018 19:14:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r335723 - vendor/clang/clang-release_601-r335540 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/clang/clang-release_601-r335540 X-SVN-Commit-Revision: 335723 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 19:14:41 -0000 Author: dim Date: Wed Jun 27 19:14:40 2018 New Revision: 335723 URL: https://svnweb.freebsd.org/changeset/base/335723 Log: Tag clang 6.0.1 release r335540. Added: vendor/clang/clang-release_601-r335540/ - copied from r335722, vendor/clang/dist-release_60/ From owner-svn-src-all@freebsd.org Wed Jun 27 19:14:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 581CB1003004; Wed, 27 Jun 2018 19:14:47 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 929958DCB1; Wed, 27 Jun 2018 19:14:45 +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 2FD0C272FD; Wed, 27 Jun 2018 19:14:45 +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 w5RJEjaR043044; Wed, 27 Jun 2018 19:14:45 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RJEjXR043043; Wed, 27 Jun 2018 19:14:45 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201806271914.w5RJEjXR043043@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 27 Jun 2018 19:14:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r335724 - vendor/compiler-rt/dist-release_60/lib/sanitizer_common X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/compiler-rt/dist-release_60/lib/sanitizer_common X-SVN-Commit-Revision: 335724 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 19:14:47 -0000 Author: dim Date: Wed Jun 27 19:14:44 2018 New Revision: 335724 URL: https://svnweb.freebsd.org/changeset/base/335724 Log: Vendor import of compiler-rt 6.0.1 release r335540: https://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_601/final@335540 Modified: vendor/compiler-rt/dist-release_60/lib/sanitizer_common/sanitizer_platform_limits_posix.cc Modified: vendor/compiler-rt/dist-release_60/lib/sanitizer_common/sanitizer_platform_limits_posix.cc ============================================================================== --- vendor/compiler-rt/dist-release_60/lib/sanitizer_common/sanitizer_platform_limits_posix.cc Wed Jun 27 19:14:40 2018 (r335723) +++ vendor/compiler-rt/dist-release_60/lib/sanitizer_common/sanitizer_platform_limits_posix.cc Wed Jun 27 19:14:44 2018 (r335724) @@ -159,7 +159,6 @@ typedef struct user_fpregs elf_fpregset_t; # include #endif #include -#include #include #include #include @@ -253,7 +252,19 @@ namespace __sanitizer { #endif // SANITIZER_LINUX || SANITIZER_FREEBSD #if SANITIZER_LINUX && !SANITIZER_ANDROID - unsigned struct_ustat_sz = sizeof(struct ustat); + // Use pre-computed size of struct ustat to avoid which + // has been removed from glibc 2.28. +#if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \ + || defined(__powerpc64__) || defined(__arch64__) || defined(__sparcv9) \ + || defined(__x86_64__) +#define SIZEOF_STRUCT_USTAT 32 +#elif defined(__arm__) || defined(__i386__) || defined(__mips__) \ + || defined(__powerpc__) || defined(__s390__) +#define SIZEOF_STRUCT_USTAT 20 +#else +#error Unknown size of struct ustat +#endif + unsigned struct_ustat_sz = SIZEOF_STRUCT_USTAT; unsigned struct_rlimit64_sz = sizeof(struct rlimit64); unsigned struct_statvfs64_sz = sizeof(struct statvfs64); #endif // SANITIZER_LINUX && !SANITIZER_ANDROID From owner-svn-src-all@freebsd.org Wed Jun 27 19:14:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4DE01003050; Wed, 27 Jun 2018 19:14:51 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4671F8DD41; Wed, 27 Jun 2018 19:14: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 8A993272FE; Wed, 27 Jun 2018 19:14: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 w5RJEm2g043090; Wed, 27 Jun 2018 19:14:48 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RJEmYs043089; Wed, 27 Jun 2018 19:14:48 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201806271914.w5RJEmYs043089@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 27 Jun 2018 19:14:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r335725 - vendor/compiler-rt/compiler-rt-release_601-r335540 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/compiler-rt/compiler-rt-release_601-r335540 X-SVN-Commit-Revision: 335725 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 19:14:52 -0000 Author: dim Date: Wed Jun 27 19:14:48 2018 New Revision: 335725 URL: https://svnweb.freebsd.org/changeset/base/335725 Log: Tag compiler-rt 6.0.1 release r335540. Added: vendor/compiler-rt/compiler-rt-release_601-r335540/ - copied from r335724, vendor/compiler-rt/dist-release_60/ From owner-svn-src-all@freebsd.org Wed Jun 27 19:14:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3489D1003085; Wed, 27 Jun 2018 19:14:58 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5876C8DE8F; Wed, 27 Jun 2018 19:14:56 +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 01604272FF; Wed, 27 Jun 2018 19:14:56 +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 w5RJEt6I043145; Wed, 27 Jun 2018 19:14:55 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RJEtSk043140; Wed, 27 Jun 2018 19:14:55 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201806271914.w5RJEtSk043140@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 27 Jun 2018 19:14:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r335726 - in vendor/libc++/dist-release_60: include src/support/runtime test/libcxx/debug/containers test/std/language.support/support.exception/uncaught X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/libc++/dist-release_60: include src/support/runtime test/libcxx/debug/containers test/std/language.support/support.exception/uncaught X-SVN-Commit-Revision: 335726 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 19:14:58 -0000 Author: dim Date: Wed Jun 27 19:14:54 2018 New Revision: 335726 URL: https://svnweb.freebsd.org/changeset/base/335726 Log: Vendor import of libc++ 6.0.1 release r335540: https://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_601/final@335540 Modified: vendor/libc++/dist-release_60/include/list vendor/libc++/dist-release_60/src/support/runtime/exception_libcxxabi.ipp vendor/libc++/dist-release_60/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp vendor/libc++/dist-release_60/test/std/language.support/support.exception/uncaught/uncaught_exceptions.pass.cpp Modified: vendor/libc++/dist-release_60/include/list ============================================================================== --- vendor/libc++/dist-release_60/include/list Wed Jun 27 19:14:48 2018 (r335725) +++ vendor/libc++/dist-release_60/include/list Wed Jun 27 19:14:54 2018 (r335726) @@ -2058,15 +2058,15 @@ list<_Tp, _Alloc>::splice(const_iterator __p, list& __ #endif if (__f != __l) { + __link_pointer __first = __f.__ptr_; + --__l; + __link_pointer __last = __l.__ptr_; if (this != &__c) { - size_type __s = _VSTD::distance(__f, __l); + size_type __s = _VSTD::distance(__f, __l) + 1; __c.__sz() -= __s; base::__sz() += __s; } - __link_pointer __first = __f.__ptr_; - --__l; - __link_pointer __last = __l.__ptr_; base::__unlink_nodes(__first, __last); __link_nodes(__p.__ptr_, __first, __last); #if _LIBCPP_DEBUG_LEVEL >= 2 Modified: vendor/libc++/dist-release_60/src/support/runtime/exception_libcxxabi.ipp ============================================================================== --- vendor/libc++/dist-release_60/src/support/runtime/exception_libcxxabi.ipp Wed Jun 27 19:14:48 2018 (r335725) +++ vendor/libc++/dist-release_60/src/support/runtime/exception_libcxxabi.ipp Wed Jun 27 19:14:54 2018 (r335726) @@ -18,7 +18,7 @@ bool uncaught_exception() _NOEXCEPT { return uncaught_ int uncaught_exceptions() _NOEXCEPT { -# if _LIBCPPABI_VERSION > 1101 +# if _LIBCPPABI_VERSION > 1001 return __cxa_uncaught_exceptions(); # else return __cxa_uncaught_exception() ? 1 : 0; Modified: vendor/libc++/dist-release_60/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp ============================================================================== --- vendor/libc++/dist-release_60/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp Wed Jun 27 19:14:48 2018 (r335725) +++ vendor/libc++/dist-release_60/test/libcxx/debug/containers/db_sequence_container_iterators.pass.cpp Wed Jun 27 19:14:54 2018 (r335726) @@ -42,6 +42,7 @@ struct SequenceContainerChecks : BasicContainerChecks< Base::run(); try { FrontOnEmptyContainer(); + if constexpr (CT != CT_ForwardList) { AssignInvalidates(); BackOnEmptyContainer(); @@ -50,6 +51,8 @@ struct SequenceContainerChecks : BasicContainerChecks< InsertIterIterIter(); EmplaceIterValue(); EraseIterIter(); + } else { + SpliceFirstElemAfter(); } if constexpr (CT == CT_Vector || CT == CT_Deque || CT == CT_List) { PopBack(); @@ -57,12 +60,66 @@ struct SequenceContainerChecks : BasicContainerChecks< if constexpr (CT == CT_List || CT == CT_Deque) { PopFront(); // FIXME: Run with forward list as well } + if constexpr (CT == CT_List || CT == CT_ForwardList) { + RemoveFirstElem(); + } + if constexpr (CT == CT_List) { + SpliceFirstElem(); + } } catch (...) { assert(false && "uncaught debug exception"); } } private: + static void RemoveFirstElem() { + // See llvm.org/PR35564 + CHECKPOINT("remove()"); + { + Container C = makeContainer(1); + auto FirstVal = *(C.begin()); + C.remove(FirstVal); + assert(C.empty()); + } + { + Container C = {1, 1, 1, 1}; + auto FirstVal = *(C.begin()); + C.remove(FirstVal); + assert(C.empty()); + } + } + + static void SpliceFirstElem() { + // See llvm.org/PR35564 + CHECKPOINT("splice()"); + { + Container C = makeContainer(1); + Container C2; + C2.splice(C2.end(), C, C.begin(), ++C.begin()); + } + { + Container C = makeContainer(1); + Container C2; + C2.splice(C2.end(), C, C.begin()); + } + } + + + static void SpliceFirstElemAfter() { + // See llvm.org/PR35564 + CHECKPOINT("splice()"); + { + Container C = makeContainer(1); + Container C2; + C2.splice_after(C2.begin(), C, C.begin(), ++C.begin()); + } + { + Container C = makeContainer(1); + Container C2; + C2.splice_after(C2.begin(), C, C.begin()); + } + } + static void AssignInvalidates() { CHECKPOINT("assign(Size, Value)"); Container C(allocator_type{}); Modified: vendor/libc++/dist-release_60/test/std/language.support/support.exception/uncaught/uncaught_exceptions.pass.cpp ============================================================================== --- vendor/libc++/dist-release_60/test/std/language.support/support.exception/uncaught/uncaught_exceptions.pass.cpp Wed Jun 27 19:14:48 2018 (r335725) +++ vendor/libc++/dist-release_60/test/std/language.support/support.exception/uncaught/uncaught_exceptions.pass.cpp Wed Jun 27 19:14:54 2018 (r335726) @@ -15,40 +15,48 @@ // XFAIL: availability=macosx10.9 // XFAIL: availability=macosx10.10 // XFAIL: availability=macosx10.11 +// XFAIL: with_system_cxx_lib=macosx10.12 +// XFAIL: with_system_cxx_lib=macosx10.13 // test uncaught_exceptions #include #include -struct A -{ - ~A() - { - assert(std::uncaught_exceptions() > 0); - } -}; +struct Uncaught { + Uncaught(int depth) : d_(depth) {} + ~Uncaught() { assert(std::uncaught_exceptions() == d_); } + int d_; + }; -struct B -{ - B() - { - // http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#475 - assert(std::uncaught_exceptions() == 0); +struct Outer { + Outer(int depth) : d_(depth) {} + ~Outer() { + try { + assert(std::uncaught_exceptions() == d_); + Uncaught u(d_+1); + throw 2; } + catch (int) {} + } + int d_; }; -int main() -{ - try +int main () { + assert(std::uncaught_exceptions() == 0); { - A a; - assert(std::uncaught_exceptions() == 0); - throw B(); + Outer o(0); } - catch (...) + + assert(std::uncaught_exceptions() == 0); { - assert(std::uncaught_exception() == 0); + try { + Outer o(1); + throw 1; + } + catch (int) { + assert(std::uncaught_exceptions() == 0); + } } assert(std::uncaught_exceptions() == 0); } From owner-svn-src-all@freebsd.org Wed Jun 27 19:15:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F91E10030B5; Wed, 27 Jun 2018 19:15:03 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D28B28DF0F; Wed, 27 Jun 2018 19:14:59 +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 7BCAB27300; Wed, 27 Jun 2018 19:14:59 +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 w5RJExaZ043192; Wed, 27 Jun 2018 19:14:59 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RJExge043191; Wed, 27 Jun 2018 19:14:59 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201806271914.w5RJExge043191@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 27 Jun 2018 19:14:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r335727 - vendor/libc++/libc++-release_601-r335540 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/libc++/libc++-release_601-r335540 X-SVN-Commit-Revision: 335727 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 19:15:03 -0000 Author: dim Date: Wed Jun 27 19:14:58 2018 New Revision: 335727 URL: https://svnweb.freebsd.org/changeset/base/335727 Log: Tag libc++ 6.0.1 release r335540. Added: vendor/libc++/libc++-release_601-r335540/ - copied from r335726, vendor/libc++/dist-release_60/ From owner-svn-src-all@freebsd.org Wed Jun 27 19:15:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BCF010030D6; Wed, 27 Jun 2018 19:15:06 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 83D568DF89; Wed, 27 Jun 2018 19:15:05 +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 64C7927301; Wed, 27 Jun 2018 19:15:05 +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 w5RJF5dV043266; Wed, 27 Jun 2018 19:15:05 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RJF2UH043254; Wed, 27 Jun 2018 19:15:02 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201806271915.w5RJF2UH043254@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 27 Jun 2018 19:15:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r335728 - in vendor/lld/dist-release_60: COFF ELF ELF/Arch MinGW test/COFF test/ELF test/MinGW X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in vendor/lld/dist-release_60: COFF ELF ELF/Arch MinGW test/COFF test/ELF test/MinGW X-SVN-Commit-Revision: 335728 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 19:15:06 -0000 Author: dim Date: Wed Jun 27 19:15:02 2018 New Revision: 335728 URL: https://svnweb.freebsd.org/changeset/base/335728 Log: Vendor import of lld 6.0.1 release r335540: https://llvm.org/svn/llvm-project/lld/tags/RELEASE_601/final@335540 Modified: vendor/lld/dist-release_60/COFF/Config.h vendor/lld/dist-release_60/COFF/Driver.cpp vendor/lld/dist-release_60/COFF/DriverUtils.cpp vendor/lld/dist-release_60/COFF/Options.td vendor/lld/dist-release_60/ELF/Arch/Mips.cpp vendor/lld/dist-release_60/ELF/Config.h vendor/lld/dist-release_60/ELF/Driver.cpp vendor/lld/dist-release_60/MinGW/Driver.cpp vendor/lld/dist-release_60/MinGW/Options.td vendor/lld/dist-release_60/test/COFF/def-export-stdcall.s vendor/lld/dist-release_60/test/ELF/mips-26-n32-n64.s vendor/lld/dist-release_60/test/ELF/mips-plt-r6.s vendor/lld/dist-release_60/test/MinGW/driver.test Modified: vendor/lld/dist-release_60/COFF/Config.h ============================================================================== --- vendor/lld/dist-release_60/COFF/Config.h Wed Jun 27 19:14:58 2018 (r335727) +++ vendor/lld/dist-release_60/COFF/Config.h Wed Jun 27 19:15:02 2018 (r335728) @@ -175,6 +175,7 @@ struct Configuration { bool AppContainer = false; bool MinGW = false; bool WarnLocallyDefinedImported = true; + bool KillAt = false; }; extern Configuration *Config; Modified: vendor/lld/dist-release_60/COFF/Driver.cpp ============================================================================== --- vendor/lld/dist-release_60/COFF/Driver.cpp Wed Jun 27 19:14:58 2018 (r335727) +++ vendor/lld/dist-release_60/COFF/Driver.cpp Wed Jun 27 19:15:02 2018 (r335728) @@ -970,6 +970,10 @@ void LinkerDriver::link(ArrayRef ArgsArr if (Args.hasArg(OPT_lldsavetemps)) Config->SaveTemps = true; + // Handle /kill-at + if (Args.hasArg(OPT_kill_at)) + Config->KillAt = true; + // Handle /lldltocache if (auto *Arg = Args.getLastArg(OPT_lldltocache)) Config->LTOCache = Arg->getValue(); Modified: vendor/lld/dist-release_60/COFF/DriverUtils.cpp ============================================================================== --- vendor/lld/dist-release_60/COFF/DriverUtils.cpp Wed Jun 27 19:14:58 2018 (r335727) +++ vendor/lld/dist-release_60/COFF/DriverUtils.cpp Wed Jun 27 19:15:02 2018 (r335728) @@ -561,6 +561,26 @@ static StringRef undecorate(StringRef Sym) { return Sym.startswith("_") ? Sym.substr(1) : Sym; } +// Convert stdcall/fastcall style symbols into unsuffixed symbols, +// with or without a leading underscore. (MinGW specific.) +static StringRef killAt(StringRef Sym, bool Prefix) { + if (Sym.empty()) + return Sym; + // Strip any trailing stdcall suffix + Sym = Sym.substr(0, Sym.find('@', 1)); + if (!Sym.startswith("@")) { + if (Prefix && !Sym.startswith("_")) + return Saver.save("_" + Sym); + return Sym; + } + // For fastcall, remove the leading @ and replace it with an + // underscore, if prefixes are used. + Sym = Sym.substr(1); + if (Prefix) + Sym = Saver.save("_" + Sym); + return Sym; +} + // Performs error checking on all /export arguments. // It also sets ordinals. void fixupExports() { @@ -590,6 +610,15 @@ void fixupExports() { E.ExportName = undecorate(E.Name); } else { E.ExportName = undecorate(E.ExtName.empty() ? E.Name : E.ExtName); + } + } + + if (Config->KillAt && Config->Machine == I386) { + for (Export &E : Config->Exports) { + E.Name = killAt(E.Name, true); + E.ExportName = killAt(E.ExportName, false); + E.ExtName = killAt(E.ExtName, true); + E.SymbolName = killAt(E.SymbolName, true); } } Modified: vendor/lld/dist-release_60/COFF/Options.td ============================================================================== --- vendor/lld/dist-release_60/COFF/Options.td Wed Jun 27 19:14:58 2018 (r335727) +++ vendor/lld/dist-release_60/COFF/Options.td Wed Jun 27 19:15:02 2018 (r335728) @@ -121,6 +121,7 @@ def help_q : Flag<["/?", "-?"], "">, Alias; def debug_ghash : F<"debug:ghash">; def debug_dwarf : F<"debug:dwarf">; def export_all_symbols : F<"export-all-symbols">; +def kill_at : F<"kill-at">; def lldmingw : F<"lldmingw">; def msvclto : F<"msvclto">; def output_def : Joined<["/", "-"], "output-def:">; Modified: vendor/lld/dist-release_60/ELF/Arch/Mips.cpp ============================================================================== --- vendor/lld/dist-release_60/ELF/Arch/Mips.cpp Wed Jun 27 19:14:58 2018 (r335727) +++ vendor/lld/dist-release_60/ELF/Arch/Mips.cpp Wed Jun 27 19:15:02 2018 (r335728) @@ -296,7 +296,8 @@ template void MIPS::writePltHeader( write32(Buf + 20, 0x0018c082); // srl $24, $24, 2 } - write32(Buf + 24, 0x0320f809); // jalr $25 + uint32_t JalrInst = Config->ZHazardplt ? 0x0320fc09 : 0x0320f809; + write32(Buf + 24, JalrInst); // jalr.hb $25 or jalr $25 write32(Buf + 28, 0x2718fffe); // subu $24, $24, 2 uint64_t GotPlt = InX::GotPlt->getVA(); @@ -330,9 +331,12 @@ void MIPS::writePlt(uint8_t *Buf, uint64_t GotPl return; } + uint32_t JrInst = isMipsR6() ? (Config->ZHazardplt ? 0x03200409 : 0x03200009) + : (Config->ZHazardplt ? 0x03200408 : 0x03200008); + write32(Buf, 0x3c0f0000); // lui $15, %hi(.got.plt entry) write32(Buf + 4, 0x8df90000); // l[wd] $25, %lo(.got.plt entry)($15) - write32(Buf + 8, isMipsR6() ? 0x03200009 : 0x03200008); // jr $25 + write32(Buf + 8, JrInst); // jr $25 / jr.hb $25 write32(Buf + 12, 0x25f80000); // addiu $24, $15, %lo(.got.plt entry) writeRelocation(Buf, GotPltEntryAddr + 0x8000, 16, 16); writeRelocation(Buf + 4, GotPltEntryAddr, 16, 0); Modified: vendor/lld/dist-release_60/ELF/Config.h ============================================================================== --- vendor/lld/dist-release_60/ELF/Config.h Wed Jun 27 19:14:58 2018 (r335727) +++ vendor/lld/dist-release_60/ELF/Config.h Wed Jun 27 19:15:02 2018 (r335728) @@ -151,6 +151,7 @@ struct Configuration { bool WarnMissingEntry; bool ZCombreloc; bool ZExecstack; + bool ZHazardplt; bool ZNocopyreloc; bool ZNodelete; bool ZNodlopen; Modified: vendor/lld/dist-release_60/ELF/Driver.cpp ============================================================================== --- vendor/lld/dist-release_60/ELF/Driver.cpp Wed Jun 27 19:14:58 2018 (r335727) +++ vendor/lld/dist-release_60/ELF/Driver.cpp Wed Jun 27 19:15:02 2018 (r335728) @@ -668,6 +668,7 @@ void LinkerDriver::readConfigs(opt::InputArgList &Args Config->WarnCommon = Args.hasArg(OPT_warn_common); Config->ZCombreloc = !hasZOption(Args, "nocombreloc"); Config->ZExecstack = hasZOption(Args, "execstack"); + Config->ZHazardplt = hasZOption(Args, "hazardplt"); Config->ZNocopyreloc = hasZOption(Args, "nocopyreloc"); Config->ZNodelete = hasZOption(Args, "nodelete"); Config->ZNodlopen = hasZOption(Args, "nodlopen"); Modified: vendor/lld/dist-release_60/MinGW/Driver.cpp ============================================================================== --- vendor/lld/dist-release_60/MinGW/Driver.cpp Wed Jun 27 19:14:58 2018 (r335727) +++ vendor/lld/dist-release_60/MinGW/Driver.cpp Wed Jun 27 19:15:02 2018 (r335728) @@ -154,6 +154,8 @@ bool mingw::link(ArrayRef ArgsArr, raw_o Add("-debug:dwarf"); if (Args.hasArg(OPT_large_address_aware)) Add("-largeaddressaware"); + if (Args.hasArg(OPT_kill_at)) + Add("-kill-at"); if (Args.getLastArgValue(OPT_m) != "thumb2pe" && Args.getLastArgValue(OPT_m) != "arm64pe" && !Args.hasArg(OPT_dynamicbase)) Modified: vendor/lld/dist-release_60/MinGW/Options.td ============================================================================== --- vendor/lld/dist-release_60/MinGW/Options.td Wed Jun 27 19:14:58 2018 (r335727) +++ vendor/lld/dist-release_60/MinGW/Options.td Wed Jun 27 19:15:02 2018 (r335728) @@ -14,6 +14,7 @@ def export_all_symbols: F<"export-all-symbols">, def gc_sections: F<"gc-sections">, HelpText<"Remove unused sections">; def icf: J<"icf=">, HelpText<"Identical code folding">; def image_base: S<"image-base">, HelpText<"Base address of the program">; +def kill_at: F<"kill-at">, HelpText<"Remove @n from exported symbols">; def l: JoinedOrSeparate<["-"], "l">, MetaVarName<"">, HelpText<"Root name of library to use">; def m: JoinedOrSeparate<["-"], "m">, HelpText<"Set target emulation">; @@ -51,6 +52,7 @@ def build_id: F<"build-id">; def disable_auto_image_base: F<"disable-auto-image-base">; def enable_auto_image_base: F<"enable-auto-image-base">; def enable_auto_import: F<"enable-auto-import">; +def end_group: J<"end-group">; def full_shutdown: Flag<["--"], "full-shutdown">; def high_entropy_va: F<"high-entropy-va">, HelpText<"Enable 64-bit ASLR">; def major_image_version: S<"major-image-version">; @@ -59,6 +61,7 @@ def no_seh: F<"no-seh">; def nxcompat: F<"nxcompat">, HelpText<"Enable data execution prevention">; def pic_executable: F<"pic-executable">; def sysroot: J<"sysroot">, HelpText<"Sysroot">; +def start_group: J<"start-group">; def tsaware: F<"tsaware">, HelpText<"Create Terminal Server aware executable">; def v: Flag<["-"], "v">, HelpText<"Display the version number">; def version: F<"version">, HelpText<"Display the version number and exit">; Modified: vendor/lld/dist-release_60/test/COFF/def-export-stdcall.s ============================================================================== --- vendor/lld/dist-release_60/test/COFF/def-export-stdcall.s Wed Jun 27 19:14:58 2018 (r335727) +++ vendor/lld/dist-release_60/test/COFF/def-export-stdcall.s Wed Jun 27 19:15:02 2018 (r335728) @@ -46,7 +46,8 @@ # DECORATED-EXPORTS: Name: vectorcall@@8 -# RUN: echo -e "LIBRARY foo\nEXPORTS\n stdcall@8\n @fastcall@8" > %t.def +# GNU tools don't support vectorcall at the moment, but test it for completeness. +# RUN: echo -e "LIBRARY foo\nEXPORTS\n stdcall@8\n @fastcall@8\n vectorcall@@8" > %t.def # RUN: lld-link -lldmingw -entry:dllmain -dll -def:%t.def %t.obj -out:%t.dll -implib:%t.lib # RUN: llvm-readobj %t.lib | FileCheck -check-prefix DECORATED-MINGW-IMPLIB %s # RUN: llvm-readobj -coff-exports %t.dll | FileCheck -check-prefix DECORATED-MINGW-EXPORTS %s @@ -57,9 +58,39 @@ # DECORATED-MINGW-IMPLIB: Name type: noprefix # DECORATED-MINGW-IMPLIB-NEXT: __imp__stdcall@8 # DECORATED-MINGW-IMPLIB-NEXT: _stdcall@8 +# GNU tools don't support vectorcall, but this test is just to track that +# lld's behaviour remains consistent over time. +# DECORATED-MINGW-IMPLIB: Name type: name +# DECORATED-MINGW-IMPLIB-NEXT: __imp_vectorcall@@8 +# DECORATED-MINGW-IMPLIB-NEXT: vectorcall@@8 # DECORATED-MINGW-EXPORTS: Name: @fastcall@8 # DECORATED-MINGW-EXPORTS: Name: stdcall@8 +# DECORATED-MINGW-EXPORTS: Name: vectorcall@@8 + +# RUN: lld-link -lldmingw -kill-at -entry:dllmain -dll -def:%t.def %t.obj -out:%t.dll -implib:%t.lib +# RUN: llvm-readobj %t.lib | FileCheck -check-prefix MINGW-KILL-AT-IMPLIB %s +# RUN: llvm-readobj -coff-exports %t.dll | FileCheck -check-prefix MINGW-KILL-AT-EXPORTS %s + +# RUN: lld-link -lldmingw -kill-at -entry:dllmain -dll %t.obj -out:%t.dll -implib:%t.lib +# RUN: llvm-readobj %t.lib | FileCheck -check-prefix MINGW-KILL-AT-IMPLIB %s +# RUN: llvm-readobj -coff-exports %t.dll | FileCheck -check-prefix MINGW-KILL-AT-EXPORTS %s + +# MINGW-KILL-AT-IMPLIB: Name type: noprefix +# MINGW-KILL-AT-IMPLIB: __imp__fastcall +# MINGW-KILL-AT-IMPLIB-NEXT: _fastcall +# MINGW-KILL-AT-IMPLIB: Name type: noprefix +# MINGW-KILL-AT-IMPLIB-NEXT: __imp__stdcall +# MINGW-KILL-AT-IMPLIB-NEXT: _stdcall +# GNU tools don't support vectorcall, but this test is just to track that +# lld's behaviour remains consistent over time. +# MINGW-KILL-AT-IMPLIB: Name type: noprefix +# MINGW-KILL-AT-IMPLIB-NEXT: __imp__vectorcall +# MINGW-KILL-AT-IMPLIB-NEXT: _vectorcall + +# MINGW-KILL-AT-EXPORTS: Name: fastcall +# MINGW-KILL-AT-EXPORTS: Name: stdcall +# MINGW-KILL-AT-EXPORTS: Name: vectorcall .def _stdcall@8; Modified: vendor/lld/dist-release_60/test/ELF/mips-26-n32-n64.s ============================================================================== --- vendor/lld/dist-release_60/test/ELF/mips-26-n32-n64.s Wed Jun 27 19:14:58 2018 (r335727) +++ vendor/lld/dist-release_60/test/ELF/mips-26-n32-n64.s Wed Jun 27 19:15:02 2018 (r335728) @@ -5,8 +5,12 @@ # RUN: ld.lld %t-so.o -shared -o %t.so # RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux %s -o %t.o # RUN: ld.lld %t.o %t.so -o %t.exe -# RUN: llvm-objdump -d %t.exe | FileCheck %s +# RUN: llvm-objdump -d %t.exe | FileCheck %s --check-prefixes=CHECK,DEFAULT +# RUN: ld.lld %t-so.o -shared -o %t.so -z hazardplt +# RUN: ld.lld %t.o %t.so -o %t.exe -z hazardplt +# RUN: llvm-objdump -d %t.exe | FileCheck %s --check-prefixes=CHECK,HAZARDPLT + # REQUIRES: mips # CHECK: Disassembly of section .text: @@ -21,11 +25,13 @@ # CHECK-NEXT: 2001c: 03 0e c0 23 subu $24, $24, $14 # CHECK-NEXT: 20020: 03 e0 78 25 move $15, $ra # CHECK-NEXT: 20024: 00 18 c0 c2 srl $24, $24, 3 -# CHECK-NEXT: 20028: 03 20 f8 09 jalr $25 +# DEFAULT: 20028: 03 20 f8 09 jalr $25 +# HAZARDPLT: 20028: 03 20 fc 09 jalr.hb $25 # CHECK-NEXT: 2002c: 27 18 ff fe addiu $24, $24, -2 # CHECK-NEXT: 20030: 3c 0f 00 03 lui $15, 3 # CHECK-NEXT: 20034: 8d f9 00 18 lw $25, 24($15) -# CHECK-NEXT: 20038: 03 20 00 08 jr $25 +# DEFAULT: 20038: 03 20 00 08 jr $25 +# HAZARDPLT: 20038: 03 20 04 08 jr.hb $25 # CHECK-NEXT: 2003c: 25 f8 00 18 addiu $24, $15, 24 .text Modified: vendor/lld/dist-release_60/test/ELF/mips-plt-r6.s ============================================================================== --- vendor/lld/dist-release_60/test/ELF/mips-plt-r6.s Wed Jun 27 19:14:58 2018 (r335727) +++ vendor/lld/dist-release_60/test/ELF/mips-plt-r6.s Wed Jun 27 19:15:02 2018 (r335728) @@ -6,7 +6,10 @@ # RUN: -mcpu=mips32r6 %S/Inputs/mips-dynamic.s -o %t2.o # RUN: ld.lld %t2.o -shared -o %t.so # RUN: ld.lld %t1.o %t.so -o %t.exe -# RUN: llvm-objdump -d %t.exe | FileCheck %s +# RUN: llvm-objdump -d %t.exe | FileCheck %s --check-prefixes=DEFAULT,CHECK +# RUN: ld.lld %t2.o -shared -o %t.so -z hazardplt +# RUN: ld.lld %t1.o %t.so -o %t.exe -z hazardplt +# RUN: llvm-objdump -d %t.exe | FileCheck %s --check-prefixes=HAZARDPLT,CHECK # REQUIRES: mips @@ -24,12 +27,14 @@ # CHECK-NEXT: 2001c: 03 1c c0 23 subu $24, $24, $gp # CHECK-NEXT: 20020: 03 e0 78 25 move $15, $ra # CHECK-NEXT: 20024: 00 18 c0 82 srl $24, $24, 2 -# CHECK-NEXT: 20028: 03 20 f8 09 jalr $25 +# DEFAULT: 20028: 03 20 f8 09 jalr $25 +# HAZARDPLT: 20028: 03 20 fc 09 jalr.hb $25 # CHECK-NEXT: 2002c: 27 18 ff fe addiu $24, $24, -2 # CHECK-NEXT: 20030: 3c 0f 00 03 aui $15, $zero, 3 # CHECK-NEXT: 20034: 8d f9 00 0c lw $25, 12($15) -# CHECK-NEXT: 20038: 03 20 00 09 jr $25 +# DEFAULT: 20038: 03 20 00 09 jr $25 +# HAZARDPLT: 20038: 03 20 04 09 jr.hb $25 # CHECK-NEXT: 2003c: 25 f8 00 0c addiu $24, $15, 12 .text Modified: vendor/lld/dist-release_60/test/MinGW/driver.test ============================================================================== --- vendor/lld/dist-release_60/test/MinGW/driver.test Wed Jun 27 19:14:58 2018 (r335727) +++ vendor/lld/dist-release_60/test/MinGW/driver.test Wed Jun 27 19:15:02 2018 (r335728) @@ -124,3 +124,7 @@ ICF-NONE: -opt:noicf RUN: ld.lld -### -m i386pep foo.o --icf=all | FileCheck -check-prefix ICF %s RUN: ld.lld -### -m i386pep foo.o -icf=all | FileCheck -check-prefix ICF %s ICF: -opt:icf + +RUN: ld.lld -### foo.o -m i386pe -shared --kill-at | FileCheck -check-prefix=KILL-AT %s +RUN: ld.lld -### foo.o -m i386pe -shared -kill-at | FileCheck -check-prefix=KILL-AT %s +KILL-AT: -kill-at From owner-svn-src-all@freebsd.org Wed Jun 27 19:15:12 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A2BE1003114; Wed, 27 Jun 2018 19:15:12 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BDA608E064; Wed, 27 Jun 2018 19:15:09 +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 E81F427302; Wed, 27 Jun 2018 19:15:08 +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 w5RJF8rr043315; Wed, 27 Jun 2018 19:15:08 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RJF80q043314; Wed, 27 Jun 2018 19:15:08 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201806271915.w5RJF80q043314@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 27 Jun 2018 19:15:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r335729 - vendor/lld/lld-release_601-r335540 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/lld/lld-release_601-r335540 X-SVN-Commit-Revision: 335729 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 19:15:12 -0000 Author: dim Date: Wed Jun 27 19:15:08 2018 New Revision: 335729 URL: https://svnweb.freebsd.org/changeset/base/335729 Log: Tag lld 6.0.1 release r335540. Added: vendor/lld/lld-release_601-r335540/ - copied from r335728, vendor/lld/dist-release_60/ From owner-svn-src-all@freebsd.org Wed Jun 27 19:15:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5EA41003159; Wed, 27 Jun 2018 19:15:16 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EBBDB8E14C; Wed, 27 Jun 2018 19:15:14 +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 4C2E927303; Wed, 27 Jun 2018 19:15:14 +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 w5RJFEC5043363; Wed, 27 Jun 2018 19:15:14 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RJFE0m043362; Wed, 27 Jun 2018 19:15:14 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201806271915.w5RJFE0m043362@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 27 Jun 2018 19:15:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r335730 - vendor/lldb/dist-release_60/cmake/modules X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/lldb/dist-release_60/cmake/modules X-SVN-Commit-Revision: 335730 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 19:15:16 -0000 Author: dim Date: Wed Jun 27 19:15:13 2018 New Revision: 335730 URL: https://svnweb.freebsd.org/changeset/base/335730 Log: Vendor import of lldb 6.0.1 release r335540: https://llvm.org/svn/llvm-project/lldb/tags/RELEASE_601/final@335540 Modified: vendor/lldb/dist-release_60/cmake/modules/LLDBConfig.cmake Modified: vendor/lldb/dist-release_60/cmake/modules/LLDBConfig.cmake ============================================================================== --- vendor/lldb/dist-release_60/cmake/modules/LLDBConfig.cmake Wed Jun 27 19:15:08 2018 (r335729) +++ vendor/lldb/dist-release_60/cmake/modules/LLDBConfig.cmake Wed Jun 27 19:15:13 2018 (r335730) @@ -277,27 +277,31 @@ include_directories(BEFORE if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) install(DIRECTORY include/ - COMPONENT lldb_headers + COMPONENT lldb-headers DESTINATION include FILES_MATCHING PATTERN "*.h" PATTERN ".svn" EXCLUDE PATTERN ".cmake" EXCLUDE PATTERN "Config.h" EXCLUDE - PATTERN "lldb-*.h" EXCLUDE - PATTERN "API/*.h" EXCLUDE ) install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/ - COMPONENT lldb_headers + COMPONENT lldb-headers DESTINATION include FILES_MATCHING PATTERN "*.h" PATTERN ".svn" EXCLUDE PATTERN ".cmake" EXCLUDE - PATTERN "lldb-*.h" EXCLUDE - PATTERN "API/*.h" EXCLUDE ) + + add_custom_target(lldb-headers) + set_target_properties(lldb-headers PROPERTIES FOLDER "Misc") + + if (NOT CMAKE_CONFIGURATION_TYPES) + add_llvm_install_targets(install-lldb-headers + COMPONENT lldb-headers) + endif() endif() if (NOT LIBXML2_FOUND AND NOT (CMAKE_SYSTEM_NAME MATCHES "Windows")) From owner-svn-src-all@freebsd.org Wed Jun 27 19:15:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9A971003175; Wed, 27 Jun 2018 19:15:19 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 883918E1A7; Wed, 27 Jun 2018 19:15:18 +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 06F9B27304; Wed, 27 Jun 2018 19:15:18 +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 w5RJFHEL043411; Wed, 27 Jun 2018 19:15:17 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RJFHXa043410; Wed, 27 Jun 2018 19:15:17 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201806271915.w5RJFHXa043410@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 27 Jun 2018 19:15:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r335731 - vendor/lldb/lldb-release_601-r335540 X-SVN-Group: vendor X-SVN-Commit-Author: dim X-SVN-Commit-Paths: vendor/lldb/lldb-release_601-r335540 X-SVN-Commit-Revision: 335731 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 19:15:19 -0000 Author: dim Date: Wed Jun 27 19:15:17 2018 New Revision: 335731 URL: https://svnweb.freebsd.org/changeset/base/335731 Log: Tag lldb 6.0.1 release r335540. Added: vendor/lldb/lldb-release_601-r335540/ - copied from r335730, vendor/lldb/dist-release_60/ From owner-svn-src-all@freebsd.org Wed Jun 27 19:28:38 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9918B1003CAF; Wed, 27 Jun 2018 19:28:38 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3076B8EC8E; Wed, 27 Jun 2018 19:28:38 +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 0C337274A1; Wed, 27 Jun 2018 19:28:38 +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 w5RJSbRQ049184; Wed, 27 Jun 2018 19:28:37 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RJSbIB049183; Wed, 27 Jun 2018 19:28:37 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201806271928.w5RJSbIB049183@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 27 Jun 2018 19:28:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335732 - head/sbin/ifconfig X-SVN-Group: head X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: head/sbin/ifconfig X-SVN-Commit-Revision: 335732 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 19:28:38 -0000 Author: trasz Date: Wed Jun 27 19:28:37 2018 New Revision: 335732 URL: https://svnweb.freebsd.org/changeset/base/335732 Log: Fix description for the "autoconf" ifconfig(8) flag; it's an address property, not something you set for an interface. MFC after: 2 weeks Modified: head/sbin/ifconfig/ifconfig.8 Modified: head/sbin/ifconfig/ifconfig.8 ============================================================================== --- head/sbin/ifconfig/ifconfig.8 Wed Jun 27 19:15:17 2018 (r335731) +++ head/sbin/ifconfig/ifconfig.8 Wed Jun 27 19:28:37 2018 (r335732) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd April 29, 2017 +.Dd June 27, 2018 .Dt IFCONFIG 8 .Os .Sh NAME @@ -724,10 +724,6 @@ controls whether this flag is set by default or not. .It Cm -accept_rtadv Clear a flag .Cm accept_rtadv . -.It Cm autoconf -Set a flag to accept router advertisements on an interface. -.It Fl autoconf -Disable autoconfiguration. .It Cm no_radr Set a flag to control whether routers from which the system accepts Router Advertisement messages will be added to the Default Router List @@ -800,6 +796,10 @@ Note that the address family keyword .Dq Li inet6 is needed for them: .Bl -tag -width indent +.It Cm autoconf +Set the IPv6 autoconfigured address bit. +.It Fl autoconf +Clear the IPv6 autoconfigured address bit. .It Cm deprecated Set the IPv6 deprecated address bit. .It Fl deprecated From owner-svn-src-all@freebsd.org Wed Jun 27 19:29:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CB071003D63; Wed, 27 Jun 2018 19:29:18 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2C1038EDD6; Wed, 27 Jun 2018 19:29:18 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0D346274A2; Wed, 27 Jun 2018 19:29:18 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RJTHwU049260; Wed, 27 Jun 2018 19:29:17 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RJTGwa049250; Wed, 27 Jun 2018 19:29:16 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201806271929.w5RJTGwa049250@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 27 Jun 2018 19:29:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335733 - in head: bin/csh gnu/usr.bin/cc/cc1 gnu/usr.bin/cc/cc1plus gnu/usr.bin/cc/cc_tools lib/libmagic lib/libpam/static_libpam lib/ncurses/ncurses share/syscons/scrnmaps stand/mips/... X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: in head: bin/csh gnu/usr.bin/cc/cc1 gnu/usr.bin/cc/cc1plus gnu/usr.bin/cc/cc_tools lib/libmagic lib/libpam/static_libpam lib/ncurses/ncurses share/syscons/scrnmaps stand/mips/beri/boot2 usr.bin/vi/cat... X-SVN-Commit-Revision: 335733 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 19:29:18 -0000 Author: bdrewery Date: Wed Jun 27 19:29:15 2018 New Revision: 335733 URL: https://svnweb.freebsd.org/changeset/base/335733 Log: Don't use CCACHE for linking. MFC after: 2 weeks Sponsored by: Dell EMC Modified: head/bin/csh/Makefile head/gnu/usr.bin/cc/cc1/Makefile head/gnu/usr.bin/cc/cc1plus/Makefile head/gnu/usr.bin/cc/cc_tools/Makefile head/lib/libmagic/Makefile head/lib/libpam/static_libpam/Makefile head/lib/ncurses/ncurses/Makefile head/share/syscons/scrnmaps/Makefile head/stand/mips/beri/boot2/Makefile head/usr.bin/vi/catalog/Makefile Modified: head/bin/csh/Makefile ============================================================================== --- head/bin/csh/Makefile Wed Jun 27 19:28:37 2018 (r335732) +++ head/bin/csh/Makefile Wed Jun 27 19:29:15 2018 (r335733) @@ -113,7 +113,7 @@ build-tools: gethost gethost: gethost.c sh.err.h tc.const.h sh.h ${BUILD_TOOLS_META} @rm -f ${.TARGET} - ${CC} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \ + ${CC:N${CCACHE_BIN}} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \ ${TCSHDIR}/gethost.c tc.defs.c: gethost ${TCSHDIR}/host.defs Modified: head/gnu/usr.bin/cc/cc1/Makefile ============================================================================== --- head/gnu/usr.bin/cc/cc1/Makefile Wed Jun 27 19:28:37 2018 (r335732) +++ head/gnu/usr.bin/cc/cc1/Makefile Wed Jun 27 19:29:15 2018 (r335733) @@ -20,7 +20,7 @@ LDADD= ${LIBBACKEND} ${LIBCPP} ${LIBDECNUMBER} ${LIBIB DOBJS+= ${SRCS:N*.h:R:S/$/.o/g} ${PROG}-dummy: ${DOBJS} - ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${DOBJS} ${LDADD} + ${CC:N${CCACHE_BIN}} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${DOBJS} ${LDADD} CLEANFILES+= ${PROG}-dummy ${PROG}-checksum.c: ${PROG}-dummy Modified: head/gnu/usr.bin/cc/cc1plus/Makefile ============================================================================== --- head/gnu/usr.bin/cc/cc1plus/Makefile Wed Jun 27 19:28:37 2018 (r335732) +++ head/gnu/usr.bin/cc/cc1plus/Makefile Wed Jun 27 19:29:15 2018 (r335733) @@ -35,7 +35,7 @@ CLEANFILES= cfns.h DOBJS+= ${SRCS:N*.h:R:S/$/.o/g} ${PROG}-dummy: ${DOBJS} - ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${DOBJS} ${LDADD} + ${CC:N${CCACHE_BIN}} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${DOBJS} ${LDADD} CLEANFILES+= ${PROG}-dummy ${PROG}-checksum.c: ${PROG}-dummy Modified: head/gnu/usr.bin/cc/cc_tools/Makefile ============================================================================== --- head/gnu/usr.bin/cc/cc_tools/Makefile Wed Jun 27 19:28:37 2018 (r335732) +++ head/gnu/usr.bin/cc/cc_tools/Makefile Wed Jun 27 19:29:15 2018 (r335733) @@ -276,7 +276,7 @@ CLEANFILES+= gengtype-yacc.c gengtype: gengtype.o gengtype-yacc+%DIKED.o gengtype-lex.o errors.o \ ${LIBIBERTY} - ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} + ${CC:N${CCACHE_BIN}} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} gtype-desc.h: gengtype ${BTOOLSPATH:U.}/gengtype @@ -292,18 +292,18 @@ CLEANFILES+= gt-*.h gtype-*.h # .for F in check checksum genrtl modes gen$F: gen$F.o errors.o ${LIBIBERTY} - ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} + ${CC:N${CCACHE_BIN}} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} .endfor .for F in attr attrtab automata codes conditions config constants emit \ extract flags opinit output peep preds recog gen$F: gen$F.o rtl.o read-rtl.o ggc-none.o vec.o min-insn-modes.o \ gensupport.o print-rtl.o errors.o ${LIBIBERTY} - ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} -lm + ${CC:N${CCACHE_BIN}} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} -lm .endfor gencondmd: gencondmd.o - ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} + ${CC:N${CCACHE_BIN}} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} # # Generated .md files. Modified: head/lib/libmagic/Makefile ============================================================================== --- head/lib/libmagic/Makefile Wed Jun 27 19:28:37 2018 (r335732) +++ head/lib/libmagic/Makefile Wed Jun 27 19:29:15 2018 (r335733) @@ -43,7 +43,7 @@ magic.mgc: mkmagic magic CLEANFILES+= mkmagic build-tools: mkmagic mkmagic: apprentice.c cdf_time.c encoding.c funcs.c magic.c print.c ${INCS} ${BUILD_TOOLS_META} - ${CC} ${CFLAGS} -DCOMPILE_ONLY ${LDFLAGS} -o ${.TARGET} ${.ALLSRC:N*.h} \ + ${CC:N${CCACHE_BIN}} ${CFLAGS} -DCOMPILE_ONLY ${LDFLAGS} -o ${.TARGET} ${.ALLSRC:N*.h} \ ${LDADD} FILEVER!= awk '$$1 == "\#define" && $$2 == "VERSION" { print $$3; exit }' \ Modified: head/lib/libpam/static_libpam/Makefile ============================================================================== --- head/lib/libpam/static_libpam/Makefile Wed Jun 27 19:28:37 2018 (r335732) +++ head/lib/libpam/static_libpam/Makefile Wed Jun 27 19:29:15 2018 (r335733) @@ -64,6 +64,7 @@ CLEANFILES+= openpam_static.o \ openpam_static_modules.o openpam_static_modules.o: openpam_static.o ${STATIC_MODULES} - ${CC} -nostdlib ${LDFLAGS} -o ${.TARGET} -r -Wl,--whole-archive ${.ALLSRC} + ${CC:N${CCACHE_BIN}} -nostdlib ${LDFLAGS} -o ${.TARGET} \ + -r -Wl,--whole-archive ${.ALLSRC} .include "${.CURDIR:H}/libpam/Makefile" Modified: head/lib/ncurses/ncurses/Makefile ============================================================================== --- head/lib/ncurses/ncurses/Makefile Wed Jun 27 19:28:37 2018 (r335732) +++ head/lib/ncurses/ncurses/Makefile Wed Jun 27 19:29:15 2018 (r335733) @@ -391,10 +391,10 @@ keys.list: MKkeys_list.sh Caps build-tools: make_hash make_keys make_keys: make_keys.c names.c ncurses_def.h ${HEADERS} ${BUILD_TOOLS_META} - ${CC} -o $@ ${CFLAGS} ${NCURSES_DIR}/ncurses/tinfo/make_keys.c + ${CC:N${CCACHE_BIN}} -o $@ ${CFLAGS} ${NCURSES_DIR}/ncurses/tinfo/make_keys.c make_hash: make_hash.c hashsize.h ncurses_def.h ${HEADERS} ${BUILD_TOOLS_META} - ${CC} -o $@ ${CFLAGS} -DMAIN_PROGRAM \ + ${CC:N${CCACHE_BIN}} -o $@ ${CFLAGS} -DMAIN_PROGRAM \ ${NCURSES_DIR}/ncurses/tinfo/make_hash.c # ./configure generated Modified: head/share/syscons/scrnmaps/Makefile ============================================================================== --- head/share/syscons/scrnmaps/Makefile Wed Jun 27 19:28:37 2018 (r335732) +++ head/share/syscons/scrnmaps/Makefile Wed Jun 27 19:29:15 2018 (r335733) @@ -20,7 +20,7 @@ ${SCRMAPS}: ${.TARGET:R}.mk rm -f ${.TARGET:R}.tmp ${SCRMAPS_MK}: ${.TARGET:R} mkscrfil.c ${BUILD_TOOLS_META} - ${CC} ${CFLAGS} -I${.CURDIR} -DFIL=\"${.TARGET:R}\" ${LDFLAGS} \ - -o ${.TARGET} ${.CURDIR}/mkscrfil.c + ${CC:N${CCACHE_BIN}} ${CFLAGS} -I${.CURDIR} -DFIL=\"${.TARGET:R}\" \ + ${LDFLAGS} -o ${.TARGET} ${.CURDIR}/mkscrfil.c .include Modified: head/stand/mips/beri/boot2/Makefile ============================================================================== --- head/stand/mips/beri/boot2/Makefile Wed Jun 27 19:28:37 2018 (r335732) +++ head/stand/mips/beri/boot2/Makefile Wed Jun 27 19:29:15 2018 (r335733) @@ -60,16 +60,16 @@ LDFLAGS+= -static \ CFLAGS+= -I${BOOTSRC}/mips/beri/common flashboot.elf: relocate.o start.o boot2.o altera_jtag_uart.o cfi.o sdcard.o - ${CC} ${LDFLAGS} -T ${.CURDIR}/flashboot.ldscript -o ${.TARGET} \ - ${.ALLSRC} ${LIBSA} + ${CC:N${CCACHE_BIN}} ${LDFLAGS} -T ${.CURDIR}/flashboot.ldscript \ + -o ${.TARGET} ${.ALLSRC} ${LIBSA} flashboot: flashboot.elf ${OBJCOPY} -S -O binary ${.TARGET}.elf ${.TARGET} flashboot.md5: flashboot md5 flashboot > flashboot.md5 jtagboot: start.o boot2.o altera_jtag_uart.o cfi.o sdcard.o - ${CC} ${LDFLAGS} -T ${.CURDIR}/jtagboot.ldscript -o ${.TARGET} \ - ${.ALLSRC} ${LIBSA} + ${CC:N${CCACHE_BIN}} ${LDFLAGS} -T ${.CURDIR}/jtagboot.ldscript \ + -o ${.TARGET} ${.ALLSRC} ${LIBSA} jtagboot.md5: jtagboot md5 jtagboot > jtagboot.md5 Modified: head/usr.bin/vi/catalog/Makefile ============================================================================== --- head/usr.bin/vi/catalog/Makefile Wed Jun 27 19:28:37 2018 (r335732) +++ head/usr.bin/vi/catalog/Makefile Wed Jun 27 19:29:15 2018 (r335733) @@ -106,7 +106,7 @@ english.base: dump ${SCAN} #Makefile dump: dump.c ${BUILD_TOOLS_META} - ${CC} -o ${.TARGET} ${.ALLSRC} + ${CC:N${CCACHE_BIN}} -o ${.TARGET} ${.ALLSRC} CLEANFILES+= dump ${CAT} english.base *.check __ck1 __ck2 From owner-svn-src-all@freebsd.org Wed Jun 27 19:37:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2368A100435E; Wed, 27 Jun 2018 19:37:27 +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 "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B533B8F3A8; Wed, 27 Jun 2018 19:37:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from coleburn.home.andric.com (coleburn.home.andric.com [192.168.0.15]) (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 49105D3C8; Wed, 27 Jun 2018 21:37:19 +0200 (CEST) From: Dimitry Andric Message-Id: <1903115A-F018-4075-961A-65689595FBEE@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_DFC2ED8D-CAB8-421B-AABD-026A2ED1501A"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) Subject: Re: svn commit: r335733 - in head: bin/csh gnu/usr.bin/cc/cc1 gnu/usr.bin/cc/cc1plus gnu/usr.bin/cc/cc_tools lib/libmagic lib/libpam/static_libpam lib/ncurses/ncurses share/syscons/scrnmaps stand/mips/... Date: Wed, 27 Jun 2018 21:35:26 +0200 In-Reply-To: <201806271929.w5RJTGwa049250@repo.freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Bryan Drewery References: <201806271929.w5RJTGwa049250@repo.freebsd.org> X-Mailer: Apple Mail (2.3445.8.2) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 19:37:27 -0000 --Apple-Mail=_DFC2ED8D-CAB8-421B-AABD-026A2ED1501A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 27 Jun 2018, at 21:29, Bryan Drewery wrote: >=20 > Author: bdrewery > Date: Wed Jun 27 19:29:15 2018 > New Revision: 335733 > URL: https://svnweb.freebsd.org/changeset/base/335733 >=20 > Log: > Don't use CCACHE for linking. >=20 > MFC after: 2 weeks > Sponsored by: Dell EMC >=20 > Modified: > head/bin/csh/Makefile > head/gnu/usr.bin/cc/cc1/Makefile > head/gnu/usr.bin/cc/cc1plus/Makefile > head/gnu/usr.bin/cc/cc_tools/Makefile > head/lib/libmagic/Makefile > head/lib/libpam/static_libpam/Makefile > head/lib/ncurses/ncurses/Makefile > head/share/syscons/scrnmaps/Makefile > head/stand/mips/beri/boot2/Makefile > head/usr.bin/vi/catalog/Makefile >=20 > Modified: head/bin/csh/Makefile > = =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/bin/csh/Makefile Wed Jun 27 19:28:37 2018 = (r335732) > +++ head/bin/csh/Makefile Wed Jun 27 19:29:15 2018 = (r335733) > @@ -113,7 +113,7 @@ build-tools: gethost >=20 > gethost: gethost.c sh.err.h tc.const.h sh.h ${BUILD_TOOLS_META} > @rm -f ${.TARGET} > - ${CC} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \ > + ${CC:N${CCACHE_BIN}} -o gethost ${LDFLAGS} = ${CFLAGS:C/-DHAVE_ICONV//} \ > ${TCSHDIR}/gethost.c Looks like a good candidate for a common macro, say CC_NOCACHE, CC_REAL or something like that? :) -Dimitry --Apple-Mail=_DFC2ED8D-CAB8-421B-AABD-026A2ED1501A 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 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCWzPm/gAKCRCwXqMKLiCW oyI2AJ4zdHuqthwyNtKJbIooTKO0wVe5dwCdGF8rZN0lS/zdQZ46p+jBYa/5Da4= =Jr1u -----END PGP SIGNATURE----- --Apple-Mail=_DFC2ED8D-CAB8-421B-AABD-026A2ED1501A-- From owner-svn-src-all@freebsd.org Wed Jun 27 19:42:56 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CAD321004A1B; Wed, 27 Jun 2018 19:42:56 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6EBE08FA41; Wed, 27 Jun 2018 19:42:56 +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 51491277E3; Wed, 27 Jun 2018 19:42:56 +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 w5RJgul2058791; Wed, 27 Jun 2018 19:42:56 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RJguX0058790; Wed, 27 Jun 2018 19:42:56 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201806271942.w5RJguX0058790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 27 Jun 2018 19:42:56 +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: r335734 - in stable: 10/contrib/amd/amq 11/contrib/amd/amq X-SVN-Group: stable-10 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/contrib/amd/amq 11/contrib/amd/amq X-SVN-Commit-Revision: 335734 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 19:42:57 -0000 Author: cy Date: Wed Jun 27 19:42:55 2018 New Revision: 335734 URL: https://svnweb.freebsd.org/changeset/base/335734 Log: MFC r335355: Fix amq -i timestamp segmentation violation. Modified: stable/10/contrib/amd/amq/amq.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/contrib/amd/amq/amq.c Directory Properties: stable/11/ (props changed) Modified: stable/10/contrib/amd/amq/amq.c ============================================================================== --- stable/10/contrib/amd/amq/amq.c Wed Jun 27 19:29:15 2018 (r335733) +++ stable/10/contrib/amd/amq/amq.c Wed Jun 27 19:42:55 2018 (r335734) @@ -79,7 +79,7 @@ enum show_opt { static void time_print(time_type tt) { - time_t t = (time_t)*tt; + time_t t = (time_t)(intptr_t)tt; struct tm *tp = localtime(&t); printf("%02d/%02d/%04d %02d:%02d:%02d", tp->tm_mon + 1, tp->tm_mday, From owner-svn-src-all@freebsd.org Wed Jun 27 19:42:56 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6AFC21004A13; Wed, 27 Jun 2018 19:42:56 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1C9328FA3F; Wed, 27 Jun 2018 19:42:56 +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 F1DDB277E2; Wed, 27 Jun 2018 19:42:55 +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 w5RJgt1w058784; Wed, 27 Jun 2018 19:42:55 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RJgtnH058783; Wed, 27 Jun 2018 19:42:55 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201806271942.w5RJgtnH058783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 27 Jun 2018 19:42:55 +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: r335734 - in stable: 10/contrib/amd/amq 11/contrib/amd/amq X-SVN-Group: stable-11 X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in stable: 10/contrib/amd/amq 11/contrib/amd/amq X-SVN-Commit-Revision: 335734 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 19:42:56 -0000 Author: cy Date: Wed Jun 27 19:42:55 2018 New Revision: 335734 URL: https://svnweb.freebsd.org/changeset/base/335734 Log: MFC r335355: Fix amq -i timestamp segmentation violation. Modified: stable/11/contrib/amd/amq/amq.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/amd/amq/amq.c Directory Properties: stable/10/ (props changed) Modified: stable/11/contrib/amd/amq/amq.c ============================================================================== --- stable/11/contrib/amd/amq/amq.c Wed Jun 27 19:29:15 2018 (r335733) +++ stable/11/contrib/amd/amq/amq.c Wed Jun 27 19:42:55 2018 (r335734) @@ -79,7 +79,7 @@ enum show_opt { static void time_print(time_type tt) { - time_t t = (time_t)*tt; + time_t t = (time_t)(intptr_t)tt; struct tm *tp = localtime(&t); printf("%02d/%02d/%04d %02d:%02d:%02d", tp->tm_mon + 1, tp->tm_mday, From owner-svn-src-all@freebsd.org Wed Jun 27 19:45:56 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 265B81004D85; Wed, 27 Jun 2018 19:45:56 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B29618FDF1; Wed, 27 Jun 2018 19:45:55 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id 85CE91AE7; Wed, 27 Jun 2018 19:45:55 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 5ABD29A07; Wed, 27 Jun 2018 19:45:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id i7Jf8apqv-rk; Wed, 27 Jun 2018 19:45:51 +0000 (UTC) Subject: Re: svn commit: r335733 - in head: bin/csh gnu/usr.bin/cc/cc1 gnu/usr.bin/cc/cc1plus gnu/usr.bin/cc/cc_tools lib/libmagic lib/libpam/static_libpam lib/ncurses/ncurses share/syscons/scrnmaps stand/mips/... DKIM-Filter: OpenDKIM Filter v2.10.3 mail.xzibition.com 8A79E9A02 To: Dimitry Andric Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201806271929.w5RJTGwa049250@repo.freebsd.org> <1903115A-F018-4075-961A-65689595FBEE@FreeBSD.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Autocrypt: addr=bdrewery@FreeBSD.org; prefer-encrypt=mutual; keydata= xsBNBFJphmsBCADiFgmS4bIzwZijrS31SjEMzg+n5zNellgM+HkShwehpqCiyhXdWrvH6dTZ a6u50pbUIX7doTR7W7PQHCjCTqtpwvcj0eulZva+iHFp+XrbgSFHn+VVXgkYP2MFySyZRFab D2qqzJBEJofhpv4HvY6uQI5K99pMqKr1Z/lHqsijYYu4RH2OfwB5PinId7xeldzWEonVoCr+ rfxzO/UrgA6v/3layGZcKNHFjmc3NqoN1DXtdaEHqtjIozzbndVkH6lkFvIpIrI6i5ox8pwp VxsxLCr/4Musd5CWgHiet5kSw2SzNeA8FbxdLYCpXNVu+uBACEbCUP+CSNy3NVfEUxsBABEB AAHNJEJyeWFuIERyZXdlcnkgPGJkcmV3ZXJ5QEZyZWVCU0Qub3JnPsLAgAQTAQoAKgIbAwUL CQgHAwUVCgkICwUWAwIBAAIeAQIXgAIZAQUCWujOIgUJCmB7NwAKCRA113G7bkaXz/xpB/9b /UWIPbieY1IeIuHF2pyYPE7Hytkh3HVsxMA0F5Ma2AYQsXZZeKNKWrF7RPyDyDwUklLHJkhm k3EfClBbHxf08kMIm1vWCJRtgxic9knY/bzYGiWMpHjg3cSd1XfrYH1autYqTZAjDwIkgOjU dR//Tbn4V36sY7y2jz+kdMVWvK53U32aZqiwBbCn4DPe1wSZcUs17mV/0uZdIoGdj74B1orN A/0py5vHYo6HcbBNoaR8pKRLf5VZNRsxqGIMhTucx4SJWcHpuRBWYyvJSFzwvxdK4ZD4Yqoc kFGPVtOXktVMai9exrLvP3G77fKMu8DI6j4QRU4wCesnHuIfRPFuzsBNBFJphmsBCACiVFPf kNfaFtUSuY0395ueo/rMyHPGPQ2iwvERFCpeFGSQSgagpenNHLpFQKTg/dl6FOoST5tqyxMq fyHGHDzzU51bvA/IfaGoNi/BIhTe/toZNMRvpcI3PLjiGcnJnuwCCbAVOAGdb+t5cZtpNdOI cKYmrYG3u9RiBpe6dTF+qLrD/8Bs1wjhduQ8fcNNgnkXu8xDH4ZxY0lIc3QgvYWp9vimlQe6 iKjUd2/DX28ETZcD5h6pYV331KMPTrEI0p0yvFijUZce8c1XHFyL1j9sBAha5qpszJl6Uq5i LolhKRcGfcdmtD72vHQjUYglUyudSJUVyo2gMYjdbiFKzJulABEBAAHCwGUEGAEKAA8CGwwF AlrozigFCQpgez0ACgkQNddxu25Gl8+m5Af/R3VEdxNMAcDIes9ADhQyofj20SPV3eCJ3HYR OebTSuNdOudGt4AAyA8Ks94u9hiIp5IGsc6RDsT9W7O2vgXhd6eV3eiY5Oif5xLIYrIDVu1Y 1GyRxRrPEn/QOqDN6uFZCPwK1aOapGcYCrO9lB0gMuTVfgHanU61rgC9tMX0OoAOyRd+V3/M 8lDNhjJdF/IpO3SdYzKfkwduy4qamw4Gphcx/RfYQvYLq/eDkP8d50PphWdboqWBwNRHayro W/07OGzfxM5fJ5mBsXPQcO2QcRjkyHf6xCM6Hi1qQL4OnXMNE/ZTX0lnOj1/pH93TlzSHZMP TaiiA/MBD3vGsXBmBg== Organization: FreeBSD Message-ID: <0d1b366a-59ab-65e9-58a6-5474f538cad2@FreeBSD.org> Date: Wed, 27 Jun 2018 12:45:49 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <1903115A-F018-4075-961A-65689595FBEE@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pDMD9ljJetb79fihWAu7fJvEkadfgAZR7" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 19:45:56 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --pDMD9ljJetb79fihWAu7fJvEkadfgAZR7 Content-Type: multipart/mixed; boundary="KOSZKB6KyIK0b2YcZqnng7c3ABlSFyo5A"; protected-headers="v1" From: Bryan Drewery To: Dimitry Andric Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <0d1b366a-59ab-65e9-58a6-5474f538cad2@FreeBSD.org> Subject: Re: svn commit: r335733 - in head: bin/csh gnu/usr.bin/cc/cc1 gnu/usr.bin/cc/cc1plus gnu/usr.bin/cc/cc_tools lib/libmagic lib/libpam/static_libpam lib/ncurses/ncurses share/syscons/scrnmaps stand/mips/... References: <201806271929.w5RJTGwa049250@repo.freebsd.org> <1903115A-F018-4075-961A-65689595FBEE@FreeBSD.org> In-Reply-To: <1903115A-F018-4075-961A-65689595FBEE@FreeBSD.org> --KOSZKB6KyIK0b2YcZqnng7c3ABlSFyo5A Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 6/27/2018 12:35 PM, Dimitry Andric wrote: > On 27 Jun 2018, at 21:29, Bryan Drewery wrote: >> >> Author: bdrewery >> Date: Wed Jun 27 19:29:15 2018 >> New Revision: 335733 >> URL: https://svnweb.freebsd.org/changeset/base/335733 >> >> Log: >> Don't use CCACHE for linking. >> >> MFC after: 2 weeks >> Sponsored by: Dell EMC >> >> Modified: >> head/bin/csh/Makefile >> head/gnu/usr.bin/cc/cc1/Makefile >> head/gnu/usr.bin/cc/cc1plus/Makefile >> head/gnu/usr.bin/cc/cc_tools/Makefile >> head/lib/libmagic/Makefile >> head/lib/libpam/static_libpam/Makefile >> head/lib/ncurses/ncurses/Makefile >> head/share/syscons/scrnmaps/Makefile >> head/stand/mips/beri/boot2/Makefile >> head/usr.bin/vi/catalog/Makefile >> >> Modified: head/bin/csh/Makefile >> =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/bin/csh/Makefile Wed Jun 27 19:28:37 2018 (r335732) >> +++ head/bin/csh/Makefile Wed Jun 27 19:29:15 2018 (r335733) >> @@ -113,7 +113,7 @@ build-tools: gethost >> >> gethost: gethost.c sh.err.h tc.const.h sh.h ${BUILD_TOOLS_META} >> @rm -f ${.TARGET} >> - ${CC} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \ >> + ${CC:N${CCACHE_BIN}} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//= } \ >> ${TCSHDIR}/gethost.c >=20 > Looks like a good candidate for a common macro, say CC_NOCACHE, CC_REAL= > or something like that? :) Yeah probably. I'd paint it CC_LINK. --=20 Regards, Bryan Drewery --KOSZKB6KyIK0b2YcZqnng7c3ABlSFyo5A-- --pDMD9ljJetb79fihWAu7fJvEkadfgAZR7 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 iQEcBAEBAgAGBQJbM+ltAAoJEDXXcbtuRpfPImIIALnXQE3al/0EzfV18jGu18m4 iB9vCQf2YObMpwv6EI3CTPj2th48xiZN3kiYfPjqr4z/1QrzjT6JOnYh9O9ts8WS AFJtjSAThypATr5xOGZSj3Im3r4B4M0c0v2bgX08AYFzyXAwvTDTCsuyqqk20aUi FSFAzvJudfEy1QphCFxR2z3PjD9gzAtrqDEPjex3N0aZzCKkcgekeGY4ozbu51aG 0/fvSnALa7dd8BHGuCxv+FLmQhBD1ysXuPmrHj0zRIEd+prGnQE0PjgB5bkdiaiQ 61ExTeK1SNdzBoIgDHbMnnmenO0OKpfZV153tgnIVWZ38MnVDTyx3gkElrSZopo= =d98K -----END PGP SIGNATURE----- --pDMD9ljJetb79fihWAu7fJvEkadfgAZR7-- From owner-svn-src-all@freebsd.org Wed Jun 27 20:50:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D57E10103D2; Wed, 27 Jun 2018 20:50:24 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C53F97218E; Wed, 27 Jun 2018 20:50:23 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A15D4209; Wed, 27 Jun 2018 20:50:23 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RKoN8Z090249; Wed, 27 Jun 2018 20:50:23 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RKoNMi090248; Wed, 27 Jun 2018 20:50:23 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201806272050.w5RKoNMi090248@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 27 Jun 2018 20:50:23 +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: r335735 - stable/11/stand/forth X-SVN-Group: stable-11 X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: stable/11/stand/forth X-SVN-Commit-Revision: 335735 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 20:50:24 -0000 Author: dteske Date: Wed Jun 27 20:50:23 2018 New Revision: 335735 URL: https://svnweb.freebsd.org/changeset/base/335735 Log: MFC r335607: check-password.4th(8): Fix manual [in]accuracy SVN r280384 updated the maximum password length from 16 bytes to 255. The manual was not updated to reflect this. Sponsored by: Smule, Inc. Modified: stable/11/stand/forth/check-password.4th.8 Directory Properties: stable/11/ (props changed) Modified: stable/11/stand/forth/check-password.4th.8 ============================================================================== --- stable/11/stand/forth/check-password.4th.8 Wed Jun 27 19:42:55 2018 (r335734) +++ stable/11/stand/forth/check-password.4th.8 Wed Jun 27 20:50:23 2018 (r335735) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2011-2015 Devin Teske +.\" Copyright (c) 2011-2018 Devin Teske .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 20, 2015 +.Dd June 24, 2018 .Dt CHECK-PASSWORD.4TH 8 .Os .Sh NAME @@ -91,7 +91,7 @@ for additional information. The environment variables that effect its behavior are: .Bl -tag -width bootlock_password -offset indent .It Va bootlock_password -Sets the bootlock password (up to 16 characters long) that is required by +Sets the bootlock password (up to 255 characters long) that is required by .Ic check-password to be entered before the system is allowed to boot. .It Va geom_eli_passphrase_prompt @@ -100,7 +100,7 @@ kernel for later mounting of .Xr geli 8 encrypted root device(s). .It Va password -Sets the password (up to 16 characters long) that is required by +Sets the password (up to 255 characters long) that is required by .Ic check-password before the user is allowed to visit the boot menu. .El From owner-svn-src-all@freebsd.org Wed Jun 27 20:53:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5C2901010826; Wed, 27 Jun 2018 20:53:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB99A7276B; Wed, 27 Jun 2018 20:53:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id F07EC10AFD2; Wed, 27 Jun 2018 16:53:22 -0400 (EDT) Subject: Re: svn commit: r335733 - in head: bin/csh gnu/usr.bin/cc/cc1 gnu/usr.bin/cc/cc1plus gnu/usr.bin/cc/cc_tools lib/libmagic lib/libpam/static_libpam lib/ncurses/ncurses share/syscons/scrnmaps stand/mips/... To: Bryan Drewery , Dimitry Andric References: <201806271929.w5RJTGwa049250@repo.freebsd.org> <1903115A-F018-4075-961A-65689595FBEE@FreeBSD.org> <0d1b366a-59ab-65e9-58a6-5474f538cad2@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org From: John Baldwin Message-ID: Date: Wed, 27 Jun 2018 13:53:20 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <0d1b366a-59ab-65e9-58a6-5474f538cad2@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Wed, 27 Jun 2018 16:53:23 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 20:53:30 -0000 On 6/27/18 12:45 PM, Bryan Drewery wrote: > On 6/27/2018 12:35 PM, Dimitry Andric wrote: >> On 27 Jun 2018, at 21:29, Bryan Drewery wrote: >>> >>> Author: bdrewery >>> Date: Wed Jun 27 19:29:15 2018 >>> New Revision: 335733 >>> URL: https://svnweb.freebsd.org/changeset/base/335733 >>> >>> Log: >>> Don't use CCACHE for linking. >>> >>> MFC after: 2 weeks >>> Sponsored by: Dell EMC >>> >>> Modified: >>> head/bin/csh/Makefile >>> head/gnu/usr.bin/cc/cc1/Makefile >>> head/gnu/usr.bin/cc/cc1plus/Makefile >>> head/gnu/usr.bin/cc/cc_tools/Makefile >>> head/lib/libmagic/Makefile >>> head/lib/libpam/static_libpam/Makefile >>> head/lib/ncurses/ncurses/Makefile >>> head/share/syscons/scrnmaps/Makefile >>> head/stand/mips/beri/boot2/Makefile >>> head/usr.bin/vi/catalog/Makefile >>> >>> Modified: head/bin/csh/Makefile >>> ============================================================================== >>> --- head/bin/csh/Makefile Wed Jun 27 19:28:37 2018 (r335732) >>> +++ head/bin/csh/Makefile Wed Jun 27 19:29:15 2018 (r335733) >>> @@ -113,7 +113,7 @@ build-tools: gethost >>> >>> gethost: gethost.c sh.err.h tc.const.h sh.h ${BUILD_TOOLS_META} >>> @rm -f ${.TARGET} >>> - ${CC} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \ >>> + ${CC:N${CCACHE_BIN}} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \ >>> ${TCSHDIR}/gethost.c >> >> Looks like a good candidate for a common macro, say CC_NOCACHE, CC_REAL >> or something like that? :) > > Yeah probably. I'd paint it CC_LINK. CCLD was my initial thought *duck* -- John Baldwin From owner-svn-src-all@freebsd.org Wed Jun 27 20:54:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2387C1010988; Wed, 27 Jun 2018 20:54:14 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C1DFC728C4; Wed, 27 Jun 2018 20:54:13 +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 8A23539A; Wed, 27 Jun 2018 20:54:13 +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 w5RKsDgY095102; Wed, 27 Jun 2018 20:54:13 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RKsD9T095101; Wed, 27 Jun 2018 20:54:13 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201806272054.w5RKsD9T095101@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 27 Jun 2018 20:54: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: r335736 - stable/11/usr.bin/seq X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/usr.bin/seq X-SVN-Commit-Revision: 335736 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 20:54:14 -0000 Author: kevans Date: Wed Jun 27 20:54:12 2018 New Revision: 335736 URL: https://svnweb.freebsd.org/changeset/base/335736 Log: MFC r333122: seq(1): Provide some long options These match GNU seq(1) names where applicable for compatibility purposes. Modified: stable/11/usr.bin/seq/seq.1 stable/11/usr.bin/seq/seq.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/seq/seq.1 ============================================================================== --- stable/11/usr.bin/seq/seq.1 Wed Jun 27 20:50:23 2018 (r335735) +++ stable/11/usr.bin/seq/seq.1 Wed Jun 27 20:54:12 2018 (r335736) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 12, 2016 +.Dd April 30, 2018 .Dt SEQ 1 .Os .Sh NAME @@ -72,7 +72,7 @@ The .Nm utility accepts the following options: .Bl -tag -width Ar -.It Fl f Ar format +.It Fl f Ar format , Fl -format Ar format Use a .Xr printf 3 style @@ -98,7 +98,7 @@ defined in .St -ansiC . The default is .Cm %g . -.It Fl s Ar string +.It Fl s Ar string , Fl -separator Ar string Use .Ar string to separate numbers. @@ -109,7 +109,7 @@ defined in .St -ansiC . The default is .Cm \en . -.It Fl t Ar string +.It Fl t Ar string , Fl -terminator Ar string Use .Ar string to terminate sequence of numbers. @@ -121,7 +121,7 @@ defined in This option is useful when the default separator does not contain a .Cm \en . -.It Fl w +.It Fl w , Fl -fixed-width Equalize the widths of all numbers by padding with zeros as necessary. This option has no effect with the .Fl f Modified: stable/11/usr.bin/seq/seq.c ============================================================================== --- stable/11/usr.bin/seq/seq.c Wed Jun 27 20:50:23 2018 (r335735) +++ stable/11/usr.bin/seq/seq.c Wed Jun 27 20:54:12 2018 (r335736) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -67,6 +68,15 @@ static int valid_format(const char *); static char *generate_format(double, double, double, int, char); static char *unescape(char *); +static const struct option long_opts[] = +{ + {"format", required_argument, NULL, 'f'}, + {"separator", required_argument, NULL, 's'}, + {"terminator", required_argument, NULL, 't'}, + {"equal-width", no_argument, NULL, 'w'}, + {NULL, no_argument, NULL, 0} +}; + /* * The seq command will print out a numeric sequence from 1, the default, * to a user specified upper limit by 1. The lower bound and increment @@ -97,7 +107,7 @@ main(int argc, char *argv[]) * least they trip up getopt(3). */ while ((optind < argc) && !numeric(argv[optind]) && - (c = getopt(argc, argv, "f:hs:t:w")) != -1) { + (c = getopt_long(argc, argv, "+f:hs:t:w", long_opts, NULL)) != -1) { switch (c) { case 'f': /* format (plan9) */ From owner-svn-src-all@freebsd.org Wed Jun 27 20:55:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB0801010B24; Wed, 27 Jun 2018 20:55:50 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6C1B072AAB; Wed, 27 Jun 2018 20:55:50 +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 4D03139B; Wed, 27 Jun 2018 20:55:50 +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 w5RKto8T095265; Wed, 27 Jun 2018 20:55:50 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RKtnIH095263; Wed, 27 Jun 2018 20:55:49 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201806272055.w5RKtnIH095263@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 27 Jun 2018 20:55:49 +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: r335737 - stable/11/usr.bin/uniq X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/usr.bin/uniq X-SVN-Commit-Revision: 335737 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 20:55:51 -0000 Author: kevans Date: Wed Jun 27 20:55:49 2018 New Revision: 335737 URL: https://svnweb.freebsd.org/changeset/base/335737 Log: MFC r333156: uniq(1): Add some long options These match GNU uniq(1) where appropriate for compatibility's sake. While here, re-sort options alphabetically by the short-option. Modified: stable/11/usr.bin/uniq/uniq.1 stable/11/usr.bin/uniq/uniq.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/uniq/uniq.1 ============================================================================== --- stable/11/usr.bin/uniq/uniq.1 Wed Jun 27 20:54:12 2018 (r335736) +++ stable/11/usr.bin/uniq/uniq.1 Wed Jun 27 20:55:49 2018 (r335737) @@ -31,7 +31,7 @@ .\" From: @(#)uniq.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd May 15, 2017 +.Dd May 1, 2018 .Dt UNIQ 1 .Os .Sh NAME @@ -71,34 +71,34 @@ so it may be necessary to sort the files first. .Pp The following options are available: .Bl -tag -width Ds -.It Fl c +.It Fl c , Fl -count Precede each output line with the count of the number of times the line occurred in the input, followed by a single space. -.It Fl d +.It Fl d , Fl -repeated Only output lines that are repeated in the input. -.It Fl f Ar num +.It Fl f Ar num , Fl -skip-fields Ar num Ignore the first .Ar num fields in each input line when doing comparisons. A field is a string of non-blank characters separated from adjacent fields by blanks. Field numbers are one based, i.e., the first field is field one. -.It Fl s Ar chars +.It Fl i , Fl -ignore-case +Case insensitive comparison of lines. +.It Fl s Ar chars , Fl -skip-chars Ar chars Ignore the first .Ar chars characters in each input line when doing comparisons. If specified in conjunction with the -.Fl f +.Fl f , Fl -unique option, the first .Ar chars characters after the first .Ar num fields will be ignored. Character numbers are one based, i.e., the first character is character one. -.It Fl u +.It Fl u , Fl -unique Only output lines that are not repeated in the input. -.It Fl i -Case insensitive comparison of lines. .\".It Fl Ns Ar n .\"(Deprecated; replaced by .\".Fl f ) . Modified: stable/11/usr.bin/uniq/uniq.c ============================================================================== --- stable/11/usr.bin/uniq/uniq.c Wed Jun 27 20:54:12 2018 (r335736) +++ stable/11/usr.bin/uniq/uniq.c Wed Jun 27 20:55:49 2018 (r335737) @@ -49,6 +49,7 @@ static const char rcsid[] = #include #include #include +#include #include #include #include @@ -65,6 +66,17 @@ static const char rcsid[] = static int cflag, dflag, uflag, iflag; static int numchars, numfields, repeats; +static const struct option long_opts[] = +{ + {"count", no_argument, NULL, 'c'}, + {"repeated", no_argument, NULL, 'd'}, + {"skip-fields", required_argument, NULL, 'f'}, + {"ignore-case", no_argument, NULL, 'i'}, + {"skip-chars", required_argument, NULL, 's'}, + {"unique", no_argument, NULL, 'u'}, + {NULL, no_argument, NULL, 0} +}; + static FILE *file(const char *, const char *); static wchar_t *convert(const char *); static int inlcmp(const char *, const char *); @@ -98,7 +110,8 @@ main (int argc, char *argv[]) (void) setlocale(LC_ALL, ""); obsolete(argv); - while ((ch = getopt(argc, argv, "cdif:s:u")) != -1) + while ((ch = getopt_long(argc, argv, "+cdif:s:u", long_opts, + NULL)) != -1) switch (ch) { case 'c': cflag = 1; From owner-svn-src-all@freebsd.org Wed Jun 27 21:00:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3A0B1010E36; Wed, 27 Jun 2018 21:00:10 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9576E72D79; Wed, 27 Jun 2018 21:00:10 +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 772293A0; Wed, 27 Jun 2018 21:00:10 +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 w5RL0Amr095653; Wed, 27 Jun 2018 21:00:10 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RL0A9F095651; Wed, 27 Jun 2018 21:00:10 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201806272100.w5RL0A9F095651@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 27 Jun 2018 21:00:10 +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: r335738 - stable/11/usr.bin/cmp X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/usr.bin/cmp X-SVN-Commit-Revision: 335738 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 21:00:11 -0000 Author: kevans Date: Wed Jun 27 21:00:09 2018 New Revision: 335738 URL: https://svnweb.freebsd.org/changeset/base/335738 Log: MFC r333157: cmp(1): Provide some long options These match GNU cmp(1) for compatibility where applicable. Future work might implement the -i option from GNU cmp(1) to express skip either in terms of both files or of the form "SKIP1:SKIP2" rather than specifying them as additional arguments to cmp(1). Modified: stable/11/usr.bin/cmp/cmp.1 stable/11/usr.bin/cmp/cmp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/cmp/cmp.1 ============================================================================== --- stable/11/usr.bin/cmp/cmp.1 Wed Jun 27 20:55:49 2018 (r335737) +++ stable/11/usr.bin/cmp/cmp.1 Wed Jun 27 21:00:09 2018 (r335738) @@ -31,7 +31,7 @@ .\" @(#)cmp.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd November 18, 2013 +.Dd May 1, 2018 .Dt CMP 1 .Os .Sh NAME @@ -59,10 +59,10 @@ The following options are available: .Bl -tag -width indent .It Fl h Do not follow symbolic links. -.It Fl l +.It Fl l , Fl -verbose Print the byte number (decimal) and the differing byte values (octal) for each difference. -.It Fl s +.It Fl s , Fl -silent , Fl -quiet Print nothing for differing files; return exit status only. .It Fl x Modified: stable/11/usr.bin/cmp/cmp.c ============================================================================== --- stable/11/usr.bin/cmp/cmp.c Wed Jun 27 20:55:49 2018 (r335737) +++ stable/11/usr.bin/cmp/cmp.c Wed Jun 27 21:00:09 2018 (r335738) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -57,6 +58,14 @@ __FBSDID("$FreeBSD$"); int lflag, sflag, xflag, zflag; +static const struct option long_opts[] = +{ + {"verbose", no_argument, NULL, 'l'}, + {"silent", no_argument, NULL, 's'}, + {"quiet", no_argument, NULL, 's'}, + {NULL, no_argument, NULL, 0} +}; + static void usage(void); int @@ -68,7 +77,7 @@ main(int argc, char *argv[]) const char *file1, *file2; oflag = O_RDONLY; - while ((ch = getopt(argc, argv, "hlsxz")) != -1) + while ((ch = getopt_long(argc, argv, "+hlsxz", long_opts, NULL)) != -1) switch (ch) { case 'h': /* Don't follow symlinks */ oflag |= O_NOFOLLOW; From owner-svn-src-all@freebsd.org Wed Jun 27 21:03:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B6EF10111BD; Wed, 27 Jun 2018 21:03:06 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1B0057318E; Wed, 27 Jun 2018 21:03:06 +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 EF970531; Wed, 27 Jun 2018 21:03:05 +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 w5RL35Hh000640; Wed, 27 Jun 2018 21:03:05 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RL35eU000639; Wed, 27 Jun 2018 21:03:05 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201806272103.w5RL35eU000639@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 27 Jun 2018 21:03:05 +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: r335739 - in stable/11/usr.bin/seq: . tests X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/11/usr.bin/seq: . tests X-SVN-Commit-Revision: 335739 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 21:03:06 -0000 Author: kevans Date: Wed Jun 27 21:03:05 2018 New Revision: 335739 URL: https://svnweb.freebsd.org/changeset/base/335739 Log: MFC r330086, r333155: seq(1) improvements MFC r330086 (cem): seq(1): Consistently include 'last' for non-integers The source of error is a rounded increment being too large and thus the loop steps slightly past 'last'. Perform a final comparison using the formatted string values (truncated precision) to determine if we still need to print the 'last' value. MFC r333155: seq(1): Move long_opts up with globals PR: 217149 Added: stable/11/usr.bin/seq/tests/ - copied from r330086, head/usr.bin/seq/tests/ Modified: stable/11/usr.bin/seq/Makefile stable/11/usr.bin/seq/seq.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/seq/Makefile ============================================================================== --- stable/11/usr.bin/seq/Makefile Wed Jun 27 21:00:09 2018 (r335738) +++ stable/11/usr.bin/seq/Makefile Wed Jun 27 21:03:05 2018 (r335739) @@ -1,8 +1,13 @@ # $NetBSD: Makefile,v 1.3 2009/04/14 22:15:26 lukem Exp $ # $FreeBSD$ +.include + PROG= seq LIBADD= m + +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests .include Modified: stable/11/usr.bin/seq/seq.c ============================================================================== --- stable/11/usr.bin/seq/seq.c Wed Jun 27 21:00:09 2018 (r335738) +++ stable/11/usr.bin/seq/seq.c Wed Jun 27 21:03:05 2018 (r335739) @@ -57,6 +57,15 @@ __FBSDID("$FreeBSD$"); static const char *decimal_point = "."; /* default */ static char default_format[] = { "%g" }; /* default */ +static const struct option long_opts[] = +{ + {"format", required_argument, NULL, 'f'}, + {"separator", required_argument, NULL, 's'}, + {"terminator", required_argument, NULL, 't'}, + {"equal-width", no_argument, NULL, 'w'}, + {NULL, no_argument, NULL, 0} +}; + /* Prototypes */ static double e_atof(const char *); @@ -68,15 +77,6 @@ static int valid_format(const char *); static char *generate_format(double, double, double, int, char); static char *unescape(char *); -static const struct option long_opts[] = -{ - {"format", required_argument, NULL, 'f'}, - {"separator", required_argument, NULL, 's'}, - {"terminator", required_argument, NULL, 't'}, - {"equal-width", no_argument, NULL, 'w'}, - {NULL, no_argument, NULL, 0} -}; - /* * The seq command will print out a numeric sequence from 1, the default, * to a user specified upper limit by 1. The lower bound and increment @@ -86,17 +86,20 @@ static const struct option long_opts[] = int main(int argc, char *argv[]) { - int c = 0, errflg = 0; - int equalize = 0; - double first = 1.0; - double last = 0.0; - double incr = 0.0; + const char *sep, *term; struct lconv *locale; - char *fmt = NULL; - const char *sep = "\n"; - const char *term = NULL; - char pad = ZERO; + char pad, *fmt, *cur_print, *last_print; + double first, last, incr, last_shown_value, cur, step; + int c, errflg, equalize; + pad = ZERO; + fmt = NULL; + first = 1.0; + last = incr = last_shown_value = 0.0; + c = errflg = equalize = 0; + sep = "\n"; + term = NULL; + /* Determine the locale's decimal point. */ locale = localeconv(); if (locale && locale->decimal_point && locale->decimal_point[0] != '\0') @@ -179,17 +182,32 @@ main(int argc, char *argv[]) } else fmt = generate_format(first, incr, last, equalize, pad); - if (incr > 0) { - for (; first <= last; first += incr) { - printf(fmt, first); - fputs(sep, stdout); - } - } else { - for (; first >= last; first += incr) { - printf(fmt, first); - fputs(sep, stdout); - } + for (step = 1, cur = first; incr > 0 ? cur <= last : cur >= last; + cur = first + incr * step++) { + printf(fmt, cur); + fputs(sep, stdout); + last_shown_value = cur; } + + /* + * Did we miss the last value of the range in the loop above? + * + * We might have, so check if the printable version of the last + * computed value ('cur') and desired 'last' value are equal. If they + * are equal after formatting truncation, but 'cur' and + * 'last_shown_value' are not equal, it means the exit condition of the + * loop held true due to a rounding error and we still need to print + * 'last'. + */ + asprintf(&cur_print, fmt, cur); + asprintf(&last_print, fmt, last); + if (strcmp(cur_print, last_print) == 0 && cur != last_shown_value) { + fputs(last_print, stdout); + fputs(sep, stdout); + } + free(cur_print); + free(last_print); + if (term != NULL) fputs(term, stdout); From owner-svn-src-all@freebsd.org Wed Jun 27 21:04:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E02E10112FC; Wed, 27 Jun 2018 21:04:30 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DBF35732FA; Wed, 27 Jun 2018 21:04:29 +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 BC9B1533; Wed, 27 Jun 2018 21:04:29 +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 w5RL4Th2000767; Wed, 27 Jun 2018 21:04:29 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RL4TKx000766; Wed, 27 Jun 2018 21:04:29 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201806272104.w5RL4TKx000766@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 27 Jun 2018 21:04: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: r335740 - stable/11/lib/libc/sys X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/lib/libc/sys X-SVN-Commit-Revision: 335740 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 21:04:30 -0000 Author: kevans Date: Wed Jun 27 21:04:29 2018 New Revision: 335740 URL: https://svnweb.freebsd.org/changeset/base/335740 Log: MFC r333192: fcntl(2): Vaguely document that ENOTTY is possible + examples Modified: stable/11/lib/libc/sys/fcntl.2 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/fcntl.2 ============================================================================== --- stable/11/lib/libc/sys/fcntl.2 Wed Jun 27 21:03:05 2018 (r335739) +++ stable/11/lib/libc/sys/fcntl.2 Wed Jun 27 21:04:29 2018 (r335740) @@ -28,7 +28,7 @@ .\" @(#)fcntl.2 8.2 (Berkeley) 1/12/94 .\" $FreeBSD$ .\" -.Dd July 7, 2016 +.Dd May 2, 2018 .Dt FCNTL 2 .Os .Sh NAME @@ -572,6 +572,14 @@ process are already in use, or no file descriptors greater than or equal to .Fa arg are available. +.It Bq Er ENOTTY +The +.Fa fd +argument is not a valid file descriptor for the requested operation. +This may be the case if +.Fa fd +is a device node, or a descriptor returned by +.Xr kqueue 2 . .It Bq Er ENOLCK The argument .Fa cmd From owner-svn-src-all@freebsd.org Wed Jun 27 21:09:56 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 519831011B5E; Wed, 27 Jun 2018 21:09:56 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 02651736B8; Wed, 27 Jun 2018 21:09:56 +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 B7E28534; Wed, 27 Jun 2018 21:09:55 +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 w5RL9tHv001052; Wed, 27 Jun 2018 21:09:55 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RL9tvx001051; Wed, 27 Jun 2018 21:09:55 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201806272109.w5RL9tvx001051@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 27 Jun 2018 21:09:55 +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: r335741 - stable/11/share/man/man4 X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/share/man/man4 X-SVN-Commit-Revision: 335741 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 21:09:56 -0000 Author: kevans Date: Wed Jun 27 21:09:55 2018 New Revision: 335741 URL: https://svnweb.freebsd.org/changeset/base/335741 Log: MFC r333221: rsu(4) does not require legal.realtek.license_ack=1 The rsu firmware license check has been disabled since r292756. Changes rsu(4) since the license ack is no longer required. While here, add `device rsufw` hint to the kernel configuration lines and add/update paths to the installed license file in both rsu(4) and rsufw(4). Modified: stable/11/share/man/man4/rsu.4 stable/11/share/man/man4/rsufw.4 Directory Properties: stable/11/ (props changed) Modified: stable/11/share/man/man4/rsu.4 ============================================================================== --- stable/11/share/man/man4/rsu.4 Wed Jun 27 21:04:29 2018 (r335740) +++ stable/11/share/man/man4/rsu.4 Wed Jun 27 21:09:55 2018 (r335741) @@ -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 October 15, 2015 +.Dd April 4, 2018 .Dt RSU 4 .Os .Sh NAME @@ -30,22 +30,15 @@ place the following lines in your kernel configuration .Cd "device ohci" .Cd "device usb" .Cd "device rsu" +.Cd "device rsufw" .Cd "device wlan" .Ed .Pp Alternatively, to load the driver as a module at boot time, -place the following line in +place the following lines in .Xr loader.conf 5 : .Bd -literal -offset indent if_rsu_load="YES" -.Ed -.Pp -After you have read the license in -.Pa /usr/share/doc/legal/realtek.LICENSE -you will want to add the following lines to -.Xr loader.conf 5 : -.Bd -literal -offset indent -legal.realtek.license_ack=1 rsu-rtl8712fw_load="YES" .Ed .Sh DESCRIPTION @@ -96,6 +89,12 @@ The driver can be configured at runtime with .Xr ifconfig 8 . .Sh FILES +.Bl -tag -width ".Pa /usr/share/doc/legal/realtek.LICENSE" -compact +.It Pa /usr/share/doc/legal/realtek.LICENSE +.Nm +firmware license +.El +.Pp The driver needs at least version 1.2 of the following firmware file, which is loaded when an interface is attached: .Pp Modified: stable/11/share/man/man4/rsufw.4 ============================================================================== --- stable/11/share/man/man4/rsufw.4 Wed Jun 27 21:04:29 2018 (r335740) +++ stable/11/share/man/man4/rsufw.4 Wed Jun 27 21:09:55 2018 (r335741) @@ -13,7 +13,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd July 21, 2013 +.Dd April 4, 2018 .Dt RSUFW 4 .Os .Sh NAME @@ -40,7 +40,7 @@ rsu-rtl8712fw_load="YES" This module provides the firmware for the Realtek RTL8188SU and RTL8192SU chip based USB WiFi adapters. Please read Realtek's license, -.Pa /usr/share/license/realtek . +.Pa /usr/share/doc/legal/realtek.LICENSE . .Sh SEE ALSO .Xr rsu 4 , .Xr firmware 9 From owner-svn-src-all@freebsd.org Wed Jun 27 21:11:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 25F4A1011D33; Wed, 27 Jun 2018 21:11:30 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CF336739F9; Wed, 27 Jun 2018 21:11:29 +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 975CB57C; Wed, 27 Jun 2018 21:11:29 +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 w5RLBTuK003655; Wed, 27 Jun 2018 21:11:29 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RLBTWe003652; Wed, 27 Jun 2018 21:11:29 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201806272111.w5RLBTWe003652@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 27 Jun 2018 21:11: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: r335742 - stable/11/usr.bin/sort X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/usr.bin/sort X-SVN-Commit-Revision: 335742 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 21:11:30 -0000 Author: kevans Date: Wed Jun 27 21:11:28 2018 New Revision: 335742 URL: https://svnweb.freebsd.org/changeset/base/335742 Log: MFC r335404: sort(1): Fix -m when only implicit stdin is used for input Observe: printf "a\nb\nc\n" > /tmp/foo # Next command results in no output cat /tmp/foo | sort -m # Next command results in proper output cat /tmp/foo | sort -m - # Also works: sort -m /tmp/foo Some const'ification was done to simplify the actual solution of adding "-" explicitly to the file list if we didn't have any file arguments left over. PR: 190099 Modified: stable/11/usr.bin/sort/file.c stable/11/usr.bin/sort/file.h stable/11/usr.bin/sort/sort.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/sort/file.c ============================================================================== --- stable/11/usr.bin/sort/file.c Wed Jun 27 21:09:55 2018 (r335741) +++ stable/11/usr.bin/sort/file.c Wed Jun 27 21:11:28 2018 (r335742) @@ -227,7 +227,7 @@ file_list_init(struct file_list *fl, bool tmp) * Add a file name to the list */ void -file_list_add(struct file_list *fl, char *fn, bool allocate) +file_list_add(struct file_list *fl, const char *fn, bool allocate) { if (fl && fn) { @@ -1116,7 +1116,7 @@ file_headers_merge(size_t fnum, struct file_header **f * stdout. */ static void -merge_files_array(size_t argc, char **argv, const char *fn_out) +merge_files_array(size_t argc, const char **argv, const char *fn_out) { if (argv && fn_out) { Modified: stable/11/usr.bin/sort/file.h ============================================================================== --- stable/11/usr.bin/sort/file.h Wed Jun 27 21:09:55 2018 (r335741) +++ stable/11/usr.bin/sort/file.h Wed Jun 27 21:11:28 2018 (r335742) @@ -66,7 +66,7 @@ struct file_reader; */ struct file_list { - char **fns; + const char * *fns; size_t count; size_t sz; bool tmp; @@ -108,7 +108,7 @@ char *new_tmp_file_name(void); void tmp_file_atexit(const char *tmp_file); void file_list_init(struct file_list *fl, bool tmp); -void file_list_add(struct file_list *fl, char *fn, bool allocate); +void file_list_add(struct file_list *fl, const char *fn, bool allocate); void file_list_populate(struct file_list *fl, int argc, char **argv, bool allocate); void file_list_clean(struct file_list *fl); Modified: stable/11/usr.bin/sort/sort.c ============================================================================== --- stable/11/usr.bin/sort/sort.c Wed Jun 27 21:09:55 2018 (r335741) +++ stable/11/usr.bin/sort/sort.c Wed Jun 27 21:11:28 2018 (r335742) @@ -1299,7 +1299,11 @@ main(int argc, char **argv) struct file_list fl; file_list_init(&fl, false); - file_list_populate(&fl, argc, argv, true); + /* No file arguments remaining means "read from stdin." */ + if (argc == 0) + file_list_add(&fl, "-", true); + else + file_list_populate(&fl, argc, argv, true); merge_files(&fl, outfile); file_list_clean(&fl); } From owner-svn-src-all@freebsd.org Wed Jun 27 21:13:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 05B421011FDF; Wed, 27 Jun 2018 21:13:20 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 921CE73C07; Wed, 27 Jun 2018 21:13:20 +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 71B1E6C4; Wed, 27 Jun 2018 21:13:20 +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 w5RLDKmp006215; Wed, 27 Jun 2018 21:13:20 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RLDKZG006214; Wed, 27 Jun 2018 21:13:20 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201806272113.w5RLDKZG006214@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 27 Jun 2018 21:13: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: r335743 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 335743 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 21:13:21 -0000 Author: kevans Date: Wed Jun 27 21:13:20 2018 New Revision: 335743 URL: https://svnweb.freebsd.org/changeset/base/335743 Log: MFC r335458: Add debug.verbose_sysinit tunable for VERBOSE_SYSINIT VERBOSE_SYSINIT is currently an all-or-nothing option. debug.verbose_sysinit adds an option to have the code compiled in but quiet by default so that getting this information from a device in the field doesn't necessarily require distributing a recompiled kernel. Its default is VERBOSE_SYSINIT's value as defined in the kernconf. As such, the default behavior for simply omitting or including this option is unchanged. Modified: stable/11/sys/kern/init_main.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/init_main.c ============================================================================== --- stable/11/sys/kern/init_main.c Wed Jun 27 21:11:28 2018 (r335742) +++ stable/11/sys/kern/init_main.c Wed Jun 27 21:13:20 2018 (r335743) @@ -117,6 +117,18 @@ int bootverbose = BOOTVERBOSE; SYSCTL_INT(_debug, OID_AUTO, bootverbose, CTLFLAG_RW, &bootverbose, 0, "Control the output of verbose kernel messages"); +#ifdef VERBOSE_SYSINIT +/* + * We'll use the defined value of VERBOSE_SYSINIT from the kernel config to + * dictate the default VERBOSE_SYSINIT behavior. Significant values for this + * option and associated tunable are: + * - 0, 'compiled in but silent by default' + * - 1, 'compiled in but verbose by default' (default) + */ +int verbose_sysinit = VERBOSE_SYSINIT; +TUNABLE_INT("debug.verbose_sysinit", &verbose_sysinit); +#endif + #ifdef INVARIANTS FEATURE(invariants, "Kernel compiled with INVARIANTS, may affect performance"); #endif @@ -264,7 +276,7 @@ restart: continue; #if defined(VERBOSE_SYSINIT) - if ((*sipp)->subsystem > last) { + if ((*sipp)->subsystem > last && verbose_sysinit != 0) { verbose = 1; last = (*sipp)->subsystem; printf("subsystem %x\n", last); From owner-svn-src-all@freebsd.org Wed Jun 27 21:22:01 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A1751012618; Wed, 27 Jun 2018 21:22:01 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 09428741EC; Wed, 27 Jun 2018 21:22:01 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DF090859; Wed, 27 Jun 2018 21:22:00 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RLM0Zr011172; Wed, 27 Jun 2018 21:22:00 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RLM0n4011171; Wed, 27 Jun 2018 21:22:00 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201806272122.w5RLM0n4011171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 27 Jun 2018 21:22:00 +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: r335744 - stable/10/sys/boot/forth X-SVN-Group: stable-10 X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: stable/10/sys/boot/forth X-SVN-Commit-Revision: 335744 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 21:22:01 -0000 Author: dteske Date: Wed Jun 27 21:22:00 2018 New Revision: 335744 URL: https://svnweb.freebsd.org/changeset/base/335744 Log: MFC r335607: check-password.4th(8): Fix manual [in]accuracy SVN r280384 updated the maximum password length from 16 bytes to 255. The manual was not updated to reflect this. Sponsored by: Smule, Inc. Modified: stable/10/sys/boot/forth/check-password.4th.8 Modified: stable/10/sys/boot/forth/check-password.4th.8 ============================================================================== --- stable/10/sys/boot/forth/check-password.4th.8 Wed Jun 27 21:13:20 2018 (r335743) +++ stable/10/sys/boot/forth/check-password.4th.8 Wed Jun 27 21:22:00 2018 (r335744) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2011-2015 Devin Teske +.\" Copyright (c) 2011-2018 Devin Teske .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 20, 2015 +.Dd June 24, 2018 .Dt CHECK-PASSWORD.4TH 8 .Os .Sh NAME @@ -91,7 +91,7 @@ for additional information. The environment variables that effect its behavior are: .Bl -tag -width bootlock_password -offset indent .It Va bootlock_password -Sets the bootlock password (up to 16 characters long) that is required by +Sets the bootlock password (up to 255 characters long) that is required by .Ic check-password to be entered before the system is allowed to boot. .It Va geom_eli_passphrase_prompt @@ -100,7 +100,7 @@ kernel for later mounting of .Xr geli 8 encrypted root device(s). .It Va password -Sets the password (up to 16 characters long) that is required by +Sets the password (up to 255 characters long) that is required by .Ic check-password before the user is allowed to visit the boot menu. .El From owner-svn-src-all@freebsd.org Wed Jun 27 21:22:49 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 467391012697; Wed, 27 Jun 2018 21:22:49 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EF7D974366; Wed, 27 Jun 2018 21:22:48 +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 D0A18879; Wed, 27 Jun 2018 21:22:48 +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 w5RLMm3i011248; Wed, 27 Jun 2018 21:22:48 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RLMmu7011247; Wed, 27 Jun 2018 21:22:48 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201806272122.w5RLMmu7011247@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 27 Jun 2018 21:22:48 +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: r335745 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 335745 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 21:22:49 -0000 Author: kevans Date: Wed Jun 27 21:22:48 2018 New Revision: 335745 URL: https://svnweb.freebsd.org/changeset/base/335745 Log: MFC r332395 (ian): Use explicit_bzero() when cleaning values out of the kenv Sometimes the values contain geli passphrases being communicated from loader(8) to the kernel, and some day the compiler may decide to start eliding calls to memset() for a pointer which is not dereferenced again before being passed to free(). Modified: stable/11/sys/kern/kern_environment.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_environment.c ============================================================================== --- stable/11/sys/kern/kern_environment.c Wed Jun 27 21:22:00 2018 (r335744) +++ stable/11/sys/kern/kern_environment.c Wed Jun 27 21:22:48 2018 (r335745) @@ -288,7 +288,7 @@ init_dynamic_kenv(void *data __unused) if (i < KENV_SIZE) { kenvp[i] = malloc(len, M_KENV, M_WAITOK); strcpy(kenvp[i++], cp); - memset(cp, 0, strlen(cp)); + explicit_bzero(cp, strlen(cp)); } else printf( "WARNING: too many kenv strings, ignoring %s\n", @@ -307,7 +307,7 @@ freeenv(char *env) { if (dynamic_kenv && env != NULL) { - memset(env, 0, strlen(env)); + explicit_bzero(env, strlen(env)); free(env, M_KENV); } } @@ -485,7 +485,7 @@ kern_unsetenv(const char *name) kenvp[i++] = kenvp[j]; kenvp[i] = NULL; mtx_unlock(&kenv_lock); - memset(oldenv, 0, strlen(oldenv)); + explicit_bzero(oldenv, strlen(oldenv)); free(oldenv, M_KENV); return (0); } From owner-svn-src-all@freebsd.org Wed Jun 27 21:25:17 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BEA310127FB; Wed, 27 Jun 2018 21:25:17 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 27FF074519; Wed, 27 Jun 2018 21:25:17 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id B8B5F2089C; Wed, 27 Jun 2018 21:25:16 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lj1-f176.google.com with SMTP id u6-v6so2738187lju.13; Wed, 27 Jun 2018 14:25:16 -0700 (PDT) X-Gm-Message-State: APt69E2b0YFPcdx3Da6Zl9D1rU0PyhB0mM77q8QNNE19a5PPJN+aa9LL PkJgumzVFvjGPX93HIbIfUReJSeo2CKYgRXUo+E= X-Google-Smtp-Source: AAOMgpdqTqpOVpug90zto9d9ydg4q3JdfL/T2vRrW/FbXieX1P4p8rJ1y1Vv9n2bTK4cOmGGbWHSJZUQtfozvgAEIXc= X-Received: by 2002:a2e:8051:: with SMTP id p17-v6mr5140539ljg.22.1530134715153; Wed, 27 Jun 2018 14:25:15 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:3c0f:0:0:0:0:0 with HTTP; Wed, 27 Jun 2018 14:24:54 -0700 (PDT) In-Reply-To: <201806272122.w5RLM0n4011171@repo.freebsd.org> References: <201806272122.w5RLM0n4011171@repo.freebsd.org> From: Kyle Evans Date: Wed, 27 Jun 2018 16:24:54 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r335744 - stable/10/sys/boot/forth To: Devin Teske Cc: src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 21:25:17 -0000 On Wed, Jun 27, 2018 at 4:22 PM, Devin Teske wrote: > Author: dteske > Date: Wed Jun 27 21:22:00 2018 > New Revision: 335744 > URL: https://svnweb.freebsd.org/changeset/base/335744 > > Log: > MFC r335607: check-password.4th(8): Fix manual [in]accuracy > > SVN r280384 updated the maximum password length from 16 bytes to 255. The > manual was not updated to reflect this. > > Sponsored by: Smule, Inc. > > Modified: > stable/10/sys/boot/forth/check-password.4th.8 > Hi, I think this should probably have been supplemented with a record-only merge of r335607 since it has actually been MFC'd, just in the old location. I'm not sure how much it matters, though, other than reflecting that this (general this; stable/10 commits) really wasn't a direct commit. Thanks, Kyle Evans From owner-svn-src-all@freebsd.org Wed Jun 27 21:36:50 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70B391012ECE; Wed, 27 Jun 2018 21:36:50 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1603974A3C; Wed, 27 Jun 2018 21:36:50 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E892FA12; Wed, 27 Jun 2018 21:36:49 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RLanBT016285; Wed, 27 Jun 2018 21:36:49 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RLanc3016284; Wed, 27 Jun 2018 21:36:49 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201806272136.w5RLanc3016284@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 27 Jun 2018 21:36:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335746 - head/bin/sh X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/bin/sh X-SVN-Commit-Revision: 335746 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 21:36:50 -0000 Author: bdrewery Date: Wed Jun 27 21:36:49 2018 New Revision: 335746 URL: https://svnweb.freebsd.org/changeset/base/335746 Log: Stop building intermediate .o files. These are not used to link the final tool anymore. At some point in the past the suffix rules changed to not link these in. The original reason for this in r19176 is unclear but seems to be related to mkdep. The .depend handling is still broken here as it is for all build tool patterns like this. Sponsored by: Dell EMC Modified: head/bin/sh/Makefile Modified: head/bin/sh/Makefile ============================================================================== --- head/bin/sh/Makefile Wed Jun 27 21:22:48 2018 (r335745) +++ head/bin/sh/Makefile Wed Jun 27 21:36:49 2018 (r335746) @@ -32,8 +32,7 @@ WFORMAT=0 ${.CURDIR:H}/test \ ${SRCTOP}/usr.bin/printf -CLEANFILES+= mknodes mknodes.o \ - mksyntax mksyntax.o +CLEANFILES+= mknodes mksyntax CLEANFILES+= ${GENSRCS} ${GENHDRS} build-tools: mknodes mksyntax @@ -43,13 +42,7 @@ builtins.h: .NOMETA builtins.c builtins.h: mkbuiltins builtins.def sh ${.CURDIR}/mkbuiltins ${.CURDIR} -# XXX this is just to stop the default .c rule being used, so that the -# intermediate object has a fixed name. -# XXX we have a default .c rule, but no default .o rule. -mknodes.o mksyntax.o: ${BUILD_TOOLS_META} - ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} -mknodes: mknodes.o ${BUILD_TOOLS_META} -mksyntax: mksyntax.o ${BUILD_TOOLS_META} +mknodes mksyntax: ${BUILD_TOOLS_META} .ORDER: nodes.c nodes.h nodes.h: .NOMETA From owner-svn-src-all@freebsd.org Wed Jun 27 21:36:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A791D1012EF9; Wed, 27 Jun 2018 21:36:58 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4481674B23; Wed, 27 Jun 2018 21:36:58 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E40AFA13; Wed, 27 Jun 2018 21:36:57 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RLavck016338; Wed, 27 Jun 2018 21:36:57 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RLav6U016337; Wed, 27 Jun 2018 21:36:57 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201806272136.w5RLav6U016337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 27 Jun 2018 21:36:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335747 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 335747 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 21:36:58 -0000 Author: bdrewery Date: Wed Jun 27 21:36:57 2018 New Revision: 335747 URL: https://svnweb.freebsd.org/changeset/base/335747 Log: LLVM_TARGET_ALL: Default LLVM_TARGET_ARM on for aarch64. This is needed for -m32 support which is used in the kernel cloudabi32 module. Tweak the style to make it easier to understand. MFC after: 2 weeks X-MFC-with: r335706 Reported by: Mark Millard Sponsored by: Dell EMC Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Wed Jun 27 21:36:49 2018 (r335746) +++ head/share/mk/src.opts.mk Wed Jun 27 21:36:57 2018 (r335747) @@ -259,15 +259,17 @@ __LLVM_TARGETS= \ sparc \ x86 __LLVM_TARGET_FILT= C/(amd64|i386)/x86/:S/sparc64/sparc/:S/arm64/aarch64/ -# Default the given TARGET_ARCH's LLVM_TARGET support to the value of -# MK_CLANG. +.for __llt in ${__LLVM_TARGETS} +# Default the given TARGET's LLVM_TARGET support to the value of MK_CLANG. +.if ${__TT:${__LLVM_TARGET_FILT}} == ${__llt} +__DEFAULT_DEPENDENT_OPTIONS+= LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/CLANG +# aarch64 needs arm for -m32 support. +.elif ${__TT} == "arm64" && ${__llt} == "arm" +__DEFAULT_DEPENDENT_OPTIONS+= LLVM_TARGET_ARM/LLVM_TARGET_AARCH64 # Default the rest of the LLVM_TARGETs to the value of MK_LLVM_TARGET_ALL # which is based on MK_CLANG. -.for __llt in ${__LLVM_TARGETS} -.if ${__llt} != ${__TT:${__LLVM_TARGET_FILT}} -__DEFAULT_DEPENDENT_OPTIONS+= LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/LLVM_TARGET_ALL .else -__DEFAULT_DEPENDENT_OPTIONS+= LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/CLANG +__DEFAULT_DEPENDENT_OPTIONS+= LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/LLVM_TARGET_ALL .endif .endfor From owner-svn-src-all@freebsd.org Wed Jun 27 21:57:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 646DF1013F56; Wed, 27 Jun 2018 21:57:24 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C25647566F; Wed, 27 Jun 2018 21:57:23 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [74.217.198.10] (port=63464 helo=[10.1.4.66]) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1fY970-00061E-1L; Wed, 27 Jun 2018 11:59:50 +0000 From: Devin Teske Message-Id: Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r335744 - stable/10/sys/boot/forth Date: Wed, 27 Jun 2018 14:57:19 -0700 In-Reply-To: Cc: Devin Teske , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org To: Kyle Evans References: <201806272122.w5RLM0n4011171@repo.freebsd.org> X-Mailer: Apple Mail (2.3273) Sender: devin@shxd.cx Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 21:57:24 -0000 > On Jun 27, 2018, at 2:24 PM, Kyle Evans wrote: >=20 > On Wed, Jun 27, 2018 at 4:22 PM, Devin Teske > wrote: >> Author: dteske >> Date: Wed Jun 27 21:22:00 2018 >> New Revision: 335744 >> URL: https://svnweb.freebsd.org/changeset/base/335744 >>=20 >> Log: >> MFC r335607: check-password.4th(8): Fix manual [in]accuracy >>=20 >> SVN r280384 updated the maximum password length from 16 bytes to = 255. The >> manual was not updated to reflect this. >>=20 >> Sponsored by: Smule, Inc. >>=20 >> Modified: >> stable/10/sys/boot/forth/check-password.4th.8 >>=20 >=20 > Hi, >=20 > I think this should probably have been supplemented with a record-only > merge of r335607 since it has actually been MFC'd, just in the old > location. I'm not sure how much it matters, though, other than > reflecting that this (general this; stable/10 commits) really wasn't a > direct commit. >=20 I kept trying that and kept getting "tree conflict" because it wants to = record info in stand which doesn't exist. Do you have a recommended way to achieve this that has a half-way chance = of working? --=20 Cheers, Devin= From owner-svn-src-all@freebsd.org Wed Jun 27 21:59:22 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE5C1101519D; Wed, 27 Jun 2018 21:59:22 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5C2D07582C; Wed, 27 Jun 2018 21:59:22 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lf0-f45.google.com (mail-lf0-f45.google.com [209.85.215.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id ECD8D20BA8; Wed, 27 Jun 2018 21:59:21 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lf0-f45.google.com with SMTP id m12-v6so2093924lfc.10; Wed, 27 Jun 2018 14:59:21 -0700 (PDT) X-Gm-Message-State: APt69E2svHH4Eb2KAEwXUTI8vOEwfLeGrrNbTxv1NhL7TUPhaAwUE8Sl U5uR41xcabmKNp9Cdlw/XASUeTnAUr3NTdU6COg= X-Google-Smtp-Source: AAOMgpfq/CsIhERajPJXzkmJEaRG69UG7GWZtqmIRCCxlhSVcknpzn8TGOqXMi7KW7P11CEHP06D4k25Glag932oQt4= X-Received: by 2002:a19:b598:: with SMTP id g24-v6mr5475331lfk.129.1530136760458; Wed, 27 Jun 2018 14:59:20 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:3c0f:0:0:0:0:0 with HTTP; Wed, 27 Jun 2018 14:58:59 -0700 (PDT) In-Reply-To: References: <201806272122.w5RLM0n4011171@repo.freebsd.org> From: Kyle Evans Date: Wed, 27 Jun 2018 16:58:59 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r335744 - stable/10/sys/boot/forth To: Devin Teske Cc: Kyle Evans , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 21:59:22 -0000 On Wed, Jun 27, 2018 at 4:57 PM, Devin Teske wrote: > > On Jun 27, 2018, at 2:24 PM, Kyle Evans wrote: > > On Wed, Jun 27, 2018 at 4:22 PM, Devin Teske wrote: > > Author: dteske > Date: Wed Jun 27 21:22:00 2018 > New Revision: 335744 > URL: https://svnweb.freebsd.org/changeset/base/335744 > > Log: > MFC r335607: check-password.4th(8): Fix manual [in]accuracy > > SVN r280384 updated the maximum password length from 16 bytes to 255. The > manual was not updated to reflect this. > > Sponsored by: Smule, Inc. > > Modified: > stable/10/sys/boot/forth/check-password.4th.8 > > > Hi, > > I think this should probably have been supplemented with a record-only > merge of r335607 since it has actually been MFC'd, just in the old > location. I'm not sure how much it matters, though, other than > reflecting that this (general this; stable/10 commits) really wasn't a > direct commit. > > > I kept trying that and kept getting "tree conflict" because it wants to > record info in stand which doesn't exist. > > Do you have a recommended way to achieve this that has a half-way chance of > working? > -- Target the base directory should be fine; assuming you're at base/: svn merge -c r335607 --record-only ^/head stable/11 From owner-svn-src-all@freebsd.org Wed Jun 27 22:00:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EEBB101538D; Wed, 27 Jun 2018 22:00:51 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2E67475A15; Wed, 27 Jun 2018 22:00:51 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1001FD59; Wed, 27 Jun 2018 22:00:51 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RM0oUg029239; Wed, 27 Jun 2018 22:00:50 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RM0oED029238; Wed, 27 Jun 2018 22:00:50 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201806272200.w5RM0oED029238@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 27 Jun 2018 22:00:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335748 - head/sys/kern X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/kern X-SVN-Commit-Revision: 335748 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 22:00:51 -0000 Author: glebius Date: Wed Jun 27 22:00:50 2018 New Revision: 335748 URL: https://svnweb.freebsd.org/changeset/base/335748 Log: Correct r335242. Use unsigned cast instead of abs(). Using abs() gives incorrect result when ticks has already wrapped, and are about to reach the cr_ticks value (cr_ticks - ticks < hz). Submitted by: bde Modified: head/sys/kern/subr_counter.c Modified: head/sys/kern/subr_counter.c ============================================================================== --- head/sys/kern/subr_counter.c Wed Jun 27 21:36:57 2018 (r335747) +++ head/sys/kern/subr_counter.c Wed Jun 27 22:00:50 2018 (r335748) @@ -140,7 +140,7 @@ counter_ratecheck(struct counter_rate *cr, int64_t lim val = cr->cr_over; now = ticks; - if (abs(now - cr->cr_ticks) >= hz) { + if ((u_int)(now - cr->cr_ticks) >= hz) { /* * Time to clear the structure, we are in the next second. * First try unlocked read, and then proceed with atomic. @@ -151,7 +151,7 @@ counter_ratecheck(struct counter_rate *cr, int64_t lim * Check if other thread has just went through the * reset sequence before us. */ - if (abs(now - cr->cr_ticks) >= hz) { + if ((u_int)(now - cr->cr_ticks) >= hz) { val = counter_u64_fetch(cr->cr_rate); counter_u64_zero(cr->cr_rate); cr->cr_over = 0; From owner-svn-src-all@freebsd.org Wed Jun 27 22:02:01 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E930910154B2; Wed, 27 Jun 2018 22:02:00 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 98CB675D5C; Wed, 27 Jun 2018 22:02:00 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 79F7BDB2; Wed, 27 Jun 2018 22:02:00 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RM20FC030810; Wed, 27 Jun 2018 22:02:00 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RM20hk030808; Wed, 27 Jun 2018 22:02:00 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201806272202.w5RM20hk030808@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 27 Jun 2018 22:02:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335749 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: glebius X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 335749 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 22:02:01 -0000 Author: glebius Date: Wed Jun 27 22:01:59 2018 New Revision: 335749 URL: https://svnweb.freebsd.org/changeset/base/335749 Log: Check the inp_flags under inp lock. Looks like the race was hidden before, the conversion of tcbinfo to CK_LIST have uncovered it. Modified: head/sys/netinet/tcp_subr.c Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Wed Jun 27 22:00:50 2018 (r335748) +++ head/sys/netinet/tcp_subr.c Wed Jun 27 22:01:59 2018 (r335749) @@ -2019,9 +2019,11 @@ tcp_drain(void) */ INP_INFO_WLOCK(&V_tcbinfo); CK_LIST_FOREACH(inpb, V_tcbinfo.ipi_listhead, inp_list) { - if (inpb->inp_flags & INP_TIMEWAIT) - continue; INP_WLOCK(inpb); + if (inpb->inp_flags & INP_TIMEWAIT) { + INP_WUNLOCK(inpb); + continue; + } if ((tcpb = intotcpcb(inpb)) != NULL) { tcp_reass_flush(tcpb); tcp_clean_sackreport(tcpb); From owner-svn-src-all@freebsd.org Wed Jun 27 22:15:52 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E05AF1016017; Wed, 27 Jun 2018 22:15:51 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 80AE37636B; Wed, 27 Jun 2018 22:15:51 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 536B1106D; Wed, 27 Jun 2018 22:15:51 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RMFptV036788; Wed, 27 Jun 2018 22:15:51 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RMFpNY036787; Wed, 27 Jun 2018 22:15:51 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201806272215.w5RMFpNY036787@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Wed, 27 Jun 2018 22:15:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335750 - head X-SVN-Group: head X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 335750 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 22:15:52 -0000 Author: dteske Date: Wed Jun 27 22:15:50 2018 New Revision: 335750 URL: https://svnweb.freebsd.org/changeset/base/335750 Log: Fix typo in top-level Makefile Submitted by: Ben Widawsky MFC after: 3 days X-MFC-to: stable/11 stable/10 Sponsored by: Smule, Inc. Differential Revision: https://reviews.freebsd.org/P186 Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Wed Jun 27 22:01:59 2018 (r335749) +++ head/Makefile Wed Jun 27 22:15:50 2018 (r335750) @@ -205,7 +205,7 @@ _MAKEOBJDIRPREFIX!= /usr/bin/env -i PATH=${PATH} ${MAK # We often need to use the tree's version of make to build it. # Choices add to complexity though. # We cannot blindly use a make which may not be the one we want -# so be exlicit - until all choice is removed. +# so be explicit - until all choice is removed. WANT_MAKE= bmake .if !empty(.MAKE.MODE:Mmeta) # 20160604 - support missing-meta,missing-filemon and performance improvements From owner-svn-src-all@freebsd.org Wed Jun 27 22:52:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0EE61019758; Wed, 27 Jun 2018 22:52:32 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 93F60773E8; Wed, 27 Jun 2018 22:52:32 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 753A816D0; Wed, 27 Jun 2018 22:52:32 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RMqWNM056852; Wed, 27 Jun 2018 22:52:32 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RMqWZW056851; Wed, 27 Jun 2018 22:52:32 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201806272252.w5RMqWZW056851@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Wed, 27 Jun 2018 22:52: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: r335751 - stable/11/etc/mtree X-SVN-Group: stable-11 X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: stable/11/etc/mtree X-SVN-Commit-Revision: 335751 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 22:52:33 -0000 Author: bdrewery Date: Wed Jun 27 22:52:32 2018 New Revision: 335751 URL: https://svnweb.freebsd.org/changeset/base/335751 Log: MFC r330090: Add 'usr.bin/seq' to tests mtree after r330086 PR: 217149 Modified: stable/11/etc/mtree/BSD.tests.dist Directory Properties: stable/11/ (props changed) Modified: stable/11/etc/mtree/BSD.tests.dist ============================================================================== --- stable/11/etc/mtree/BSD.tests.dist Wed Jun 27 22:15:50 2018 (r335750) +++ stable/11/etc/mtree/BSD.tests.dist Wed Jun 27 22:52:32 2018 (r335751) @@ -696,6 +696,8 @@ regress.multitest.out .. .. + seq + .. soelim .. stat From owner-svn-src-all@freebsd.org Wed Jun 27 23:01:04 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4DCFA1019D66; Wed, 27 Jun 2018 23:01:04 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DCBB8776E7; Wed, 27 Jun 2018 23:01:03 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [74.217.198.10] (port=1314 helo=[10.1.4.66]) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1fYA6X-0006er-6t; Wed, 27 Jun 2018 13:03:25 +0000 From: Devin Teske Message-Id: Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r335744 - stable/10/sys/boot/forth Date: Wed, 27 Jun 2018 16:00:55 -0700 In-Reply-To: Cc: Devin Teske , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org To: Kyle Evans References: <201806272122.w5RLM0n4011171@repo.freebsd.org> X-Mailer: Apple Mail (2.3273) Sender: devin@shxd.cx Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 23:01:04 -0000 > On Jun 27, 2018, at 2:58 PM, Kyle Evans wrote: >=20 > On Wed, Jun 27, 2018 at 4:57 PM, Devin Teske > wrote: >>=20 >> On Jun 27, 2018, at 2:24 PM, Kyle Evans wrote: >>=20 >> On Wed, Jun 27, 2018 at 4:22 PM, Devin Teske = wrote: >>=20 >> Author: dteske >> Date: Wed Jun 27 21:22:00 2018 >> New Revision: 335744 >> URL: https://svnweb.freebsd.org/changeset/base/335744 >>=20 >> Log: >> MFC r335607: check-password.4th(8): Fix manual [in]accuracy >>=20 >> SVN r280384 updated the maximum password length from 16 bytes to 255. = The >> manual was not updated to reflect this. >>=20 >> Sponsored by: Smule, Inc. >>=20 >> Modified: >> stable/10/sys/boot/forth/check-password.4th.8 >>=20 >>=20 >> Hi, >>=20 >> I think this should probably have been supplemented with a = record-only >> merge of r335607 since it has actually been MFC'd, just in the old >> location. I'm not sure how much it matters, though, other than >> reflecting that this (general this; stable/10 commits) really wasn't = a >> direct commit. >>=20 >>=20 >> I kept trying that and kept getting "tree conflict" because it wants = to >> record info in stand which doesn't exist. >>=20 >> Do you have a recommended way to achieve this that has a half-way = chance of >> working? >> -- >=20 > Target the base directory should be fine; assuming you're at base/: >=20 > svn merge -c r335607 --record-only ^/head stable/11 stable/11 ??? --=20 Devin From owner-svn-src-all@freebsd.org Wed Jun 27 23:02:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D17D91019FBC; Wed, 27 Jun 2018 23:02:19 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8433E77A0E; Wed, 27 Jun 2018 23:02:19 +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 655D5184C; Wed, 27 Jun 2018 23:02:19 +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 w5RN2JQv062315; Wed, 27 Jun 2018 23:02:19 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RN2J3a062314; Wed, 27 Jun 2018 23:02:19 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201806272302.w5RN2J3a062314@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Wed, 27 Jun 2018 23:02: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: r335752 - stable/11/tools/build/mk X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/tools/build/mk X-SVN-Commit-Revision: 335752 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 23:02:20 -0000 Author: kevans Date: Wed Jun 27 23:02:18 2018 New Revision: 335752 URL: https://svnweb.freebsd.org/changeset/base/335752 Log: MFC r335467: Don't remove loader.conf(5) when built WITHOUT_FORTH The new stand/ structure installs loader.conf(5) and defaults/loader.conf regardless of interpreter. The only thing gating installation now is MK_BOOT. Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/11/ (props changed) Modified: stable/11/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/11/tools/build/mk/OptionalObsoleteFiles.inc Wed Jun 27 22:52:32 2018 (r335751) +++ stable/11/tools/build/mk/OptionalObsoleteFiles.inc Wed Jun 27 23:02:18 2018 (r335752) @@ -2306,7 +2306,6 @@ OLD_FILES+=usr/share/man/man8/fdcontrol.8.gz .endif .if ${MK_FORTH} == no -OLD_FILES+=usr/share/man/man5/loader.conf.5.gz OLD_FILES+=usr/share/man/man8/beastie.4th.8.gz OLD_FILES+=usr/share/man/man8/brand.4th.8.gz OLD_FILES+=usr/share/man/man8/check-password.4th.8.gz From owner-svn-src-all@freebsd.org Wed Jun 27 23:04:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 936B3101A24A; Wed, 27 Jun 2018 23:04:02 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 38ACC77BE9; Wed, 27 Jun 2018 23:04:02 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lf0-f42.google.com (mail-lf0-f42.google.com [209.85.215.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id C89A8212BA; Wed, 27 Jun 2018 23:04:01 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lf0-f42.google.com with SMTP id n24-v6so2753805lfh.3; Wed, 27 Jun 2018 16:04:01 -0700 (PDT) X-Gm-Message-State: APt69E0fY1DNpGdcCERgqe/Rb2+6+RR0WkbT+AD4bx9bgt0T3qe9qMgU pwjIdDcj5duSTzsBsB4BHmoNFUcSZ/O9xmfX8YE= X-Google-Smtp-Source: AAOMgpefPplGAZAOQmsXspaqkXNxdPo3nfIrkfLLnd0Mf4O1/Cca/LpWx4Uk9gjyBIboIO6urYDDNwGC4qL0wC4KKhI= X-Received: by 2002:a19:ce51:: with SMTP id e78-v6mr4829629lfg.99.1530140640336; Wed, 27 Jun 2018 16:04:00 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:3c0f:0:0:0:0:0 with HTTP; Wed, 27 Jun 2018 16:03:39 -0700 (PDT) In-Reply-To: References: <201806272122.w5RLM0n4011171@repo.freebsd.org> From: Kyle Evans Date: Wed, 27 Jun 2018 18:03:39 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r335744 - stable/10/sys/boot/forth To: Devin Teske Cc: Kyle Evans , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 23:04:02 -0000 On Wed, Jun 27, 2018 at 6:00 PM, Devin Teske wrote: > > On Jun 27, 2018, at 2:58 PM, Kyle Evans wrote: > > On Wed, Jun 27, 2018 at 4:57 PM, Devin Teske wrote: > > > On Jun 27, 2018, at 2:24 PM, Kyle Evans wrote: > > On Wed, Jun 27, 2018 at 4:22 PM, Devin Teske wrote: > > Author: dteske > Date: Wed Jun 27 21:22:00 2018 > New Revision: 335744 > URL: https://svnweb.freebsd.org/changeset/base/335744 > > Log: > MFC r335607: check-password.4th(8): Fix manual [in]accuracy > > SVN r280384 updated the maximum password length from 16 bytes to 255. The > manual was not updated to reflect this. > > Sponsored by: Smule, Inc. > > Modified: > stable/10/sys/boot/forth/check-password.4th.8 > > > Hi, > > I think this should probably have been supplemented with a record-only > merge of r335607 since it has actually been MFC'd, just in the old > location. I'm not sure how much it matters, though, other than > reflecting that this (general this; stable/10 commits) really wasn't a > direct commit. > > > I kept trying that and kept getting "tree conflict" because it wants to > record info in stand which doesn't exist. > > Do you have a recommended way to achieve this that has a half-way chance of > working? > -- > > > Target the base directory should be fine; assuming you're at base/: > > svn merge -c r335607 --record-only ^/head stable/11 > > > stable/11 ??? > -- > Devin > s/11/10/ Works just the same. =) From owner-svn-src-all@freebsd.org Wed Jun 27 23:07:23 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CF8C101A46A; Wed, 27 Jun 2018 23:07:23 +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 "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 974F077D68; Wed, 27 Jun 2018 23:07:22 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from coleburn.home.andric.com (coleburn.home.andric.com [192.168.0.15]) (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 427EED3E1; Thu, 28 Jun 2018 01:07:21 +0200 (CEST) From: Dimitry Andric Message-Id: <5223ED3B-6286-4A1B-8DB7-86BF11417F96@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_6A998EB7-ED57-4FA0-8173-94C901A3FF1C"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) Subject: Re: svn commit: r335733 - in head: bin/csh gnu/usr.bin/cc/cc1 gnu/usr.bin/cc/cc1plus gnu/usr.bin/cc/cc_tools lib/libmagic lib/libpam/static_libpam lib/ncurses/ncurses share/syscons/scrnmaps stand/mips/... Date: Thu, 28 Jun 2018 01:05:41 +0200 In-Reply-To: Cc: Bryan Drewery , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org To: John Baldwin References: <201806271929.w5RJTGwa049250@repo.freebsd.org> <1903115A-F018-4075-961A-65689595FBEE@FreeBSD.org> <0d1b366a-59ab-65e9-58a6-5474f538cad2@FreeBSD.org> X-Mailer: Apple Mail (2.3445.8.2) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 23:07:23 -0000 --Apple-Mail=_6A998EB7-ED57-4FA0-8173-94C901A3FF1C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 27 Jun 2018, at 22:53, John Baldwin wrote: >=20 > On 6/27/18 12:45 PM, Bryan Drewery wrote: >> On 6/27/2018 12:35 PM, Dimitry Andric wrote: >>> On 27 Jun 2018, at 21:29, Bryan Drewery = wrote: >>>>=20 >>>> Author: bdrewery >>>> Date: Wed Jun 27 19:29:15 2018 >>>> New Revision: 335733 >>>> URL: https://svnweb.freebsd.org/changeset/base/335733 >>>>=20 >>>> Log: >>>> Don't use CCACHE for linking. >>>>=20 >>>> MFC after: 2 weeks >>>> Sponsored by: Dell EMC >>>>=20 >>>> Modified: >>>> head/bin/csh/Makefile >>>> head/gnu/usr.bin/cc/cc1/Makefile >>>> head/gnu/usr.bin/cc/cc1plus/Makefile >>>> head/gnu/usr.bin/cc/cc_tools/Makefile >>>> head/lib/libmagic/Makefile >>>> head/lib/libpam/static_libpam/Makefile >>>> head/lib/ncurses/ncurses/Makefile >>>> head/share/syscons/scrnmaps/Makefile >>>> head/stand/mips/beri/boot2/Makefile >>>> head/usr.bin/vi/catalog/Makefile >>>>=20 >>>> Modified: head/bin/csh/Makefile >>>> = =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/bin/csh/Makefile Wed Jun 27 19:28:37 2018 = (r335732) >>>> +++ head/bin/csh/Makefile Wed Jun 27 19:29:15 2018 = (r335733) >>>> @@ -113,7 +113,7 @@ build-tools: gethost >>>>=20 >>>> gethost: gethost.c sh.err.h tc.const.h sh.h ${BUILD_TOOLS_META} >>>> @rm -f ${.TARGET} >>>> - ${CC} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \ >>>> + ${CC:N${CCACHE_BIN}} -o gethost ${LDFLAGS} = ${CFLAGS:C/-DHAVE_ICONV//} \ >>>> ${TCSHDIR}/gethost.c >>>=20 >>> Looks like a good candidate for a common macro, say CC_NOCACHE, = CC_REAL >>> or something like that? :) >>=20 >> Yeah probably. I'd paint it CC_LINK. >=20 > CCLD was my initial thought *duck* Actually, that is not bad, and something I have seem more often. In the sense that ${LD} would be e.g. /usr/bin/ld or at least, a "low level" linker, while ${CCLD} would be the compiler driver doing the work. Maybe it is specifically for these cases, that you don't directly use ${CC}, but ${CCLD}... -Dimitry --Apple-Mail=_6A998EB7-ED57-4FA0-8173-94C901A3FF1C 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 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCWzQYRQAKCRCwXqMKLiCW o1W7AKD1Ca+ZFklz2ZjeRcF/mZddy6cQ/QCeLSq+JuNmemQx3IFByIgdcp3Fumg= =QkHv -----END PGP SIGNATURE----- --Apple-Mail=_6A998EB7-ED57-4FA0-8173-94C901A3FF1C-- From owner-svn-src-all@freebsd.org Wed Jun 27 23:09:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62415101A713; Wed, 27 Jun 2018 23:09:02 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E0A9D77F31; Wed, 27 Jun 2018 23:09:01 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id AA7B7520F; Wed, 27 Jun 2018 23:09:01 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 5E4FC9EBB; Wed, 27 Jun 2018 23:09:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id bH4M_IAHLlSL; Wed, 27 Jun 2018 23:08:57 +0000 (UTC) Subject: Re: svn commit: r335733 - in head: bin/csh gnu/usr.bin/cc/cc1 gnu/usr.bin/cc/cc1plus gnu/usr.bin/cc/cc_tools lib/libmagic lib/libpam/static_libpam lib/ncurses/ncurses share/syscons/scrnmaps stand/mips/... DKIM-Filter: OpenDKIM Filter v2.10.3 mail.xzibition.com 9169C9EAC To: Dimitry Andric , John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201806271929.w5RJTGwa049250@repo.freebsd.org> <1903115A-F018-4075-961A-65689595FBEE@FreeBSD.org> <0d1b366a-59ab-65e9-58a6-5474f538cad2@FreeBSD.org> <5223ED3B-6286-4A1B-8DB7-86BF11417F96@FreeBSD.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Autocrypt: addr=bdrewery@FreeBSD.org; prefer-encrypt=mutual; keydata= xsBNBFJphmsBCADiFgmS4bIzwZijrS31SjEMzg+n5zNellgM+HkShwehpqCiyhXdWrvH6dTZ a6u50pbUIX7doTR7W7PQHCjCTqtpwvcj0eulZva+iHFp+XrbgSFHn+VVXgkYP2MFySyZRFab D2qqzJBEJofhpv4HvY6uQI5K99pMqKr1Z/lHqsijYYu4RH2OfwB5PinId7xeldzWEonVoCr+ rfxzO/UrgA6v/3layGZcKNHFjmc3NqoN1DXtdaEHqtjIozzbndVkH6lkFvIpIrI6i5ox8pwp VxsxLCr/4Musd5CWgHiet5kSw2SzNeA8FbxdLYCpXNVu+uBACEbCUP+CSNy3NVfEUxsBABEB AAHNJEJyeWFuIERyZXdlcnkgPGJkcmV3ZXJ5QEZyZWVCU0Qub3JnPsLAgAQTAQoAKgIbAwUL CQgHAwUVCgkICwUWAwIBAAIeAQIXgAIZAQUCWujOIgUJCmB7NwAKCRA113G7bkaXz/xpB/9b /UWIPbieY1IeIuHF2pyYPE7Hytkh3HVsxMA0F5Ma2AYQsXZZeKNKWrF7RPyDyDwUklLHJkhm k3EfClBbHxf08kMIm1vWCJRtgxic9knY/bzYGiWMpHjg3cSd1XfrYH1autYqTZAjDwIkgOjU dR//Tbn4V36sY7y2jz+kdMVWvK53U32aZqiwBbCn4DPe1wSZcUs17mV/0uZdIoGdj74B1orN A/0py5vHYo6HcbBNoaR8pKRLf5VZNRsxqGIMhTucx4SJWcHpuRBWYyvJSFzwvxdK4ZD4Yqoc kFGPVtOXktVMai9exrLvP3G77fKMu8DI6j4QRU4wCesnHuIfRPFuzsBNBFJphmsBCACiVFPf kNfaFtUSuY0395ueo/rMyHPGPQ2iwvERFCpeFGSQSgagpenNHLpFQKTg/dl6FOoST5tqyxMq fyHGHDzzU51bvA/IfaGoNi/BIhTe/toZNMRvpcI3PLjiGcnJnuwCCbAVOAGdb+t5cZtpNdOI cKYmrYG3u9RiBpe6dTF+qLrD/8Bs1wjhduQ8fcNNgnkXu8xDH4ZxY0lIc3QgvYWp9vimlQe6 iKjUd2/DX28ETZcD5h6pYV331KMPTrEI0p0yvFijUZce8c1XHFyL1j9sBAha5qpszJl6Uq5i LolhKRcGfcdmtD72vHQjUYglUyudSJUVyo2gMYjdbiFKzJulABEBAAHCwGUEGAEKAA8CGwwF AlrozigFCQpgez0ACgkQNddxu25Gl8+m5Af/R3VEdxNMAcDIes9ADhQyofj20SPV3eCJ3HYR OebTSuNdOudGt4AAyA8Ks94u9hiIp5IGsc6RDsT9W7O2vgXhd6eV3eiY5Oif5xLIYrIDVu1Y 1GyRxRrPEn/QOqDN6uFZCPwK1aOapGcYCrO9lB0gMuTVfgHanU61rgC9tMX0OoAOyRd+V3/M 8lDNhjJdF/IpO3SdYzKfkwduy4qamw4Gphcx/RfYQvYLq/eDkP8d50PphWdboqWBwNRHayro W/07OGzfxM5fJ5mBsXPQcO2QcRjkyHf6xCM6Hi1qQL4OnXMNE/ZTX0lnOj1/pH93TlzSHZMP TaiiA/MBD3vGsXBmBg== Organization: FreeBSD Message-ID: <64cf10b3-d10b-77d1-f11f-b2a7c5542213@FreeBSD.org> Date: Wed, 27 Jun 2018 16:08:54 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <5223ED3B-6286-4A1B-8DB7-86BF11417F96@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WEeo83sTe4aDfZ7do2k183HpjXSuvX1bC" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 23:09:02 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --WEeo83sTe4aDfZ7do2k183HpjXSuvX1bC Content-Type: multipart/mixed; boundary="TcXLP9xI3d83lYBqekeDi8NQ0tflClLoe"; protected-headers="v1" From: Bryan Drewery To: Dimitry Andric , John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <64cf10b3-d10b-77d1-f11f-b2a7c5542213@FreeBSD.org> Subject: Re: svn commit: r335733 - in head: bin/csh gnu/usr.bin/cc/cc1 gnu/usr.bin/cc/cc1plus gnu/usr.bin/cc/cc_tools lib/libmagic lib/libpam/static_libpam lib/ncurses/ncurses share/syscons/scrnmaps stand/mips/... References: <201806271929.w5RJTGwa049250@repo.freebsd.org> <1903115A-F018-4075-961A-65689595FBEE@FreeBSD.org> <0d1b366a-59ab-65e9-58a6-5474f538cad2@FreeBSD.org> <5223ED3B-6286-4A1B-8DB7-86BF11417F96@FreeBSD.org> In-Reply-To: <5223ED3B-6286-4A1B-8DB7-86BF11417F96@FreeBSD.org> --TcXLP9xI3d83lYBqekeDi8NQ0tflClLoe Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 6/27/2018 4:05 PM, Dimitry Andric wrote: > On 27 Jun 2018, at 22:53, John Baldwin wrote: >> >> On 6/27/18 12:45 PM, Bryan Drewery wrote: >>> On 6/27/2018 12:35 PM, Dimitry Andric wrote: >>>> On 27 Jun 2018, at 21:29, Bryan Drewery wrote= : >>>>> >>>>> Author: bdrewery >>>>> Date: Wed Jun 27 19:29:15 2018 >>>>> New Revision: 335733 >>>>> URL: https://svnweb.freebsd.org/changeset/base/335733 >>>>> >>>>> Log: >>>>> Don't use CCACHE for linking. >>>>> >>>>> MFC after: 2 weeks >>>>> Sponsored by: Dell EMC >>>>> >>>>> Modified: >>>>> head/bin/csh/Makefile >>>>> head/gnu/usr.bin/cc/cc1/Makefile >>>>> head/gnu/usr.bin/cc/cc1plus/Makefile >>>>> head/gnu/usr.bin/cc/cc_tools/Makefile >>>>> head/lib/libmagic/Makefile >>>>> head/lib/libpam/static_libpam/Makefile >>>>> head/lib/ncurses/ncurses/Makefile >>>>> head/share/syscons/scrnmaps/Makefile >>>>> head/stand/mips/beri/boot2/Makefile >>>>> head/usr.bin/vi/catalog/Makefile >>>>> >>>>> Modified: head/bin/csh/Makefile >>>>> =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/bin/csh/Makefile Wed Jun 27 19:28:37 2018 (r335732) >>>>> +++ head/bin/csh/Makefile Wed Jun 27 19:29:15 2018 (r335733) >>>>> @@ -113,7 +113,7 @@ build-tools: gethost >>>>> >>>>> gethost: gethost.c sh.err.h tc.const.h sh.h ${BUILD_TOOLS_META} >>>>> @rm -f ${.TARGET} >>>>> - ${CC} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \ >>>>> + ${CC:N${CCACHE_BIN}} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICON= V//} \ >>>>> ${TCSHDIR}/gethost.c >>>> >>>> Looks like a good candidate for a common macro, say CC_NOCACHE, CC_R= EAL >>>> or something like that? :) >>> >>> Yeah probably. I'd paint it CC_LINK. >> >> CCLD was my initial thought *duck* >=20 > Actually, that is not bad, and something I have seem more often. In th= e > sense that ${LD} would be e.g. /usr/bin/ld or at least, a "low level" > linker, while ${CCLD} would be the compiler driver doing the work. > Maybe it is specifically for these cases, that you don't directly use > ${CC}, but ${CCLD}... >=20 +1 --=20 Regards, Bryan Drewery --TcXLP9xI3d83lYBqekeDi8NQ0tflClLoe-- --WEeo83sTe4aDfZ7do2k183HpjXSuvX1bC 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 iQEcBAEBAgAGBQJbNBkHAAoJEDXXcbtuRpfPnuQH/jLqf/yAi1FES5Zpqq2k4tnb DxPx4h7FGXXJgWRZMiNxy+fdBMlVMTi+QWZj8IMykPKLVlXPiBwaQcxmm4HItvYR PPml72RC9thPllYZyybUvs+2yzUcUT/AbITUHQcnqwtnVCMLsiMusi0oSgxLrAr2 jS8DA/spC1YQ8cPA7N5JdB5rgKMjKbjiNpsR2Uk+UizOemDnyqhQK7tR9K0X8I49 AiQLRcsZltQk2Nza1ow941kvIgBzWYsKSMlrxBYl4frhOiPE1nbxRNYHIAquNlj2 z56mmHf9OcRZ7Cu4rE7asvMLY03EpX3jp2QyFQcU1WMb6/U5IxCVbiv0slJVkqw= =TiuO -----END PGP SIGNATURE----- --WEeo83sTe4aDfZ7do2k183HpjXSuvX1bC-- From owner-svn-src-all@freebsd.org Wed Jun 27 23:23:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E50DE101B045; Wed, 27 Jun 2018 23:23:34 +0000 (UTC) (envelope-from philip@trouble.is) Received: from weatherwax.trouble.is (weatherwax.trouble.is [IPv6:2a00:dd80:3c::62e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "weatherwax.trouble.is", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7D441787D7; Wed, 27 Jun 2018 23:23:34 +0000 (UTC) (envelope-from philip@trouble.is) Received: from rincewind.trouble.is (rincewind.trouble.is [88.198.44.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "rincewind.trouble.is", Issuer "Let's Encrypt Authority X3" (verified OK)) by weatherwax.trouble.is (Postfix) with ESMTPS id 41GJr52QQzz3C1F; Wed, 27 Jun 2018 23:23:33 +0000 (UTC) Received: by rincewind.trouble.is (Postfix, from userid 1001) id 41GJr5001Yz302; Wed, 27 Jun 2018 23:23:32 +0000 (UTC) Date: Thu, 28 Jun 2018 01:23:32 +0200 From: Philip Paeps To: Xin LI Cc: Eitan Adler , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r335612 - head/sbin/dhclient Message-ID: <20180627232332.GB97785@rincewind.trouble.is> Mail-Followup-To: Xin LI , Eitan Adler , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" References: <201806250129.w5P1Ts5H017125@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: X-PGP-Fingerprint: 2CD1 92C2 6EE7 B7D1 F552 6619 31AE B9B5 FDBB CB0E X-Date: Today is Prickle-Prickle, the 33rd day of Confusion in the YOLD 3184 X-Phase-of-Moon: The Moon is Full X-Clacks-Overhead: GNU Terry Pratchett Organization: Happily Disorganized User-Agent: Mutt/1.10.0 (2018-05-17) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 23:23:35 -0000 On 2018-06-25 11:40:48 (-0700), Xin LI wrote: >On Sun, Jun 24, 2018 at 6:30 PM Eitan Adler wrote: >> Author: eadler >> Date: Mon Jun 25 01:29:54 2018 >> New Revision: 335612 >> URL: https://svnweb.freebsd.org/changeset/base/335612 >> >> Log: >> dhclient: recorrect __progname to getprogname() >> >> A more correct way to modernize code that uses __progname is to just >> replace each occurance of it with a call to getprogname(3) > >We should probably take a look at dhcpcd or ISC dhclient and teach >whatever we have chosen sandbox, etc. The current FreeBSD dhclient is >based on an ancient ISC dhclient fork with enhancements from OpenBSD >(but not being kept up-to-date with OpenBSD) and do not support IPv6, >etc. The IPv6 support in ISC dhclient is basically having dhclient and dhclient6, which is a real pain to configure. NetBSD's dhcpcd is probably the best DHCP client these days in terms of completeness. Philip -- Philip Paeps Senior Reality Engineer Ministry of Information From owner-svn-src-all@freebsd.org Wed Jun 27 23:44:38 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1E09101E565; Wed, 27 Jun 2018 23:44:38 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6610D7A8B1; Wed, 27 Jun 2018 23:44:38 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 39DAC1ECD; Wed, 27 Jun 2018 23:44:38 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5RNicME085249; Wed, 27 Jun 2018 23:44:38 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5RNibEr085247; Wed, 27 Jun 2018 23:44:37 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201806272344.w5RNibEr085247@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 27 Jun 2018 23:44:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335753 - head/sbin/devd X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sbin/devd X-SVN-Commit-Revision: 335753 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.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 23:44:39 -0000 Author: imp Date: Wed Jun 27 23:44:37 2018 New Revision: 335753 URL: https://svnweb.freebsd.org/changeset/base/335753 Log: Safely quote all variable expansions. When expanding a variable set by a message from the kernel, safely quote all arguments expanded when creating a command line for the shell. Reviewd by: Shawn Webb, Oliver Pinter, brd@ Sponsored by: Netflix Modified: head/sbin/devd/devd.cc head/sbin/devd/devd.hh Modified: head/sbin/devd/devd.cc ============================================================================== --- head/sbin/devd/devd.cc Wed Jun 27 23:02:18 2018 (r335752) +++ head/sbin/devd/devd.cc Wed Jun 27 23:44:37 2018 (r335753) @@ -636,6 +636,30 @@ config::is_id_char(char ch) const ch == '-')); } +string +config::shell_quote(const string &s) +{ + string buffer; + + /* + * Enclose the string in $' ' with escapes for ' and / characters making + * it one argument and ensuring the shell won't be affected by its + * usual list of candidates. + */ + buffer.reserve(s.length() * 3 / 2); + buffer += '$'; + buffer += '\''; + for (const char &c : s) { + if (c == '\'' || c == '\\') { + buffer += '\\'; + } + buffer += c; + } + buffer += '\''; + + return buffer; +} + void config::expand_one(const char *&src, string &dst) { @@ -650,8 +674,7 @@ config::expand_one(const char *&src, string &dst) } // $(foo) -> $(foo) - // Not sure if I want to support this or not, so for now we just pass - // it through. + // This is the escape hatch for passing down shell subcommands if (*src == '(') { dst += '$'; count = 1; @@ -677,7 +700,7 @@ config::expand_one(const char *&src, string &dst) do { buffer += *src++; } while (is_id_char(*src)); - dst.append(get_variable(buffer)); + dst.append(shell_quote(get_variable(buffer))); } const string Modified: head/sbin/devd/devd.hh ============================================================================== --- head/sbin/devd/devd.hh Wed Jun 27 23:02:18 2018 (r335752) +++ head/sbin/devd/devd.hh Wed Jun 27 23:44:37 2018 (r335753) @@ -173,6 +173,7 @@ class config (protected) void parse_one_file(const char *fn); void parse_files_in_dir(const char *dirname); void expand_one(const char *&src, std::string &dst); + std::string shell_quote(const std::string &s); bool is_id_char(char) const; bool chop_var(char *&buffer, char *&lhs, char *&rhs) const; private: From owner-svn-src-all@freebsd.org Wed Jun 27 23:52:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B5C63101EB06; Wed, 27 Jun 2018 23:52:24 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [198.45.61.253]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 3A1707AD46; Wed, 27 Jun 2018 23:52:24 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id w5RNqGsr031866 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 27 Jun 2018 16:52:16 -0700 (PDT) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id w5RNqGbc031865; Wed, 27 Jun 2018 16:52:16 -0700 (PDT) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Wed, 27 Jun 2018 16:52:16 -0700 From: Gleb Smirnoff To: Warner Losh Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r335690 - head/sys/kern Message-ID: <20180627235216.GO1165@FreeBSD.org> References: <201806270411.w5R4B9ZB078994@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201806270411.w5R4B9ZB078994@repo.freebsd.org> User-Agent: Mutt/1.10.0 (2018-05-17) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 27 Jun 2018 23:52:24 -0000 On Wed, Jun 27, 2018 at 04:11:09AM +0000, Warner Losh wrote: W> Author: imp W> Date: Wed Jun 27 04:11:09 2018 W> New Revision: 335690 W> URL: https://svnweb.freebsd.org/changeset/base/335690 W> W> Log: W> Fix devctl generation for core files. W> W> We have a problem with vn_fullpath_global when the file exists. Work W> around it by printing the full path if the core file name starts with /, W> or current working directory followed by the filename if not. Is this going to work when a core is dumped not at current working directory, but at absolute path? e.g. kern.corefile=/var/log/cores/%N.core Looks like the vn_fullpath_global needs to be fixed rather than problem workarounded. -- Gleb Smirnoff From owner-svn-src-all@freebsd.org Thu Jun 28 00:59:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7581D102226B for ; Thu, 28 Jun 2018 00:59:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 133E97CAC2 for ; Thu, 28 Jun 2018 00:59:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x231.google.com with SMTP id l19-v6so3616642ioj.5 for ; Wed, 27 Jun 2018 17:59:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=M1fOcgcU3OGgBM4fJDxJGmnOo+/jp648iV/weX/gJIc=; b=dpD5U9dfWXV//63PefC0pnSZfxtJZimMVXlxgZM9+k8XVmHwm2AsCuPOUpMyccCXLd CmjfQuzDk25JSYZn/E85MyVV76x+tam/rjmuvuM/Ldzg4+f2mLtLuVpX3LTy0AXiNa9g vrJRKk+Ob+Hw+jRT8ncuTUIouciYZHO59JxQKEkl+JZ2wMoFFzb7d1BOE9GedUfWiUab VLhuAHj7iMtNHMwr3yqayCoEGLfqGlEgIQutlf821muqR0uhEoTIqV9YCaBtkQjDxkUa XUVRJUXETZWA8mfU8OxZQGXs7iipYXU8aDJ073SJadaKTw39ot7wEoP7RrcTPL5IYxQh yY+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=M1fOcgcU3OGgBM4fJDxJGmnOo+/jp648iV/weX/gJIc=; b=V0ec2li7k0EA35ka7lNU/AW8IzbDBhodyZJ2VlThQ05Gsfi85GHrEHHXX7peVp4ZPE 5NIo7vHz/XnYMK3GY047liDXcnX7r5qBDvXJ08LiaZNiyTo2WLxX4HTJuRWhDYdQ+ALa 4+Fz5QuXRDnz7OhIEVc4hYXvnt/EG1DTUyaYR6J5x12SFLq0byHCRu30eH9dj3pr3YHp Zwu8xjLMBhiYVfVg8Z8Ho9Qqa8DXRMcRxyESLZEIPZixrsmGAiAqL08WBTKI0xaHPLbE fMREUUm0wBWTzyMZwS+TDSQ1yHEO1A4Nxq3Kp94tFAtcTOt7wxh78L3zVJN6Oe254PnV mwzg== X-Gm-Message-State: APt69E11jqm13OahgDcxhXR/7reEUyPtsw4rmgb5GxM2q1JFFztHzzJA SKQVjuDWE56JlJdUb/E27NbazzE1D1eaY5QXBcNQkg== X-Google-Smtp-Source: AAOMgpcrVMr7N3/1EPH/ISiAiHzExL+Kjj1G1QThOyltdUKtOqE6dktALVZLF0n4DMxn4DVN2NZkpVyUVOU882DA0jk= X-Received: by 2002:a6b:d40c:: with SMTP id l12-v6mr6981819iog.37.1530147557032; Wed, 27 Jun 2018 17:59:17 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:5945:0:0:0:0:0 with HTTP; Wed, 27 Jun 2018 17:59:16 -0700 (PDT) X-Originating-IP: [71.229.234.69] In-Reply-To: <20180627235216.GO1165@FreeBSD.org> References: <201806270411.w5R4B9ZB078994@repo.freebsd.org> <20180627235216.GO1165@FreeBSD.org> From: Warner Losh Date: Wed, 27 Jun 2018 18:59:16 -0600 X-Google-Sender-Auth: UuVTDEbodkD0gjjRDxL_SBhunMc Message-ID: Subject: Re: svn commit: r335690 - head/sys/kern To: Gleb Smirnoff Cc: Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 00:59:18 -0000 On Wed, Jun 27, 2018 at 5:52 PM, Gleb Smirnoff wrote: > On Wed, Jun 27, 2018 at 04:11:09AM +0000, Warner Losh wrote: > W> Author: imp > W> Date: Wed Jun 27 04:11:09 2018 > W> New Revision: 335690 > W> URL: https://svnweb.freebsd.org/changeset/base/335690 > W> > W> Log: > W> Fix devctl generation for core files. > W> > W> We have a problem with vn_fullpath_global when the file exists. Work > W> around it by printing the full path if the core file name starts with > /, > W> or current working directory followed by the filename if not. > > Is this going to work when a core is dumped not at current working > directory, > but at absolute path? e.g. kern.corefile=/var/log/cores/%N.core > Yes. That works. > Looks like the vn_fullpath_global needs to be fixed rather than problem > workarounded. > It can't be fixed reliably. FreeBSD does not and cannot map a vnode to a name. The only reason we're able to at all is due to the name cache. And when we recreate a file, we invalidate the name cache. And even if we fixed that, there's no guarantee the name cache won't get flushed before we translate the name.... Linux can do this because it keeps the path name associated with the inode. FreeBSD simply doesn't. Warner From owner-svn-src-all@freebsd.org Thu Jun 28 01:30:04 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2AFCB10253D9; Thu, 28 Jun 2018 01:30:04 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D07F27E07C; Thu, 28 Jun 2018 01:30:03 +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 B18682F12; Thu, 28 Jun 2018 01:30:03 +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 w5S1U37a036612; Thu, 28 Jun 2018 01:30:03 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5S1U39v036611; Thu, 28 Jun 2018 01:30:03 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201806280130.w5S1U39v036611@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 28 Jun 2018 01:30: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: r335754 - stable/11/stand/libsa X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: stable/11/stand/libsa X-SVN-Commit-Revision: 335754 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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 01:30:04 -0000 Author: kevans Date: Thu Jun 28 01:30:03 2018 New Revision: 335754 URL: https://svnweb.freebsd.org/changeset/base/335754 Log: MFC r334878: libsa(3): Correct statement about FS Write-support, name change - jhb implemented UFS write support a little over 16 years ago. - Update the library name while we're here. Modified: stable/11/stand/libsa/libsa.3 Directory Properties: stable/11/ (props changed) Modified: stable/11/stand/libsa/libsa.3 ============================================================================== --- stable/11/stand/libsa/libsa.3 Wed Jun 27 23:44:37 2018 (r335753) +++ stable/11/stand/libsa/libsa.3 Thu Jun 28 01:30:03 2018 (r335754) @@ -24,11 +24,11 @@ .\" .\" $FreeBSD$ .\" -.Dd February 1, 2018 -.Dt LIBSTAND 3 +.Dd February 22, 2018 +.Dt LIBSA 3 .Os .Sh NAME -.Nm libstand +.Nm libsa .Nd support library for standalone executables .Sh SYNOPSIS .In stand.h @@ -402,8 +402,8 @@ except that file creation is not supported, so the mod required. The .Fa flags -argument may be one of O_RDONLY, O_WRONLY and O_RDWR (although no file systems -currently support writing). +argument may be one of O_RDONLY, O_WRONLY and O_RDWR. +Only UFS currently supports writing. .It Xo .Ft int .Fn close "int fd" From owner-svn-src-all@freebsd.org Thu Jun 28 01:32:40 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F37AB10258F2; Thu, 28 Jun 2018 01:32:39 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CA4DE7E5CF; Thu, 28 Jun 2018 01:32:39 +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 AC8C030D3; Thu, 28 Jun 2018 01:32:39 +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 w5S1WdR7041406; Thu, 28 Jun 2018 01:32:39 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5S1WcXR041397; Thu, 28 Jun 2018 01:32:38 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201806280132.w5S1WcXR041397@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 28 Jun 2018 01:32:38 +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: r335755 - in stable/11/stand: common efi/loader i386/libi386 userboot/userboot X-SVN-Group: stable-11 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/11/stand: common efi/loader i386/libi386 userboot/userboot X-SVN-Commit-Revision: 335755 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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 01:32:40 -0000 Author: kevans Date: Thu Jun 28 01:32:37 2018 New Revision: 335755 URL: https://svnweb.freebsd.org/changeset/base/335755 Log: MFC r334882, r334884-r334885: loader(8) boot flag <-> environment fixes r334882: stand: Consolidate checking for boot flags driven by environment vars e.g. boot_mute, boot_single, boot_verbose, and friends; we checked for these in multiple places, consolidate into common/ and allow a setting of "NO" for any of these to turn them off. This allows systems with multiple loader.conf(5) or loader.conf(5) overlay systems to easily turn off variables in later processed files by setting it to NO. Reported by: Nick Wolff @ iXsystems Reviewed by: imp r334884: stand: Fix build after r334882 Not sure how this was not caught in Universe. r334885: stand: One more trivial consolidation (setting environment from howto) Modified: stable/11/stand/common/boot.c stable/11/stand/common/bootstrap.h stable/11/stand/common/metadata.c stable/11/stand/efi/loader/bootinfo.c stable/11/stand/efi/loader/main.c stable/11/stand/i386/libi386/bootinfo.c stable/11/stand/userboot/userboot/bootinfo.c Directory Properties: stable/11/ (props changed) Modified: stable/11/stand/common/boot.c ============================================================================== --- stable/11/stand/common/boot.c Thu Jun 28 01:30:03 2018 (r335754) +++ stable/11/stand/common/boot.c Thu Jun 28 01:32:37 2018 (r335755) @@ -32,6 +32,8 @@ __FBSDID("$FreeBSD$"); */ #include +#include +#include #include #include "bootstrap.h" @@ -156,6 +158,30 @@ autoboot_maybe() cp = getenv("autoboot_delay"); if ((autoboot_tried == 0) && ((cp == NULL) || strcasecmp(cp, "NO"))) autoboot(-1, NULL); /* try to boot automatically */ +} + +int +bootenv_flags() +{ + int i, howto; + char *val; + + for (howto = 0, i = 0; howto_names[i].ev != NULL; i++) { + val = getenv(howto_names[i].ev); + if (val != NULL && strcasecmp(val, "no") != 0) + howto |= howto_names[i].mask; + } + return (howto); +} + +void +bootenv_set(int howto) +{ + int i; + + for (i = 0; howto_names[i].ev != NULL; i++) + if (howto & howto_names[i].mask) + setenv(howto_names[i].ev, "YES", 1); } static int Modified: stable/11/stand/common/bootstrap.h ============================================================================== --- stable/11/stand/common/bootstrap.h Thu Jun 28 01:30:03 2018 (r335754) +++ stable/11/stand/common/bootstrap.h Thu Jun 28 01:32:37 2018 (r335755) @@ -63,6 +63,8 @@ int parse(int *argc, char ***argv, const char *str); /* boot.c */ void autoboot_maybe(void); int getrootmount(char *rootdev); +int bootenv_flags(void); +void bootenv_set(int); /* misc.c */ char *unargv(int argc, char *argv[]); Modified: stable/11/stand/common/metadata.c ============================================================================== --- stable/11/stand/common/metadata.c Thu Jun 28 01:30:03 2018 (r335754) +++ stable/11/stand/common/metadata.c Thu Jun 28 01:32:37 2018 (r335755) @@ -31,9 +31,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include -#include +#include #if defined(LOADER_FDT_SUPPORT) #include #endif @@ -100,7 +99,6 @@ md_getboothowto(char *kargs) char *cp; int howto; int active; - int i; /* Parse kargs */ howto = 0; @@ -153,10 +151,7 @@ md_getboothowto(char *kargs) } } - /* get equivalents from the environment */ - for (i = 0; howto_names[i].ev != NULL; i++) - if (getenv(howto_names[i].ev) != NULL) - howto |= howto_names[i].mask; + howto |= bootenv_flags(); #if defined(__sparc64__) if (md_bootserial() != -1) howto |= RB_SERIAL; Modified: stable/11/stand/efi/loader/bootinfo.c ============================================================================== --- stable/11/stand/efi/loader/bootinfo.c Thu Jun 28 01:30:03 2018 (r335754) +++ stable/11/stand/efi/loader/bootinfo.c Thu Jun 28 01:32:37 2018 (r335755) @@ -32,9 +32,8 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include -#include +#include #include #include #include @@ -72,15 +71,9 @@ bi_getboothowto(char *kargs) const char *sw; char *opts; char *console; - int howto, i; + int howto; - howto = 0; - - /* Get the boot options from the environment first. */ - for (i = 0; howto_names[i].ev != NULL; i++) { - if (getenv(howto_names[i].ev) != NULL) - howto |= howto_names[i].mask; - } + howto = bootenv_flags(); console = getenv("console"); if (console != NULL) { Modified: stable/11/stand/efi/loader/main.c ============================================================================== --- stable/11/stand/efi/loader/main.c Thu Jun 28 01:30:03 2018 (r335754) +++ stable/11/stand/efi/loader/main.c Thu Jun 28 01:32:37 2018 (r335755) @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -549,9 +548,8 @@ main(int argc, CHAR16 *argv[]) } } } - for (i = 0; howto_names[i].ev != NULL; i++) - if (howto & howto_names[i].mask) - setenv(howto_names[i].ev, "YES", 1); + + bootenv_set(howto); /* * XXX we need fallback to this stuff after looking at the ConIn, ConOut and ConErr variables Modified: stable/11/stand/i386/libi386/bootinfo.c ============================================================================== --- stable/11/stand/i386/libi386/bootinfo.c Thu Jun 28 01:30:03 2018 (r335754) +++ stable/11/stand/i386/libi386/bootinfo.c Thu Jun 28 01:32:37 2018 (r335755) @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include "bootstrap.h" #include "libi386.h" #include "btxv86.h" @@ -43,7 +42,6 @@ bi_getboothowto(char *kargs) char *curpos, *next, *string; int howto; int active; - int i; int vidconsole; /* Parse kargs */ @@ -96,10 +94,7 @@ bi_getboothowto(char *kargs) cp++; } } - /* get equivalents from the environment */ - for (i = 0; howto_names[i].ev != NULL; i++) - if (getenv(howto_names[i].ev) != NULL) - howto |= howto_names[i].mask; + howto |= bootenv_flags(); /* Enable selected consoles */ string = next = strdup(getenv("console")); @@ -134,11 +129,8 @@ bi_getboothowto(char *kargs) void bi_setboothowto(int howto) { - int i; - for (i = 0; howto_names[i].ev != NULL; i++) - if (howto & howto_names[i].mask) - setenv(howto_names[i].ev, "YES", 1); + bootenv_set(howto); } /* Modified: stable/11/stand/userboot/userboot/bootinfo.c ============================================================================== --- stable/11/stand/userboot/userboot/bootinfo.c Thu Jun 28 01:30:03 2018 (r335754) +++ stable/11/stand/userboot/userboot/bootinfo.c Thu Jun 28 01:32:37 2018 (r335755) @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include "bootstrap.h" #include "libuserboot.h" @@ -43,7 +42,6 @@ bi_getboothowto(char *kargs) char *curpos, *next, *string; int howto; int active; - int i; int vidconsole; /* Parse kargs */ @@ -96,11 +94,9 @@ bi_getboothowto(char *kargs) cp++; } } - /* get equivalents from the environment */ - for (i = 0; howto_names[i].ev != NULL; i++) - if (getenv(howto_names[i].ev) != NULL) - howto |= howto_names[i].mask; + howto |= bootenv_flags(); + /* Enable selected consoles */ string = next = strdup(getenv("console")); vidconsole = 0; @@ -134,11 +130,8 @@ bi_getboothowto(char *kargs) void bi_setboothowto(int howto) { - int i; - for (i = 0; howto_names[i].ev != NULL; i++) - if (howto & howto_names[i].mask) - setenv(howto_names[i].ev, "YES", 1); + bootenv_set(howto); } /* From owner-svn-src-all@freebsd.org Thu Jun 28 01:45:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3DA911026E13; Thu, 28 Jun 2018 01:45:54 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E6DF27F4E6; Thu, 28 Jun 2018 01:45:53 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C964F3298; Thu, 28 Jun 2018 01:45:53 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5S1jrcD046719; Thu, 28 Jun 2018 01:45:53 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5S1jrWE046718; Thu, 28 Jun 2018 01:45:53 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201806280145.w5S1jrWE046718@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 28 Jun 2018 01:45:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335756 - head/sbin/devd X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sbin/devd X-SVN-Commit-Revision: 335756 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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 01:45:54 -0000 Author: imp Date: Thu Jun 28 01:45:53 2018 New Revision: 335756 URL: https://svnweb.freebsd.org/changeset/base/335756 Log: We're not, yet, at C++11 capable on all our plaforms. Use a possibly slower, but C++98 compatibe way to iterate through the string. Noticed by: g++ 4.2.1 and Mark Millard Modified: head/sbin/devd/devd.cc Modified: head/sbin/devd/devd.cc ============================================================================== --- head/sbin/devd/devd.cc Thu Jun 28 01:32:37 2018 (r335755) +++ head/sbin/devd/devd.cc Thu Jun 28 01:45:53 2018 (r335756) @@ -640,6 +640,8 @@ string config::shell_quote(const string &s) { string buffer; + const char *cs, *ce; + char c; /* * Enclose the string in $' ' with escapes for ' and / characters making @@ -649,7 +651,10 @@ config::shell_quote(const string &s) buffer.reserve(s.length() * 3 / 2); buffer += '$'; buffer += '\''; - for (const char &c : s) { + cs = s.c_str(); + ce = cs + strlen(cs); + for (; cs < ce; cs++) { + c = *cs; if (c == '\'' || c == '\\') { buffer += '\\'; } From owner-svn-src-all@freebsd.org Thu Jun 28 01:49:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA90F10276F1; Thu, 28 Jun 2018 01:49:45 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DED07F8F4; Thu, 28 Jun 2018 01:49:45 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [64.201.244.132] (port=6587 helo=[10.0.0.104]) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1fYCjs-00088q-Dk; Wed, 27 Jun 2018 15:52:12 +0000 From: Devin Teske Message-Id: <16B9F36D-E92A-4FEC-B096-5E24A4E180FC@FreeBSD.org> Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r335690 - head/sys/kern Date: Wed, 27 Jun 2018 18:49:42 -0700 In-Reply-To: Cc: Devin Teske , Gleb Smirnoff , Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Warner Losh References: <201806270411.w5R4B9ZB078994@repo.freebsd.org> <20180627235216.GO1165@FreeBSD.org> X-Mailer: Apple Mail (2.3273) Sender: devin@shxd.cx Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 01:49:46 -0000 > On Jun 27, 2018, at 5:59 PM, Warner Losh wrote: >=20 >=20 >=20 > On Wed, Jun 27, 2018 at 5:52 PM, Gleb Smirnoff > wrote: > On Wed, Jun 27, 2018 at 04:11:09AM +0000, Warner Losh wrote: > W> Author: imp > W> Date: Wed Jun 27 04:11:09 2018 > W> New Revision: 335690 > W> URL: https://svnweb.freebsd.org/changeset/base/335690 = > W>=20 > W> Log: > W> Fix devctl generation for core files. > W> =20 > W> We have a problem with vn_fullpath_global when the file exists. = Work > W> around it by printing the full path if the core file name starts = with /, > W> or current working directory followed by the filename if not. >=20 > Is this going to work when a core is dumped not at current working = directory, > but at absolute path? e.g. kern.corefile=3D/var/log/cores/%N.core >=20 > Yes. That works. > =20 > Looks like the vn_fullpath_global needs to be fixed rather than = problem > workarounded. >=20 > It can't be fixed reliably. FreeBSD does not and cannot map a vnode to = a name. The only reason we're able to at all is due to the name cache. = And when we recreate a file, we invalidate the name cache. And even if = we fixed that, there's no guarantee the name cache won't get flushed = before we translate the name.... Linux can do this because it keeps the = path name associated with the inode. FreeBSD simply doesn't. >=20 They said it couldn't be done, but I personally have done it ... I map vnodes to full paths in dwatch. It's not impossible, just = implausibly hard. I derived my formula by reading the C code which was very twisty-turny = and rather hard to read at times (and I have been using C since 1998 on = everything from AIX and OSF/1 to HP/UX, Cygwin, MinGW, FreeBSD, = countless Linux-like things, IRIX, and a God-awful remainder of many = others; the vnode code was an adventure to say the least). You're welcome to see how it's done in /usr/libexec/dwatch/vop_create I load up a clause-local variable named "path" with a path constructed = from a pointer to a vnode structure argument to VOP_CREATE(9). The D code could easily be rewritten back into C to walk the vnode to = completion (compared to the D code which is bounded by depth-limit since = DTrace doesn't provide loops; so you have to, as I have done, use a = higher-level language wrapper to repeat the code to some desired limit; = dwatch defaulting to 64 for directory depth limit). Compared this, say, to vfssnoop.d from Chapter 5 of the DTrace book = which utilizes the vfs:namei:lookup: probes. My approach in dwatch is = far more accurate, produces full paths, and I've benchmarked it at lower = overhead with better results. Maybe some of this can be useful? If not, just ignore me. --=20 Devin= From owner-svn-src-all@freebsd.org Thu Jun 28 01:58:40 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C47B210288BD for ; Thu, 28 Jun 2018 01:58:40 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x232.google.com (mail-it0-x232.google.com [IPv6:2607:f8b0:4001:c0b::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F229801C9 for ; Thu, 28 Jun 2018 01:58:40 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x232.google.com with SMTP id 76-v6so10386175itx.4 for ; Wed, 27 Jun 2018 18:58:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=+2FQXYjqSn368aMueJWAwe/PnKhCJnEKWknA1mb2h+c=; b=Asx5CroqcJ9YaDk5yX2sjzt7swF+jNIYSOKmQbCtC/LXHIqe+sU6BSgVbxaPwsK28x HsJi1t6UOtLIDGgF1ZFzQhoHCogK/P15bGPduz4YMMbL/ojrjYOlR9x6gOOi4IxwvV5p Sn7QxOfgEKp88y9RcmbW6EtQcJMdydjY4jlnDtEZ08ORKr0+7TnkdBq6rk+osVE9tHvP oYpZlSY9Tre6PR2dIYkULHPu5SbPp93mJk0hHqXSiQTEGkhVSgYwNOpMdIkZya7dm1A7 ZU9mYXKlz9/zSiPxKZuopxGqgV1Xgi/zW2nqDt2EVy8+03EO8ZavOuQITMWeMTua4Z9f LMcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=+2FQXYjqSn368aMueJWAwe/PnKhCJnEKWknA1mb2h+c=; b=GZj5eQil6FwmIgwzWHmUBBmNMiEHSypP5wnLqb+SVfyKxMf0a0j7pkheU9an10Nhb9 RTsl9oOVK3e5W1V+gVAcM6ct/QuyMRVx4yujMnY+jPZHUbKNmJHMci2HwWUkPGhNZdzf hASI5XkIc4Ja+HsuyX2GdrvcX6PCwyqEiRFcP5xYJlZY3jKDRw1nddxO9Nf6DtHHYjbK tWbK4wMdtK8L6GQrNdvz0gnn1LTEi4MrkrYnnMs7x1dW49IFZt7kbA8T/Psg3owTq8B3 /C/7GMFshj8gYX/papVfrJ6CZKXYh58ASbLVEj9FFCPjyt9rEJuUkLUhDBkF9PTgp8Ld 3IDw== X-Gm-Message-State: APt69E2931K0VigK/UNEyx6lDxa3W0iWzE8O27/4sESzFHoNeFzcFKnV NFK1p6JhtHqXUr08hgrcc1r3MzCIYuoARdmPlzQMvw== X-Google-Smtp-Source: ADUXVKItvonLGMWGnrbE8mwmdpqiM1wdMd6PsGuHTL7ZVOelch++iRIkZYQ11CcdG9LOaLP/L87Q4LsrXJ/w35JB8qE= X-Received: by 2002:a24:e55:: with SMTP id 82-v6mr6678544ite.1.1530151119594; Wed, 27 Jun 2018 18:58:39 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:5945:0:0:0:0:0 with HTTP; Wed, 27 Jun 2018 18:58:39 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: <16B9F36D-E92A-4FEC-B096-5E24A4E180FC@FreeBSD.org> References: <201806270411.w5R4B9ZB078994@repo.freebsd.org> <20180627235216.GO1165@FreeBSD.org> <16B9F36D-E92A-4FEC-B096-5E24A4E180FC@FreeBSD.org> From: Warner Losh Date: Wed, 27 Jun 2018 19:58:39 -0600 X-Google-Sender-Auth: bezgI_KnQRx82Q1kTtb7Rp73ETA Message-ID: Subject: Re: svn commit: r335690 - head/sys/kern To: Devin Teske Cc: Gleb Smirnoff , Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 01:58:41 -0000 On Wed, Jun 27, 2018 at 7:49 PM, Devin Teske wrote: > > On Jun 27, 2018, at 5:59 PM, Warner Losh wrote: > > > > On Wed, Jun 27, 2018 at 5:52 PM, Gleb Smirnoff > wrote: > >> On Wed, Jun 27, 2018 at 04:11:09AM +0000, Warner Losh wrote: >> W> Author: imp >> W> Date: Wed Jun 27 04:11:09 2018 >> W> New Revision: 335690 >> W> URL: https://svnweb.freebsd.org/changeset/base/335690 >> W> >> W> Log: >> W> Fix devctl generation for core files. >> W> >> W> We have a problem with vn_fullpath_global when the file exists. Work >> W> around it by printing the full path if the core file name starts >> with /, >> W> or current working directory followed by the filename if not. >> >> Is this going to work when a core is dumped not at current working >> directory, >> but at absolute path? e.g. kern.corefile=/var/log/cores/%N.core >> > > Yes. That works. > > >> Looks like the vn_fullpath_global needs to be fixed rather than problem >> workarounded. >> > > It can't be fixed reliably. FreeBSD does not and cannot map a vnode to a > name. The only reason we're able to at all is due to the name cache. And > when we recreate a file, we invalidate the name cache. And even if we fixed > that, there's no guarantee the name cache won't get flushed before we > translate the name.... Linux can do this because it keeps the path name > associated with the inode. FreeBSD simply doesn't. > > > They said it couldn't be done, but I personally have done it ... > > I map vnodes to full paths in dwatch. It's not impossible, just > implausibly hard. > > I derived my formula by reading the C code which was very twisty-turny and > rather hard to read at times (and I have been using C since 1998 on > everything from AIX and OSF/1 to HP/UX, Cygwin, MinGW, FreeBSD, countless > Linux-like things, IRIX, and a God-awful remainder of many others; the > vnode code was an adventure to say the least). > > You're welcome to see how it's done in /usr/libexec/dwatch/vop_create > > I load up a clause-local variable named "path" with a path constructed > from a pointer to a vnode structure argument to VOP_CREATE(9). > > The D code could easily be rewritten back into C to walk the vnode to > completion (compared to the D code which is bounded by depth-limit since > DTrace doesn't provide loops; so you have to, as I have done, use a > higher-level language wrapper to repeat the code to some desired limit; > dwatch defaulting to 64 for directory depth limit). > > Compared this, say, to vfssnoop.d from Chapter 5 of the DTrace book which > utilizes the vfs:namei:lookup: probes. My approach in dwatch is far more > accurate, produces full paths, and I've benchmarked it at lower overhead > with better results. > > Maybe some of this can be useful? If not, just ignore me. > IMHO, there's no benefit from the crazy hoops than the super simple heuristic I did: if the path starts with / print it. If the path doesn't print cwd / and then the path. I look forward to seeing your conversion of the D to C that works, even when there's namespace cache pressure. Warner From owner-svn-src-all@freebsd.org Thu Jun 28 02:14:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8F06102A522; Thu, 28 Jun 2018 02:14:50 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 796D381074; Thu, 28 Jun 2018 02:14:50 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [64.201.244.132] (port=49179 helo=[10.0.0.104]) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1fYD89-0008Ms-Mn; Wed, 27 Jun 2018 16:17:17 +0000 From: Devin Teske Message-Id: <623F6077-0A89-4D35-9E83-76BF40CC290F@FreeBSD.org> Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r335690 - head/sys/kern Date: Wed, 27 Jun 2018 19:14:47 -0700 In-Reply-To: Cc: Devin Teske , Gleb Smirnoff , Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Warner Losh References: <201806270411.w5R4B9ZB078994@repo.freebsd.org> <20180627235216.GO1165@FreeBSD.org> <16B9F36D-E92A-4FEC-B096-5E24A4E180FC@FreeBSD.org> X-Mailer: Apple Mail (2.3273) Sender: devin@shxd.cx Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 02:14:51 -0000 > On Jun 27, 2018, at 6:58 PM, Warner Losh wrote: >=20 >=20 >=20 > On Wed, Jun 27, 2018 at 7:49 PM, Devin Teske > wrote: >=20 >> On Jun 27, 2018, at 5:59 PM, Warner Losh > wrote: >>=20 >>=20 >>=20 >> On Wed, Jun 27, 2018 at 5:52 PM, Gleb Smirnoff > wrote: >> On Wed, Jun 27, 2018 at 04:11:09AM +0000, Warner Losh wrote: >> W> Author: imp >> W> Date: Wed Jun 27 04:11:09 2018 >> W> New Revision: 335690 >> W> URL: https://svnweb.freebsd.org/changeset/base/335690 = >> W>=20 >> W> Log: >> W> Fix devctl generation for core files. >> W> =20 >> W> We have a problem with vn_fullpath_global when the file exists. = Work >> W> around it by printing the full path if the core file name starts = with /, >> W> or current working directory followed by the filename if not. >>=20 >> Is this going to work when a core is dumped not at current working = directory, >> but at absolute path? e.g. kern.corefile=3D/var/log/cores/%N.core >>=20 >> Yes. That works. >> =20 >> Looks like the vn_fullpath_global needs to be fixed rather than = problem >> workarounded. >>=20 >> It can't be fixed reliably. FreeBSD does not and cannot map a vnode = to a name. The only reason we're able to at all is due to the name = cache. And when we recreate a file, we invalidate the name cache. And = even if we fixed that, there's no guarantee the name cache won't get = flushed before we translate the name.... Linux can do this because it = keeps the path name associated with the inode. FreeBSD simply doesn't. >>=20 >=20 > They said it couldn't be done, but I personally have done it ... >=20 > I map vnodes to full paths in dwatch. It's not impossible, just = implausibly hard. >=20 > I derived my formula by reading the C code which was very twisty-turny = and rather hard to read at times (and I have been using C since 1998 on = everything from AIX and OSF/1 to HP/UX, Cygwin, MinGW, FreeBSD, = countless Linux-like things, IRIX, and a God-awful remainder of many = others; the vnode code was an adventure to say the least). >=20 > You're welcome to see how it's done in /usr/libexec/dwatch/vop_create >=20 > I load up a clause-local variable named "path" with a path constructed = from a pointer to a vnode structure argument to VOP_CREATE(9). >=20 > The D code could easily be rewritten back into C to walk the vnode to = completion (compared to the D code which is bounded by depth-limit since = DTrace doesn't provide loops; so you have to, as I have done, use a = higher-level language wrapper to repeat the code to some desired limit; = dwatch defaulting to 64 for directory depth limit). >=20 > Compared this, say, to vfssnoop.d from Chapter 5 of the DTrace book = which utilizes the vfs:namei:lookup: probes. My approach in dwatch is = far more accurate, produces full paths, and I've benchmarked it at lower = overhead with better results. >=20 > Maybe some of this can be useful? If not, just ignore me. >=20 > IMHO, there's no benefit from the crazy hoops than the super simple = heuristic I did: if the path starts with / print it. If the path doesn't = print cwd / and then the path. >=20 > I look forward to seeing your conversion of the D to C that works, = even when there's namespace cache pressure. >=20 I was looking at the output of "dwatch -dX vop_create" (the -d flag to = dwatch causes the generated dwatch to be printed instead of executed) = and thinking to myself: I could easily convert this, as I can recognize the flattened loop = structure. However, not many people will be able to do it. I wasn't = really volunteering, but now I'm curious what other people see when they = run "dwatch -dX vop_create". If it's half as bad as I think it is, then = I'll gladly do it -- but will have to balance it against work = priorities. --=20 Devin= From owner-svn-src-all@freebsd.org Thu Jun 28 02:35:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59601102C544 for ; Thu, 28 Jun 2018 02:35:48 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x229.google.com (mail-it0-x229.google.com [IPv6:2607:f8b0:4001:c0b::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D1BC18222F for ; Thu, 28 Jun 2018 02:35:47 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x229.google.com with SMTP id u4-v6so10491651itg.0 for ; Wed, 27 Jun 2018 19:35:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=7mMrt93/aYSbKB3L36FmBe6oN1Qj4u03PnbmiS3yG1I=; b=Kw8oDQoK9AjjPjA9Pi7NUcrhGGWtw8vMZw9JYVLShhV0bUdTKgKjT68JkdGxSJ3v+B 8RVRHSX+M9ufr16fz/H13VvPHnHHDwH//ZweeL/o1x9G3o0bVhIUVHhgrvtzFrss7GZL cO03T32CXnPI0tPbKDdJEUujlR5ZzsLFLdNPa6NanoVAgUMmomWy4xftgIz2m/MFe7cd 3+GgxWAKe6MzY94dq2Rqy+c4SbMwlwils8w/v0CxQ+C4wKVaUE2Ss3d16l7+iukxs+xF 94FmVElTSHtHE4bIuzVpsbmaEuagzQf7uo05ntqDWmlSfe/RfA8oOEXNUDMsjos70Onx vKFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=7mMrt93/aYSbKB3L36FmBe6oN1Qj4u03PnbmiS3yG1I=; b=nDqEqItYdXBugXE8OPYX219C/egvHUn9xBK7jKDVtHVM9d0b6+ACCaDvrm0sXTg1lW B8NjEV5t5XmkItoT0etk7n9tmONmjZXO9aLJOt6kWt1OG5ARYGLM9u2V+WkNhXO9cYOH GS7IAmI9CQJWOXN68Rw7F6zSVsOixb1fz4LC8NstRGVpk8btfPzNbo+LtXwvsq+twxWj DMSGsf15gbuXP/BwgdL59GOedTJ9vdDNFACP1KF7ycqecV8/congUYSLqFmY4NaMnxGK Kujiz6QhuL14KkrIR9QVoNTSA+Ljwj5L6EqHp55Il6pL2N+dWFVcMqKkcS3twzxBMohY BuPQ== X-Gm-Message-State: APt69E1KYiIrgEw5YD3RSCQx+deH0bfW4SCfrLqpwRBilZfMjuVbZUEr Hj6L8Eo2qHLIbQTLFBdJLXFFh28HAgy7eK+SV1em7Q== X-Google-Smtp-Source: ADUXVKKiI3GOGmKcDH+5mNaZzmyjD+VLtI/Mz9YUTGRsDZmDOaJulDFiceFvQE5bRI4FeTNKMMpSBhLjObNwlrwXFww= X-Received: by 2002:a24:7c8d:: with SMTP id a135-v6mr6954526itd.73.1530153347036; Wed, 27 Jun 2018 19:35:47 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:5945:0:0:0:0:0 with HTTP; Wed, 27 Jun 2018 19:35:46 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: <623F6077-0A89-4D35-9E83-76BF40CC290F@FreeBSD.org> References: <201806270411.w5R4B9ZB078994@repo.freebsd.org> <20180627235216.GO1165@FreeBSD.org> <16B9F36D-E92A-4FEC-B096-5E24A4E180FC@FreeBSD.org> <623F6077-0A89-4D35-9E83-76BF40CC290F@FreeBSD.org> From: Warner Losh Date: Wed, 27 Jun 2018 20:35:46 -0600 X-Google-Sender-Auth: hEqdopGbDVbn_WzCMbzF2XUHBBE Message-ID: Subject: Re: svn commit: r335690 - head/sys/kern To: Devin Teske Cc: Gleb Smirnoff , Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 02:35:48 -0000 On Wed, Jun 27, 2018 at 8:14 PM, Devin Teske wrote: > > On Jun 27, 2018, at 6:58 PM, Warner Losh wrote: > > > > On Wed, Jun 27, 2018 at 7:49 PM, Devin Teske wrote: > >> >> On Jun 27, 2018, at 5:59 PM, Warner Losh wrote: >> >> >> >> On Wed, Jun 27, 2018 at 5:52 PM, Gleb Smirnoff >> wrote: >> >>> On Wed, Jun 27, 2018 at 04:11:09AM +0000, Warner Losh wrote: >>> W> Author: imp >>> W> Date: Wed Jun 27 04:11:09 2018 >>> W> New Revision: 335690 >>> W> URL: https://svnweb.freebsd.org/changeset/base/335690 >>> W> >>> W> Log: >>> W> Fix devctl generation for core files. >>> W> >>> W> We have a problem with vn_fullpath_global when the file exists. Work >>> W> around it by printing the full path if the core file name starts >>> with /, >>> W> or current working directory followed by the filename if not. >>> >>> Is this going to work when a core is dumped not at current working >>> directory, >>> but at absolute path? e.g. kern.corefile=/var/log/cores/%N.core >>> >> >> Yes. That works. >> >> >>> Looks like the vn_fullpath_global needs to be fixed rather than problem >>> workarounded. >>> >> >> It can't be fixed reliably. FreeBSD does not and cannot map a vnode to a >> name. The only reason we're able to at all is due to the name cache. And >> when we recreate a file, we invalidate the name cache. And even if we fixed >> that, there's no guarantee the name cache won't get flushed before we >> translate the name.... Linux can do this because it keeps the path name >> associated with the inode. FreeBSD simply doesn't. >> >> >> They said it couldn't be done, but I personally have done it ... >> >> I map vnodes to full paths in dwatch. It's not impossible, just >> implausibly hard. >> >> I derived my formula by reading the C code which was very twisty-turny >> and rather hard to read at times (and I have been using C since 1998 on >> everything from AIX and OSF/1 to HP/UX, Cygwin, MinGW, FreeBSD, countless >> Linux-like things, IRIX, and a God-awful remainder of many others; the >> vnode code was an adventure to say the least). >> >> You're welcome to see how it's done in /usr/libexec/dwatch/vop_create >> >> I load up a clause-local variable named "path" with a path constructed >> from a pointer to a vnode structure argument to VOP_CREATE(9). >> >> The D code could easily be rewritten back into C to walk the vnode to >> completion (compared to the D code which is bounded by depth-limit since >> DTrace doesn't provide loops; so you have to, as I have done, use a >> higher-level language wrapper to repeat the code to some desired limit; >> dwatch defaulting to 64 for directory depth limit). >> >> Compared this, say, to vfssnoop.d from Chapter 5 of the DTrace book which >> utilizes the vfs:namei:lookup: probes. My approach in dwatch is far more >> accurate, produces full paths, and I've benchmarked it at lower overhead >> with better results. >> >> Maybe some of this can be useful? If not, just ignore me. >> > > IMHO, there's no benefit from the crazy hoops than the super simple > heuristic I did: if the path starts with / print it. If the path doesn't > print cwd / and then the path. > > I look forward to seeing your conversion of the D to C that works, even > when there's namespace cache pressure. > > > I was looking at the output of "dwatch -dX vop_create" (the -d flag to > dwatch causes the generated dwatch to be printed instead of executed) and > thinking to myself: > > I could easily convert this, as I can recognize the flattened loop > structure. However, not many people will be able to do it. I wasn't really > volunteering, but now I'm curious what other people see when they run > "dwatch -dX vop_create". If it's half as bad as I think it is, then I'll > gladly do it -- but will have to balance it against work priorities. > We don't have the data you do in vop_create anymore, just the vp at the point in the code where we want to do the reverse translation... But we also have a name that's been filled in from the template and cwd, which gives us almost the same thing as we'd hoped to dig out of the name cache... Warner From owner-svn-src-all@freebsd.org Thu Jun 28 03:37:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 541D510325A0; Thu, 28 Jun 2018 03:37: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 01EE0854D3; Thu, 28 Jun 2018 03:37: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 D78724AF8; Thu, 28 Jun 2018 03:37:15 +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 w5S3bFWf004961; Thu, 28 Jun 2018 03:37:15 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5S3bFlE004960; Thu, 28 Jun 2018 03:37:15 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201806280337.w5S3bFlE004960@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 28 Jun 2018 03:37:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335757 - head/sbin/ifconfig X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/sbin/ifconfig X-SVN-Commit-Revision: 335757 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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 03:37:16 -0000 Author: kevans Date: Thu Jun 28 03:37:15 2018 New Revision: 335757 URL: https://svnweb.freebsd.org/changeset/base/335757 Log: ifconfig(8): Attempt to render non-printable sequences w/ UTF-8 Environment Currently ifconfig(8) only prints the hex representation of ssid names with non-ASCII characters. Many modern terminals are able to properly render non-ASCII characters. This change checks if the terminal charmap is UTF-8, and if so, will render the characters, rather than the hex value. This behavior is circumvented by running ifconfig(8) in a non-UTF8 locale; e.g. C or POSIX. It was pointed out by kp@ during the review that APs have the option to broadcast whether their SSIDs may be interpreted as UTF-8. Ideally, we would honor this and only attempt this behavior if it's so-broadcasted by the AP. However, a sample survey showed that hostapd will advertise this if indicated in config but it doesn't seem to be so common in the AP market, so this would be effectively useless as we'll rarely know if the SSID should be renderable as UTF-8. Despite this, it was decided to be OK with this anyways- there's a straightforward path to doing it the right way based on advertisement by AP if we need to go that route, and one can revert to old behavior easily enough at runtime if we get it wrong. Submitted by: Farhan Khan MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D15922 Modified: head/sbin/ifconfig/ifieee80211.c Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Thu Jun 28 01:45:53 2018 (r335756) +++ head/sbin/ifconfig/ifieee80211.c Thu Jun 28 03:37:15 2018 (r335757) @@ -90,6 +90,8 @@ #include #include #include /* NB: for offsetof */ +#include +#include #include "ifconfig.h" @@ -5383,16 +5385,21 @@ print_string(const u_int8_t *buf, int len) { int i; int hasspc; + int utf8; i = 0; hasspc = 0; + + setlocale(LC_CTYPE, ""); + utf8 = strncmp("UTF-8", nl_langinfo(CODESET), 5) == 0; + for (; i < len; i++) { - if (!isprint(buf[i]) && buf[i] != '\0') + if (!isprint(buf[i]) && buf[i] != '\0' && !utf8) break; if (isspace(buf[i])) hasspc++; } - if (i == len) { + if (i == len || utf8) { if (hasspc || len == 0 || buf[0] == '\0') printf("\"%.*s\"", len, buf); else From owner-svn-src-all@freebsd.org Thu Jun 28 06:22:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5EBC9101F18B; Thu, 28 Jun 2018 06:22:09 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 1A40D8C86E; Thu, 28 Jun 2018 06:22:07 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 83E0A106049; Thu, 28 Jun 2018 16:21:57 +1000 (AEST) Date: Thu, 28 Jun 2018 16:21:56 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bryan Drewery cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r335746 - head/bin/sh In-Reply-To: <201806272136.w5RLanc3016284@repo.freebsd.org> Message-ID: <20180628153835.J1605@besplex.bde.org> References: <201806272136.w5RLanc3016284@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=EseilWUA c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=D4UugWInNbsYSGEWtIIA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 06:22:09 -0000 On Wed, 27 Jun 2018, Bryan Drewery wrote: > Log: > Stop building intermediate .o files. > > These are not used to link the final tool anymore. At some point in the past > the suffix rules changed to not link these in. The original reason for this in > r19176 is unclear but seems to be related to mkdep. The .depend handling is > still broken here as it is for all build tool patterns like this. It was to give reproducible builds. The default .c rule still causes all compilers to build a temporary .o file in /tmp (or $TMPDIR). aout put the name of the object file in the executable. This is useful for debugging, but is broken in elf. Even compiling with -g doesn't keep the names of object files. I don't remember needing to fix this for normal programs. bsd.prog.mk never used the default .c rule AFAIR. This is partly so that mkdep works/ worked. It only directly generates/generated dependencies associated with the .c.o rule. Example of aout nm -n output: XX 00001020 F /usr/lib/scrt0.o File name symbol. XX 00001020 T start XX 00001090 F /var/tmp/cc0189221.o This one from building with cc -o foo foo.c. XX 00001090 t ___gnu_compiled_c XX 00001090 t gcc2_compiled. XX 0000109c T _main XX 00001140 T ___do_global_dtors XX 00001140 F __main.o XX 00001168 T ___do_global_ctors XX 000011c0 T ___main End of main program/object file. XX 000011e0 T _atexit XX 000011e0 F _exit.o XX 000011e0 F atexit.o XX 00001250 T _wait XX 00001250 F wait.o XX ... There is an F symbol for every library file linked. This is most useful for determining where the functions came from, especially without full debugging symbols. The F symbols are badly sorted (by name after number), so they are often after the first function name in each file, especially for library functions whose name starts with an underscore. Bruce From owner-svn-src-all@freebsd.org Thu Jun 28 06:54:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D3AD10208BD; Thu, 28 Jun 2018 06:54:46 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC6108D80B; Thu, 28 Jun 2018 06:54:45 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [64.201.244.132] (port=50402 helo=[10.0.0.104]) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1fYHV2-000BO3-0k; Wed, 27 Jun 2018 20:57:12 +0000 From: Devin Teske Message-Id: <7C4AEADC-1973-482B-A7A5-75F23397D44E@FreeBSD.org> Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r335690 - head/sys/kern Date: Wed, 27 Jun 2018 23:54:41 -0700 In-Reply-To: Cc: Devin Teske , Gleb Smirnoff , Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Warner Losh References: <201806270411.w5R4B9ZB078994@repo.freebsd.org> <20180627235216.GO1165@FreeBSD.org> <16B9F36D-E92A-4FEC-B096-5E24A4E180FC@FreeBSD.org> <623F6077-0A89-4D35-9E83-76BF40CC290F@FreeBSD.org> X-Mailer: Apple Mail (2.3273) Sender: devin@shxd.cx Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 06:54:46 -0000 > On Jun 27, 2018, at 7:35 PM, Warner Losh wrote: >=20 >=20 >=20 > On Wed, Jun 27, 2018 at 8:14 PM, Devin Teske > wrote: >=20 >> On Jun 27, 2018, at 6:58 PM, Warner Losh > wrote: >>=20 >>=20 >>=20 >> On Wed, Jun 27, 2018 at 7:49 PM, Devin Teske > wrote: >>=20 >>> On Jun 27, 2018, at 5:59 PM, Warner Losh > wrote: >>>=20 >>>=20 >>>=20 >>> On Wed, Jun 27, 2018 at 5:52 PM, Gleb Smirnoff > wrote: >>> On Wed, Jun 27, 2018 at 04:11:09AM +0000, Warner Losh wrote: >>> W> Author: imp >>> W> Date: Wed Jun 27 04:11:09 2018 >>> W> New Revision: 335690 >>> W> URL: https://svnweb.freebsd.org/changeset/base/335690 = >>> W>=20 >>> W> Log: >>> W> Fix devctl generation for core files. >>> W> =20 >>> W> We have a problem with vn_fullpath_global when the file exists. = Work >>> W> around it by printing the full path if the core file name = starts with /, >>> W> or current working directory followed by the filename if not. >>>=20 >>> Is this going to work when a core is dumped not at current working = directory, >>> but at absolute path? e.g. kern.corefile=3D/var/log/cores/%N.core >>>=20 >>> Yes. That works. >>> =20 >>> Looks like the vn_fullpath_global needs to be fixed rather than = problem >>> workarounded. >>>=20 >>> It can't be fixed reliably. FreeBSD does not and cannot map a vnode = to a name. The only reason we're able to at all is due to the name = cache. And when we recreate a file, we invalidate the name cache. And = even if we fixed that, there's no guarantee the name cache won't get = flushed before we translate the name.... Linux can do this because it = keeps the path name associated with the inode. FreeBSD simply doesn't. >>>=20 >>=20 >> They said it couldn't be done, but I personally have done it ... >>=20 >> I map vnodes to full paths in dwatch. It's not impossible, just = implausibly hard. >>=20 >> I derived my formula by reading the C code which was very = twisty-turny and rather hard to read at times (and I have been using C = since 1998 on everything from AIX and OSF/1 to HP/UX, Cygwin, MinGW, = FreeBSD, countless Linux-like things, IRIX, and a God-awful remainder of = many others; the vnode code was an adventure to say the least). >>=20 >> You're welcome to see how it's done in /usr/libexec/dwatch/vop_create >>=20 >> I load up a clause-local variable named "path" with a path = constructed from a pointer to a vnode structure argument to = VOP_CREATE(9). >>=20 >> The D code could easily be rewritten back into C to walk the vnode to = completion (compared to the D code which is bounded by depth-limit since = DTrace doesn't provide loops; so you have to, as I have done, use a = higher-level language wrapper to repeat the code to some desired limit; = dwatch defaulting to 64 for directory depth limit). >>=20 >> Compared this, say, to vfssnoop.d from Chapter 5 of the DTrace book = which utilizes the vfs:namei:lookup: probes. My approach in dwatch is = far more accurate, produces full paths, and I've benchmarked it at lower = overhead with better results. >>=20 >> Maybe some of this can be useful? If not, just ignore me. >>=20 >> IMHO, there's no benefit from the crazy hoops than the super simple = heuristic I did: if the path starts with / print it. If the path doesn't = print cwd / and then the path. >>=20 >> I look forward to seeing your conversion of the D to C that works, = even when there's namespace cache pressure. >>=20 >=20 > I was looking at the output of "dwatch -dX vop_create" (the -d flag to = dwatch causes the generated dwatch to be printed instead of executed) = and thinking to myself: >=20 > I could easily convert this, as I can recognize the flattened loop = structure. However, not many people will be able to do it. I wasn't = really volunteering, but now I'm curious what other people see when they = run "dwatch -dX vop_create". If it's half as bad as I think it is, then = I'll gladly do it -- but will have to balance it against work = priorities. >=20 > We don't have the data you do in vop_create anymore, just the vp at = the point in the code where we want to do the reverse translation... But = we also have a name that's been filled in from the template and cwd, = which gives us almost the same thing as we'd hoped to dig out of the = name cache... >=20 Given: struct vnode *vp, const char *fi_name Here's a rough (not optimized; unchecked) crack at a C equivalent: #include #include #include int i, max_depth =3D 64; char *d_name =3D NULL; char *fi_fs =3D NULL; char *fi_mount =3D NULL; char *cp; struct namecache *ncp =3D NULL; struct mount *mount =3D NULL; struct vnode *dvp =3D NULL; char *nc[max_depth+1]; char path[PATH_MAX] =3D __DECONST(char *, ""); if (vp !=3D NULL) { ncp =3D vp->v_cache_dst.tqh_first; mount =3D vp->v_mount; /* ptr to vfs we are in */ if (vp->v_cache_dd !=3D NULL) d_name =3D vp->v_cache_dd->nc_name; } if (mount !=3D NULL) { fi_fs =3D mount->mnt_stat.f_fstypename; if (fi_fs !=3D NULL && *fi_fs !=3D '\0') { if (!strcmp(fi_fs, "devfs")) ncp =3D NULL; } else { if (fi_name =3D=3D NULL || *fi_name =3D=3D '\0') = ncp =3D NULL; } fi_mount =3D mount->mnt_stat.f_mntonname; } else { ncp =3D NULL; } for (i =3D 0; i <=3D max_depth; i++) { nc[i] =3D NULL; } if (ncp !=3D NULL) { /* Reach into vnode of parent of name */ if (ncp->nc_dvp !=3D NULL) dvp =3D ncp->nc_dvp->v_cache_dst.tqh_first; if (dvp !=3D NULL) nc[0] =3D dvp->nc_name; } if (nc[0] =3D=3D NULL || *nc[0] =3D=3D '\0' || !strcmp(nc[0], = "/")) dvp =3D NULL; /* * BEGIN Pathname-depth loop */ for (i =3D 1; i < max_depth; i++) { if (dvp =3D=3D NULL) break; if (dvp->nc_dvp !=3D NULL) dvp =3D dvp->nc_dvp->v_cache_dst.tqh_first; else dvp =3D NULL; if (dvp !=3D NULL) nc[i] =3D dvp->nc_name; } /* * END Pathname-depth loop */ if (dvp !=3D NULL) { if (dvp->nc_dvp !=3D NULL) dvp =3D dvp->nc_dvp->v_cache_dst.tqh_first; else dvp =3D NULL; if (dvp !=3D NULL && dvp->nc_dvp !=3D NULL) nc[max_depth] =3D __DECONST(char *, "..."); } if (fi_mount !=3D NULL) { /* * Join full path * NB: Up-to but not including the parent directory = (joined below) */ strcat(path, fi_mount); if (strcmp(fi_mount, "/")) strcat(path, "/"); for (i =3D max_depth; i >=3D 0; i--) { char *namei =3D nc[i]; strcat(path, namei =3D=3D NULL ? "" : namei); if (namei !=3D NULL) strcat(path, "/"); } /* Join the parent directory name */ if (d_name !=3D NULL && *d_name !=3D '\0') { strcat(path, d_name); strcat(path, "/"); } /* Join the entry name */ if (fi_name !=3D NULL && *fi_name !=3D '\0') strcat(path, fi_name); } =09 --=20 Devin= From owner-svn-src-all@freebsd.org Thu Jun 28 07:01:57 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9287C1020E07; Thu, 28 Jun 2018 07:01:57 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3E1F18DC2C; Thu, 28 Jun 2018 07:01:57 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F6476DDB; Thu, 28 Jun 2018 07:01:57 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5S71vJD009233; Thu, 28 Jun 2018 07:01:57 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5S71v5o009232; Thu, 28 Jun 2018 07:01:57 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201806280701.w5S71v5o009232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Thu, 28 Jun 2018 07:01:56 +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: r335758 - stable/10 X-SVN-Group: stable-10 X-SVN-Commit-Author: dteske X-SVN-Commit-Paths: stable/10 X-SVN-Commit-Revision: 335758 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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 07:01:57 -0000 Author: dteske Date: Thu Jun 28 07:01:56 2018 New Revision: 335758 URL: https://svnweb.freebsd.org/changeset/base/335758 Log: Add mergeinfo for MFC r335607 This is a direct commit on stable/10 accounting for missing mergeinfo from SVN r335744. Difficulties with dealing with 'stand' vs 'sys/boot' in MFCs. Reported by: kevans Sponsored by: Smule, Inc. Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-all@freebsd.org Thu Jun 28 07:36:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C850102252F for ; Thu, 28 Jun 2018 07:36:09 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x234.google.com (mail-io0-x234.google.com [IPv6:2607:f8b0:4001:c06::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7A0A68EE71 for ; Thu, 28 Jun 2018 07:36:08 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x234.google.com with SMTP id g7-v6so4290580ioh.11 for ; Thu, 28 Jun 2018 00:36:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=7wrVmBoag/CYQnyBQ3a3Lrg9/2R9kv/urElyCzrU/cY=; b=did1aPdoDNL0ypFgNO9C/Wog5dfMvZPTSzWLSWrEsDqjj8Qx0SF2A7TuHf4VU4SHGc r5GFiCQwUuFAcuhKJhj6gg9pQn5HvKUUPOQIHF+dW0wA/JTd8oo6ctrjyTVEbTPc+FYa FHGtUGtNOzsCBtpho64pl86fWMwJcmJ3sFcCeE8+Qv1wbjFR/MDLVF4QKu8MY/fB0Dbz 6GgxuZS+x5r0wHBR/8PmsNM0fZI3yqj/CbpDoSXiMpB5oeTcejKEFVQwWM6/1Aq9t6Fp BE8EjBfxLE64G7ZnBsIbVKAkWxn199FXmOeMaEMzB/OimoTjhoDUQQaPonPbHCFscEYD j1eA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=7wrVmBoag/CYQnyBQ3a3Lrg9/2R9kv/urElyCzrU/cY=; b=q7vBX+EeROXfHFJe2LBE/pXPNePptcF0hGZvQ5KXiE1FYYbx7QiTfTQF+T5F9JToGh serNsqpR/q4p1GdPJOhTHXIY9EBp8eFIENYzUq4Db9nfWUH4/YkWTPsiX4SFVqXfMFXt jwrY2FmBAOyjiQfcMPEl68awqXZ/VPBur4CNk1K4F1N3FafOwKBnejm/+Dzo+gBmIYmH jOUbtWiJQFLwYiiP6ibtNulMrSNTGljV8TPPGhJrfRGn9oPOV1+VRTh8yHUOqaa2oxcl Z8tYt/UYGnfh3MreHNz+I9erp6EnUsUwAZ9tZ6Pk/p8tVoviXXOc/3KFiuIFzmwTltVc A7zQ== X-Gm-Message-State: APt69E0nEF+j9d23Bnb+mAvZdL1CWmTpdwp3PWV7jI/AMImK5y/mf/IU bZx42gtPPVeFlSX5VBCfd50ZA7LOBncYnIjy1IS6lw== X-Google-Smtp-Source: AAOMgpcY7KXiR2zpix1BWq+JN5G8o5dvIzHz6fnAalCpSv/esOcF2Mk527eR+Vqu0B8FNFwliXZvxY4TWbvr7VKYaDE= X-Received: by 2002:a6b:29c4:: with SMTP id p187-v6mr7423286iop.299.1530171367672; Thu, 28 Jun 2018 00:36:07 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:5945:0:0:0:0:0 with HTTP; Thu, 28 Jun 2018 00:36:07 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: <7C4AEADC-1973-482B-A7A5-75F23397D44E@FreeBSD.org> References: <201806270411.w5R4B9ZB078994@repo.freebsd.org> <20180627235216.GO1165@FreeBSD.org> <16B9F36D-E92A-4FEC-B096-5E24A4E180FC@FreeBSD.org> <623F6077-0A89-4D35-9E83-76BF40CC290F@FreeBSD.org> <7C4AEADC-1973-482B-A7A5-75F23397D44E@FreeBSD.org> From: Warner Losh Date: Thu, 28 Jun 2018 01:36:07 -0600 X-Google-Sender-Auth: OE5l_Z4gMClEUhGqKEhMcIdbNxc Message-ID: Subject: Re: svn commit: r335690 - head/sys/kern To: Devin Teske Cc: Gleb Smirnoff , Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 07:36:09 -0000 On Thu, Jun 28, 2018 at 12:54 AM, Devin Teske wrote: > > On Jun 27, 2018, at 7:35 PM, Warner Losh wrote: > > > > On Wed, Jun 27, 2018 at 8:14 PM, Devin Teske wrote: > >> >> On Jun 27, 2018, at 6:58 PM, Warner Losh wrote: >> >> >> >> On Wed, Jun 27, 2018 at 7:49 PM, Devin Teske wrote: >> >>> >>> On Jun 27, 2018, at 5:59 PM, Warner Losh wrote: >>> >>> >>> >>> On Wed, Jun 27, 2018 at 5:52 PM, Gleb Smirnoff >>> wrote: >>> >>>> On Wed, Jun 27, 2018 at 04:11:09AM +0000, Warner Losh wrote: >>>> W> Author: imp >>>> W> Date: Wed Jun 27 04:11:09 2018 >>>> W> New Revision: 335690 >>>> W> URL: https://svnweb.freebsd.org/changeset/base/335690 >>>> W> >>>> W> Log: >>>> W> Fix devctl generation for core files. >>>> W> >>>> W> We have a problem with vn_fullpath_global when the file exists. >>>> Work >>>> W> around it by printing the full path if the core file name starts >>>> with /, >>>> W> or current working directory followed by the filename if not. >>>> >>>> Is this going to work when a core is dumped not at current working >>>> directory, >>>> but at absolute path? e.g. kern.corefile=/var/log/cores/%N.core >>>> >>> >>> Yes. That works. >>> >>> >>>> Looks like the vn_fullpath_global needs to be fixed rather than problem >>>> workarounded. >>>> >>> >>> It can't be fixed reliably. FreeBSD does not and cannot map a vnode to a >>> name. The only reason we're able to at all is due to the name cache. And >>> when we recreate a file, we invalidate the name cache. And even if we fixed >>> that, there's no guarantee the name cache won't get flushed before we >>> translate the name.... Linux can do this because it keeps the path name >>> associated with the inode. FreeBSD simply doesn't. >>> >>> >>> They said it couldn't be done, but I personally have done it ... >>> >>> I map vnodes to full paths in dwatch. It's not impossible, just >>> implausibly hard. >>> >>> I derived my formula by reading the C code which was very twisty-turny >>> and rather hard to read at times (and I have been using C since 1998 on >>> everything from AIX and OSF/1 to HP/UX, Cygwin, MinGW, FreeBSD, countless >>> Linux-like things, IRIX, and a God-awful remainder of many others; the >>> vnode code was an adventure to say the least). >>> >>> You're welcome to see how it's done in /usr/libexec/dwatch/vop_create >>> >>> I load up a clause-local variable named "path" with a path constructed >>> from a pointer to a vnode structure argument to VOP_CREATE(9). >>> >>> The D code could easily be rewritten back into C to walk the vnode to >>> completion (compared to the D code which is bounded by depth-limit since >>> DTrace doesn't provide loops; so you have to, as I have done, use a >>> higher-level language wrapper to repeat the code to some desired limit; >>> dwatch defaulting to 64 for directory depth limit). >>> >>> Compared this, say, to vfssnoop.d from Chapter 5 of the DTrace book >>> which utilizes the vfs:namei:lookup: probes. My approach in dwatch is far >>> more accurate, produces full paths, and I've benchmarked it at lower >>> overhead with better results. >>> >>> Maybe some of this can be useful? If not, just ignore me. >>> >> >> IMHO, there's no benefit from the crazy hoops than the super simple >> heuristic I did: if the path starts with / print it. If the path doesn't >> print cwd / and then the path. >> >> I look forward to seeing your conversion of the D to C that works, even >> when there's namespace cache pressure. >> >> >> I was looking at the output of "dwatch -dX vop_create" (the -d flag to >> dwatch causes the generated dwatch to be printed instead of executed) and >> thinking to myself: >> >> I could easily convert this, as I can recognize the flattened loop >> structure. However, not many people will be able to do it. I wasn't really >> volunteering, but now I'm curious what other people see when they run >> "dwatch -dX vop_create". If it's half as bad as I think it is, then I'll >> gladly do it -- but will have to balance it against work priorities. >> > > We don't have the data you do in vop_create anymore, just the vp at the > point in the code where we want to do the reverse translation... But we > also have a name that's been filled in from the template and cwd, which > gives us almost the same thing as we'd hoped to dig out of the name cache... > > > Given: > > struct vnode *vp, const char *fi_name > > Here's a rough (not optimized; unchecked) crack at a C equivalent: > Thanks, but this code suffers from the same problem that vn_fullpath_global() suffers from: we clear out parts of the cache when we open an existing file with O_CREAT. This one NULL leads to a cascade of failures, as show below. > #include > #include > > #include > > int i, max_depth = 64; > char *d_name = NULL; > char *fi_fs = NULL; > char *fi_mount = NULL; > char *cp; > struct namecache *ncp = NULL; > struct mount *mount = NULL; > struct vnode *dvp = NULL; > char *nc[max_depth+1]; > char path[PATH_MAX] = __DECONST(char *, ""); > > if (vp != NULL) { > ncp = vp->v_cache_dst.tqh_first; > For my case, this is NULL since we clear out the cache when we re-create the file. I confirmed this by adding a printf where I put in my workaround and I get: vp->v_cache_dst.tqh_first is 0xfffff80003bd7a10 (first time, no cat.core exists) vp->v_cache_dst.tqh_first is 0 (second time, cat.core does exist) mount = vp->v_mount; /* ptr to vfs we are in */ > if (vp->v_cache_dd != NULL) > d_name = vp->v_cache_dd->nc_name; > } > if (mount != NULL) { > fi_fs = mount->mnt_stat.f_fstypename; > if (fi_fs != NULL && *fi_fs != '\0') { > if (!strcmp(fi_fs, "devfs")) ncp = NULL; > } else { > if (fi_name == NULL || *fi_name == '\0') ncp = NULL; > } > fi_mount = mount->mnt_stat.f_mntonname; > } else { > ncp = NULL; > } > for (i = 0; i <= max_depth; i++) { > nc[i] = NULL; > } > if (ncp != NULL) { > /* Reach into vnode of parent of name */ > if (ncp->nc_dvp != NULL) > dvp = ncp->nc_dvp->v_cache_dst.tqh_first; > if (dvp != NULL) nc[0] = dvp->nc_name; > } > since ncp is NULL here, we never set nc[0] > if (nc[0] == NULL || *nc[0] == '\0' || !strcmp(nc[0], "/")) > dvp = NULL; > so dvp is NULL > /* > * BEGIN Pathname-depth loop > */ > for (i = 1; i < max_depth; i++) { > if (dvp == NULL) break; > and we break out of this loop without setting any other nc[] entries. > if (dvp->nc_dvp != NULL) > dvp = dvp->nc_dvp->v_cache_dst.tqh_first; > else > dvp = NULL; > if (dvp != NULL) nc[i] = dvp->nc_name; > } > /* > * END Pathname-depth loop > */ > if (dvp != NULL) { > if (dvp->nc_dvp != NULL) > dvp = dvp->nc_dvp->v_cache_dst.tqh_first; > else > dvp = NULL; > if (dvp != NULL && dvp->nc_dvp != NULL) > nc[max_depth] = __DECONST(char *, "..."); > } > if (fi_mount != NULL) { > /* > * Join full path > * NB: Up-to but not including the parent directory (joined below) > */ > strcat(path, fi_mount); > if (strcmp(fi_mount, "/")) strcat(path, "/"); > for (i = max_depth; i >= 0; i--) { > char *namei = nc[i]; > strcat(path, namei == NULL ? "" : namei); > which joins a lot of empty strings together > if (namei != NULL) strcat(path, "/"); > } > /* Join the parent directory name */ > if (d_name != NULL && *d_name != '\0') { > strcat(path, d_name); > strcat(path, "/"); > } > /* Join the entry name */ > if (fi_name != NULL && *fi_name != '\0') > strcat(path, fi_name); > since we don't have the fi_name from the VOP_CREATE where we want to do this, we have nothing for here. > } > So I appreciate the effort here, but I'm not sure that it's useful in this context. vn_fullpath* already can do this sort of thing, but can't in the case where vp->v_cache_dst.tqh_first is NULL. Warner From owner-svn-src-all@freebsd.org Thu Jun 28 07:42:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 84AE41022A1C for ; Thu, 28 Jun 2018 07:42:31 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x232.google.com (mail-io0-x232.google.com [IPv6:2607:f8b0:4001:c06::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0B6468F3C3 for ; Thu, 28 Jun 2018 07:42:31 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x232.google.com with SMTP id d185-v6so4323529ioe.0 for ; Thu, 28 Jun 2018 00:42:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=tvbvrvX7MBUSXLMiGqLZGJtZI2aA8QsYx6TBugRx4vw=; b=Dd68UdJVhQZi7HkkKVfnX5CaG+rsX83mmgqMUSXzlWT9Pb2kBFc7X4l7OJVDHZtzNf zyA+ttGGvqJ0zZh2lYHv1C1eX6pif676S8tGu/03DO4n5t2pNNEZwFPo9UmVMFltcs7K U+Sc/YZfP2SLjcVIIu8u/Ag+7KrA+sqHT+wJLaiUv4pzrBOgVGSr81kR+Pbg2MDKAngM /WYBQtwwT79dDER1cLTM6+LAh3Ym1OPdhTVVcXPHeqis+fVIgJoemiK3zIhUSKC/2bbe iPbqOdE/KH8qrubdr1RwloS5L2t1bOs/oW0s4EMgoK+iKxs1FSmnC/xfN4mf6/8CR0Sd WLdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=tvbvrvX7MBUSXLMiGqLZGJtZI2aA8QsYx6TBugRx4vw=; b=ecQemdnTU7cinABCjDBU43KxO2M5tQ3jqwWyvGTdx+TI4PhMUdkGmA2Pw6lu9afvAu kZPHzh3d+2JJeUJHGvxvYKWzCovsm634Ms0QAepU2gC23lrvlRfZzeAM+nnNWFI0aN9L iifmmZMV0SW6nDDZWf072zO1+i4SWLROvLmV63cz8AQTr/i4hKucvR0TZ60H6ApwW/hl S1VNGp3re+hMD6YxASBgVM4CPzxs39lJqpS7Orn4deUNP5YnRV3+lEQ653bZJrFni1HD aj26GJSXuLkEszpBQleh88sz3V5k/9rhqy8C6gGrAvg24W8az6AmiLFzp2lG4psMglCS byUQ== X-Gm-Message-State: APt69E0IhbrrBqUk2/B34QUWUGaCA91V7kpXbT6dFeXlWnR6t3sv7I4Z jGlHOsqg066zXAvNrbp6HUEKzsh4vKgAANeZ8twhgD3+ X-Google-Smtp-Source: AAOMgpcU1aEv6A6SG9350z3YVTlQVZzO8jWet7oxLu4z4J6BBhDKftaSCipj8iXCn3cAArhxY60f6YyysrhnqqHsVYw= X-Received: by 2002:a6b:29c4:: with SMTP id p187-v6mr7436827iop.299.1530171750197; Thu, 28 Jun 2018 00:42:30 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:5945:0:0:0:0:0 with HTTP; Thu, 28 Jun 2018 00:42:29 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: References: <201806270411.w5R4B9ZB078994@repo.freebsd.org> <20180627134455.k6jvum4pnuejas3x@mutt-hbsd> From: Warner Losh Date: Thu, 28 Jun 2018 01:42:29 -0600 X-Google-Sender-Auth: g7mW4Z70OGXF8w8RPL235-uKKVI Message-ID: Subject: Re: svn commit: r335690 - head/sys/kern To: Shawn Webb Cc: Oliver Pinter , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Warner Losh Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 07:42:31 -0000 On Wed, Jun 27, 2018 at 7:46 AM, Warner Losh wrote: > > > On Wed, Jun 27, 2018 at 7:44 AM, Shawn Webb > wrote: > >> On Wed, Jun 27, 2018 at 07:42:52AM -0600, Warner Losh wrote: >> > On Wed, Jun 27, 2018 at 12:59 AM, Oliver Pinter < >> > oliver.pinter@hardenedbsd.org> wrote: >> > >> > > >> > > >> > > On Wednesday, June 27, 2018, Warner Losh wrote: >> > > >> > >> Author: imp >> > >> Date: Wed Jun 27 04:11:09 2018 >> > >> New Revision: 335690 >> > >> URL: https://svnweb.freebsd.org/changeset/base/335690 >> > >> >> > >> Log: >> > >> Fix devctl generation for core files. >> > >> >> > >> We have a problem with vn_fullpath_global when the file exists. >> Work >> > >> around it by printing the full path if the core file name starts >> with /, >> > >> or current working directory followed by the filename if not. >> > >> >> > >> Sponsored by: Netflix >> > >> Differential Review: https://reviews.freebsd.org/D16026 >> > >> >> > >> Modified: >> > >> head/sys/kern/kern_sig.c >> > >> >> > >> Modified: head/sys/kern/kern_sig.c >> > >> ============================================================ >> > >> ================== >> > >> --- head/sys/kern/kern_sig.c Wed Jun 27 04:10:48 2018 >> (r335689) >> > >> +++ head/sys/kern/kern_sig.c Wed Jun 27 04:11:09 2018 >> (r335690) >> > >> @@ -3431,24 +3431,6 @@ out: >> > >> return (0); >> > >> } >> > >> >> > >> -static int >> > >> -coredump_sanitise_path(const char *path) >> > >> -{ >> > >> - size_t i; >> > >> - >> > >> - /* >> > >> - * Only send a subset of ASCII to devd(8) because it >> > >> - * might pass these strings to sh -c. >> > >> - */ >> > >> - for (i = 0; path[i]; i++) >> > >> - if (!(isalpha(path[i]) || isdigit(path[i])) && >> > >> - path[i] != '/' && path[i] != '.' && >> > >> - path[i] != '-') >> > >> - return (0); >> > > >> > > >> > > This part of code existed to prevent shell code injection via file >> names. >> > > After this commit we lose this. >> > > >> > >> > It's devd's job to prevent that, not the kernel's. >> >> Has devd been updated? Or is this particular vulnerability manifest >> again? >> > > devd is fine as far as I know, apart from the default action. I'm fixing > that now. > As of r335756 the quoting issue that this code was for was fixed. I thought I'd jumped through these hoops years ago, but I can't find the tree I did it in, and it's clear I never committed it. Warner From owner-svn-src-all@freebsd.org Thu Jun 28 09:36:17 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AEDD11027A49; Thu, 28 Jun 2018 09:36:17 +0000 (UTC) (envelope-from royger@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5BB14731EE; Thu, 28 Jun 2018 09:36:17 +0000 (UTC) (envelope-from royger@freebsd.org) Received: from localhost (177.red-88-19-32.staticip.rima-tde.net [88.19.32.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: royger) by smtp.freebsd.org (Postfix) with ESMTPSA id AEA1125296; Thu, 28 Jun 2018 09:36:16 +0000 (UTC) (envelope-from royger@freebsd.org) Date: Thu, 28 Jun 2018 11:36:08 +0200 From: Roger Pau =?utf-8?B?TW9ubsOp?= To: Ian Lepore Cc: rgrimes@freebsd.org, Alexey Dokuchaev , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r335629 - in head: share/man/man4 sys/dev/vt/hw/vga Message-ID: <20180628093608.33yvnrwmmtj44get@mac.bytemobile.com> References: <201806261555.w5QFtURn003981@pdx.rh.CN85.dnsmgr.net> <1530029919.24573.74.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1530029919.24573.74.camel@freebsd.org> User-Agent: NeoMutt/20180512 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 09:36:17 -0000 On Tue, Jun 26, 2018 at 10:18:39AM -0600, Ian Lepore wrote: > On Tue, 2018-06-26 at 08:55 -0700, Rodney W. Grimes wrote: > > > > > > On Tue, Jun 26, 2018 at 05:21:27AM +0000, Alexey Dokuchaev wrote: > > > > > > > > On Mon, Jun 25, 2018 at 08:43:51AM -0700, Rodney W. Grimes wrote: > > > > > > > > > > > > > > > > > New Revision: 335629 > > > > > > URL: https://svnweb.freebsd.org/changeset/base/335629 > > > > > > > > > > > > Log: > > > > > >   vt: add option to ignore NO_VGA flag in ACPI > > > > > >    > > > > > >   To workaround buggy firmware that sets this flag when > > > > > > there's actually > > > > > >   a VGA present. > > > > > >    > > > > > >   Reported and tested by: Yasuhiro KIMURA > > > > > e.org> > > > > > >   Sponsored by: Citrix Systems R&D > > > > > >   Reviewed by: kib > > > > > >   Differential revision: https://reviews.freebsd.org/D > > > > > > 16003 > > > > > It is generally best to avoid double negatives, > > > > > couldnt this of been better named? (hw.vga.acpi_force_vga) > > > > Yes please; I get constantly confused when calculating negatives > > > > and > > > > often get them wrong. > > > This is specifically done to workaround a firmware bug where some > > > buggy firmwares set the NO_VGA flag in ACPI. > > We are not conflicted about working around the buggy ACPI. > > > > > > > > So the option does > > > exactly what the name says, it ignores the NO_VGA flag in ACPI. IMO > > > acpi_force_vga is not as descriptive as the current name. > > Interestingly that is the text you use to describe it in the man > > page, so it seems as if it is good for the description, but not > > good for the name of the flag itself? > > > > .It Va hw.vga.acpi_ignore_no_vga > > Set to 1 to force the usage of the VGA driver regardless of whether > > ACPI IAPC_BOOT_ARCH signals no VGA support. > > Can be used to workaround firmware bugs in the ACPI tables. > > > > This does not mention the ACPI table entry being over ridden, > > if (flags & ACPI_FADT_NO_VGA) > > > > Further digging I believe you have placed this in the wrong > > part of the hierarchy.  You put it in hw.vga, and it really > > should be in hw.acpi. > > Maybe hw.acpi.bootflags.ignore.no_vga. > > > > Are there any other bootflags we may want to ignore? > > > > Regards, > > > There is ACPI_FADT_NO_CMOS_RTC, with an associated tunable > hw.atrtc.enabled (default is -1), which can be: > >   -1 - enabled unless acpi says ACPI_FADT_NO_CMOS_RTC >    0 - unconditionally disabled >    1 - unconditionally enabled > > The idea was that if RTC is provided by EFI runtime services, this flag > would indicate that old-school CMOS RTC drivers should not be used. >  But, predictably, it turns out there are bioses that set this flag > even when booting in legacy non-efi mode, leading to a need to ignore > the flag and force use of the old driver. I could take this approach for vt and add hw.vt.enabled = { -1, 0, 1 } if that seems better. Roger. From owner-svn-src-all@freebsd.org Thu Jun 28 09:42:31 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DE5A41028069; Thu, 28 Jun 2018 09:42:31 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 83B807384B; Thu, 28 Jun 2018 09:42:31 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 668B6108F2; Thu, 28 Jun 2018 09:42:31 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5S9gVw4092127; Thu, 28 Jun 2018 09:42:31 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5S9gV3E092126; Thu, 28 Jun 2018 09:42:31 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201806280942.w5S9gV3E092126@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 28 Jun 2018 09:42:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335759 - head/sbin/ipfw X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sbin/ipfw X-SVN-Commit-Revision: 335759 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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 09:42:32 -0000 Author: ae Date: Thu Jun 28 09:42:30 2018 New Revision: 335759 URL: https://svnweb.freebsd.org/changeset/base/335759 Log: Remove extra "ipfw" from example. MFC after: 1 week Modified: head/sbin/ipfw/ipfw.8 Modified: head/sbin/ipfw/ipfw.8 ============================================================================== --- head/sbin/ipfw/ipfw.8 Thu Jun 28 07:01:56 2018 (r335758) +++ head/sbin/ipfw/ipfw.8 Thu Jun 28 09:42:30 2018 (r335759) @@ -1,7 +1,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 9, 2018 +.Dd June 28, 2018 .Dt IPFW 8 .Os .Sh NAME @@ -3834,9 +3834,9 @@ In the following example per-interface firewall is cre .Dl "ipfw table OUT add vlan20 22000" .Dl "ipfw table OUT add vlan30 23000" .Dl ".." -.Dl "ipfw add 100 ipfw setfib tablearg ip from any to any recv 'table(IN)' in" -.Dl "ipfw add 200 ipfw skipto tablearg ip from any to any recv 'table(IN)' in" -.Dl "ipfw add 300 ipfw skipto tablearg ip from any to any xmit 'table(OUT)' out" +.Dl "ipfw add 100 setfib tablearg ip from any to any recv 'table(IN)' in" +.Dl "ipfw add 200 skipto tablearg ip from any to any recv 'table(IN)' in" +.Dl "ipfw add 300 skipto tablearg ip from any to any xmit 'table(OUT)' out" .Pp The following example illustrate usage of flow tables: .Pp From owner-svn-src-all@freebsd.org Thu Jun 28 11:39:29 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59181102E2F6; Thu, 28 Jun 2018 11:39:29 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0510877865; Thu, 28 Jun 2018 11:39:29 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B556011B10; Thu, 28 Jun 2018 11:39:28 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5SBdSsk048801; Thu, 28 Jun 2018 11:39:28 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5SBdRfB048795; Thu, 28 Jun 2018 11:39:27 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201806281139.w5SBdRfB048795@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 28 Jun 2018 11:39:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335760 - in head/sys: net netinet netinet6 X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: in head/sys: net netinet netinet6 X-SVN-Commit-Revision: 335760 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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 11:39:29 -0000 Author: ae Date: Thu Jun 28 11:39:27 2018 New Revision: 335760 URL: https://svnweb.freebsd.org/changeset/base/335760 Log: Add NULL pointer check. encap_lookup_t method can be invoked by IP encap subsytem even if none of gif/gre/me interfaces are exist. Hash tables are allocated on demand, when first interface is created. So, make NULL pointer check before doing access to hash table. PR: 229378 Modified: head/sys/net/if_me.c head/sys/netinet/in_gif.c head/sys/netinet/ip_gre.c head/sys/netinet6/in6_gif.c head/sys/netinet6/ip6_gre.c Modified: head/sys/net/if_me.c ============================================================================== --- head/sys/net/if_me.c Thu Jun 28 09:42:30 2018 (r335759) +++ head/sys/net/if_me.c Thu Jun 28 11:39:27 2018 (r335760) @@ -312,6 +312,9 @@ me_lookup(const struct mbuf *m, int off, int proto, vo const struct ip *ip; struct me_softc *sc; + if (V_me_hashtbl == NULL) + return (0); + MPASS(in_epoch()); ip = mtod(m, const struct ip *); CK_LIST_FOREACH(sc, &ME_HASH(ip->ip_dst.s_addr, Modified: head/sys/netinet/in_gif.c ============================================================================== --- head/sys/netinet/in_gif.c Thu Jun 28 09:42:30 2018 (r335759) +++ head/sys/netinet/in_gif.c Thu Jun 28 11:39:27 2018 (r335760) @@ -289,6 +289,9 @@ in_gif_lookup(const struct mbuf *m, int off, int proto struct gif_softc *sc; int ret; + if (V_ipv4_hashtbl == NULL) + return (0); + MPASS(in_epoch()); ip = mtod(m, const struct ip *); /* Modified: head/sys/netinet/ip_gre.c ============================================================================== --- head/sys/netinet/ip_gre.c Thu Jun 28 09:42:30 2018 (r335759) +++ head/sys/netinet/ip_gre.c Thu Jun 28 11:39:27 2018 (r335760) @@ -115,6 +115,9 @@ in_gre_lookup(const struct mbuf *m, int off, int proto const struct ip *ip; struct gre_softc *sc; + if (V_ipv4_hashtbl == NULL) + return (0); + MPASS(in_epoch()); ip = mtod(m, const struct ip *); CK_LIST_FOREACH(sc, &GRE_HASH(ip->ip_dst.s_addr, Modified: head/sys/netinet6/in6_gif.c ============================================================================== --- head/sys/netinet6/in6_gif.c Thu Jun 28 09:42:30 2018 (r335759) +++ head/sys/netinet6/in6_gif.c Thu Jun 28 11:39:27 2018 (r335760) @@ -309,6 +309,9 @@ in6_gif_lookup(const struct mbuf *m, int off, int prot struct gif_softc *sc; int ret; + if (V_ipv6_hashtbl == NULL) + return (0); + MPASS(in_epoch()); /* * NOTE: it is safe to iterate without any locking here, because softc Modified: head/sys/netinet6/ip6_gre.c ============================================================================== --- head/sys/netinet6/ip6_gre.c Thu Jun 28 09:42:30 2018 (r335759) +++ head/sys/netinet6/ip6_gre.c Thu Jun 28 11:39:27 2018 (r335760) @@ -107,6 +107,9 @@ in6_gre_lookup(const struct mbuf *m, int off, int prot const struct ip6_hdr *ip6; struct gre_softc *sc; + if (V_ipv6_hashtbl == NULL) + return (0); + MPASS(in_epoch()); ip6 = mtod(m, const struct ip6_hdr *); CK_LIST_FOREACH(sc, &GRE_HASH(&ip6->ip6_dst, &ip6->ip6_src), chain) { From owner-svn-src-all@freebsd.org Thu Jun 28 12:55:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E617A1032C4E; Thu, 28 Jun 2018 12:55:06 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 94F297A9F7; Thu, 28 Jun 2018 12:55:06 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 75FE8127CE; Thu, 28 Jun 2018 12:55:06 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5SCt6JN088753; Thu, 28 Jun 2018 12:55:06 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5SCt6qc088752; Thu, 28 Jun 2018 12:55:06 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201806281255.w5SCt6qc088752@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Thu, 28 Jun 2018 12:55: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: r335761 - stable/11/usr.sbin/syslogd X-SVN-Group: stable-11 X-SVN-Commit-Author: ed X-SVN-Commit-Paths: stable/11/usr.sbin/syslogd X-SVN-Commit-Revision: 335761 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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 12:55:07 -0000 Author: ed Date: Thu Jun 28 12:55:05 2018 New Revision: 335761 URL: https://svnweb.freebsd.org/changeset/base/335761 Log: MFC r335565: Still parse messages that don't contain an RFC 3164 timestamp. The changes made in r326573 required that messages always start with an RFC 3164 timestamp. It looks like certain devices, but also certain logging libraries (Python 3's "logging" package) simply don't generate RFC 3164 formatted messages containing a timestamp. Make timestamps optional again. When the timestamp is missing, also assume that the message contains no hostname. The first word of the message likely already belongs to the message payload. PR: 229236 Modified: stable/11/usr.sbin/syslogd/syslogd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/syslogd/syslogd.c ============================================================================== --- stable/11/usr.sbin/syslogd/syslogd.c Thu Jun 28 11:39:27 2018 (r335760) +++ stable/11/usr.sbin/syslogd/syslogd.c Thu Jun 28 12:55:05 2018 (r335761) @@ -1170,68 +1170,70 @@ parsemsg_rfc3164(const char *from, int pri, char *msg) size_t i, msglen; char line[MAXLINE + 1]; - /* Parse the timestamp provided by the remote side. */ - if (strptime(msg, RFC3164_DATEFMT, &tm_parsed) != - msg + RFC3164_DATELEN || msg[RFC3164_DATELEN] != ' ') { - dprintf("Failed to parse TIMESTAMP from %s: %s\n", from, msg); - return; - } - msg += RFC3164_DATELEN + 1; + /* + * Parse the TIMESTAMP provided by the remote side. If none is + * found, assume this is not an RFC 3164 formatted message, + * only containing a TAG and a MSG. + */ + timestamp = NULL; + if (strptime(msg, RFC3164_DATEFMT, &tm_parsed) == + msg + RFC3164_DATELEN && msg[RFC3164_DATELEN] == ' ') { + msg += RFC3164_DATELEN + 1; + if (!RemoteAddDate) { + struct tm tm_now; + time_t t_now; + int year; - if (!RemoteAddDate) { - struct tm tm_now; - time_t t_now; - int year; + /* + * As the timestamp does not contain the year + * number, daylight saving time information, nor + * a time zone, attempt to infer it. Due to + * clock skews, the timestamp may even be part + * of the next year. Use the last year for which + * the timestamp is at most one week in the + * future. + * + * This loop can only run for at most three + * iterations before terminating. + */ + t_now = time(NULL); + localtime_r(&t_now, &tm_now); + for (year = tm_now.tm_year + 1;; --year) { + assert(year >= tm_now.tm_year - 1); + timestamp_remote.tm = tm_parsed; + timestamp_remote.tm.tm_year = year; + timestamp_remote.tm.tm_isdst = -1; + timestamp_remote.usec = 0; + if (mktime(×tamp_remote.tm) < + t_now + 7 * 24 * 60 * 60) + break; + } + timestamp = ×tamp_remote; + } /* - * As the timestamp does not contain the year number, - * daylight saving time information, nor a time zone, - * attempt to infer it. Due to clock skews, the - * timestamp may even be part of the next year. Use the - * last year for which the timestamp is at most one week - * in the future. - * - * This loop can only run for at most three iterations - * before terminating. + * A single space character MUST also follow the HOSTNAME field. */ - t_now = time(NULL); - localtime_r(&t_now, &tm_now); - for (year = tm_now.tm_year + 1;; --year) { - assert(year >= tm_now.tm_year - 1); - timestamp_remote.tm = tm_parsed; - timestamp_remote.tm.tm_year = year; - timestamp_remote.tm.tm_isdst = -1; - timestamp_remote.usec = 0; - if (mktime(×tamp_remote.tm) < - t_now + 7 * 24 * 60 * 60) + msglen = strlen(msg); + for (i = 0; i < MIN(MAXHOSTNAMELEN, msglen); i++) { + if (msg[i] == ' ') { + if (RemoteHostname) { + msg[i] = '\0'; + from = msg; + } + msg += i + 1; break; - } - timestamp = ×tamp_remote; - } else - timestamp = NULL; - - /* - * A single space character MUST also follow the HOSTNAME field. - */ - msglen = strlen(msg); - for (i = 0; i < MIN(MAXHOSTNAMELEN, msglen); i++) { - if (msg[i] == ' ') { - if (RemoteHostname) { - msg[i] = '\0'; - from = msg; } - msg += i + 1; - break; + /* + * Support non RFC compliant messages, without hostname. + */ + if (msg[i] == ':') + break; } - /* - * Support non RFC compliant messages, without hostname. - */ - if (msg[i] == ':') - break; - } - if (i == MIN(MAXHOSTNAMELEN, msglen)) { - dprintf("Invalid HOSTNAME from %s: %s\n", from, msg); - return; + if (i == MIN(MAXHOSTNAMELEN, msglen)) { + dprintf("Invalid HOSTNAME from %s: %s\n", from, msg); + return; + } } /* Remove the TAG, if present. */ From owner-svn-src-all@freebsd.org Thu Jun 28 13:16:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E28331033AA2; Thu, 28 Jun 2018 13:16:31 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D0807B5F7; Thu, 28 Jun 2018 13:16:31 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w5SDGQkg013220; Thu, 28 Jun 2018 06:16:26 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w5SDGQeH013219; Thu, 28 Jun 2018 06:16:26 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201806281316.w5SDGQeH013219@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r335629 - in head: share/man/man4 sys/dev/vt/hw/vga In-Reply-To: <20180628093608.33yvnrwmmtj44get@mac.bytemobile.com> To: "Roger Pau Monn?" Date: Thu, 28 Jun 2018 06:16:26 -0700 (PDT) CC: Ian Lepore , rgrimes@freebsd.org, Alexey Dokuchaev , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@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-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 13:16:32 -0000 > On Tue, Jun 26, 2018 at 10:18:39AM -0600, Ian Lepore wrote: > > On Tue, 2018-06-26 at 08:55 -0700, Rodney W. Grimes wrote: > > > > > > > > On Tue, Jun 26, 2018 at 05:21:27AM +0000, Alexey Dokuchaev wrote: > > > > > > > > > > On Mon, Jun 25, 2018 at 08:43:51AM -0700, Rodney W. Grimes wrote: > > > > > > > > > > > > > > > > > > > > New Revision: 335629 > > > > > > > URL: https://svnweb.freebsd.org/changeset/base/335629 > > > > > > > > > > > > > > Log: > > > > > > > ? vt: add option to ignore NO_VGA flag in ACPI > > > > > > > ?? > > > > > > > ? To workaround buggy firmware that sets this flag when > > > > > > > there's actually > > > > > > > ? a VGA present. > > > > > > > ?? > > > > > > > ? Reported and tested by: Yasuhiro KIMURA > > > > > > e.org> > > > > > > > ? Sponsored by: Citrix Systems R&D > > > > > > > ? Reviewed by: kib > > > > > > > ? Differential revision: https://reviews.freebsd.org/D > > > > > > > 16003 > > > > > > It is generally best to avoid double negatives, > > > > > > couldnt this of been better named? (hw.vga.acpi_force_vga) > > > > > Yes please; I get constantly confused when calculating negatives > > > > > and > > > > > often get them wrong. > > > > This is specifically done to workaround a firmware bug where some > > > > buggy firmwares set the NO_VGA flag in ACPI. > > > We are not conflicted about working around the buggy ACPI. > > > > > > > > > > > So the option does > > > > exactly what the name says, it ignores the NO_VGA flag in ACPI. IMO > > > > acpi_force_vga is not as descriptive as the current name. > > > Interestingly that is the text you use to describe it in the man > > > page, so it seems as if it is good for the description, but not > > > good for the name of the flag itself? > > > > > > .It Va hw.vga.acpi_ignore_no_vga > > > Set to 1 to force the usage of the VGA driver regardless of whether > > > ACPI IAPC_BOOT_ARCH signals no VGA support. > > > Can be used to workaround firmware bugs in the ACPI tables. > > > > > > This does not mention the ACPI table entry being over ridden, > > > if (flags & ACPI_FADT_NO_VGA) > > > > > > Further digging I believe you have placed this in the wrong > > > part of the hierarchy.??You put it in hw.vga, and it really > > > should be in hw.acpi. > > > Maybe hw.acpi.bootflags.ignore.no_vga. > > > > > > Are there any other bootflags we may want to ignore? > > > > > > Regards, > > > > > > There is ACPI_FADT_NO_CMOS_RTC, with an associated tunable > > hw.atrtc.enabled (default is -1), which can be: Shouldnt this really be in hw.acpi..... > > > > ? -1 - enabled unless acpi says ACPI_FADT_NO_CMOS_RTC > > ? ?0 - unconditionally disabled > > ? ?1 - unconditionally enabled > > > > The idea was that if RTC is provided by EFI runtime services, this flag > > would indicate that old-school CMOS RTC drivers should not be used. > > ?But, predictably, it turns out there are bioses that set this flag > > even when booting in legacy non-efi mode, leading to a need to ignore > > the flag and force use of the old driver. > > I could take this approach for vt and add hw.vt.enabled = { -1, 0, 1 } > if that seems better. Lets not scatter more ACPI stuff into non ACPI parts of the sysctl oid tree. If you do go this route it should really be in hw.acpi.* -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-all@freebsd.org Thu Jun 28 13:49:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBF9710356B7; Thu, 28 Jun 2018 13:49:01 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 800607CB3A; Thu, 28 Jun 2018 13:49:01 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5D4FC12FBF; Thu, 28 Jun 2018 13:49:01 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5SDn1SG014591; Thu, 28 Jun 2018 13:49:01 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5SDn0Ir014586; Thu, 28 Jun 2018 13:49:00 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201806281349.w5SDn0Ir014586@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Thu, 28 Jun 2018 13:49:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335762 - in head: . etc release/packages share/mk share/termcap usr.bin/vgrind X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: in head: . etc release/packages share/mk share/termcap usr.bin/vgrind X-SVN-Commit-Revision: 335762 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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 13:49:02 -0000 Author: brd Date: Thu Jun 28 13:48:59 2018 New Revision: 335762 URL: https://svnweb.freebsd.org/changeset/base/335762 Log: Simplify using bsd.endian.mk and have it provide CAP_MKDB_ENDIAN, since it is the most common usage. Approved by: bapt (mentor) Modified: head/Makefile.inc1 head/etc/Makefile head/release/packages/generate-ucl.sh head/share/mk/bsd.endian.mk head/share/termcap/Makefile head/usr.bin/vgrind/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Jun 28 12:55:05 2018 (r335761) +++ head/Makefile.inc1 Thu Jun 28 13:48:59 2018 (r335762) @@ -1803,13 +1803,11 @@ create-kernel-packages-flavor${flavor:C,^""$,${_defaul env -i LC_COLLATE=C sort ${KSTAGEDIR}/kernel.meta | \ awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \ -v kernel=yes -v _kernconf=${INSTALLKERNEL} ; \ - cap_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VCAP_MKDB_ENDIAN` ; \ sed -e "s/%VERSION%/${PKG_VERSION}/" \ -e "s/%PKGNAME%/kernel-${INSTALLKERNEL:tl}${flavor}/" \ -e "s/%KERNELDIR%/kernel/" \ -e "s/%COMMENT%/FreeBSD ${INSTALLKERNEL} kernel ${flavor}/" \ -e "s/%DESC%/FreeBSD ${INSTALLKERNEL} kernel ${flavor}/" \ - -e "s/%CAP_MKDB_ENDIAN%/$${cap_arg}/g" \ -e "s/ %VCS_REVISION%/${VCS_REVISION}/" \ ${SRCDIR}/release/packages/kernel.ucl \ > ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.ucl ; \ @@ -1837,13 +1835,11 @@ create-kernel-packages-extra-flavor${flavor:C,^""$,${_ env -i LC_COLLATE=C sort ${KSTAGEDIR}/kernel.${_kernel}.meta | \ awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \ -v kernel=yes -v _kernconf=${_kernel} ; \ - cap_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VCAP_MKDB_ENDIAN` ; \ sed -e "s/%VERSION%/${PKG_VERSION}/" \ -e "s/%PKGNAME%/kernel-${_kernel:tl}${flavor}/" \ -e "s/%KERNELDIR%/kernel.${_kernel}/" \ -e "s/%COMMENT%/FreeBSD ${_kernel} kernel ${flavor}/" \ -e "s/%DESC%/FreeBSD ${_kernel} kernel ${flavor}/" \ - -e "s/%CAP_MKDB_ENDIAN%/$${cap_arg}/g" \ -e "s/ %VCS_REVISION%/${VCS_REVISION}/" \ ${SRCDIR}/release/packages/kernel.ucl \ > ${KSTAGEDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.ucl ; \ Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Thu Jun 28 12:55:05 2018 (r335761) +++ head/etc/Makefile Thu Jun 28 13:48:59 2018 (r335762) @@ -178,13 +178,6 @@ distribute: ${_+_}cd ${.CURDIR} ; ${MAKE} distribution DESTDIR=${DISTDIR}/${DISTRIBUTION} .include -.if ${TARGET_ENDIANNESS} == "1234" -CAP_MKDB_ENDIAN?= -l -.elif ${TARGET_ENDIANNESS} == "4321" -CAP_MKDB_ENDIAN?= -b -.else -CAP_MKDB_ENDIAN?= -.endif .if defined(NO_ROOT) METALOG.add?= cat -l >> ${METALOG} Modified: head/release/packages/generate-ucl.sh ============================================================================== --- head/release/packages/generate-ucl.sh Thu Jun 28 12:55:05 2018 (r335761) +++ head/release/packages/generate-ucl.sh Thu Jun 28 13:48:59 2018 (r335762) @@ -131,7 +131,7 @@ main() { [ -z "${desc}" ] && desc="${outname} package" cp "${uclsource}" "${uclfile}" - cap_arg="$(make -C ${srctree}/etc -VCAP_MKDB_ENDIAN)" + cap_arg="$( make -f ${srctree}/share/mk/bsd.endian.mk -VCAP_MKDB_ENDIAN )" sed -i '' -e "s/%VERSION%/${PKG_VERSION}/" \ -e "s/%PKGNAME%/${origname}/" \ -e "s/%COMMENT%/${comment}/" \ Modified: head/share/mk/bsd.endian.mk ============================================================================== --- head/share/mk/bsd.endian.mk Thu Jun 28 12:55:05 2018 (r335761) +++ head/share/mk/bsd.endian.mk Thu Jun 28 13:48:59 2018 (r335762) @@ -7,6 +7,7 @@ ${MACHINE_CPUARCH} == "riscv" || \ ${MACHINE_ARCH:Mmips*el*} != "" TARGET_ENDIANNESS= 1234 +CAP_MKDB_ENDIAN= -l .elif ${MACHINE_ARCH} == "powerpc" || \ ${MACHINE_ARCH} == "powerpc64" || \ ${MACHINE_ARCH} == "powerpcspe" || \ @@ -14,4 +15,5 @@ TARGET_ENDIANNESS= 1234 (${MACHINE} == "arm" && ${MACHINE_ARCH:Marm*eb*} != "") || \ ${MACHINE_ARCH:Mmips*} != "" TARGET_ENDIANNESS= 4321 +CAP_MKDB_ENDIAN= -b .endif Modified: head/share/termcap/Makefile ============================================================================== --- head/share/termcap/Makefile Thu Jun 28 12:55:05 2018 (r335761) +++ head/share/termcap/Makefile Thu Jun 28 13:48:59 2018 (r335762) @@ -12,13 +12,6 @@ FILESDIR= ${BINDIR}/misc CLEANFILES+= termcap.db .include -.if ${TARGET_ENDIANNESS} == "1234" -CAP_MKDB_ENDIAN= -l -.elif ${TARGET_ENDIANNESS} == "4321" -CAP_MKDB_ENDIAN= -b -.else -CAP_MKDB_ENDIAN= -.endif termcap.db: termcap cap_mkdb ${CAP_MKDB_ENDIAN} -f ${.TARGET:R} ${.ALLSRC} Modified: head/usr.bin/vgrind/Makefile ============================================================================== --- head/usr.bin/vgrind/Makefile Thu Jun 28 12:55:05 2018 (r335761) +++ head/usr.bin/vgrind/Makefile Thu Jun 28 13:48:59 2018 (r335762) @@ -19,13 +19,6 @@ SCRIPTSDIR=/usr/bin CLEANFILES= vgrindefs.src.db .include -.if ${TARGET_ENDIANNESS} == "1234" -CAP_MKDB_ENDIAN= -l -.elif ${TARGET_ENDIANNESS} == "4321" -CAP_MKDB_ENDIAN= -b -.else -CAP_MKDB_ENDIAN= -.endif vgrindefs.src.db: vgrindefs.src cap_mkdb ${CAP_MKDB_ENDIAN} -f vgrindefs.src ${.ALLSRC} From owner-svn-src-all@freebsd.org Thu Jun 28 15:00:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86DE1100A8E2; Thu, 28 Jun 2018 15:00:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 32D5B7F80A; Thu, 28 Jun 2018 15:00:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1595D13B03; Thu, 28 Jun 2018 15:00:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5SF0Iqd050154; Thu, 28 Jun 2018 15:00:18 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5SF0IGF050153; Thu, 28 Jun 2018 15:00:18 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201806281500.w5SF0IGF050153@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 28 Jun 2018 15:00:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335763 - head/etc/devd X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/etc/devd X-SVN-Commit-Revision: 335763 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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 15:00:19 -0000 Author: imp Date: Thu Jun 28 15:00:18 2018 New Revision: 335763 URL: https://svnweb.freebsd.org/changeset/base/335763 Log: Fix quoting in sending the NOMATCH event to devmatch The NOMATCH event was previously quoted to protect it from shell expansion. However, that quoting now interferes with the quoting devd is doing. Quote to protect just the ?. Modified: head/etc/devd/devmatch.conf Modified: head/etc/devd/devmatch.conf ============================================================================== --- head/etc/devd/devmatch.conf Thu Jun 28 13:48:59 2018 (r335762) +++ head/etc/devd/devmatch.conf Thu Jun 28 15:00:18 2018 (r335763) @@ -9,7 +9,7 @@ # # Generic NOMATCH event nomatch 100 { - action "service devmatch quietstart '?$_'"; + action "service devmatch quietstart '?'$_"; }; # Add the following to devd.conf to prevent this from running: From owner-svn-src-all@freebsd.org Thu Jun 28 15:30:52 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D2BB1012959; Thu, 28 Jun 2018 15:30:52 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3E57780B55; Thu, 28 Jun 2018 15:30:52 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F83213FE6; Thu, 28 Jun 2018 15:30:52 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5SFUqss065214; Thu, 28 Jun 2018 15:30:52 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5SFUqgW065213; Thu, 28 Jun 2018 15:30:52 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201806281530.w5SFUqgW065213@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 28 Jun 2018 15:30:51 +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: r335764 - stable/11/release/doc/en_US.ISO8859-1/errata X-SVN-Group: stable-11 X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: stable/11/release/doc/en_US.ISO8859-1/errata X-SVN-Commit-Revision: 335764 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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 15:30:52 -0000 Author: gjb Date: Thu Jun 28 15:30:51 2018 New Revision: 335764 URL: https://svnweb.freebsd.org/changeset/base/335764 Log: Add an errata entry regarding Bugzilla 228536. PR: 228536 Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Thu Jun 28 15:00:18 2018 (r335763) +++ stable/11/release/doc/en_US.ISO8859-1/errata/article.xml Thu Jun 28 15:30:51 2018 (r335764) @@ -218,6 +218,22 @@ boot had been added; this should have stated &man.ocs.fc.4;. + + + [2018-06-28] An issue had been reported after the + release of &os; 11.2 with x11/nvidia-driver installed from + the upstream package mirrors via &man.pkg.8;. + + Building x11/nvidia-driver from + the &man.ports.7; collection has been reported to resolve + the issue. + + See PR 228536 + for more information. + From owner-svn-src-all@freebsd.org Thu Jun 28 17:01:05 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBA60102027D; Thu, 28 Jun 2018 17:01:05 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 810BC84424; Thu, 28 Jun 2018 17:01:05 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 62EDC14E71; Thu, 28 Jun 2018 17:01:05 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5SH15V7011262; Thu, 28 Jun 2018 17:01:05 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5SH15eP011261; Thu, 28 Jun 2018 17:01:05 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201806281701.w5SH15eP011261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Thu, 28 Jun 2018 17:01:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335765 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: dab X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 335765 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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 17:01:06 -0000 Author: dab Date: Thu Jun 28 17:01:04 2018 New Revision: 335765 URL: https://svnweb.freebsd.org/changeset/base/335765 Log: Remove potential identifier conflict in the EV_SET macro. PR43905 pointed out a problem with the EV_SET macro if the passed struct kevent pointer were specified with an expression with side effects (e.g., "kevp++"). This was fixed in rS110241, but by using a local block that defined an internal variable (named "kevp") to get the pointer value once. This worked, but could cause issues if an existing variable named "kevp" is in scope. To avoid that issue, jilles@ pointed out that "C99 compound literals and designated initializers allow doing this cleanly using a macro". This change incorporates that suggestion, essentially verbatim from jilles@ comment on PR43905, except retaining the old definition for pre-C99 or non-STDC (e.g., C++) compilers. PR: 43905 Submitted by: Jilles Tjoelker (jilles@) Reported by: Lamont Granquist Reviewed by: jmg (no comments), jilles MFC after: 1 week Sponsored by: Dell EMC Differential Revision: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=43905 Modified: head/sys/sys/event.h Modified: head/sys/sys/event.h ============================================================================== --- head/sys/sys/event.h Thu Jun 28 15:30:51 2018 (r335764) +++ head/sys/sys/event.h Thu Jun 28 17:01:04 2018 (r335765) @@ -49,7 +49,26 @@ #define EVFILT_EMPTY (-13) /* empty send socket buf */ #define EVFILT_SYSCOUNT 13 +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #define EV_SET(kevp_, a, b, c, d, e, f) do { \ + *(kevp_) = (struct kevent){ \ + .ident = (a), \ + .filter = (b), \ + .flags = (c), \ + .fflags = (d), \ + .data = (e), \ + .udata = (f), \ + .ext[0] = 0, \ + .ext[1] = 0, \ + .ext[2] = 0, \ + .ext[3] = 0, \ + }; \ +} while(0) +#else /* Pre-C99 or not STDC (e.g., C++) */ +/* The definition of the local variable kevp could possibly conflict + * with a user-defined value passed in parameters a-f. + */ +#define EV_SET(kevp_, a, b, c, d, e, f) do { \ struct kevent *kevp = (kevp_); \ (kevp)->ident = (a); \ (kevp)->filter = (b); \ @@ -62,6 +81,7 @@ (kevp)->ext[2] = 0; \ (kevp)->ext[3] = 0; \ } while(0) +#endif struct kevent { __uintptr_t ident; /* identifier for this event */ From owner-svn-src-all@freebsd.org Thu Jun 28 17:06:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94B861020A42; Thu, 28 Jun 2018 17:06:44 +0000 (UTC) (envelope-from dab0816@gmail.com) Received: from mail-it0-x22a.google.com (mail-it0-x22a.google.com [IPv6:2607:f8b0:4001:c0b::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1C4338491E; Thu, 28 Jun 2018 17:06:44 +0000 (UTC) (envelope-from dab0816@gmail.com) Received: by mail-it0-x22a.google.com with SMTP id y127-v6so22067472itd.1; Thu, 28 Jun 2018 10:06:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:subject:to:references:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=A2UWbzoKFzJeN+OMVJ4hdKmjxAH64wZYbHxH4b6m+Y0=; b=nNBOBOJPI+pZWBcEhl3OdQk8Np4vAZIPQClx8JefPr5YAPn088FgJo5lJFT8lD4UCE bTorRLKV+vkGDrhUY4+lHet9ZteJszn2FvHcsswq3MXXRqRzi16QxPGzCzrrfq27f1+N JoEHScFe1x9aeFTJWN+qmZO+jJ5GD8bfTf0x74Buu/7XmC7XU6+nujQhlLadvU2mM6LW KkDfXzGhlL9wU9SryGjD0XwV8O3DiXsLoMevHBTP81vmkDyBMCxMgrvG0AYVuagpM/cN f8BMRFBCXGciYzF58Bo74qji1VmzVvjlnrVirbsC08pPCOpfsgC0FLCIOebX7TJbnQtF Vj1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:subject:to:references:openpgp :autocrypt:message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding:content-language; bh=A2UWbzoKFzJeN+OMVJ4hdKmjxAH64wZYbHxH4b6m+Y0=; b=Pj1sMtD/oMb6oDrX7MOxFtYK2V3wezaTsbQQTpaWsujJgV04ByPOaHe3n5RUHBGlbA ynUWxIPIhNM+irXnSLhV5vmE7o5wIn0QR+pg1TZN7WjskyHtP0GroqEVheXnHCLGeftN uVTcmClvKfCNBFZH5PverRgOA0Rv1bQ34hB+CvZ/YqkCi1qb/sVVXKtAQ+jMvClpLfe+ qu6jcHWD3KbtPZo904CL50nxZvpwuYidEAkLBrKZW/EZBtbwUqnD+d3Z/bsVBs/f2bIW x+qkidhY1BRSoIrKjjoRCZfIMpLXV8tdCT8o2mkMjuka+qyWI9zDNIQjHt23KVY55aV6 hWCQ== X-Gm-Message-State: APt69E1h+Jb5jpqpHiOpVv0t7yAA9ikWyA3OmHXm2uDsT5XVCsZVRZhZ gV6JIrnhMxOxhYsMqIbRt+kvNk3v X-Google-Smtp-Source: ADUXVKLa3wxjQvz3fx6SoTU8JvLER5MzK6OALIXAxYsb5tbDgOrG/EI8EFttzwBQlKI6nibDBf1DCg== X-Received: by 2002:a24:2201:: with SMTP id o1-v6mr9446062ito.74.1530205603298; Thu, 28 Jun 2018 10:06:43 -0700 (PDT) Received: from dab-xps-13-9370.localdomain ([76.164.8.130]) by smtp.gmail.com with ESMTPSA id x5-v6sm3163947ioa.65.2018.06.28.10.06.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jun 2018 10:06:42 -0700 (PDT) Sender: David Bright From: "David A. Bright" X-Google-Original-From: "David A. Bright" Subject: Re: svn commit: r335765 - head/sys/sys To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201806281701.w5SH15eP011261@repo.freebsd.org> Openpgp: preference=signencrypt Autocrypt: addr=dab@FreeBSD.org; prefer-encrypt=mutual; keydata= xsBNBFgqQsIBCADfDUZ79qW2MKVRQl9l9zMYzppdHn+eS7KGjUP9hjmYUuX3vM0Sc5DlJ9Py 59Byucg8zo6eow1iv6NdiEPuUEYB2ujDP/kbmC397zEt6p9ldlL4PXXSJumpdZCzwz4ACYB5 ke7OCljNqbigzoZgX5DXjyjx87NfG6eWkbnEweDPmae7DGj5bwQmJPoTqvJR7Ot/R/73ix8l hph1vdl83Iqu+IDVdlXTI2Afz4UaCRdfDiXgMQIo/HABXJ90+TXG/vH37Jb0kBflql9sEaUs CcTvMrye0Wjgv3VSPZm3ZEgmR7UKR71p2MJVlVVZUH3FHQ2jDqKpCMi7F3ERlvRDktm/ABEB AAHNHkRhdmlkIEJyaWdodCA8ZGFiQGZyZWVic2Qub3JnPsLAfQQTAQoAJwUCWCpCwgIbAwUJ BaOagAULCQgHAwUVCgkICwUWAwIBAAIeAQIXgAAKCRAzeMsxoQO+aqagCADDt4FbZBz3VFev TEtAjuyzCDPmPom1MBwsh6KB2J84wKOsXPmZ7vqaZ2G70fCPNowqmHq56cAbp0BD1Lf6gD+3 imeacKc/E6n+L49LOhOtQ8EUyHs/nAUmlE1PrOS1w5wmCgRjPXa5k+zxj/YMsAEFdMn6UzOl 5MIJN/zhBB5tU2bkP5hF4rVvpQ1zlnSldoBLfPlG/w1RzvOSJfunZUTSNVrKYlSjEQ7q56ud xKoLPEdr+X8kqwZilh5WBiTt7mMw7lrP6dMV/GGmDg893J6conQ1l2RN6Un1gKlc3rgdz3sh ncr786WF3cV2dFSIrO/Pn3iNRR3uJouRLdLhU0kMzsBNBFgqQsIBCAC5ABwcVerpyp5NzHBD FSbxEyPab6HFH1E4zksEGyeypU8UW5acc2ko5Ovz7CE0n21uhBtIt/Lz5Koxz0LSqqnk9jIQ L/4XVvne+8YnT+Tf9DZv9We5K0tFit/DFgCzIpxacoxLGBRNSkSzFrAepvVinTk905igdYZY fxtHrAREU4BdqBMQtbgGaewHtOLlRRr+N4wkAZlJLa7RaLn5s/EakpmCM1eR8z0fOBNJSXlW Ozqh1cvwWZ00qj0rYXwXu0fgzpREmJFS01GByFuB4xDyqfAoynxKNBJH/qAcJTp7jST8PLWe 3Tblm4acsIAPHUcABgMnZYdMQnSwwa9/W1DlABEBAAHCwGUEGAEKAA8FAlgqQsICGwwFCQWj moAACgkQM3jLMaEDvmp8hQgAzKTYmU2cf35NdrtT9C7jBDWSVSDdyKHYSAKoP+vAkC3A1HH6 wohE5JvOZ6245vgBQwFHvzh2v7jDUWmB3CrcSSMUoUIwl15mWlCdCy/C3SAknxQx+zHYmx9v uHPS1yF2l0KPS30Kc1le1GqVYi5wxnWPo+gE3MH4DDh5LdDExYveMuBgybdNxV8Qvr25UghJ HrQCT+FCISo0FActO1Z5HzdOKxQe6KTn+zKr4yKCOe4kb7GUaAX3Pt82J7bMtwRzAKLyjMJV QueL/cr+geerKKrd8FyVAgQMhdBYD3lyjK6nGssgr4Og9+QtsE2RAVH9qqhcF3kI7nxJ7EDb /d3xag== Message-ID: Date: Thu, 28 Jun 2018 12:06:42 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <201806281701.w5SH15eP011261@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 17:06:44 -0000 On 06/28/2018 12:01 PM, David Bright wrote: > Author: dab > Date: Thu Jun 28 17:01:04 2018 > New Revision: 335765 > URL: https://svnweb.freebsd.org/changeset/base/335765 > > Log: > Remove potential identifier conflict in the EV_SET macro. > > > Differential Revision: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=43905 Oops; wrong URL: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=43905 -- David Bright dab@FreeBSD.org From owner-svn-src-all@freebsd.org Thu Jun 28 17:07:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8D4091020ABA; Thu, 28 Jun 2018 17:07:21 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3ED3684A5E; Thu, 28 Jun 2018 17:07:21 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 200C814FDD; Thu, 28 Jun 2018 17:07:21 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5SH7LCT016310; Thu, 28 Jun 2018 17:07:21 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5SH7KTp016309; Thu, 28 Jun 2018 17:07:20 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201806281707.w5SH7KTp016309@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 28 Jun 2018 17:07:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335766 - head/sys/dev/efidev X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/sys/dev/efidev X-SVN-Commit-Revision: 335766 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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 17:07:21 -0000 Author: ian Date: Thu Jun 28 17:07:20 2018 New Revision: 335766 URL: https://svnweb.freebsd.org/changeset/base/335766 Log: Add missing MODULE_VERSION() and MODULE_DEPEND(). Modified: head/sys/dev/efidev/efirtc.c Modified: head/sys/dev/efidev/efirtc.c ============================================================================== --- head/sys/dev/efidev/efirtc.c Thu Jun 28 17:01:04 2018 (r335765) +++ head/sys/dev/efidev/efirtc.c Thu Jun 28 17:07:20 2018 (r335766) @@ -202,3 +202,5 @@ static driver_t efirtc_driver = { }; DRIVER_MODULE(efirtc, nexus, efirtc_driver, efirtc_devclass, 0, 0); +MODULE_VERSION(efirtc, 1); +MODULE_DEPEND(efirtc, efirt, 1, 1, 1); From owner-svn-src-all@freebsd.org Thu Jun 28 17:09:41 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42AFC1020E29; Thu, 28 Jun 2018 17:09:41 +0000 (UTC) (envelope-from dab0816@gmail.com) Received: from mail-io0-x229.google.com (mail-io0-x229.google.com [IPv6:2607:f8b0:4001:c06::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BD0C884CB1; Thu, 28 Jun 2018 17:09:40 +0000 (UTC) (envelope-from dab0816@gmail.com) Received: by mail-io0-x229.google.com with SMTP id d185-v6so5938775ioe.0; Thu, 28 Jun 2018 10:09:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:subject:to:references:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=rz0fAsUkcif1sR+FlVEDwFdiDyaxzpgfN0JMT0F6JCk=; b=nK2xYK4YY8tPEPbtbMNf5tYfoxVkxcABDOdMa6tP161dpNGFlL2wp1QwKFe9DWbQOB TS8bZ41euA3ikX1xMBl8z4Syr3GYMbBNO4+eKOTmAgXOFAKA1fqM73c528qpepqEI/ks VsWJllf/7FUj5QLnk+dvqFdfrfX9b07mSKH8+d0trhvTyog6bOw5bENk84GDgN6VIF/V h3Tein7nJwAkGDlLQSRcTYXMJ3dLCofye58GZPSl+WiJKuxqYndVQ3a7abeh2/+glnFY xBVQC06W4MwaUNQ6jXfxJV6Mi3qBb+4tzfHmnPRyBJx0ceOp1lBtEgCJz5KUDislzXk6 VWXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:subject:to:references:openpgp :autocrypt:message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding:content-language; bh=rz0fAsUkcif1sR+FlVEDwFdiDyaxzpgfN0JMT0F6JCk=; b=QyMmwPiTjgUPyO8TitGTr7vmxLyRhrvvgFsd1SYC7WHeoSX+oKCD8/HV6qBVKUqAXJ RppqAMwp5+sLmvCGBA3UL69pe4KONOK0NgVKOEQCK98znd3xqJlAR45fPF5/ZWQo1DxC 98y1bjCOlh5ENaosi59PUYIeN1wiTiO9j389b1xPQ3beT3ovNXm+ignAYSU8EpufESfi vBuVvwN6A8MIDqVvWEPsYQ3gf/r9Udvd2itYxpx1+Ej/+wBBxCODVYxFye5acuMa7xjN F7OywT3mO4YRWYd493ZlU52WCo19SeqGgk6lJNRpkZsw/Xpb3NsYWyLGbTkP5cHZH/fv KlAQ== X-Gm-Message-State: APt69E1Uq4F51Fot651qe/89tm1DO7mpsLXOWp6pVj0xZwchP5MSCgR3 /15q2dQUXUngkcT01VTshVxiCoSQ X-Google-Smtp-Source: AAOMgpcpWA2FPO2Lr12aZ/53HuNSmaMYKAjvNibD2Z0d2JeHAtJvXdeFzOB1QqLHLLeNhWSyXm+i+Q== X-Received: by 2002:a6b:ac85:: with SMTP id v127-v6mr9110160ioe.53.1530205780105; Thu, 28 Jun 2018 10:09:40 -0700 (PDT) Received: from dab-xps-13-9370.localdomain ([76.164.8.130]) by smtp.gmail.com with ESMTPSA id f127-v6sm3823202iof.32.2018.06.28.10.09.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jun 2018 10:09:39 -0700 (PDT) Sender: David Bright From: "David A. Bright" X-Google-Original-From: "David A. Bright" Subject: Re: svn commit: r335765 - head/sys/sys To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201806281701.w5SH15eP011261@repo.freebsd.org> Openpgp: preference=signencrypt Autocrypt: addr=dab@FreeBSD.org; prefer-encrypt=mutual; keydata= xsBNBFgqQsIBCADfDUZ79qW2MKVRQl9l9zMYzppdHn+eS7KGjUP9hjmYUuX3vM0Sc5DlJ9Py 59Byucg8zo6eow1iv6NdiEPuUEYB2ujDP/kbmC397zEt6p9ldlL4PXXSJumpdZCzwz4ACYB5 ke7OCljNqbigzoZgX5DXjyjx87NfG6eWkbnEweDPmae7DGj5bwQmJPoTqvJR7Ot/R/73ix8l hph1vdl83Iqu+IDVdlXTI2Afz4UaCRdfDiXgMQIo/HABXJ90+TXG/vH37Jb0kBflql9sEaUs CcTvMrye0Wjgv3VSPZm3ZEgmR7UKR71p2MJVlVVZUH3FHQ2jDqKpCMi7F3ERlvRDktm/ABEB AAHNHkRhdmlkIEJyaWdodCA8ZGFiQGZyZWVic2Qub3JnPsLAfQQTAQoAJwUCWCpCwgIbAwUJ BaOagAULCQgHAwUVCgkICwUWAwIBAAIeAQIXgAAKCRAzeMsxoQO+aqagCADDt4FbZBz3VFev TEtAjuyzCDPmPom1MBwsh6KB2J84wKOsXPmZ7vqaZ2G70fCPNowqmHq56cAbp0BD1Lf6gD+3 imeacKc/E6n+L49LOhOtQ8EUyHs/nAUmlE1PrOS1w5wmCgRjPXa5k+zxj/YMsAEFdMn6UzOl 5MIJN/zhBB5tU2bkP5hF4rVvpQ1zlnSldoBLfPlG/w1RzvOSJfunZUTSNVrKYlSjEQ7q56ud xKoLPEdr+X8kqwZilh5WBiTt7mMw7lrP6dMV/GGmDg893J6conQ1l2RN6Un1gKlc3rgdz3sh ncr786WF3cV2dFSIrO/Pn3iNRR3uJouRLdLhU0kMzsBNBFgqQsIBCAC5ABwcVerpyp5NzHBD FSbxEyPab6HFH1E4zksEGyeypU8UW5acc2ko5Ovz7CE0n21uhBtIt/Lz5Koxz0LSqqnk9jIQ L/4XVvne+8YnT+Tf9DZv9We5K0tFit/DFgCzIpxacoxLGBRNSkSzFrAepvVinTk905igdYZY fxtHrAREU4BdqBMQtbgGaewHtOLlRRr+N4wkAZlJLa7RaLn5s/EakpmCM1eR8z0fOBNJSXlW Ozqh1cvwWZ00qj0rYXwXu0fgzpREmJFS01GByFuB4xDyqfAoynxKNBJH/qAcJTp7jST8PLWe 3Tblm4acsIAPHUcABgMnZYdMQnSwwa9/W1DlABEBAAHCwGUEGAEKAA8FAlgqQsICGwwFCQWj moAACgkQM3jLMaEDvmp8hQgAzKTYmU2cf35NdrtT9C7jBDWSVSDdyKHYSAKoP+vAkC3A1HH6 wohE5JvOZ6245vgBQwFHvzh2v7jDUWmB3CrcSSMUoUIwl15mWlCdCy/C3SAknxQx+zHYmx9v uHPS1yF2l0KPS30Kc1le1GqVYi5wxnWPo+gE3MH4DDh5LdDExYveMuBgybdNxV8Qvr25UghJ HrQCT+FCISo0FActO1Z5HzdOKxQe6KTn+zKr4yKCOe4kb7GUaAX3Pt82J7bMtwRzAKLyjMJV QueL/cr+geerKKrd8FyVAgQMhdBYD3lyjK6nGssgr4Og9+QtsE2RAVH9qqhcF3kI7nxJ7EDb /d3xag== Message-ID: Date: Thu, 28 Jun 2018 12:09:39 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 17:09:41 -0000 On 06/28/2018 12:06 PM, David A. Bright wrote: > On 06/28/2018 12:01 PM, David Bright wrote: > >> Author: dab >> Date: Thu Jun 28 17:01:04 2018 >> New Revision: 335765 >> URL: https://svnweb.freebsd.org/changeset/base/335765 >> >> Log: >> Remove potential identifier conflict in the EV_SET macro. >> >> >> Differential Revision: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=43905 > Oops; wrong URL: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=43905 Goodness. Third time's the charm: https://reviews.freebsd.org/D15679 Sorry for the noise. -- David Bright dab@FreeBSD.org From owner-svn-src-all@freebsd.org Thu Jun 28 17:52:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 405C3102222B; Thu, 28 Jun 2018 17:52:07 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E763786599; Thu, 28 Jun 2018 17:52:06 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C8947157F1; Thu, 28 Jun 2018 17:52:06 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5SHq64w058609; Thu, 28 Jun 2018 17:52:06 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5SHq6lW058608; Thu, 28 Jun 2018 17:52:06 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201806281752.w5SHq6lW058608@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Thu, 28 Jun 2018 17:52:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335767 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 335767 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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 17:52:07 -0000 Author: alc Date: Thu Jun 28 17:52:06 2018 New Revision: 335767 URL: https://svnweb.freebsd.org/changeset/base/335767 Log: Reflow one of the comments describing vm_phys_alloc_npages(). Modified: head/sys/vm/vm_phys.c Modified: head/sys/vm/vm_phys.c ============================================================================== --- head/sys/vm/vm_phys.c Thu Jun 28 17:07:20 2018 (r335766) +++ head/sys/vm/vm_phys.c Thu Jun 28 17:52:06 2018 (r335767) @@ -609,10 +609,10 @@ vm_phys_split_pages(vm_page_t m, int oind, struct vm_f * within the specified domain. Returns the actual number of allocated pages * and a pointer to each page through the array ma[]. * - * The returned pages may not be physically contiguous. However, in contrast to - * performing multiple, back-to-back calls to vm_phys_alloc_pages(..., 0), - * calling this function once to allocate the desired number of pages will avoid - * wasted time in vm_phys_split_pages(). + * The returned pages may not be physically contiguous. However, in contrast + * to performing multiple, back-to-back calls to vm_phys_alloc_pages(..., 0), + * calling this function once to allocate the desired number of pages will + * avoid wasted time in vm_phys_split_pages(). * * The free page queues for the specified domain must be locked. */ From owner-svn-src-all@freebsd.org Thu Jun 28 18:17:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EEA511022E4A; Thu, 28 Jun 2018 18:17:20 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A006A87248; Thu, 28 Jun 2018 18:17:20 +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 8146715BA6; Thu, 28 Jun 2018 18:17:20 +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 w5SIHKAa068779; Thu, 28 Jun 2018 18:17:20 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5SIHK6V068778; Thu, 28 Jun 2018 18:17:20 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201806281817.w5SIHK6V068778@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Thu, 28 Jun 2018 18:17:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335768 - head/lib/libc/sys X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/lib/libc/sys X-SVN-Commit-Revision: 335768 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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 18:17:21 -0000 Author: cem Date: Thu Jun 28 18:17:20 2018 New Revision: 335768 URL: https://svnweb.freebsd.org/changeset/base/335768 Log: sigaction.2: Minor cleanups Add vertical space between struct definition and function prototype. Use "NULL" to describe zero pointers, instead of "zero." Remove perhaps unclear "can not" and replace. Tag struct member names used with appropriate tags. Modified: head/lib/libc/sys/sigaction.2 Modified: head/lib/libc/sys/sigaction.2 ============================================================================== --- head/lib/libc/sys/sigaction.2 Thu Jun 28 17:52:06 2018 (r335767) +++ head/lib/libc/sys/sigaction.2 Thu Jun 28 18:17:20 2018 (r335768) @@ -28,7 +28,7 @@ .\" From: @(#)sigaction.2 8.2 (Berkeley) 4/3/94 .\" $FreeBSD$ .\" -.Dd September 30, 2016 +.Dd June 28, 2018 .Dt SIGACTION 2 .Os .Sh NAME @@ -46,6 +46,7 @@ struct sigaction { sigset_t sa_mask; /* signal mask to apply */ }; .Ed +.Pp .Ft int .Fo sigaction .Fa "int sig" @@ -143,15 +144,13 @@ assigns an action for a signal specified by .Fa sig . If .Fa act -is non-zero, it -specifies an action +is non-NULL, it specifies an action .Dv ( SIG_DFL , .Dv SIG_IGN , -or a handler routine) and mask -to be used when delivering the specified signal. +or a handler routine) and mask to be used when delivering the specified signal. If .Fa oact -is non-zero, the previous handling information for the signal +is non-NULL, the previous handling information for the signal is returned to the user. .Pp The above declaration of @@ -161,8 +160,12 @@ It is provided only to list the accessible members. See .In sys/signal.h for the actual definition. -In particular, the storage occupied by sa_handler and sa_sigaction overlaps, -and an application can not use both simultaneously. +In particular, the storage occupied by +.Va sa_handler +and +.Va sa_sigaction +overlaps, and it is nonsensical for an application to attempt to use both +simultaneously. .Pp Once a signal handler is installed, it normally remains installed until another From owner-svn-src-all@freebsd.org Thu Jun 28 18:19:47 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9D0B1022FC8; Thu, 28 Jun 2018 18:19:47 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 882D287462; Thu, 28 Jun 2018 18:19:47 +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 6946315BC1; Thu, 28 Jun 2018 18:19:47 +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 w5SIJlP9068915; Thu, 28 Jun 2018 18:19:47 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5SIJlu9068914; Thu, 28 Jun 2018 18:19:47 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201806281819.w5SIJlu9068914@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 28 Jun 2018 18:19:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335769 - head X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 335769 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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 18:19:48 -0000 Author: jhb Date: Thu Jun 28 18:19:46 2018 New Revision: 335769 URL: https://svnweb.freebsd.org/changeset/base/335769 Log: Include existing MAKE_PARAMS_ when determining the universe toolchain. This fixes a warning for each RISCV target during universe by passing in the required CROSS_TOOLCHAIN setting which will in turn set CROSS_BINUTILS_PREFIX correctly. It also ensures that a tinderbox build uses the correct compiler for riscv. Previously it was using the shared clang compiler instead of riscv64-gcc. Reviewed by: bdrewery Sponsored by: DARPA / AFRL Differential Revision: https://reviews.freebsd.org/D16049 Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Thu Jun 28 18:17:20 2018 (r335768) +++ head/Makefile Thu Jun 28 18:19:46 2018 (r335769) @@ -587,14 +587,14 @@ universe_${target}_worlds: .PHONY _need_clang_${target}_${target_arch} != \ env TARGET=${target} TARGET_ARCH=${target_arch} \ ${SUB_MAKE} -C ${.CURDIR} -f Makefile.inc1 test-system-compiler \ - -V MK_CLANG_BOOTSTRAP + ${MAKE_PARAMS_${target}} -V MK_CLANG_BOOTSTRAP .export _need_clang_${target}_${target_arch} .endif .if !defined(_need_lld_${target}_${target_arch}) _need_lld_${target}_${target_arch} != \ env TARGET=${target} TARGET_ARCH=${target_arch} \ ${SUB_MAKE} -C ${.CURDIR} -f Makefile.inc1 test-system-linker \ - -V MK_LLD_BOOTSTRAP + ${MAKE_PARAMS_${target}} -V MK_LLD_BOOTSTRAP .export _need_lld_${target}_${target_arch} .endif # Setup env for each arch to use the one clang. From owner-svn-src-all@freebsd.org Thu Jun 28 18:22:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCEB910232E3; Thu, 28 Jun 2018 18:22:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7FEA288204; Thu, 28 Jun 2018 18:22:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4700415C51; Thu, 28 Jun 2018 18:22:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5SIML50074015; Thu, 28 Jun 2018 18:22:21 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5SIMLel074014; Thu, 28 Jun 2018 18:22:21 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201806281822.w5SIMLel074014@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 28 Jun 2018 18:22:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335770 - head X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 335770 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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 18:22:22 -0000 Author: bdrewery Date: Thu Jun 28 18:22:20 2018 New Revision: 335770 URL: https://svnweb.freebsd.org/changeset/base/335770 Log: tinderbox: If the clang lookup fails fallback to the old default behavior. This fixes errors from the MK_CLANG_BOOTSTRAP/MK_LLD_BOOTSTRAP lookups to not force using XCC/XLD but to rather just build them as normal by allowing their own bootstrap logic to work. MFC after: 3 weeks X-MFC-with: r335711 r335769 Sponsored by: Dell EMC Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Thu Jun 28 18:19:46 2018 (r335769) +++ head/Makefile Thu Jun 28 18:22:20 2018 (r335770) @@ -587,19 +587,21 @@ universe_${target}_worlds: .PHONY _need_clang_${target}_${target_arch} != \ env TARGET=${target} TARGET_ARCH=${target_arch} \ ${SUB_MAKE} -C ${.CURDIR} -f Makefile.inc1 test-system-compiler \ - ${MAKE_PARAMS_${target}} -V MK_CLANG_BOOTSTRAP + ${MAKE_PARAMS_${target}} -V MK_CLANG_BOOTSTRAP 2>/dev/null || \ + echo unknown .export _need_clang_${target}_${target_arch} .endif .if !defined(_need_lld_${target}_${target_arch}) _need_lld_${target}_${target_arch} != \ env TARGET=${target} TARGET_ARCH=${target_arch} \ ${SUB_MAKE} -C ${.CURDIR} -f Makefile.inc1 test-system-linker \ - ${MAKE_PARAMS_${target}} -V MK_LLD_BOOTSTRAP + ${MAKE_PARAMS_${target}} -V MK_LLD_BOOTSTRAP 2>/dev/null || \ + echo unknown .export _need_lld_${target}_${target_arch} .endif # Setup env for each arch to use the one clang. .if defined(_need_clang_${target}_${target_arch}) && \ - ${_need_clang_${target}_${target_arch}} != "no" + ${_need_clang_${target}_${target_arch}} == "yes" # No check on existing XCC or CROSS_BINUTILS_PREFIX, etc, is needed since # we use the test-system-compiler logic to determine if clang needs to be # built. It will be no from that logic if already using an external @@ -613,7 +615,7 @@ MAKE_PARAMS_${target}+= \ XCPP="${HOST_OBJTOP}/tmp/usr/bin/cpp" .endif .if defined(_need_lld_${target}_${target_arch}) && \ - ${_need_lld_${target}_${target_arch}} != "no" + ${_need_lld_${target}_${target_arch}} == "yes" MAKE_PARAMS_${target}+= \ XLD="${HOST_OBJTOP}/tmp/usr/bin/ld" .endif @@ -625,9 +627,9 @@ universe_${target}_done: universe_${target}_worlds .PH .for target_arch in ${TARGET_ARCHES_${target}} universe_${target}_worlds: universe_${target}_${target_arch} .PHONY .if (defined(_need_clang_${target}_${target_arch}) && \ - ${_need_clang_${target}_${target_arch}} != "no") || \ + ${_need_clang_${target}_${target_arch}} == "yes") || \ (defined(_need_lld_${target}_${target_arch}) && \ - ${_need_lld_${target}_${target_arch}} != "no") + ${_need_lld_${target}_${target_arch}} == "yes") universe_${target}_${target_arch}: universe-toolchain universe_${target}_prologue: universe-toolchain .endif From owner-svn-src-all@freebsd.org Thu Jun 28 18:45:40 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DEBE11023CB2; Thu, 28 Jun 2018 18:45:39 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BF7288D7A; Thu, 28 Jun 2018 18:45:39 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-lj1-x234.google.com with SMTP id t22-v6so5301150ljc.11; Thu, 28 Jun 2018 11:45:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alumni-cwru-edu.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zae0Pk/1iwRZsTxy4Pvcd4iYG2Dh4TFxduuxJu8XYj0=; b=oBxLv+BVaGWuGqmm0Qz2hsab2C23VY8e+51t5METZM8IacLRb4PODlJJwJCBO3EHqS cBqqnCvctZwPiKPr6CeAAxzcAyUnwh41nZciqnx46RV3pmCcwuc+E2RCyNdsh9houYyu 4yIjqqdfs+0f3w1N+2xk9rT0HTzvvsy8q9Y+SJmGotbMadzzwbNMCZs+FkTj6yZua9vl L5QzMxk1GWa5fw7iWa7AOCiso7l0OHBa8/s/z5IEr2OB0SgZqQMuZvx2d2kSbp3jzmpK 8k5P5V12VWp+W/xRYl9n2eYrntWMVax7iQte8E2VIkBBaxnetcvpprTNXQdUc/+qHcSp ew+w== 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=zae0Pk/1iwRZsTxy4Pvcd4iYG2Dh4TFxduuxJu8XYj0=; b=Oj4C0KKrP6mvvHpwAZ1R6j55CzHnUrjT9ImL1Q+Jmb0Q/ZEXenTrG2SV0lvlfwSsbR 2KYo+TkNbIOC5z3x0nz5BjGHm0yJaX0Cvj/NuXHeeNePE6I/8p4PQjxRp2w/N6L9/olZ B5oBHr0PVulon3M45rpJb6JFruElA4OBgcQn1OqFikIwTpiM7kjD4+M85VWy6IbDJzNR qFe+EoeYV2kfCOSzYW0JhgWut6N2qTiJIW2/IgoPdbaWpu2kTERgslbHvjcI+4aDnoFb 8LeXxp04du6S/8DreHshvFlNrxcggD/ILiZfQhcOxo4srnUa1ZfT+1LjivSieiQ7g/Xo J4mw== X-Gm-Message-State: APt69E3ZBKmPSkXq4Qn9jqdT6Xd526aeJWRWOH5vzdXm+Z6agiZMn6aa pAYrfOnFyJxuF2jWN6ScwYLdQ7IsNUuufeGIAuoGYA== X-Google-Smtp-Source: AAOMgpcVdmv2BTHXeNDyOeuVanzdVMaNJjaChueZBBoOOZUhrhxRG6lJxQ+n+wPDFk1Ptccbn/+dzQwvozFHDX0JTvo= X-Received: by 2002:a2e:9c04:: with SMTP id s4-v6mr7846847lji.97.1530211537348; Thu, 28 Jun 2018 11:45:37 -0700 (PDT) MIME-Version: 1.0 References: <201806281701.w5SH15eP011261@repo.freebsd.org> In-Reply-To: <201806281701.w5SH15eP011261@repo.freebsd.org> From: Justin Hibbits Date: Thu, 28 Jun 2018 13:45:24 -0500 Message-ID: Subject: Re: svn commit: r335765 - head/sys/sys To: dab@freebsd.org Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 18:45:40 -0000 Hi David, On Thu, Jun 28, 2018 at 12:01 PM David Bright wrote: > > Author: dab > Date: Thu Jun 28 17:01:04 2018 > New Revision: 335765 > URL: https://svnweb.freebsd.org/changeset/base/335765 > > Log: > Remove potential identifier conflict in the EV_SET macro. > > PR43905 pointed out a problem with the EV_SET macro if the passed > struct kevent pointer were specified with an expression with side > effects (e.g., "kevp++"). This was fixed in rS110241, but by using a > local block that defined an internal variable (named "kevp") to get > the pointer value once. This worked, but could cause issues if an > existing variable named "kevp" is in scope. To avoid that issue, > jilles@ pointed out that "C99 compound literals and designated > initializers allow doing this cleanly using a macro". This change > incorporates that suggestion, essentially verbatim from jilles@ > comment on PR43905, except retaining the old definition for pre-C99 or > non-STDC (e.g., C++) compilers. > > PR: 43905 > Submitted by: Jilles Tjoelker (jilles@) > Reported by: Lamont Granquist > Reviewed by: jmg (no comments), jilles > MFC after: 1 week > Sponsored by: Dell EMC > Differential Revision: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=43905 > > Modified: > head/sys/sys/event.h > > Modified: head/sys/sys/event.h > ============================================================================== > --- head/sys/sys/event.h Thu Jun 28 15:30:51 2018 (r335764) > +++ head/sys/sys/event.h Thu Jun 28 17:01:04 2018 (r335765) > @@ -49,7 +49,26 @@ > #define EVFILT_EMPTY (-13) /* empty send socket buf */ > #define EVFILT_SYSCOUNT 13 > > +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L > #define EV_SET(kevp_, a, b, c, d, e, f) do { \ > + *(kevp_) = (struct kevent){ \ > + .ident = (a), \ > + .filter = (b), \ > + .flags = (c), \ > + .fflags = (d), \ > + .data = (e), \ > + .udata = (f), \ > + .ext[0] = 0, \ > + .ext[1] = 0, \ > + .ext[2] = 0, \ > + .ext[3] = 0, \ > + }; \ > +} while(0) > +#else /* Pre-C99 or not STDC (e.g., C++) */ > +/* The definition of the local variable kevp could possibly conflict > + * with a user-defined value passed in parameters a-f. > + */ > +#define EV_SET(kevp_, a, b, c, d, e, f) do { \ > struct kevent *kevp = (kevp_); \ > (kevp)->ident = (a); \ > (kevp)->filter = (b); \ > @@ -62,6 +81,7 @@ > (kevp)->ext[2] = 0; \ > (kevp)->ext[3] = 0; \ > } while(0) > +#endif > > struct kevent { > __uintptr_t ident; /* identifier for this event */ > This breaks gcc builds, with the following errors: 18:02:13 /usr/src/bin/pwait/pwait.c: In function 'main': 18:02:13 /usr/src/bin/pwait/pwait.c:144: warning: initialized field overwritten 18:02:13 /usr/src/bin/pwait/pwait.c:144: warning: (near initialization for '(anonymous).ext') 18:02:13 /usr/src/bin/pwait/pwait.c:144: warning: initialized field overwritten 18:02:13 /usr/src/bin/pwait/pwait.c:144: warning: (near initialization for '(anonymous).ext') 18:02:13 /usr/src/bin/pwait/pwait.c:144: warning: initialized field overwritten 18:02:13 /usr/src/bin/pwait/pwait.c:144: warning: (near initialization for '(anonymous).ext') 18:02:13 /usr/src/bin/pwait/pwait.c:158: warning: initialized field overwritten 18:02:13 /usr/src/bin/pwait/pwait.c:158: warning: (near initialization for '(anonymous).ext') 18:02:13 /usr/src/bin/pwait/pwait.c:158: warning: initialized field overwritten 18:02:13 /usr/src/bin/pwait/pwait.c:158: warning: (near initialization for '(anonymous).ext') 18:02:13 /usr/src/bin/pwait/pwait.c:158: warning: initialized field overwritten 18:02:13 /usr/src/bin/pwait/pwait.c:158: warning: (near initialization for '(anonymous).ext') This can be seen in the tinderbox (https://ci.freebsd.org/tinderbox) I encountered this as a failure in building usr.sbin/camdd, which shows the same type of error. - Justin From owner-svn-src-all@freebsd.org Thu Jun 28 19:01:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4BE3D102421D; Thu, 28 Jun 2018 19:01:54 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EAD6889478; Thu, 28 Jun 2018 19:01:53 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CC972163E5; Thu, 28 Jun 2018 19:01:53 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5SJ1r25092679; Thu, 28 Jun 2018 19:01:53 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5SJ1rdP092678; Thu, 28 Jun 2018 19:01:53 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201806281901.w5SJ1rdP092678@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 28 Jun 2018 19:01:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335771 - head X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 335771 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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 19:01:54 -0000 Author: bdrewery Date: Thu Jun 28 19:01:53 2018 New Revision: 335771 URL: https://svnweb.freebsd.org/changeset/base/335771 Log: SYSTEM_COMPILER/LINKER: Fix cross-build support after r335706. X-MFC-With: r335706 MFC after: 2 weeks Sponsored by: Dell EMC Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Jun 28 18:22:20 2018 (r335770) +++ head/Makefile.inc1 Thu Jun 28 19:01:53 2018 (r335771) @@ -132,7 +132,7 @@ TARGET_TRIPLE?= ${TARGET_ARCH:S/amd64/x86_64/:C/hf$//: # If all targets are disabled for system llvm then don't expect it to work # for cross-builds. -.if ${MK_LLVM_TARGET_ALL} == "no" && \ +.if !defined(TOOLS_PREFIX) && ${MK_LLVM_TARGET_ALL} == "no" && \ ${MACHINE} != ${TARGET} && ${MACHINE_ARCH} != ${TARGET_ARCH} && \ !make(showconfig) MK_SYSTEM_COMPILER= no From owner-svn-src-all@freebsd.org Thu Jun 28 19:05:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 606A910244A1; Thu, 28 Jun 2018 19:05:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 03508897C9; Thu, 28 Jun 2018 19:05:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (unknown [127.0.1.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id B2C0A1680A; Thu, 28 Jun 2018 19:05:05 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id C0A5E1D94; Thu, 28 Jun 2018 19:05:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id oSB4rGbiY1zW; Thu, 28 Jun 2018 19:05:00 +0000 (UTC) Subject: Re: svn commit: r335765 - head/sys/sys DKIM-Filter: OpenDKIM Filter v2.10.3 mail.xzibition.com EE7011D8E To: dab@freebsd.org Cc: Justin Hibbits , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201806281701.w5SH15eP011261@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Autocrypt: addr=bdrewery@FreeBSD.org; prefer-encrypt=mutual; keydata= xsBNBFJphmsBCADiFgmS4bIzwZijrS31SjEMzg+n5zNellgM+HkShwehpqCiyhXdWrvH6dTZ a6u50pbUIX7doTR7W7PQHCjCTqtpwvcj0eulZva+iHFp+XrbgSFHn+VVXgkYP2MFySyZRFab D2qqzJBEJofhpv4HvY6uQI5K99pMqKr1Z/lHqsijYYu4RH2OfwB5PinId7xeldzWEonVoCr+ rfxzO/UrgA6v/3layGZcKNHFjmc3NqoN1DXtdaEHqtjIozzbndVkH6lkFvIpIrI6i5ox8pwp VxsxLCr/4Musd5CWgHiet5kSw2SzNeA8FbxdLYCpXNVu+uBACEbCUP+CSNy3NVfEUxsBABEB AAHNJEJyeWFuIERyZXdlcnkgPGJkcmV3ZXJ5QEZyZWVCU0Qub3JnPsLAgAQTAQoAKgIbAwUL CQgHAwUVCgkICwUWAwIBAAIeAQIXgAIZAQUCWujOIgUJCmB7NwAKCRA113G7bkaXz/xpB/9b /UWIPbieY1IeIuHF2pyYPE7Hytkh3HVsxMA0F5Ma2AYQsXZZeKNKWrF7RPyDyDwUklLHJkhm k3EfClBbHxf08kMIm1vWCJRtgxic9knY/bzYGiWMpHjg3cSd1XfrYH1autYqTZAjDwIkgOjU dR//Tbn4V36sY7y2jz+kdMVWvK53U32aZqiwBbCn4DPe1wSZcUs17mV/0uZdIoGdj74B1orN A/0py5vHYo6HcbBNoaR8pKRLf5VZNRsxqGIMhTucx4SJWcHpuRBWYyvJSFzwvxdK4ZD4Yqoc kFGPVtOXktVMai9exrLvP3G77fKMu8DI6j4QRU4wCesnHuIfRPFuzsBNBFJphmsBCACiVFPf kNfaFtUSuY0395ueo/rMyHPGPQ2iwvERFCpeFGSQSgagpenNHLpFQKTg/dl6FOoST5tqyxMq fyHGHDzzU51bvA/IfaGoNi/BIhTe/toZNMRvpcI3PLjiGcnJnuwCCbAVOAGdb+t5cZtpNdOI cKYmrYG3u9RiBpe6dTF+qLrD/8Bs1wjhduQ8fcNNgnkXu8xDH4ZxY0lIc3QgvYWp9vimlQe6 iKjUd2/DX28ETZcD5h6pYV331KMPTrEI0p0yvFijUZce8c1XHFyL1j9sBAha5qpszJl6Uq5i LolhKRcGfcdmtD72vHQjUYglUyudSJUVyo2gMYjdbiFKzJulABEBAAHCwGUEGAEKAA8CGwwF AlrozigFCQpgez0ACgkQNddxu25Gl8+m5Af/R3VEdxNMAcDIes9ADhQyofj20SPV3eCJ3HYR OebTSuNdOudGt4AAyA8Ks94u9hiIp5IGsc6RDsT9W7O2vgXhd6eV3eiY5Oif5xLIYrIDVu1Y 1GyRxRrPEn/QOqDN6uFZCPwK1aOapGcYCrO9lB0gMuTVfgHanU61rgC9tMX0OoAOyRd+V3/M 8lDNhjJdF/IpO3SdYzKfkwduy4qamw4Gphcx/RfYQvYLq/eDkP8d50PphWdboqWBwNRHayro W/07OGzfxM5fJ5mBsXPQcO2QcRjkyHf6xCM6Hi1qQL4OnXMNE/ZTX0lnOj1/pH93TlzSHZMP TaiiA/MBD3vGsXBmBg== Organization: FreeBSD Message-ID: <698a08ad-23e3-6ccd-ff72-b2b78444d176@FreeBSD.org> Date: Thu, 28 Jun 2018 12:04:59 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IWnms8G3WcVcgr51gXrDJHJUx8WOaSil1" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 19:05:06 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --IWnms8G3WcVcgr51gXrDJHJUx8WOaSil1 Content-Type: multipart/mixed; boundary="nIkdth3M1QNLo714JeLjdjtKuXRxU1QHP"; protected-headers="v1" From: Bryan Drewery To: dab@freebsd.org Cc: Justin Hibbits , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <698a08ad-23e3-6ccd-ff72-b2b78444d176@FreeBSD.org> Subject: Re: svn commit: r335765 - head/sys/sys References: <201806281701.w5SH15eP011261@repo.freebsd.org> In-Reply-To: --nIkdth3M1QNLo714JeLjdjtKuXRxU1QHP Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 6/28/2018 11:45 AM, Justin Hibbits wrote: > Hi David, >=20 > On Thu, Jun 28, 2018 at 12:01 PM David Bright wrote: >> >> Author: dab >> Date: Thu Jun 28 17:01:04 2018 >> New Revision: 335765 >> URL: https://svnweb.freebsd.org/changeset/base/335765 >> >> Log: >> Remove potential identifier conflict in the EV_SET macro. >> >> PR43905 pointed out a problem with the EV_SET macro if the passed >> struct kevent pointer were specified with an expression with side >> effects (e.g., "kevp++"). This was fixed in rS110241, but by using a= >> local block that defined an internal variable (named "kevp") to get >> the pointer value once. This worked, but could cause issues if an >> existing variable named "kevp" is in scope. To avoid that issue, >> jilles@ pointed out that "C99 compound literals and designated >> initializers allow doing this cleanly using a macro". This change >> incorporates that suggestion, essentially verbatim from jilles@ >> comment on PR43905, except retaining the old definition for pre-C99 = or >> non-STDC (e.g., C++) compilers. >> >> PR: 43905 >> Submitted by: Jilles Tjoelker (jilles@) >> Reported by: Lamont Granquist >> Reviewed by: jmg (no comments), jilles >> MFC after: 1 week >> Sponsored by: Dell EMC >> Differential Revision: https://bugs.freebsd.org/bugzilla/show= _bug.cgi?id=3D43905 >> >> Modified: >> head/sys/sys/event.h >> >> Modified: head/sys/sys/event.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/sys/event.h Thu Jun 28 15:30:51 2018 (r3357= 64) >> +++ head/sys/sys/event.h Thu Jun 28 17:01:04 2018 (r3357= 65) >> @@ -49,7 +49,26 @@ >> #define EVFILT_EMPTY (-13) /* empty send socket buf */ >> #define EVFILT_SYSCOUNT 13 >> >> +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >=3D 199901L >> #define EV_SET(kevp_, a, b, c, d, e, f) do { \ >> + *(kevp_) =3D (struct kevent){ \ >> + .ident =3D (a), \ >> + .filter =3D (b), \ >> + .flags =3D (c), \ >> + .fflags =3D (d), \ >> + .data =3D (e), \ >> + .udata =3D (f), \ >> + .ext[0] =3D 0, \ >> + .ext[1] =3D 0, \ >> + .ext[2] =3D 0, \ >> + .ext[3] =3D 0, \ >> + }; \ >> +} while(0) >> +#else /* Pre-C99 or not STDC (e.g., C++) */ >> +/* The definition of the local variable kevp could possibly conflict >> + * with a user-defined value passed in parameters a-f. >> + */ >> +#define EV_SET(kevp_, a, b, c, d, e, f) do { \ >> struct kevent *kevp =3D (kevp_); \ >> (kevp)->ident =3D (a); \ >> (kevp)->filter =3D (b); \ >> @@ -62,6 +81,7 @@ >> (kevp)->ext[2] =3D 0; \ >> (kevp)->ext[3] =3D 0; \ >> } while(0) >> +#endif >> >> struct kevent { >> __uintptr_t ident; /* identifier for this event *= / >> >=20 > This breaks gcc builds, with the following errors: >=20 > 18:02:13 /usr/src/bin/pwait/pwait.c: In function 'main': > 18:02:13 /usr/src/bin/pwait/pwait.c:144: warning: initialized field ove= rwritten > 18:02:13 /usr/src/bin/pwait/pwait.c:144: warning: (near initialization > for '(anonymous).ext') > 18:02:13 /usr/src/bin/pwait/pwait.c:144: warning: initialized field ove= rwritten > 18:02:13 /usr/src/bin/pwait/pwait.c:144: warning: (near initialization > for '(anonymous).ext') > 18:02:13 /usr/src/bin/pwait/pwait.c:144: warning: initialized field ove= rwritten > 18:02:13 /usr/src/bin/pwait/pwait.c:144: warning: (near initialization > for '(anonymous).ext') > 18:02:13 /usr/src/bin/pwait/pwait.c:158: warning: initialized field ove= rwritten > 18:02:13 /usr/src/bin/pwait/pwait.c:158: warning: (near initialization > for '(anonymous).ext') > 18:02:13 /usr/src/bin/pwait/pwait.c:158: warning: initialized field ove= rwritten > 18:02:13 /usr/src/bin/pwait/pwait.c:158: warning: (near initialization > for '(anonymous).ext') > 18:02:13 /usr/src/bin/pwait/pwait.c:158: warning: initialized field ove= rwritten > 18:02:13 /usr/src/bin/pwait/pwait.c:158: warning: (near initialization > for '(anonymous).ext') >=20 > This can be seen in the tinderbox (https://ci.freebsd.org/tinderbox) >=20 > I encountered this as a failure in building usr.sbin/camdd, which > shows the same type of error. I think in this case it may break ports and other external builds too. If possible please try to fix the macro to avoid the issue. I didn't analyze it to see if it is feasible though. --=20 Regards, Bryan Drewery --nIkdth3M1QNLo714JeLjdjtKuXRxU1QHP-- --IWnms8G3WcVcgr51gXrDJHJUx8WOaSil1 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 iQEcBAEBAgAGBQJbNTFbAAoJEDXXcbtuRpfPDDQH/3JAx65MBLV1V+jXD55fZzBA RMMPBrRovpZo5oqCMVgqSYXtyAWe+MzV5o0HyO9rLnNAAYugnuWxQ5Rqs0k97o8Z qV9tDgEpXaoyhBulloaG141+j+aexka2VIcxLG6xBhT1PiqgCe5WbaVNrVmzy/dh nOaz9BVWubZ91DW9QSQlhX3JLm4w3As9q53UlAVaE8PqA57HSSoDDiZ1MKoQXUd5 z9Bm83lyCErU5qLJx2WmhJJagKULvI9npo5itNp7Du1074i395jFP7Dlj3u3pSq2 AZganhV3D0v4Hv3C6FCUtxQJYxZ3mtU+Gd+cLOvYsvcomKwWogOn9U8kbai9eI8= =swI8 -----END PGP SIGNATURE----- --IWnms8G3WcVcgr51gXrDJHJUx8WOaSil1-- From owner-svn-src-all@freebsd.org Thu Jun 28 19:17:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9A65810248DC; Thu, 28 Jun 2018 19:17:37 +0000 (UTC) (envelope-from dab0816@gmail.com) Received: from mail-io0-x242.google.com (mail-io0-x242.google.com [IPv6:2607:f8b0:4001:c06::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1F13F89D9F; Thu, 28 Jun 2018 19:17:37 +0000 (UTC) (envelope-from dab0816@gmail.com) Received: by mail-io0-x242.google.com with SMTP id e15-v6so6293879iog.1; Thu, 28 Jun 2018 12:17:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:subject:to:cc:references:openpgp:autocrypt:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=+jxmNoeG+bzeeuJJ7dxnaK5lELCCTqfkocL1028U7xk=; b=k8a+DCgAa2zm1uMtt7z04azBtdGHF2zew2PwE/vN0gcV7nUScnPqfPNQjfrFVnm5Wm a5r4DhQ1MTq/Oq0QWIqDvJReqrye/FK9C8tR8GfSfJ8rWkOJTS+xaCGGzFn7TvEB82Aa CB+5mbmnC/JRXeQ+RIZeXqACRFOXmYhX6Rythxj/+piMy9MBJKkTgw+Q18JOAzw6fO0P pffUSmOev2M2Cfis9Z2QwPF8sBvQS+839bXqH13Cwh6Pvv2AB07ElXtWVy0qJaDz/QSD 3KE64UPXfasR4BsFuV71hsZElt/OyIiuSfvmxhLlQq+AxNDWO1HILyCGea9vW+e6zObU bd5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:subject:to:cc:references:openpgp :autocrypt:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=+jxmNoeG+bzeeuJJ7dxnaK5lELCCTqfkocL1028U7xk=; b=e3RFBZ9p63cU1zEl3cRppeh7xorXzHME7VNnkMU3x4qboCtwVTvE4ZWtu9TvgRWUSZ 0m8yq8JBawumEx49h+g2ayLWj+GkQm78iM5fqSHl+xaud+RB0yF0pFq18alLIAm2Iw/P dxE5FmuH87vDQe/JzzlIObzBfWY/7cl6aqwl2D/8BVd94tR2ebMrmhlESZUNyuTNKFSD /gzNnYtgOIet+M/yA/cp6WnFwSDn/o8zqfAaTHePEYe5z1dnHh0Xnj3ceUOr/jFGLDGZ iJsnUYaLLidLOFo3/jrxQy8FigEyiAgTzBEOMFmQyDPirBEvshQ1NNeQ4PexU5FPqxb/ ga3w== X-Gm-Message-State: APt69E3X9Ec905ebIgFKX84ZGljV7gaOA9MfadIpXG9YSTCbOpVEnTyK IORrBMXd5yva+nk4SK2negYd/eeX X-Google-Smtp-Source: AAOMgpfomsNmXK3PPYQ6AcH10ewY/ztGi0l+fCqgPKLC0AyetqFD29BLnJNGGxgSipqHiKAV+oOzQQ== X-Received: by 2002:a6b:290a:: with SMTP id p10-v6mr9625755iop.1.1530213456362; Thu, 28 Jun 2018 12:17:36 -0700 (PDT) Received: from dab-xps-13-9370.localdomain ([76.164.8.130]) by smtp.gmail.com with ESMTPSA id l19-v6sm3435567ioh.27.2018.06.28.12.17.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jun 2018 12:17:35 -0700 (PDT) Sender: David Bright From: "David A. Bright" X-Google-Original-From: "David A. Bright" Subject: Re: svn commit: r335765 - head/sys/sys To: Bryan Drewery Cc: Justin Hibbits , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201806281701.w5SH15eP011261@repo.freebsd.org> <698a08ad-23e3-6ccd-ff72-b2b78444d176@FreeBSD.org> Openpgp: preference=signencrypt Autocrypt: addr=dab@FreeBSD.org; prefer-encrypt=mutual; keydata= xsBNBFgqQsIBCADfDUZ79qW2MKVRQl9l9zMYzppdHn+eS7KGjUP9hjmYUuX3vM0Sc5DlJ9Py 59Byucg8zo6eow1iv6NdiEPuUEYB2ujDP/kbmC397zEt6p9ldlL4PXXSJumpdZCzwz4ACYB5 ke7OCljNqbigzoZgX5DXjyjx87NfG6eWkbnEweDPmae7DGj5bwQmJPoTqvJR7Ot/R/73ix8l hph1vdl83Iqu+IDVdlXTI2Afz4UaCRdfDiXgMQIo/HABXJ90+TXG/vH37Jb0kBflql9sEaUs CcTvMrye0Wjgv3VSPZm3ZEgmR7UKR71p2MJVlVVZUH3FHQ2jDqKpCMi7F3ERlvRDktm/ABEB AAHNHkRhdmlkIEJyaWdodCA8ZGFiQGZyZWVic2Qub3JnPsLAfQQTAQoAJwUCWCpCwgIbAwUJ BaOagAULCQgHAwUVCgkICwUWAwIBAAIeAQIXgAAKCRAzeMsxoQO+aqagCADDt4FbZBz3VFev TEtAjuyzCDPmPom1MBwsh6KB2J84wKOsXPmZ7vqaZ2G70fCPNowqmHq56cAbp0BD1Lf6gD+3 imeacKc/E6n+L49LOhOtQ8EUyHs/nAUmlE1PrOS1w5wmCgRjPXa5k+zxj/YMsAEFdMn6UzOl 5MIJN/zhBB5tU2bkP5hF4rVvpQ1zlnSldoBLfPlG/w1RzvOSJfunZUTSNVrKYlSjEQ7q56ud xKoLPEdr+X8kqwZilh5WBiTt7mMw7lrP6dMV/GGmDg893J6conQ1l2RN6Un1gKlc3rgdz3sh ncr786WF3cV2dFSIrO/Pn3iNRR3uJouRLdLhU0kMzsBNBFgqQsIBCAC5ABwcVerpyp5NzHBD FSbxEyPab6HFH1E4zksEGyeypU8UW5acc2ko5Ovz7CE0n21uhBtIt/Lz5Koxz0LSqqnk9jIQ L/4XVvne+8YnT+Tf9DZv9We5K0tFit/DFgCzIpxacoxLGBRNSkSzFrAepvVinTk905igdYZY fxtHrAREU4BdqBMQtbgGaewHtOLlRRr+N4wkAZlJLa7RaLn5s/EakpmCM1eR8z0fOBNJSXlW Ozqh1cvwWZ00qj0rYXwXu0fgzpREmJFS01GByFuB4xDyqfAoynxKNBJH/qAcJTp7jST8PLWe 3Tblm4acsIAPHUcABgMnZYdMQnSwwa9/W1DlABEBAAHCwGUEGAEKAA8FAlgqQsICGwwFCQWj moAACgkQM3jLMaEDvmp8hQgAzKTYmU2cf35NdrtT9C7jBDWSVSDdyKHYSAKoP+vAkC3A1HH6 wohE5JvOZ6245vgBQwFHvzh2v7jDUWmB3CrcSSMUoUIwl15mWlCdCy/C3SAknxQx+zHYmx9v uHPS1yF2l0KPS30Kc1le1GqVYi5wxnWPo+gE3MH4DDh5LdDExYveMuBgybdNxV8Qvr25UghJ HrQCT+FCISo0FActO1Z5HzdOKxQe6KTn+zKr4yKCOe4kb7GUaAX3Pt82J7bMtwRzAKLyjMJV QueL/cr+geerKKrd8FyVAgQMhdBYD3lyjK6nGssgr4Og9+QtsE2RAVH9qqhcF3kI7nxJ7EDb /d3xag== Message-ID: Date: Thu, 28 Jun 2018 14:17:34 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <698a08ad-23e3-6ccd-ff72-b2b78444d176@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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 19:17:37 -0000 On 06/28/2018 02:04 PM, Bryan Drewery wrote: > On 6/28/2018 11:45 AM, Justin Hibbits wrote: >> Hi David, >> 18:02:13 /usr/src/bin/pwait/pwait.c:158: warning: initialized field overwritten >> 18:02:13 /usr/src/bin/pwait/pwait.c:158: warning: (near initialization >> for '(anonymous).ext') >> >> This can be seen in the tinderbox (https://ci.freebsd.org/tinderbox) > > I think in this case it may break ports and other external builds too. > If possible please try to fix the macro to avoid the issue. I didn't > analyze it to see if it is feasible though. I'm looking at this. I'm a bit perplexed by the diagnostic but would like to figure out a fix. If I can't soon I'll revert. -- David Bright dab@FreeBSD.org From owner-svn-src-all@freebsd.org Thu Jun 28 19:35:12 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 172FA1025381 for ; Thu, 28 Jun 2018 19:35:12 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 780408A769 for ; Thu, 28 Jun 2018 19:35:10 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-ed1-x52f.google.com with SMTP id b12-v6so5847993edt.8 for ; Thu, 28 Jun 2018 12:35:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=lQl/Ljrrram5iEnZu8yGf8ReQuDJgmeET/bqmi1nAbI=; b=HMCsefzpREsmb53qPs/k4gHaVkCAw0uEHMq4EVFHlSEeK0jqXM6imn1rp2NeAJMIvp KsFOfAOnd2PwqfMLmKMaxvmBJtWW4V/Jf5mVVfECayWxcbTTxTPkOM+OVlKCbL41yoj9 PYvDylpkPgL6xVYt6h2p1eMBXBZDK8EFqIxOnq7IUZs2dxZSkb8j6XYa/X4g8KBISfpA 3tz/U1RavRnQKewzW/vX+H57viWsRMf7eKOY6IIYvvhI8ppPgtYB+XJsyDG97lvB7y8Z voP9zhiimD9zvKUo2LdhTSyzvjdyC1cm3drDFuZFjC79Ht8ARM/qjBOEi3BIYyDHiN/h dWnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=lQl/Ljrrram5iEnZu8yGf8ReQuDJgmeET/bqmi1nAbI=; b=XIKBKbmDanY/kV/HSgPhenL4BwkZEZpeb6FFI5GaLCIvevxeMOvAdVoLK7OtjaLrBB 9v/rYvHHcjNlTuDvgtPXsfeVorEFGG3OKltL/0UsudaJ5e/pvXlhGkLLOOKAvWwnfwsk y1SdzlNFqTgaFQHrhoNEBMcojmaxKEhUKs30M+5fsLtLtxutyNy4u8TPTPm64+9srLbE jOnzPLedixbZkh9HGkkRVeUuucZEN/uB8Sg9o3v7zDo+Qw+WF3jw0e0ecI/luE3VNPLg V66+slAFxnqVOBNAzvvvo8sXqL4Rx8TESv1hP7EGckI9fubqwGOnDWYv0ttuPNqKxPbM pskA== X-Gm-Message-State: APt69E0cEK/1k6NEGmm4sZacak30YV2Jc4/WZR8s7FWVWxF9vBFnWPPa mAQqCw+CQFg7tMMH6brSS42aCJWQ3h4ooC3FqbzWOg== X-Google-Smtp-Source: AAOMgpdJzN9wkS3e+sVEz/NV0M2n61TbaFvOJPd0nZ1ehG7cbuYGc86YBYRL+zgCXVZkU/1DtCW9rhWWmHtRpJp/jdk= X-Received: by 2002:a50:d1c1:: with SMTP id i1-v6mr10624626edg.122.1530214509702; Thu, 28 Jun 2018 12:35:09 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a50:8e0d:0:0:0:0:0 with HTTP; Thu, 28 Jun 2018 12:34:38 -0700 (PDT) In-Reply-To: <201806281701.w5SH15eP011261@repo.freebsd.org> References: <201806281701.w5SH15eP011261@repo.freebsd.org> From: Ed Schouten Date: Thu, 28 Jun 2018 21:34:38 +0200 Message-ID: Subject: Re: svn commit: r335765 - head/sys/sys To: David Bright Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 19:35:12 -0000 Hi David, 2018-06-28 19:01 GMT+02:00 David Bright : > +#define EV_SET(kevp_, a, b, c, d, e, f) do { \ Some time ago I also looked into this and realised that it may even be possible to do something like this: static __inline void EV_SET(...) { } /* Compatibility for code that tests #ifdef EV_SET. */ #define EV_SET EV_SET This has the advantage that you get pretty neat error messages in case you get the typing of arguments wrong, as if you're just calling a function incorrectly. The EV_SET() macro is never used in contexts that require constant values. -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands From owner-svn-src-all@freebsd.org Thu Jun 28 19:40:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AA7641025492; Thu, 28 Jun 2018 19:40:19 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f181.google.com (mail-io0-f181.google.com [209.85.223.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48F828A91D; Thu, 28 Jun 2018 19:40:19 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f181.google.com with SMTP id r24-v6so6325763ioh.9; Thu, 28 Jun 2018 12:40:19 -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:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=zK+nkLJl+7+gHgdXH7EDJR2rPO3S16dANddjgEClXO8=; b=PKwjPI4ytFzoOneS4wjHUwszHAJg0rty7ObBSIV2vjlbbhFgJ6Nh8MRn8FRqgawt2B OLOMqgQnuXNSla2WHBSRoxThkOQk0g9XRF+ilJ9uluggJTGyYbv5uXgQBrq85s7aKIU4 Y+cXOAb5PIwNbwhotwBoWylgK/ZkrvYwVnt6mR/vro4H9EgvOih5WlMCFjSNF7X/TJY5 gGAHb3UJTsjVBTQLnZMiNhkStS65VHAduWnI0In/Vxve0o68LClU6W4wsqN5PJcgqEZd GAGGdzVXBGBl0nTOtTg3+Tv/PXz/P4PK5K4qyfkI7CEVfCHGaQP8vGNfZiuNVf/w7bcy nDyw== X-Gm-Message-State: APt69E1wupAjV7DoHznGEZhqssr9bvHyg086BjP/4GmjqjD0feVjsEr/ 1ls9peha0x5qRaLh4gNg+J2/6DIu X-Google-Smtp-Source: AAOMgpdWjGbLkErW59bv3kyj+jDCny8+cRNj8pyoiKpwmFXNKwMxSjn9HUU35p8o+zfhB526mhuFJQ== X-Received: by 2002:a6b:ac42:: with SMTP id v63-v6mr9686827ioe.71.1530212990166; Thu, 28 Jun 2018 12:09:50 -0700 (PDT) Received: from mail-it0-f41.google.com (mail-it0-f41.google.com. [209.85.214.41]) by smtp.gmail.com with ESMTPSA id n201-v6sm3602973itb.8.2018.06.28.12.09.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jun 2018 12:09:49 -0700 (PDT) Received: by mail-it0-f41.google.com with SMTP id y127-v6so158587itd.1; Thu, 28 Jun 2018 12:09:49 -0700 (PDT) X-Received: by 2002:a24:100f:: with SMTP id 15-v6mr9687541ity.61.1530212989741; Thu, 28 Jun 2018 12:09:49 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 2002:a02:7e0a:0:0:0:0:0 with HTTP; Thu, 28 Jun 2018 12:09:49 -0700 (PDT) In-Reply-To: References: <201806281701.w5SH15eP011261@repo.freebsd.org> From: Conrad Meyer Date: Thu, 28 Jun 2018 12:09:49 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r335765 - head/sys/sys To: Justin Hibbits Cc: dab@freebsd.org, src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 19:40:19 -0000 I think the right initializer is something like: *(kevp_) = (struct kevent) { ... .ext = { [0] = 0, [1] = 0, ... }, }; (I.e., use a C99 array static initializer to initialize the array member of struct kevent.) Best, Conrad On Thu, Jun 28, 2018 at 11:45 AM, Justin Hibbits wrote: > Hi David, > > On Thu, Jun 28, 2018 at 12:01 PM David Bright wrote: >> >> Author: dab >> Date: Thu Jun 28 17:01:04 2018 >> New Revision: 335765 >> URL: https://svnweb.freebsd.org/changeset/base/335765 >> >> Log: >> Remove potential identifier conflict in the EV_SET macro. >> >> PR43905 pointed out a problem with the EV_SET macro if the passed >> struct kevent pointer were specified with an expression with side >> effects (e.g., "kevp++"). This was fixed in rS110241, but by using a >> local block that defined an internal variable (named "kevp") to get >> the pointer value once. This worked, but could cause issues if an >> existing variable named "kevp" is in scope. To avoid that issue, >> jilles@ pointed out that "C99 compound literals and designated >> initializers allow doing this cleanly using a macro". This change >> incorporates that suggestion, essentially verbatim from jilles@ >> comment on PR43905, except retaining the old definition for pre-C99 or >> non-STDC (e.g., C++) compilers. >> >> PR: 43905 >> Submitted by: Jilles Tjoelker (jilles@) >> Reported by: Lamont Granquist >> Reviewed by: jmg (no comments), jilles >> MFC after: 1 week >> Sponsored by: Dell EMC >> Differential Revision: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=43905 >> >> Modified: >> head/sys/sys/event.h >> >> Modified: head/sys/sys/event.h >> ============================================================================== >> --- head/sys/sys/event.h Thu Jun 28 15:30:51 2018 (r335764) >> +++ head/sys/sys/event.h Thu Jun 28 17:01:04 2018 (r335765) >> @@ -49,7 +49,26 @@ >> #define EVFILT_EMPTY (-13) /* empty send socket buf */ >> #define EVFILT_SYSCOUNT 13 >> >> +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L >> #define EV_SET(kevp_, a, b, c, d, e, f) do { \ >> + *(kevp_) = (struct kevent){ \ >> + .ident = (a), \ >> + .filter = (b), \ >> + .flags = (c), \ >> + .fflags = (d), \ >> + .data = (e), \ >> + .udata = (f), \ >> + .ext[0] = 0, \ >> + .ext[1] = 0, \ >> + .ext[2] = 0, \ >> + .ext[3] = 0, \ >> + }; \ >> +} while(0) >> +#else /* Pre-C99 or not STDC (e.g., C++) */ >> +/* The definition of the local variable kevp could possibly conflict >> + * with a user-defined value passed in parameters a-f. >> + */ >> +#define EV_SET(kevp_, a, b, c, d, e, f) do { \ >> struct kevent *kevp = (kevp_); \ >> (kevp)->ident = (a); \ >> (kevp)->filter = (b); \ >> @@ -62,6 +81,7 @@ >> (kevp)->ext[2] = 0; \ >> (kevp)->ext[3] = 0; \ >> } while(0) >> +#endif >> >> struct kevent { >> __uintptr_t ident; /* identifier for this event */ >> > > This breaks gcc builds, with the following errors: > > 18:02:13 /usr/src/bin/pwait/pwait.c: In function 'main': > 18:02:13 /usr/src/bin/pwait/pwait.c:144: warning: initialized field overwritten > 18:02:13 /usr/src/bin/pwait/pwait.c:144: warning: (near initialization > for '(anonymous).ext') > 18:02:13 /usr/src/bin/pwait/pwait.c:144: warning: initialized field overwritten > 18:02:13 /usr/src/bin/pwait/pwait.c:144: warning: (near initialization > for '(anonymous).ext') > 18:02:13 /usr/src/bin/pwait/pwait.c:144: warning: initialized field overwritten > 18:02:13 /usr/src/bin/pwait/pwait.c:144: warning: (near initialization > for '(anonymous).ext') > 18:02:13 /usr/src/bin/pwait/pwait.c:158: warning: initialized field overwritten > 18:02:13 /usr/src/bin/pwait/pwait.c:158: warning: (near initialization > for '(anonymous).ext') > 18:02:13 /usr/src/bin/pwait/pwait.c:158: warning: initialized field overwritten > 18:02:13 /usr/src/bin/pwait/pwait.c:158: warning: (near initialization > for '(anonymous).ext') > 18:02:13 /usr/src/bin/pwait/pwait.c:158: warning: initialized field overwritten > 18:02:13 /usr/src/bin/pwait/pwait.c:158: warning: (near initialization > for '(anonymous).ext') > > This can be seen in the tinderbox (https://ci.freebsd.org/tinderbox) > > I encountered this as a failure in building usr.sbin/camdd, which > shows the same type of error. > > - Justin > From owner-svn-src-all@freebsd.org Thu Jun 28 19:42:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19375102567A; Thu, 28 Jun 2018 19:42:14 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6B75C8AD51; Thu, 28 Jun 2018 19:42:12 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 81EB116A8B; Thu, 28 Jun 2018 19:42:11 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5SJgAIR014402; Thu, 28 Jun 2018 19:42:10 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5SJgAgU014401; Thu, 28 Jun 2018 19:42:10 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201806281942.w5SJgAgU014401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 28 Jun 2018 19:42:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335773 - head/stand/efi/boot1 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/efi/boot1 X-SVN-Commit-Revision: 335773 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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 19:42:14 -0000 Author: imp Date: Thu Jun 28 19:42:10 2018 New Revision: 335773 URL: https://svnweb.freebsd.org/changeset/base/335773 Log: Revert preference to be an int. While in base we use it as a boolean (of the wrong spelling), there's at least one out of tree user that needs it to be int since priorirty is a small int, not a 0/1. In deference to the time it's wasted me and my team, push this up into FreeBSD for whatever short life boot1 may have in the tree. Modified: head/stand/efi/boot1/boot_module.h Modified: head/stand/efi/boot1/boot_module.h ============================================================================== --- head/stand/efi/boot1/boot_module.h Thu Jun 28 19:42:05 2018 (r335772) +++ head/stand/efi/boot1/boot_module.h Thu Jun 28 19:42:10 2018 (r335773) @@ -51,7 +51,7 @@ typedef struct dev_info EFI_HANDLE *devhandle; void *devdata; uint64_t partoff; - BOOLEAN preferred; + int preferred; struct dev_info *next; } dev_info_t; From owner-svn-src-all@freebsd.org Thu Jun 28 19:44:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A54FA1025797 for ; Thu, 28 Jun 2018 19:44:58 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1E11E8AF92 for ; Thu, 28 Jun 2018 19:44:58 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-ed1-x52b.google.com with SMTP id r17-v6so5861625edo.13 for ; Thu, 28 Jun 2018 12:44:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=I4U+dZykUyILwCy7GViRXDQ5MxTpVHFkdjMIfpJca6Y=; b=sPWMoIckeHTbCdbj4AGAySS3e3b04tas7a5+NmlHV5dndZpb23a0YcDnJKHk3jniKO nM6eEWXCRoXkqDGa6BDN2kiVkEK8kxRsy8bIw9fonQVHacvvqhXhfDYjBcbwkAnHAfo7 JkiPnoD+zTdRJdn5IssknrPXRY7ymLuKNeQDahmPM149x9Zf7RrmOhE+WQxkDgtLjBCZ j74Cwnok8wz+H/yyo+sAZCqg0/Z/Nf6HPCR1J5LyVBSddVGY03kTKWg2BEbyYiKtjUlh au3Wuwn2coLYMOfoh0TAO6m1uaQA1BqJg6ZsUWZWUU66EbLEkCrB+CzSORdDr9gCRs5l 6jOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=I4U+dZykUyILwCy7GViRXDQ5MxTpVHFkdjMIfpJca6Y=; b=iukElI6yGy/3tqXNLHZaPrboRh/L73eyGm4hwVhLYzSkiNsb7HXoGg1lm43m8YJjY2 eFHlPjQckwrsnRp3QfiaRNq7gPbeLZBlfjQi9pNBOOFiedB6dGbkyHiNM2Lf7W5s6cTx bFVVkc1F+vEnO0dObx5VR/SXG1mmswpPYMLoBIPEaurb2gvdG+9dAQP2rEywhvUfgemp aeTp65rD5c7ie8Uy5Zx4Z/76EkaSSZi0pP3/9oUVX5XTYrruBnIjeeAyFWza1gGoYtmV EH4YsAe1IUZF3r/4Kfp/Ilw5dPXk+FzgMGO4llOL5NpU9g9vblfWQPTb5wPNRwlPHiAk tc0Q== X-Gm-Message-State: APt69E2e70eMZ9TV1IuRrrcREOkNE+TSyFrUQilgrDN2qCN1Xoh9WANd bpRzmWsj1YEYvuMnCH2PMQ7cfMzisjFASAcP1sB7Yw== X-Google-Smtp-Source: AAOMgperLleYU79Jlh6RUFJhXUg22t2+adMED4dTnqLYynG111oU07IVD6TwXxDY0J5LV9/9yKPedHNYPnVKYmEMbZE= X-Received: by 2002:a50:a4c6:: with SMTP id x6-v6mr9982632edb.247.1530215096816; Thu, 28 Jun 2018 12:44:56 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a50:8e0d:0:0:0:0:0 with HTTP; Thu, 28 Jun 2018 12:44:26 -0700 (PDT) In-Reply-To: References: <201806281701.w5SH15eP011261@repo.freebsd.org> From: Ed Schouten Date: Thu, 28 Jun 2018 21:44:26 +0200 Message-ID: Subject: Re: svn commit: r335765 - head/sys/sys To: "Conrad E. Meyer" Cc: Justin Hibbits , David Bright , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 19:44:58 -0000 2018-06-28 21:09 GMT+02:00 Conrad Meyer : > I think the right initializer is something like: > > *(kevp_) = (struct kevent) { > ... > .ext = { > [0] = 0, > [1] = 0, > ... > }, > }; The nice thing about using an inline function is that you can get rid of the compound literal: static __inline void EV_SET(struct kevent *kevp, ...) { struct kevent kev = { // initializer goes here. }; *kevp = kev; } This should even work with C89 compilers, assuming provides some smartness for __inline. -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands From owner-svn-src-all@freebsd.org Thu Jun 28 20:33:13 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27B94102670A; Thu, 28 Jun 2018 20:33:13 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DFAD58CA5C; Thu, 28 Jun 2018 20:33:12 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C200717313; Thu, 28 Jun 2018 20:33:12 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5SKXCSv040063; Thu, 28 Jun 2018 20:33:12 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5SKXCaQ040062; Thu, 28 Jun 2018 20:33:12 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201806282033.w5SKXCaQ040062@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 28 Jun 2018 20:33:12 +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: r335774 - stable/11/contrib/smbfs/lib/smb X-SVN-Group: stable-11 X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: stable/11/contrib/smbfs/lib/smb X-SVN-Commit-Revision: 335774 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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 20:33:13 -0000 Author: brooks Date: Thu Jun 28 20:33:12 2018 New Revision: 335774 URL: https://svnweb.freebsd.org/changeset/base/335774 Log: MFC r335641: Fix a stack overflow in mount_smbfs when hostname is too long. The local hostname was blindly copied into the to the nn_name array. When the hostname exceeded 16 bytes, it would overflow. Truncate the hostname to 15 bytes plus a 0 terminator which is the "workstation name" suffix. Use defensive strlcpy() when filling nn_name in all cases. PR: 228354 Reported by: donald.buchholz@intel.com Reviewed by: jpaetzel, ian (prior version) Discussed with: Security Officer (gtetlow) Security: Stack overflow with the hostname. Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D15936 Modified: stable/11/contrib/smbfs/lib/smb/ctx.c stable/11/contrib/smbfs/lib/smb/nbns_rq.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/smbfs/lib/smb/ctx.c ============================================================================== --- stable/11/contrib/smbfs/lib/smb/ctx.c Thu Jun 28 19:42:10 2018 (r335773) +++ stable/11/contrib/smbfs/lib/smb/ctx.c Thu Jun 28 20:33:12 2018 (r335774) @@ -549,7 +549,9 @@ smb_ctx_resolve(struct smb_ctx *ctx) } nn.nn_scope = ctx->ct_nb->nb_scope; nn.nn_type = NBT_SERVER; - strcpy(nn.nn_name, ssn->ioc_srvname); + if (strlen(ssn->ioc_srvname) > NB_NAMELEN) + return NBERROR(NBERR_NAMETOOLONG); + strlcpy(nn.nn_name, ssn->ioc_srvname, sizeof(nn.nn_name)); error = nb_sockaddr(sap, &nn, &saserver); nb_snbfree(sap); if (error) { @@ -565,7 +567,11 @@ smb_ctx_resolve(struct smb_ctx *ctx) } nls_str_upper(ctx->ct_locname, ctx->ct_locname); } - strcpy(nn.nn_name, ctx->ct_locname); + /* + * Truncate the local host name to NB_NAMELEN-1 which gives a + * suffix of 0 which is "workstation name". + */ + strlcpy(nn.nn_name, ctx->ct_locname, NB_NAMELEN); nn.nn_type = NBT_WKSTA; nn.nn_scope = ctx->ct_nb->nb_scope; error = nb_sockaddr(NULL, &nn, &salocal); Modified: stable/11/contrib/smbfs/lib/smb/nbns_rq.c ============================================================================== --- stable/11/contrib/smbfs/lib/smb/nbns_rq.c Thu Jun 28 19:42:10 2018 (r335773) +++ stable/11/contrib/smbfs/lib/smb/nbns_rq.c Thu Jun 28 20:33:12 2018 (r335774) @@ -74,7 +74,7 @@ nbns_resolvename(const char *name, struct nb_ctx *ctx, if (error) return error; bzero(&nn, sizeof(nn)); - strcpy(nn.nn_name, name); + strlcpy(nn.nn_name, name, sizeof(nn.nn_name)); nn.nn_scope = ctx->nb_scope; nn.nn_type = NBT_SERVER; rqp->nr_nmflags = NBNS_NMFLAG_RD; From owner-svn-src-all@freebsd.org Thu Jun 28 20:36:22 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 816DC10268F3; Thu, 28 Jun 2018 20:36:22 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 357D68CC60; Thu, 28 Jun 2018 20:36:22 +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 1661417319; Thu, 28 Jun 2018 20:36:22 +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 w5SKaL5s040264; Thu, 28 Jun 2018 20:36:21 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5SKaLK3040263; Thu, 28 Jun 2018 20:36:21 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201806282036.w5SKaLK3040263@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 28 Jun 2018 20:36:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335775 - head/sys/arm64/linux X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/arm64/linux X-SVN-Commit-Revision: 335775 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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 20:36:22 -0000 Author: emaste Date: Thu Jun 28 20:36:21 2018 New Revision: 335775 URL: https://svnweb.freebsd.org/changeset/base/335775 Log: Add stub arm64 linuxulator VDSO ldscript This needs to be revisited with the VDSO implementation, but is sufficient to allow the linux64 module to build on arm64 for testing and development. Sponsored by: Turing Robotic Industries Added: head/sys/arm64/linux/linux_vdso.lds.s (contents, props changed) Added: head/sys/arm64/linux/linux_vdso.lds.s ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/linux/linux_vdso.lds.s Thu Jun 28 20:36:21 2018 (r335775) @@ -0,0 +1,22 @@ +/* + * Stub arm64 vdso linker script. + * LINUXTODO: update along with VDSO implementation + * + * $FreeBSD$ + */ + +SECTIONS +{ + . = . + SIZEOF_HEADERS; + .text : { *(.text*) } + .rodata : { *(.rodata*) } + .hash : { *(.hash) } + .gnu.hash : { *(.gnu.hash) } + .dynsym : { *(.dynsym) } + .dynstr : { *(.dynstr) } + .gnu.version : { *(.gnu.version) } + .gnu.version_d : { *(.gnu.version_d) } + .gnu.version_r : { *(.gnu.version_r) } + .data : { *(.data*) } + .dynamic : { *(.dynamic) } +} From owner-svn-src-all@freebsd.org Thu Jun 28 20:37:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19781102696E; Thu, 28 Jun 2018 20:37:18 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B81E68CDC5; Thu, 28 Jun 2018 20:37:17 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9911D1731A; Thu, 28 Jun 2018 20:37:17 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5SKbHk8040352; Thu, 28 Jun 2018 20:37:17 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5SKbHg1040351; Thu, 28 Jun 2018 20:37:17 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201806282037.w5SKbHg1040351@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Thu, 28 Jun 2018 20:37:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335776 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: dab X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 335776 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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 20:37:18 -0000 Author: dab Date: Thu Jun 28 20:37:17 2018 New Revision: 335776 URL: https://svnweb.freebsd.org/changeset/base/335776 Log: Fix compilation error in r335765 under gcc 4.2.1. The anonymous object initialization introduced in r335765 was acceptable to clang, but not gcc 4.2.1. Fix it for both. Reported by: jhibbits@ Pointy Hat: myself MFC after: 1 week X-MFC-with: r335765 Sponsored by: Dell EMC Modified: head/sys/sys/event.h Modified: head/sys/sys/event.h ============================================================================== --- head/sys/sys/event.h Thu Jun 28 20:36:21 2018 (r335775) +++ head/sys/sys/event.h Thu Jun 28 20:37:17 2018 (r335776) @@ -58,10 +58,7 @@ .fflags = (d), \ .data = (e), \ .udata = (f), \ - .ext[0] = 0, \ - .ext[1] = 0, \ - .ext[2] = 0, \ - .ext[3] = 0, \ + .ext = {0}, \ }; \ } while(0) #else /* Pre-C99 or not STDC (e.g., C++) */ From owner-svn-src-all@freebsd.org Thu Jun 28 20:40:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 759611026A49; Thu, 28 Jun 2018 20:40:30 +0000 (UTC) (envelope-from dab0816@gmail.com) Received: from mail-io0-x244.google.com (mail-io0-x244.google.com [IPv6:2607:f8b0:4001:c06::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EB76B8CF7C; Thu, 28 Jun 2018 20:40:29 +0000 (UTC) (envelope-from dab0816@gmail.com) Received: by mail-io0-x244.google.com with SMTP id k16-v6so6476474ioa.8; Thu, 28 Jun 2018 13:40:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:subject:to:cc:references:openpgp:autocrypt:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=gYIV9OD9mplrjmdF5OWv3uLonrPEFVxOgEs1bniGDzE=; b=VX5KqGwBCp4OwqCwsilCFuwQelG215fbWYSdAncBgQwCJdlb5R5UQzEEPE/e6hGWNI VH9bGJAE8qJUpG7HTes6UVmhPLgjxwE65o8STcVqn5OnpmmtIXzZ4tZbaAW1C9ICmS39 ucXuMaNRPIacCtpql88Xjk7A7zdr8Os1dtzup+iakhtde+1Ltt3fMVR1slBLUgD2iGYO A8c2Lwbv4V8em46e5RONuKgLPdRfuKVycKDEvpqgeP26qeuTubl9XmnyP9XkNw5vsxJo ZHYaP3sqUXTFLmryJMOLYHp47/I/obMMeD0bKsgmWC7142aZtwNAEgiAqhrSyoiEEbFE fENg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:subject:to:cc:references:openpgp :autocrypt:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=gYIV9OD9mplrjmdF5OWv3uLonrPEFVxOgEs1bniGDzE=; b=JY6ZxdCWuRhgf2GBG6PjQQC0aslQyLW+WWYaD9Jo47ZeEiZYb6bNUeRWW1eoeaMGPk uFTodV0mxom3ZQZuaAfgUc49K0scdGQljBW+eHH7HDOnJ0oOMg0yYllBW9qIx8IRkKT0 Sq0eT7yLG340cuew8aU8cfYh1daTqiLnkI5zuJmr65JcorrpJwXNdhbmDvoiX7yEroNK VqBBodfI0QWDyLaJpeqA9oTFzy7H6+r8eUp4X7aImrtnRWSJnVybJaJ2DHNYVo9S1w9W YZNBhWu7y9yA4Vm/O4hP8w4YAkDeEQMLJTQ/gRgSbUoo3kV+Wp2YN9xf8thlAdhjF2qi ZjNQ== X-Gm-Message-State: APt69E3JDPTJlZx5o5p0ZPRyowGe2RdZwjohLtYjD+MKnzK5GEpisBl+ dpzGbHsDQo9CDgKcp19RyB3JHNsd X-Google-Smtp-Source: AAOMgpcUE+dFaXDft+/AXQBpw29kxtSCanGVrvZR2/krTJIGTiqRslF3GX4my0T8960oVNXXHUrvgg== X-Received: by 2002:a6b:1d82:: with SMTP id d124-v6mr9828178iod.115.1530218429362; Thu, 28 Jun 2018 13:40:29 -0700 (PDT) Received: from dab-xps-13-9370.localdomain ([76.164.8.130]) by smtp.gmail.com with ESMTPSA id w193-v6sm4792491ita.35.2018.06.28.13.40.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jun 2018 13:40:29 -0700 (PDT) Sender: David Bright From: "David A. Bright" X-Google-Original-From: "David A. Bright" Subject: Re: svn commit: r335765 - head/sys/sys To: Justin Hibbits Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201806281701.w5SH15eP011261@repo.freebsd.org> Openpgp: preference=signencrypt Autocrypt: addr=dab@FreeBSD.org; prefer-encrypt=mutual; keydata= xsBNBFgqQsIBCADfDUZ79qW2MKVRQl9l9zMYzppdHn+eS7KGjUP9hjmYUuX3vM0Sc5DlJ9Py 59Byucg8zo6eow1iv6NdiEPuUEYB2ujDP/kbmC397zEt6p9ldlL4PXXSJumpdZCzwz4ACYB5 ke7OCljNqbigzoZgX5DXjyjx87NfG6eWkbnEweDPmae7DGj5bwQmJPoTqvJR7Ot/R/73ix8l hph1vdl83Iqu+IDVdlXTI2Afz4UaCRdfDiXgMQIo/HABXJ90+TXG/vH37Jb0kBflql9sEaUs CcTvMrye0Wjgv3VSPZm3ZEgmR7UKR71p2MJVlVVZUH3FHQ2jDqKpCMi7F3ERlvRDktm/ABEB AAHNHkRhdmlkIEJyaWdodCA8ZGFiQGZyZWVic2Qub3JnPsLAfQQTAQoAJwUCWCpCwgIbAwUJ BaOagAULCQgHAwUVCgkICwUWAwIBAAIeAQIXgAAKCRAzeMsxoQO+aqagCADDt4FbZBz3VFev TEtAjuyzCDPmPom1MBwsh6KB2J84wKOsXPmZ7vqaZ2G70fCPNowqmHq56cAbp0BD1Lf6gD+3 imeacKc/E6n+L49LOhOtQ8EUyHs/nAUmlE1PrOS1w5wmCgRjPXa5k+zxj/YMsAEFdMn6UzOl 5MIJN/zhBB5tU2bkP5hF4rVvpQ1zlnSldoBLfPlG/w1RzvOSJfunZUTSNVrKYlSjEQ7q56ud xKoLPEdr+X8kqwZilh5WBiTt7mMw7lrP6dMV/GGmDg893J6conQ1l2RN6Un1gKlc3rgdz3sh ncr786WF3cV2dFSIrO/Pn3iNRR3uJouRLdLhU0kMzsBNBFgqQsIBCAC5ABwcVerpyp5NzHBD FSbxEyPab6HFH1E4zksEGyeypU8UW5acc2ko5Ovz7CE0n21uhBtIt/Lz5Koxz0LSqqnk9jIQ L/4XVvne+8YnT+Tf9DZv9We5K0tFit/DFgCzIpxacoxLGBRNSkSzFrAepvVinTk905igdYZY fxtHrAREU4BdqBMQtbgGaewHtOLlRRr+N4wkAZlJLa7RaLn5s/EakpmCM1eR8z0fOBNJSXlW Ozqh1cvwWZ00qj0rYXwXu0fgzpREmJFS01GByFuB4xDyqfAoynxKNBJH/qAcJTp7jST8PLWe 3Tblm4acsIAPHUcABgMnZYdMQnSwwa9/W1DlABEBAAHCwGUEGAEKAA8FAlgqQsICGwwFCQWj moAACgkQM3jLMaEDvmp8hQgAzKTYmU2cf35NdrtT9C7jBDWSVSDdyKHYSAKoP+vAkC3A1HH6 wohE5JvOZ6245vgBQwFHvzh2v7jDUWmB3CrcSSMUoUIwl15mWlCdCy/C3SAknxQx+zHYmx9v uHPS1yF2l0KPS30Kc1le1GqVYi5wxnWPo+gE3MH4DDh5LdDExYveMuBgybdNxV8Qvr25UghJ HrQCT+FCISo0FActO1Z5HzdOKxQe6KTn+zKr4yKCOe4kb7GUaAX3Pt82J7bMtwRzAKLyjMJV QueL/cr+geerKKrd8FyVAgQMhdBYD3lyjK6nGssgr4Og9+QtsE2RAVH9qqhcF3kI7nxJ7EDb /d3xag== Message-ID: Date: Thu, 28 Jun 2018 15:40:28 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 20:40:30 -0000 On 06/28/2018 01:45 PM, Justin Hibbits wrote: >> Author: dab >> Date: Thu Jun 28 17:01:04 2018 >> New Revision: 335765 > > This breaks gcc builds, with the following errors: Fixed in r335776. Thanks to cem@ for a suggested fix (and to others that also suggested alternative fixes) and to jhibbits@ for verifying the fix. -- David Bright dab@FreeBSD.org From owner-svn-src-all@freebsd.org Thu Jun 28 21:14:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E018B1027698; Thu, 28 Jun 2018 21:14:33 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 852D78E61E; Thu, 28 Jun 2018 21:14:33 +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 608CC179AB; Thu, 28 Jun 2018 21:14:33 +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 w5SLEXHs061322; Thu, 28 Jun 2018 21:14:33 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5SLEXr2061320; Thu, 28 Jun 2018 21:14:33 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201806282114.w5SLEXr2061320@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Thu, 28 Jun 2018 21:14:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335779 - in head/sys: arm/broadcom/bcm2835 conf X-SVN-Group: head X-SVN-Commit-Author: gonzo X-SVN-Commit-Paths: in head/sys: arm/broadcom/bcm2835 conf X-SVN-Commit-Revision: 335779 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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 21:14:34 -0000 Author: gonzo Date: Thu Jun 28 21:14:33 2018 New Revision: 335779 URL: https://svnweb.freebsd.org/changeset/base/335779 Log: [rpi] Add SDHOST device driver for Raspberry Pi SDHOST is another SD controller that is present on Raspberry Pi (the other one is SDHC and handled by bcm2835_sdhci driver). Both controllers are capable of providing interface to SD card, actual configuration can be set in dtb file. At the moment custom DTBs for RPi/RPi2 have sdhost node disabled. On RPi3 sdhost is disabled in snapshot images by applying mmc.dtbo overlay. To enalbe both devices user has to edit config.txt on FAT partition and remove or comment "dtoverlay=mmc" line. When no overlay applied on RPi3 SDHOST controls SD card and SDHC interface can be used for SDIO. mmc.dtbo overlay disables SDHOST node and switches SD card over to SDHC. Likewise sdhost.dtbo overlay (not currently included in snapshot image, but can be obtained from firmare repo[1]) disabled SDHC node and switch SD card over to SDHOST. [1] https://github.com/raspberrypi/firmware/tree/master/boot/overlays Submitted by: Klaus P. Ohrhallinger Differential Revision: https://reviews.freebsd.org/D14168 Added: head/sys/arm/broadcom/bcm2835/bcm2835_sdhost.c (contents, props changed) Modified: head/sys/arm/broadcom/bcm2835/files.bcm283x head/sys/conf/files.arm64 Added: head/sys/arm/broadcom/bcm2835/bcm2835_sdhost.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/broadcom/bcm2835/bcm2835_sdhost.c Thu Jun 28 21:14:33 2018 (r335779) @@ -0,0 +1,1301 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Klaus P. Ohrhallinger + * All rights reserved. + * + * Based on bcm2835_sdhci.c: + * Copyright (c) 2012 Oleksandr Tymoshenko + * 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$"); + +/* + * pin 48-53 - card slot + * pin 34-39 - radio module + * + * alt-0 - rubbish SDHCI (0x7e202000) aka sdhost + * alt-3 - advanced SDHCI (0x7e300000) aka sdhci/mmc/sdio + * + * driving card slot with mmc: + * + * sdhost_pins { + * brcm,pins = <0x30 0x31 0x32 0x33 0x34 0x35>; + * brcm,function = <0x7>; + * brcm,pull = <0x0 0x2 0x2 0x2 0x2 0x2>; + * phandle = <0x17>; + * }; + * sdio_pins { + * brcm,pins = <0x22 0x23 0x24 0x25 0x26 0x27>; + * brcm,function = <0x4>; + * brcm,pull = <0x0 0x2 0x2 0x2 0x2 0x2>; + * phandle = <0x18>; + * }; + * + * driving card slot with sdhost: + * + * sdhost_pins { + * brcm,pins = <0x30 0x31 0x32 0x33 0x34 0x35>; + * brcm,function = <0x4>; + * brcm,pull = <0x0 0x2 0x2 0x2 0x2 0x2>; + * phandle = <0x17>; + * }; + * sdio_pins { + * brcm,pins = <0x22 0x23 0x24 0x25 0x26 0x27>; + * brcm,function = <0x7>; + * brcm,pull = <0x0 0x2 0x2 0x2 0x2 0x2>; + * phandle = <0x18>; + * }; + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include + +#include + +#include "mmcbr_if.h" +#include "sdhci_if.h" + +#include "opt_mmccam.h" + +#include "bcm2835_dma.h" +#include +#include "bcm2835_vcbus.h" + + +/* #define SDHOST_DEBUG */ + + +/* Registers */ +#define HC_COMMAND 0x00 /* Command and flags */ +#define HC_ARGUMENT 0x04 +#define HC_TIMEOUTCOUNTER 0x08 +#define HC_CLOCKDIVISOR 0x0c +#define HC_RESPONSE_0 0x10 +#define HC_RESPONSE_1 0x14 +#define HC_RESPONSE_2 0x18 +#define HC_RESPONSE_3 0x1c +#define HC_HOSTSTATUS 0x20 +#define HC_POWER 0x30 +#define HC_DEBUG 0x34 +#define HC_HOSTCONFIG 0x38 +#define HC_BLOCKSIZE 0x3c +#define HC_DATAPORT 0x40 +#define HC_BLOCKCOUNT 0x50 + +/* Flags for HC_COMMAND register */ +#define HC_CMD_ENABLE 0x8000 +#define HC_CMD_FAILED 0x4000 +#define HC_CMD_BUSY 0x0800 +#define HC_CMD_RESPONSE_NONE 0x0400 +#define HC_CMD_RESPONSE_LONG 0x0200 +#define HC_CMD_WRITE 0x0080 +#define HC_CMD_READ 0x0040 +#define HC_CMD_COMMAND_MASK 0x003f + +#define HC_CLOCKDIVISOR_MAXVAL 0x07ff + +/* Flags for HC_HOSTSTATUS register */ +#define HC_HSTST_HAVEDATA 0x0001 +#define HC_HSTST_ERROR_FIFO 0x0008 +#define HC_HSTST_ERROR_CRC7 0x0010 +#define HC_HSTST_ERROR_CRC16 0x0020 +#define HC_HSTST_TIMEOUT_CMD 0x0040 +#define HC_HSTST_TIMEOUT_DATA 0x0080 +#define HC_HSTST_INT_BLOCK 0x0200 +#define HC_HSTST_INT_BUSY 0x0400 + +#define HC_HSTST_RESET 0xffff + +#define HC_HSTST_MASK_ERROR_DATA (HC_HSTST_ERROR_FIFO | \ + HC_HSTST_ERROR_CRC7 | HC_HSTST_ERROR_CRC16 | HC_HSTST_TIMEOUT_DATA) + +#define HC_HSTST_MASK_ERROR_ALL (HC_HSTST_MASK_ERROR_DATA | \ + HC_HSTST_TIMEOUT_CMD) + +/* Flags for HC_HOSTCONFIG register */ +#define HC_HSTCF_INTBUS_WIDE 0x0002 +#define HC_HSTCF_EXTBUS_4BIT 0x0004 +#define HC_HSTCF_SLOW_CARD 0x0008 +#define HC_HSTCF_INT_DATA 0x0010 +#define HC_HSTCF_INT_BLOCK 0x0100 +#define HC_HSTCF_INT_BUSY 0x0400 + +/* Flags for HC_DEBUG register */ +#define HC_DBG_FIFO_THRESH_WRITE_SHIFT 9 +#define HC_DBG_FIFO_THRESH_READ_SHIFT 14 +#define HC_DBG_FIFO_THRESH_MASK 0x001f + +/* Settings */ +#define HC_FIFO_SIZE 16 +#define HC_FIFO_THRESH_READ 4 +#define HC_FIFO_THRESH_WRITE 4 + +#define HC_TIMEOUT_DEFAULT 0x00f00000 + +#define BCM2835_DEFAULT_SDHCI_FREQ 50 + +static int bcm2835_sdhost_debug = 0; + +#ifdef SDHOST_DEBUG + +TUNABLE_INT("hw.bcm2835.sdhost.debug", &bcm2835_sdhost_debug); +SYSCTL_INT(_hw_sdhci, OID_AUTO, bcm2835_sdhost_debug, CTLFLAG_RWTUN, + &bcm2835_sdhost_debug, 0, "bcm2835-sdhost Debug level"); + +#define dprintf(fmt, args...) \ + do { \ + if (bcm2835_sdhost_debug > 0) \ + printf(fmt,##args); \ + } while (0) +#else + +#define dprintf(fmt, args...) + +#endif /* ! SDHOST_DEBUG */ + +static struct ofw_compat_data compat_data[] = { + {"brcm,bcm2835-sdhost", 1}, + {NULL, 0} +}; + +struct bcm_sdhost_softc { + device_t sc_dev; + struct resource * sc_mem_res; + struct resource * sc_irq_res; + bus_space_tag_t sc_bst; + bus_space_handle_t sc_bsh; + void * sc_intrhand; + struct mmc_request * sc_req; + struct sdhci_slot sc_slot; + + struct mtx mtx; + + char cmdbusy; + char mmc_app_cmd; + + u_int32_t sdhci_int_status; + u_int32_t sdhci_signal_enable; + u_int32_t sdhci_present_state; + u_int32_t sdhci_blocksize; + u_int32_t sdhci_blockcount; + + u_int32_t sdcard_rca; +}; + +static int bcm_sdhost_probe(device_t); +static int bcm_sdhost_attach(device_t); +static int bcm_sdhost_detach(device_t); +static void bcm_sdhost_intr(void *); + +static int bcm_sdhost_get_ro(device_t, device_t); + + +static inline uint32_t +RD4(struct bcm_sdhost_softc *sc, bus_size_t off) +{ + uint32_t val; + + val = bus_space_read_4(sc->sc_bst, sc->sc_bsh, off); + + return (val); +} + +static inline void +WR4(struct bcm_sdhost_softc *sc, bus_size_t off, uint32_t val) +{ + + bus_space_write_4(sc->sc_bst, sc->sc_bsh, off, val); +} + +static inline uint16_t +RD2(struct bcm_sdhost_softc *sc, bus_size_t off) +{ + uint32_t val; + + val = RD4(sc, off & ~3); + + return ((val >> (off & 3)*8) & 0xffff); +} + +static inline uint8_t +RD1(struct bcm_sdhost_softc *sc, bus_size_t off) +{ + uint32_t val; + + val = RD4(sc, off & ~3); + + return ((val >> (off & 3)*8) & 0xff); +} + +static inline void +WR2(struct bcm_sdhost_softc *sc, bus_size_t off, uint16_t val) +{ + uint32_t val32; + + val32 = RD4(sc, off & ~3); + val32 &= ~(0xffff << (off & 3)*8); + val32 |= (val << (off & 3)*8); + WR4(sc, off & ~3, val32); +} + +static inline void +WR1(struct bcm_sdhost_softc *sc, bus_size_t off, uint8_t val) +{ + uint32_t val32; + + val32 = RD4(sc, off & ~3); + val32 &= ~(0xff << (off & 3)*8); + val32 |= (val << (off & 3)*8); + WR4(sc, off & ~3, val32); +} + +static void +bcm_sdhost_print_regs(struct bcm_sdhost_softc *sc, struct sdhci_slot *slot, + int line, int error) +{ + + if (bcm2835_sdhost_debug > 0 || error > 0) { + + printf("%s: sc=%p slot=%p\n", + __func__, sc, slot); + printf("HC_COMMAND: 0x%08x\n", + RD4(sc, HC_COMMAND)); + printf("HC_ARGUMENT: 0x%08x\n", + RD4(sc, HC_ARGUMENT)); + printf("HC_TIMEOUTCOUNTER: 0x%08x\n", + RD4(sc, HC_TIMEOUTCOUNTER)); + printf("HC_CLOCKDIVISOR: 0x%08x\n", + RD4(sc, HC_CLOCKDIVISOR)); + printf("HC_RESPONSE_0: 0x%08x\n", + RD4(sc, HC_RESPONSE_0)); + printf("HC_RESPONSE_1: 0x%08x\n", + RD4(sc, HC_RESPONSE_1)); + printf("HC_RESPONSE_2: 0x%08x\n", + RD4(sc, HC_RESPONSE_2)); + printf("HC_RESPONSE_3: 0x%08x\n", + RD4(sc, HC_RESPONSE_3)); + printf("HC_HOSTSTATUS: 0x%08x\n", + RD4(sc, HC_HOSTSTATUS)); + printf("HC_POWER: 0x%08x\n", + RD4(sc, HC_POWER)); + printf("HC_DEBUG: 0x%08x\n", + RD4(sc, HC_DEBUG)); + printf("HC_HOSTCONFIG: 0x%08x\n", + RD4(sc, HC_HOSTCONFIG)); + printf("HC_BLOCKSIZE: 0x%08x\n", + RD4(sc, HC_BLOCKSIZE)); + printf("HC_BLOCKCOUNT: 0x%08x\n", + RD4(sc, HC_BLOCKCOUNT)); + + } else { + + /* + printf("%04d | HC_COMMAND: 0x%08x HC_ARGUMENT: 0x%08x " + "HC_HOSTSTATUS: 0x%08x HC_HOSTCONFIG: 0x%08x\n", + line, RD4(sc, HC_COMMAND), RD4(sc, HC_ARGUMENT), + RD4(sc, HC_HOSTSTATUS), RD4(sc, HC_HOSTCONFIG)); + */ + } +} + +static void +bcm_sdhost_reset(device_t dev, struct sdhci_slot *slot) +{ + struct bcm_sdhost_softc *sc = device_get_softc(dev); + u_int32_t dbg; + + WR4(sc, HC_POWER, 0); + + WR4(sc, HC_COMMAND, 0); + WR4(sc, HC_ARGUMENT, 0); + WR4(sc, HC_TIMEOUTCOUNTER, HC_TIMEOUT_DEFAULT); + WR4(sc, HC_CLOCKDIVISOR, 0); + WR4(sc, HC_HOSTSTATUS, HC_HSTST_RESET); + WR4(sc, HC_HOSTCONFIG, 0); + WR4(sc, HC_BLOCKSIZE, 0); + WR4(sc, HC_BLOCKCOUNT, 0); + + dbg = RD4(sc, HC_DEBUG); + dbg &= ~( (HC_DBG_FIFO_THRESH_MASK << HC_DBG_FIFO_THRESH_READ_SHIFT) | + (HC_DBG_FIFO_THRESH_MASK << HC_DBG_FIFO_THRESH_WRITE_SHIFT) ); + dbg |= (HC_FIFO_THRESH_READ << HC_DBG_FIFO_THRESH_READ_SHIFT) | + (HC_FIFO_THRESH_WRITE << HC_DBG_FIFO_THRESH_WRITE_SHIFT); + WR4(sc, HC_DEBUG, dbg); + + DELAY(250000); + + WR4(sc, HC_POWER, 1); + + DELAY(250000); + + sc->sdhci_present_state = SDHCI_CARD_PRESENT | SDHCI_CARD_STABLE | + SDHCI_WRITE_PROTECT; + + WR4(sc, HC_CLOCKDIVISOR, HC_CLOCKDIVISOR_MAXVAL); + WR4(sc, HC_HOSTCONFIG, HC_HSTCF_INT_BUSY); +} + +static int +bcm_sdhost_probe(device_t dev) +{ + + dprintf("%s:\n", __func__); + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) + return (ENXIO); + + device_set_desc(dev, "Broadcom 2708 SDHOST controller"); + + return (BUS_PROBE_DEFAULT); +} + +static int +bcm_sdhost_attach(device_t dev) +{ + struct bcm_sdhost_softc *sc = device_get_softc(dev); + int rid, err; + u_int default_freq; + + dprintf("%s: dev=%p sc=%p unit=%d\n", + __func__, dev, sc, device_get_unit(dev)); + + mtx_init(&sc->mtx, "BCM SDHOST mtx", "bcm_sdhost", + MTX_DEF | MTX_RECURSE); + + sc->sc_dev = dev; + sc->sc_req = NULL; + + sc->cmdbusy = 0; + sc->mmc_app_cmd = 0; + sc->sdhci_int_status = 0; + sc->sdhci_signal_enable = 0; + sc->sdhci_present_state = 0; + sc->sdhci_blocksize = 0; + sc->sdhci_blockcount = 0; + + sc->sdcard_rca = 0; + + default_freq = 50; + err = 0; + + if (bootverbose) + device_printf(dev, "SDHCI frequency: %dMHz\n", default_freq); + + rid = 0; + sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + if (!sc->sc_mem_res) { + device_printf(dev, "cannot allocate memory window\n"); + err = ENXIO; + goto fail; + } + + sc->sc_bst = rman_get_bustag(sc->sc_mem_res); + sc->sc_bsh = rman_get_bushandle(sc->sc_mem_res); + + bcm_sdhost_reset(dev, &sc->sc_slot); + + bcm_sdhost_print_regs(sc, &sc->sc_slot, __LINE__, 0); + + rid = 0; + sc->sc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, + RF_ACTIVE); + if (!sc->sc_irq_res) { + device_printf(dev, "cannot allocate interrupt\n"); + err = ENXIO; + goto fail; + } + + if (bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, + NULL, bcm_sdhost_intr, sc, &sc->sc_intrhand)) { + device_printf(dev, "cannot setup interrupt handler\n"); + err = ENXIO; + goto fail; + } + + sc->sc_slot.caps = 0; + sc->sc_slot.caps |= SDHCI_CAN_VDD_330; + sc->sc_slot.caps |= SDHCI_CAN_DO_HISPD; + sc->sc_slot.caps |= (default_freq << SDHCI_CLOCK_BASE_SHIFT); + + sc->sc_slot.quirks = 0; + sc->sc_slot.quirks |= SDHCI_QUIRK_MISSING_CAPS; + sc->sc_slot.quirks |= SDHCI_QUIRK_DONT_SHIFT_RESPONSE; + + sc->sc_slot.opt = 0; + + /* XXX ? + sc->slot->timeout_clk = ...; + */ + + sdhci_init_slot(dev, &sc->sc_slot, 0); + + bus_generic_probe(dev); + bus_generic_attach(dev); + + sdhci_start_slot(&sc->sc_slot); + + return (0); + + fail: + if (sc->sc_intrhand) + bus_teardown_intr(dev, sc->sc_irq_res, sc->sc_intrhand); + if (sc->sc_irq_res) + bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sc_irq_res); + if (sc->sc_mem_res) + bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); + + return (err); +} + +static int +bcm_sdhost_detach(device_t dev) +{ + + dprintf("%s:\n", __func__); + + return (EBUSY); +} + +/* + * rv 0 --> command finished + * rv 1 --> command timed out + */ +static inline int +bcm_sdhost_waitcommand(struct bcm_sdhost_softc *sc) +{ + int timeout = 1000; + + mtx_assert(&sc->mtx, MA_OWNED); + + while ((RD4(sc, HC_COMMAND) & HC_CMD_ENABLE) && --timeout > 0) { + DELAY(100); + } + + return ((timeout > 0) ? 0 : 1); +} + +static int +bcm_sdhost_waitcommand_status(struct bcm_sdhost_softc *sc) +{ + u_int32_t cdst; + int i; + + /* wait for card to change status from + * ''prg'' to ''trn'' + * card status: sd specs p. 103 + */ + i = 0; + do { + DELAY(1000); + WR4(sc, HC_ARGUMENT, sc->sdcard_rca << 16); + WR4(sc, HC_COMMAND, + MMC_SEND_STATUS | HC_CMD_ENABLE); + bcm_sdhost_waitcommand(sc); + cdst = RD4(sc, HC_RESPONSE_0); + dprintf("%s: card status %08x (cs %d)\n", + __func__, cdst, (cdst & 0x0e00) >> 9); + if (i++ > 100) { + printf("%s: giving up, " + "card status %08x (cs %d)\n", + __func__, cdst, + (cdst & 0x0e00) >> 9); + return (1); + break; + } + } while (((cdst & 0x0e00) >> 9) != 4); + + return (0); +} + +static void +bcm_sdhost_intr(void *arg) +{ + struct bcm_sdhost_softc *sc = arg; + struct sdhci_slot *slot = &sc->sc_slot; + uint32_t hstst; + uint32_t cmd; + + mtx_lock(&sc->mtx); + + hstst = RD4(sc, HC_HOSTSTATUS); + cmd = RD4(sc, HC_COMMAND); + if (hstst & HC_HSTST_HAVEDATA) { + if (cmd & HC_CMD_READ) { + sc->sdhci_present_state |= SDHCI_DATA_AVAILABLE; + sc->sdhci_int_status |= SDHCI_INT_DATA_AVAIL; + } else if (cmd & HC_CMD_WRITE) { + sc->sdhci_present_state |= SDHCI_SPACE_AVAILABLE; + sc->sdhci_int_status |= SDHCI_INT_SPACE_AVAIL; + } else { + panic("%s: hstst & HC_HSTST_HAVEDATA but no " + "HC_CMD_READ or HC_CMD_WRITE: cmd=%0x8 " + "hstst=%08x\n", __func__, cmd, hstst); + } + } else { + sc->sdhci_present_state &= + ~(SDHCI_DATA_AVAILABLE|SDHCI_SPACE_AVAILABLE); + sc->sdhci_int_status &= + ~(SDHCI_INT_DATA_AVAIL|SDHCI_INT_SPACE_AVAIL); + } + + if (hstst & HC_HSTST_MASK_ERROR_ALL) { + printf("%s: ERROR: HC_HOSTSTATUS: %08x\n", __func__, hstst); + bcm_sdhost_print_regs(sc, &sc->sc_slot, __LINE__, 1); + sc->sdhci_int_status |= SDHCI_INT_ERROR; + } else { + sc->sdhci_int_status &= ~SDHCI_INT_ERROR; + } + + dprintf("%s: hstst=%08x offset=%08lx sdhci_present_state=%08x " + "sdhci_int_status=%08x\n", __func__, hstst, slot->offset, + sc->sdhci_present_state, sc->sdhci_int_status); + + sdhci_generic_intr(&sc->sc_slot); + + sc->sdhci_int_status &= + ~(SDHCI_INT_ERROR|SDHCI_INT_DATA_AVAIL|SDHCI_INT_DATA_END); + sc->sdhci_present_state &= ~SDHCI_DATA_AVAILABLE; + + if ((hstst & HC_HSTST_HAVEDATA) && + (sc->sdhci_blocksize * sc->sdhci_blockcount == slot->offset)) { + dprintf("%s: offset=%08lx sdhci_blocksize=%08x " + "sdhci_blockcount=%08x\n", __func__, slot->offset, + sc->sdhci_blocksize, sc->sdhci_blockcount); + sc->sdhci_int_status &= + ~(SDHCI_INT_DATA_AVAIL|SDHCI_INT_SPACE_AVAIL); + sc->sdhci_int_status |= SDHCI_INT_DATA_END; + sdhci_generic_intr(&sc->sc_slot); + sc->sdhci_int_status &= ~SDHCI_INT_DATA_END; + + if ((cmd & HC_CMD_COMMAND_MASK) == MMC_READ_MULTIPLE_BLOCK || + (cmd & HC_CMD_COMMAND_MASK) == MMC_WRITE_MULTIPLE_BLOCK) { + WR4(sc, HC_ARGUMENT, 0x00000000); + WR4(sc, HC_COMMAND, + MMC_STOP_TRANSMISSION | HC_CMD_ENABLE); + + if (bcm_sdhost_waitcommand(sc)) { + printf("%s: timeout #1\n", __func__); + bcm_sdhost_print_regs(sc, &sc->sc_slot, + __LINE__, 1); + } + } + + if (cmd & HC_CMD_WRITE) { + if (bcm_sdhost_waitcommand_status(sc) != 0) + sc->sdhci_int_status |= SDHCI_INT_ERROR; + } + + slot->data_done = 1; + + sc->sdhci_int_status |= SDHCI_INT_RESPONSE; + sdhci_generic_intr(&sc->sc_slot); + sc->sdhci_int_status &= ~(SDHCI_INT_RESPONSE|SDHCI_INT_ERROR); + } + + /* this resets the interrupt */ + WR4(sc, HC_HOSTSTATUS, + (HC_HSTST_INT_BUSY|HC_HSTST_INT_BLOCK|HC_HSTST_HAVEDATA)); + + mtx_unlock(&sc->mtx); +} + +static int +bcm_sdhost_get_ro(device_t bus, device_t child) +{ + + dprintf("%s:\n", __func__); + + return (0); +} + +static bool +bcm_sdhost_get_card_present(device_t dev, struct sdhci_slot *slot) +{ + + dprintf("%s:\n", __func__); + + return (1); +} + +static void +bcm_sdhost_command(device_t dev, struct sdhci_slot *slot, uint16_t val) +{ + struct bcm_sdhost_softc *sc = device_get_softc(dev); + struct mmc_data *data = slot->curcmd->data; + uint16_t val2; + uint8_t opcode; + uint8_t flags; + + mtx_assert(&sc->mtx, MA_OWNED); + + if (RD4(sc, HC_COMMAND) & HC_CMD_ENABLE) { + panic("%s: HC_CMD_ENABLE on entry\n", __func__); + } + + if (sc->cmdbusy == 1) + panic("%s: cmdbusy\n", __func__); + + sc->cmdbusy = 1; + + val2 = ((val >> 8) & HC_CMD_COMMAND_MASK) | HC_CMD_ENABLE; + + opcode = val >> 8; + flags = val & 0xff; + + if (opcode == MMC_APP_CMD) + sc->mmc_app_cmd = 1; + + if ((flags & SDHCI_CMD_RESP_MASK) == SDHCI_CMD_RESP_LONG) + val2 |= HC_CMD_RESPONSE_LONG; + else if ((flags & SDHCI_CMD_RESP_MASK) == SDHCI_CMD_RESP_SHORT_BUSY) + /* XXX XXX when enabled, cmd 7 (select card) blocks forever */ + ;/*val2 |= HC_CMD_BUSY; */ + else if ((flags & SDHCI_CMD_RESP_MASK) == SDHCI_CMD_RESP_SHORT) + ; + else + val2 |= HC_CMD_RESPONSE_NONE; + + if (val2 & HC_CMD_BUSY) + sc->sdhci_present_state |= + SDHCI_CMD_INHIBIT | SDHCI_DAT_INHIBIT; + + if (data != NULL && data->flags & MMC_DATA_READ) + val2 |= HC_CMD_READ; + else if (data != NULL && data->flags & MMC_DATA_WRITE) + val2 |= HC_CMD_WRITE; + + dprintf("%s: SDHCI_COMMAND_FLAGS --> HC_COMMAND %04x --> %04x\n", + __func__, val, val2); + + if (opcode == MMC_READ_MULTIPLE_BLOCK || + opcode == MMC_WRITE_MULTIPLE_BLOCK) { + u_int32_t save_sdarg; + + dprintf("%s: issuing MMC_SET_BLOCK_COUNT: CMD %08x ARG %08x\n", + __func__, MMC_SET_BLOCK_COUNT | HC_CMD_ENABLE, + sc->sdhci_blockcount); + + save_sdarg = RD4(sc, HC_ARGUMENT); + WR4(sc, HC_ARGUMENT, sc->sdhci_blockcount); + WR4(sc, HC_COMMAND, MMC_SET_BLOCK_COUNT | HC_CMD_ENABLE); + + /* Seems to always return timeout */ + + if (bcm_sdhost_waitcommand(sc)) { + printf("%s: timeout #2\n", __func__); + bcm_sdhost_print_regs(sc, &sc->sc_slot, __LINE__, 1); + } else { + bcm_sdhost_print_regs(sc, &sc->sc_slot, __LINE__, 0); + } + WR4(sc, HC_ARGUMENT, save_sdarg); + + } else if (opcode == MMC_SELECT_CARD) { + sc->sdcard_rca = (RD4(sc, HC_ARGUMENT) >> 16); + } + + /* actually issuing the command */ + WR4(sc, HC_COMMAND, val2); + + if (val2 & HC_CMD_READ || val2 & HC_CMD_WRITE) { + u_int8_t hstcfg; + + hstcfg = RD4(sc, HC_HOSTCONFIG); + hstcfg |= (HC_HSTCF_INT_BUSY | HC_HSTCF_INT_DATA); + WR4(sc, HC_HOSTCONFIG, hstcfg); + slot->data_done = 0; + + if (bcm_sdhost_waitcommand(sc)) { + printf("%s: timeout #3\n", __func__); + bcm_sdhost_print_regs(sc, &sc->sc_slot, __LINE__, 1); + } + + } else if (opcode == MMC_ERASE) { + if (bcm_sdhost_waitcommand_status(sc) != 0) { + printf("%s: timeout #4\n", __func__); + bcm_sdhost_print_regs(sc, &sc->sc_slot, __LINE__, 1); + } + slot->data_done = 1; + sc->sdhci_present_state &= + ~(SDHCI_CMD_INHIBIT | SDHCI_DAT_INHIBIT); + + } else { + if (bcm_sdhost_waitcommand(sc)) { + printf("%s: timeout #5\n", __func__); + bcm_sdhost_print_regs(sc, &sc->sc_slot, __LINE__, 1); + } + slot->data_done = 1; + sc->sdhci_present_state &= + ~(SDHCI_CMD_INHIBIT | SDHCI_DAT_INHIBIT); + } + + bcm_sdhost_print_regs(sc, &sc->sc_slot, __LINE__, 0); + + if (RD4(sc, HC_HOSTSTATUS) & HC_HSTST_TIMEOUT_CMD) + slot->curcmd->error = MMC_ERR_TIMEOUT; + else if (RD4(sc, HC_COMMAND) & HC_CMD_FAILED) + slot->curcmd->error = MMC_ERR_FAILED; + + dprintf("%s: curcmd->flags=%d data_done=%d\n", + __func__, slot->curcmd->flags, slot->data_done); + + if (val2 & HC_CMD_RESPONSE_NONE) + slot->curcmd->error = 0; + + if (sc->mmc_app_cmd == 1 && opcode != MMC_APP_CMD) + sc->mmc_app_cmd = 0; + + if (RD4(sc, HC_COMMAND) & HC_CMD_ENABLE) { + bcm_sdhost_print_regs(sc, &sc->sc_slot, __LINE__, 1); + panic("%s: still HC_CMD_ENABLE on exit\n", __func__); + } + + sc->cmdbusy = 0; + + if (!(val2 & HC_CMD_READ || val2 & HC_CMD_WRITE)) + sc->sdhci_int_status |= SDHCI_INT_RESPONSE; + + /* HACK, so sdhci_finish_command() does not + * have to be exported + */ + mtx_unlock(&slot->mtx); + sdhci_generic_intr(slot); + mtx_lock(&slot->mtx); + sc->sdhci_int_status &= ~SDHCI_INT_RESPONSE; +} + +static uint8_t +bcm_sdhost_read_1(device_t dev, struct sdhci_slot *slot, bus_size_t off) +{ + struct bcm_sdhost_softc *sc = device_get_softc(dev); + uint32_t val1, val2; + + mtx_lock(&sc->mtx); + + switch (off) { + case SDHCI_HOST_CONTROL: + val1 = RD4(sc, HC_HOSTCONFIG); + val2 = 0; + if (val1 & HC_HSTCF_EXTBUS_4BIT) + val2 |= SDHCI_CTRL_4BITBUS; + dprintf("%s: SDHCI_HOST_CONTROL --> HC_HOSTCONFIG val2 %02x\n", + __func__, val2); + break; + case SDHCI_POWER_CONTROL: + val1 = RD1(sc, HC_POWER); + val2 = (val1 == 1) ? 0x0f : 0; + dprintf("%s: SDHCI_POWER_CONTROL --> HC_POWER val2 %02x\n", + __func__, val2); + break; + case SDHCI_BLOCK_GAP_CONTROL: + dprintf("%s: SDHCI_BLOCK_GAP_CONTROL\n", __func__); + val2 = 0; + break; + case SDHCI_WAKE_UP_CONTROL: + dprintf("%s: SDHCI_WAKE_UP_CONTROL\n", __func__); + val2 = 0; + break; + case SDHCI_TIMEOUT_CONTROL: + dprintf("%s: SDHCI_TIMEOUT_CONTROL\n", __func__); + val2 = 0; + break; + case SDHCI_SOFTWARE_RESET: + dprintf("%s: SDHCI_SOFTWARE_RESET\n", __func__); + val2 = 0; + break; + case SDHCI_ADMA_ERR: + dprintf("%s: SDHCI_ADMA_ERR\n", __func__); + val2 = 0; + break; + default: + dprintf("%s: UNKNOWN off=%08lx\n", __func__, off); + val2 = 0; + break; + } + + mtx_unlock(&sc->mtx); + + return (val2); +} + +static uint16_t +bcm_sdhost_read_2(device_t dev, struct sdhci_slot *slot, bus_size_t off) +{ + struct bcm_sdhost_softc *sc = device_get_softc(dev); + uint32_t val2, val; /* = RD4(sc, off & ~3); */ + + mtx_lock(&sc->mtx); + + switch (off) { + case SDHCI_BLOCK_SIZE: + val2 = sc->sdhci_blocksize; + dprintf("%s: SDHCI_BLOCK_SIZE --> HC_BLOCKSIZE %08x\n", + __func__, val2); + break; + case SDHCI_BLOCK_COUNT: + val2 = sc->sdhci_blockcount; + dprintf("%s: SDHCI_BLOCK_COUNT --> HC_BLOCKCOUNT %08x\n", + __func__, val2); + break; + case SDHCI_TRANSFER_MODE: + dprintf("%s: SDHCI_TRANSFER_MODE\n", __func__); + val2 = 0; + break; + case SDHCI_CLOCK_CONTROL: + val = RD4(sc, HC_CLOCKDIVISOR); + val2 = (val << SDHCI_DIVIDER_SHIFT) | + SDHCI_CLOCK_CARD_EN | SDHCI_CLOCK_INT_EN | + SDHCI_CLOCK_INT_STABLE; + dprintf("%s: SDHCI_CLOCK_CONTROL %04x --> %04x\n", + __func__, val, val2); + break; + case SDHCI_ACMD12_ERR: + dprintf("%s: SDHCI_ACMD12_ERR\n", __func__); + val2 = 0; + break; + case SDHCI_HOST_CONTROL2: + dprintf("%s: SDHCI_HOST_CONTROL2\n", __func__); + val2 = 0; + break; + case SDHCI_SLOT_INT_STATUS: + dprintf("%s: SDHCI_SLOT_INT_STATUS\n", __func__); + val2 = 0; + break; + case SDHCI_HOST_VERSION: + dprintf("%s: SDHCI_HOST_VERSION\n", __func__); + val2 = 0; + break; + default: + dprintf("%s: UNKNOWN off=%08lx\n", __func__, off); + val2 = 0; + break; + } + + mtx_unlock(&sc->mtx); + + return (val2); +} + +static uint32_t +bcm_sdhost_read_4(device_t dev, struct sdhci_slot *slot, bus_size_t off) +{ + struct bcm_sdhost_softc *sc = device_get_softc(dev); + uint32_t val2; + + mtx_lock(&sc->mtx); + + switch (off) { + case SDHCI_DMA_ADDRESS: + dprintf("%s: SDHCI_DMA_ADDRESS\n", __func__); + val2 = 0; + break; + case SDHCI_ARGUMENT: + dprintf("%s: SDHCI_ARGUMENT\n", __func__); + val2 = (RD4(sc, HC_COMMAND) << 16) | + (RD4(sc, HC_ARGUMENT) & 0x0000ffff); + break; + case SDHCI_RESPONSE + 0: + val2 = RD4(sc, HC_RESPONSE_0); + dprintf("%s: SDHCI_RESPONSE+0 %08x\n", __func__, val2); + break; + case SDHCI_RESPONSE + 4: + val2 = RD4(sc, HC_RESPONSE_1); + dprintf("%s: SDHCI_RESPONSE+4 %08x\n", __func__, val2); + break; + case SDHCI_RESPONSE + 8: + val2 = RD4(sc, HC_RESPONSE_2); + dprintf("%s: SDHCI_RESPONSE+8 %08x\n", __func__, val2); + break; + case SDHCI_RESPONSE + 12: + val2 = RD4(sc, HC_RESPONSE_3); + dprintf("%s: SDHCI_RESPONSE+12 %08x\n", __func__, val2); + break; + case SDHCI_BUFFER: + dprintf("%s: SDHCI_BUFFER\n", __func__); + val2 = 0; + break; + case SDHCI_PRESENT_STATE: + dprintf("%s: SDHCI_PRESENT_STATE %08x\n", + __func__, sc->sdhci_present_state); + val2 = sc->sdhci_present_state; + break; + case SDHCI_INT_STATUS: + dprintf("%s: SDHCI_INT_STATUS %08x\n", + __func__, sc->sdhci_int_status); + val2 = sc->sdhci_int_status; + break; + case SDHCI_INT_ENABLE: + dprintf("%s: SDHCI_INT_ENABLE\n", __func__); + val2 = 0; + break; + case SDHCI_SIGNAL_ENABLE: + dprintf("%s: SDHCI_SIGNAL_ENABLE %08x\n", + __func__, sc->sdhci_signal_enable); + val2 = sc->sdhci_signal_enable; + break; + case SDHCI_CAPABILITIES: + val2 = 0; + break; + case SDHCI_CAPABILITIES2: + dprintf("%s: SDHCI_CAPABILITIES2\n", __func__); + val2 = 0; + break; + case SDHCI_MAX_CURRENT: + dprintf("%s: SDHCI_MAX_CURRENT\n", __func__); + val2 = 0; + break; + case SDHCI_ADMA_ADDRESS_LO: + dprintf("%s: SDHCI_ADMA_ADDRESS_LO\n", __func__); + val2 = 0; + break; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Thu Jun 28 21:23:06 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 293EA1027AC6; Thu, 28 Jun 2018 21:23:06 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CA3F48F143; Thu, 28 Jun 2018 21:23:05 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AB84E17B87; Thu, 28 Jun 2018 21:23:05 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5SLN57h067489; Thu, 28 Jun 2018 21:23:05 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5SLN5dw067487; Thu, 28 Jun 2018 21:23:05 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201806282123.w5SLN5dw067487@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 28 Jun 2018 21:23:05 +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: r335781 - stable/10/contrib/smbfs/lib/smb X-SVN-Group: stable-10 X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: stable/10/contrib/smbfs/lib/smb X-SVN-Commit-Revision: 335781 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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 21:23:06 -0000 Author: brooks Date: Thu Jun 28 21:23:05 2018 New Revision: 335781 URL: https://svnweb.freebsd.org/changeset/base/335781 Log: MFC r335641: Fix a stack overflow in mount_smbfs when hostname is too long. The local hostname was blindly copied into the to the nn_name array. When the hostname exceeded 16 bytes, it would overflow. Truncate the hostname to 15 bytes plus a 0 terminator which is the "workstation name" suffix. Use defensive strlcpy() when filling nn_name in all cases. PR: 228354 Reported by: donald.buchholz@intel.com Reviewed by: jpaetzel, ian (prior version) Discussed with: Security Officer (gtetlow) Security: Stack overflow with the hostname. Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D15936 Modified: stable/10/contrib/smbfs/lib/smb/ctx.c stable/10/contrib/smbfs/lib/smb/nbns_rq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/smbfs/lib/smb/ctx.c ============================================================================== --- stable/10/contrib/smbfs/lib/smb/ctx.c Thu Jun 28 21:16:50 2018 (r335780) +++ stable/10/contrib/smbfs/lib/smb/ctx.c Thu Jun 28 21:23:05 2018 (r335781) @@ -549,7 +549,9 @@ smb_ctx_resolve(struct smb_ctx *ctx) } nn.nn_scope = ctx->ct_nb->nb_scope; nn.nn_type = NBT_SERVER; - strcpy(nn.nn_name, ssn->ioc_srvname); + if (strlen(ssn->ioc_srvname) > NB_NAMELEN) + return NBERROR(NBERR_NAMETOOLONG); + strlcpy(nn.nn_name, ssn->ioc_srvname, sizeof(nn.nn_name)); error = nb_sockaddr(sap, &nn, &saserver); nb_snbfree(sap); if (error) { @@ -565,7 +567,11 @@ smb_ctx_resolve(struct smb_ctx *ctx) } nls_str_upper(ctx->ct_locname, ctx->ct_locname); } - strcpy(nn.nn_name, ctx->ct_locname); + /* + * Truncate the local host name to NB_NAMELEN-1 which gives a + * suffix of 0 which is "workstation name". + */ + strlcpy(nn.nn_name, ctx->ct_locname, NB_NAMELEN); nn.nn_type = NBT_WKSTA; nn.nn_scope = ctx->ct_nb->nb_scope; error = nb_sockaddr(NULL, &nn, &salocal); Modified: stable/10/contrib/smbfs/lib/smb/nbns_rq.c ============================================================================== --- stable/10/contrib/smbfs/lib/smb/nbns_rq.c Thu Jun 28 21:16:50 2018 (r335780) +++ stable/10/contrib/smbfs/lib/smb/nbns_rq.c Thu Jun 28 21:23:05 2018 (r335781) @@ -74,7 +74,7 @@ nbns_resolvename(const char *name, struct nb_ctx *ctx, if (error) return error; bzero(&nn, sizeof(nn)); - strcpy(nn.nn_name, name); + strlcpy(nn.nn_name, name, sizeof(nn.nn_name)); nn.nn_scope = ctx->nb_scope; nn.nn_type = NBT_SERVER; rqp->nr_nmflags = NBNS_NMFLAG_RD; From owner-svn-src-all@freebsd.org Thu Jun 28 21:26:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F3D31027B97; Thu, 28 Jun 2018 21:26:15 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E36098F2D1; Thu, 28 Jun 2018 21:26:14 +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 C357117B8D; Thu, 28 Jun 2018 21:26:14 +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 w5SLQEIg067680; Thu, 28 Jun 2018 21:26:14 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5SLQExK067679; Thu, 28 Jun 2018 21:26:14 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201806282126.w5SLQExK067679@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 28 Jun 2018 21:26:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335782 - head X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 335782 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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 21:26:15 -0000 Author: jhb Date: Thu Jun 28 21:26:14 2018 New Revision: 335782 URL: https://svnweb.freebsd.org/changeset/base/335782 Log: Remove the various build flag hacks for GCC cross-compile. The xtoolchain GCC packages have not required these flags since ports commits r465416 and r466701. The in-tree GCC 4.2.1 has also been patched in r335716 and r335717 to correctly honor --sysroot when looking for includes and libraries. Reviewed by: bdrewery Sponsored by: DARPA / AFRL Differential Revision: https://reviews.freebsd.org/D16055 Modified: head/Makefile.inc1 head/Makefile.libcompat Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Jun 28 21:23:05 2018 (r335781) +++ head/Makefile.inc1 Thu Jun 28 21:26:14 2018 (r335782) @@ -750,19 +750,6 @@ BFLAGS+= -B${WORLDTMP}/usr/bin .endif .if ${WANT_COMPILER_TYPE} == gcc || \ (defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc) -# GCC requires -isystem and -L when using a cross-compiler. --sysroot -# won't set header path and -L is used to ensure the base library path -# is added before the port PREFIX library path. -XCFLAGS+= -isystem ${WORLDTMP}/usr/include -L${WORLDTMP}/usr/lib -# GCC requires -B to find /usr/lib/crti.o when using a cross-compiler -# combined with --sysroot. -XCFLAGS+= -B${WORLDTMP}/usr/lib -# Force using libc++ for external GCC. -.if defined(X_COMPILER_TYPE) && \ - ${X_COMPILER_TYPE} == gcc && ${X_COMPILER_VERSION} >= 40800 -XCXXFLAGS+= -isystem ${WORLDTMP}/usr/include/c++/v1 -std=c++11 \ - -nostdinc++ -.endif .elif ${WANT_COMPILER_TYPE} == clang || \ (defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == clang) XCFLAGS+= -target ${TARGET_TRIPLE} Modified: head/Makefile.libcompat ============================================================================== --- head/Makefile.libcompat Thu Jun 28 21:23:05 2018 (r335781) +++ head/Makefile.libcompat Thu Jun 28 21:26:14 2018 (r335782) @@ -100,22 +100,6 @@ LIBCOMPATCFLAGS+= ${LIBCOMPATCPUFLAGS} \ # Clang/GCC. LIBCOMPATCFLAGS+= -B${LIBCOMPATTMP}/usr/lib${libcompat} -.if ${WANT_COMPILER_TYPE} == gcc || \ - (defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc) -# GCC requires -isystem when using a cross-compiler and --sysroot. Note that -# Makefile.inc1 only applies this with an external compiler but libcompat -# always does since even in-tree GCC 4.2 needs this to override the built-in -# sysroot path which --sysroot does not actually do for headers. -LIBCOMPATCFLAGS+= -isystem ${LIBCOMPATTMP}/usr/include -# Force using libc++ for external GCC. -.if defined(X_COMPILER_TYPE) && \ - ${X_COMPILER_TYPE} == gcc && ${X_COMPILER_VERSION} >= 40800 && \ - (${MK_CLANG_BOOTSTRAP} == "no" && ${MK_GCC_BOOTSTRAP} == "no") -LIBCOMPATCXXFLAGS+= -isystem ${LIBCOMPATTMP}/usr/include/c++/v1 -std=c++11 \ - -nostdinc++ -.endif -.endif - # Yes, the flags are redundant. LIBCOMPATWMAKEENV+= \ INSTALL="sh ${.CURDIR}/tools/install.sh" \ From owner-svn-src-all@freebsd.org Thu Jun 28 21:27:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8DF9F1027C4B; Thu, 28 Jun 2018 21:27:35 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3A7F88F53A; Thu, 28 Jun 2018 21:27:35 +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 1BBB317BA3; Thu, 28 Jun 2018 21:27:35 +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 w5SLRYQ1067881; Thu, 28 Jun 2018 21:27:34 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5SLRY5l067880; Thu, 28 Jun 2018 21:27:34 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201806282127.w5SLRY5l067880@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 28 Jun 2018 21:27:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335783 - head/sys/mips/malta X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/mips/malta X-SVN-Commit-Revision: 335783 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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 21:27:35 -0000 Author: jhb Date: Thu Jun 28 21:27:34 2018 New Revision: 335783 URL: https://svnweb.freebsd.org/changeset/base/335783 Log: Support 2GB of memory on Malta systems with FreeBSD/mips. When 2GB of memory is enabled for QEMU's Malta emulation, the physical memory ends at an address of 2^32 - 1. This causes an integer overflow to zero when computing the upper bound of the second phys_avail[] range. As a result, FreeBSD/mips kernels were only using the first 256MB of RAM and ignoring the remaining 1.75GB. To work around this, truncate the extended memory size to 2GB minus one page for 32-bit mips kernels. Sponsored by: DARPA / AFRL Differential Revision: https://reviews.freebsd.org/D16027 Modified: head/sys/mips/malta/malta_machdep.c Modified: head/sys/mips/malta/malta_machdep.c ============================================================================== --- head/sys/mips/malta/malta_machdep.c Thu Jun 28 21:26:14 2018 (r335782) +++ head/sys/mips/malta/malta_machdep.c Thu Jun 28 21:27:34 2018 (r335783) @@ -344,6 +344,15 @@ platform_start(__register_t a0, __register_t a1, __re printf("memsize = %llu (0x%08x)\n", (unsigned long long) memsize, memsize); printf("ememsize = %llu\n", (unsigned long long) ememsize); + +#ifdef __mips_o32 + /* + * For O32 phys_avail[] can't address memory beyond 2^32, + * so cap extended memory to 2GB minus one page. + */ + if (ememsize >= 2ULL * 1024 * 1024 * 1024) + ememsize = 2ULL * 1024 * 1024 * 1024 - PAGE_SIZE; +#endif } /* From owner-svn-src-all@freebsd.org Thu Jun 28 21:40:32 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D88B1027F31; Thu, 28 Jun 2018 21:40:32 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 21E748FAA7; Thu, 28 Jun 2018 21:40:32 +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 F2CB417D6E; Thu, 28 Jun 2018 21:40:31 +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 w5SLeVKf072892; Thu, 28 Jun 2018 21:40:31 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5SLeVgf072891; Thu, 28 Jun 2018 21:40:31 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201806282140.w5SLeVgf072891@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 28 Jun 2018 21:40:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335784 - head/sys/amd64/amd64 X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/amd64/amd64 X-SVN-Commit-Revision: 335784 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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 21:40:32 -0000 Author: markj Date: Thu Jun 28 21:40:31 2018 New Revision: 335784 URL: https://svnweb.freebsd.org/changeset/base/335784 Log: Invalidate the mapping before updating its physical address. Doing so ensures that all threads sharing the pmap have a consistent view of the mapping. This fixes the problem described in the commit log messages for r329254 without the overhead of an extra fault in the common case. Once other pmap_enter() implementations are similarly modified, the workaround added in r329254 can be removed, reducing the overhead of CoW faults. With this change we can reuse the PV entry from the old mapping, potentially avoiding a call to reclaim_pv_chunk(). Otherwise, there is nothing preventing the old PV entry from being reclaimed. In rare cases this could result in the PTE's page table page being freed, leading to a use-after-free of the page when the updated PTE is written following the allocation of the PV entry for the new mapping. Reported and tested by: pho Reviewed by: alc, kib MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D16005 Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Thu Jun 28 21:27:34 2018 (r335783) +++ head/sys/amd64/amd64/pmap.c Thu Jun 28 21:40:31 2018 (r335784) @@ -4829,6 +4829,7 @@ retry: panic("pmap_enter: invalid page directory va=%#lx", va); origpte = *pte; + pv = NULL; /* * Is the specified virtual address already mapped? @@ -4870,6 +4871,43 @@ retry: goto unchanged; goto validate; } + + /* + * The physical page has changed. Temporarily invalidate + * the mapping. This ensures that all threads sharing the + * pmap keep a consistent view of the mapping, which is + * necessary for the correct handling of COW faults. It + * also permits reuse of the old mapping's PV entry, + * avoiding an allocation. + * + * For consistency, handle unmanaged mappings the same way. + */ + origpte = pte_load_clear(pte); + KASSERT((origpte & PG_FRAME) == opa, + ("pmap_enter: unexpected pa update for %#lx", va)); + if ((origpte & PG_MANAGED) != 0) { + om = PHYS_TO_VM_PAGE(opa); + + /* + * The pmap lock is sufficient to synchronize with + * concurrent calls to pmap_page_test_mappings() and + * pmap_ts_referenced(). + */ + if ((origpte & (PG_M | PG_RW)) == (PG_M | PG_RW)) + vm_page_dirty(om); + if ((origpte & PG_A) != 0) + vm_page_aflag_set(om, PGA_REFERENCED); + CHANGE_PV_LIST_LOCK_TO_PHYS(&lock, opa); + pv = pmap_pvh_remove(&om->md, pmap, va); + if ((om->aflags & PGA_WRITEABLE) != 0 && + TAILQ_EMPTY(&om->md.pv_list) && + ((om->flags & PG_FICTITIOUS) != 0 || + TAILQ_EMPTY(&pa_to_pvh(opa)->pv_list))) + vm_page_aflag_clear(om, PGA_WRITEABLE); + } + if ((origpte & PG_A) != 0) + pmap_invalidate_page(pmap, va); + origpte = 0; } else { /* * Increment the counters. @@ -4883,8 +4921,10 @@ retry: * Enter on the PV list if part of our managed memory. */ if ((newpte & PG_MANAGED) != 0) { - pv = get_pv_entry(pmap, &lock); - pv->pv_va = va; + if (pv == NULL) { + pv = get_pv_entry(pmap, &lock); + pv->pv_va = va; + } CHANGE_PV_LIST_LOCK_TO_PHYS(&lock, pa); TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_next); m->md.pv_gen++; @@ -4898,25 +4938,10 @@ retry: if ((origpte & PG_V) != 0) { validate: origpte = pte_load_store(pte, newpte); - opa = origpte & PG_FRAME; - if (opa != pa) { - if ((origpte & PG_MANAGED) != 0) { - om = PHYS_TO_VM_PAGE(opa); - if ((origpte & (PG_M | PG_RW)) == (PG_M | - PG_RW)) - vm_page_dirty(om); - if ((origpte & PG_A) != 0) - vm_page_aflag_set(om, PGA_REFERENCED); - CHANGE_PV_LIST_LOCK_TO_PHYS(&lock, opa); - pmap_pvh_free(&om->md, pmap, va); - if ((om->aflags & PGA_WRITEABLE) != 0 && - TAILQ_EMPTY(&om->md.pv_list) && - ((om->flags & PG_FICTITIOUS) != 0 || - TAILQ_EMPTY(&pa_to_pvh(opa)->pv_list))) - vm_page_aflag_clear(om, PGA_WRITEABLE); - } - } else if ((newpte & PG_M) == 0 && (origpte & (PG_M | - PG_RW)) == (PG_M | PG_RW)) { + KASSERT((origpte & PG_FRAME) == pa, + ("pmap_enter: unexpected pa update for %#lx", va)); + if ((newpte & PG_M) == 0 && (origpte & (PG_M | PG_RW)) == + (PG_M | PG_RW)) { if ((origpte & PG_MANAGED) != 0) vm_page_dirty(m); From owner-svn-src-all@freebsd.org Thu Jun 28 21:59:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76A5B1028984; Thu, 28 Jun 2018 21:59:46 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 298E170625; Thu, 28 Jun 2018 21:59:46 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0842D180AB; Thu, 28 Jun 2018 21:59:46 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5SLxj55082875; Thu, 28 Jun 2018 21:59:45 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5SLxjUP082874; Thu, 28 Jun 2018 21:59:45 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201806282159.w5SLxjUP082874@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Thu, 28 Jun 2018 21:59:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335785 - head/sys/dev/iwn X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/sys/dev/iwn X-SVN-Commit-Revision: 335785 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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 21:59:46 -0000 Author: eadler Date: Thu Jun 28 21:59:45 2018 New Revision: 335785 URL: https://svnweb.freebsd.org/changeset/base/335785 Log: iwn: Correct Centrino Advanced-N 6235 constants The iwn 6235 is a 2x2 device (see https://ark.intel.com/products/66890/Intel-Centrino-Advanced-N-6235-Dual-Band) Reviewed by: adrian, kevans Obtained from: Haiku Modified: head/sys/dev/iwn/if_iwn_chip_cfg.h Modified: head/sys/dev/iwn/if_iwn_chip_cfg.h ============================================================================== --- head/sys/dev/iwn/if_iwn_chip_cfg.h Thu Jun 28 21:40:31 2018 (r335784) +++ head/sys/dev/iwn/if_iwn_chip_cfg.h Thu Jun 28 21:59:45 2018 (r335785) @@ -382,8 +382,7 @@ static const struct iwn_base_params iwn_6235_base_para | IWN_FLG_NEED_PHY_CALIB_TEMP_OFFSET ), .support_hostap = false, .no_multi_vaps = true, - /* XXX 1x2? This NIC is 2x2, right? */ - .additional_gp_drv_bit = IWN_GP_DRIVER_6050_1X2, + .additional_gp_drv_bit = 0, .bt_mode = IWN_BT_ADVANCED, .plcp_err_threshold = IWN_PLCP_ERR_DEFAULT_THRESHOLD, }; From owner-svn-src-all@freebsd.org Thu Jun 28 22:05:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE69D1028F4E; Thu, 28 Jun 2018 22:05:29 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A147770B5E; Thu, 28 Jun 2018 22:05:29 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8395118239; Thu, 28 Jun 2018 22:05:29 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5SM5TWZ088147; Thu, 28 Jun 2018 22:05:29 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5SM5T0C088146; Thu, 28 Jun 2018 22:05:29 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201806282205.w5SM5T0C088146@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 28 Jun 2018 22:05:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335786 - head/etc/rc.d X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/etc/rc.d X-SVN-Commit-Revision: 335786 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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 22:05:30 -0000 Author: ian Date: Thu Jun 28 22:05:29 2018 New Revision: 335786 URL: https://svnweb.freebsd.org/changeset/base/335786 Log: Rename variable ntp_tmp_leapfile to have a leading underbar, to distinguish it from variables with similar names which are set in rc.conf. This will make more sense as the script grows more similar-name local variables in some upcoming changes. Modified: head/etc/rc.d/ntpd Modified: head/etc/rc.d/ntpd ============================================================================== --- head/etc/rc.d/ntpd Thu Jun 28 21:59:45 2018 (r335785) +++ head/etc/rc.d/ntpd Thu Jun 28 22:05:29 2018 (r335786) @@ -20,7 +20,7 @@ fetch_cmd="ntpd_fetch_leapfile" needfetch_cmd="ntpd_needfetch_leapfile" start_precmd="ntpd_precmd" -ntp_tmp_leapfile="/var/run/ntpd.leap-seconds.list" +_ntp_tmp_leapfile="/var/run/ntpd.leap-seconds.list" load_rc_config $name @@ -56,7 +56,7 @@ ntpd_precmd() ( cd /dev ; /bin/pax -rw -pe clockctl "${ntpd_chrootdir}/dev" ) fi ln -fs "${ntpd_chrootdir}/var/db/ntp.drift" /var/db/ntp.drift - ln -fs "${ntpd_chrootdir}${ntp_tmp_leapfile}" ${ntp_tmp_leapfile} + ln -fs "${ntpd_chrootdir}${_ntp_tmp_leapfile}" ${_ntp_tmp_leapfile} # Change run_rc_commands()'s internal copy of $ntpd_flags # @@ -140,15 +140,15 @@ ntpd_fetch_leapfile() { if ntpd_needfetch_leapfile ; then for url in $ntp_leapfile_sources ; do $verbose fetching $url - fetch $ntp_leapfile_fetch_opts -o $ntp_tmp_leapfile $url && break + fetch $ntp_leapfile_fetch_opts -o $_ntp_tmp_leapfile $url && break done - ntp_ver_no_tmp=$(get_ntp_leapfile_ver $ntp_tmp_leapfile) - ntp_expiry_tmp=$(get_ntp_leapfile_expiry $ntp_tmp_leapfile) + ntp_ver_no_tmp=$(get_ntp_leapfile_ver $_ntp_tmp_leapfile) + ntp_expiry_tmp=$(get_ntp_leapfile_expiry $_ntp_tmp_leapfile) if [ "$ntp_expiry_tmp" -gt "$ntp_expiry_db" -o \ "$ntp_expiry_tmp" -eq "$ntp_expiry_db" -a \ "$ntp_ver_no_tmp" -gt "$ntp_ver_no_db" ]; then $verbose using $url as $ntp_db_leapfile - mv -f $ntp_tmp_leapfile $ntp_db_leapfile || + mv -f $_ntp_tmp_leapfile $ntp_db_leapfile || $verbose "warning: cannot replace $ntp_db_leapfile (read-only fs?)" else $verbose using existing $ntp_db_leapfile From owner-svn-src-all@freebsd.org Thu Jun 28 22:13:33 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FB5410297BB; Thu, 28 Jun 2018 22:13:33 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E88B171333; Thu, 28 Jun 2018 22:13:32 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CB1B8183C8; Thu, 28 Jun 2018 22:13:32 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5SMDWvq093161; Thu, 28 Jun 2018 22:13:32 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5SMDWta093160; Thu, 28 Jun 2018 22:13:32 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201806282213.w5SMDWta093160@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 28 Jun 2018 22:13:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335787 - head/etc/rc.d X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/etc/rc.d X-SVN-Commit-Revision: 335787 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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 22:13:33 -0000 Author: ian Date: Thu Jun 28 22:13:32 2018 New Revision: 335787 URL: https://svnweb.freebsd.org/changeset/base/335787 Log: When being verbose about various leapfile versions, also mention expiration. The expiration date is actually more of a version number than the version date, because expiration changes twice a year, whereas the version only changes when actual leap second events occur (except in USNO leapfiles, which inappropriately bump the version with every expiration date change). Modified: head/etc/rc.d/ntpd Modified: head/etc/rc.d/ntpd ============================================================================== --- head/etc/rc.d/ntpd Thu Jun 28 22:05:29 2018 (r335786) +++ head/etc/rc.d/ntpd Thu Jun 28 22:13:32 2018 (r335787) @@ -106,8 +106,8 @@ ntpd_needfetch_leapfile() { ntp_expiry_src=$(get_ntp_leapfile_expiry $ntp_src_leapfile) ntp_ver_no_db=$(get_ntp_leapfile_ver $ntp_db_leapfile) ntp_expiry_db=$(get_ntp_leapfile_expiry $ntp_db_leapfile) - $verbose ntp_src_leapfile version is $ntp_ver_no_src - $verbose ntp_db_leapfile version is $ntp_ver_no_db + $verbose ntp_src_leapfile version is $ntp_ver_no_src expires $ntp_expiry_src + $verbose ntp_db_leapfile version is $ntp_ver_no_db expires $ntp_expiry_db if [ "$ntp_ver_no_src" -gt "$ntp_ver_no_db" -o \ "$ntp_ver_no_src" -eq "$ntp_ver_no_db" -a \ From owner-svn-src-all@freebsd.org Thu Jun 28 22:24:17 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E0B7102A1CD; Thu, 28 Jun 2018 22:24:17 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B1C871B80; Thu, 28 Jun 2018 22:24:17 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 123D118558; Thu, 28 Jun 2018 22:24:17 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5SMOGK0098049; Thu, 28 Jun 2018 22:24:16 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5SMOGKH098048; Thu, 28 Jun 2018 22:24:16 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201806282224.w5SMOGKH098048@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 28 Jun 2018 22:24:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335788 - head X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 335788 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.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 22:24:17 -0000 Author: bdrewery Date: Thu Jun 28 22:24:16 2018 New Revision: 335788 URL: https://svnweb.freebsd.org/changeset/base/335788 Log: Fix unknown target check after r335450. X-MFC-with: r335450 Pointyhat to: bdrewery Sponsored by: Dell EMC Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Jun 28 22:13:32 2018 (r335787) +++ head/Makefile.inc1 Thu Jun 28 22:24:16 2018 (r335788) @@ -129,7 +129,41 @@ MACHINE_ABI?= unknown MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/:C/hf$//:S/mipsn32/mips64/}-${MACHINE_ABI}-freebsd12.0 TARGET_ABI?= unknown TARGET_TRIPLE?= ${TARGET_ARCH:S/amd64/x86_64/:C/hf$//:S/mipsn32/mips64/}-${TARGET_ABI}-freebsd12.0 +KNOWN_ARCHES?= aarch64/arm64 \ + amd64 \ + arm \ + armeb/arm \ + armv6/arm \ + armv7/arm \ + i386 \ + mips \ + mipsel/mips \ + mips64el/mips \ + mipsn32el/mips \ + mips64/mips \ + mipsn32/mips \ + mipshf/mips \ + mipselhf/mips \ + mips64elhf/mips \ + mips64hf/mips \ + powerpc \ + powerpc64/powerpc \ + powerpcspe/powerpc \ + riscv64/riscv \ + riscv64sf/riscv \ + sparc64 +.if ${TARGET} == ${TARGET_ARCH} +_t= ${TARGET} +.else +_t= ${TARGET_ARCH}/${TARGET} +.endif +.for _t in ${_t} +.if empty(KNOWN_ARCHES:M${_t}) +.error Unknown target ${TARGET_ARCH}:${TARGET}. +.endif +.endfor + # If all targets are disabled for system llvm then don't expect it to work # for cross-builds. .if !defined(TOOLS_PREFIX) && ${MK_LLVM_TARGET_ALL} == "no" && \ @@ -524,41 +558,6 @@ EXTRA_REVISION= _${_BRANCH:C/.*-p([0-9]+$)/\1/} PKG_VERSION= ${_REVISION}${EXTRA_REVISION} .endif .endif # !defined(_MKSHOWCONFIG) - -KNOWN_ARCHES?= aarch64/arm64 \ - amd64 \ - arm \ - armeb/arm \ - armv6/arm \ - armv7/arm \ - i386 \ - mips \ - mipsel/mips \ - mips64el/mips \ - mipsn32el/mips \ - mips64/mips \ - mipsn32/mips \ - mipshf/mips \ - mipselhf/mips \ - mips64elhf/mips \ - mips64hf/mips \ - powerpc \ - powerpc64/powerpc \ - powerpcspe/powerpc \ - riscv64/riscv \ - riscv64sf/riscv \ - sparc64 - -.if ${TARGET} == ${TARGET_ARCH} -_t= ${TARGET} -.else -_t= ${TARGET_ARCH}/${TARGET} -.endif -.for _t in ${_t} -.if empty(KNOWN_ARCHES:M${_t}) -.error Unknown target ${TARGET_ARCH}:${TARGET}. -.endif -.endfor .if !defined(_MKSHOWCONFIG) _CPUTYPE!= MAKEFLAGS= CPUTYPE=${_TARGET_CPUTYPE} ${MAKE} -f /dev/null \ From owner-svn-src-all@freebsd.org Thu Jun 28 23:01:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18441102BB31; Thu, 28 Jun 2018 23:01:42 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 3C4767304C; Thu, 28 Jun 2018 23:01:40 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id d3b5f5cf; Fri, 29 Jun 2018 01:01:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; s=mail; bh=SunZE2RKmm7veeWTbCTo3B2eyz8=; b=L5uPb6KEvFkvRaEEZNPp+irajZFS 9YQpUHop1A8wXQmafYoD3iazllnjAQAvKuXbvVrXdoVEZKBpXxcByUFnKqWy/DEl YbH2XgsOHQBZdaKkqhUUP143bn/kWJU88EMbnDj/JcidGBsXPeSssOubcV1KNUW2 uHVQ5HLQHizgo3k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; q=dns; s= mail; b=ndsIFygh8EbfSBiaKVwwrIFB/E1G/c+kM/MJUHGRf2NHbBEgllLansSC ziKfjxF4drEek8t5DuB9WijKzbAJ8U/fMe6NPp6xJn513n+p496qgNbovF7YPA85 0+2jtnVv0Ho8MtJR6o7xnpZjTH8Q4O3mOHxmtcKDyHKmLJ3LrX0= Received: from skull.home.blih.net (ip-9.net-89-3-105.rev.numericable.fr [89.3.105.9]) by mail.blih.net (OpenSMTPD) with ESMTPSA id b962e506 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Fri, 29 Jun 2018 01:01:33 +0200 (CEST) Date: Fri, 29 Jun 2018 01:01:32 +0200 From: Emmanuel Vadot To: Oleksandr Tymoshenko Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r335779 - in head/sys: arm/broadcom/bcm2835 conf Message-Id: <20180629010132.0fdedfa7ae660294800f2a34@bidouilliste.com> In-Reply-To: <201806282114.w5SLEXr2061320@repo.freebsd.org> References: <201806282114.w5SLEXr2061320@repo.freebsd.org> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; amd64-portbld-freebsd12.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 23:01:42 -0000 On Thu, 28 Jun 2018 21:14:33 +0000 (UTC) Oleksandr Tymoshenko wrote: > Author: gonzo > Date: Thu Jun 28 21:14:33 2018 > New Revision: 335779 > URL: https://svnweb.freebsd.org/changeset/base/335779 > > Log: > [rpi] Add SDHOST device driver for Raspberry Pi > > SDHOST is another SD controller that is present on Raspberry Pi (the > other one is SDHC and handled by bcm2835_sdhci driver). Both > controllers are capable of providing interface to SD card, actual > configuration can be set in dtb file. At the moment custom DTBs for > RPi/RPi2 have sdhost node disabled. On RPi3 sdhost is disabled in > snapshot images by applying mmc.dtbo overlay. To enalbe both devices > user has to edit config.txt on FAT partition and remove or comment > "dtoverlay=mmc" line. > > When no overlay applied on RPi3 SDHOST controls SD card and SDHC > interface can be used for SDIO. mmc.dtbo overlay disables SDHOST node > and switches SD card over to SDHC. Likewise sdhost.dtbo overlay (not > currently included in snapshot image, but can be obtained from firmare > repo[1]) disabled SDHC node and switch SD card over to SDHOST. > > [1] https://github.com/raspberrypi/firmware/tree/master/boot/overlays > > Submitted by: Klaus P. Ohrhallinger > Differential Revision: https://reviews.freebsd.org/D14168 > > Added: > head/sys/arm/broadcom/bcm2835/bcm2835_sdhost.c (contents, props changed) > Modified: > head/sys/arm/broadcom/bcm2835/files.bcm283x > head/sys/conf/files.arm64 > Thanks ! Note that if would be better to take overlays from the rpi-firmware packages as it's where the dtb for the snapshot image is taken. -- Emmanuel Vadot From owner-svn-src-all@freebsd.org Thu Jun 28 23:44:13 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D883D102CCBC; Thu, 28 Jun 2018 23:44:12 +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 2D58E7423E; Thu, 28 Jun 2018 23:44:11 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id Yga1f9HMCTecGYga3fAPUv; Thu, 28 Jun 2018 17:44:04 -0600 X-Authority-Analysis: v=2.3 cv=UvJNyd4B c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=7mUfYlMuFuIA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=QjuOR8yg1OfvMNa8La8A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id 9DCD0716; Thu, 28 Jun 2018 16:43:59 -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 w5SNhh1E083812; Thu, 28 Jun 2018 16:43:43 -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 w5SNhhuf083797; Thu, 28 Jun 2018 16:43:43 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201806282343.w5SNhhuf083797@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Ian Lepore cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r335786 - head/etc/rc.d In-Reply-To: Message from Ian Lepore of "Thu, 28 Jun 2018 22:05:29 -0000." <201806282205.w5SM5T0C088146@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 28 Jun 2018 16:43:43 -0700 X-CMAE-Envelope: MS4wfKIg+Ot49ErZLvJiBgj81ataQoauhM22i1geaqL/zYj1adi8nv4kUi7K16an69y1CtNKt+FijJ0hBfr4cWSlZnfUTeSjlAIG3Y0XGmGUBwyqZC3ljss5 2b2QS6YQstjMLIVZNUUl1qQyXmu8synWFI4CTJvdUW6VJxj89Q/Y/32Xj8jHVZ6ISXgfGBjWKcazNf6OBTFWiWvSASvsnBw4G2TGoHJ4//7Hf/tonIYuyHO4 TWpArQDq5T4+NE1zzbz+8zyoRxGhQOj2P2he2WTudZXwrESsSd18QxOvbqaGhrBR X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 23:44:13 -0000 In message <201806282205.w5SM5T0C088146@repo.freebsd.org>, Ian Lepore writes: > Author: ian > Date: Thu Jun 28 22:05:29 2018 > New Revision: 335786 > URL: https://svnweb.freebsd.org/changeset/base/335786 > > Log: > Rename variable ntp_tmp_leapfile to have a leading underbar, to distinguish > it from variables with similar names which are set in rc.conf. This will > make more sense as the script grows more similar-name local variables in > some upcoming changes. > > Modified: > head/etc/rc.d/ntpd > > Modified: head/etc/rc.d/ntpd > ============================================================================= > = > --- head/etc/rc.d/ntpd Thu Jun 28 21:59:45 2018 (r335785) > +++ head/etc/rc.d/ntpd Thu Jun 28 22:05:29 2018 (r335786) > @@ -20,7 +20,7 @@ fetch_cmd="ntpd_fetch_leapfile" > needfetch_cmd="ntpd_needfetch_leapfile" > start_precmd="ntpd_precmd" > > -ntp_tmp_leapfile="/var/run/ntpd.leap-seconds.list" > +_ntp_tmp_leapfile="/var/run/ntpd.leap-seconds.list" > > load_rc_config $name > > @@ -56,7 +56,7 @@ ntpd_precmd() > ( cd /dev ; /bin/pax -rw -pe clockctl "${ntpd_chrootdir}/dev" ) > fi > ln -fs "${ntpd_chrootdir}/var/db/ntp.drift" /var/db/ntp.drift > - ln -fs "${ntpd_chrootdir}${ntp_tmp_leapfile}" ${ntp_tmp_leapfile} > + ln -fs "${ntpd_chrootdir}${_ntp_tmp_leapfile}" ${_ntp_tmp_leapfile} > > # Change run_rc_commands()'s internal copy of $ntpd_flags > # > @@ -140,15 +140,15 @@ ntpd_fetch_leapfile() { > if ntpd_needfetch_leapfile ; then > for url in $ntp_leapfile_sources ; do > $verbose fetching $url > - fetch $ntp_leapfile_fetch_opts -o $ntp_tmp_leapfile $ur > l && break > + fetch $ntp_leapfile_fetch_opts -o $_ntp_tmp_leapfile $u > rl && break > done > - ntp_ver_no_tmp=$(get_ntp_leapfile_ver $ntp_tmp_leapfile) > - ntp_expiry_tmp=$(get_ntp_leapfile_expiry $ntp_tmp_leapfile) > + ntp_ver_no_tmp=$(get_ntp_leapfile_ver $_ntp_tmp_leapfile) > + ntp_expiry_tmp=$(get_ntp_leapfile_expiry $_ntp_tmp_leapfile) > if [ "$ntp_expiry_tmp" -gt "$ntp_expiry_db" -o \ > "$ntp_expiry_tmp" -eq "$ntp_expiry_db" -a \ > "$ntp_ver_no_tmp" -gt "$ntp_ver_no_db" ]; then > $verbose using $url as $ntp_db_leapfile > - mv -f $ntp_tmp_leapfile $ntp_db_leapfile || > + mv -f $_ntp_tmp_leapfile $ntp_db_leapfile || > $verbose "warning: cannot replace $ntp_db_leapfile > (read-only fs?)" > else > $verbose using existing $ntp_db_leapfile > Thank you Ian. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Thu Jun 28 23:52:52 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EABB4102D0B9; Thu, 28 Jun 2018 23:52:51 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D462746BB; Thu, 28 Jun 2018 23:52:51 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id YgaLf8W6IOFAwYgaMf5PQW; Thu, 28 Jun 2018 17:44:24 -0600 X-Authority-Analysis: v=2.3 cv=Y4XWTCWN c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=7mUfYlMuFuIA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=783UlPZrYWJ2bDqMZHsA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id 2B04D717; Thu, 28 Jun 2018 16:44: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 w5SNi0OW085398; Thu, 28 Jun 2018 16:44:00 -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 w5SNi0ok085390; Thu, 28 Jun 2018 16:44:00 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201806282344.w5SNi0ok085390@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Ian Lepore cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r335787 - head/etc/rc.d In-Reply-To: Message from Ian Lepore of "Thu, 28 Jun 2018 22:13:32 -0000." <201806282213.w5SMDWta093160@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 28 Jun 2018 16:43:59 -0700 X-CMAE-Envelope: MS4wfDIgy1N9i41TCnW+TpeL6zXdmN9y/hp/6IvQabsrb+LMhY37vwzhlk/f+iOIS1Ic/z3WwFqq5QTMVOPKmJGBRf/5FfcuooymutgZ+EIK8Jo8EvLkJBkp nKHXfh3uoja+fLYb1yHr8TVNUoSyzvWNf5jTqEBl/6Xm83CpUkyranyPjbaINN9xWYiu1GLRoYq96+y2gae+FUMK6PEuzsIhbTGqPCYNTj325N04gDM0gApu BXwBtoFKJ1uteJ0sq+YEWxrTdhbNpLVXCyNOaYTSbCpdRMPqCfe3eQwgn6fG+mXE X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 28 Jun 2018 23:52:52 -0000 In message <201806282213.w5SMDWta093160@repo.freebsd.org>, Ian Lepore writes: > Author: ian > Date: Thu Jun 28 22:13:32 2018 > New Revision: 335787 > URL: https://svnweb.freebsd.org/changeset/base/335787 > > Log: > When being verbose about various leapfile versions, also mention expiration > . > > The expiration date is actually more of a version number than the version > date, because expiration changes twice a year, whereas the version only > changes when actual leap second events occur (except in USNO leapfiles, > which inappropriately bump the version with every expiration date change). > > Modified: > head/etc/rc.d/ntpd > > Modified: head/etc/rc.d/ntpd > ============================================================================= > = > --- head/etc/rc.d/ntpd Thu Jun 28 22:05:29 2018 (r335786) > +++ head/etc/rc.d/ntpd Thu Jun 28 22:13:32 2018 (r335787) > @@ -106,8 +106,8 @@ ntpd_needfetch_leapfile() { > ntp_expiry_src=$(get_ntp_leapfile_expiry $ntp_src_leapfile) > ntp_ver_no_db=$(get_ntp_leapfile_ver $ntp_db_leapfile) > ntp_expiry_db=$(get_ntp_leapfile_expiry $ntp_db_leapfile) > - $verbose ntp_src_leapfile version is $ntp_ver_no_src > - $verbose ntp_db_leapfile version is $ntp_ver_no_db > + $verbose ntp_src_leapfile version is $ntp_ver_no_src expires $ntp_expir > y_src > + $verbose ntp_db_leapfile version is $ntp_ver_no_db expires $ntp_expiry_ > db > > if [ "$ntp_ver_no_src" -gt "$ntp_ver_no_db" -o \ > "$ntp_ver_no_src" -eq "$ntp_ver_no_db" -a \ > Thanks. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. From owner-svn-src-all@freebsd.org Fri Jun 29 04:08:15 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC6581030ECE; Fri, 29 Jun 2018 04:08:15 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7F7E37AD63; Fri, 29 Jun 2018 04:08:15 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6099A1BD2E; Fri, 29 Jun 2018 04:08:15 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5T48Fj9071275; Fri, 29 Jun 2018 04:08:15 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5T48FA8071274; Fri, 29 Jun 2018 04:08:15 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201806290408.w5T48FA8071274@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Fri, 29 Jun 2018 04:08:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335790 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 335790 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.26 Precedence: list List-Id: "SVN commit messages 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, 29 Jun 2018 04:08:16 -0000 Author: alc Date: Fri Jun 29 04:08:14 2018 New Revision: 335790 URL: https://svnweb.freebsd.org/changeset/base/335790 Log: Three changes to vm_phys_alloc_seg_contig(): 1. Optimize the order computation. 2. Update the pool for all of the chunks that are removed from the free page lists, and not just the first chunk. 3. Simplify the code for returning excess pages to the free page lists. Reviewed by: Doug Moore Modified: head/sys/vm/vm_phys.c Modified: head/sys/vm/vm_phys.c ============================================================================== --- head/sys/vm/vm_phys.c Fri Jun 29 01:06:47 2018 (r335789) +++ head/sys/vm/vm_phys.c Fri Jun 29 04:08:14 2018 (r335790) @@ -1239,7 +1239,7 @@ vm_phys_alloc_seg_contig(struct vm_phys_seg *seg, u_lo KASSERT(powerof2(boundary), ("boundary is not a power of 2")); vm_domain_free_assert_locked(VM_DOMAIN(seg->domain)); /* Compute the queue that is the best fit for npages. */ - for (order = 0; (1 << order) < npages; order++); + order = flsl(npages - 1); /* Search for a run satisfying the specified conditions. */ size = npages << PAGE_SHIFT; for (oind = min(order, VM_NFREEORDER - 1); oind < VM_NFREEORDER; @@ -1297,14 +1297,12 @@ vm_phys_alloc_seg_contig(struct vm_phys_seg *seg, u_lo done: for (m = m_ret; m < &m_ret[npages]; m = &m[1 << oind]) { fl = (*seg->free_queues)[m->pool]; - vm_freelist_rem(fl, m, m->order); + vm_freelist_rem(fl, m, oind); + if (m->pool != VM_FREEPOOL_DEFAULT) + vm_phys_set_pool(VM_FREEPOOL_DEFAULT, m, oind); } - if (m_ret->pool != VM_FREEPOOL_DEFAULT) - vm_phys_set_pool(VM_FREEPOOL_DEFAULT, m_ret, oind); - fl = (*seg->free_queues)[m_ret->pool]; - vm_phys_split_pages(m_ret, oind, fl, order); /* Return excess pages to the free lists. */ - npages_end = roundup2(npages, 1 << imin(oind, order)); + npages_end = roundup2(npages, 1 << oind); if (npages < npages_end) vm_phys_free_contig(&m_ret[npages], npages_end - npages); return (m_ret); From owner-svn-src-all@freebsd.org Fri Jun 29 04:46:16 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 353CA10317EE; Fri, 29 Jun 2018 04:46:16 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D67CE7BC64; Fri, 29 Jun 2018 04:46:15 +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 B279D1C37F; Fri, 29 Jun 2018 04:46:15 +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 w5T4kF2h091359; Fri, 29 Jun 2018 04:46:15 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5T4kFFW091358; Fri, 29 Jun 2018 04:46:15 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201806290446.w5T4kFFW091358@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 29 Jun 2018 04:46:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335791 - head/tests/sys/audit X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/tests/sys/audit X-SVN-Commit-Revision: 335791 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.26 Precedence: list List-Id: "SVN commit messages 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, 29 Jun 2018 04:46:16 -0000 Author: asomers Date: Fri Jun 29 04:46:15 2018 New Revision: 335791 URL: https://svnweb.freebsd.org/changeset/base/335791 Log: audit(4): add tests for setsid, wait4, wait6, and kill Submitted by: aniketp MFC after: 2 weeks Sponsored by: Google, Inc. (GSoC 2018) Differential Revision: https://reviews.freebsd.org/D16035 Modified: head/tests/sys/audit/process-control.c Modified: head/tests/sys/audit/process-control.c ============================================================================== --- head/tests/sys/audit/process-control.c Fri Jun 29 04:08:14 2018 (r335790) +++ head/tests/sys/audit/process-control.c Fri Jun 29 04:46:15 2018 (r335791) @@ -38,6 +38,7 @@ #include #include +#include #include #include #include @@ -70,7 +71,6 @@ ATF_TC_BODY(fork_success, tc) check_audit(fds, pcregex, pipefd); else _exit(0); - } ATF_TC_CLEANUP(fork_success, tc) @@ -102,7 +102,6 @@ ATF_TC_BODY(rfork_success, tc) check_audit(fds, pcregex, pipefd); else _exit(0); - } ATF_TC_CLEANUP(rfork_success, tc) @@ -135,6 +134,163 @@ ATF_TC_CLEANUP(rfork_failure, tc) } +ATF_TC_WITH_CLEANUP(wait4_success); +ATF_TC_HEAD(wait4_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "wait4(2) call"); +} + +ATF_TC_BODY(wait4_success, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "wait4.*%d.*return,success", pid); + + ATF_REQUIRE((pid = fork()) != -1); + if (pid) { + FILE *pipefd = setup(fds, auclass); + /* wpid = -1 : Wait for any child process */ + ATF_REQUIRE(wait4(-1, &status, 0, NULL) != -1); + check_audit(fds, pcregex, pipefd); + } + else + _exit(0); +} + +ATF_TC_CLEANUP(wait4_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(wait4_failure); +ATF_TC_HEAD(wait4_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "wait4(2) call"); +} + +ATF_TC_BODY(wait4_failure, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "wait4.*%d.*return,failure", pid); + + FILE *pipefd = setup(fds, auclass); + /* Failure reason: No child process to wait for */ + ATF_REQUIRE_EQ(-1, wait4(-1, NULL, 0, NULL)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(wait4_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(wait6_success); +ATF_TC_HEAD(wait6_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "wait6(2) call"); +} + +ATF_TC_BODY(wait6_success, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "wait6.*%d.*return,success", pid); + + ATF_REQUIRE((pid = fork()) != -1); + if (pid) { + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE(wait6(P_ALL, 0, &status, WEXITED, NULL,NULL) != -1); + check_audit(fds, pcregex, pipefd); + } + else + _exit(0); +} + +ATF_TC_CLEANUP(wait6_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(wait6_failure); +ATF_TC_HEAD(wait6_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "wait6(2) call"); +} + +ATF_TC_BODY(wait6_failure, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "wait6.*%d.*return,failure", pid); + + FILE *pipefd = setup(fds, auclass); + /* Failure reason: Invalid argument */ + ATF_REQUIRE_EQ(-1, wait6(0, 0, NULL, 0, NULL, NULL)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(wait6_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(kill_success); +ATF_TC_HEAD(kill_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "kill(2) call"); +} + +ATF_TC_BODY(kill_success, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "kill.*%d.*return,success", pid); + + FILE *pipefd = setup(fds, auclass); + /* Don't send any signal to anyone, live in peace! */ + ATF_REQUIRE_EQ(0, kill(0, 0)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(kill_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(kill_failure); +ATF_TC_HEAD(kill_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "kill(2) call"); +} + +ATF_TC_BODY(kill_failure, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "kill.*%d.*return,failure", pid); + + FILE *pipefd = setup(fds, auclass); + /* + * Failure reason: Non existent process with PID '-2' + * Note: '-1' is not used as it means sending no signal to + * all non-system processes: A successful invocation + */ + ATF_REQUIRE_EQ(-1, kill(0, -2)); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(kill_failure, tc) +{ + cleanup(); +} + + ATF_TC_WITH_CLEANUP(chdir_success); ATF_TC_HEAD(chdir_success, tc) { @@ -781,6 +937,69 @@ ATF_TC_CLEANUP(setpgrp_failure, tc) } +ATF_TC_WITH_CLEANUP(setsid_success); +ATF_TC_HEAD(setsid_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "setsid(2) call"); +} + +ATF_TC_BODY(setsid_success, tc) +{ + /* Main procedure is carried out from within the child process */ + ATF_REQUIRE((pid = fork()) != -1); + if (pid) { + ATF_REQUIRE(wait(&status) != -1); + } else { + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "setsid.*%d.*success", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE(setsid() != -1); + check_audit(fds, pcregex, pipefd); + } +} + +ATF_TC_CLEANUP(setsid_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(setsid_failure); +ATF_TC_HEAD(setsid_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "setsid(2) call"); +} + +ATF_TC_BODY(setsid_failure, tc) +{ + pid = getpid(); + snprintf(pcregex, sizeof(pcregex), "setsid.*%d.*return,failure", pid); + + /* + * Here, we are intentionally ignoring the output of the setsid() + * call because it may or may not be a process leader already. But it + * ensures that the next invocation of setsid() will definitely fail. + */ + setsid(); + FILE *pipefd = setup(fds, auclass); + /* + * Failure reason: [EPERM] Creating a new session is not permitted + * as the PID of calling process matches the PGID of a process group + * created by premature setsid() call. + */ + ATF_REQUIRE_EQ(-1, setsid()); + check_audit(fds, pcregex, pipefd); +} + +ATF_TC_CLEANUP(setsid_failure, tc) +{ + cleanup(); +} + + ATF_TC_WITH_CLEANUP(setrlimit_success); ATF_TC_HEAD(setrlimit_success, tc) { @@ -1210,6 +1429,13 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, rfork_success); ATF_TP_ADD_TC(tp, rfork_failure); + ATF_TP_ADD_TC(tp, wait4_success); + ATF_TP_ADD_TC(tp, wait4_failure); + ATF_TP_ADD_TC(tp, wait6_success); + ATF_TP_ADD_TC(tp, wait6_failure); + ATF_TP_ADD_TC(tp, kill_success); + ATF_TP_ADD_TC(tp, kill_failure); + ATF_TP_ADD_TC(tp, chdir_success); ATF_TP_ADD_TC(tp, chdir_failure); ATF_TP_ADD_TC(tp, fchdir_success); @@ -1239,6 +1465,8 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, setgroups_failure); ATF_TP_ADD_TC(tp, setpgrp_success); ATF_TP_ADD_TC(tp, setpgrp_failure); + ATF_TP_ADD_TC(tp, setsid_success); + ATF_TP_ADD_TC(tp, setsid_failure); ATF_TP_ADD_TC(tp, setrlimit_success); ATF_TP_ADD_TC(tp, setrlimit_failure); From owner-svn-src-all@freebsd.org Fri Jun 29 04:52:28 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23CCA103199A; Fri, 29 Jun 2018 04:52:28 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C88397C03B; Fri, 29 Jun 2018 04:52:27 +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 A94CA1C519; Fri, 29 Jun 2018 04:52:27 +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 w5T4qR82096233; Fri, 29 Jun 2018 04:52:27 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5T4qRnA096232; Fri, 29 Jun 2018 04:52:27 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201806290452.w5T4qRnA096232@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Fri, 29 Jun 2018 04:52:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335792 - head/tests/sys/audit X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/tests/sys/audit X-SVN-Commit-Revision: 335792 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.26 Precedence: list List-Id: "SVN commit messages 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, 29 Jun 2018 04:52:28 -0000 Author: asomers Date: Fri Jun 29 04:52:27 2018 New Revision: 335792 URL: https://svnweb.freebsd.org/changeset/base/335792 Log: audit(4): add tests for several more administrative syscalls Includes ntp_adjtime, auditctl, acct, auditon, and clock_settime. Includes quotactl, mount, nmount, swapon, and swapoff in failure mode only. Success tests for those syscalls will follow. Also includes reboot(2) in failure mode only. That one can't be tested in success mode. Submitted by: aniketp MFC after: 2 weeks Sponsored by: Google, Inc. (GSoC 2018) Differential Revision: https://reviews.freebsd.org/D15898 Modified: head/tests/sys/audit/administrative.c Modified: head/tests/sys/audit/administrative.c ============================================================================== --- head/tests/sys/audit/administrative.c Fri Jun 29 04:46:15 2018 (r335791) +++ head/tests/sys/audit/administrative.c Fri Jun 29 04:52:27 2018 (r335792) @@ -27,10 +27,21 @@ #include #include +#include +#include +#include #include +#include +#include +#include +#include +#include + #include #include +#include +#include #include #include "utils.h" @@ -42,6 +53,7 @@ static struct pollfd fds[1]; static char adregex[80]; static const char *auclass = "ad"; static const char *path = "fileforaudit"; +static const char *successreg = "fileforaudit.*return,success"; ATF_TC_WITH_CLEANUP(settimeofday_success); @@ -101,6 +113,60 @@ ATF_TC_CLEANUP(settimeofday_failure, tc) } +ATF_TC_WITH_CLEANUP(clock_settime_success); +ATF_TC_HEAD(clock_settime_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "clock_settime(2) call"); +} + +ATF_TC_BODY(clock_settime_success, tc) +{ + pid = getpid(); + snprintf(adregex, sizeof(adregex), "clock_settime.*%d.*success", pid); + + struct timespec tp; + ATF_REQUIRE_EQ(0, clock_gettime(CLOCK_REALTIME, &tp)); + + FILE *pipefd = setup(fds, auclass); + /* Setting the same time as obtained by clock_gettime(2) */ + ATF_REQUIRE_EQ(0, clock_settime(CLOCK_REALTIME, &tp)); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(clock_settime_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(clock_settime_failure); +ATF_TC_HEAD(clock_settime_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "clock_settime(2) call"); +} + +ATF_TC_BODY(clock_settime_failure, tc) +{ + pid = getpid(); + snprintf(adregex, sizeof(adregex), "clock_settime.*%d.*failure", pid); + + struct timespec tp; + ATF_REQUIRE_EQ(0, clock_gettime(CLOCK_MONOTONIC, &tp)); + + FILE *pipefd = setup(fds, auclass); + /* Failure reason: cannot use CLOCK_MONOTONIC to set the system time */ + ATF_REQUIRE_EQ(-1, clock_settime(CLOCK_MONOTONIC, &tp)); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(clock_settime_failure, tc) +{ + cleanup(); +} + + ATF_TC_WITH_CLEANUP(adjtime_success); ATF_TC_HEAD(adjtime_success, tc) { @@ -115,7 +181,7 @@ ATF_TC_BODY(adjtime_success, tc) FILE *pipefd = setup(fds, auclass); /* We don't want to change the system time, hence NULL */ - ATF_REQUIRE_EQ(0, adjtime(NULL,NULL)); + ATF_REQUIRE_EQ(0, adjtime(NULL, NULL)); check_audit(fds, adregex, pipefd); } @@ -148,7 +214,55 @@ ATF_TC_CLEANUP(adjtime_failure, tc) } +ATF_TC_WITH_CLEANUP(ntp_adjtime_success); +ATF_TC_HEAD(ntp_adjtime_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "ntp_adjtime(2) call"); +} +ATF_TC_BODY(ntp_adjtime_success, tc) +{ + struct timex timebuff; + bzero(&timebuff, sizeof(timebuff)); + + pid = getpid(); + snprintf(adregex, sizeof(adregex), "ntp_adjtime.*%d.*success", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE(ntp_adjtime(&timebuff) != -1); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(ntp_adjtime_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(ntp_adjtime_failure); +ATF_TC_HEAD(ntp_adjtime_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "ntp_adjtime(2) call"); +} + +ATF_TC_BODY(ntp_adjtime_failure, tc) +{ + pid = getpid(); + snprintf(adregex, sizeof(adregex), "ntp_adjtime.*%d.*failure", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(-1, ntp_adjtime(NULL)); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(ntp_adjtime_failure, tc) +{ + cleanup(); +} + + ATF_TC_WITH_CLEANUP(nfs_getfh_success); ATF_TC_HEAD(nfs_getfh_success, tc) { @@ -200,6 +314,188 @@ ATF_TC_CLEANUP(nfs_getfh_failure, tc) } +ATF_TC_WITH_CLEANUP(auditctl_success); +ATF_TC_HEAD(auditctl_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "auditctl(2) call"); +} + +ATF_TC_BODY(auditctl_success, tc) +{ + /* File needs to exist in order to call auditctl(2) */ + ATF_REQUIRE((filedesc = open(path, O_CREAT | O_WRONLY, mode)) != -1); + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, auditctl(path)); + check_audit(fds, successreg, pipefd); + close(filedesc); +} + +ATF_TC_CLEANUP(auditctl_success, tc) +{ + /* + * auditctl(2) disables audit log at /var/audit and initiates auditing + * at the configured path. To reset this, we need to stop and start the + * auditd(8) again. Here, we check if auditd(8) was running already + * before the test started. If so, we stop and start it again. + */ + system("service auditd onestop > /dev/null 2>&1"); + if (!atf_utils_file_exists("started_auditd")) + system("service auditd onestart > /dev/null 2>&1"); +} + + +ATF_TC_WITH_CLEANUP(auditctl_failure); +ATF_TC_HEAD(auditctl_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "auditctl(2) call"); +} + +ATF_TC_BODY(auditctl_failure, tc) +{ + pid = getpid(); + snprintf(adregex, sizeof(adregex), "auditctl.*%d.*return,failure", pid); + + FILE *pipefd = setup(fds, auclass); + /* Failure reason: file does not exist */ + ATF_REQUIRE_EQ(-1, auditctl(NULL)); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(auditctl_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(auditon_success); +ATF_TC_HEAD(auditon_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "auditon(2) call"); +} + +ATF_TC_BODY(auditon_success, tc) +{ + pid = getpid(); + au_evclass_map_t evclass; + snprintf(adregex, sizeof(adregex), "auditon.*%d.*return,success", pid); + + /* Initialize evclass to get the event-class mapping for auditon(2) */ + evclass.ec_number = AUE_AUDITON; + evclass.ec_class = 0; + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, auditon(A_GETCLASS, &evclass, sizeof(&evclass))); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(auditon_success, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(auditon_failure); +ATF_TC_HEAD(auditon_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "auditon(2) call"); +} + +ATF_TC_BODY(auditon_failure, tc) +{ + pid = getpid(); + snprintf(adregex, sizeof(adregex), "auditon.*%d.*return,failure", pid); + + FILE *pipefd = setup(fds, auclass); + /* Failure reason: Invalid au_evclass_map_t structure */ + ATF_REQUIRE_EQ(-1, auditon(A_GETCLASS, NULL, 0)); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(auditon_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(acct_success); +ATF_TC_HEAD(acct_success, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of a successful " + "acct(2) call"); +} + +ATF_TC_BODY(acct_success, tc) +{ + int acctinfo, filedesc2; + size_t len = sizeof(acctinfo); + const char *acctname = "kern.acct_configured"; + ATF_REQUIRE_EQ(0, sysctlbyname(acctname, &acctinfo, &len, NULL, 0)); + + /* File needs to exist to start system accounting */ + ATF_REQUIRE((filedesc = open(path, O_CREAT | O_RDWR, mode)) != -1); + + /* + * acctinfo = 0: System accounting was disabled + * acctinfo = 1: System accounting was enabled + */ + if (acctinfo) { + ATF_REQUIRE((filedesc2 = open("acct_ok", O_CREAT, mode)) != -1); + close(filedesc2); + } + + pid = getpid(); + snprintf(adregex, sizeof(adregex), + "acct.*%s.*%d.*return,success", path, pid); + + /* + * We temporarily switch the accounting record to a file at + * our own configured path in order to confirm acct(2)'s successful + * auditing. Then we set everything back to its original state. + */ + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(0, acct(path)); + check_audit(fds, adregex, pipefd); + close(filedesc); +} + +ATF_TC_CLEANUP(acct_success, tc) +{ + /* Reset accounting configured path */ + ATF_REQUIRE_EQ(0, system("service accounting onestop")); + if (atf_utils_file_exists("acct_ok")) { + ATF_REQUIRE_EQ(0, system("service accounting onestart")); + } + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(acct_failure); +ATF_TC_HEAD(acct_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "acct(2) call"); +} + +ATF_TC_BODY(acct_failure, tc) +{ + pid = getpid(); + snprintf(adregex, sizeof(adregex), "acct.*%d.*return,failure", pid); + + FILE *pipefd = setup(fds, auclass); + /* Failure reason: File does not exist */ + ATF_REQUIRE_EQ(-1, acct(path)); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(acct_failure, tc) +{ + cleanup(); +} + + ATF_TC_WITH_CLEANUP(getauid_success); ATF_TC_HEAD(getauid_success, tc) { @@ -495,16 +791,179 @@ ATF_TC_CLEANUP(setaudit_addr_failure, tc) } +/* + * Audit of reboot(2) cannot be tested in normal conditions as we don't want + * to reboot the system while running the tests + */ + + +ATF_TC_WITH_CLEANUP(reboot_failure); +ATF_TC_HEAD(reboot_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "reboot(2) call"); +} + +ATF_TC_BODY(reboot_failure, tc) +{ + pid = getpid(); + snprintf(adregex, sizeof(adregex), "reboot.*%d.*return,failure", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(-1, reboot(-1)); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(reboot_failure, tc) +{ + cleanup(); +} + + +/* + * Audit of quotactl(2) cannot be tested in normal conditions as we don't want + * to tamper with filesystem quotas + */ + + +ATF_TC_WITH_CLEANUP(quotactl_failure); +ATF_TC_HEAD(quotactl_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "quotactl(2) call"); +} + +ATF_TC_BODY(quotactl_failure, tc) +{ + pid = getpid(); + snprintf(adregex, sizeof(adregex), "quotactl.*%d.*return,failure", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(-1, quotactl(NULL, 0, 0, NULL)); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(quotactl_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(mount_failure); +ATF_TC_HEAD(mount_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "mount(2) call"); +} + +ATF_TC_BODY(mount_failure, tc) +{ + pid = getpid(); + snprintf(adregex, sizeof(adregex), "mount.*%d.*return,failure", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(-1, mount(NULL, NULL, 0, NULL)); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(mount_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(nmount_failure); +ATF_TC_HEAD(nmount_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "nmount(2) call"); +} + +ATF_TC_BODY(nmount_failure, tc) +{ + pid = getpid(); + snprintf(adregex, sizeof(adregex), "nmount.*%d.*return,failure", pid); + + FILE *pipefd = setup(fds, auclass); + ATF_REQUIRE_EQ(-1, nmount(NULL, 0, 0)); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(nmount_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(swapon_failure); +ATF_TC_HEAD(swapon_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "swapon(2) call"); +} + +ATF_TC_BODY(swapon_failure, tc) +{ + pid = getpid(); + snprintf(adregex, sizeof(adregex), "swapon.*%d.*return,failure", pid); + + FILE *pipefd = setup(fds, auclass); + /* Failure reason: Block device required */ + ATF_REQUIRE_EQ(-1, swapon(path)); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(swapon_failure, tc) +{ + cleanup(); +} + + +ATF_TC_WITH_CLEANUP(swapoff_failure); +ATF_TC_HEAD(swapoff_failure, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests the audit of an unsuccessful " + "swapoff(2) call"); +} + +ATF_TC_BODY(swapoff_failure, tc) +{ + pid = getpid(); + snprintf(adregex, sizeof(adregex), "swapoff.*%d.*return,failure", pid); + + FILE *pipefd = setup(fds, auclass); + /* Failure reason: Block device required */ + ATF_REQUIRE_EQ(-1, swapoff(path)); + check_audit(fds, adregex, pipefd); +} + +ATF_TC_CLEANUP(swapoff_failure, tc) +{ + cleanup(); +} + + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, settimeofday_success); ATF_TP_ADD_TC(tp, settimeofday_failure); + ATF_TP_ADD_TC(tp, clock_settime_success); + ATF_TP_ADD_TC(tp, clock_settime_failure); ATF_TP_ADD_TC(tp, adjtime_success); ATF_TP_ADD_TC(tp, adjtime_failure); + ATF_TP_ADD_TC(tp, ntp_adjtime_success); + ATF_TP_ADD_TC(tp, ntp_adjtime_failure); ATF_TP_ADD_TC(tp, nfs_getfh_success); ATF_TP_ADD_TC(tp, nfs_getfh_failure); + ATF_TP_ADD_TC(tp, acct_success); + ATF_TP_ADD_TC(tp, acct_failure); + ATF_TP_ADD_TC(tp, auditctl_success); + ATF_TP_ADD_TC(tp, auditctl_failure); + ATF_TP_ADD_TC(tp, auditon_success); + ATF_TP_ADD_TC(tp, auditon_failure); + ATF_TP_ADD_TC(tp, getauid_success); ATF_TP_ADD_TC(tp, getauid_failure); ATF_TP_ADD_TC(tp, setauid_success); @@ -519,6 +978,13 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, getaudit_addr_failure); ATF_TP_ADD_TC(tp, setaudit_addr_success); ATF_TP_ADD_TC(tp, setaudit_addr_failure); + + ATF_TP_ADD_TC(tp, reboot_failure); + ATF_TP_ADD_TC(tp, quotactl_failure); + ATF_TP_ADD_TC(tp, mount_failure); + ATF_TP_ADD_TC(tp, nmount_failure); + ATF_TP_ADD_TC(tp, swapon_failure); + ATF_TP_ADD_TC(tp, swapoff_failure); return (atf_no_error()); } From owner-svn-src-all@freebsd.org Fri Jun 29 06:13:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 551E210329D7; Fri, 29 Jun 2018 06:13:21 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 898F47DB12; Fri, 29 Jun 2018 06:13:20 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 5FB0FD6F05F; Fri, 29 Jun 2018 16:13:10 +1000 (AEST) Date: Fri, 29 Jun 2018 16:13:07 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: David Bright cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r335765 - head/sys/sys In-Reply-To: <201806281701.w5SH15eP011261@repo.freebsd.org> Message-ID: <20180629151152.H1477@besplex.bde.org> References: <201806281701.w5SH15eP011261@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=FNpr/6gs c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=XztsH--9W_S8mJs57bYA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 29 Jun 2018 06:13:21 -0000 On Thu, 28 Jun 2018, David Bright wrote: > Log: > Remove potential identifier conflict in the EV_SET macro. > > PR43905 pointed out a problem with the EV_SET macro if the passed > struct kevent pointer were specified with an expression with side > effects (e.g., "kevp++"). This was fixed in rS110241, but by using a > local block that defined an internal variable (named "kevp") to get > the pointer value once. This worked, but could cause issues if an > existing variable named "kevp" is in scope. To avoid that issue, > jilles@ pointed out that "C99 compound literals and designated > initializers allow doing this cleanly using a macro". This change > incorporates that suggestion, essentially verbatim from jilles@ > comment on PR43905, except retaining the old definition for pre-C99 or > non-STDC (e.g., C++) compilers. This in unnecessarily elaborate and unportable. It is reported to be broken for gcc. It leaves the non-C99 case as broken as before (not actually very broken). It has many style bugs. > Modified: head/sys/sys/event.h > ============================================================================== > --- head/sys/sys/event.h Thu Jun 28 15:30:51 2018 (r335764) > +++ head/sys/sys/event.h Thu Jun 28 17:01:04 2018 (r335765) > @@ -49,7 +49,26 @@ > #define EVFILT_EMPTY (-13) /* empty send socket buf */ > #define EVFILT_SYSCOUNT 13 > > +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L Style bug: testing if an identifier is defined before using it in a cpp expression. Only broken compilers need this. Some compilers have a -Wundef flag to enable the brokenness. IIRC, this brokenness is turned back off by default for system headers, but -Wsystem-headers gives full warnings for system headers too and FreeBSD is supposed to use the latter so as to inhibit errors in system headers. has the same style bug for this particular identifier. However, sys/types.h doesn't have this style bug for this identifier. The style bug is especially not needed for this identifier because all C90 and later compilers define this identifier, and there aren't many other compilers. The others are probably old and also don't support a -Wundef flag to break themselves. > #define EV_SET(kevp_, a, b, c, d, e, f) do { \ > + *(kevp_) = (struct kevent){ \ Style bug: beginning of 4-column indentations. > + .ident = (a), \ > + .filter = (b), \ > + ... > + }; \ Style bug: further 4-column indentations. > +} while(0) > +#else /* Pre-C99 or not STDC (e.g., C++) */ > +/* The definition of the local variable kevp could possibly conflict > + * with a user-defined value passed in parameters a-f. > + */ It only conflicts because it is name is in the user namespace. It should be well known that variables in macros must be named beginning with _2_ underscores (or 1 underscore an an upper case letter for an uglier name). 1 underscore suffices for must implementation names (e.g., for function parameters and struct members) because most names are in an inner score that can't conflict. The variable is in an inner scope here too. However, the -Wshadow option asks for warnings about for shadowed variables even in inner scopes. > +#define EV_SET(kevp_, a, b, c, d, e, f) do { \ > struct kevent *kevp = (kevp_); \ > (kevp)->ident = (a); \ > (kevp)->filter = (b); \ This has mounds of old style bugs, mostly created by the wrong fix in r110241. After r110241, there is no problem except -Wshadow warnings a variable named kenvp. However, kenvp might be a macro expanding to 'syntax error' or 'macro programmer's common bug #2' Before r110241, there was no local variable; the arg was named kevp and it was used directly. This had macro programmer's common bug #1 (side effects). Except, EV_SET() is an unsafe macro by the convention that unsafe macros are spelled in upper case, so it is the caller's responsibility to avoid side effects. r110241 changed this to macro programmer's common bug #2 (namespace error) and added many style bugs. it added underscores to all the wrong places -- to the end of the arg name instead of to the beginning of the variable name. This allowed it to not change the uses of the variable. However, all these uses became style bugs (bogus parentheses). Even before r110241, this macro didn't have macro programmer's common bug #0 (missing parentheses around args). This part of the macro also gices an example of normal style (8-column indentation), except it doesn't have a tab after #define or a blank line after the declarations. Correct fix: #define EV_SET(kevp, a, b, c, d, e, f) do { \ struct kevent *__kevp = (kevp); \ \ __kevp->ident = (a); \ __kevp->filter = (b); \ ... > @@ -62,6 +81,7 @@ > (kevp)->ext[2] = 0; \ > (kevp)->ext[3] = 0; \ > } while(0) > +#endif No ifdefs required. > struct kevent { > __uintptr_t ident; /* identifier for this event */ The bugs after r110241 were very small. This system header, like most :-(, is full of undocumented namespace pollution like this struct member name 'ident'. ident is more likely to be a macro than kevp, since it is more generic. In practice, kernel code doesn't do much foot-shooting like #defining either. No other namespace collisions exception ones detected by -Wshadow are possible, and those are just style bugs. Bruce From owner-svn-src-all@freebsd.org Fri Jun 29 10:55:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8B9B1037288; Fri, 29 Jun 2018 10:55:42 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 993EF8606E; Fri, 29 Jun 2018 10:55:42 +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 767641FEF6; Fri, 29 Jun 2018 10:55:42 +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 w5TAtgPx084074; Fri, 29 Jun 2018 10:55:42 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5TAtgjw084073; Fri, 29 Jun 2018 10:55:42 GMT (envelope-from br@FreeBSD.org) Message-Id: <201806291055.w5TAtgjw084073@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Fri, 29 Jun 2018 10:55:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335793 - head/sys/riscv/conf X-SVN-Group: head X-SVN-Commit-Author: br X-SVN-Commit-Paths: head/sys/riscv/conf X-SVN-Commit-Revision: 335793 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.26 Precedence: list List-Id: "SVN commit messages 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, 29 Jun 2018 10:55:43 -0000 Author: br Date: Fri Jun 29 10:55:42 2018 New Revision: 335793 URL: https://svnweb.freebsd.org/changeset/base/335793 Log: Include UART driver since it is now provided in QEMU. Sponsored by: DARPA, AFRL Modified: head/sys/riscv/conf/GENERIC Modified: head/sys/riscv/conf/GENERIC ============================================================================== --- head/sys/riscv/conf/GENERIC Fri Jun 29 04:52:27 2018 (r335792) +++ head/sys/riscv/conf/GENERIC Fri Jun 29 10:55:42 2018 (r335793) @@ -88,6 +88,10 @@ device vtnet # VirtIO Ethernet device device virtio_blk # VirtIO Block device device virtio_mmio # VirtIO MMIO bus +# Serial (COM) ports +device uart # Generic UART driver +device uart_ns8250 # ns8250-type UART driver + # Uncomment for memory disk # options MD_ROOT # options MD_ROOT_SIZE=32768 # 32MB ram disk From owner-svn-src-all@freebsd.org Fri Jun 29 12:41:38 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E108EEF7114; Fri, 29 Jun 2018 12:41:37 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 91EE489F18; Fri, 29 Jun 2018 12:41:37 +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 5BE722101D; Fri, 29 Jun 2018 12:41:37 +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 w5TCfbA4049420; Fri, 29 Jun 2018 12:41:37 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5TCfbVH049419; Fri, 29 Jun 2018 12:41:37 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201806291241.w5TCfbVH049419@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Fri, 29 Jun 2018 12:41:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335794 - head/sys/fs/nfsserver X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/sys/fs/nfsserver X-SVN-Commit-Revision: 335794 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.26 Precedence: list List-Id: "SVN commit messages 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, 29 Jun 2018 12:41:38 -0000 Author: rmacklem Date: Fri Jun 29 12:41:36 2018 New Revision: 335794 URL: https://svnweb.freebsd.org/changeset/base/335794 Log: Fix the pNFS server for a case where mirror level equals number of DSs. If a pNFS service was set up where the number of DSs equals the mirror level and then a DS was disabled, the service would create files with duplicate entries for the same DS. This bug occurred because I didn't realize that TAILQ_FOREACH_FROM() would start at the beginning of the list when the inital value of the variable was NULL. This patch also changes the pNFS server DS file creation code so that it creates entrie(s) with 0.0.0.0 IP address when it cannot create mirror level files due to lack of DSs. The patch only affects the pNFS service and only when it was created with a number of DSs equal to the mirror level and mirroring is enabled. Modified: head/sys/fs/nfsserver/nfs_nfsdport.c Modified: head/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdport.c Fri Jun 29 10:55:42 2018 (r335793) +++ head/sys/fs/nfsserver/nfs_nfsdport.c Fri Jun 29 12:41:36 2018 (r335794) @@ -3859,8 +3859,8 @@ nfsrv_pnfscreate(struct vnode *vp, struct vattr *vap, i = dsdir[0] = ds->nfsdev_nextdir; ds->nfsdev_nextdir = (ds->nfsdev_nextdir + 1) % nfsrv_dsdirsize; dvp[0] = ds->nfsdev_dsdir[i]; - if (nfsrv_maxpnfsmirror > 1) { - mds = TAILQ_NEXT(ds, nfsdev_list); + mds = TAILQ_NEXT(ds, nfsdev_list); + if (nfsrv_maxpnfsmirror > 1 && mds != NULL) { TAILQ_FOREACH_FROM(mds, &nfsrv_devidhead, nfsdev_list) { if (mds->nfsdev_nmp != NULL) { dsdir[mirrorcnt] = i; @@ -3879,7 +3879,8 @@ nfsrv_pnfscreate(struct vnode *vp, struct vattr *vap, if (mirrorcnt > 1) tdsc = dsc = malloc(sizeof(*dsc) * (mirrorcnt - 1), M_TEMP, M_WAITOK | M_ZERO); - tpf = pf = malloc(sizeof(*pf) * mirrorcnt, M_TEMP, M_WAITOK | M_ZERO); + tpf = pf = malloc(sizeof(*pf) * nfsrv_maxpnfsmirror, M_TEMP, M_WAITOK | + M_ZERO); error = nfsvno_getfh(vp, &fh, p); if (error == 0) @@ -3987,11 +3988,27 @@ nfsrv_pnfscreate(struct vnode *vp, struct vattr *vap, NFSFREECRED(tcred); if (error == 0) { ASSERT_VOP_ELOCKED(vp, "nfsrv_pnfscreate vp"); + + NFSD_DEBUG(4, "nfsrv_pnfscreate: mirrorcnt=%d maxmirror=%d\n", + mirrorcnt, nfsrv_maxpnfsmirror); + /* + * For all mirrors that couldn't be created, fill in the + * *pf structure, but with an IP address == 0.0.0.0. + */ + tpf = pf + mirrorcnt; + for (i = mirrorcnt; i < nfsrv_maxpnfsmirror; i++, tpf++) { + *tpf = *pf; + tpf->dsf_sin.sin_family = AF_INET; + tpf->dsf_sin.sin_len = sizeof(struct sockaddr_in); + tpf->dsf_sin.sin_addr.s_addr = 0; + tpf->dsf_sin.sin_port = 0; + } + error = vn_start_write(vp, &mp, V_WAIT); if (error == 0) { error = vn_extattr_set(vp, IO_NODELOCKED, EXTATTR_NAMESPACE_SYSTEM, "pnfsd.dsfile", - sizeof(*pf) * mirrorcnt, (char *)pf, p); + sizeof(*pf) * nfsrv_maxpnfsmirror, (char *)pf, p); if (error == 0) error = vn_extattr_set(vp, IO_NODELOCKED, EXTATTR_NAMESPACE_SYSTEM, "pnfsd.dsattr", From owner-svn-src-all@freebsd.org Fri Jun 29 13:59:34 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69C4DEF88F9; Fri, 29 Jun 2018 13:59:34 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1B28A8C42A; Fri, 29 Jun 2018 13:59:34 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EB59121BBF; Fri, 29 Jun 2018 13:59:33 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5TDxXsH092220; Fri, 29 Jun 2018 13:59:33 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5TDxXPS092219; Fri, 29 Jun 2018 13:59:33 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201806291359.w5TDxXPS092219@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 29 Jun 2018 13:59:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335795 - head/sys/netipsec X-SVN-Group: head X-SVN-Commit-Author: ae X-SVN-Commit-Paths: head/sys/netipsec X-SVN-Commit-Revision: 335795 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.26 Precedence: list List-Id: "SVN commit messages 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, 29 Jun 2018 13:59:34 -0000 Author: ae Date: Fri Jun 29 13:59:33 2018 New Revision: 335795 URL: https://svnweb.freebsd.org/changeset/base/335795 Log: Make debug output produced by `setkey -x` command a more human readable. Add text names of SADB message types and extension headers to the output. Obtained from: Yandex LLC MFC after: 2 weeks Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D16036 Modified: head/sys/netipsec/key_debug.c Modified: head/sys/netipsec/key_debug.c ============================================================================== --- head/sys/netipsec/key_debug.c Fri Jun 29 12:41:36 2018 (r335794) +++ head/sys/netipsec/key_debug.c Fri Jun 29 13:59:33 2018 (r335795) @@ -85,6 +85,85 @@ static void kdebug_sadb_x_natt(struct sadb_ext *); /* NOTE: host byte order */ +const char* +kdebug_sadb_type(uint8_t type) +{ +#define SADB_NAME(n) case SADB_ ## n: return (#n) + + switch (type) { + SADB_NAME(RESERVED); + SADB_NAME(GETSPI); + SADB_NAME(UPDATE); + SADB_NAME(ADD); + SADB_NAME(DELETE); + SADB_NAME(GET); + SADB_NAME(ACQUIRE); + SADB_NAME(REGISTER); + SADB_NAME(EXPIRE); + SADB_NAME(FLUSH); + SADB_NAME(DUMP); + SADB_NAME(X_PROMISC); + SADB_NAME(X_PCHANGE); + SADB_NAME(X_SPDUPDATE); + SADB_NAME(X_SPDADD); + SADB_NAME(X_SPDDELETE); + SADB_NAME(X_SPDGET); + SADB_NAME(X_SPDACQUIRE); + SADB_NAME(X_SPDDUMP); + SADB_NAME(X_SPDFLUSH); + SADB_NAME(X_SPDSETIDX); + SADB_NAME(X_SPDEXPIRE); + SADB_NAME(X_SPDDELETE2); + default: + return ("UNKNOWN"); + } +#undef SADB_NAME +} + +const char* +kdebug_sadb_exttype(uint16_t type) +{ +#define EXT_NAME(n) case SADB_EXT_ ## n: return (#n) +#define X_NAME(n) case SADB_X_EXT_ ## n: return (#n) + + switch (type) { + EXT_NAME(RESERVED); + EXT_NAME(SA); + EXT_NAME(LIFETIME_CURRENT); + EXT_NAME(LIFETIME_HARD); + EXT_NAME(LIFETIME_SOFT); + EXT_NAME(ADDRESS_SRC); + EXT_NAME(ADDRESS_DST); + EXT_NAME(ADDRESS_PROXY); + EXT_NAME(KEY_AUTH); + EXT_NAME(KEY_ENCRYPT); + EXT_NAME(IDENTITY_SRC); + EXT_NAME(IDENTITY_DST); + EXT_NAME(SENSITIVITY); + EXT_NAME(PROPOSAL); + EXT_NAME(SUPPORTED_AUTH); + EXT_NAME(SUPPORTED_ENCRYPT); + EXT_NAME(SPIRANGE); + X_NAME(KMPRIVATE); + X_NAME(POLICY); + X_NAME(SA2); + X_NAME(NAT_T_TYPE); + X_NAME(NAT_T_SPORT); + X_NAME(NAT_T_DPORT); + X_NAME(NAT_T_OAI); + X_NAME(NAT_T_OAR); + X_NAME(NAT_T_FRAG); + X_NAME(SA_REPLAY); + X_NAME(NEW_ADDRESS_SRC); + X_NAME(NEW_ADDRESS_DST); + default: + return ("UNKNOWN"); + }; +#undef EXT_NAME +#undef X_NAME +} + + /* %%%: about struct sadb_msg */ void kdebug_sadb(struct sadb_msg *base) @@ -96,8 +175,9 @@ kdebug_sadb(struct sadb_msg *base) if (base == NULL) panic("%s: NULL pointer was passed.\n", __func__); - printf("sadb_msg{ version=%u type=%u errno=%u satype=%u\n", + printf("sadb_msg{ version=%u type=%u(%s) errno=%u satype=%u\n", base->sadb_msg_version, base->sadb_msg_type, + kdebug_sadb_type(base->sadb_msg_type), base->sadb_msg_errno, base->sadb_msg_satype); printf(" len=%u reserved=%u seq=%u pid=%u\n", base->sadb_msg_len, base->sadb_msg_reserved, @@ -107,8 +187,9 @@ kdebug_sadb(struct sadb_msg *base) ext = (struct sadb_ext *)((caddr_t)base + sizeof(struct sadb_msg)); while (tlen > 0) { - printf("sadb_ext{ len=%u type=%u }\n", - ext->sadb_ext_len, ext->sadb_ext_type); + printf("sadb_ext{ len=%u type=%u(%s) }\n", + ext->sadb_ext_len, ext->sadb_ext_type, + kdebug_sadb_exttype(ext->sadb_ext_type)); if (ext->sadb_ext_len == 0) { printf("%s: invalid ext_len=0 was passed.\n", __func__); From owner-svn-src-all@freebsd.org Fri Jun 29 14:51:37 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04FD7EF9AA3; Fri, 29 Jun 2018 14:51:37 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AEAFB8DFB0; Fri, 29 Jun 2018 14:51:36 +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 8FD7D22411; Fri, 29 Jun 2018 14:51:36 +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 w5TEpa6e023661; Fri, 29 Jun 2018 14:51:36 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5TEpaOJ023660; Fri, 29 Jun 2018 14:51:36 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201806291451.w5TEpaOJ023660@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 29 Jun 2018 14:51:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335796 - head/sys/netipsec X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/netipsec X-SVN-Commit-Revision: 335796 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.26 Precedence: list List-Id: "SVN commit messages 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, 29 Jun 2018 14:51:37 -0000 Author: emaste Date: Fri Jun 29 14:51:36 2018 New Revision: 335796 URL: https://svnweb.freebsd.org/changeset/base/335796 Log: r335795 build fix: make static functions static -Werror,-Wmissing-prototypes makes this an error otherwise. MFC with: 335795 Sponsored by: The FreeBSD Foundation Modified: head/sys/netipsec/key_debug.c Modified: head/sys/netipsec/key_debug.c ============================================================================== --- head/sys/netipsec/key_debug.c Fri Jun 29 13:59:33 2018 (r335795) +++ head/sys/netipsec/key_debug.c Fri Jun 29 14:51:36 2018 (r335796) @@ -85,7 +85,7 @@ static void kdebug_sadb_x_natt(struct sadb_ext *); /* NOTE: host byte order */ -const char* +static const char* kdebug_sadb_type(uint8_t type) { #define SADB_NAME(n) case SADB_ ## n: return (#n) @@ -120,7 +120,7 @@ kdebug_sadb_type(uint8_t type) #undef SADB_NAME } -const char* +static const char* kdebug_sadb_exttype(uint16_t type) { #define EXT_NAME(n) case SADB_EXT_ ## n: return (#n) From owner-svn-src-all@freebsd.org Fri Jun 29 16:07:58 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 785B4EFCC07; Fri, 29 Jun 2018 16:07:58 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 12C3D70A6F; Fri, 29 Jun 2018 16:07:58 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E22A823097; Fri, 29 Jun 2018 16:07:57 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5TG7vX6061886; Fri, 29 Jun 2018 16:07:57 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5TG7u1t061881; Fri, 29 Jun 2018 16:07:56 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201806291607.w5TG7u1t061881@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Fri, 29 Jun 2018 16:07:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335797 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 335797 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.26 Precedence: list List-Id: "SVN commit messages 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, 29 Jun 2018 16:07:58 -0000 Author: brooks Date: Fri Jun 29 16:07:56 2018 New Revision: 335797 URL: https://svnweb.freebsd.org/changeset/base/335797 Log: Correct link metadata created when installing with -DNO_ROOT. Explicitly specify owner/group/mode metadata when creating links. More consistently use INSTALL_SYMLINK to install symlinks. Reviewed by: bdrewery Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D11231 Modified: head/share/mk/bsd.README head/share/mk/bsd.lib.mk head/share/mk/bsd.man.mk head/share/mk/bsd.own.mk head/share/mk/bsd.prog.mk Modified: head/share/mk/bsd.README ============================================================================== --- head/share/mk/bsd.README Fri Jun 29 14:51:36 2018 (r335796) +++ head/share/mk/bsd.README Fri Jun 29 16:07:56 2018 (r335797) @@ -225,6 +225,24 @@ MANMODE Manual mode. MANOWN Manual owner. +INSTALL_LINK Command to install a hard link. + +INSTALL_SYMLINK Command to install a symbolic link. + +INSTALL_RSYMLINK Command to install a relative symbolic link. + +LINKOWN Owner of hard links created by INSTALL_LINK. + +LINKGRP Group of hard links created by INSTALL_LINK. + +LINKMODE Mode of hard links created by INSTALL_LINK. + +SYMLINKOWN Owner of hard links created by INSTALL_[R]SYMLINK. + +SYMLINKGRP Group of hard links created by INSTALL_[R]SYMLINK. + +SYMLINKMODE Mode of hard links created by INSTALL_[R]SYMLINK. + This file is generally useful when building your own Makefiles so that they use the same default owners etc. as the rest of the tree. @@ -320,6 +338,13 @@ LINKS The list of binary links; should be full pathna LINKS= /bin/test /bin/[ +LINKOWN Owner of links created with LINKS [${BINOWN}]. + +LINKGRP Group of links created with LINKS [${BINGRP}]. + +LINKMODE Mode of links created with LINKS [${BINMODE}]. + + MAN Manual pages. If no MAN variable is defined, "MAN=${PROG}.1" is assumed. See bsd.man.mk for more details. @@ -528,6 +553,21 @@ LIB_CXX The name of the library to build. It also cau of LIB if LIB is also set. Both a shared and static library will be built. NO_PIC can be set to only build a static library. + +LINKS The list of binary links; should be full pathnames, the + linked-to file coming first, followed by the linked + file. The files are hard-linked. For example, to link + /bin/test and /bin/[, use: + + LINKS= /bin/test /bin/[ + +LINKOWN Owner of links created with LINKS [${LIBOWN}]. + +LINKGRP Group of links created with LINKS [${LIBGRP}]. + +LINKMODE Mode of links created with LINKS [${LIBMODE}]. + +LINTLIBDIR Target directory for lint libraries. MAN The manual pages to be installed. See bsd.man.mk for more details. Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Fri Jun 29 14:51:36 2018 (r335796) +++ head/share/mk/bsd.lib.mk Fri Jun 29 16:07:56 2018 (r335797) @@ -275,7 +275,7 @@ ${SHLIB_NAME_FULL}: ${SOBJS} @${ECHO} building shared library ${SHLIB_NAME} @rm -f ${SHLIB_NAME} ${SHLIB_LINK} .if defined(SHLIB_LINK) && !commands(${SHLIB_LINK:R}.ld) && ${MK_DEBUG_FILES} == "no" - @${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},development} ${SHLIB_NAME} ${SHLIB_LINK} + @${INSTALL_LIBSYMLINK} ${TAG_ARGS:D${TAG_ARGS},development} ${SHLIB_NAME} ${SHLIB_LINK} .endif ${_LD:N${CCACHE_BIN}} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \ -o ${.TARGET} -Wl,-soname,${SONAME} \ @@ -291,7 +291,7 @@ ${SHLIB_NAME}: ${SHLIB_NAME_FULL} ${SHLIB_NAME}.debug ${OBJCOPY} --strip-debug --add-gnu-debuglink=${SHLIB_NAME}.debug \ ${SHLIB_NAME_FULL} ${.TARGET} .if defined(SHLIB_LINK) && !commands(${SHLIB_LINK:R}.ld) - @${INSTALL_SYMLINK} ${TAG_ARGS:D${TAG_ARGS},development} ${SHLIB_NAME} ${SHLIB_LINK} + @${INSTALL_LIBSYMLINK} ${TAG_ARGS:D${TAG_ARGS},development} ${SHLIB_NAME} ${SHLIB_LINK} .endif ${SHLIB_NAME}.debug: ${SHLIB_NAME_FULL} @@ -398,7 +398,7 @@ _libinstall: ${_INSTALLFLAGS} ${SHLIB_LINK:R}.ld \ ${DESTDIR}${_LIBDIR}/${SHLIB_LINK} .for _SHLIB_LINK_LINK in ${SHLIB_LDSCRIPT_LINKS} - ${INSTALL_SYMLINK} ${SHLIB_LINK} ${DESTDIR}${_LIBDIR}/${_SHLIB_LINK_LINK} + ${INSTALL_LIBSYMLINK} ${SHLIB_LINK} ${DESTDIR}${_LIBDIR}/${_SHLIB_LINK_LINK} .endfor .else .if ${_SHLIBDIR} == ${_LIBDIR} @@ -437,6 +437,11 @@ _libinstall: .include .endif +LINKOWN?= ${LIBOWN} +LINKGRP?= ${LIBGRP} +LINKMODE?= ${LIBMODE} +SYMLINKOWN?= ${LIBOWN} +SYMLINKGRP?= ${LIBGRP} .include .if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY) Modified: head/share/mk/bsd.man.mk ============================================================================== --- head/share/mk/bsd.man.mk Fri Jun 29 14:51:36 2018 (r335796) +++ head/share/mk/bsd.man.mk Fri Jun 29 16:07:56 2018 (r335797) @@ -227,7 +227,7 @@ maninstall: ${MAN} .endif .for l t in ${_MANLINKS} rm -f ${DESTDIR}${t} ${DESTDIR}${t}${MCOMPRESS_EXT}; \ - ${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}${l}${ZEXT} ${DESTDIR}${t}${ZEXT} + ${INSTALL_MANLINK} ${TAG_ARGS} ${DESTDIR}${l}${ZEXT} ${DESTDIR}${t}${ZEXT} .endfor manlint: Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Fri Jun 29 14:51:36 2018 (r335796) +++ head/share/mk/bsd.own.mk Fri Jun 29 16:07:56 2018 (r335797) @@ -124,6 +124,18 @@ # # PKG_CMD Program for creating and manipulating packages. # [pkg] +# +# LINKOWN Hard link owner [${BINOWN}] +# +# LINKGRP Hard link group [${BINGRP}] +# +# LINKMODE Hard link mode [${NOBINMODE}] +# +# SYMLINKOWN Symbolic link owner [${BINOWN} or ${LIBOWN}] +# +# SYMLINKGRP Symbolic link group [${BINGRP} or ${LIBGRP}] +# +# SYMLINKMODE Symbolic link mode [755] .if !target(____) ____: @@ -217,12 +229,22 @@ INCLUDEDIR?= /usr/include # # install(1) parameters. # -HRDLINK?= -l h -SYMLINK?= -l s -RSYMLINK?= -l rs +_LINKOWN?= ${LINKOWN:U${BINOWN}} +_LINKGRP?= ${LINKGRP:U${BINGRP}} +_LINKMODE?= ${LINKMODE:U${NOBINMODE}} +_SYMLINKOWN?= ${SYMLINKOWN:U${BINOWN}} +_SYMLINKGRP?= ${SYMLINKGRP:U${BINGRP}} +_SYMLINKMODE?= ${SYMLINKMODE:U755} +HRDLINK?= -l h -o ${_LINKOWN} -g ${_LINKGRP} -m ${_LINKMODE} +MANHRDLINK?= -l h -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} +SYMLINK?= -l s -o ${_SYMLINKOWN} -g ${_SYMLINKGRP} -m ${_SYMLINKMODE} +LSYMLINK?= -l s -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} +RSYMLINK?= -l rs -o ${_SYMLINKOWN} -g ${_SYMLINKGRP} -m ${_SYMLINKMODE} INSTALL_LINK?= ${INSTALL} ${HRDLINK} +INSTALL_MANLINK?= ${INSTALL} ${MANHRDLINK} INSTALL_SYMLINK?= ${INSTALL} ${SYMLINK} +INSTALL_LIBSYMLINK?= ${INSTALL} ${LSYMLINK} INSTALL_RSYMLINK?= ${INSTALL} ${RSYMLINK} # Common variables Modified: head/share/mk/bsd.prog.mk ============================================================================== --- head/share/mk/bsd.prog.mk Fri Jun 29 14:51:36 2018 (r335796) +++ head/share/mk/bsd.prog.mk Fri Jun 29 16:07:56 2018 (r335797) @@ -285,6 +285,10 @@ NLSNAME?= ${PROG} .include .include .include + +LINKOWN?= ${BINOWN} +LINKGRP?= ${BINGRP} +LINKMODE?= ${BINMODE} .include .if ${MK_MAN} != "no" From owner-svn-src-all@freebsd.org Fri Jun 29 16:46:20 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD367EFE220; Fri, 29 Jun 2018 16:46:20 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6A81772015; Fri, 29 Jun 2018 16:46:20 +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 40D9D23707; Fri, 29 Jun 2018 16:46:20 +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 w5TGkKYE082675; Fri, 29 Jun 2018 16:46:20 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5TGkJ6N082672; Fri, 29 Jun 2018 16:46:19 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201806291646.w5TGkJ6N082672@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Fri, 29 Jun 2018 16:46: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: r335798 - in stable/11: sbin/pfctl share/man/man5 sys/netpfil/pf X-SVN-Group: stable-11 X-SVN-Commit-Author: kp X-SVN-Commit-Paths: in stable/11: sbin/pfctl share/man/man5 sys/netpfil/pf X-SVN-Commit-Revision: 335798 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.26 Precedence: list List-Id: "SVN commit messages 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, 29 Jun 2018 16:46:21 -0000 Author: kp Date: Fri Jun 29 16:46:19 2018 New Revision: 335798 URL: https://svnweb.freebsd.org/changeset/base/335798 Log: MFC r335569: pf: Support "return" statements in passing rules when they fail. Normally pf rules are expected to do one of two things: pass the traffic or block it. Blocking can be silent - "drop", or loud - "return", "return-rst", "return-icmp". Yet there is a 3rd category of traffic passing through pf: Packets matching a "pass" rule but when applying the rule fails. This happens when redirection table is empty or when src node or state creation fails. Such rules always fail silently without notifying the sender. Allow users to configure this behaviour too, so that pf returns an error packet in these cases. PR: 226850 Submitted by: Kajetan Staszkiewicz Sponsored by: InnoGames GmbH Modified: stable/11/sbin/pfctl/parse.y stable/11/share/man/man5/pf.conf.5 stable/11/sys/netpfil/pf/pf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/pfctl/parse.y ============================================================================== --- stable/11/sbin/pfctl/parse.y Fri Jun 29 16:07:56 2018 (r335797) +++ stable/11/sbin/pfctl/parse.y Fri Jun 29 16:46:19 2018 (r335798) @@ -79,6 +79,7 @@ static u_int16_t returnicmpdefault = static u_int16_t returnicmp6default = (ICMP6_DST_UNREACH << 8) | ICMP6_DST_UNREACH_NOPORT; static int blockpolicy = PFRULE_DROP; +static int failpolicy = PFRULE_DROP; static int require_order = 1; static int default_statelock; @@ -453,8 +454,8 @@ int parseport(char *, struct range *r, int); %token MINTTL ERROR ALLOWOPTS FASTROUTE FILENAME ROUTETO DUPTO REPLYTO NO LABEL %token NOROUTE URPFFAILED FRAGMENT USER GROUP MAXMSS MAXIMUM TTL TOS DROP TABLE %token REASSEMBLE FRAGDROP FRAGCROP ANCHOR NATANCHOR RDRANCHOR BINATANCHOR -%token SET OPTIMIZATION TIMEOUT LIMIT LOGINTERFACE BLOCKPOLICY RANDOMID -%token REQUIREORDER SYNPROXY FINGERPRINTS NOSYNC DEBUG SKIP HOSTID +%token SET OPTIMIZATION TIMEOUT LIMIT LOGINTERFACE BLOCKPOLICY FAILPOLICY +%token RANDOMID REQUIREORDER SYNPROXY FINGERPRINTS NOSYNC DEBUG SKIP HOSTID %token ANTISPOOF FOR INCLUDE %token BITMASK RANDOM SOURCEHASH ROUNDROBIN STATICPORT PROBABILITY %token ALTQ CBQ CODEL PRIQ HFSC FAIRQ BANDWIDTH TBRSIZE LINKSHARE REALTIME @@ -638,6 +639,20 @@ option : SET OPTIMIZATION STRING { YYERROR; blockpolicy = PFRULE_RETURN; } + | SET FAILPOLICY DROP { + if (pf->opts & PF_OPT_VERBOSE) + printf("set fail-policy drop\n"); + if (check_rulestate(PFCTL_STATE_OPTION)) + YYERROR; + failpolicy = PFRULE_DROP; + } + | SET FAILPOLICY RETURN { + if (pf->opts & PF_OPT_VERBOSE) + printf("set fail-policy return\n"); + if (check_rulestate(PFCTL_STATE_OPTION)) + YYERROR; + failpolicy = PFRULE_RETURN; + } | SET REQUIREORDER yesno { if (pf->opts & PF_OPT_VERBOSE) printf("set require-order %s\n", @@ -2634,7 +2649,12 @@ probability : STRING { ; -action : PASS { $$.b1 = PF_PASS; $$.b2 = $$.w = 0; } +action : PASS { + $$.b1 = PF_PASS; + $$.b2 = failpolicy; + $$.w = returnicmpdefault; + $$.w2 = returnicmp6default; + } | BLOCK blockspec { $$ = $2; $$.b1 = PF_DROP; } ; @@ -5466,6 +5486,7 @@ lookup(char *s) { "drop", DROP}, { "drop-ovl", FRAGDROP}, { "dup-to", DUPTO}, + { "fail-policy", FAILPOLICY}, { "fairq", FAIRQ}, { "fastroute", FASTROUTE}, { "file", FILENAME}, @@ -5930,6 +5951,7 @@ parse_config(char *filename, struct pfctl *xpf) returnicmp6default = (ICMP6_DST_UNREACH << 8) | ICMP6_DST_UNREACH_NOPORT; blockpolicy = PFRULE_DROP; + failpolicy = PFRULE_DROP; require_order = 1; if ((file = pushfile(filename, 0)) == NULL) { Modified: stable/11/share/man/man5/pf.conf.5 ============================================================================== --- stable/11/share/man/man5/pf.conf.5 Fri Jun 29 16:07:56 2018 (r335797) +++ stable/11/share/man/man5/pf.conf.5 Fri Jun 29 16:46:19 2018 (r335798) @@ -498,6 +498,31 @@ For example: .Bd -literal -offset indent set block-policy return .Ed + +.It Ar set fail-policy +The +.Ar fail-policy +option sets the behaviour of rules which should pass a packet but were unable to +do so. This might happen when a nat or route-to rule uses an empty table as list +of targets or if a rule fails to create state or source node. +The following +.Ar block +actions are possible: +.Pp +.Bl -tag -width xxxxxxxx -compact +.It Ar drop +Incoming packet is silently dropped. +.It Ar return +Incoming packet is dropped and TCP RST is returned for TCP packets, +an ICMP UNREACHABLE is returned for UDP packets, +and no response is sent for other packets. +.El +.Pp +For example: +.Bd -literal -offset indent +set fail-policy return +.Ed + .It Ar set state-policy The .Ar state-policy Modified: stable/11/sys/netpfil/pf/pf.c ============================================================================== --- stable/11/sys/netpfil/pf/pf.c Fri Jun 29 16:07:56 2018 (r335797) +++ stable/11/sys/netpfil/pf/pf.c Fri Jun 29 16:46:19 2018 (r335798) @@ -2485,6 +2485,81 @@ pf_send_tcp(struct mbuf *replyto, const struct pf_rule pf_send(pfse); } +static void +pf_return(struct pf_rule *r, struct pf_rule *nr, struct pf_pdesc *pd, + struct pf_state_key *sk, int off, struct mbuf *m, struct tcphdr *th, + struct pfi_kif *kif, u_int16_t bproto_sum, u_int16_t bip_sum, int hdrlen, + u_short *reason) +{ + struct pf_addr * const saddr = pd->src; + struct pf_addr * const daddr = pd->dst; + sa_family_t af = pd->af; + + /* undo NAT changes, if they have taken place */ + if (nr != NULL) { + PF_ACPY(saddr, &sk->addr[pd->sidx], af); + PF_ACPY(daddr, &sk->addr[pd->didx], af); + if (pd->sport) + *pd->sport = sk->port[pd->sidx]; + if (pd->dport) + *pd->dport = sk->port[pd->didx]; + if (pd->proto_sum) + *pd->proto_sum = bproto_sum; + if (pd->ip_sum) + *pd->ip_sum = bip_sum; + m_copyback(m, off, hdrlen, pd->hdr.any); + } + if (pd->proto == IPPROTO_TCP && + ((r->rule_flag & PFRULE_RETURNRST) || + (r->rule_flag & PFRULE_RETURN)) && + !(th->th_flags & TH_RST)) { + u_int32_t ack = ntohl(th->th_seq) + pd->p_len; + int len = 0; +#ifdef INET + struct ip *h4; +#endif +#ifdef INET6 + struct ip6_hdr *h6; +#endif + + switch (af) { +#ifdef INET + case AF_INET: + h4 = mtod(m, struct ip *); + len = ntohs(h4->ip_len) - off; + break; +#endif +#ifdef INET6 + case AF_INET6: + h6 = mtod(m, struct ip6_hdr *); + len = ntohs(h6->ip6_plen) - (off - sizeof(*h6)); + break; +#endif + } + + if (pf_check_proto_cksum(m, off, len, IPPROTO_TCP, af)) + REASON_SET(reason, PFRES_PROTCKSUM); + else { + if (th->th_flags & TH_SYN) + ack++; + if (th->th_flags & TH_FIN) + ack++; + pf_send_tcp(m, r, af, pd->dst, + pd->src, th->th_dport, th->th_sport, + ntohl(th->th_ack), ack, TH_RST|TH_ACK, 0, 0, + r->return_ttl, 1, 0, kif->pfik_ifp); + } + } else if (pd->proto != IPPROTO_ICMP && af == AF_INET && + r->return_icmp) + pf_send_icmp(m, r->return_icmp >> 8, + r->return_icmp & 255, af, r); + else if (pd->proto != IPPROTO_ICMPV6 && af == AF_INET6 && + r->return_icmp6) + pf_send_icmp(m, r->return_icmp6 >> 8, + r->return_icmp6 & 255, af, r); +} + + static int pf_ieee8021q_setpcp(struct mbuf *m, u_int8_t prio) { @@ -3449,68 +3524,8 @@ pf_test_rule(struct pf_rule **rm, struct pf_state **sm ((r->rule_flag & PFRULE_RETURNRST) || (r->rule_flag & PFRULE_RETURNICMP) || (r->rule_flag & PFRULE_RETURN))) { - /* undo NAT changes, if they have taken place */ - if (nr != NULL) { - PF_ACPY(saddr, &sk->addr[pd->sidx], af); - PF_ACPY(daddr, &sk->addr[pd->didx], af); - if (pd->sport) - *pd->sport = sk->port[pd->sidx]; - if (pd->dport) - *pd->dport = sk->port[pd->didx]; - if (pd->proto_sum) - *pd->proto_sum = bproto_sum; - if (pd->ip_sum) - *pd->ip_sum = bip_sum; - m_copyback(m, off, hdrlen, pd->hdr.any); - } - if (pd->proto == IPPROTO_TCP && - ((r->rule_flag & PFRULE_RETURNRST) || - (r->rule_flag & PFRULE_RETURN)) && - !(th->th_flags & TH_RST)) { - u_int32_t ack = ntohl(th->th_seq) + pd->p_len; - int len = 0; -#ifdef INET - struct ip *h4; -#endif -#ifdef INET6 - struct ip6_hdr *h6; -#endif - - switch (af) { -#ifdef INET - case AF_INET: - h4 = mtod(m, struct ip *); - len = ntohs(h4->ip_len) - off; - break; -#endif -#ifdef INET6 - case AF_INET6: - h6 = mtod(m, struct ip6_hdr *); - len = ntohs(h6->ip6_plen) - (off - sizeof(*h6)); - break; -#endif - } - - if (pf_check_proto_cksum(m, off, len, IPPROTO_TCP, af)) - REASON_SET(&reason, PFRES_PROTCKSUM); - else { - if (th->th_flags & TH_SYN) - ack++; - if (th->th_flags & TH_FIN) - ack++; - pf_send_tcp(m, r, af, pd->dst, - pd->src, th->th_dport, th->th_sport, - ntohl(th->th_ack), ack, TH_RST|TH_ACK, 0, 0, - r->return_ttl, 1, 0, kif->pfik_ifp); - } - } else if (pd->proto != IPPROTO_ICMP && af == AF_INET && - r->return_icmp) - pf_send_icmp(m, r->return_icmp >> 8, - r->return_icmp & 255, af, r); - else if (pd->proto != IPPROTO_ICMPV6 && af == AF_INET6 && - r->return_icmp6) - pf_send_icmp(m, r->return_icmp6 >> 8, - r->return_icmp6 & 255, af, r); + pf_return(r, nr, pd, sk, off, m, th, kif, bproto_sum, + bip_sum, hdrlen, &reason); } if (r->action == PF_DROP) @@ -3529,8 +3544,11 @@ pf_test_rule(struct pf_rule **rm, struct pf_state **sm action = pf_create_state(r, nr, a, pd, nsn, nk, sk, m, off, sport, dport, &rewrite, kif, sm, tag, bproto_sum, bip_sum, hdrlen); - if (action != PF_PASS) + if (action != PF_PASS && r->rule_flag & PFRULE_RETURN) { + pf_return(r, nr, pd, sk, off, m, th, kif, + bproto_sum, bip_sum, hdrlen, &reason); return (action); + } } else { if (sk != NULL) uma_zfree(V_pf_state_key_z, sk); From owner-svn-src-all@freebsd.org Fri Jun 29 17:51:44 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3FBA3F723DA; Fri, 29 Jun 2018 17:51:44 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D6D3C7488F; Fri, 29 Jun 2018 17:51:43 +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 B91BD240E2; Fri, 29 Jun 2018 17:51:43 +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 w5THphAJ019969; Fri, 29 Jun 2018 17:51:43 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5THpaWX019926; Fri, 29 Jun 2018 17:51:36 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201806291751.w5THpaWX019926@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 29 Jun 2018 17:51:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335799 - in head: contrib/compiler-rt/lib/sanitizer_common contrib/libc++/include contrib/libc++/src/support/runtime contrib/llvm/include/llvm/CodeGen contrib/llvm/include/llvm/IR cont... X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head: contrib/compiler-rt/lib/sanitizer_common contrib/libc++/include contrib/libc++/src/support/runtime contrib/llvm/include/llvm/CodeGen contrib/llvm/include/llvm/IR contrib/llvm/lib/Analysis con... X-SVN-Commit-Revision: 335799 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.26 Precedence: list List-Id: "SVN commit messages 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, 29 Jun 2018 17:51:44 -0000 Author: dim Date: Fri Jun 29 17:51:35 2018 New Revision: 335799 URL: https://svnweb.freebsd.org/changeset/base/335799 Log: Upgrade our copies of clang, llvm, lld, lldb, compiler-rt and libc++ to 6.0.1 release (upstream r335540). Relnotes: yes MFC after: 2 weeks Modified: head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc head/contrib/libc++/include/list head/contrib/libc++/src/support/runtime/exception_libcxxabi.ipp head/contrib/llvm/include/llvm/CodeGen/TargetInstrInfo.h head/contrib/llvm/include/llvm/IR/IntrinsicsPowerPC.td head/contrib/llvm/lib/Analysis/GlobalsModRef.cpp head/contrib/llvm/lib/Analysis/MemorySSA.cpp head/contrib/llvm/lib/CodeGen/IfConversion.cpp head/contrib/llvm/lib/CodeGen/LiveDebugVariables.cpp head/contrib/llvm/lib/CodeGen/MachineBlockPlacement.cpp head/contrib/llvm/lib/CodeGen/PeepholeOptimizer.cpp head/contrib/llvm/lib/CodeGen/TargetInstrInfo.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp head/contrib/llvm/lib/IR/Core.cpp head/contrib/llvm/lib/MC/MCObjectFileInfo.cpp head/contrib/llvm/lib/Support/Host.cpp head/contrib/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp head/contrib/llvm/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp head/contrib/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.td head/contrib/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp head/contrib/llvm/lib/Target/AMDGPU/SIISelLowering.cpp head/contrib/llvm/lib/Target/AMDGPU/SIInstructions.td head/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMComputeBlockSize.cpp head/contrib/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp head/contrib/llvm/lib/Target/Mips/MicroMips32r6InstrInfo.td head/contrib/llvm/lib/Target/Mips/MicroMipsInstrInfo.td head/contrib/llvm/lib/Target/Mips/Mips.td head/contrib/llvm/lib/Target/Mips/Mips32r6InstrInfo.td head/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td head/contrib/llvm/lib/Target/Mips/Mips64r6InstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsDSPInstrFormats.td head/contrib/llvm/lib/Target/Mips/MipsFastISel.cpp head/contrib/llvm/lib/Target/Mips/MipsISelLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsInstrFormats.td head/contrib/llvm/lib/Target/Mips/MipsInstrInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsLongBranch.cpp head/contrib/llvm/lib/Target/Mips/MipsSEISelLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsSubtarget.cpp head/contrib/llvm/lib/Target/Mips/MipsSubtarget.h head/contrib/llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp head/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp head/contrib/llvm/lib/Target/X86/X86DomainReassignment.cpp head/contrib/llvm/lib/Target/X86/X86FastISel.cpp head/contrib/llvm/lib/Target/X86/X86FlagsCopyLowering.cpp head/contrib/llvm/lib/Target/X86/X86InstrArithmetic.td head/contrib/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp head/contrib/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp head/contrib/llvm/lib/Transforms/IPO/GlobalOpt.cpp head/contrib/llvm/lib/Transforms/IPO/MergeFunctions.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp head/contrib/llvm/lib/Transforms/Scalar/CallSiteSplitting.cpp head/contrib/llvm/lib/Transforms/Scalar/DivRemPairs.cpp head/contrib/llvm/lib/Transforms/Scalar/JumpThreading.cpp head/contrib/llvm/lib/Transforms/Scalar/SCCP.cpp head/contrib/llvm/lib/Transforms/Utils/FunctionComparator.cpp head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticDriverKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td head/contrib/llvm/tools/clang/include/clang/Driver/CLCompatOptions.td head/contrib/llvm/tools/clang/include/clang/Driver/Options.td head/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp head/contrib/llvm/tools/clang/lib/AST/RecordLayoutBuilder.cpp head/contrib/llvm/tools/clang/lib/Basic/Targets/AArch64.cpp head/contrib/llvm/tools/clang/lib/Basic/Targets/Mips.h head/contrib/llvm/tools/clang/lib/Basic/Version.cpp head/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp head/contrib/llvm/tools/clang/lib/Driver/Driver.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/Mips.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Arch/Mips.h head/contrib/llvm/tools/clang/lib/Driver/ToolChains/Clang.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains/CrossWindows.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains/MinGW.cpp head/contrib/llvm/tools/clang/lib/Frontend/ASTUnit.cpp head/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp head/contrib/llvm/tools/clang/lib/Headers/avx512vlbitalgintrin.h head/contrib/llvm/tools/clang/lib/Headers/avx512vlvbmi2intrin.h head/contrib/llvm/tools/clang/lib/Headers/avx512vlvnniintrin.h head/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp head/contrib/llvm/tools/clang/tools/driver/driver.cpp head/contrib/llvm/tools/lld/COFF/Config.h head/contrib/llvm/tools/lld/COFF/Driver.cpp head/contrib/llvm/tools/lld/COFF/DriverUtils.cpp head/contrib/llvm/tools/lld/COFF/Options.td head/contrib/llvm/tools/lld/ELF/Arch/Mips.cpp head/contrib/llvm/tools/lld/ELF/Config.h head/contrib/llvm/tools/lld/ELF/Driver.cpp head/lib/clang/freebsd_cc_version.h head/lib/clang/include/clang/Basic/Version.inc head/lib/clang/include/lld/Common/Version.inc head/lib/clang/include/llvm/Support/VCSRevision.h Directory Properties: head/contrib/compiler-rt/ (props changed) head/contrib/libc++/ (props changed) head/contrib/llvm/ (props changed) head/contrib/llvm/tools/clang/ (props changed) head/contrib/llvm/tools/lld/ (props changed) head/contrib/llvm/tools/lldb/ (props changed) Modified: head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc ============================================================================== --- head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc Fri Jun 29 17:51:35 2018 (r335799) @@ -159,7 +159,6 @@ typedef struct user_fpregs elf_fpregset_t; # include #endif #include -#include #include #include #include @@ -253,7 +252,19 @@ namespace __sanitizer { #endif // SANITIZER_LINUX || SANITIZER_FREEBSD #if SANITIZER_LINUX && !SANITIZER_ANDROID - unsigned struct_ustat_sz = sizeof(struct ustat); + // Use pre-computed size of struct ustat to avoid which + // has been removed from glibc 2.28. +#if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \ + || defined(__powerpc64__) || defined(__arch64__) || defined(__sparcv9) \ + || defined(__x86_64__) +#define SIZEOF_STRUCT_USTAT 32 +#elif defined(__arm__) || defined(__i386__) || defined(__mips__) \ + || defined(__powerpc__) || defined(__s390__) +#define SIZEOF_STRUCT_USTAT 20 +#else +#error Unknown size of struct ustat +#endif + unsigned struct_ustat_sz = SIZEOF_STRUCT_USTAT; unsigned struct_rlimit64_sz = sizeof(struct rlimit64); unsigned struct_statvfs64_sz = sizeof(struct statvfs64); #endif // SANITIZER_LINUX && !SANITIZER_ANDROID Modified: head/contrib/libc++/include/list ============================================================================== --- head/contrib/libc++/include/list Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/libc++/include/list Fri Jun 29 17:51:35 2018 (r335799) @@ -2058,15 +2058,15 @@ list<_Tp, _Alloc>::splice(const_iterator __p, list& __ #endif if (__f != __l) { + __link_pointer __first = __f.__ptr_; + --__l; + __link_pointer __last = __l.__ptr_; if (this != &__c) { - size_type __s = _VSTD::distance(__f, __l); + size_type __s = _VSTD::distance(__f, __l) + 1; __c.__sz() -= __s; base::__sz() += __s; } - __link_pointer __first = __f.__ptr_; - --__l; - __link_pointer __last = __l.__ptr_; base::__unlink_nodes(__first, __last); __link_nodes(__p.__ptr_, __first, __last); #if _LIBCPP_DEBUG_LEVEL >= 2 Modified: head/contrib/libc++/src/support/runtime/exception_libcxxabi.ipp ============================================================================== --- head/contrib/libc++/src/support/runtime/exception_libcxxabi.ipp Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/libc++/src/support/runtime/exception_libcxxabi.ipp Fri Jun 29 17:51:35 2018 (r335799) @@ -18,7 +18,7 @@ bool uncaught_exception() _NOEXCEPT { return uncaught_ int uncaught_exceptions() _NOEXCEPT { -# if _LIBCPPABI_VERSION > 1101 +# if _LIBCPPABI_VERSION > 1001 return __cxa_uncaught_exceptions(); # else return __cxa_uncaught_exception() ? 1 : 0; Modified: head/contrib/llvm/include/llvm/CodeGen/TargetInstrInfo.h ============================================================================== --- head/contrib/llvm/include/llvm/CodeGen/TargetInstrInfo.h Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/llvm/include/llvm/CodeGen/TargetInstrInfo.h Fri Jun 29 17:51:35 2018 (r335799) @@ -421,7 +421,8 @@ class TargetInstrInfo : public MCInstrInfo { (public) /// Build the equivalent inputs of a REG_SEQUENCE for the given \p MI /// and \p DefIdx. /// \p [out] InputRegs of the equivalent REG_SEQUENCE. Each element of - /// the list is modeled as . + /// the list is modeled as . Operands with the undef + /// flag are not added to this list. /// E.g., REG_SEQUENCE %1:sub1, sub0, %2, sub1 would produce /// two elements: /// - %1:sub1, sub0 @@ -446,7 +447,8 @@ class TargetInstrInfo : public MCInstrInfo { (public) /// - %1:sub1, sub0 /// /// \returns true if it is possible to build such an input sequence - /// with the pair \p MI, \p DefIdx. False otherwise. + /// with the pair \p MI, \p DefIdx and the operand has no undef flag set. + /// False otherwise. /// /// \pre MI.isExtractSubreg() or MI.isExtractSubregLike(). /// @@ -465,7 +467,8 @@ class TargetInstrInfo : public MCInstrInfo { (public) /// - InsertedReg: %1:sub1, sub3 /// /// \returns true if it is possible to build such an input sequence - /// with the pair \p MI, \p DefIdx. False otherwise. + /// with the pair \p MI, \p DefIdx and the operand has no undef flag set. + /// False otherwise. /// /// \pre MI.isInsertSubreg() or MI.isInsertSubregLike(). /// Modified: head/contrib/llvm/include/llvm/IR/IntrinsicsPowerPC.td ============================================================================== --- head/contrib/llvm/include/llvm/IR/IntrinsicsPowerPC.td Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/llvm/include/llvm/IR/IntrinsicsPowerPC.td Fri Jun 29 17:51:35 2018 (r335799) @@ -36,8 +36,12 @@ let TargetPrefix = "ppc" in { // All intrinsics start // Intrinsics used to generate ctr-based loops. These should only be // generated by the PowerPC backend! + // The branch intrinsic is marked as NoDuplicate because loop rotation will + // attempt to duplicate it forming loops where a block reachable from one + // instance of it can contain another. def int_ppc_mtctr : Intrinsic<[], [llvm_anyint_ty], []>; - def int_ppc_is_decremented_ctr_nonzero : Intrinsic<[llvm_i1_ty], [], []>; + def int_ppc_is_decremented_ctr_nonzero : + Intrinsic<[llvm_i1_ty], [], [IntrNoDuplicate]>; // Intrinsics for [double]word extended forms of divide instructions def int_ppc_divwe : GCCBuiltin<"__builtin_divwe">, Modified: head/contrib/llvm/lib/Analysis/GlobalsModRef.cpp ============================================================================== --- head/contrib/llvm/lib/Analysis/GlobalsModRef.cpp Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/llvm/lib/Analysis/GlobalsModRef.cpp Fri Jun 29 17:51:35 2018 (r335799) @@ -502,6 +502,8 @@ void GlobalsAAResult::AnalyzeCallGraph(CallGraph &CG, } FunctionInfo &FI = FunctionInfos[F]; + Handles.emplace_front(*this, F); + Handles.front().I = Handles.begin(); bool KnowNothing = false; // Collect the mod/ref properties due to called functions. We only compute Modified: head/contrib/llvm/lib/Analysis/MemorySSA.cpp ============================================================================== --- head/contrib/llvm/lib/Analysis/MemorySSA.cpp Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/llvm/lib/Analysis/MemorySSA.cpp Fri Jun 29 17:51:35 2018 (r335799) @@ -153,9 +153,14 @@ class MemoryLocOrCall { (public) if (IsCall != Other.IsCall) return false; - if (IsCall) - return CS.getCalledValue() == Other.CS.getCalledValue(); - return Loc == Other.Loc; + if (!IsCall) + return Loc == Other.Loc; + + if (CS.getCalledValue() != Other.CS.getCalledValue()) + return false; + + return CS.arg_size() == Other.CS.arg_size() && + std::equal(CS.arg_begin(), CS.arg_end(), Other.CS.arg_begin()); } private: @@ -179,12 +184,18 @@ template <> struct DenseMapInfo { } static unsigned getHashValue(const MemoryLocOrCall &MLOC) { - if (MLOC.IsCall) - return hash_combine(MLOC.IsCall, - DenseMapInfo::getHashValue( - MLOC.getCS().getCalledValue())); - return hash_combine( - MLOC.IsCall, DenseMapInfo::getHashValue(MLOC.getLoc())); + if (!MLOC.IsCall) + return hash_combine( + MLOC.IsCall, + DenseMapInfo::getHashValue(MLOC.getLoc())); + + hash_code hash = + hash_combine(MLOC.IsCall, DenseMapInfo::getHashValue( + MLOC.getCS().getCalledValue())); + + for (const Value *Arg : MLOC.getCS().args()) + hash = hash_combine(hash, DenseMapInfo::getHashValue(Arg)); + return hash; } static bool isEqual(const MemoryLocOrCall &LHS, const MemoryLocOrCall &RHS) { Modified: head/contrib/llvm/lib/CodeGen/IfConversion.cpp ============================================================================== --- head/contrib/llvm/lib/CodeGen/IfConversion.cpp Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/llvm/lib/CodeGen/IfConversion.cpp Fri Jun 29 17:51:35 2018 (r335799) @@ -1714,20 +1714,25 @@ bool IfConverter::IfConvertDiamondCommon( } // Remove the duplicated instructions at the beginnings of both paths. - // Skip dbg_value instructions + // Skip dbg_value instructions. MachineBasicBlock::iterator DI1 = MBB1.getFirstNonDebugInstr(); MachineBasicBlock::iterator DI2 = MBB2.getFirstNonDebugInstr(); BBI1->NonPredSize -= NumDups1; BBI2->NonPredSize -= NumDups1; // Skip past the dups on each side separately since there may be - // differing dbg_value entries. + // differing dbg_value entries. NumDups1 can include a "return" + // instruction, if it's not marked as "branch". for (unsigned i = 0; i < NumDups1; ++DI1) { + if (DI1 == MBB1.end()) + break; if (!DI1->isDebugValue()) ++i; } while (NumDups1 != 0) { ++DI2; + if (DI2 == MBB2.end()) + break; if (!DI2->isDebugValue()) --NumDups1; } @@ -1738,11 +1743,16 @@ bool IfConverter::IfConvertDiamondCommon( Redefs.stepForward(MI, Dummy); } } + BBI.BB->splice(BBI.BB->end(), &MBB1, MBB1.begin(), DI1); MBB2.erase(MBB2.begin(), DI2); - // The branches have been checked to match, so it is safe to remove the branch - // in BB1 and rely on the copy in BB2 + // The branches have been checked to match, so it is safe to remove the + // branch in BB1 and rely on the copy in BB2. The complication is that + // the blocks may end with a return instruction, which may or may not + // be marked as "branch". If it's not, then it could be included in + // "dups1", leaving the blocks potentially empty after moving the common + // duplicates. #ifndef NDEBUG // Unanalyzable branches must match exactly. Check that now. if (!BBI1->IsBrAnalyzable) @@ -1768,11 +1778,14 @@ bool IfConverter::IfConvertDiamondCommon( if (RemoveBranch) BBI2->NonPredSize -= TII->removeBranch(*BBI2->BB); else { - do { - assert(DI2 != MBB2.begin()); - DI2--; - } while (DI2->isBranch() || DI2->isDebugValue()); - DI2++; + // Make DI2 point to the end of the range where the common "tail" + // instructions could be found. + while (DI2 != MBB2.begin()) { + MachineBasicBlock::iterator Prev = std::prev(DI2); + if (!Prev->isBranch() && !Prev->isDebugValue()) + break; + DI2 = Prev; + } } while (NumDups2 != 0) { // NumDups2 only counted non-dbg_value instructions, so this won't @@ -1833,11 +1846,15 @@ bool IfConverter::IfConvertDiamondCommon( // a non-predicated in BBI2, then we don't want to predicate the one from // BBI2. The reason is that if we merged these blocks, we would end up with // two predicated terminators in the same block. + // Also, if the branches in MBB1 and MBB2 were non-analyzable, then don't + // predicate them either. They were checked to be identical, and so the + // same branch would happen regardless of which path was taken. if (!MBB2.empty() && (DI2 == MBB2.end())) { MachineBasicBlock::iterator BBI1T = MBB1.getFirstTerminator(); MachineBasicBlock::iterator BBI2T = MBB2.getFirstTerminator(); - if (BBI1T != MBB1.end() && TII->isPredicated(*BBI1T) && - BBI2T != MBB2.end() && !TII->isPredicated(*BBI2T)) + bool BB1Predicated = BBI1T != MBB1.end() && TII->isPredicated(*BBI1T); + bool BB2NonPredicated = BBI2T != MBB2.end() && !TII->isPredicated(*BBI2T); + if (BB2NonPredicated && (BB1Predicated || !BBI2->IsBrAnalyzable)) --DI2; } Modified: head/contrib/llvm/lib/CodeGen/LiveDebugVariables.cpp ============================================================================== --- head/contrib/llvm/lib/CodeGen/LiveDebugVariables.cpp Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/llvm/lib/CodeGen/LiveDebugVariables.cpp Fri Jun 29 17:51:35 2018 (r335799) @@ -514,6 +514,39 @@ bool LDVImpl::handleDebugValue(MachineInstr &MI, SlotI return false; } + // Detect invalid DBG_VALUE instructions, with a debug-use of a virtual + // register that hasn't been defined yet. If we do not remove those here, then + // the re-insertion of the DBG_VALUE instruction after register allocation + // will be incorrect. + // TODO: If earlier passes are corrected to generate sane debug information + // (and if the machine verifier is improved to catch this), then these checks + // could be removed or replaced by asserts. + bool Discard = false; + if (MI.getOperand(0).isReg() && + TargetRegisterInfo::isVirtualRegister(MI.getOperand(0).getReg())) { + const unsigned Reg = MI.getOperand(0).getReg(); + if (!LIS->hasInterval(Reg)) { + // The DBG_VALUE is described by a virtual register that does not have a + // live interval. Discard the DBG_VALUE. + Discard = true; + DEBUG(dbgs() << "Discarding debug info (no LIS interval): " + << Idx << " " << MI); + } else { + // The DBG_VALUE is only valid if either Reg is live out from Idx, or Reg + // is defined dead at Idx (where Idx is the slot index for the instruction + // preceeding the DBG_VALUE). + const LiveInterval &LI = LIS->getInterval(Reg); + LiveQueryResult LRQ = LI.Query(Idx); + if (!LRQ.valueOutOrDead()) { + // We have found a DBG_VALUE with the value in a virtual register that + // is not live. Discard the DBG_VALUE. + Discard = true; + DEBUG(dbgs() << "Discarding debug info (reg not live): " + << Idx << " " << MI); + } + } + } + // Get or create the UserValue for (variable,offset) here. bool IsIndirect = MI.getOperand(1).isImm(); if (IsIndirect) @@ -522,7 +555,13 @@ bool LDVImpl::handleDebugValue(MachineInstr &MI, SlotI const DIExpression *Expr = MI.getDebugExpression(); UserValue *UV = getUserValue(Var, Expr, MI.getDebugLoc()); - UV->addDef(Idx, MI.getOperand(0), IsIndirect); + if (!Discard) + UV->addDef(Idx, MI.getOperand(0), IsIndirect); + else { + MachineOperand MO = MachineOperand::CreateReg(0U, false); + MO.setIsDebug(); + UV->addDef(Idx, MO, false); + } return true; } Modified: head/contrib/llvm/lib/CodeGen/MachineBlockPlacement.cpp ============================================================================== --- head/contrib/llvm/lib/CodeGen/MachineBlockPlacement.cpp Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/llvm/lib/CodeGen/MachineBlockPlacement.cpp Fri Jun 29 17:51:35 2018 (r335799) @@ -513,6 +513,11 @@ class MachineBlockPlacement : public MachineFunctionPa bool runOnMachineFunction(MachineFunction &F) override; + bool allowTailDupPlacement() const { + assert(F); + return TailDupPlacement && !F->getTarget().requiresStructuredCFG(); + } + void getAnalysisUsage(AnalysisUsage &AU) const override { AU.addRequired(); AU.addRequired(); @@ -1018,7 +1023,7 @@ MachineBlockPlacement::getBestTrellisSuccessor( MachineBasicBlock *Succ1 = BestA.Dest; MachineBasicBlock *Succ2 = BestB.Dest; // Check to see if tail-duplication would be profitable. - if (TailDupPlacement && shouldTailDuplicate(Succ2) && + if (allowTailDupPlacement() && shouldTailDuplicate(Succ2) && canTailDuplicateUnplacedPreds(BB, Succ2, Chain, BlockFilter) && isProfitableToTailDup(BB, Succ2, MBPI->getEdgeProbability(BB, Succ1), Chain, BlockFilter)) { @@ -1044,7 +1049,7 @@ MachineBlockPlacement::getBestTrellisSuccessor( return Result; } -/// When the option TailDupPlacement is on, this method checks if the +/// When the option allowTailDupPlacement() is on, this method checks if the /// fallthrough candidate block \p Succ (of block \p BB) can be tail-duplicated /// into all of its unplaced, unfiltered predecessors, that are not BB. bool MachineBlockPlacement::canTailDuplicateUnplacedPreds( @@ -1493,7 +1498,7 @@ MachineBlockPlacement::selectBestSuccessor( if (hasBetterLayoutPredecessor(BB, Succ, SuccChain, SuccProb, RealSuccProb, Chain, BlockFilter)) { // If tail duplication would make Succ profitable, place it. - if (TailDupPlacement && shouldTailDuplicate(Succ)) + if (allowTailDupPlacement() && shouldTailDuplicate(Succ)) DupCandidates.push_back(std::make_tuple(SuccProb, Succ)); continue; } @@ -1702,7 +1707,7 @@ void MachineBlockPlacement::buildChain( auto Result = selectBestSuccessor(BB, Chain, BlockFilter); MachineBasicBlock* BestSucc = Result.BB; bool ShouldTailDup = Result.ShouldTailDup; - if (TailDupPlacement) + if (allowTailDupPlacement()) ShouldTailDup |= (BestSucc && shouldTailDuplicate(BestSucc)); // If an immediate successor isn't available, look for the best viable @@ -1724,7 +1729,7 @@ void MachineBlockPlacement::buildChain( // Placement may have changed tail duplication opportunities. // Check for that now. - if (TailDupPlacement && BestSucc && ShouldTailDup) { + if (allowTailDupPlacement() && BestSucc && ShouldTailDup) { // If the chosen successor was duplicated into all its predecessors, // don't bother laying it out, just go round the loop again with BB as // the chain end. @@ -2758,7 +2763,7 @@ bool MachineBlockPlacement::runOnMachineFunction(Machi TailDupSize = TailDupPlacementAggressiveThreshold; } - if (TailDupPlacement) { + if (allowTailDupPlacement()) { MPDT = &getAnalysis(); if (MF.getFunction().optForSize()) TailDupSize = 1; Modified: head/contrib/llvm/lib/CodeGen/PeepholeOptimizer.cpp ============================================================================== --- head/contrib/llvm/lib/CodeGen/PeepholeOptimizer.cpp Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/llvm/lib/CodeGen/PeepholeOptimizer.cpp Fri Jun 29 17:51:35 2018 (r335799) @@ -1812,6 +1812,8 @@ ValueTrackerResult ValueTracker::getNextSourceFromCopy return ValueTrackerResult(); // Otherwise, we want the whole source. const MachineOperand &Src = Def->getOperand(1); + if (Src.isUndef()) + return ValueTrackerResult(); return ValueTrackerResult(Src.getReg(), Src.getSubReg()); } @@ -1855,6 +1857,8 @@ ValueTrackerResult ValueTracker::getNextSourceFromBitc } const MachineOperand &Src = Def->getOperand(SrcIdx); + if (Src.isUndef()) + return ValueTrackerResult(); return ValueTrackerResult(Src.getReg(), Src.getSubReg()); } @@ -2023,6 +2027,10 @@ ValueTrackerResult ValueTracker::getNextSourceFromPHI( for (unsigned i = 1, e = Def->getNumOperands(); i < e; i += 2) { const MachineOperand &MO = Def->getOperand(i); assert(MO.isReg() && "Invalid PHI instruction"); + // We have no code to deal with undef operands. They shouldn't happen in + // normal programs anyway. + if (MO.isUndef()) + return ValueTrackerResult(); Res.addSource(MO.getReg(), MO.getSubReg()); } @@ -2079,9 +2087,14 @@ ValueTrackerResult ValueTracker::getNextSource() { // If we can still move up in the use-def chain, move to the next // definition. if (!TargetRegisterInfo::isPhysicalRegister(Reg) && OneRegSrc) { - Def = MRI.getVRegDef(Reg); - DefIdx = MRI.def_begin(Reg).getOperandNo(); - DefSubReg = Res.getSrcSubReg(0); + MachineRegisterInfo::def_iterator DI = MRI.def_begin(Reg); + if (DI != MRI.def_end()) { + Def = DI->getParent(); + DefIdx = DI.getOperandNo(); + DefSubReg = Res.getSrcSubReg(0); + } else { + Def = nullptr; + } return Res; } } Modified: head/contrib/llvm/lib/CodeGen/TargetInstrInfo.cpp ============================================================================== --- head/contrib/llvm/lib/CodeGen/TargetInstrInfo.cpp Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/llvm/lib/CodeGen/TargetInstrInfo.cpp Fri Jun 29 17:51:35 2018 (r335799) @@ -1151,6 +1151,8 @@ bool TargetInstrInfo::getRegSequenceInputs( for (unsigned OpIdx = 1, EndOpIdx = MI.getNumOperands(); OpIdx != EndOpIdx; OpIdx += 2) { const MachineOperand &MOReg = MI.getOperand(OpIdx); + if (MOReg.isUndef()) + continue; const MachineOperand &MOSubIdx = MI.getOperand(OpIdx + 1); assert(MOSubIdx.isImm() && "One of the subindex of the reg_sequence is not an immediate"); @@ -1174,6 +1176,8 @@ bool TargetInstrInfo::getExtractSubregInputs( // Def = EXTRACT_SUBREG v0.sub1, sub0. assert(DefIdx == 0 && "EXTRACT_SUBREG only has one def"); const MachineOperand &MOReg = MI.getOperand(1); + if (MOReg.isUndef()) + return false; const MachineOperand &MOSubIdx = MI.getOperand(2); assert(MOSubIdx.isImm() && "The subindex of the extract_subreg is not an immediate"); @@ -1198,6 +1202,8 @@ bool TargetInstrInfo::getInsertSubregInputs( assert(DefIdx == 0 && "INSERT_SUBREG only has one def"); const MachineOperand &MOBaseReg = MI.getOperand(1); const MachineOperand &MOInsertedReg = MI.getOperand(2); + if (MOInsertedReg.isUndef()) + return false; const MachineOperand &MOSubIdx = MI.getOperand(3); assert(MOSubIdx.isImm() && "One of the subindex of the reg_sequence is not an immediate"); Modified: head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp ============================================================================== --- head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp Fri Jun 29 17:51:35 2018 (r335799) @@ -1422,7 +1422,8 @@ RuntimeDyldELF::processRelocationRef( SectionEntry &Section = Sections[SectionID]; uint8_t *Target = Section.getAddressWithOffset(Offset); bool RangeOverflow = false; - if (!Value.SymbolName && SymType != SymbolRef::ST_Unknown) { + bool IsExtern = Value.SymbolName || SymType == SymbolRef::ST_Unknown; + if (!IsExtern) { if (AbiVariant != 2) { // In the ELFv1 ABI, a function call may point to the .opd entry, // so the final symbol value is calculated based on the relocation @@ -1432,21 +1433,24 @@ RuntimeDyldELF::processRelocationRef( } else { // In the ELFv2 ABI, a function symbol may provide a local entry // point, which must be used for direct calls. - uint8_t SymOther = Symbol->getOther(); - Value.Addend += ELF::decodePPC64LocalEntryOffset(SymOther); + if (Value.SectionID == SectionID){ + uint8_t SymOther = Symbol->getOther(); + Value.Addend += ELF::decodePPC64LocalEntryOffset(SymOther); + } } uint8_t *RelocTarget = Sections[Value.SectionID].getAddressWithOffset(Value.Addend); int64_t delta = static_cast(Target - RelocTarget); // If it is within 26-bits branch range, just set the branch target - if (SignExtend64<26>(delta) == delta) { + if (SignExtend64<26>(delta) != delta) { + RangeOverflow = true; + } else if ((AbiVariant != 2) || + (AbiVariant == 2 && Value.SectionID == SectionID)) { RelocationEntry RE(SectionID, Offset, RelType, Value.Addend); addRelocationForSection(RE, Value.SectionID); - } else { - RangeOverflow = true; } } - if (Value.SymbolName || SymType == SymbolRef::ST_Unknown || + if (IsExtern || (AbiVariant == 2 && Value.SectionID != SectionID) || RangeOverflow) { // It is an external symbol (either Value.SymbolName is set, or // SymType is SymbolRef::ST_Unknown) or out of range. @@ -1503,10 +1507,10 @@ RuntimeDyldELF::processRelocationRef( RelType, 0); Section.advanceStubOffset(getMaxStubSize()); } - if (Value.SymbolName || SymType == SymbolRef::ST_Unknown) { + if (IsExtern || (AbiVariant == 2 && Value.SectionID != SectionID)) { // Restore the TOC for external calls if (AbiVariant == 2) - writeInt32BE(Target + 4, 0xE8410018); // ld r2,28(r1) + writeInt32BE(Target + 4, 0xE8410018); // ld r2,24(r1) else writeInt32BE(Target + 4, 0xE8410028); // ld r2,40(r1) } Modified: head/contrib/llvm/lib/IR/Core.cpp ============================================================================== --- head/contrib/llvm/lib/IR/Core.cpp Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/llvm/lib/IR/Core.cpp Fri Jun 29 17:51:35 2018 (r335799) @@ -359,11 +359,9 @@ LLVMContextRef LLVMGetTypeContext(LLVMTypeRef Ty) { return wrap(&unwrap(Ty)->getContext()); } -#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) -LLVM_DUMP_METHOD void LLVMDumpType(LLVMTypeRef Ty) { - return unwrap(Ty)->dump(); +void LLVMDumpType(LLVMTypeRef Ty) { + return unwrap(Ty)->print(errs(), /*IsForDebug=*/true); } -#endif char *LLVMPrintTypeToString(LLVMTypeRef Ty) { std::string buf; @@ -658,7 +656,7 @@ void LLVMSetValueName(LLVMValueRef Val, const char *Na unwrap(Val)->setName(Name); } -LLVM_DUMP_METHOD void LLVMDumpValue(LLVMValueRef Val) { +void LLVMDumpValue(LLVMValueRef Val) { unwrap(Val)->print(errs(), /*IsForDebug=*/true); } Modified: head/contrib/llvm/lib/MC/MCObjectFileInfo.cpp ============================================================================== --- head/contrib/llvm/lib/MC/MCObjectFileInfo.cpp Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/llvm/lib/MC/MCObjectFileInfo.cpp Fri Jun 29 17:51:35 2018 (r335799) @@ -289,6 +289,8 @@ void MCObjectFileInfo::initELFMCObjectFileInfo(const T case Triple::mips64el: FDECFIEncoding = dwarf::DW_EH_PE_sdata8; break; + case Triple::ppc64: + case Triple::ppc64le: case Triple::x86_64: FDECFIEncoding = dwarf::DW_EH_PE_pcrel | (Large ? dwarf::DW_EH_PE_sdata8 : dwarf::DW_EH_PE_sdata4); Modified: head/contrib/llvm/lib/Support/Host.cpp ============================================================================== --- head/contrib/llvm/lib/Support/Host.cpp Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/llvm/lib/Support/Host.cpp Fri Jun 29 17:51:35 2018 (r335799) @@ -1009,7 +1009,7 @@ StringRef sys::getHostCPUName() { #include "llvm/Support/X86TargetParser.def" // Now check types. -#define X86_CPU_SUBTYPE(ARCHNAME, ENUM) \ +#define X86_CPU_TYPE(ARCHNAME, ENUM) \ if (Type == X86::ENUM) \ return ARCHNAME; #include "llvm/Support/X86TargetParser.def" Modified: head/contrib/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp ============================================================================== --- head/contrib/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp Fri Jun 29 17:51:35 2018 (r335799) @@ -299,6 +299,11 @@ void AArch64AsmPrinter::printOperand(const MachineInst printOffset(MO.getOffset(), O); break; } + case MachineOperand::MO_BlockAddress: { + MCSymbol *Sym = GetBlockAddressSymbol(MO.getBlockAddress()); + Sym->print(O, MAI); + break; + } } } Modified: head/contrib/llvm/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp ============================================================================== --- head/contrib/llvm/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/llvm/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp Fri Jun 29 17:51:35 2018 (r335799) @@ -46,6 +46,7 @@ #include "llvm/Pass.h" #include "llvm/Support/Casting.h" #include "llvm/Support/Debug.h" +#include "llvm/Support/DebugCounter.h" #include "llvm/Support/raw_ostream.h" #include #include @@ -60,6 +61,8 @@ STATISTIC(NumCollisionsAvoided, "Number of HW prefetch tag collisions avoided"); STATISTIC(NumCollisionsNotAvoided, "Number of HW prefetch tag collisions not avoided due to lack of regsiters"); +DEBUG_COUNTER(FixCounter, "falkor-hwpf", + "Controls which tag collisions are avoided"); namespace { @@ -728,6 +731,21 @@ void FalkorHWPFFix::runOnLoop(MachineLoop &L, MachineF bool Fixed = false; DEBUG(dbgs() << "Attempting to fix tag collision: " << MI); + + if (!DebugCounter::shouldExecute(FixCounter)) { + DEBUG(dbgs() << "Skipping fix due to debug counter:\n " << MI); + continue; + } + + // Add the non-base registers of MI as live so we don't use them as + // scratch registers. + for (unsigned OpI = 0, OpE = MI.getNumOperands(); OpI < OpE; ++OpI) { + if (OpI == static_cast(LdI.BaseRegIdx)) + continue; + MachineOperand &MO = MI.getOperand(OpI); + if (MO.isReg() && MO.readsReg()) + LR.addReg(MO.getReg()); + } for (unsigned ScratchReg : AArch64::GPR64RegClass) { if (!LR.available(ScratchReg) || MRI.isReserved(ScratchReg)) Modified: head/contrib/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp ============================================================================== --- head/contrib/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp Fri Jun 29 17:51:35 2018 (r335799) @@ -917,6 +917,8 @@ int AArch64FrameLowering::resolveFrameIndexReference(c int FPOffset = MFI.getObjectOffset(FI) + FixedObject + 16; int Offset = MFI.getObjectOffset(FI) + MFI.getStackSize(); bool isFixed = MFI.isFixedObjectIndex(FI); + bool isCSR = !isFixed && MFI.getObjectOffset(FI) >= + -((int)AFI->getCalleeSavedStackSize()); // Use frame pointer to reference fixed objects. Use it for locals if // there are VLAs or a dynamically realigned SP (and thus the SP isn't @@ -930,6 +932,12 @@ int AArch64FrameLowering::resolveFrameIndexReference(c // Argument access should always use the FP. if (isFixed) { UseFP = hasFP(MF); + } else if (isCSR && RegInfo->needsStackRealignment(MF)) { + // References to the CSR area must use FP if we're re-aligning the stack + // since the dynamically-sized alignment padding is between the SP/BP and + // the CSR area. + assert(hasFP(MF) && "Re-aligned stack must have frame pointer"); + UseFP = true; } else if (hasFP(MF) && !RegInfo->hasBasePointer(MF) && !RegInfo->needsStackRealignment(MF)) { // Use SP or FP, whichever gives us the best chance of the offset @@ -947,9 +955,9 @@ int AArch64FrameLowering::resolveFrameIndexReference(c } } - assert((isFixed || !RegInfo->needsStackRealignment(MF) || !UseFP) && + assert(((isFixed || isCSR) || !RegInfo->needsStackRealignment(MF) || !UseFP) && "In the presence of dynamic stack pointer realignment, " - "non-argument objects cannot be accessed through the frame pointer"); + "non-argument/CSR objects cannot be accessed through the frame pointer"); if (UseFP) { FrameReg = RegInfo->getFrameRegister(MF); Modified: head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp ============================================================================== --- head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp Fri Jun 29 17:51:35 2018 (r335799) @@ -4930,7 +4930,8 @@ bool AArch64TargetLowering::isOffsetFoldingLegal( bool AArch64TargetLowering::isFPImmLegal(const APFloat &Imm, EVT VT) const { // We can materialize #0.0 as fmov $Rd, XZR for 64-bit and 32-bit cases. // FIXME: We should be able to handle f128 as well with a clever lowering. - if (Imm.isPosZero() && (VT == MVT::f16 || VT == MVT::f64 || VT == MVT::f32)) { + if (Imm.isPosZero() && (VT == MVT::f64 || VT == MVT::f32 || + (VT == MVT::f16 && Subtarget->hasFullFP16()))) { DEBUG(dbgs() << "Legal fp imm: materialize 0 using the zero register\n"); return true; } @@ -5066,7 +5067,7 @@ SDValue AArch64TargetLowering::getRecipEstimate(SDValu // Table of Constraints // TODO: This is the current set of constraints supported by ARM for the -// compiler, not all of them may make sense, e.g. S may be difficult to support. +// compiler, not all of them may make sense. // // r - A general register // w - An FP/SIMD register of some size in the range v0-v31 @@ -5126,6 +5127,8 @@ AArch64TargetLowering::getConstraintType(StringRef Con // currently handle addresses it is the same as 'r'. case 'Q': return C_Memory; + case 'S': // A symbolic address + return C_Other; } } return TargetLowering::getConstraintType(Constraint); @@ -5250,6 +5253,23 @@ void AArch64TargetLowering::LowerAsmOperandForConstrai Result = DAG.getRegister(AArch64::WZR, MVT::i32); break; } + case 'S': { + // An absolute symbolic address or label reference. + if (const GlobalAddressSDNode *GA = dyn_cast(Op)) { + Result = DAG.getTargetGlobalAddress(GA->getGlobal(), SDLoc(Op), + GA->getValueType(0)); + } else if (const BlockAddressSDNode *BA = + dyn_cast(Op)) { + Result = + DAG.getTargetBlockAddress(BA->getBlockAddress(), BA->getValueType(0)); + } else if (const ExternalSymbolSDNode *ES = + dyn_cast(Op)) { + Result = + DAG.getTargetExternalSymbol(ES->getSymbol(), ES->getValueType(0)); + } else + return; + break; + } case 'I': case 'J': @@ -9637,6 +9657,15 @@ static SDValue performPostLD1Combine(SDNode *N, if (LD->getOpcode() != ISD::LOAD) return SDValue(); + // The vector lane must be a constant in the LD1LANE opcode. + SDValue Lane; + if (IsLaneOp) { + Lane = N->getOperand(2); + auto *LaneC = dyn_cast(Lane); + if (!LaneC || LaneC->getZExtValue() >= VT.getVectorNumElements()) + return SDValue(); + } + LoadSDNode *LoadSDN = cast(LD); EVT MemVT = LoadSDN->getMemoryVT(); // Check if memory operand is the same type as the vector element. @@ -9693,7 +9722,7 @@ static SDValue performPostLD1Combine(SDNode *N, Ops.push_back(LD->getOperand(0)); // Chain if (IsLaneOp) { Ops.push_back(Vector); // The vector to be inserted - Ops.push_back(N->getOperand(2)); // The lane to be inserted in the vector + Ops.push_back(Lane); // The lane to be inserted in the vector } Ops.push_back(Addr); Ops.push_back(Inc); Modified: head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.td ============================================================================== --- head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.td Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.td Fri Jun 29 17:51:35 2018 (r335799) @@ -2713,7 +2713,7 @@ defm FMOV : UnscaledConversion<"fmov">; // Add pseudo ops for FMOV 0 so we can mark them as isReMaterializable let isReMaterializable = 1, isCodeGenOnly = 1, isAsCheapAsAMove = 1 in { def FMOVH0 : Pseudo<(outs FPR16:$Rd), (ins), [(set f16:$Rd, (fpimm0))]>, - Sched<[WriteF]>; + Sched<[WriteF]>, Requires<[HasFullFP16]>; def FMOVS0 : Pseudo<(outs FPR32:$Rd), (ins), [(set f32:$Rd, (fpimm0))]>, Sched<[WriteF]>; def FMOVD0 : Pseudo<(outs FPR64:$Rd), (ins), [(set f64:$Rd, (fpimm0))]>, Modified: head/contrib/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp ============================================================================== --- head/contrib/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp Fri Jun 29 17:51:35 2018 (r335799) @@ -147,6 +147,7 @@ extern "C" void LLVMInitializeAMDGPUTarget() { initializeR600PacketizerPass(*PR); initializeR600ExpandSpecialInstrsPassPass(*PR); initializeR600VectorRegMergerPass(*PR); + initializeGlobalISel(*PR); initializeAMDGPUDAGToDAGISelPass(*PR); initializeSILowerI1CopiesPass(*PR); initializeSIFixSGPRCopiesPass(*PR); Modified: head/contrib/llvm/lib/Target/AMDGPU/SIISelLowering.cpp ============================================================================== --- head/contrib/llvm/lib/Target/AMDGPU/SIISelLowering.cpp Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/llvm/lib/Target/AMDGPU/SIISelLowering.cpp Fri Jun 29 17:51:35 2018 (r335799) @@ -358,6 +358,7 @@ SITargetLowering::SITargetLowering(const TargetMachine setOperationAction(ISD::CTTZ_ZERO_UNDEF, MVT::i16, Promote); setOperationAction(ISD::CTLZ, MVT::i16, Promote); setOperationAction(ISD::CTLZ_ZERO_UNDEF, MVT::i16, Promote); + setOperationAction(ISD::CTPOP, MVT::i16, Promote); setOperationAction(ISD::SELECT_CC, MVT::i16, Expand); Modified: head/contrib/llvm/lib/Target/AMDGPU/SIInstructions.td ============================================================================== --- head/contrib/llvm/lib/Target/AMDGPU/SIInstructions.td Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/llvm/lib/Target/AMDGPU/SIInstructions.td Fri Jun 29 17:51:35 2018 (r335799) @@ -726,6 +726,10 @@ def : GCNPat < (i32 (add (i32 (ctpop i32:$popcnt)), i32:$val)), (V_BCNT_U32_B32_e64 $popcnt, $val) >; +def : GCNPat < + (i16 (add (i16 (trunc (ctpop i32:$popcnt))), i16:$val)), + (V_BCNT_U32_B32_e64 $popcnt, $val) +>; /********** ============================================ **********/ /********** Extraction, Insertion, Building and Casting **********/ Modified: head/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp ============================================================================== --- head/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp Fri Jun 29 17:51:35 2018 (r335799) @@ -4864,12 +4864,14 @@ bool ARMBaseInstrInfo::getRegSequenceLikeInputs( // Populate the InputRegs accordingly. // rY const MachineOperand *MOReg = &MI.getOperand(1); - InputRegs.push_back( - RegSubRegPairAndIdx(MOReg->getReg(), MOReg->getSubReg(), ARM::ssub_0)); + if (!MOReg->isUndef()) + InputRegs.push_back(RegSubRegPairAndIdx(MOReg->getReg(), + MOReg->getSubReg(), ARM::ssub_0)); // rZ MOReg = &MI.getOperand(2); - InputRegs.push_back( - RegSubRegPairAndIdx(MOReg->getReg(), MOReg->getSubReg(), ARM::ssub_1)); + if (!MOReg->isUndef()) + InputRegs.push_back(RegSubRegPairAndIdx(MOReg->getReg(), + MOReg->getSubReg(), ARM::ssub_1)); return true; } llvm_unreachable("Target dependent opcode missing"); @@ -4888,6 +4890,8 @@ bool ARMBaseInstrInfo::getExtractSubregLikeInputs( // rX = EXTRACT_SUBREG dZ, ssub_0 // rY = EXTRACT_SUBREG dZ, ssub_1 const MachineOperand &MOReg = MI.getOperand(2); + if (MOReg.isUndef()) + return false; InputReg.Reg = MOReg.getReg(); InputReg.SubReg = MOReg.getSubReg(); InputReg.SubIdx = DefIdx == 0 ? ARM::ssub_0 : ARM::ssub_1; @@ -4907,6 +4911,8 @@ bool ARMBaseInstrInfo::getInsertSubregLikeInputs( // dX = VSETLNi32 dY, rZ, imm const MachineOperand &MOBaseReg = MI.getOperand(1); const MachineOperand &MOInsertedReg = MI.getOperand(2); + if (MOInsertedReg.isUndef()) + return false; const MachineOperand &MOIndex = MI.getOperand(3); BaseReg.Reg = MOBaseReg.getReg(); BaseReg.SubReg = MOBaseReg.getSubReg(); Modified: head/contrib/llvm/lib/Target/ARM/ARMComputeBlockSize.cpp ============================================================================== --- head/contrib/llvm/lib/Target/ARM/ARMComputeBlockSize.cpp Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/llvm/lib/Target/ARM/ARMComputeBlockSize.cpp Fri Jun 29 17:51:35 2018 (r335799) @@ -35,6 +35,7 @@ mayOptimizeThumb2Instruction(const MachineInstr *MI) { case ARM::tBcc: // optimizeThumb2JumpTables. case ARM::t2BR_JT: + case ARM::tBR_JTr: return true; } return false; Modified: head/contrib/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp ============================================================================== --- head/contrib/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp Fri Jun 29 17:51:35 2018 (r335799) @@ -5136,6 +5136,7 @@ unsigned MipsAsmParser::checkTargetMatchPredicate(MCIn // It also applies for registers Rt and Rs of microMIPSr6 jalrc.hb instruction // and registers Rd and Base for microMIPS lwp instruction case Mips::JALR_HB: + case Mips::JALR_HB64: case Mips::JALRC_HB_MMR6: case Mips::JALRC_MMR6: if (Inst.getOperand(0).getReg() == Inst.getOperand(1).getReg()) Modified: head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp ============================================================================== --- head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp Fri Jun 29 17:51:35 2018 (r335799) @@ -225,6 +225,8 @@ unsigned MipsELFObjectWriter::getRelocType(MCContext & switch (Kind) { case Mips::fixup_Mips_NONE: return ELF::R_MIPS_NONE; + case FK_Data_1: + report_fatal_error("MIPS does not support one byte relocations"); case Mips::fixup_Mips_16: case FK_Data_2: return IsPCRel ? ELF::R_MIPS_PC16 : ELF::R_MIPS_16; Modified: head/contrib/llvm/lib/Target/Mips/MicroMips32r6InstrInfo.td ============================================================================== --- head/contrib/llvm/lib/Target/Mips/MicroMips32r6InstrInfo.td Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/llvm/lib/Target/Mips/MicroMips32r6InstrInfo.td Fri Jun 29 17:51:35 2018 (r335799) @@ -1886,6 +1886,12 @@ let AddedComplexity = 41 in { def TAILCALL_MMR6 : TailCall, ISA_MICROMIPS32R6; +def TAILCALLREG_MMR6 : TailCallReg, ISA_MICROMIPS32R6; + +def PseudoIndirectBranch_MMR6 : PseudoIndirectBranchBase, + ISA_MICROMIPS32R6; + def : MipsPat<(MipsTailCall (iPTR tglobaladdr:$dst)), (TAILCALL_MMR6 tglobaladdr:$dst)>, ISA_MICROMIPS32R6; Modified: head/contrib/llvm/lib/Target/Mips/MicroMipsInstrInfo.td ============================================================================== --- head/contrib/llvm/lib/Target/Mips/MicroMipsInstrInfo.td Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/llvm/lib/Target/Mips/MicroMipsInstrInfo.td Fri Jun 29 17:51:35 2018 (r335799) @@ -1003,6 +1003,12 @@ let DecoderNamespace = "MicroMips", Predicates = [InMi def TAILCALL_MM : TailCall, ISA_MIPS1_NOT_32R6_64R6; +def TAILCALLREG_MM : TailCallReg, + ISA_MICROMIPS32_NOT_MIPS32R6; + +def PseudoIndirectBranch_MM : PseudoIndirectBranchBase, + ISA_MICROMIPS32_NOT_MIPS32R6; + let DecoderNamespace = "MicroMips" in { def RDHWR_MM : MMRel, R6MMR6Rel, ReadHardware, RDHWR_FM_MM, ISA_MICROMIPS32_NOT_MIPS32R6; Modified: head/contrib/llvm/lib/Target/Mips/Mips.td ============================================================================== --- head/contrib/llvm/lib/Target/Mips/Mips.td Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/llvm/lib/Target/Mips/Mips.td Fri Jun 29 17:51:35 2018 (r335799) @@ -193,6 +193,10 @@ def FeatureMT : SubtargetFeature<"mt", "HasMT", "true" def FeatureLongCalls : SubtargetFeature<"long-calls", "UseLongCalls", "true", "Disable use of the jal instruction">; +def FeatureUseIndirectJumpsHazard : SubtargetFeature<"use-indirect-jump-hazard", + "UseIndirectJumpsHazard", + "true", "Use indirect jump" + " guards to prevent certain speculation based attacks">; //===----------------------------------------------------------------------===// // Mips processors supported. //===----------------------------------------------------------------------===// Modified: head/contrib/llvm/lib/Target/Mips/Mips32r6InstrInfo.td ============================================================================== --- head/contrib/llvm/lib/Target/Mips/Mips32r6InstrInfo.td Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/llvm/lib/Target/Mips/Mips32r6InstrInfo.td Fri Jun 29 17:51:35 2018 (r335799) @@ -1036,3 +1036,42 @@ def : MipsPat<(select i32:$cond, immz, i32:$f), (SELEQZ i32:$f, i32:$cond)>, ISA_MIPS32R6; } + +// Pseudo instructions +let isCall = 1, isTerminator = 1, isReturn = 1, isBarrier = 1, hasDelaySlot = 1, + hasExtraSrcRegAllocReq = 1, isCTI = 1, Defs = [AT] in { + class TailCallRegR6 : + PseudoSE<(outs), (ins RO:$rs), [(MipsTailCall RO:$rs)], II_JR>, + PseudoInstExpansion<(JumpInst RT:$rt, RO:$rs)>; +} + +class PseudoIndirectBranchBaseR6 : + MipsPseudo<(outs), (ins RO:$rs), [(brind RO:$rs)], + II_IndirectBranchPseudo>, + PseudoInstExpansion<(JumpInst RT:$rt, RO:$rs)> { + let isTerminator=1; + let isBarrier=1; + let hasDelaySlot = 1; + let isBranch = 1; + let isIndirectBranch = 1; + bit isCTI = 1; +} + + +let AdditionalPredicates = [NotInMips16Mode, NotInMicroMips, + NoIndirectJumpGuards] in { + def TAILCALLR6REG : TailCallRegR6, ISA_MIPS32R6; + def PseudoIndirectBranchR6 : PseudoIndirectBranchBaseR6, + ISA_MIPS32R6; +} + +let AdditionalPredicates = [NotInMips16Mode, NotInMicroMips, + UseIndirectJumpsHazard] in { + def TAILCALLHBR6REG : TailCallReg, ISA_MIPS32R6; + def PseudoIndrectHazardBranchR6 : PseudoIndirectBranchBase, + ISA_MIPS32R6; +} + Modified: head/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td ============================================================================== --- head/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td Fri Jun 29 17:51:35 2018 (r335799) @@ -240,13 +240,32 @@ let isCodeGenOnly = 1 in { def BGTZ64 : CBranchZero<"bgtz", brtarget, setgt, GPR64Opnd>, BGEZ_FM<7, 0>; def BLEZ64 : CBranchZero<"blez", brtarget, setle, GPR64Opnd>, BGEZ_FM<6, 0>; def BLTZ64 : CBranchZero<"bltz", brtarget, setlt, GPR64Opnd>, BGEZ_FM<1, 0>; - def JALR64Pseudo : JumpLinkRegPseudo; + let AdditionalPredicates = [NoIndirectJumpGuards] in + def JALR64Pseudo : JumpLinkRegPseudo; } +let AdditionalPredicates = [NotInMicroMips], + DecoderNamespace = "Mips64" in { + def JR_HB64 : JR_HB_DESC, JR_HB_ENC, ISA_MIPS32_NOT_32R6_64R6; + def JALR_HB64 : JALR_HB_DESC, JALR_HB_ENC, ISA_MIPS32R2; +} +def PseudoReturn64 : PseudoReturnBase; -def TAILCALLREG64 : TailCallReg; +let AdditionalPredicates = [NotInMips16Mode, NotInMicroMips, + NoIndirectJumpGuards] in { + def TAILCALLREG64 : TailCallReg, ISA_MIPS3_NOT_32R6_64R6, + PTR_64; + def PseudoIndirectBranch64 : PseudoIndirectBranchBase, + ISA_MIPS3_NOT_32R6_64R6; +} -def PseudoReturn64 : PseudoReturnBase; -def PseudoIndirectBranch64 : PseudoIndirectBranchBase; +let AdditionalPredicates = [NotInMips16Mode, NotInMicroMips, + UseIndirectJumpsHazard] in { + def TAILCALLREGHB64 : TailCallReg, + ISA_MIPS32R2_NOT_32R6_64R6, PTR_64; + def PseudoIndirectHazardBranch64 : PseudoIndirectBranchBase, + ISA_MIPS32R2_NOT_32R6_64R6; +} /// Multiply and Divide Instructions. let AdditionalPredicates = [NotInMicroMips] in { @@ -536,6 +555,10 @@ def DMTC2 : MTC3OP<"dmtc2", COP2Opnd, GPR64Opnd, II_DM ISA_MIPS3; } + +let AdditionalPredicates = [UseIndirectJumpsHazard] in + def JALRHB64Pseudo : JumpLinkRegPseudo; + //===----------------------------------------------------------------------===// // Arbitrary patterns that map to one or more instructions //===----------------------------------------------------------------------===// @@ -843,7 +866,8 @@ let AdditionalPredicates = [NotInMicroMips] in { def : MipsInstAlias<"dext $rt, $rs, $pos, $size", (DEXTU GPR64Opnd:$rt, GPR64Opnd:$rs, uimm5_plus32:$pos, uimm5_plus1:$size), 0>, ISA_MIPS64R2; - + def : MipsInstAlias<"jalr.hb $rs", (JALR_HB64 RA_64, GPR64Opnd:$rs), 1>, + ISA_MIPS64; // Two operand (implicit 0 selector) versions: def : MipsInstAlias<"dmtc0 $rt, $rd", (DMTC0 COP0Opnd:$rd, GPR64Opnd:$rt, 0), 0>; Modified: head/contrib/llvm/lib/Target/Mips/Mips64r6InstrInfo.td ============================================================================== --- head/contrib/llvm/lib/Target/Mips/Mips64r6InstrInfo.td Fri Jun 29 16:46:19 2018 (r335798) +++ head/contrib/llvm/lib/Target/Mips/Mips64r6InstrInfo.td Fri Jun 29 17:51:35 2018 (r335799) @@ -104,6 +104,16 @@ class JIC64_DESC : JMP_IDX_COMPACT_DESC_BASE<"jic", jm class LL64_R6_DESC : LL_R6_DESC_BASE<"ll", GPR32Opnd, mem_simm9, II_LL>; class SC64_R6_DESC : SC_R6_DESC_BASE<"sc", GPR32Opnd, II_SC>; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@freebsd.org Fri Jun 29 18:45:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2167F7494F; Fri, 29 Jun 2018 18:45:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 95AD6769EE; Fri, 29 Jun 2018 18:45:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 71E1924A9B; Fri, 29 Jun 2018 18:45:29 +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 w5TIjTVl046894; Fri, 29 Jun 2018 18:45:29 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5TIjTtW046893; Fri, 29 Jun 2018 18:45:29 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201806291845.w5TIjTtW046893@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 29 Jun 2018 18:45:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335800 - head/sys/conf X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/conf X-SVN-Commit-Revision: 335800 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.26 Precedence: list List-Id: "SVN commit messages 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, 29 Jun 2018 18:45:30 -0000 Author: emaste Date: Fri Jun 29 18:45:29 2018 New Revision: 335800 URL: https://svnweb.freebsd.org/changeset/base/335800 Log: newvers.sh: avoid possibly invalid relative directory Previously newvers.sh passed --work-tree=${VCSDIR}/.. when invoking git. When using git worktree .git is actually a file, not a directory, and .git/.. is not a valid path. Although it appears git handles this internally (perhaps it normalizes the path first), it is simple enough for the script to store both the working tree top-level directory and the VCS (.git) directory, so do so. Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Fri Jun 29 17:51:35 2018 (r335799) +++ head/sys/conf/newvers.sh Fri Jun 29 18:45:29 2018 (r335800) @@ -65,7 +65,8 @@ findvcs() cd ${SYSDIR}/.. while [ $(pwd) != "/" ]; do if [ -e "./$1" ]; then - VCSDIR=$(pwd)"/$1" + VCSTOP=$(pwd) + VCSDIR=${VCSTOP}"/$1" cd ${savedir} return 0 fi @@ -239,7 +240,7 @@ if [ -n "$git_cmd" ] ; then if [ -n "$git_b" ] ; then git="${git}(${git_b})" fi - if $git_cmd --work-tree=${VCSDIR}/.. diff-index \ + if $git_cmd --work-tree=${VCSTOP} diff-index \ --name-only HEAD | read dummy; then git="${git}-dirty" modified=true From owner-svn-src-all@freebsd.org Fri Jun 29 19:35:26 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00011F76A0B; Fri, 29 Jun 2018 19:35:25 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9F3C67838B; Fri, 29 Jun 2018 19:35:25 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7B9B1252D6; Fri, 29 Jun 2018 19:35:25 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5TJZPlq072829; Fri, 29 Jun 2018 19:35:25 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5TJZPjV072828; Fri, 29 Jun 2018 19:35:25 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201806291935.w5TJZPjV072828@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 29 Jun 2018 19:35:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335801 - head/sys/powerpc/powernv X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/powerpc/powernv X-SVN-Commit-Revision: 335801 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.26 Precedence: list List-Id: "SVN commit messages 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, 29 Jun 2018 19:35:26 -0000 Author: jhibbits Date: Fri Jun 29 19:35:25 2018 New Revision: 335801 URL: https://svnweb.freebsd.org/changeset/base/335801 Log: Support multiple OPAL consoles, and don't crash if uart is not stdout Summary: If the chosen console is not the OPAL uart, but OPAL uart devices exist, the console device doesn't attach properly, and faults in the interrupt handler, with a NULL pointer dereference. To fix this, and as a byproduct, also support multiple OPAL consoles, refactor to have the console getc callback use the appropriate softc instead of the global console_sc, which may be NULL in the case of a different device being the console. Reviewed by: nwhitehorn Differential Revision: https://reviews.freebsd.org/D16071 Modified: head/sys/powerpc/powernv/opal_console.c Modified: head/sys/powerpc/powernv/opal_console.c ============================================================================== --- head/sys/powerpc/powernv/opal_console.c Fri Jun 29 18:45:29 2018 (r335800) +++ head/sys/powerpc/powernv/opal_console.c Fri Jun 29 19:35:25 2018 (r335801) @@ -70,14 +70,14 @@ struct uart_opal_softc { char opal_inbuf[16]; uint64_t inbuflen; uint8_t outseqno; +#if defined(KDB) + int alt_break_state; +#endif }; static struct uart_opal_softc *console_sc = NULL; +static struct consdev *stdout_cp; -#if defined(KDB) -static int alt_break_state; -#endif - enum { OPAL_RAW, OPAL_HVSI }; @@ -112,6 +112,7 @@ static driver_t uart_opal_driver = { DRIVER_MODULE(uart_opal, opalcons, uart_opal_driver, uart_devclass, 0, 0); +static int uart_opal_getc(struct uart_opal_softc *sc); static cn_probe_t uart_opal_cnprobe; static cn_init_t uart_opal_cninit; static cn_term_t uart_opal_cnterm; @@ -248,6 +249,8 @@ uart_opal_cnprobe(struct consdev *cp) cp->cn_pri = CN_NORMAL; console_sc = ≻ + cp->cn_arg = console_sc; + stdout_cp = cp; return; fail: @@ -262,23 +265,25 @@ uart_opal_attach(device_t dev) int unit; sc = device_get_softc(dev); - sc->dev = dev; sc->node = ofw_bus_get_node(dev); uart_opal_probe_node(sc); unit = device_get_unit(dev); - sc->tp = tty_alloc(&uart_opal_tty_class, sc); mtx_init(&sc->sc_mtx, device_get_nameunit(dev), NULL, MTX_SPIN | MTX_QUIET | MTX_NOWITNESS); if (console_sc != NULL && console_sc->vtermid == sc->vtermid) { device_printf(dev, "console\n"); - sc->outseqno = console_sc->outseqno; - console_sc = sc; + device_set_softc(dev, console_sc); + sc = console_sc; sprintf(uart_opal_consdev.cn_name, "ttyu%r", unit); - tty_init_console(sc->tp, 0); } + sc->tp = tty_alloc(&uart_opal_tty_class, sc); + if (console_sc == sc) + tty_init_console(sc->tp, 0); + + sc->dev = dev; sc->irqrid = 0; sc->irqres = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irqrid, RF_ACTIVE | RF_SHAREABLE); @@ -419,14 +424,20 @@ uart_opal_put(struct uart_opal_softc *sc, void *buffer static int uart_opal_cngetc(struct consdev *cp) { + return (uart_opal_getc(cp->cn_arg)); +} + +static int +uart_opal_getc(struct uart_opal_softc *sc) +{ unsigned char c; int retval; - retval = uart_opal_get(console_sc, &c, 1); + retval = uart_opal_get(sc, &c, 1); if (retval != 1) return (-1); #if defined(KDB) - kdb_alt_break(c, &alt_break_state); + kdb_alt_break(c, &sc->alt_break_state); #endif return (c); @@ -444,7 +455,7 @@ uart_opal_cnputc(struct consdev *cp, int c) opal_call(OPAL_POLL_EVENTS, NULL); } } - uart_opal_put(console_sc, &ch, 1); + uart_opal_put(cp->cn_arg, &ch, 1); } static void @@ -478,7 +489,7 @@ uart_opal_intr(void *v) int c; tty_lock(tp); - while ((c = uart_opal_cngetc(NULL)) > 0) + while ((c = uart_opal_getc(sc)) > 0) ttydisc_rint(tp, c, 0); ttydisc_rint_done(tp); tty_unlock(tp); From owner-svn-src-all@freebsd.org Fri Jun 29 20:17:02 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BBFDF7826F; Fri, 29 Jun 2018 20:17:02 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3A98D79C7D; Fri, 29 Jun 2018 20:17:02 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 176F72597F; Fri, 29 Jun 2018 20:17:02 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5TKH1kS093974; Fri, 29 Jun 2018 20:17:01 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5TKGvJL093947; Fri, 29 Jun 2018 20:16:57 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201806292016.w5TKGvJL093947@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 29 Jun 2018 20:16:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r335802 - in vendor-sys/acpica/dist: . source/common source/compiler source/components/hardware source/components/namespace source/include source/tools/acpisrc X-SVN-Group: vendor-sys X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in vendor-sys/acpica/dist: . source/common source/compiler source/components/hardware source/components/namespace source/include source/tools/acpisrc X-SVN-Commit-Revision: 335802 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.26 Precedence: list List-Id: "SVN commit messages 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, 29 Jun 2018 20:17:03 -0000 Author: jkim Date: Fri Jun 29 20:16:57 2018 New Revision: 335802 URL: https://svnweb.freebsd.org/changeset/base/335802 Log: Import ACPICA 20180629. Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/source/common/dmextern.c vendor-sys/acpica/dist/source/compiler/aslglobal.h vendor-sys/acpica/dist/source/compiler/aslhelpers.y vendor-sys/acpica/dist/source/compiler/aslload.c vendor-sys/acpica/dist/source/compiler/aslmain.c vendor-sys/acpica/dist/source/compiler/aslmessages.c vendor-sys/acpica/dist/source/compiler/aslmessages.h vendor-sys/acpica/dist/source/compiler/asloptions.c vendor-sys/acpica/dist/source/compiler/aslparser.y vendor-sys/acpica/dist/source/compiler/aslprimaries.y vendor-sys/acpica/dist/source/compiler/asltransform.c vendor-sys/acpica/dist/source/compiler/asltypes.y vendor-sys/acpica/dist/source/components/hardware/hwxfsleep.c vendor-sys/acpica/dist/source/components/namespace/nsaccess.c vendor-sys/acpica/dist/source/components/namespace/nseval.c vendor-sys/acpica/dist/source/components/namespace/nssearch.c vendor-sys/acpica/dist/source/include/aclocal.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/tools/acpisrc/asconvrt.c Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Fri Jun 29 19:35:25 2018 (r335801) +++ vendor-sys/acpica/dist/changes.txt Fri Jun 29 20:16:57 2018 (r335802) @@ -1,4 +1,63 @@ ---------------------------------------- +29 June 2018. Summary of changes for version 20180629: + + +1) iASL Compiler/Disassembler and Tools: + +iASL: Fixed a regression related to the use of the ASL External +statement. Error checking for the use of the External() statement has +been relaxed. Previously, a restriction on the use of External meant that +the referenced named object was required to be defined in a different +table (an SSDT). Thus it would be an error to declare an object as an +external and then define the same named object in the same table. For +example: + DefinitionBlock (...) + { + External (DEV1) + Device (DEV1){...} // This was an error + } +However, this behavior has caused regressions in some existing ASL code, +because there is code that depends on named objects and externals (with +the same name) being declared in the same table. This change will allow +the ASL code above to compile without errors or warnings. + +iASL: Implemented ASL language extensions for four operators to make some +of their arguments optional instead of required: + 1) Field (RegionName, AccessType, LockRule, UpdateRule) + 2) BankField (RegionName, BankName, BankValue, + AccessType, LockRule, UpdateRule) + 3) IndexField (IndexName, DataName, + AccessType, LockRule, UpdateRule) +For the Field operators above, the AccessType, LockRule, and UpdateRule +are now optional arguments. The default values are: + AccessType: AnyAcc + LockRule: NoLock + UpdateRule: Preserve + 4) Mutex (MutexName, SyncLevel) +For this operator, the SyncLevel argument is now optional. This argument +is rarely used in any meaningful way by ASL code, and thus it makes sense +to make it optional. The default value is: + SyncLevel: 0 + +iASL: Attempted use of the ASL Unload() operator now results in the +following warning: + "Unload is not supported by all operating systems" +This is in fact very true, and the Unload operator may be completely +deprecated in the near future. + +AcpiExec: Fixed a regression for the -fi option (Namespace initialization +file. Recent changes in the ACPICA module-level code support altered the +table load/initialization sequence . This means that the table load has +become a large method execution of the table itself. If Operation Region +Fields are used within any module-level code and the -fi option was +specified, the initialization values were populated only after the table +had completely finished loading (and thus the module-level code had +already been executed). This change moves the initialization of objects +listed in the initialization file to before the table is executed as a +method. Field unit values are now initialized before the table execution +is performed. + +---------------------------------------- 31 May 2018. Summary of changes for version 20180531: Modified: vendor-sys/acpica/dist/source/common/dmextern.c ============================================================================== --- vendor-sys/acpica/dist/source/common/dmextern.c Fri Jun 29 19:35:25 2018 (r335801) +++ vendor-sys/acpica/dist/source/common/dmextern.c Fri Jun 29 20:16:57 2018 (r335802) @@ -538,7 +538,7 @@ AcpiDmGetExternalsFromFile ( /* Each line defines a method */ - while (fgets (StringBuffer, ASL_MSG_BUFFER_SIZE, ExternalRefFile)) + while (fgets (StringBuffer, ASL_STRING_BUFFER_SIZE, ExternalRefFile)) { Token = strtok (StringBuffer, METHOD_SEPARATORS); /* "External" */ if (!Token) Modified: vendor-sys/acpica/dist/source/compiler/aslglobal.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslglobal.h Fri Jun 29 19:35:25 2018 (r335801) +++ vendor-sys/acpica/dist/source/compiler/aslglobal.h Fri Jun 29 20:16:57 2018 (r335802) @@ -251,7 +251,8 @@ extern int AslCompilerdebug; #define ASL_DEFAULT_LINE_BUFFER_SIZE (1024 * 32) /* 32K */ -#define ASL_MSG_BUFFER_SIZE (1024 * 32) /* 32k */ +#define ASL_MSG_BUFFER_SIZE (1024 * 128) /* 128k */ +#define ASL_STRING_BUFFER_SIZE (1024 * 32) /* 32k */ #define ASL_MAX_DISABLED_MESSAGES 32 #define ASL_MAX_EXPECTED_MESSAGES 32 #define HEX_TABLE_LINE_SIZE 8 @@ -438,8 +439,8 @@ ASL_EXTERN UINT8 AslGbl_NamespaceEv ASL_EXTERN UINT8 Gbl_AmlBuffer[HEX_LISTING_LINE_SIZE]; ASL_EXTERN char MsgBuffer[ASL_MSG_BUFFER_SIZE]; -ASL_EXTERN char StringBuffer[ASL_MSG_BUFFER_SIZE]; -ASL_EXTERN char StringBuffer2[ASL_MSG_BUFFER_SIZE]; +ASL_EXTERN char StringBuffer[ASL_STRING_BUFFER_SIZE]; +ASL_EXTERN char StringBuffer2[ASL_STRING_BUFFER_SIZE]; ASL_EXTERN UINT32 Gbl_DisabledMessages[ASL_MAX_DISABLED_MESSAGES]; ASL_EXTERN ASL_EXPECTED_MESSAGE Gbl_ExpectedMessages[ASL_MAX_EXPECTED_MESSAGES]; Modified: vendor-sys/acpica/dist/source/compiler/aslhelpers.y ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslhelpers.y Fri Jun 29 19:35:25 2018 (r335801) +++ vendor-sys/acpica/dist/source/compiler/aslhelpers.y Fri Jun 29 20:16:57 2018 (r335802) @@ -183,6 +183,14 @@ OptionalAccessSize | ',' ByteConstExpr {$$ = $2;} ; +OptionalAccessTypeKeyword /* Default: AnyAcc */ + : {$$ = TrCreateLeafOp ( + PARSEOP_ACCESSTYPE_ANY);} + | ',' {$$ = TrCreateLeafOp ( + PARSEOP_ACCESSTYPE_ANY);} + | ',' AccessTypeKeyword {$$ = $2;} + ; + OptionalAddressingMode : ',' {$$ = NULL;} | ',' AddressingModeKeyword {$$ = $2;} @@ -252,6 +260,14 @@ OptionalListString | ',' TermArg {$$ = $2;} ; +OptionalLockRuleKeyword /* Default: NoLock */ + : {$$ = TrCreateLeafOp ( + PARSEOP_LOCKRULE_NOLOCK);} + | ',' {$$ = TrCreateLeafOp ( + PARSEOP_LOCKRULE_NOLOCK);} + | ',' LockRuleKeyword {$$ = $2;} + ; + OptionalMaxType : ',' {$$ = NULL;} | ',' MaxKeyword {$$ = $2;} @@ -366,6 +382,14 @@ OptionalStringData | ',' StringData {$$ = $2;} ; +OptionalSyncLevel /* Default: 0 */ + : {$$ = TrCreateValuedLeafOp ( + PARSEOP_BYTECONST, 0);} + | ',' {$$ = TrCreateValuedLeafOp ( + PARSEOP_BYTECONST, 0);} + | ',' ByteConstExpr {$$ = $2;} + ; + OptionalTranslationType_Last : {$$ = NULL;} | ',' {$$ = NULL;} @@ -382,6 +406,14 @@ OptionalType_Last : {$$ = NULL;} | ',' {$$ = NULL;} | ',' TypeKeyword {$$ = $2;} + ; + +OptionalUpdateRuleKeyword /* Default: Preserve */ + : {$$ = TrCreateLeafOp ( + PARSEOP_UPDATERULE_PRESERVE);} + | ',' {$$ = TrCreateLeafOp ( + PARSEOP_UPDATERULE_PRESERVE);} + | ',' UpdateRuleKeyword {$$ = $2;} ; OptionalWireMode Modified: vendor-sys/acpica/dist/source/compiler/aslload.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslload.c Fri Jun 29 19:35:25 2018 (r335801) +++ vendor-sys/acpica/dist/source/compiler/aslload.c Fri Jun 29 20:16:57 2018 (r335802) @@ -321,8 +321,7 @@ LdLoadFieldElements ( return (Status); } else if (Status == AE_ALREADY_EXISTS && - (Node->Flags & ANOBJ_IS_EXTERNAL) && - Node->OwnerId != WalkState->OwnerId) + (Node->Flags & ANOBJ_IS_EXTERNAL)) { Node->Type = (UINT8) ACPI_TYPE_LOCAL_REGION_FIELD; } @@ -474,7 +473,6 @@ LdNamespace1Begin ( ACPI_PARSE_OBJECT *Arg; UINT32 i; BOOLEAN ForceNewScope = FALSE; - ACPI_OWNER_ID OwnerId = 0; const ACPI_OPCODE_INFO *OpInfo; ACPI_PARSE_OBJECT *ParentOp; @@ -485,23 +483,6 @@ LdNamespace1Begin ( ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Op %p [%s]\n", Op, Op->Asl.ParseOpName)); - if (Op->Asl.ParseOpcode == PARSEOP_DEFINITION_BLOCK) - { - /* - * Allocate an OwnerId for this block. This helps identify the owners - * of each namespace node. This is used in determining whether if - * certain external declarations cause redefinition errors. - */ - Status = AcpiUtAllocateOwnerId (&OwnerId); - WalkState->OwnerId = OwnerId; - if (ACPI_FAILURE (Status)) - { - AslCoreSubsystemError (Op, Status, - "Failure to allocate owner ID to this definition block.", FALSE); - return_ACPI_STATUS (Status); - } - } - /* * We are only interested in opcodes that have an associated name * (or multiple names) @@ -877,9 +858,7 @@ LdNamespace1Begin ( { /* * Allow one create on an object or segment that was - * previously declared External only if WalkState->OwnerId and - * Node->OwnerId are different (meaning that the current WalkState - * and the Node are in different tables). + * previously declared External */ Node->Flags &= ~ANOBJ_IS_EXTERNAL; Node->Type = (UINT8) ObjectType; @@ -896,18 +875,6 @@ LdNamespace1Begin ( } Status = AE_OK; - - if (Node->OwnerId == WalkState->OwnerId && - !(Node->Flags & IMPLICIT_EXTERNAL)) - { - AslDualParseOpError (ASL_WARNING, ASL_MSG_EXTERN_COLLISION, Op, - Op->Asl.ExternalName, ASL_MSG_EXTERN_FOUND_HERE, Node->Op, - Node->Op->Asl.ExternalName); - } - if (Node->Flags & IMPLICIT_EXTERNAL) - { - Node->Flags &= ~IMPLICIT_EXTERNAL; - } } else if (!(Node->Flags & ANOBJ_IS_EXTERNAL) && (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL)) @@ -915,53 +882,15 @@ LdNamespace1Begin ( /* * Allow externals in same scope as the definition of the * actual object. Similar to C. Allows multiple definition - * blocks that refer to each other in the same file. However, - * do not allow name declaration and an external declaration - * within the same table. This is considered a re-declaration. + * blocks that refer to each other in the same file. */ Status = AE_OK; - - if (Node->OwnerId == WalkState->OwnerId) - { - AslDualParseOpError (ASL_WARNING, ASL_MSG_EXTERN_COLLISION, Op, - Op->Asl.ExternalName, ASL_MSG_EXTERN_FOUND_HERE, Node->Op, - Node->Op->Asl.ExternalName); - } } else if ((Node->Flags & ANOBJ_IS_EXTERNAL) && (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL) && (ObjectType == ACPI_TYPE_ANY)) { - /* - * Allow update of externals of unknown type. - * In the case that multiple definition blocks are being - * parsed, updating the OwnerId allows enables subsequent calls - * of this method to understand which table the most recent - * external declaration was seen. Without this OwnerId update, - * code like the following is allowed to compile: - * - * DefinitionBlock("externtest.aml", "DSDT", 0x02, "Intel", "Many", 0x00000001) - * { - * External(ERRS,methodobj) - * Method (MAIN) - * { - * Name(NUM2, 0) - * ERRS(1,2,3) - * } - * } - * - * DefinitionBlock("externtest.aml", "SSDT", 0x02, "Intel", "Many", 0x00000001) - * { - * if (0) - * { - * External(ERRS,methodobj) - * } - * Method (ERRS,3) - * {} - * - * } - */ - Node->OwnerId = WalkState->OwnerId; + /* Allow update of externals of unknown type. */ if (AcpiNsOpensScope (ActualObjectType)) { Modified: vendor-sys/acpica/dist/source/compiler/aslmain.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmain.c Fri Jun 29 19:35:25 2018 (r335801) +++ vendor-sys/acpica/dist/source/compiler/aslmain.c Fri Jun 29 20:16:57 2018 (r335802) @@ -208,7 +208,6 @@ main ( signal (SIGINT, AslSignalHandler); - signal (SIGSEGV, AslSignalHandler); /* * Big-endian machines are not currently supported. ACPI tables must @@ -306,8 +305,7 @@ CleanupAndExit: * * DESCRIPTION: Signal interrupt handler. Delete any intermediate files and * any output files that may be left in an indeterminate state. - * Currently handles SIGINT (control-c) and SIGSEGV (segmentation - * fault). + * Currently handles SIGINT (control-c). * *****************************************************************************/ @@ -329,17 +327,10 @@ AslSignalHandler ( printf ("\n" ASL_PREFIX "\n"); break; - case SIGSEGV: - - /* Even on a seg fault, we will try to delete any partial files */ - - printf (ASL_PREFIX "Segmentation Fault\n"); - break; - default: - printf (ASL_PREFIX "Unknown interrupt signal (%u), ignoring\n", Sig); - return; + printf (ASL_PREFIX "Unknown interrupt signal (%u)\n", Sig); + break; } /* Modified: vendor-sys/acpica/dist/source/compiler/aslmessages.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmessages.c Fri Jun 29 19:35:25 2018 (r335801) +++ vendor-sys/acpica/dist/source/compiler/aslmessages.c Fri Jun 29 20:16:57 2018 (r335802) @@ -356,7 +356,8 @@ const char *AslCompilerMsgs [] = /* ASL_MSG_EXTERN_COLLISION */ "A name cannot be defined and declared external in the same table", /* ASL_MSG_FOUND_HERE_EXTERN */ "Remove one of the declarations indicated above or below:", /* ASL_MSG_OEM_TABLE_ID */ "Invalid OEM Table ID", -/* ASL_MSG_OEM_ID */ "Invalid OEM ID" +/* ASL_MSG_OEM_ID */ "Invalid OEM ID", +/* ASL_MSG_UNLOAD */ "Unload is not supported by all operating systems" }; /* Table compiler */ Modified: vendor-sys/acpica/dist/source/compiler/aslmessages.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslmessages.h Fri Jun 29 19:35:25 2018 (r335801) +++ vendor-sys/acpica/dist/source/compiler/aslmessages.h Fri Jun 29 20:16:57 2018 (r335802) @@ -359,6 +359,7 @@ typedef enum ASL_MSG_EXTERN_FOUND_HERE, ASL_MSG_OEM_TABLE_ID, ASL_MSG_OEM_ID, + ASL_MSG_UNLOAD, /* These messages are used by the Data Table compiler only */ Modified: vendor-sys/acpica/dist/source/compiler/asloptions.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asloptions.c Fri Jun 29 19:35:25 2018 (r335801) +++ vendor-sys/acpica/dist/source/compiler/asloptions.c Fri Jun 29 20:16:57 2018 (r335802) @@ -1080,7 +1080,7 @@ AslDoResponseFile ( * Process all lines in the response file. There must be one complete * option per line */ - while (fgets (StringBuffer, ASL_MSG_BUFFER_SIZE, ResponseFile)) + while (fgets (StringBuffer, ASL_STRING_BUFFER_SIZE, ResponseFile)) { /* Compress all tokens, allowing us to use a single argv entry */ Modified: vendor-sys/acpica/dist/source/compiler/aslparser.y ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslparser.y Fri Jun 29 19:35:25 2018 (r335801) +++ vendor-sys/acpica/dist/source/compiler/aslparser.y Fri Jun 29 20:16:57 2018 (r335802) @@ -208,7 +208,7 @@ AslLocalAllocate ( * These shift/reduce conflicts are expected. There should be zero * reduce/reduce conflicts. */ -%expect 118 +%expect 124 /*! [Begin] no source code translation */ Modified: vendor-sys/acpica/dist/source/compiler/aslprimaries.y ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslprimaries.y Fri Jun 29 19:35:25 2018 (r335801) +++ vendor-sys/acpica/dist/source/compiler/aslprimaries.y Fri Jun 29 20:16:57 2018 (r335802) @@ -235,12 +235,12 @@ BankFieldTerm NameString NameStringItem TermArgItem - ',' AccessTypeKeyword - ',' LockRuleKeyword - ',' UpdateRuleKeyword + OptionalAccessTypeKeyword + OptionalLockRuleKeyword + OptionalUpdateRuleKeyword PARSEOP_CLOSE_PAREN '{' FieldUnitList '}' {$$ = TrLinkOpChildren ($3,7, - $4,$5,$6,$8,$10,$12,$15);} + $4,$5,$6,$7,$8,$9,$12);} | PARSEOP_BANKFIELD PARSEOP_OPEN_PAREN error PARSEOP_CLOSE_PAREN @@ -579,11 +579,11 @@ FieldTerm : PARSEOP_FIELD PARSEOP_OPEN_PAREN {$$ = TrCreateLeafOp (PARSEOP_FIELD);} NameString - ',' AccessTypeKeyword - ',' LockRuleKeyword - ',' UpdateRuleKeyword + OptionalAccessTypeKeyword + OptionalLockRuleKeyword + OptionalUpdateRuleKeyword PARSEOP_CLOSE_PAREN '{' - FieldUnitList '}' {$$ = TrLinkOpChildren ($3,5,$4,$6,$8,$10,$13);} + FieldUnitList '}' {$$ = TrLinkOpChildren ($3,5,$4,$5,$6,$7,$10);} | PARSEOP_FIELD PARSEOP_OPEN_PAREN error PARSEOP_CLOSE_PAREN @@ -711,11 +711,11 @@ IndexFieldTerm PARSEOP_OPEN_PAREN {$$ = TrCreateLeafOp (PARSEOP_INDEXFIELD);} NameString NameStringItem - ',' AccessTypeKeyword - ',' LockRuleKeyword - ',' UpdateRuleKeyword + OptionalAccessTypeKeyword + OptionalLockRuleKeyword + OptionalUpdateRuleKeyword PARSEOP_CLOSE_PAREN '{' - FieldUnitList '}' {$$ = TrLinkOpChildren ($3,6,$4,$5,$7,$9,$11,$14);} + FieldUnitList '}' {$$ = TrLinkOpChildren ($3,6,$4,$5,$6,$7,$8,$11);} | PARSEOP_INDEXFIELD PARSEOP_OPEN_PAREN error PARSEOP_CLOSE_PAREN @@ -946,9 +946,9 @@ MutexTerm : PARSEOP_MUTEX PARSEOP_OPEN_PAREN {$$ = TrCreateLeafOp (PARSEOP_MUTEX);} NameString - ',' ByteConstExpr + OptionalSyncLevel PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($3,2, - TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),$6);} + TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),$5);} | PARSEOP_MUTEX PARSEOP_OPEN_PAREN error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} Modified: vendor-sys/acpica/dist/source/compiler/asltransform.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asltransform.c Fri Jun 29 19:35:25 2018 (r335801) +++ vendor-sys/acpica/dist/source/compiler/asltransform.c Fri Jun 29 20:16:57 2018 (r335802) @@ -496,6 +496,11 @@ TrTransformSubtree ( Op->Asl.Value.String = "\\"; break; + case PARSEOP_UNLOAD: + + AslError (ASL_WARNING, ASL_MSG_UNLOAD, Op, NULL); + break; + default: /* Nothing to do here for other opcodes */ Modified: vendor-sys/acpica/dist/source/compiler/asltypes.y ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asltypes.y Fri Jun 29 19:35:25 2018 (r335801) +++ vendor-sys/acpica/dist/source/compiler/asltypes.y Fri Jun 29 20:16:57 2018 (r335802) @@ -461,6 +461,7 @@ NoEcho(' %type TermArgItem %type OptionalAccessSize +%type OptionalAccessTypeKeyword %type OptionalAddressingMode %type OptionalAddressRange %type OptionalBitsPerByte @@ -475,6 +476,7 @@ NoEcho(' %type OptionalFlowControl %type OptionalIoRestriction %type OptionalListString +%type OptionalLockRuleKeyword %type OptionalMaxType %type OptionalMemType %type OptionalMinType @@ -500,10 +502,12 @@ NoEcho(' %type OptionalSlaveMode %type OptionalStopBits %type OptionalStringData +%type OptionalSyncLevel %type OptionalTermArg %type OptionalTranslationType_Last %type OptionalType %type OptionalType_Last +%type OptionalUpdateRuleKeyword %type OptionalWireMode %type OptionalWordConst %type OptionalWordConstExpr Modified: vendor-sys/acpica/dist/source/components/hardware/hwxfsleep.c ============================================================================== --- vendor-sys/acpica/dist/source/components/hardware/hwxfsleep.c Fri Jun 29 19:35:25 2018 (r335801) +++ vendor-sys/acpica/dist/source/components/hardware/hwxfsleep.c Fri Jun 29 20:16:57 2018 (r335802) @@ -184,17 +184,17 @@ AcpiHwSleepDispatch ( static ACPI_SLEEP_FUNCTIONS AcpiSleepDispatch[] = { - {ACPI_STRUCT_INIT (legacy_function, + {ACPI_STRUCT_INIT (LegacyFunction, ACPI_HW_OPTIONAL_FUNCTION (AcpiHwLegacySleep)), - ACPI_STRUCT_INIT (extended_function, + ACPI_STRUCT_INIT (ExtendedFunction, AcpiHwExtendedSleep) }, - {ACPI_STRUCT_INIT (legacy_function, + {ACPI_STRUCT_INIT (LegacyFunction, ACPI_HW_OPTIONAL_FUNCTION (AcpiHwLegacyWakePrep)), - ACPI_STRUCT_INIT (extended_function, + ACPI_STRUCT_INIT (ExtendedFunction, AcpiHwExtendedWakePrep) }, - {ACPI_STRUCT_INIT (legacy_function, + {ACPI_STRUCT_INIT (Legacy_function, ACPI_HW_OPTIONAL_FUNCTION (AcpiHwLegacyWake)), - ACPI_STRUCT_INIT (extended_function, + ACPI_STRUCT_INIT (ExtendedFunction, AcpiHwExtendedWake) } }; Modified: vendor-sys/acpica/dist/source/components/namespace/nsaccess.c ============================================================================== --- vendor-sys/acpica/dist/source/components/namespace/nsaccess.c Fri Jun 29 19:35:25 2018 (r335801) +++ vendor-sys/acpica/dist/source/components/namespace/nsaccess.c Fri Jun 29 20:16:57 2018 (r335802) @@ -781,13 +781,6 @@ AcpiNsLookup ( else { -#ifdef ACPI_ASL_COMPILER - if (!AcpiGbl_DisasmFlag && (ThisNode->Flags & ANOBJ_IS_EXTERNAL)) - { - ThisNode->Flags &= ~IMPLICIT_EXTERNAL; - } -#endif - /* * Sanity typecheck of the target object: * Modified: vendor-sys/acpica/dist/source/components/namespace/nseval.c ============================================================================== --- vendor-sys/acpica/dist/source/components/namespace/nseval.c Fri Jun 29 19:35:25 2018 (r335801) +++ vendor-sys/acpica/dist/source/components/namespace/nseval.c Fri Jun 29 20:16:57 2018 (r335802) @@ -429,11 +429,11 @@ AcpiNsEvaluate ( Status = AE_OK; } - else if (ACPI_FAILURE(Status)) + else if (ACPI_FAILURE(Status)) { /* If ReturnObject exists, delete it */ - if (Info->ReturnObject) + if (Info->ReturnObject) { AcpiUtRemoveReference (Info->ReturnObject); Info->ReturnObject = NULL; Modified: vendor-sys/acpica/dist/source/components/namespace/nssearch.c ============================================================================== --- vendor-sys/acpica/dist/source/components/namespace/nssearch.c Fri Jun 29 19:35:25 2018 (r335801) +++ vendor-sys/acpica/dist/source/components/namespace/nssearch.c Fri Jun 29 20:16:57 2018 (r335802) @@ -545,7 +545,6 @@ AcpiNsSearchAndEnter ( (WalkState && WalkState->Opcode == AML_SCOPE_OP)) { NewNode->Flags |= ANOBJ_IS_EXTERNAL; - NewNode->Flags |= IMPLICIT_EXTERNAL; } #endif Modified: vendor-sys/acpica/dist/source/include/aclocal.h ============================================================================== --- vendor-sys/acpica/dist/source/include/aclocal.h Fri Jun 29 19:35:25 2018 (r335801) +++ vendor-sys/acpica/dist/source/include/aclocal.h Fri Jun 29 20:16:57 2018 (r335802) @@ -328,7 +328,6 @@ typedef struct acpi_namespace_node #define ANOBJ_EVALUATED 0x20 /* Set on first evaluation of node */ #define ANOBJ_ALLOCATED_BUFFER 0x40 /* Method AML buffer is dynamic (InstallMethod) */ -#define IMPLICIT_EXTERNAL 0x02 /* iASL only: This object created implicitly via External */ #define ANOBJ_IS_EXTERNAL 0x08 /* iASL only: This object created via External() */ #define ANOBJ_METHOD_NO_RETVAL 0x10 /* iASL only: Method has no return value */ #define ANOBJ_METHOD_SOME_NO_RETVAL 0x20 /* iASL only: Method has at least one return value */ Modified: vendor-sys/acpica/dist/source/include/acpixf.h ============================================================================== --- vendor-sys/acpica/dist/source/include/acpixf.h Fri Jun 29 19:35:25 2018 (r335801) +++ vendor-sys/acpica/dist/source/include/acpixf.h Fri Jun 29 20:16:57 2018 (r335802) @@ -154,7 +154,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20180531 +#define ACPI_CA_VERSION 0x20180629 #include "acconfig.h" #include "actypes.h" Modified: vendor-sys/acpica/dist/source/tools/acpisrc/asconvrt.c ============================================================================== --- vendor-sys/acpica/dist/source/tools/acpisrc/asconvrt.c Fri Jun 29 19:35:25 2018 (r335801) +++ vendor-sys/acpica/dist/source/tools/acpisrc/asconvrt.c Fri Jun 29 20:16:57 2018 (r335802) @@ -183,7 +183,6 @@ AsCountLines ( char *Filename); - #define MODULE_HEADER_BEGIN "/******************************************************************************\n *\n * Module Name:"; #define MODULE_HEADER_END " *****************************************************************************/\n\n" #define INTEL_COPYRIGHT " * Copyright (C) 2000 - 2018, Intel Corp.\n" From owner-svn-src-all@freebsd.org Fri Jun 29 20:17:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4DF60F78302; Fri, 29 Jun 2018 20:17:48 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 02B8979DE9; Fri, 29 Jun 2018 20:17:48 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BE77D2598D; Fri, 29 Jun 2018 20:17:47 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5TKHlek094052; Fri, 29 Jun 2018 20:17:47 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5TKHlHK094051; Fri, 29 Jun 2018 20:17:47 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201806292017.w5TKHlHK094051@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 29 Jun 2018 20:17:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r335803 - vendor-sys/acpica/20180629 X-SVN-Group: vendor-sys X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: vendor-sys/acpica/20180629 X-SVN-Commit-Revision: 335803 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.26 Precedence: list List-Id: "SVN commit messages 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, 29 Jun 2018 20:17:48 -0000 Author: jkim Date: Fri Jun 29 20:17:47 2018 New Revision: 335803 URL: https://svnweb.freebsd.org/changeset/base/335803 Log: Tag ACPICA 20180629. Added: vendor-sys/acpica/20180629/ - copied from r335802, vendor-sys/acpica/dist/ From owner-svn-src-all@freebsd.org Fri Jun 29 21:15:18 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56ECEF7C11F; Fri, 29 Jun 2018 21:15:18 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 06BA07BC26; Fri, 29 Jun 2018 21:15:18 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D6A4D2632C; Fri, 29 Jun 2018 21:15:17 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5TLFHel024761; Fri, 29 Jun 2018 21:15:17 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5TLFHcs024760; Fri, 29 Jun 2018 21:15:17 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <201806292115.w5TLFHcs024760@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Fri, 29 Jun 2018 21:15:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335804 - in head: etc usr.sbin/rmt X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: in head: etc usr.sbin/rmt X-SVN-Commit-Revision: 335804 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.26 Precedence: list List-Id: "SVN commit messages 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, 29 Jun 2018 21:15:18 -0000 Author: arichardson Date: Fri Jun 29 21:15:17 2018 New Revision: 335804 URL: https://svnweb.freebsd.org/changeset/base/335804 Log: Fix missing files in METALOG with -DNO_ROOT By using INSTALL_LINK instead of calling ln during install the files end up in the METALOG file as well if we use -DNO_ROOT and will be included in a disk image when using makefs with METALOG as the input. The other file that was not included in METALOG was /var/db/services.db which is now also included for -DNO_ROOT. Approved By: brooks (mentor) Differential Revision: https://reviews.freebsd.org/D15665 Modified: head/etc/Makefile head/usr.sbin/rmt/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Fri Jun 29 20:17:47 2018 (r335803) +++ head/etc/Makefile Fri Jun 29 21:15:17 2018 (r335804) @@ -213,6 +213,7 @@ distribution: echo "./etc/passwd type=file mode=0644 uname=root gname=wheel"; \ echo "./etc/pwd.db type=file mode=0644 uname=root gname=wheel"; \ echo "./etc/spwd.db type=file mode=0600 uname=root gname=wheel"; \ + echo "./var/db/services.db type=file mode=0644 uname=root gname=wheel"; \ ) | ${METALOG.add} .endif .if ${MK_AUTOFS} != "no" @@ -270,7 +271,7 @@ distribution: ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ dot.profile ${DESTDIR}/root/.profile; \ rm -f ${DESTDIR}/.profile; \ - ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile + ${INSTALL_LINK} ${DESTDIR}/root/.profile ${DESTDIR}/.profile .if ${MK_TCSH} != "no" cd ${.CURDIR}/root; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ @@ -278,14 +279,14 @@ distribution: ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ dot.login ${DESTDIR}/root/.login; \ rm -f ${DESTDIR}/.cshrc; \ - ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc + ${INSTALL_LINK} ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc .endif .if ${MK_MAIL} != "no" cd ${.CURDIR}/mail; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${ETCMAIL} ${DESTDIR}/etc/mail if [ -d ${DESTDIR}/etc/mail -a -f ${DESTDIR}/etc/mail/aliases -a \ ! -f ${DESTDIR}/etc/aliases ]; then \ - ln -s mail/aliases ${DESTDIR}/etc/aliases; \ + ${INSTALL_SYMLINK} mail/aliases ${DESTDIR}/etc/aliases; \ fi .endif ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \ Modified: head/usr.sbin/rmt/Makefile ============================================================================== --- head/usr.sbin/rmt/Makefile Fri Jun 29 20:17:47 2018 (r335803) +++ head/usr.sbin/rmt/Makefile Fri Jun 29 21:15:17 2018 (r335804) @@ -7,6 +7,6 @@ MAN= rmt.8 # called from /usr/src/etc/Makefile etc-rmt: rm -f ${DESTDIR}/etc/rmt - ln -s ..${BINDIR}/rmt ${DESTDIR}/etc/rmt + ${INSTALL_RSYMLINK} ..${BINDIR}/rmt ${DESTDIR}/etc/rmt .include From owner-svn-src-all@freebsd.org Fri Jun 29 21:15:27 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5FDB7F7C157; Fri, 29 Jun 2018 21:15:27 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 157997BD14; Fri, 29 Jun 2018 21:15:27 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EB0362632D; Fri, 29 Jun 2018 21:15:26 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5TLFQbN024817; Fri, 29 Jun 2018 21:15:26 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5TLFQDf024815; Fri, 29 Jun 2018 21:15:26 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <201806292115.w5TLFQDf024815@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Fri, 29 Jun 2018 21:15:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335805 - head X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 335805 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.26 Precedence: list List-Id: "SVN commit messages 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, 29 Jun 2018 21:15:27 -0000 Author: arichardson Date: Fri Jun 29 21:15:26 2018 New Revision: 335805 URL: https://svnweb.freebsd.org/changeset/base/335805 Log: Don't change directory owner to root when building with -DNO_ROOT Currently the mtree calls in Makefile.inc1 all change the directory owner to match the spec file. However, we should not be doing this during distributeworld if -DNO_ROOT is passed. Additionally, when creating the WORLDTMP directory hierachy there is no need to change the owner to root so we now always pass the -W flag when populating WORLDTMP. This is also required for building FreeBSD on Linux/Mac since the required groups/users will not exist there which is how I discovered this issue. Reviewed By: emaste, bdrewery, imp Approved By: brooks (mentor) Differential Revision: https://reviews.freebsd.org/D14185 Modified: head/Makefile.inc1 head/Makefile.libcompat Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Jun 29 21:15:17 2018 (r335804) +++ head/Makefile.inc1 Fri Jun 29 21:15:26 2018 (r335805) @@ -852,6 +852,19 @@ IMAKE_INSTALL= INSTALL="install ${INSTALLFLAGS}" IMAKE_MTREE= MTREE_CMD="mtree ${MTREEFLAGS}" .endif +DESTDIR_MTREEFLAGS= -deU +# When creating worldtmp we don't need to set the directories as owned by root +# so we also pass -W +WORLDTMP_MTREEFLAGS= -deUW +.if defined(NO_ROOT) +# When building with -DNO_ROOT we shouldn't be changing the directories +# that are created by mtree to be owned by root/wheel. +DESTDIR_MTREEFLAGS+= -W +.endif +MTREE?= mtree +WORLDTMP_MTREE= ${MTREE} ${WORLDTMP_MTREEFLAGS} +DESTDIR_MTREE= ${MTREE} ${DESTDIR_MTREEFLAGS} + # kernel stage KMAKEENV= ${WMAKEENV:NSYSROOT=*} KMAKE= ${KMAKEENV} ${MAKE} ${.MAKEFLAGS} ${KERNEL_FLAGS} KERNEL=${INSTKERNNAME} @@ -954,23 +967,23 @@ _worldtmp: .PHONY lib lib/casper lib/geom usr legacy/bin legacy/usr mkdir -p ${WORLDTMP}/${_dir} .endfor - mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ + ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ -p ${WORLDTMP}/legacy/usr >/dev/null - mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ + ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${WORLDTMP}/legacy/usr/include >/dev/null - mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ + ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ -p ${WORLDTMP}/usr >/dev/null - mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ + ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${WORLDTMP}/usr/include >/dev/null ln -sf ${.CURDIR}/sys ${WORLDTMP} .if ${MK_DEBUG_FILES} != "no" - mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ + ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ -p ${WORLDTMP}/legacy/usr/lib >/dev/null - mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ + ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ -p ${WORLDTMP}/usr/lib >/dev/null .endif .for _mtree in ${LOCAL_MTREE} - mtree -deU -f ${.CURDIR}/${_mtree} -p ${WORLDTMP} > /dev/null + ${WORLDTMP_MTREE} -f ${.CURDIR}/${_mtree} -p ${WORLDTMP} > /dev/null .endfor _legacy: @echo @@ -1274,42 +1287,42 @@ distributeworld installworld stageworld: _installcheck .if make(distributeworld) .for dist in ${EXTRA_DISTRIBUTIONS} -mkdir ${DESTDIR}/${DISTDIR}/${dist} - mtree -deU -f ${.CURDIR}/etc/mtree/BSD.root.dist \ + ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.root.dist \ -p ${DESTDIR}/${DISTDIR}/${dist} >/dev/null - mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ + ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ -p ${DESTDIR}/${DISTDIR}/${dist}/usr >/dev/null - mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ + ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${DESTDIR}/${DISTDIR}/${dist}/usr/include >/dev/null .if ${MK_DEBUG_FILES} != "no" - mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ + ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ -p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib >/dev/null .endif .if defined(LIBCOMPAT) - mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \ + ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \ -p ${DESTDIR}/${DISTDIR}/${dist}/usr >/dev/null .if ${MK_DEBUG_FILES} != "no" - mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \ + ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \ -p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib/debug/usr >/dev/null .endif .endif .if ${MK_TESTS} != "no" && ${dist} == "tests" -mkdir -p ${DESTDIR}/${DISTDIR}/${dist}${TESTSBASE} - mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \ + ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.tests.dist \ -p ${DESTDIR}/${DISTDIR}/${dist}${TESTSBASE} >/dev/null .if ${MK_DEBUG_FILES} != "no" - mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \ + ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.tests.dist \ -p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib/debug/${TESTSBASE} >/dev/null .endif .endif .if defined(NO_ROOT) - ${IMAKEENV} mtree -C -f ${.CURDIR}/etc/mtree/BSD.root.dist | \ + ${IMAKEENV} ${MTREE} -C -f ${.CURDIR}/etc/mtree/BSD.root.dist | \ sed -e 's#^\./#./${dist}/#' >> ${METALOG} - ${IMAKEENV} mtree -C -f ${.CURDIR}/etc/mtree/BSD.usr.dist | \ + ${IMAKEENV} ${MTREE} -C -f ${.CURDIR}/etc/mtree/BSD.usr.dist | \ sed -e 's#^\./#./${dist}/usr/#' >> ${METALOG} - ${IMAKEENV} mtree -C -f ${.CURDIR}/etc/mtree/BSD.include.dist | \ + ${IMAKEENV} ${MTREE} -C -f ${.CURDIR}/etc/mtree/BSD.include.dist | \ sed -e 's#^\./#./${dist}/usr/include/#' >> ${METALOG} .if defined(LIBCOMPAT) - ${IMAKEENV} mtree -C -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist | \ + ${IMAKEENV} ${MTREE} -C -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist | \ sed -e 's#^\./#./${dist}/usr/#' >> ${METALOG} .endif .endif @@ -2144,7 +2157,7 @@ build-tools: build-tools_${_tool} # kernel-tools: .PHONY mkdir -p ${WORLDTMP}/usr - mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ + ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ -p ${WORLDTMP}/usr >/dev/null # @@ -2401,9 +2414,9 @@ native-xtools: .PHONY native-xtools-install: .PHONY mkdir -p ${NXBDESTDIR}/bin ${NXBDESTDIR}/sbin ${NXBDESTDIR}/usr - mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ + ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ -p ${NXBDESTDIR}/usr >/dev/null - mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ + ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${NXBDESTDIR}/usr/include >/dev/null ${_+_}cd ${.CURDIR}; ${NXBMAKE} \ DESTDIR=${NXBDESTDIR} \ @@ -3016,7 +3029,7 @@ xdev-build: _xb-worldtmp _xb-bootstrap-tools _xb-build _xb-worldtmp: .PHONY mkdir -p ${CDTMP}/usr - mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ + ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ -p ${CDTMP}/usr >/dev/null _xb-bootstrap-tools: .PHONY @@ -3055,19 +3068,19 @@ _xb-cross-tools: .PHONY _xi-mtree: .PHONY ${_+_}@${ECHODIR} "mtree populating ${XDDESTDIR}" mkdir -p ${XDDESTDIR} - mtree -deU -f ${.CURDIR}/etc/mtree/BSD.root.dist \ + ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.root.dist \ -p ${XDDESTDIR} >/dev/null - mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ + ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ -p ${XDDESTDIR}/usr >/dev/null - mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ + ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${XDDESTDIR}/usr/include >/dev/null .if defined(LIBCOMPAT) - mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \ + ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \ -p ${XDDESTDIR}/usr >/dev/null .endif .if ${MK_TESTS} != "no" mkdir -p ${XDDESTDIR}${TESTSBASE} - mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \ + ${DESTDIR_MTREE} -f ${.CURDIR}/etc/mtree/BSD.tests.dist \ -p ${XDDESTDIR}${TESTSBASE} >/dev/null .endif Modified: head/Makefile.libcompat ============================================================================== --- head/Makefile.libcompat Fri Jun 29 21:15:17 2018 (r335804) +++ head/Makefile.libcompat Fri Jun 29 21:15:26 2018 (r335805) @@ -165,16 +165,16 @@ build${libcompat}: .PHONY .endif # !defined(NO_CLEAN) mkdir -p ${LIBCOMPATTMP}/usr/include - mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ + ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ -p ${LIBCOMPATTMP}/usr >/dev/null - mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ + ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${LIBCOMPATTMP}/usr/include >/dev/null - mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \ + ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \ -p ${LIBCOMPATTMP}/usr >/dev/null .if ${MK_DEBUG_FILES} != "no" - mtree -deU -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ + ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.debug.dist \ -p ${LIBCOMPATTMP}/usr/lib >/dev/null - mtree -deU -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \ + ${WORLDTMP_MTREE} -f ${.CURDIR}/etc/mtree/BSD.lib${libcompat}.dist \ -p ${LIBCOMPATTMP}/usr/lib/debug/usr >/dev/null .endif mkdir -p ${WORLDTMP} From owner-svn-src-all@freebsd.org Fri Jun 29 22:17:29 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CDDA7F7F150; Fri, 29 Jun 2018 22:17:28 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54AE97E9CD; Fri, 29 Jun 2018 22:17:28 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [74.217.198.10] (port=57357 helo=[10.1.4.66]) by shxd.cx with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1fYsN2-000CII-2u; Fri, 29 Jun 2018 12:19:24 +0000 From: Devin Teske Message-Id: <63B2C22B-9B7C-4F8C-A153-8B4A6618558A@FreeBSD.org> Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: svn commit: r335690 - head/sys/kern Date: Fri, 29 Jun 2018 15:17:25 -0700 In-Reply-To: Cc: Devin Teske , Gleb Smirnoff , Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Warner Losh References: <201806270411.w5R4B9ZB078994@repo.freebsd.org> <20180627235216.GO1165@FreeBSD.org> <16B9F36D-E92A-4FEC-B096-5E24A4E180FC@FreeBSD.org> <623F6077-0A89-4D35-9E83-76BF40CC290F@FreeBSD.org> <7C4AEADC-1973-482B-A7A5-75F23397D44E@FreeBSD.org> X-Mailer: Apple Mail (2.3273) Sender: devin@shxd.cx Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 29 Jun 2018 22:17:29 -0000 > On Jun 28, 2018, at 12:36 AM, Warner Losh wrote: >=20 >=20 >=20 > On Thu, Jun 28, 2018 at 12:54 AM, Devin Teske > wrote: >=20 >> On Jun 27, 2018, at 7:35 PM, Warner Losh > wrote: >>=20 >>=20 >>=20 >> On Wed, Jun 27, 2018 at 8:14 PM, Devin Teske > wrote: >>=20 >>> On Jun 27, 2018, at 6:58 PM, Warner Losh > wrote: >>>=20 >>>=20 >>>=20 >>> On Wed, Jun 27, 2018 at 7:49 PM, Devin Teske > wrote: >>>=20 >>>> On Jun 27, 2018, at 5:59 PM, Warner Losh > wrote: >>>>=20 >>>>=20 >>>>=20 >>>> On Wed, Jun 27, 2018 at 5:52 PM, Gleb Smirnoff > wrote: >>>> On Wed, Jun 27, 2018 at 04:11:09AM +0000, Warner Losh wrote: >>>> W> Author: imp >>>> W> Date: Wed Jun 27 04:11:09 2018 >>>> W> New Revision: 335690 >>>> W> URL: https://svnweb.freebsd.org/changeset/base/335690 = >>>> W>=20 >>>> W> Log: >>>> W> Fix devctl generation for core files. >>>> W> =20 >>>> W> We have a problem with vn_fullpath_global when the file = exists. Work >>>> W> around it by printing the full path if the core file name = starts with /, >>>> W> or current working directory followed by the filename if not. >>>>=20 >>>> Is this going to work when a core is dumped not at current working = directory, >>>> but at absolute path? e.g. kern.corefile=3D/var/log/cores/%N.core >>>>=20 >>>> Yes. That works. >>>> =20 >>>> Looks like the vn_fullpath_global needs to be fixed rather than = problem >>>> workarounded. >>>>=20 >>>> It can't be fixed reliably. FreeBSD does not and cannot map a vnode = to a name. The only reason we're able to at all is due to the name = cache. And when we recreate a file, we invalidate the name cache. And = even if we fixed that, there's no guarantee the name cache won't get = flushed before we translate the name.... Linux can do this because it = keeps the path name associated with the inode. FreeBSD simply doesn't. >>>>=20 >>>=20 >>> They said it couldn't be done, but I personally have done it ... >>>=20 >>> I map vnodes to full paths in dwatch. It's not impossible, just = implausibly hard. >>>=20 >>> I derived my formula by reading the C code which was very = twisty-turny and rather hard to read at times (and I have been using C = since 1998 on everything from AIX and OSF/1 to HP/UX, Cygwin, MinGW, = FreeBSD, countless Linux-like things, IRIX, and a God-awful remainder of = many others; the vnode code was an adventure to say the least). >>>=20 >>> You're welcome to see how it's done in = /usr/libexec/dwatch/vop_create >>>=20 >>> I load up a clause-local variable named "path" with a path = constructed from a pointer to a vnode structure argument to = VOP_CREATE(9). >>>=20 >>> The D code could easily be rewritten back into C to walk the vnode = to completion (compared to the D code which is bounded by depth-limit = since DTrace doesn't provide loops; so you have to, as I have done, use = a higher-level language wrapper to repeat the code to some desired = limit; dwatch defaulting to 64 for directory depth limit). >>>=20 >>> Compared this, say, to vfssnoop.d from Chapter 5 of the DTrace book = which utilizes the vfs:namei:lookup: probes. My approach in dwatch is = far more accurate, produces full paths, and I've benchmarked it at lower = overhead with better results. >>>=20 >>> Maybe some of this can be useful? If not, just ignore me. >>>=20 >>> IMHO, there's no benefit from the crazy hoops than the super simple = heuristic I did: if the path starts with / print it. If the path doesn't = print cwd / and then the path. >>>=20 >>> I look forward to seeing your conversion of the D to C that works, = even when there's namespace cache pressure. >>>=20 >>=20 >> I was looking at the output of "dwatch -dX vop_create" (the -d flag = to dwatch causes the generated dwatch to be printed instead of executed) = and thinking to myself: >>=20 >> I could easily convert this, as I can recognize the flattened loop = structure. However, not many people will be able to do it. I wasn't = really volunteering, but now I'm curious what other people see when they = run "dwatch -dX vop_create". If it's half as bad as I think it is, then = I'll gladly do it -- but will have to balance it against work = priorities. >>=20 >> We don't have the data you do in vop_create anymore, just the vp at = the point in the code where we want to do the reverse translation... But = we also have a name that's been filled in from the template and cwd, = which gives us almost the same thing as we'd hoped to dig out of the = name cache... >>=20 >=20 > Given: >=20 > struct vnode *vp, const char *fi_name >=20 > Here's a rough (not optimized; unchecked) crack at a C equivalent: >=20 > Thanks, but this code suffers from the same problem that = vn_fullpath_global() suffers from: we clear out parts of the cache when = we open an existing file with O_CREAT. This one NULL leads to a cascade = of failures, as show below. >=20 >=20 >=20 > #include > #include >=20 > #include >=20 > int i, max_depth =3D 64; > char *d_name =3D NULL; > char *fi_fs =3D NULL; > char *fi_mount =3D NULL; > char *cp; > struct namecache *ncp =3D NULL; > struct mount *mount =3D NULL; > struct vnode *dvp =3D NULL; > char *nc[max_depth+1]; > char path[PATH_MAX] =3D __DECONST(char *, ""); >=20 > if (vp !=3D NULL) { > ncp =3D vp->v_cache_dst.tqh_first; >=20 > For my case, this is NULL since we clear out the cache when we = re-create the file. I confirmed this by adding a printf where I put in = my workaround and I get: > vp->v_cache_dst.tqh_first is 0xfffff80003bd7a10 (first time, no = cat.core exists) > vp->v_cache_dst.tqh_first is 0 (second time, cat.core does exist) >=20 > mount =3D vp->v_mount; /* ptr to vfs we are in */ > if (vp->v_cache_dd !=3D NULL) > d_name =3D vp->v_cache_dd->nc_name; > } > if (mount !=3D NULL) { > fi_fs =3D mount->mnt_stat.f_fstypename; > if (fi_fs !=3D NULL && *fi_fs !=3D '\0') { > if (!strcmp(fi_fs, "devfs")) ncp =3D NULL; > } else { > if (fi_name =3D=3D NULL || *fi_name =3D=3D '\0') = ncp =3D NULL; > } > fi_mount =3D mount->mnt_stat.f_mntonname; > } else { > ncp =3D NULL; > } > for (i =3D 0; i <=3D max_depth; i++) { > nc[i] =3D NULL; > } > if (ncp !=3D NULL) { > /* Reach into vnode of parent of name */ > if (ncp->nc_dvp !=3D NULL) > dvp =3D ncp->nc_dvp->v_cache_dst.tqh_first; > if (dvp !=3D NULL) nc[0] =3D dvp->nc_name; > } >=20 > since ncp is NULL here, we never set nc[0] >=20 > =20 > if (nc[0] =3D=3D NULL || *nc[0] =3D=3D '\0' || !strcmp(nc[0], = "/")) > dvp =3D NULL; >=20 > so dvp is NULL > =20 > /* > * BEGIN Pathname-depth loop > */ > for (i =3D 1; i < max_depth; i++) { > if (dvp =3D=3D NULL) break; >=20 > and we break out of this loop without setting any other nc[] entries. > =20 > if (dvp->nc_dvp !=3D NULL) > dvp =3D dvp->nc_dvp->v_cache_dst.tqh_first; > else > dvp =3D NULL; > if (dvp !=3D NULL) nc[i] =3D dvp->nc_name; > } > /* > * END Pathname-depth loop > */ > if (dvp !=3D NULL) { > if (dvp->nc_dvp !=3D NULL) > dvp =3D dvp->nc_dvp->v_cache_dst.tqh_first; > else > dvp =3D NULL; > if (dvp !=3D NULL && dvp->nc_dvp !=3D NULL) > nc[max_depth] =3D __DECONST(char *, "..."); > } > if (fi_mount !=3D NULL) { > /* > * Join full path > * NB: Up-to but not including the parent directory = (joined below) > */ > strcat(path, fi_mount); > if (strcmp(fi_mount, "/")) strcat(path, "/"); > for (i =3D max_depth; i >=3D 0; i--) { > char *namei =3D nc[i]; > strcat(path, namei =3D=3D NULL ? "" : namei); >=20 > which joins a lot of empty strings together > =20 > if (namei !=3D NULL) strcat(path, "/"); > } > /* Join the parent directory name */ > if (d_name !=3D NULL && *d_name !=3D '\0') { > strcat(path, d_name); > strcat(path, "/"); > } > /* Join the entry name */ > if (fi_name !=3D NULL && *fi_name !=3D '\0') > strcat(path, fi_name); >=20 > since we don't have the fi_name from the VOP_CREATE where we want to = do this, we have nothing for here. > =20 > } >=20 > So I appreciate the effort here, but I'm not sure that it's useful in = this context. vn_fullpath* already can do this sort of thing, but can't = in the case where vp->v_cache_dst.tqh_first is NULL. >=20 Thank you so much for the thoughtful response. It means a lot really. --=20 Cheers, Devin= From owner-svn-src-all@freebsd.org Fri Jun 29 22:24:43 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E63CFF7F57E; Fri, 29 Jun 2018 22:24:42 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 845BF7F37C; Fri, 29 Jun 2018 22:24:42 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3D19126EA0; Fri, 29 Jun 2018 22:24:42 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5TMOgCV062647; Fri, 29 Jun 2018 22:24:42 GMT (envelope-from mckusick@FreeBSD.org) Received: (from mckusick@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5TMOfSi062643; Fri, 29 Jun 2018 22:24:41 GMT (envelope-from mckusick@FreeBSD.org) Message-Id: <201806292224.w5TMOfSi062643@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mckusick set sender to mckusick@FreeBSD.org using -f From: Kirk McKusick Date: Fri, 29 Jun 2018 22:24:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335808 - in head/sys/ufs: ffs ufs X-SVN-Group: head X-SVN-Commit-Author: mckusick X-SVN-Commit-Paths: in head/sys/ufs: ffs ufs X-SVN-Commit-Revision: 335808 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.26 Precedence: list List-Id: "SVN commit messages 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, 29 Jun 2018 22:24:43 -0000 Author: mckusick Date: Fri Jun 29 22:24:41 2018 New Revision: 335808 URL: https://svnweb.freebsd.org/changeset/base/335808 Log: Create um_flags in the ufsmount structure to hold flags for a UFS filesystem. Convert integer structure flags to use um_flags: int um_candelete; /* devvp supports TRIM */ int um_writesuspended; /* suspension in progress */ become: #define UM_CANDELETE 0x00000001 /* devvp supports TRIM */ #define UM_WRITESUSPENDED 0x00000002 /* suspension in progress */ This is in preparation for adding other flags to indicate forcible unmount in progress after a disk failure and possibly forcible downgrade to read-only. No functional change intended. Sponsored by: Netflix Modified: head/sys/ufs/ffs/ffs_alloc.c head/sys/ufs/ffs/ffs_suspend.c head/sys/ufs/ffs/ffs_vfsops.c head/sys/ufs/ufs/ufsmount.h Modified: head/sys/ufs/ffs/ffs_alloc.c ============================================================================== --- head/sys/ufs/ffs/ffs_alloc.c Fri Jun 29 22:10:40 2018 (r335807) +++ head/sys/ufs/ffs/ffs_alloc.c Fri Jun 29 22:24:41 2018 (r335808) @@ -495,7 +495,7 @@ ffs_reallocblks(ap) * optimization. Also skip if reallocblks has been disabled globally. */ ump = ap->a_vp->v_mount->mnt_data; - if (ump->um_candelete || doreallocblks == 0) + if (((ump->um_flags) & UM_CANDELETE) != 0 || doreallocblks == 0) return (ENOSPC); /* @@ -2322,7 +2322,7 @@ ffs_blkfree(ump, fs, devvp, bno, size, inum, vtype, de * Nothing to delay if TRIM is disabled, or the operation is * performed on the snapshot. */ - if (!ump->um_candelete || devvp->v_type == VREG) { + if (((ump->um_flags) & UM_CANDELETE) == 0 || devvp->v_type == VREG) { ffs_blkfree_cg(ump, fs, devvp, bno, size, inum, dephd); return; } Modified: head/sys/ufs/ffs/ffs_suspend.c ============================================================================== --- head/sys/ufs/ffs/ffs_suspend.c Fri Jun 29 22:10:40 2018 (r335807) +++ head/sys/ufs/ffs/ffs_suspend.c Fri Jun 29 22:24:41 2018 (r335808) @@ -78,7 +78,7 @@ ffs_susp_suspended(struct mount *mp) sx_assert(&ffs_susp_lock, SA_LOCKED); ump = VFSTOUFS(mp); - if (ump->um_writesuspended) + if ((ump->um_flags & UM_WRITESUSPENDED) != 0) return (1); return (0); } @@ -210,7 +210,7 @@ ffs_susp_suspend(struct mount *mp) if ((error = vfs_write_suspend(mp, VS_SKIP_UNMOUNT)) != 0) return (error); - ump->um_writesuspended = 1; + ump->um_flags |= UM_WRITESUSPENDED; return (0); } @@ -255,7 +255,7 @@ ffs_susp_dtor(void *data) vfs_write_resume(mp, 0); vfs_unbusy(mp); - ump->um_writesuspended = 0; + ump->um_flags &= ~UM_WRITESUSPENDED; sx_xunlock(&ffs_susp_lock); } Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Fri Jun 29 22:10:40 2018 (r335807) +++ head/sys/ufs/ffs/ffs_vfsops.c Fri Jun 29 22:24:41 2018 (r335808) @@ -770,6 +770,7 @@ ffs_mountfs(devvp, mp, td) struct ucred *cred; struct g_consumer *cp; struct mount *nmp; + int candelete; fs = NULL; ump = NULL; @@ -960,8 +961,10 @@ ffs_mountfs(devvp, mp, td) if ((fs->fs_flags & FS_TRIM) != 0) { len = sizeof(int); if (g_io_getattr("GEOM::candelete", cp, &len, - &ump->um_candelete) == 0) { - if (!ump->um_candelete) + &candelete) == 0) { + if (candelete) + ump->um_flags |= UM_CANDELETE; + else printf("WARNING: %s: TRIM flag on fs but disk " "does not support TRIM\n", mp->mnt_stat.f_mntonname); @@ -969,9 +972,8 @@ ffs_mountfs(devvp, mp, td) printf("WARNING: %s: TRIM flag on fs but disk does " "not confirm that it supports TRIM\n", mp->mnt_stat.f_mntonname); - ump->um_candelete = 0; } - if (ump->um_candelete) { + if (((ump->um_flags) & UM_CANDELETE) != 0) { ump->um_trim_tq = taskqueue_create("trim", M_WAITOK, taskqueue_thread_enqueue, &ump->um_trim_tq); taskqueue_start_threads(&ump->um_trim_tq, 1, PVFS, Modified: head/sys/ufs/ufs/ufsmount.h ============================================================================== --- head/sys/ufs/ufs/ufsmount.h Fri Jun 29 22:10:40 2018 (r335807) +++ head/sys/ufs/ufs/ufsmount.h Fri Jun 29 22:24:41 2018 (r335808) @@ -86,10 +86,9 @@ struct ufsmount { time_t um_itime[MAXQUOTAS]; /* inode quota time limit */ char um_qflags[MAXQUOTAS]; /* quota specific flags */ int64_t um_savedmaxfilesize; /* XXX - limit maxfilesize */ - int um_candelete; /* devvp supports TRIM */ - int um_writesuspended; /* suspension in progress */ - u_int um_trim_inflight; - struct taskqueue *um_trim_tq; + u_int um_flags; /* filesystem flags */ + u_int um_trim_inflight; /* outstanding trim count */ + struct taskqueue *um_trim_tq; /* trim request queue */ int (*um_balloc)(struct vnode *, off_t, int, struct ucred *, int, struct buf **); int (*um_blkatoff)(struct vnode *, off_t, char **, struct buf **); @@ -103,6 +102,15 @@ struct ufsmount { void (*um_snapgone)(struct inode *); }; +/* + * filesystem flags + */ +#define UM_CANDELETE 0x00000001 /* devvp supports TRIM */ +#define UM_WRITESUSPENDED 0x00000002 /* suspension in progress */ + +/* + * function prototypes + */ #define UFS_BALLOC(aa, bb, cc, dd, ee, ff) VFSTOUFS((aa)->v_mount)->um_balloc(aa, bb, cc, dd, ee, ff) #define UFS_BLKATOFF(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_blkatoff(aa, bb, cc, dd) #define UFS_TRUNCATE(aa, bb, cc, dd) VFSTOUFS((aa)->v_mount)->um_truncate(aa, bb, cc, dd) From owner-svn-src-all@freebsd.org Fri Jun 29 23:48:35 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0690CFD400C; Fri, 29 Jun 2018 23:48:35 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A2FF0818EA; Fri, 29 Jun 2018 23:48:34 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 823B827B80; Fri, 29 Jun 2018 23:48:34 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5TNmYfd004127; Fri, 29 Jun 2018 23:48:34 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5TNmUOh004108; Fri, 29 Jun 2018 23:48:30 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201806292348.w5TNmUOh004108@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 29 Jun 2018 23:48:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335809 - in head/sys/contrib/dev/acpica: . common compiler components/hardware components/namespace include X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in head/sys/contrib/dev/acpica: . common compiler components/hardware components/namespace include X-SVN-Commit-Revision: 335809 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.26 Precedence: list List-Id: "SVN commit messages 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, 29 Jun 2018 23:48:35 -0000 Author: jkim Date: Fri Jun 29 23:48:30 2018 New Revision: 335809 URL: https://svnweb.freebsd.org/changeset/base/335809 Log: MFV: r335802 Merge ACPICA 20180629. Modified: head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/common/dmextern.c head/sys/contrib/dev/acpica/compiler/aslglobal.h head/sys/contrib/dev/acpica/compiler/aslhelpers.y head/sys/contrib/dev/acpica/compiler/aslload.c head/sys/contrib/dev/acpica/compiler/aslmain.c head/sys/contrib/dev/acpica/compiler/aslmessages.c head/sys/contrib/dev/acpica/compiler/aslmessages.h head/sys/contrib/dev/acpica/compiler/asloptions.c head/sys/contrib/dev/acpica/compiler/aslparser.y head/sys/contrib/dev/acpica/compiler/aslprimaries.y head/sys/contrib/dev/acpica/compiler/asltransform.c head/sys/contrib/dev/acpica/compiler/asltypes.y head/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c head/sys/contrib/dev/acpica/components/namespace/nsaccess.c head/sys/contrib/dev/acpica/components/namespace/nseval.c head/sys/contrib/dev/acpica/components/namespace/nssearch.c head/sys/contrib/dev/acpica/include/aclocal.h head/sys/contrib/dev/acpica/include/acpixf.h Directory Properties: head/sys/contrib/dev/acpica/ (props changed) Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Fri Jun 29 22:24:41 2018 (r335808) +++ head/sys/contrib/dev/acpica/changes.txt Fri Jun 29 23:48:30 2018 (r335809) @@ -1,4 +1,63 @@ ---------------------------------------- +29 June 2018. Summary of changes for version 20180629: + + +1) iASL Compiler/Disassembler and Tools: + +iASL: Fixed a regression related to the use of the ASL External +statement. Error checking for the use of the External() statement has +been relaxed. Previously, a restriction on the use of External meant that +the referenced named object was required to be defined in a different +table (an SSDT). Thus it would be an error to declare an object as an +external and then define the same named object in the same table. For +example: + DefinitionBlock (...) + { + External (DEV1) + Device (DEV1){...} // This was an error + } +However, this behavior has caused regressions in some existing ASL code, +because there is code that depends on named objects and externals (with +the same name) being declared in the same table. This change will allow +the ASL code above to compile without errors or warnings. + +iASL: Implemented ASL language extensions for four operators to make some +of their arguments optional instead of required: + 1) Field (RegionName, AccessType, LockRule, UpdateRule) + 2) BankField (RegionName, BankName, BankValue, + AccessType, LockRule, UpdateRule) + 3) IndexField (IndexName, DataName, + AccessType, LockRule, UpdateRule) +For the Field operators above, the AccessType, LockRule, and UpdateRule +are now optional arguments. The default values are: + AccessType: AnyAcc + LockRule: NoLock + UpdateRule: Preserve + 4) Mutex (MutexName, SyncLevel) +For this operator, the SyncLevel argument is now optional. This argument +is rarely used in any meaningful way by ASL code, and thus it makes sense +to make it optional. The default value is: + SyncLevel: 0 + +iASL: Attempted use of the ASL Unload() operator now results in the +following warning: + "Unload is not supported by all operating systems" +This is in fact very true, and the Unload operator may be completely +deprecated in the near future. + +AcpiExec: Fixed a regression for the -fi option (Namespace initialization +file. Recent changes in the ACPICA module-level code support altered the +table load/initialization sequence . This means that the table load has +become a large method execution of the table itself. If Operation Region +Fields are used within any module-level code and the -fi option was +specified, the initialization values were populated only after the table +had completely finished loading (and thus the module-level code had +already been executed). This change moves the initialization of objects +listed in the initialization file to before the table is executed as a +method. Field unit values are now initialized before the table execution +is performed. + +---------------------------------------- 31 May 2018. Summary of changes for version 20180531: Modified: head/sys/contrib/dev/acpica/common/dmextern.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmextern.c Fri Jun 29 22:24:41 2018 (r335808) +++ head/sys/contrib/dev/acpica/common/dmextern.c Fri Jun 29 23:48:30 2018 (r335809) @@ -538,7 +538,7 @@ AcpiDmGetExternalsFromFile ( /* Each line defines a method */ - while (fgets (StringBuffer, ASL_MSG_BUFFER_SIZE, ExternalRefFile)) + while (fgets (StringBuffer, ASL_STRING_BUFFER_SIZE, ExternalRefFile)) { Token = strtok (StringBuffer, METHOD_SEPARATORS); /* "External" */ if (!Token) Modified: head/sys/contrib/dev/acpica/compiler/aslglobal.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslglobal.h Fri Jun 29 22:24:41 2018 (r335808) +++ head/sys/contrib/dev/acpica/compiler/aslglobal.h Fri Jun 29 23:48:30 2018 (r335809) @@ -251,7 +251,8 @@ extern int AslCompilerdebug; #define ASL_DEFAULT_LINE_BUFFER_SIZE (1024 * 32) /* 32K */ -#define ASL_MSG_BUFFER_SIZE (1024 * 32) /* 32k */ +#define ASL_MSG_BUFFER_SIZE (1024 * 128) /* 128k */ +#define ASL_STRING_BUFFER_SIZE (1024 * 32) /* 32k */ #define ASL_MAX_DISABLED_MESSAGES 32 #define ASL_MAX_EXPECTED_MESSAGES 32 #define HEX_TABLE_LINE_SIZE 8 @@ -438,8 +439,8 @@ ASL_EXTERN UINT8 AslGbl_NamespaceEv ASL_EXTERN UINT8 Gbl_AmlBuffer[HEX_LISTING_LINE_SIZE]; ASL_EXTERN char MsgBuffer[ASL_MSG_BUFFER_SIZE]; -ASL_EXTERN char StringBuffer[ASL_MSG_BUFFER_SIZE]; -ASL_EXTERN char StringBuffer2[ASL_MSG_BUFFER_SIZE]; +ASL_EXTERN char StringBuffer[ASL_STRING_BUFFER_SIZE]; +ASL_EXTERN char StringBuffer2[ASL_STRING_BUFFER_SIZE]; ASL_EXTERN UINT32 Gbl_DisabledMessages[ASL_MAX_DISABLED_MESSAGES]; ASL_EXTERN ASL_EXPECTED_MESSAGE Gbl_ExpectedMessages[ASL_MAX_EXPECTED_MESSAGES]; Modified: head/sys/contrib/dev/acpica/compiler/aslhelpers.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslhelpers.y Fri Jun 29 22:24:41 2018 (r335808) +++ head/sys/contrib/dev/acpica/compiler/aslhelpers.y Fri Jun 29 23:48:30 2018 (r335809) @@ -183,6 +183,14 @@ OptionalAccessSize | ',' ByteConstExpr {$$ = $2;} ; +OptionalAccessTypeKeyword /* Default: AnyAcc */ + : {$$ = TrCreateLeafOp ( + PARSEOP_ACCESSTYPE_ANY);} + | ',' {$$ = TrCreateLeafOp ( + PARSEOP_ACCESSTYPE_ANY);} + | ',' AccessTypeKeyword {$$ = $2;} + ; + OptionalAddressingMode : ',' {$$ = NULL;} | ',' AddressingModeKeyword {$$ = $2;} @@ -252,6 +260,14 @@ OptionalListString | ',' TermArg {$$ = $2;} ; +OptionalLockRuleKeyword /* Default: NoLock */ + : {$$ = TrCreateLeafOp ( + PARSEOP_LOCKRULE_NOLOCK);} + | ',' {$$ = TrCreateLeafOp ( + PARSEOP_LOCKRULE_NOLOCK);} + | ',' LockRuleKeyword {$$ = $2;} + ; + OptionalMaxType : ',' {$$ = NULL;} | ',' MaxKeyword {$$ = $2;} @@ -366,6 +382,14 @@ OptionalStringData | ',' StringData {$$ = $2;} ; +OptionalSyncLevel /* Default: 0 */ + : {$$ = TrCreateValuedLeafOp ( + PARSEOP_BYTECONST, 0);} + | ',' {$$ = TrCreateValuedLeafOp ( + PARSEOP_BYTECONST, 0);} + | ',' ByteConstExpr {$$ = $2;} + ; + OptionalTranslationType_Last : {$$ = NULL;} | ',' {$$ = NULL;} @@ -382,6 +406,14 @@ OptionalType_Last : {$$ = NULL;} | ',' {$$ = NULL;} | ',' TypeKeyword {$$ = $2;} + ; + +OptionalUpdateRuleKeyword /* Default: Preserve */ + : {$$ = TrCreateLeafOp ( + PARSEOP_UPDATERULE_PRESERVE);} + | ',' {$$ = TrCreateLeafOp ( + PARSEOP_UPDATERULE_PRESERVE);} + | ',' UpdateRuleKeyword {$$ = $2;} ; OptionalWireMode Modified: head/sys/contrib/dev/acpica/compiler/aslload.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslload.c Fri Jun 29 22:24:41 2018 (r335808) +++ head/sys/contrib/dev/acpica/compiler/aslload.c Fri Jun 29 23:48:30 2018 (r335809) @@ -321,8 +321,7 @@ LdLoadFieldElements ( return (Status); } else if (Status == AE_ALREADY_EXISTS && - (Node->Flags & ANOBJ_IS_EXTERNAL) && - Node->OwnerId != WalkState->OwnerId) + (Node->Flags & ANOBJ_IS_EXTERNAL)) { Node->Type = (UINT8) ACPI_TYPE_LOCAL_REGION_FIELD; } @@ -474,7 +473,6 @@ LdNamespace1Begin ( ACPI_PARSE_OBJECT *Arg; UINT32 i; BOOLEAN ForceNewScope = FALSE; - ACPI_OWNER_ID OwnerId = 0; const ACPI_OPCODE_INFO *OpInfo; ACPI_PARSE_OBJECT *ParentOp; @@ -485,23 +483,6 @@ LdNamespace1Begin ( ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Op %p [%s]\n", Op, Op->Asl.ParseOpName)); - if (Op->Asl.ParseOpcode == PARSEOP_DEFINITION_BLOCK) - { - /* - * Allocate an OwnerId for this block. This helps identify the owners - * of each namespace node. This is used in determining whether if - * certain external declarations cause redefinition errors. - */ - Status = AcpiUtAllocateOwnerId (&OwnerId); - WalkState->OwnerId = OwnerId; - if (ACPI_FAILURE (Status)) - { - AslCoreSubsystemError (Op, Status, - "Failure to allocate owner ID to this definition block.", FALSE); - return_ACPI_STATUS (Status); - } - } - /* * We are only interested in opcodes that have an associated name * (or multiple names) @@ -877,9 +858,7 @@ LdNamespace1Begin ( { /* * Allow one create on an object or segment that was - * previously declared External only if WalkState->OwnerId and - * Node->OwnerId are different (meaning that the current WalkState - * and the Node are in different tables). + * previously declared External */ Node->Flags &= ~ANOBJ_IS_EXTERNAL; Node->Type = (UINT8) ObjectType; @@ -896,18 +875,6 @@ LdNamespace1Begin ( } Status = AE_OK; - - if (Node->OwnerId == WalkState->OwnerId && - !(Node->Flags & IMPLICIT_EXTERNAL)) - { - AslDualParseOpError (ASL_WARNING, ASL_MSG_EXTERN_COLLISION, Op, - Op->Asl.ExternalName, ASL_MSG_EXTERN_FOUND_HERE, Node->Op, - Node->Op->Asl.ExternalName); - } - if (Node->Flags & IMPLICIT_EXTERNAL) - { - Node->Flags &= ~IMPLICIT_EXTERNAL; - } } else if (!(Node->Flags & ANOBJ_IS_EXTERNAL) && (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL)) @@ -915,53 +882,15 @@ LdNamespace1Begin ( /* * Allow externals in same scope as the definition of the * actual object. Similar to C. Allows multiple definition - * blocks that refer to each other in the same file. However, - * do not allow name declaration and an external declaration - * within the same table. This is considered a re-declaration. + * blocks that refer to each other in the same file. */ Status = AE_OK; - - if (Node->OwnerId == WalkState->OwnerId) - { - AslDualParseOpError (ASL_WARNING, ASL_MSG_EXTERN_COLLISION, Op, - Op->Asl.ExternalName, ASL_MSG_EXTERN_FOUND_HERE, Node->Op, - Node->Op->Asl.ExternalName); - } } else if ((Node->Flags & ANOBJ_IS_EXTERNAL) && (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL) && (ObjectType == ACPI_TYPE_ANY)) { - /* - * Allow update of externals of unknown type. - * In the case that multiple definition blocks are being - * parsed, updating the OwnerId allows enables subsequent calls - * of this method to understand which table the most recent - * external declaration was seen. Without this OwnerId update, - * code like the following is allowed to compile: - * - * DefinitionBlock("externtest.aml", "DSDT", 0x02, "Intel", "Many", 0x00000001) - * { - * External(ERRS,methodobj) - * Method (MAIN) - * { - * Name(NUM2, 0) - * ERRS(1,2,3) - * } - * } - * - * DefinitionBlock("externtest.aml", "SSDT", 0x02, "Intel", "Many", 0x00000001) - * { - * if (0) - * { - * External(ERRS,methodobj) - * } - * Method (ERRS,3) - * {} - * - * } - */ - Node->OwnerId = WalkState->OwnerId; + /* Allow update of externals of unknown type. */ if (AcpiNsOpensScope (ActualObjectType)) { Modified: head/sys/contrib/dev/acpica/compiler/aslmain.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmain.c Fri Jun 29 22:24:41 2018 (r335808) +++ head/sys/contrib/dev/acpica/compiler/aslmain.c Fri Jun 29 23:48:30 2018 (r335809) @@ -208,7 +208,6 @@ main ( signal (SIGINT, AslSignalHandler); - signal (SIGSEGV, AslSignalHandler); /* * Big-endian machines are not currently supported. ACPI tables must @@ -306,8 +305,7 @@ CleanupAndExit: * * DESCRIPTION: Signal interrupt handler. Delete any intermediate files and * any output files that may be left in an indeterminate state. - * Currently handles SIGINT (control-c) and SIGSEGV (segmentation - * fault). + * Currently handles SIGINT (control-c). * *****************************************************************************/ @@ -329,17 +327,10 @@ AslSignalHandler ( printf ("\n" ASL_PREFIX "\n"); break; - case SIGSEGV: - - /* Even on a seg fault, we will try to delete any partial files */ - - printf (ASL_PREFIX "Segmentation Fault\n"); - break; - default: - printf (ASL_PREFIX "Unknown interrupt signal (%u), ignoring\n", Sig); - return; + printf (ASL_PREFIX "Unknown interrupt signal (%u)\n", Sig); + break; } /* Modified: head/sys/contrib/dev/acpica/compiler/aslmessages.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmessages.c Fri Jun 29 22:24:41 2018 (r335808) +++ head/sys/contrib/dev/acpica/compiler/aslmessages.c Fri Jun 29 23:48:30 2018 (r335809) @@ -356,7 +356,8 @@ const char *AslCompilerMsgs [] = /* ASL_MSG_EXTERN_COLLISION */ "A name cannot be defined and declared external in the same table", /* ASL_MSG_FOUND_HERE_EXTERN */ "Remove one of the declarations indicated above or below:", /* ASL_MSG_OEM_TABLE_ID */ "Invalid OEM Table ID", -/* ASL_MSG_OEM_ID */ "Invalid OEM ID" +/* ASL_MSG_OEM_ID */ "Invalid OEM ID", +/* ASL_MSG_UNLOAD */ "Unload is not supported by all operating systems" }; /* Table compiler */ Modified: head/sys/contrib/dev/acpica/compiler/aslmessages.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmessages.h Fri Jun 29 22:24:41 2018 (r335808) +++ head/sys/contrib/dev/acpica/compiler/aslmessages.h Fri Jun 29 23:48:30 2018 (r335809) @@ -359,6 +359,7 @@ typedef enum ASL_MSG_EXTERN_FOUND_HERE, ASL_MSG_OEM_TABLE_ID, ASL_MSG_OEM_ID, + ASL_MSG_UNLOAD, /* These messages are used by the Data Table compiler only */ Modified: head/sys/contrib/dev/acpica/compiler/asloptions.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asloptions.c Fri Jun 29 22:24:41 2018 (r335808) +++ head/sys/contrib/dev/acpica/compiler/asloptions.c Fri Jun 29 23:48:30 2018 (r335809) @@ -1074,7 +1074,7 @@ AslDoResponseFile ( * Process all lines in the response file. There must be one complete * option per line */ - while (fgets (StringBuffer, ASL_MSG_BUFFER_SIZE, ResponseFile)) + while (fgets (StringBuffer, ASL_STRING_BUFFER_SIZE, ResponseFile)) { /* Compress all tokens, allowing us to use a single argv entry */ Modified: head/sys/contrib/dev/acpica/compiler/aslparser.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslparser.y Fri Jun 29 22:24:41 2018 (r335808) +++ head/sys/contrib/dev/acpica/compiler/aslparser.y Fri Jun 29 23:48:30 2018 (r335809) @@ -208,7 +208,7 @@ AslLocalAllocate ( * These shift/reduce conflicts are expected. There should be zero * reduce/reduce conflicts. */ -%expect 118 +%expect 124 /*! [Begin] no source code translation */ Modified: head/sys/contrib/dev/acpica/compiler/aslprimaries.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslprimaries.y Fri Jun 29 22:24:41 2018 (r335808) +++ head/sys/contrib/dev/acpica/compiler/aslprimaries.y Fri Jun 29 23:48:30 2018 (r335809) @@ -235,12 +235,12 @@ BankFieldTerm NameString NameStringItem TermArgItem - ',' AccessTypeKeyword - ',' LockRuleKeyword - ',' UpdateRuleKeyword + OptionalAccessTypeKeyword + OptionalLockRuleKeyword + OptionalUpdateRuleKeyword PARSEOP_CLOSE_PAREN '{' FieldUnitList '}' {$$ = TrLinkOpChildren ($3,7, - $4,$5,$6,$8,$10,$12,$15);} + $4,$5,$6,$7,$8,$9,$12);} | PARSEOP_BANKFIELD PARSEOP_OPEN_PAREN error PARSEOP_CLOSE_PAREN @@ -579,11 +579,11 @@ FieldTerm : PARSEOP_FIELD PARSEOP_OPEN_PAREN {$$ = TrCreateLeafOp (PARSEOP_FIELD);} NameString - ',' AccessTypeKeyword - ',' LockRuleKeyword - ',' UpdateRuleKeyword + OptionalAccessTypeKeyword + OptionalLockRuleKeyword + OptionalUpdateRuleKeyword PARSEOP_CLOSE_PAREN '{' - FieldUnitList '}' {$$ = TrLinkOpChildren ($3,5,$4,$6,$8,$10,$13);} + FieldUnitList '}' {$$ = TrLinkOpChildren ($3,5,$4,$5,$6,$7,$10);} | PARSEOP_FIELD PARSEOP_OPEN_PAREN error PARSEOP_CLOSE_PAREN @@ -711,11 +711,11 @@ IndexFieldTerm PARSEOP_OPEN_PAREN {$$ = TrCreateLeafOp (PARSEOP_INDEXFIELD);} NameString NameStringItem - ',' AccessTypeKeyword - ',' LockRuleKeyword - ',' UpdateRuleKeyword + OptionalAccessTypeKeyword + OptionalLockRuleKeyword + OptionalUpdateRuleKeyword PARSEOP_CLOSE_PAREN '{' - FieldUnitList '}' {$$ = TrLinkOpChildren ($3,6,$4,$5,$7,$9,$11,$14);} + FieldUnitList '}' {$$ = TrLinkOpChildren ($3,6,$4,$5,$6,$7,$8,$11);} | PARSEOP_INDEXFIELD PARSEOP_OPEN_PAREN error PARSEOP_CLOSE_PAREN @@ -946,9 +946,9 @@ MutexTerm : PARSEOP_MUTEX PARSEOP_OPEN_PAREN {$$ = TrCreateLeafOp (PARSEOP_MUTEX);} NameString - ',' ByteConstExpr + OptionalSyncLevel PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($3,2, - TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),$6);} + TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),$5);} | PARSEOP_MUTEX PARSEOP_OPEN_PAREN error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} Modified: head/sys/contrib/dev/acpica/compiler/asltransform.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asltransform.c Fri Jun 29 22:24:41 2018 (r335808) +++ head/sys/contrib/dev/acpica/compiler/asltransform.c Fri Jun 29 23:48:30 2018 (r335809) @@ -496,6 +496,11 @@ TrTransformSubtree ( Op->Asl.Value.String = "\\"; break; + case PARSEOP_UNLOAD: + + AslError (ASL_WARNING, ASL_MSG_UNLOAD, Op, NULL); + break; + default: /* Nothing to do here for other opcodes */ Modified: head/sys/contrib/dev/acpica/compiler/asltypes.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asltypes.y Fri Jun 29 22:24:41 2018 (r335808) +++ head/sys/contrib/dev/acpica/compiler/asltypes.y Fri Jun 29 23:48:30 2018 (r335809) @@ -461,6 +461,7 @@ NoEcho(' %type TermArgItem %type OptionalAccessSize +%type OptionalAccessTypeKeyword %type OptionalAddressingMode %type OptionalAddressRange %type OptionalBitsPerByte @@ -475,6 +476,7 @@ NoEcho(' %type OptionalFlowControl %type OptionalIoRestriction %type OptionalListString +%type OptionalLockRuleKeyword %type OptionalMaxType %type OptionalMemType %type OptionalMinType @@ -500,10 +502,12 @@ NoEcho(' %type OptionalSlaveMode %type OptionalStopBits %type OptionalStringData +%type OptionalSyncLevel %type OptionalTermArg %type OptionalTranslationType_Last %type OptionalType %type OptionalType_Last +%type OptionalUpdateRuleKeyword %type OptionalWireMode %type OptionalWordConst %type OptionalWordConstExpr Modified: head/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c ============================================================================== --- head/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c Fri Jun 29 22:24:41 2018 (r335808) +++ head/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c Fri Jun 29 23:48:30 2018 (r335809) @@ -184,17 +184,17 @@ AcpiHwSleepDispatch ( static ACPI_SLEEP_FUNCTIONS AcpiSleepDispatch[] = { - {ACPI_STRUCT_INIT (legacy_function, + {ACPI_STRUCT_INIT (LegacyFunction, ACPI_HW_OPTIONAL_FUNCTION (AcpiHwLegacySleep)), - ACPI_STRUCT_INIT (extended_function, + ACPI_STRUCT_INIT (ExtendedFunction, AcpiHwExtendedSleep) }, - {ACPI_STRUCT_INIT (legacy_function, + {ACPI_STRUCT_INIT (LegacyFunction, ACPI_HW_OPTIONAL_FUNCTION (AcpiHwLegacyWakePrep)), - ACPI_STRUCT_INIT (extended_function, + ACPI_STRUCT_INIT (ExtendedFunction, AcpiHwExtendedWakePrep) }, - {ACPI_STRUCT_INIT (legacy_function, + {ACPI_STRUCT_INIT (Legacy_function, ACPI_HW_OPTIONAL_FUNCTION (AcpiHwLegacyWake)), - ACPI_STRUCT_INIT (extended_function, + ACPI_STRUCT_INIT (ExtendedFunction, AcpiHwExtendedWake) } }; Modified: head/sys/contrib/dev/acpica/components/namespace/nsaccess.c ============================================================================== --- head/sys/contrib/dev/acpica/components/namespace/nsaccess.c Fri Jun 29 22:24:41 2018 (r335808) +++ head/sys/contrib/dev/acpica/components/namespace/nsaccess.c Fri Jun 29 23:48:30 2018 (r335809) @@ -781,13 +781,6 @@ AcpiNsLookup ( else { -#ifdef ACPI_ASL_COMPILER - if (!AcpiGbl_DisasmFlag && (ThisNode->Flags & ANOBJ_IS_EXTERNAL)) - { - ThisNode->Flags &= ~IMPLICIT_EXTERNAL; - } -#endif - /* * Sanity typecheck of the target object: * Modified: head/sys/contrib/dev/acpica/components/namespace/nseval.c ============================================================================== --- head/sys/contrib/dev/acpica/components/namespace/nseval.c Fri Jun 29 22:24:41 2018 (r335808) +++ head/sys/contrib/dev/acpica/components/namespace/nseval.c Fri Jun 29 23:48:30 2018 (r335809) @@ -429,11 +429,11 @@ AcpiNsEvaluate ( Status = AE_OK; } - else if (ACPI_FAILURE(Status)) + else if (ACPI_FAILURE(Status)) { /* If ReturnObject exists, delete it */ - if (Info->ReturnObject) + if (Info->ReturnObject) { AcpiUtRemoveReference (Info->ReturnObject); Info->ReturnObject = NULL; Modified: head/sys/contrib/dev/acpica/components/namespace/nssearch.c ============================================================================== --- head/sys/contrib/dev/acpica/components/namespace/nssearch.c Fri Jun 29 22:24:41 2018 (r335808) +++ head/sys/contrib/dev/acpica/components/namespace/nssearch.c Fri Jun 29 23:48:30 2018 (r335809) @@ -545,7 +545,6 @@ AcpiNsSearchAndEnter ( (WalkState && WalkState->Opcode == AML_SCOPE_OP)) { NewNode->Flags |= ANOBJ_IS_EXTERNAL; - NewNode->Flags |= IMPLICIT_EXTERNAL; } #endif Modified: head/sys/contrib/dev/acpica/include/aclocal.h ============================================================================== --- head/sys/contrib/dev/acpica/include/aclocal.h Fri Jun 29 22:24:41 2018 (r335808) +++ head/sys/contrib/dev/acpica/include/aclocal.h Fri Jun 29 23:48:30 2018 (r335809) @@ -328,7 +328,6 @@ typedef struct acpi_namespace_node #define ANOBJ_EVALUATED 0x20 /* Set on first evaluation of node */ #define ANOBJ_ALLOCATED_BUFFER 0x40 /* Method AML buffer is dynamic (InstallMethod) */ -#define IMPLICIT_EXTERNAL 0x02 /* iASL only: This object created implicitly via External */ #define ANOBJ_IS_EXTERNAL 0x08 /* iASL only: This object created via External() */ #define ANOBJ_METHOD_NO_RETVAL 0x10 /* iASL only: Method has no return value */ #define ANOBJ_METHOD_SOME_NO_RETVAL 0x20 /* iASL only: Method has at least one return value */ Modified: head/sys/contrib/dev/acpica/include/acpixf.h ============================================================================== --- head/sys/contrib/dev/acpica/include/acpixf.h Fri Jun 29 22:24:41 2018 (r335808) +++ head/sys/contrib/dev/acpica/include/acpixf.h Fri Jun 29 23:48:30 2018 (r335809) @@ -154,7 +154,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20180531 +#define ACPI_CA_VERSION 0x20180629 #include #include From owner-svn-src-all@freebsd.org Sat Jun 30 01:03:00 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F86DFDC8F5; Sat, 30 Jun 2018 01:03:00 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4367983B9E; Sat, 30 Jun 2018 01:03:00 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 24AAB87A; Sat, 30 Jun 2018 01:03:00 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5U1309G045068; Sat, 30 Jun 2018 01:03:00 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5U130uk045067; Sat, 30 Jun 2018 01:03:00 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201806300103.w5U130uk045067@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sat, 30 Jun 2018 01:03:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335810 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 335810 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.26 Precedence: list List-Id: "SVN commit messages 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, 30 Jun 2018 01:03:00 -0000 Author: eadler Date: Sat Jun 30 01:02:59 2018 New Revision: 335810 URL: https://svnweb.freebsd.org/changeset/base/335810 Log: bsd-family-tree: Announce DragonFly version 5.2.2 Obtained from: https://www.dragonflybsd.org/release52/ Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Fri Jun 29 23:48:30 2018 (r335809) +++ head/share/misc/bsd-family-tree Sat Jun 30 01:02:59 2018 (r335810) @@ -748,6 +748,7 @@ NetBSD 7.1.2 2018-03-15 [NBD] OpenBSD 6.3 2018-04-02 [OBD] DragonFly 5.2.0 2018-04-10 [DFB] DragonFly 5.2.1 2018-05-20 [DFB] +DragonFly 5.2.2 2018-06-18 [DFB] FreeBSD 11.2 2018-06-27 [FBD] Bibliography From owner-svn-src-all@freebsd.org Sat Jun 30 01:04:38 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA9D8FDCA6B; Sat, 30 Jun 2018 01:04:38 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6328983DCA; Sat, 30 Jun 2018 01:04:38 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4475187D; Sat, 30 Jun 2018 01:04:38 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5U14cCw045188; Sat, 30 Jun 2018 01:04:38 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5U14cCH045187; Sat, 30 Jun 2018 01:04:38 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201806300104.w5U14cCH045187@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sat, 30 Jun 2018 01:04:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335811 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 335811 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.26 Precedence: list List-Id: "SVN commit messages 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, 30 Jun 2018 01:04:39 -0000 Author: eadler Date: Sat Jun 30 01:04:37 2018 New Revision: 335811 URL: https://svnweb.freebsd.org/changeset/base/335811 Log: bsd-family-tree: Announce DragonFly version 5.2.2 Obtained from: https://www.dragonflybsd.org/release52/ Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Sat Jun 30 01:02:59 2018 (r335810) +++ head/share/misc/bsd-family-tree Sat Jun 30 01:04:37 2018 (r335811) @@ -372,6 +372,7 @@ FreeBSD 5.2 | | | | | | | v | | | | | | | | DragonFly 5.2.1 | | | | v | | + | | | | | | DragonFly 5.2.2 | FreeBSD | | | | | 11.2 | | | | | v | | | | From owner-svn-src-all@freebsd.org Sat Jun 30 04:30:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72C991002D64; Sat, 30 Jun 2018 04:30:09 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 21D508D30B; Sat, 30 Jun 2018 04:30:09 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 027A62D04; Sat, 30 Jun 2018 04:30:09 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5U4U8op049140; Sat, 30 Jun 2018 04:30:08 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5U4U8sg049138; Sat, 30 Jun 2018 04:30:08 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201806300430.w5U4U8sg049138@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sat, 30 Jun 2018 04:30:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335812 - head/sys/dev/iwn X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/sys/dev/iwn X-SVN-Commit-Revision: 335812 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.26 Precedence: list List-Id: "SVN commit messages 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, 30 Jun 2018 04:30:09 -0000 Author: eadler Date: Sat Jun 30 04:30:08 2018 New Revision: 335812 URL: https://svnweb.freebsd.org/changeset/base/335812 Log: iwn: Add the missing IWN_SDID_6035_5 subdevice Obtained from: Haiku (da166fc6469b98397de98a7ccc13b82a3cd3b290) Modified: head/sys/dev/iwn/if_iwn.c head/sys/dev/iwn/if_iwn_devid.h Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Sat Jun 30 01:04:37 2018 (r335811) +++ head/sys/dev/iwn/if_iwn.c Sat Jun 30 04:30:08 2018 (r335812) @@ -862,6 +862,7 @@ iwn_config_specific(struct iwn_softc *sc, uint16_t pid case IWN_SDID_6035_2: case IWN_SDID_6035_3: case IWN_SDID_6035_4: + case IWN_SDID_6035_5: sc->fwname = "iwn6000g2bfw"; sc->limits = &iwn6235_sensitivity_limits; sc->base_params = &iwn_6235_base_params; Modified: head/sys/dev/iwn/if_iwn_devid.h ============================================================================== --- head/sys/dev/iwn/if_iwn_devid.h Sat Jun 30 01:04:37 2018 (r335811) +++ head/sys/dev/iwn/if_iwn_devid.h Sat Jun 30 04:30:08 2018 (r335812) @@ -170,6 +170,7 @@ #define IWN_SDID_6035_2 0x4260 #define IWN_SDID_6035_3 0x4460 #define IWN_SDID_6035_4 0x4860 +#define IWN_SDID_6035_5 0x5260 /* * -------------------------------------------------------------------------- * Device ID for 1030 and 6030 Series From owner-svn-src-all@freebsd.org Sat Jun 30 10:04:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5EAAF102844F; Sat, 30 Jun 2018 10:04:46 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0C8577777F; Sat, 30 Jun 2018 10:04:46 +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 E036968BD; Sat, 30 Jun 2018 10:04:45 +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 w5UA4j7q037106; Sat, 30 Jun 2018 10:04:45 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5UA4iCU037102; Sat, 30 Jun 2018 10:04:44 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201806301004.w5UA4iCU037102@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 30 Jun 2018 10:04:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335813 - in head/lib/clang/include: clang/Basic clang/Config lld/Common llvm/Config X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head/lib/clang/include: clang/Basic clang/Config lld/Common llvm/Config X-SVN-Commit-Revision: 335813 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.26 Precedence: list List-Id: "SVN commit messages 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, 30 Jun 2018 10:04:46 -0000 Author: dim Date: Sat Jun 30 10:04:44 2018 New Revision: 335813 URL: https://svnweb.freebsd.org/changeset/base/335813 Log: Follow-up to r335799 (llvm/clang 6.0.1 update), by regenerating various headers with new version information defines. MFC after: 2 weeks X-MFC-With: r335799 Modified: head/lib/clang/include/clang/Basic/Version.inc head/lib/clang/include/clang/Config/config.h head/lib/clang/include/lld/Common/Version.inc head/lib/clang/include/llvm/Config/config.h head/lib/clang/include/llvm/Config/llvm-config.h Modified: head/lib/clang/include/clang/Basic/Version.inc ============================================================================== --- head/lib/clang/include/clang/Basic/Version.inc Sat Jun 30 04:30:08 2018 (r335812) +++ head/lib/clang/include/clang/Basic/Version.inc Sat Jun 30 10:04:44 2018 (r335813) @@ -1,10 +1,10 @@ /* $FreeBSD$ */ -#define CLANG_VERSION 6.0.0 -#define CLANG_VERSION_STRING "6.0.0" +#define CLANG_VERSION 6.0.1 +#define CLANG_VERSION_STRING "6.0.1" #define CLANG_VERSION_MAJOR 6 #define CLANG_VERSION_MINOR 0 -#define CLANG_VERSION_PATCHLEVEL 0 +#define CLANG_VERSION_PATCHLEVEL 1 #define CLANG_VENDOR "FreeBSD " Modified: head/lib/clang/include/clang/Config/config.h ============================================================================== --- head/lib/clang/include/clang/Config/config.h Sat Jun 30 04:30:08 2018 (r335812) +++ head/lib/clang/include/clang/Config/config.h Sat Jun 30 10:04:44 2018 (r335813) @@ -56,7 +56,7 @@ #define CLANG_HAVE_RLIMITS 1 /* The LLVM product name and version */ -#define BACKEND_PACKAGE_STRING "LLVM 6.0.0" +#define BACKEND_PACKAGE_STRING "LLVM 6.0.1" /* Linker version detected at compile time. */ /* #undef HOST_LINK_VERSION */ Modified: head/lib/clang/include/lld/Common/Version.inc ============================================================================== --- head/lib/clang/include/lld/Common/Version.inc Sat Jun 30 04:30:08 2018 (r335812) +++ head/lib/clang/include/lld/Common/Version.inc Sat Jun 30 10:04:44 2018 (r335813) @@ -1,7 +1,7 @@ // $FreeBSD$ -#define LLD_VERSION 6.0.0 -#define LLD_VERSION_STRING "6.0.0" +#define LLD_VERSION 6.0.1 +#define LLD_VERSION_STRING "6.0.1" #define LLD_VERSION_MAJOR 6 #define LLD_VERSION_MINOR 0 Modified: head/lib/clang/include/llvm/Config/config.h ============================================================================== --- head/lib/clang/include/llvm/Config/config.h Sat Jun 30 04:30:08 2018 (r335812) +++ head/lib/clang/include/llvm/Config/config.h Sat Jun 30 10:04:44 2018 (r335813) @@ -398,10 +398,10 @@ #define LLVM_VERSION_MINOR 0 /* Patch version of the LLVM API */ -#define LLVM_VERSION_PATCH 0 +#define LLVM_VERSION_PATCH 1 /* LLVM version string */ -#define LLVM_VERSION_STRING "6.0.0" +#define LLVM_VERSION_STRING "6.0.1" /* Define if libxml2 is supported on this platform. */ /* #undef LLVM_LIBXML2_ENABLED */ @@ -416,13 +416,13 @@ #define PACKAGE_NAME "LLVM" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "LLVM 6.0.0" +#define PACKAGE_STRING "LLVM 6.0.1" /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ -#define PACKAGE_VERSION "6.0.0" +#define PACKAGE_VERSION "6.0.1" /* Define to the vendor of this package. */ /* #undef PACKAGE_VENDOR */ Modified: head/lib/clang/include/llvm/Config/llvm-config.h ============================================================================== --- head/lib/clang/include/llvm/Config/llvm-config.h Sat Jun 30 04:30:08 2018 (r335812) +++ head/lib/clang/include/llvm/Config/llvm-config.h Sat Jun 30 10:04:44 2018 (r335813) @@ -73,9 +73,9 @@ #define LLVM_VERSION_MINOR 0 /* Patch version of the LLVM API */ -#define LLVM_VERSION_PATCH 0 +#define LLVM_VERSION_PATCH 1 /* LLVM version string */ -#define LLVM_VERSION_STRING "6.0.0" +#define LLVM_VERSION_STRING "6.0.1" #endif From owner-svn-src-all@freebsd.org Sat Jun 30 12:04:55 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 647A6102D220; Sat, 30 Jun 2018 12:04:55 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 B66DF7B13E; Sat, 30 Jun 2018 12:04:54 +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 ESMTP id w5UC4dLu027207; Sat, 30 Jun 2018 15:04:42 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w5UC4dLu027207 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w5UC4dpS027206; Sat, 30 Jun 2018 15:04:39 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 30 Jun 2018 15:04:39 +0300 From: Konstantin Belousov To: Kirk McKusick Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r335808 - in head/sys/ufs: ffs ufs Message-ID: <20180630120439.GQ2430@kib.kiev.ua> References: <201806292224.w5TMOfSi062643@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201806292224.w5TMOfSi062643@repo.freebsd.org> User-Agent: Mutt/1.10.0 (2018-05-17) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages 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, 30 Jun 2018 12:04:55 -0000 On Fri, Jun 29, 2018 at 10:24:41PM +0000, Kirk McKusick wrote: > Author: mckusick > Date: Fri Jun 29 22:24:41 2018 > New Revision: 335808 > URL: https://svnweb.freebsd.org/changeset/base/335808 > > Log: > Create um_flags in the ufsmount structure to hold flags for a UFS filesystem. > Convert integer structure flags to use um_flags: > > int um_candelete; /* devvp supports TRIM */ > int um_writesuspended; /* suspension in progress */ > > become: > > #define UM_CANDELETE 0x00000001 /* devvp supports TRIM */ > #define UM_WRITESUSPENDED 0x00000002 /* suspension in progress */ > > This is in preparation for adding other flags to indicate forcible > unmount in progress after a disk failure and possibly forcible > downgrade to read-only. > > No functional change intended. I think there is a functional change there, or at least something must be changed to make this flags field useful. What is the locking protocol for the um_flags ? IM_CANDELETE is only set at mount time. um_writesuspended indicated a state that was protected by the ffs_susp_lock. UM_WRITESUSPENDED is a literal replacement for the um_writesuspended, so the manipilations of um_flags require ffs_susp_lock. From owner-svn-src-all@freebsd.org Sat Jun 30 12:14:21 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11A24102D802; Sat, 30 Jun 2018 12:14:21 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A81247B639; Sat, 30 Jun 2018 12:14:20 +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 84F0A7D6F; Sat, 30 Jun 2018 12:14:20 +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 w5UCEKCI003447; Sat, 30 Jun 2018 12:14:20 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5UCEKoP003446; Sat, 30 Jun 2018 12:14:20 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201806301214.w5UCEKoP003446@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 30 Jun 2018 12:14:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335814 - head/usr.sbin/nfsd X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: head/usr.sbin/nfsd X-SVN-Commit-Revision: 335814 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.26 Precedence: list List-Id: "SVN commit messages 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, 30 Jun 2018 12:14:21 -0000 Author: rmacklem Date: Sat Jun 30 12:14:20 2018 New Revision: 335814 URL: https://svnweb.freebsd.org/changeset/base/335814 Log: Add a safety belt assignment to the nfsd for when "-p" isn't specified. The kernel code assumes that nfsdargs.addr == NULL and nfsdargs.addrlen == 0 when there is no "-p" argument used for starting the nfsd. This small patch ensures this is the case. In practice, I believe this always happened, since "nfsdargs" was the last element on the stack for "main()", but this little patch ensures it will be the case. Spotted by inspection while adding a new optional field for "-p". Modified: head/usr.sbin/nfsd/nfsd.c Modified: head/usr.sbin/nfsd/nfsd.c ============================================================================== --- head/usr.sbin/nfsd/nfsd.c Sat Jun 30 10:04:44 2018 (r335813) +++ head/usr.sbin/nfsd/nfsd.c Sat Jun 30 12:14:20 2018 (r335814) @@ -180,6 +180,8 @@ main(int argc, char **argv) struct nfsd_nfsd_args nfsdargs; nfsdargs.mirrorcnt = 1; + nfsdargs.addr = NULL; + nfsdargs.addrlen = 0; nfsdcnt = DEFNFSDCNT; unregister = reregister = tcpflag = maxsock = 0; bindanyflag = udpflag = connect_type_cnt = bindhostc = 0; From owner-svn-src-all@freebsd.org Sat Jun 30 12:51:09 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41BC3102EBF8; Sat, 30 Jun 2018 12:51:09 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E7AD27C813; Sat, 30 Jun 2018 12:51:08 +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 C8CD810358; Sat, 30 Jun 2018 12:51:08 +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 w5UCp8MX019595; Sat, 30 Jun 2018 12:51:08 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5UCp8HR019594; Sat, 30 Jun 2018 12:51:08 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201806301251.w5UCp8HR019594@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Sat, 30 Jun 2018 12:51:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335816 - head/sys/netpfil/pf X-SVN-Group: head X-SVN-Commit-Author: kp X-SVN-Commit-Paths: head/sys/netpfil/pf X-SVN-Commit-Revision: 335816 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.26 Precedence: list List-Id: "SVN commit messages 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, 30 Jun 2018 12:51:09 -0000 Author: kp Date: Sat Jun 30 12:51:08 2018 New Revision: 335816 URL: https://svnweb.freebsd.org/changeset/base/335816 Log: pfsync: Fix state sync during initial bulk update States learned via pfsync from a peer with the same ruleset checksum were not getting assigned to rules like they should because pfsync_in_upd() wasn't passing the PFSYNC_SI_CKSUM flag along to pfsync_state_import. PR: 229092 Submitted by: Kajetan Staszkiewicz Obtained from: OpenBSD MFC after: 1 week Sponsored by: InnoGames GmbH Modified: head/sys/netpfil/pf/if_pfsync.c Modified: head/sys/netpfil/pf/if_pfsync.c ============================================================================== --- head/sys/netpfil/pf/if_pfsync.c Sat Jun 30 12:17:50 2018 (r335815) +++ head/sys/netpfil/pf/if_pfsync.c Sat Jun 30 12:51:08 2018 (r335816) @@ -869,7 +869,7 @@ pfsync_in_upd(struct pfsync_pkt *pkt, struct mbuf *m, st = pf_find_state_byid(sp->id, sp->creatorid); if (st == NULL) { /* insert the update */ - if (pfsync_state_import(sp, 0)) + if (pfsync_state_import(sp, pkt->flags)) V_pfsyncstats.pfsyncs_badstate++; continue; } From owner-svn-src-all@freebsd.org Sat Jun 30 14:55:48 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2232E10331AD; Sat, 30 Jun 2018 14:55: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C1DD680888; Sat, 30 Jun 2018 14:55:47 +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 A06EF116E4; Sat, 30 Jun 2018 14:55:47 +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 w5UEtl5N086423; Sat, 30 Jun 2018 14:55:47 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5UEtlPN086422; Sat, 30 Jun 2018 14:55:47 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201806301455.w5UEtlPN086422@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 30 Jun 2018 14:55:47 +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: r335817 - 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: 335817 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.26 Precedence: list List-Id: "SVN commit messages 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, 30 Jun 2018 14:55:48 -0000 Author: kib Date: Sat Jun 30 14:55:47 2018 New Revision: 335817 URL: https://svnweb.freebsd.org/changeset/base/335817 Log: MFC r333087 (by cem): amd64/mp_machdep.c: Fix GCC build after r333059. Noted by: bde Modified: stable/11/sys/amd64/amd64/mp_machdep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/mp_machdep.c ============================================================================== --- stable/11/sys/amd64/amd64/mp_machdep.c Sat Jun 30 12:51:08 2018 (r335816) +++ stable/11/sys/amd64/amd64/mp_machdep.c Sat Jun 30 14:55:47 2018 (r335817) @@ -255,8 +255,8 @@ init_secondary(void) pc->pc_tssp = &common_tss[cpu]; pc->pc_commontssp = &common_tss[cpu]; pc->pc_rsp0 = 0; - pc->pc_pti_rsp0 = ((vm_offset_t)&pc->pc_pti_stack + - PC_PTI_STACK_SZ * sizeof(uint64_t) & ~0xful); + pc->pc_pti_rsp0 = (((vm_offset_t)&pc->pc_pti_stack + + PC_PTI_STACK_SZ * sizeof(uint64_t)) & ~0xful); pc->pc_tss = (struct system_segment_descriptor *)&gdt[NGDT * cpu + GPROC0_SEL]; pc->pc_fs32p = &gdt[NGDT * cpu + GUFS32_SEL]; From owner-svn-src-all@freebsd.org Sat Jun 30 15:03:07 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58AEB10335EF; Sat, 30 Jun 2018 15:03: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E543B80D37; Sat, 30 Jun 2018 15:03:06 +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 C0AC211873; Sat, 30 Jun 2018 15:03:06 +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 w5UF36N0091562; Sat, 30 Jun 2018 15:03:06 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5UF36NP091559; Sat, 30 Jun 2018 15:03:06 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201806301503.w5UF36NP091559@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 30 Jun 2018 15:03: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: r335818 - in stable/11/sys: kern sys X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11/sys: kern sys X-SVN-Commit-Revision: 335818 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.26 Precedence: list List-Id: "SVN commit messages 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, 30 Jun 2018 15:03:07 -0000 Author: kib Date: Sat Jun 30 15:03:06 2018 New Revision: 335818 URL: https://svnweb.freebsd.org/changeset/base/335818 Log: MFC r335503: Update proc->p_ptevents annotation to reflect the actual locking. Modified: stable/11/sys/kern/sys_process.c stable/11/sys/sys/proc.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/sys_process.c ============================================================================== --- stable/11/sys/kern/sys_process.c Sat Jun 30 14:55:47 2018 (r335817) +++ stable/11/sys/kern/sys_process.c Sat Jun 30 15:03:06 2018 (r335818) @@ -689,6 +689,7 @@ void proc_set_traced(struct proc *p, bool stop) { + sx_assert(&proctree_lock, SX_XLOCKED); PROC_LOCK_ASSERT(p, MA_OWNED); p->p_flag |= P_TRACED; if (stop) Modified: stable/11/sys/sys/proc.h ============================================================================== --- stable/11/sys/sys/proc.h Sat Jun 30 14:55:47 2018 (r335817) +++ stable/11/sys/sys/proc.h Sat Jun 30 15:03:06 2018 (r335818) @@ -669,7 +669,7 @@ struct proc { */ LIST_ENTRY(proc) p_orphan; /* (e) List of orphan processes. */ LIST_HEAD(, proc) p_orphans; /* (e) Pointer to list of orphans. */ - u_int p_ptevents; /* (c) ptrace() event mask. */ + u_int p_ptevents; /* (c + e) ptrace() event mask. */ uint16_t p_elf_machine; /* (x) ELF machine type */ uint64_t p_elf_flags; /* (x) ELF flags */ sigqueue_t p_sigqueue; /* (c) Sigs not delivered to a td. */ From owner-svn-src-all@freebsd.org Sat Jun 30 15:03:24 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 856A0103362F; Sat, 30 Jun 2018 15:03:24 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2FDC580E28; Sat, 30 Jun 2018 15:03:24 +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 0FD7211874; Sat, 30 Jun 2018 15:03:24 +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 w5UF3Ost091627; Sat, 30 Jun 2018 15:03:24 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5UF3Mj5091621; Sat, 30 Jun 2018 15:03:22 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201806301503.w5UF3Mj5091621@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 30 Jun 2018 15:03:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335819 - in head: . etc/mtree lib/clang/headers lib/libclang_rt tools/build/mk X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in head: . etc/mtree lib/clang/headers lib/libclang_rt tools/build/mk X-SVN-Commit-Revision: 335819 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.26 Precedence: list List-Id: "SVN commit messages 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, 30 Jun 2018 15:03:25 -0000 Author: dim Date: Sat Jun 30 15:03:22 2018 New Revision: 335819 URL: https://svnweb.freebsd.org/changeset/base/335819 Log: More follow-up to r335799 (llvm/clang 6.0.1 update), where I forgot to update mtree files, ObsoleteFiles and a number of other paths. Sorry about all the breakage. Pointy hat to: me MFC after: 2 weeks X-MFC-With: r335799 Modified: head/ObsoleteFiles.inc head/UPDATING head/etc/mtree/BSD.debug.dist head/etc/mtree/BSD.usr.dist head/lib/clang/headers/Makefile head/lib/libclang_rt/Makefile.inc head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sat Jun 30 15:03:06 2018 (r335818) +++ head/ObsoleteFiles.inc Sat Jun 30 15:03:22 2018 (r335819) @@ -38,6 +38,142 @@ # xargs -n1 | sort | uniq -d; # done +# 20180630: new clang import which bumps version from 6.0.0 to 6.0.1. +OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/allocator_interface.h +OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/asan_interface.h +OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/common_interface_defs.h +OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/coverage_interface.h +OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/dfsan_interface.h +OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/esan_interface.h +OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/hwasan_interface.h +OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/linux_syscall_hooks.h +OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/lsan_interface.h +OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/msan_interface.h +OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/scudo_interface.h +OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/tsan_interface.h +OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/tsan_interface_atomic.h +OLD_DIRS+=usr/lib/clang/6.0.0/include/sanitizer +OLD_FILES+=usr/lib/clang/6.0.0/include/__clang_cuda_builtin_vars.h +OLD_FILES+=usr/lib/clang/6.0.0/include/__clang_cuda_cmath.h +OLD_FILES+=usr/lib/clang/6.0.0/include/__clang_cuda_complex_builtins.h +OLD_FILES+=usr/lib/clang/6.0.0/include/__clang_cuda_intrinsics.h +OLD_FILES+=usr/lib/clang/6.0.0/include/__clang_cuda_math_forward_declares.h +OLD_FILES+=usr/lib/clang/6.0.0/include/__clang_cuda_runtime_wrapper.h +OLD_FILES+=usr/lib/clang/6.0.0/include/__stddef_max_align_t.h +OLD_FILES+=usr/lib/clang/6.0.0/include/__wmmintrin_aes.h +OLD_FILES+=usr/lib/clang/6.0.0/include/__wmmintrin_pclmul.h +OLD_FILES+=usr/lib/clang/6.0.0/include/adxintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/altivec.h +OLD_FILES+=usr/lib/clang/6.0.0/include/ammintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/arm64intr.h +OLD_FILES+=usr/lib/clang/6.0.0/include/arm_acle.h +OLD_FILES+=usr/lib/clang/6.0.0/include/arm_neon.h +OLD_FILES+=usr/lib/clang/6.0.0/include/armintr.h +OLD_FILES+=usr/lib/clang/6.0.0/include/avx2intrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/avx512bitalgintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/avx512bwintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/avx512cdintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/avx512dqintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/avx512erintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/avx512fintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/avx512ifmaintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/avx512ifmavlintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/avx512pfintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vbmi2intrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vbmiintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vbmivlintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vlbitalgintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vlbwintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vlcdintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vldqintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vlintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vlvbmi2intrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vlvnniintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vnniintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vpopcntdqintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vpopcntdqvlintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/avxintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/bmi2intrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/bmiintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/cetintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/clflushoptintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/clwbintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/clzerointrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/cpuid.h +OLD_FILES+=usr/lib/clang/6.0.0/include/emmintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/f16cintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/fma4intrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/fmaintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/fxsrintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/gfniintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/htmintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/htmxlintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/ia32intrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/immintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/lwpintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/lzcntintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/mm3dnow.h +OLD_FILES+=usr/lib/clang/6.0.0/include/mm_malloc.h +OLD_FILES+=usr/lib/clang/6.0.0/include/mmintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/module.modulemap +OLD_FILES+=usr/lib/clang/6.0.0/include/msa.h +OLD_FILES+=usr/lib/clang/6.0.0/include/mwaitxintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/nmmintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/opencl-c.h +OLD_FILES+=usr/lib/clang/6.0.0/include/pkuintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/pmmintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/popcntintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/prfchwintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/rdseedintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/rtmintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/s390intrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/shaintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/smmintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/tbmintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/tmmintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/vadefs.h +OLD_FILES+=usr/lib/clang/6.0.0/include/vaesintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/vecintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/vpclmulqdqintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/wmmintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/x86intrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/xmmintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/xopintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/xsavecintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/xsaveintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/xsaveoptintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/xsavesintrin.h +OLD_FILES+=usr/lib/clang/6.0.0/include/xtestintrin.h +OLD_DIRS+=usr/lib/clang/6.0.0/include +OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.asan-i386.a +OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.asan-i386.so +OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.asan-preinit-i386.a +OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.asan-preinit-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.asan-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.asan-x86_64.so +OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.asan_cxx-i386.a +OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.profile-arm.a +OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.profile-armhf.a +OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.profile-i386.a +OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.profile-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.safestack-i386.a +OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.safestack-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.stats-i386.a +OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.stats-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.stats_client-i386.a +OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.stats_client-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.tsan-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.tsan_cxx-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.ubsan_minimal-i386.a +OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.ubsan_minimal-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.ubsan_standalone-i386.a +OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a +OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a +OLD_DIRS+=usr/lib/clang/6.0.0/lib/freebsd +OLD_DIRS+=usr/lib/clang/6.0.0/lib +OLD_DIRS+=usr/lib/clang/6.0.0 # 20180615: asf(8) removed OLD_FILES+=usr/sbin/asf OLD_FILES+=usr/share/man/man8/asf.8.gz Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Jun 30 15:03:06 2018 (r335818) +++ head/UPDATING Sat Jun 30 15:03:22 2018 (r335819) @@ -32,6 +32,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20180630: + Clang, llvm, lld, lldb, compiler-rt and libc++ have been upgraded to + 6.0.1. Please see the 20141231 entry below for information about + prerequisites and upgrading, if you are not already using clang 3.5.0 + or higher. + 20180612: r334930 changed the interface between the NFS modules, so they all need to be rebuilt. r335018 did a __FreeBSD_version bump for this. Modified: head/etc/mtree/BSD.debug.dist ============================================================================== --- head/etc/mtree/BSD.debug.dist Sat Jun 30 15:03:06 2018 (r335818) +++ head/etc/mtree/BSD.debug.dist Sat Jun 30 15:03:22 2018 (r335819) @@ -29,7 +29,7 @@ .. lib clang - 6.0.0 + 6.0.1 lib freebsd .. Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Sat Jun 30 15:03:06 2018 (r335818) +++ head/etc/mtree/BSD.usr.dist Sat Jun 30 15:03:22 2018 (r335819) @@ -25,7 +25,7 @@ aout .. clang - 6.0.0 + 6.0.1 include sanitizer .. Modified: head/lib/clang/headers/Makefile ============================================================================== --- head/lib/clang/headers/Makefile Sat Jun 30 15:03:06 2018 (r335818) +++ head/lib/clang/headers/Makefile Sat Jun 30 15:03:22 2018 (r335819) @@ -4,7 +4,7 @@ .PATH: ${CLANG_SRCS}/lib/Headers -INCSDIR= ${LIBDIR}/clang/6.0.0/include +INCSDIR= ${LIBDIR}/clang/6.0.1/include GENINCS+= arm_neon.h Modified: head/lib/libclang_rt/Makefile.inc ============================================================================== --- head/lib/libclang_rt/Makefile.inc Sat Jun 30 15:03:06 2018 (r335818) +++ head/lib/libclang_rt/Makefile.inc Sat Jun 30 15:03:22 2018 (r335819) @@ -14,7 +14,7 @@ CRTSRC= ${SRCTOP}/contrib/compiler-rt .PATH: ${CRTSRC}/lib -CLANGDIR= /usr/lib/clang/6.0.0 +CLANGDIR= /usr/lib/clang/6.0.1 LIBDIR= ${CLANGDIR}/lib/freebsd NO_PIC= Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Sat Jun 30 15:03:06 2018 (r335818) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Sat Jun 30 15:03:22 2018 (r335819) @@ -1314,145 +1314,141 @@ OLD_FILES+=usr/bin/clang-cpp OLD_FILES+=usr/bin/clang-tblgen OLD_FILES+=usr/bin/llvm-objdump OLD_FILES+=usr/bin/llvm-tblgen -OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/allocator_interface.h -OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/asan_interface.h -OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/common_interface_defs.h -OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/coverage_interface.h -OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/dfsan_interface.h -OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/esan_interface.h -OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/hwasan_interface.h -OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/linux_syscall_hooks.h -OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/lsan_interface.h -OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/msan_interface.h -OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/scudo_interface.h -OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/tsan_interface.h -OLD_FILES+=usr/lib/clang/6.0.0/include/sanitizer/tsan_interface_atomic.h -OLD_DIRS+=usr/lib/clang/6.0.0/include/sanitizer -OLD_FILES+=usr/lib/clang/6.0.0/include/__clang_cuda_builtin_vars.h -OLD_FILES+=usr/lib/clang/6.0.0/include/__clang_cuda_cmath.h -OLD_FILES+=usr/lib/clang/6.0.0/include/__clang_cuda_complex_builtins.h -OLD_FILES+=usr/lib/clang/6.0.0/include/__clang_cuda_intrinsics.h -OLD_FILES+=usr/lib/clang/6.0.0/include/__clang_cuda_math_forward_declares.h -OLD_FILES+=usr/lib/clang/6.0.0/include/__clang_cuda_runtime_wrapper.h -OLD_FILES+=usr/lib/clang/6.0.0/include/__stddef_max_align_t.h -OLD_FILES+=usr/lib/clang/6.0.0/include/__wmmintrin_aes.h -OLD_FILES+=usr/lib/clang/6.0.0/include/__wmmintrin_pclmul.h -OLD_FILES+=usr/lib/clang/6.0.0/include/adxintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/altivec.h -OLD_FILES+=usr/lib/clang/6.0.0/include/ammintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/arm64intr.h -OLD_FILES+=usr/lib/clang/6.0.0/include/arm_acle.h -OLD_FILES+=usr/lib/clang/6.0.0/include/arm_neon.h -OLD_FILES+=usr/lib/clang/6.0.0/include/armintr.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx2intrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512bitalgintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512bwintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512cdintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512dqintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512erintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512fintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512ifmaintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512ifmavlintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512pfintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vbmi2intrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vbmiintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vbmivlintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vlbitalgintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vlbwintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vlcdintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vldqintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vlintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vlvbmi2intrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vlvnniintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vnniintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vpopcntdqintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avx512vpopcntdqvlintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/avxintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/bmi2intrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/bmiintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/cetintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/clflushoptintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/clwbintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/clzerointrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/cpuid.h -OLD_FILES+=usr/lib/clang/6.0.0/include/emmintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/f16cintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/fma4intrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/fmaintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/fxsrintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/gfniintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/htmintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/htmxlintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/ia32intrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/immintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/lwpintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/lzcntintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/mm3dnow.h -OLD_FILES+=usr/lib/clang/6.0.0/include/mm_malloc.h -OLD_FILES+=usr/lib/clang/6.0.0/include/mmintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/module.modulemap -OLD_FILES+=usr/lib/clang/6.0.0/include/msa.h -OLD_FILES+=usr/lib/clang/6.0.0/include/mwaitxintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/nmmintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/opencl-c.h -OLD_FILES+=usr/lib/clang/6.0.0/include/pkuintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/pmmintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/popcntintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/prfchwintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/rdseedintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/rtmintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/s390intrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/shaintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/smmintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/tbmintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/tmmintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/vadefs.h -OLD_FILES+=usr/lib/clang/6.0.0/include/vaesintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/vecintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/vpclmulqdqintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/wmmintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/x86intrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/xmmintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/xopintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/xsavecintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/xsaveintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/xsaveoptintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/xsavesintrin.h -OLD_FILES+=usr/lib/clang/6.0.0/include/xtestintrin.h -OLD_DIRS+=usr/lib/clang/6.0.0/include -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.asan-i386.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.asan-i386.so -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.asan-preinit-i386.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.asan-preinit-x86_64.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.asan-x86_64.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.asan-x86_64.so -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.asan_cxx-i386.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.dd-i386.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.dd-x86_64.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.profile-arm.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.profile-armhf.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.profile-i386.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.profile-x86_64.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.safestack-i386.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.safestack-x86_64.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.stats-i386.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.stats-x86_64.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.stats_client-i386.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.stats_client-x86_64.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.tsan-i386.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.tsan-x86_64.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.tsan_cxx-i386.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.tsan_cxx-x86_64.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.ubsan_minimal-i386.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.ubsan_minimal-x86_64.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.ubsan_standalone-i386.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a -OLD_FILES+=usr/lib/clang/6.0.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a -OLD_DIRS+=usr/lib/clang/6.0.0/lib/freebsd -OLD_DIRS+=usr/lib/clang/6.0.0/lib -OLD_DIRS+=usr/lib/clang/6.0.0 +OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/allocator_interface.h +OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/asan_interface.h +OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/common_interface_defs.h +OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/coverage_interface.h +OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/dfsan_interface.h +OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/esan_interface.h +OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/hwasan_interface.h +OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/linux_syscall_hooks.h +OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/lsan_interface.h +OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/msan_interface.h +OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/scudo_interface.h +OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/tsan_interface.h +OLD_FILES+=usr/lib/clang/6.0.1/include/sanitizer/tsan_interface_atomic.h +OLD_DIRS+=usr/lib/clang/6.0.1/include/sanitizer +OLD_FILES+=usr/lib/clang/6.0.1/include/__clang_cuda_builtin_vars.h +OLD_FILES+=usr/lib/clang/6.0.1/include/__clang_cuda_cmath.h +OLD_FILES+=usr/lib/clang/6.0.1/include/__clang_cuda_complex_builtins.h +OLD_FILES+=usr/lib/clang/6.0.1/include/__clang_cuda_intrinsics.h +OLD_FILES+=usr/lib/clang/6.0.1/include/__clang_cuda_math_forward_declares.h +OLD_FILES+=usr/lib/clang/6.0.1/include/__clang_cuda_runtime_wrapper.h +OLD_FILES+=usr/lib/clang/6.0.1/include/__stddef_max_align_t.h +OLD_FILES+=usr/lib/clang/6.0.1/include/__wmmintrin_aes.h +OLD_FILES+=usr/lib/clang/6.0.1/include/__wmmintrin_pclmul.h +OLD_FILES+=usr/lib/clang/6.0.1/include/adxintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/altivec.h +OLD_FILES+=usr/lib/clang/6.0.1/include/ammintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/arm64intr.h +OLD_FILES+=usr/lib/clang/6.0.1/include/arm_acle.h +OLD_FILES+=usr/lib/clang/6.0.1/include/arm_neon.h +OLD_FILES+=usr/lib/clang/6.0.1/include/armintr.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx2intrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512bitalgintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512bwintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512cdintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512dqintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512erintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512fintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512ifmaintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512ifmavlintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512pfintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512vbmi2intrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512vbmiintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512vbmivlintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512vlbitalgintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512vlbwintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512vlcdintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512vldqintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512vlintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512vlvbmi2intrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512vlvnniintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512vnniintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512vpopcntdqintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avx512vpopcntdqvlintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/avxintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/bmi2intrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/bmiintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/cetintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/clflushoptintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/clwbintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/clzerointrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/cpuid.h +OLD_FILES+=usr/lib/clang/6.0.1/include/emmintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/f16cintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/fma4intrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/fmaintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/fxsrintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/gfniintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/htmintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/htmxlintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/ia32intrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/immintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/lwpintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/lzcntintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/mm3dnow.h +OLD_FILES+=usr/lib/clang/6.0.1/include/mm_malloc.h +OLD_FILES+=usr/lib/clang/6.0.1/include/mmintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/module.modulemap +OLD_FILES+=usr/lib/clang/6.0.1/include/msa.h +OLD_FILES+=usr/lib/clang/6.0.1/include/mwaitxintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/nmmintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/opencl-c.h +OLD_FILES+=usr/lib/clang/6.0.1/include/pkuintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/pmmintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/popcntintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/prfchwintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/rdseedintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/rtmintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/s390intrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/shaintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/smmintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/tbmintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/tmmintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/vadefs.h +OLD_FILES+=usr/lib/clang/6.0.1/include/vaesintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/vecintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/vpclmulqdqintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/wmmintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/x86intrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/xmmintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/xopintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/xsavecintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/xsaveintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/xsaveoptintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/xsavesintrin.h +OLD_FILES+=usr/lib/clang/6.0.1/include/xtestintrin.h +OLD_DIRS+=usr/lib/clang/6.0.1/include +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.asan-i386.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.asan-i386.so +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.asan-preinit-i386.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.asan-preinit-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.asan-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.asan-x86_64.so +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.asan_cxx-i386.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.asan_cxx-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.profile-arm.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.profile-armhf.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.profile-i386.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.profile-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.safestack-i386.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.safestack-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.stats-i386.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.stats-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.stats_client-i386.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.stats_client-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.tsan-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.tsan_cxx-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.ubsan_minimal-i386.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.ubsan_minimal-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.ubsan_standalone-i386.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a +OLD_FILES+=usr/lib/clang/6.0.1/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a +OLD_DIRS+=usr/lib/clang/6.0.1/lib/freebsd +OLD_DIRS+=usr/lib/clang/6.0.1/lib +OLD_DIRS+=usr/lib/clang/6.0.1 OLD_DIRS+=usr/lib/clang OLD_FILES+=usr/share/doc/llvm/clang/LICENSE.TXT OLD_DIRS+=usr/share/doc/llvm/clang From owner-svn-src-all@freebsd.org Sat Jun 30 15:07:46 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0F5E1033C23; Sat, 30 Jun 2018 15:07: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C6F7811B1; Sat, 30 Jun 2018 15:07: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 2A33D11875; Sat, 30 Jun 2018 15:07: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 w5UF7kI8091879; Sat, 30 Jun 2018 15:07:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5UF7jU7091875; Sat, 30 Jun 2018 15:07:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201806301507.w5UF7jU7091875@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 30 Jun 2018 15:07:45 +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: r335820 - in stable/11/sys: kern sys X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11/sys: kern sys X-SVN-Commit-Revision: 335820 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.26 Precedence: list List-Id: "SVN commit messages 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, 30 Jun 2018 15:07:47 -0000 Author: kib Date: Sat Jun 30 15:07:44 2018 New Revision: 335820 URL: https://svnweb.freebsd.org/changeset/base/335820 Log: MFC r335504: fork: avoid endless wait with PTRACE_FORK and RFSTOPPED. Modified: stable/11/sys/kern/kern_fork.c stable/11/sys/kern/kern_proc.c stable/11/sys/kern/kern_sig.c stable/11/sys/sys/proc.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_fork.c ============================================================================== --- stable/11/sys/kern/kern_fork.c Sat Jun 30 15:03:22 2018 (r335819) +++ stable/11/sys/kern/kern_fork.c Sat Jun 30 15:07:44 2018 (r335820) @@ -736,18 +736,6 @@ do_fork(struct thread *td, struct fork_req *fr, struct * but before we wait for the debugger. */ _PHOLD(p2); - if (p1->p_ptevents & PTRACE_FORK) { - /* - * Arrange for debugger to receive the fork event. - * - * We can report PL_FLAG_FORKED regardless of - * P_FOLLOWFORK settings, but it does not make a sense - * for runaway child. - */ - td->td_dbgflags |= TDB_FORK; - td->td_dbg_forked = p2->p_pid; - td2->td_dbgflags |= TDB_STOPATFORK; - } if (fr->fr_flags & RFPPWAIT) { td->td_pflags |= TDP_RFPPWAIT; td->td_rfppwait_p = p2; @@ -771,7 +759,42 @@ do_fork(struct thread *td, struct fork_req *fr, struct procdesc_finit(p2->p_procdesc, fp_procdesc); fdrop(fp_procdesc, td); } - + + /* + * Speculative check for PTRACE_FORK. PTRACE_FORK is not + * synced with forks in progress so it is OK if we miss it + * if being set atm. + */ + if ((p1->p_ptevents & PTRACE_FORK) != 0) { + sx_xlock(&proctree_lock); + PROC_LOCK(p2); + + /* + * p1->p_ptevents & p1->p_pptr are protected by both + * process and proctree locks for modifications, + * so owning proctree_lock allows the race-free read. + */ + if ((p1->p_ptevents & PTRACE_FORK) != 0) { + /* + * Arrange for debugger to receive the fork event. + * + * We can report PL_FLAG_FORKED regardless of + * P_FOLLOWFORK settings, but it does not make a sense + * for runaway child. + */ + td->td_dbgflags |= TDB_FORK; + td->td_dbg_forked = p2->p_pid; + td2->td_dbgflags |= TDB_STOPATFORK; + proc_set_traced(p2, true); + CTR2(KTR_PTRACE, + "do_fork: attaching to new child pid %d: oppid %d", + p2->p_pid, p2->p_oppid); + proc_reparent(p2, p1->p_pptr); + } + PROC_UNLOCK(p2); + sx_xunlock(&proctree_lock); + } + if ((fr->fr_flags & RFSTOPPED) == 0) { /* * If RFSTOPPED not requested, make child runnable and @@ -788,11 +811,6 @@ do_fork(struct thread *td, struct fork_req *fr, struct } PROC_LOCK(p2); - /* - * Wait until debugger is attached to child. - */ - while (td2->td_proc == p2 && (td2->td_dbgflags & TDB_STOPATFORK) != 0) - cv_wait(&p2->p_dbgwait, &p2->p_mtx); _PRELE(p2); racct_proc_fork_done(p2); PROC_UNLOCK(p2); @@ -1078,24 +1096,15 @@ fork_exit(void (*callout)(void *, struct trapframe *), void fork_return(struct thread *td, struct trapframe *frame) { - struct proc *p, *dbg; + struct proc *p; p = td->td_proc; if (td->td_dbgflags & TDB_STOPATFORK) { - sx_xlock(&proctree_lock); PROC_LOCK(p); - if (p->p_pptr->p_ptevents & PTRACE_FORK) { + if ((p->p_flag & P_TRACED) != 0) { /* - * If debugger still wants auto-attach for the - * parent's children, do it now. + * Inform the debugger if one is still present. */ - dbg = p->p_pptr->p_pptr; - proc_set_traced(p, true); - CTR2(KTR_PTRACE, - "fork_return: attaching to new child pid %d: oppid %d", - p->p_pid, p->p_oppid); - proc_reparent(p, dbg); - sx_xunlock(&proctree_lock); td->td_dbgflags |= TDB_CHILD | TDB_SCX | TDB_FSTP; ptracestop(td, SIGSTOP, NULL); td->td_dbgflags &= ~(TDB_CHILD | TDB_SCX); @@ -1103,9 +1112,7 @@ fork_return(struct thread *td, struct trapframe *frame /* * ... otherwise clear the request. */ - sx_xunlock(&proctree_lock); td->td_dbgflags &= ~TDB_STOPATFORK; - cv_broadcast(&p->p_dbgwait); } PROC_UNLOCK(p); } else if (p->p_flag & P_TRACED || td->td_dbgflags & TDB_BORN) { Modified: stable/11/sys/kern/kern_proc.c ============================================================================== --- stable/11/sys/kern/kern_proc.c Sat Jun 30 15:03:22 2018 (r335819) +++ stable/11/sys/kern/kern_proc.c Sat Jun 30 15:07:44 2018 (r335820) @@ -265,7 +265,6 @@ proc_init(void *mem, int size, int flags) mtx_init(&p->p_itimmtx, "pitiml", NULL, MTX_SPIN | MTX_NEW); mtx_init(&p->p_profmtx, "pprofl", NULL, MTX_SPIN | MTX_NEW); cv_init(&p->p_pwait, "ppwait"); - cv_init(&p->p_dbgwait, "dbgwait"); TAILQ_INIT(&p->p_threads); /* all threads in proc */ EVENTHANDLER_DIRECT_INVOKE(process_init, p); p->p_stats = pstats_alloc(); Modified: stable/11/sys/kern/kern_sig.c ============================================================================== --- stable/11/sys/kern/kern_sig.c Sat Jun 30 15:03:22 2018 (r335819) +++ stable/11/sys/kern/kern_sig.c Sat Jun 30 15:07:44 2018 (r335820) @@ -2590,7 +2590,6 @@ ptracestop(struct thread *td, int sig, ksiginfo_t *si) } if ((td->td_dbgflags & TDB_STOPATFORK) != 0) { td->td_dbgflags &= ~TDB_STOPATFORK; - cv_broadcast(&p->p_dbgwait); } stopme: thread_suspend_switch(td, p); Modified: stable/11/sys/sys/proc.h ============================================================================== --- stable/11/sys/sys/proc.h Sat Jun 30 15:03:22 2018 (r335819) +++ stable/11/sys/sys/proc.h Sat Jun 30 15:07:44 2018 (r335820) @@ -655,8 +655,7 @@ struct proc { LIST_HEAD(, mqueue_notifier) p_mqnotifier; /* (c) mqueue notifiers.*/ struct kdtrace_proc *p_dtrace; /* (*) DTrace-specific data. */ struct cv p_pwait; /* (*) wait cv for exit/exec. */ - struct cv p_dbgwait; /* (*) wait cv for debugger attach - after fork. */ + struct cv p_pad_dbgwait; uint64_t p_prev_runtime; /* (c) Resource usage accounting. */ struct racct *p_racct; /* (b) Resource accounting. */ int p_throttled; /* (c) Flag for racct pcpu throttling */ From owner-svn-src-all@freebsd.org Sat Jun 30 15:09:25 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91F061033F34; Sat, 30 Jun 2018 15:09: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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2F05E813FE; Sat, 30 Jun 2018 15:09: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 0AC4011878; Sat, 30 Jun 2018 15:09:25 +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 w5UF9OeD092011; Sat, 30 Jun 2018 15:09:24 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5UF9OuU092010; Sat, 30 Jun 2018 15:09:24 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201806301509.w5UF9OuU092010@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 30 Jun 2018 15:09: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: r335821 - stable/11/sys/compat/linux X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: stable/11/sys/compat/linux X-SVN-Commit-Revision: 335821 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.26 Precedence: list List-Id: "SVN commit messages 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, 30 Jun 2018 15:09:25 -0000 Author: kib Date: Sat Jun 30 15:09:24 2018 New Revision: 335821 URL: https://svnweb.freebsd.org/changeset/base/335821 Log: MFC r335505: linux_clone_thread: mark new thread as TDB_BORN. Modified: stable/11/sys/compat/linux/linux_fork.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/compat/linux/linux_fork.c ============================================================================== --- stable/11/sys/compat/linux/linux_fork.c Sat Jun 30 15:07:44 2018 (r335820) +++ stable/11/sys/compat/linux/linux_fork.c Sat Jun 30 15:09:24 2018 (r335821) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -349,6 +350,9 @@ linux_clone_thread(struct thread *td, struct linux_clo thread_unlock(td); if (P_SHOULDSTOP(p)) newtd->td_flags |= TDF_ASTPENDING | TDF_NEEDSUSPCHK; + + if (p->p_ptevents & PTRACE_LWP) + newtd->td_dbgflags |= TDB_BORN; PROC_UNLOCK(p); tidhash_add(newtd); From owner-svn-src-all@freebsd.org Sat Jun 30 18:18:42 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F48EFD34D2; Sat, 30 Jun 2018 18:18:42 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0F08486C1A; Sat, 30 Jun 2018 18:18:42 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D8AEA136D5; Sat, 30 Jun 2018 18:18:41 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5UIIfcZ090988; Sat, 30 Jun 2018 18:18:41 GMT (envelope-from maxim@FreeBSD.org) Received: (from maxim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5UIIf1C090987; Sat, 30 Jun 2018 18:18:41 GMT (envelope-from maxim@FreeBSD.org) Message-Id: <201806301818.w5UIIf1C090987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: maxim set sender to maxim@FreeBSD.org using -f From: Maxim Konovalov Date: Sat, 30 Jun 2018 18:18:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335822 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: maxim X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 335822 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.27 Precedence: list List-Id: "SVN commit messages 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, 30 Jun 2018 18:18:42 -0000 Author: maxim Date: Sat Jun 30 18:18:41 2018 New Revision: 335822 URL: https://svnweb.freebsd.org/changeset/base/335822 Log: ascii art fixed. Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Sat Jun 30 15:09:24 2018 (r335821) +++ head/share/misc/bsd-family-tree Sat Jun 30 18:18:41 2018 (r335822) @@ -369,10 +369,10 @@ FreeBSD 5.2 | | | | | | | | | | | | | | | OpenBSD 6.3 | | | | | | | DragonFly 5.2.0 - | | | | v | | + | | | | | | | | | | | | | DragonFly 5.2.1 - | | | | v | | - | | | | | | DragonFly 5.2.2 + | | | | | | | + | | | | v | DragonFly 5.2.2 | FreeBSD | | | | | 11.2 | | | | | v | | | | From owner-svn-src-all@freebsd.org Sat Jun 30 19:36:03 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8DC6BFD5814; Sat, 30 Jun 2018 19:36:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 397D489DC3; Sat, 30 Jun 2018 19:36:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1ABE9143CC; Sat, 30 Jun 2018 19:36:03 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5UJa2CI032542; Sat, 30 Jun 2018 19:36:02 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5UJa2kE032541; Sat, 30 Jun 2018 19:36:02 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201806301936.w5UJa2kE032541@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 30 Jun 2018 19:36:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335823 - head X-SVN-Group: head X-SVN-Commit-Author: bdrewery X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 335823 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.27 Precedence: list List-Id: "SVN commit messages 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, 30 Jun 2018 19:36:03 -0000 Author: bdrewery Date: Sat Jun 30 19:36:02 2018 New Revision: 335823 URL: https://svnweb.freebsd.org/changeset/base/335823 Log: META_MODE: Fix clang-tblgen flip-flop building after r335707. The build of this would have MK_LLVM_TARGET_ALL=yes for bootstrap-tools but MK_LLVM_TARGET_ALL=no for cross-tools and thus would rebuild between the two. MFC after: 2 weeks X-MFC-with: r335707 Sponsored by: Dell EMC Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Jun 30 18:18:41 2018 (r335822) +++ head/Makefile.inc1 Sat Jun 30 19:36:02 2018 (r335823) @@ -666,6 +666,9 @@ BSARGS= DESTDIR= \ BMAKE= \ ${BMAKEENV} ${MAKE} ${WORLD_FLAGS} -f Makefile.inc1 \ ${BSARGS} +.if empty(.MAKEOVERRIDES:MMK_LLVM_TARGET_ALL) +BMAKE+= MK_LLVM_TARGET_ALL=no +.endif # build-tools stage TMAKE= \ @@ -685,9 +688,6 @@ TMAKE= \ XMAKE= ${BMAKE} \ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ MK_GDB=no MK_TESTS=no -.if empty(.MAKEOVERRIDES:MMK_LLVM_TARGET_ALL) -XMAKE+= MK_LLVM_TARGET_ALL=no -.endif # kernel-tools stage KTMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ From owner-svn-src-all@freebsd.org Sat Jun 30 20:09:45 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EBA5FDA749; Sat, 30 Jun 2018 20:09:45 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E93B38B0E9; Sat, 30 Jun 2018 20:09: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 CA2E6148B2; Sat, 30 Jun 2018 20:09:44 +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 w5UK9iG1048662; Sat, 30 Jun 2018 20:09:44 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5UK9iWk048658; Sat, 30 Jun 2018 20:09:44 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201806302009.w5UK9iWk048658@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 30 Jun 2018 20:09:44 +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: r335825 - in stable/11: . contrib/ofed contrib/ofed/include contrib/ofed/infiniband-diags/build contrib/ofed/libcxgb4 contrib/ofed/libibcm contrib/ofed/libibmad contrib/ofed/libibnetdis... X-SVN-Group: stable-11 X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in stable/11: . contrib/ofed contrib/ofed/include contrib/ofed/infiniband-diags/build contrib/ofed/libcxgb4 contrib/ofed/libibcm contrib/ofed/libibmad contrib/ofed/libibnetdisc contrib/ofed/libibumad ... X-SVN-Commit-Revision: 335825 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.27 Precedence: list List-Id: "SVN commit messages 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, 30 Jun 2018 20:09:45 -0000 Author: kib Date: Sat Jun 30 20:09:43 2018 New Revision: 335825 URL: https://svnweb.freebsd.org/changeset/base/335825 Log: MFC r335253: Rework ofed build. Sponsored by: Mellanox Technologies Added: stable/11/lib/ofed/ - copied from r335253, head/lib/ofed/ stable/11/usr.bin/ofed/ - copied from r335253, head/usr.bin/ofed/ Deleted: stable/11/contrib/ofed/Makefile stable/11/contrib/ofed/include/Makefile stable/11/contrib/ofed/infiniband-diags/build/ stable/11/contrib/ofed/libcxgb4/Makefile stable/11/contrib/ofed/libibcm/Makefile stable/11/contrib/ofed/libibmad/Makefile stable/11/contrib/ofed/libibnetdisc/Makefile stable/11/contrib/ofed/libibumad/Makefile stable/11/contrib/ofed/libibverbs/Makefile stable/11/contrib/ofed/libibverbs/examples/build/ stable/11/contrib/ofed/libmlx4/Makefile stable/11/contrib/ofed/libmlx5/Makefile stable/11/contrib/ofed/librdmacm/Makefile stable/11/contrib/ofed/librdmacm/examples/build/ stable/11/contrib/ofed/opensm/complib/Makefile stable/11/contrib/ofed/opensm/libopensm/ stable/11/contrib/ofed/opensm/libvendor/Makefile stable/11/contrib/ofed/opensm/opensm/Makefile stable/11/contrib/ofed/usr.bin/ stable/11/contrib/ofed/usr.lib/ Modified: stable/11/Makefile.inc1 stable/11/lib/Makefile stable/11/share/mk/src.libnames.mk stable/11/usr.bin/Makefile Directory Properties: stable/11/ (props changed) Modified: stable/11/Makefile.inc1 ============================================================================== --- stable/11/Makefile.inc1 Sat Jun 30 19:50:25 2018 (r335824) +++ stable/11/Makefile.inc1 Sat Jun 30 20:09:43 2018 (r335825) @@ -263,9 +263,6 @@ SUBDIR+=sys usr.bin usr.sbin .if ${MK_TESTS} != "no" SUBDIR+= tests .endif -.if ${MK_OFED} != "no" -SUBDIR+=contrib/ofed -.endif # Local directories are built in parallel with the base system directories. # Users may insert a .WAIT directive at the beginning or elsewhere within @@ -2141,24 +2138,16 @@ _lib_libradius= lib/libradius .endif .if ${MK_OFED} != "no" -# -# The OFED libraries are built in four steps -# as reflected below, due to interdependencies. -# -# NOTE: Depending on contrib/ofed/include is only needed for -# the lib32 compat build. -# -_ofed_lib= \ -contrib/ofed/include \ -contrib/ofed/usr.lib/0 \ -contrib/ofed/usr.lib/1 \ -contrib/ofed/usr.lib/2 \ -contrib/ofed/usr.lib/3 +_prebuild_libs+= \ + lib/ofed/libibverbs \ + lib/ofed/libibmad \ + lib/ofed/libibumad \ + lib/ofed/complib \ + lib/ofed/libmlx5 -contrib/ofed/usr.lib/0__L: contrib/ofed/include__L lib/libthr__L -contrib/ofed/usr.lib/1__L: contrib/ofed/usr.lib/0__L -contrib/ofed/usr.lib/2__L: contrib/ofed/usr.lib/1__L -contrib/ofed/usr.lib/3__L: contrib/ofed/usr.lib/2__L +lib/ofed/libibmad__L: lib/ofed/libibumad__L +lib/ofed/complib__L: lib/libthr__L +lib/ofed/libmlx5__L: lib/ofed/libibverbs__L lib/libthr__L .endif .if ${MK_CASPER} != "no" @@ -2169,7 +2158,7 @@ lib/libpjdlog__L: lib/libutil__L lib/libcasper__L: lib/libnv__L lib/liblzma__L: lib/libthr__L -_generic_libs= ${_cddl_lib} gnu/lib ${_kerberos5_lib} lib ${_secure_lib} usr.bin/lex/lib ${_ofed_lib} +_generic_libs= ${_cddl_lib} gnu/lib ${_kerberos5_lib} lib ${_secure_lib} usr.bin/lex/lib .for _DIR in ${LOCAL_LIB_DIRS} .if ${_DIR} == ".WAIT" || (empty(_generic_libs:M${_DIR}) && exists(${.CURDIR}/${_DIR}/Makefile)) _generic_libs+= ${_DIR} Modified: stable/11/lib/Makefile ============================================================================== --- stable/11/lib/Makefile Sat Jun 30 19:50:25 2018 (r335824) +++ stable/11/lib/Makefile Sat Jun 30 20:09:43 2018 (r335825) @@ -83,7 +83,7 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \ libopenbsd \ libopie \ libpam \ - ${_libpcap} \ + libpcap \ ${_libpe} \ libpjdlog \ ${_libpmc} \ @@ -156,6 +156,9 @@ SUBDIR_DEPEND_libtacplus= libmd SUBDIR_DEPEND_libulog= libmd SUBDIR_DEPEND_libunbound= ${_libldns} SUBDIR_DEPEND_liblzma= ${_libthr} +.if ${MK_OFED} != "no" +SUBDIR_DEPEND_libpcap= ofed +.endif # NB: keep these sorted by MK_* knobs @@ -271,14 +274,6 @@ _libproc= libproc _librtld_db= librtld_db .endif -.if ${MK_OFED} == "no" -# -# When OFED is enabled libpcap is built as part of -# OFED due to library dependencies -# -_libpcap= libpcap -.endif - .if ${MACHINE_CPUARCH} == "powerpc" _libproc= libproc _librtld_db= librtld_db @@ -293,6 +288,7 @@ _libdl= libdl _libproc= libproc _librtld_db= librtld_db .endif +SUBDIR.${MK_OFED}+= ofed .if ${MK_OPENSSL} != "no" _libmp= libmp Modified: stable/11/share/mk/src.libnames.mk ============================================================================== --- stable/11/share/mk/src.libnames.mk Sat Jun 30 19:50:25 2018 (r335824) +++ stable/11/share/mk/src.libnames.mk Sat Jun 30 20:09:43 2018 (r335825) @@ -480,18 +480,18 @@ LIBZFS_COREDIR= ${OBJTOP}/cddl/lib/libzfs_core LIBZPOOLDIR= ${OBJTOP}/cddl/lib/libzpool # OFED support -LIBCXGB4DIR= ${OBJTOP}/contrib/ofed/libcxgb4 -LIBIBCMDIR= ${OBJTOP}/contrib/ofed/libibcm -LIBIBMADDIR= ${OBJTOP}/contrib/ofed/libibmad -LIBIBNETDISCDIR=${OBJTOP}/contrib/ofed/libibnetdisc -LIBIBUMADDIR= ${OBJTOP}/contrib/ofed/libibumad -LIBIBVERBSDIR= ${OBJTOP}/contrib/ofed/libibverbs -LIBMLX4DIR= ${OBJTOP}/contrib/ofed/libmlx4 -LIBMLX5DIR= ${OBJTOP}/contrib/ofed/libmlx5 -LIBRDMACMDIR= ${OBJTOP}/contrib/ofed/librdmacm -LIBOSMCOMPDIR= ${OBJTOP}/contrib/ofed/opensm/complib -LIBOPENSMDIR= ${OBJTOP}/contrib/ofed/opensm/libopensm -LIBOSMVENDORDIR=${OBJTOP}/contrib/ofed/opensm/libvendor +LIBCXGB4DIR= ${OBJTOP}/lib/ofed/libcxgb4 +LIBIBCMDIR= ${OBJTOP}/lib/ofed/libibcm +LIBIBMADDIR= ${OBJTOP}/lib/ofed/libibmad +LIBIBNETDISCDIR=${OBJTOP}/lib/ofed/libibnetdisc +LIBIBUMADDIR= ${OBJTOP}/lib/ofed/libibumad +LIBIBVERBSDIR= ${OBJTOP}/lib/ofed/libibverbs +LIBMLX4DIR= ${OBJTOP}/lib/ofed/libmlx4 +LIBMLX5DIR= ${OBJTOP}/lib/ofed/libmlx5 +LIBRDMACMDIR= ${OBJTOP}/lib/ofed/librdmacm +LIBOSMCOMPDIR= ${OBJTOP}/lib/ofed/complib +LIBOPENSMDIR= ${OBJTOP}/lib/ofed/libopensm +LIBOSMVENDORDIR=${OBJTOP}/lib/ofed/libvendor LIBDIALOGDIR= ${OBJTOP}/gnu/lib/libdialog LIBGCOVDIR= ${OBJTOP}/gnu/lib/libgcov Modified: stable/11/usr.bin/Makefile ============================================================================== --- stable/11/usr.bin/Makefile Sat Jun 30 19:50:25 2018 (r335824) +++ stable/11/usr.bin/Makefile Sat Jun 30 20:09:43 2018 (r335825) @@ -306,6 +306,7 @@ SUBDIR.${MK_UTMPX}+= users SUBDIR.${MK_UTMPX}+= who SUBDIR.${MK_SVN}+= svn SUBDIR.${MK_SVNLITE}+= svn +SUBDIR.${MK_OFED}+= ofed # These are normally only handled for build-tools. .if make(clean*) From owner-svn-src-all@freebsd.org Sat Jun 30 21:36:36 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11140FDC56E; Sat, 30 Jun 2018 21:36:36 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B4A028DC2F; Sat, 30 Jun 2018 21:36:35 +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 949D515783; Sat, 30 Jun 2018 21:36:35 +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 w5ULaZuX095517; Sat, 30 Jun 2018 21:36:35 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5ULaZdP095516; Sat, 30 Jun 2018 21:36:35 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201806302136.w5ULaZdP095516@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sat, 30 Jun 2018 21:36:35 +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: r335828 - stable/11/sys/kern X-SVN-Group: stable-11 X-SVN-Commit-Author: cperciva X-SVN-Commit-Paths: stable/11/sys/kern X-SVN-Commit-Revision: 335828 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.27 Precedence: list List-Id: "SVN commit messages 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, 30 Jun 2018 21:36:36 -0000 Author: cperciva Date: Sat Jun 30 21:36:35 2018 New Revision: 335828 URL: https://svnweb.freebsd.org/changeset/base/335828 Log: MFC r335553: Make CLOCK_PROCESS_CPUTIME_ID more accurate by including the current timeslice, matching the behaviour of CLOCK_VIRTUAL and CLOCK_PROF. Modified: stable/11/sys/kern/kern_time.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_time.c ============================================================================== --- stable/11/sys/kern/kern_time.c Sat Jun 30 20:15:11 2018 (r335827) +++ stable/11/sys/kern/kern_time.c Sat Jun 30 21:36:35 2018 (r335828) @@ -278,6 +278,8 @@ get_process_cputime(struct proc *targetp, struct times PROC_STATLOCK(targetp); rufetch(targetp, &ru); runtime = targetp->p_rux.rux_runtime; + if (curthread->td_proc == targetp) + runtime += cpu_ticks() - PCPU_GET(switchtime); PROC_STATUNLOCK(targetp); cputick2timespec(runtime, ats); }