From owner-svn-src-head@freebsd.org Sun Jun 24 04:24:39 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@freebsd.org Sun Jun 24 03:29:01 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@freebsd.org Sun Jun 24 03:31:24 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@freebsd.org Sun Jun 24 05:40:44 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@freebsd.org Sun Jun 24 09:39:42 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@freebsd.org Sun Jun 24 13:08:06 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@freebsd.org Sun Jun 24 13:14:05 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@freebsd.org Sun Jun 24 13:23:30 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@freebsd.org Sun Jun 24 14:15:33 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72BC3100139C 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 EE2F28B5F6 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@freebsd.org Sun Jun 24 14:35:35 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7B13D1001BEC 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 E99318BFCC 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@freebsd.org Sun Jun 24 15:22:39 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@freebsd.org Sun Jun 24 18:57:07 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@freebsd.org Sun Jun 24 19:01:03 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@freebsd.org Sun Jun 24 19:29:30 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@freebsd.org Sun Jun 24 20:56:32 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2244A100F26E for ; Sun, 24 Jun 2018 20:56:32 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) (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 8BE427A402 for ; Sun, 24 Jun 2018 20:56:31 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-ed1-x542.google.com with SMTP id b12-v6so4081590edt.8 for ; Sun, 24 Jun 2018 13:56:31 -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=f0/4YHAitBtpMQoAhiS3pqkROpYmnIyQVc7pvtYy1sxiLzTf6+u9VHjYEHnHDtW+SF mz8Uad3BmCTh+IH0uHlevAdefW/+pxRsaDj9UWPBW4UVc0eUVBnDWJrRfCu5SbtP8VGf x3aWUw6xfEzvoAFWlACqYah8MDqf6PsBhJ68NkA/Rp/9kKXOJN3NJ7UiLdbxIun4yZBg rd+xbGHcXR5P7a6LoWa67nh9wfM1/4ns2JAam/UbjHIbOvKQMZXl3tOkYbapbe7CdnqF KlsdD+lUxtJln5oQ4avaPzibuP2IyhXTG+15UE9tOau7s0WXzgikj4d12gRr5Af+/VKC cn9Q== X-Gm-Message-State: APt69E0tDQQSqjbfVs1o9/GZzCt2tcsxcOEhJsDB6PGCMaOS7Yra+E3v GcSgNU2NsyKVDa8Zgy3uRo4b5dVfqz0e8Vp6DJogdA== 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jun 2018 20:56:32 -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-head@freebsd.org Sun Jun 24 21:19:09 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@freebsd.org Sun Jun 24 21:36:38 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@freebsd.org Sun Jun 24 21:44:49 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@freebsd.org Sun Jun 24 21:46:30 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@freebsd.org Sun Jun 24 22:11:28 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@freebsd.org Sun Jun 24 23:19:32 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-head@freebsd.org Mon Jun 25 00:36:03 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0531101BAF3 for ; Mon, 25 Jun 2018 00:36:03 +0000 (UTC) (envelope-from eadler@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 7DA6983477 for ; Mon, 25 Jun 2018 00:36:03 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: from mail-yw0-f179.google.com (mail-yw0-f179.google.com [209.85.161.179]) (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 4A00B26660 for ; Mon, 25 Jun 2018 00:36:03 +0000 (UTC) (envelope-from eadler@freebsd.org) Received: by mail-yw0-f179.google.com with SMTP id t18-v6so130221ywg.2 for ; Sun, 24 Jun 2018 17:36:03 -0700 (PDT) X-Gm-Message-State: APt69E0GLnQEazpjXwHi+smxCb2YAaObVei1pPM0dtsNbWzWtY7GbYMQ FuHl+F6kVt/+dMxEIbuEYYE4yLwHu27VARXPr7IC/w== 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 01:29:55 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 06:57:11 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 07:25:50 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B6FDC102898E for ; Mon, 25 Jun 2018 07:25:50 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) (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 30FBC8F3A9 for ; Mon, 25 Jun 2018 07:25:49 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-ed1-x535.google.com with SMTP id q24-v6so3081338edr.1 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=A/X/Cm26wJ3oKbJ/CzC9XSB7sgupyTXhh72sJUi40ed+AR6/A/fQCzDwb4KjsJK64s KshRoC0EJE02VwXrrKFApdRY8rsJOmqqxp/I2cfIfOImKW0Z6nqwom0kI7ZydgoDSeig 3NxX5r2vustO/v8AKFcdVgY6skJKOi1popcIbWrmE8DAWm6vrm11Tqov20mpiLJmAP2h zmYzyNN81cDFAAEA/t8bMyjQntxHVhpk1kfGNiXbIgDBiRR354hoQ/OGmK1aXTa3nnF0 4b/R8TdsPjpefN9mHgfdQlS+VepnH6PAxm7CP0aSCW50O4jO/ioI1kpWdgseSF8Ubn4E voDQ== X-Gm-Message-State: APt69E3/bi2o+2P/TqO0/ip3AcbuV4p9IcSHBi0oNDYqsG9oTMLpezNB yxyh22IGW+TTVdOyplr1D3NA1Ctr5igGjQ7vQrj6iw== 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 08:30:07 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 09:39:17 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 10:30:25 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 10:52:42 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 11:01:14 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 11:12:22 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 11:22:41 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 11:24:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 11:29:05 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 11:43:19 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 11:44:42 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 11:44:54 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 11:44:57 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 11:46:45 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 14:12:34 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 14:48:52 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 14:54:43 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 14:59:16 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0851010126A6 for ; Mon, 25 Jun 2018 14:59:16 +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 7A3388034E for ; Mon, 25 Jun 2018 14:59:15 +0000 (UTC) (envelope-from pdk@semihalf.com) Received: by mail-it0-x242.google.com with SMTP id j135-v6so12786178itj.1 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=l/3NBX8ilgUI67CtoFrrgJLUp7aZ4DjtEpSfBzPvlI22Df5IzxamREQMWkC4NW89fH LigPXcPbMIsvqazPBwmeZMB9Ir07t7nuLjGe0Y+iiVyzGXW7wQxyS4o57jNZN2zTiYwM uSe9JrwSqy1CEaBpgOntDb2UmzqvzkL8j86nWjoKcGB15yBL86w1WPTAeMrE12axSc1l ffrD/uJooI3ZQaIbFfR6ZHPQjVNfMhgVxnB0kGXmjrkKikN6WhaHgZTmUCDK2MwBSZK0 CEsA+JPbji1FISFBVV/wFj7uIk7ukpDFR0ZqPmmJlCo5F9e41OsOEqevE4B9ICI21KPL FBiQ== X-Gm-Message-State: APt69E1ax2G4q8jUlDkzBWvw+q167h8lRfcx+oOnUvIhYf11GVef+Vee J2slL6CDPHQFTXFf0jmpL8sty0FbHUUyVwfur8+gtA== 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 15:29:12 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 15:43:55 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 16:42:50 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 17:17:49 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 18:41:01 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 19:24:51 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 19:55:17 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 20:33:05 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 21:54:40 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 22:05:35 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 22:36:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Mon Jun 25 23:40:43 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-head@freebsd.org Tue Jun 26 00:39:39 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@freebsd.org Tue Jun 26 02:05:46 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@freebsd.org Tue Jun 26 03:56:12 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@freebsd.org Tue Jun 26 04:02:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@freebsd.org Tue Jun 26 04:06:50 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@freebsd.org Tue Jun 26 05:21:29 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@freebsd.org Tue Jun 26 06:19:00 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@freebsd.org Tue Jun 26 07:11:01 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@freebsd.org Tue Jun 26 09:12:10 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E717E101D667 for ; Tue, 26 Jun 2018 09:12:09 +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 874E388B0A for ; Tue, 26 Jun 2018 09:12:09 +0000 (UTC) (envelope-from pdk@semihalf.com) Received: by mail-it0-x241.google.com with SMTP id v83-v6so1268513itc.3 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=HLfUQ1VpENWJ7NYBnk53kGm3P69D0XTfrN2DkaNgp4mwZFhLswSb5pGwlCGuvbnozz momWUCf4hwWtfWgbTiM1vdSAP3u+CboKtwat9JM6Pi6VVzRtdtwfkESVL9KU5/bp1NYi 2vhpk6Nf9eCWhs/wXykTxqTooopg7KFca5jq7LQ7zweoJ5SmF6Y+/72uq3HE7aP8rwjE NpiFnc6CXDhgqgj1OppjTG7AQlkCtOuks1wLkvXyJtZBmGydMgATJaePui68Gljx7Hb8 08GDpbaqWjhWA3xJdy24fqRYPNUo0Xtw/41E3fLZ+IeGjZ44ChJkjs2WgoyfiGMpzXGi PISw== X-Gm-Message-State: APt69E1FX4dHhQvhtbYo6L7gvLU/QEggjw/3Fg7OUJDp8ouiGiqdbvJQ WhoNihuW1vzvChnZRx2bUOoh/SLlPedFK2wzgoIijg== 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@freebsd.org Tue Jun 26 09:30:15 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@freebsd.org Tue Jun 26 14:07:12 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@freebsd.org Tue Jun 26 14:30:34 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@freebsd.org Tue Jun 26 14:39:28 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@freebsd.org Tue Jun 26 15:00:55 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@freebsd.org Tue Jun 26 15:55:33 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@freebsd.org Tue Jun 26 16:00:17 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@freebsd.org Tue Jun 26 16:18:48 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9634510010CF 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 1F5E077494 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@freebsd.org Tue Jun 26 16:20:20 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@freebsd.org Tue Jun 26 16:50:42 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@freebsd.org Tue Jun 26 18:07:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@freebsd.org Tue Jun 26 18:29:58 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@freebsd.org Tue Jun 26 18:53:53 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@freebsd.org Tue Jun 26 19:11:55 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C41EE1012691 for ; Tue, 26 Jun 2018 19:11:55 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic316-13.consmr.mail.bf2.yahoo.com (sonic316-13.consmr.mail.bf2.yahoo.com [74.6.130.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 670747F643 for ; Tue, 26 Jun 2018 19:11:55 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: Q64AQEYVM1k46Y1rSRJemp23WND6AqhPaEdL4WW07jV1Kw_XJ5NTnaamCxKNtBH 9cMe9aTHN3Xob78Wwj3vS5J8pWgrfT5MzsmezqzYa9D_rEqugp0MVUTi1DergdYxNmJbmnsBnUUM iVk24UbbrIagicTssQJP3jx._IzwPOhUyEqiZ_ql_nDmBQ_ZTHqDvsfuNMbHjdwepM0bLxmaAQlg GUUH.dCqzw2TjCZfqCJzpiNpDTGrxH24C486z7mTa4C0atwiUNEJiouW1NXk9_IdQMwGoatTWwHP A.Sdr2EQBcJJIXKQaqaF5CcuGxcrqaXXB7KeE0Du6ggqgEJHPJUvkyvBkDgGGouaqrR3VqAX1LfN iZK5fAz3Y8bWwAQlp37HTfir5rPPHbpG6f6m.2.WTByhzfLYNQ7rl4VhMxUKb_NCsInfQY015TU1 Yn9GCPOmqcpbnmbw63__Nf6dG5KEDttou4fO8YokM_5afEs9Ls80aAHbR.RrrqBPl6gKtVkYEiWO GaVL1hz3jrtgkCBXTw1O3gKVzQyILnfAQ_VWBoH.mzT.OWuVs_U03Ia.gWE2coEWDuNEvNkICKgT JO_5SxE4foAjX4.PaIbmkPNntn2HSw06y_JXMIcfBYgRkIrQCpWqWieUnJB4mADrDR_m_o_MhjCW .fhMnnSfM5Uiafzql18UcwQvo3mJy3oqswxueR8ypkmILo8V6Z9bao7Ox0Wu0xDFkoG_P1VLQcyy LKfGeBYFPUGCc0wRjEd3k5dsE.oz6XhILdxpZPfUQhVq_WvrGAo_6Afn8kQUmpDUeYU8tx5TEdmS 8PTnRdGdzFEB9HsOvpWGb6fiCywNVLcskX3QW9i23MuKF.xKTakBE4SbxkFI3b2bo6QUwzzNwXN0 6cgwFhQp84jO2jZfKsMXC4etG6aqStCSXrr3QSWx8UmLZ.ghSL26Hi1R6dfI9ImKoYcs5OlO37UP DFM2TkTJd6SY4RZrV4034p40qxw-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.bf2.yahoo.com with HTTP; Tue, 26 Jun 2018 19:11:49 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp410.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 7945e5fb160124b68c724d444c598e91; Tue, 26 Jun 2018 19:11:45 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) Subject: Re: svn commit: r335672 - head/sys/modules [ broke ci.freebsd.org FreeBSD-head-{powerpcspe,mips,mips64,powerpc,armv6,armv7}-build ] Message-Id: <21B2ACE4-3945-48AE-BB04-5341F6723B98@yahoo.com> Date: Tue, 26 Jun 2018 12:11:43 -0700 To: Ed Maste , svn-src-head@freebsd.org, FreeBSD Current X-Mailer: Apple Mail (2.3445.8.2) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jun 2018 19:11:56 -0000 > Author: emaste > Date: Tue Jun 26 16:50:41 2018 > New Revision: 335672 > URL:=20 > https://svnweb.freebsd.org/changeset/base/335672 >=20 >=20 > Log: > Build linprocfs and linsysfs also on arm64 > =20 > Sponsored by: Turing Robotic Industries >=20 > . . . = https://ci.freebsd.org/job/FreeBSD-head-powerpcspe-build/6487/consoleText (a gcc 4.2.1 32-bit target example): --- all_subdir_linprocfs --- /usr/src/sys/compat/linprocfs/linprocfs.c: In function = 'linprocfs_doprocstat': /usr/src/sys/compat/linprocfs/linprocfs.c:747: warning: format '%ld' = expects type 'long int', but argument 3 has type 'time_t' [-Wformat] /usr/src/sys/compat/linprocfs/linprocfs.c:748: warning: format '%ld' = expects type 'long int', but argument 3 has type 'time_t' [-Wformat] /usr/src/sys/compat/linprocfs/linprocfs.c:749: warning: format '%ld' = expects type 'long int', but argument 3 has type 'time_t' [-Wformat] /usr/src/sys/compat/linprocfs/linprocfs.c:750: warning: format '%ld' = expects type 'long int', but argument 3 has type 'time_t' [-Wformat] /usr/src/sys/compat/linprocfs/linprocfs.c:755: warning: format '%lu' = expects type 'long unsigned int', but argument 3 has type 'time_t' = [-Wformat] --- all_subdir_libiconv --- ctfmerge -L VERSION -g -o libiconv.kld iconv.o iconv_ucs.o iconv_xlat.o = iconv_xlat16.o iconv_converter_if.o --- all_subdir_linprocfs --- *** [linprocfs.o] Error code 1 https://ci.freebsd.org/job/FreeBSD-head-armv7-build/444/consoleText (32-bit clang example): --- all_subdir_linprocfs --- /usr/src/sys/compat/linprocfs/linprocfs.c:747:26: error: format = specifies type 'long' but the argument has type 'long long' = [-Werror,-Wformat] PS_ADD("utime", "%ld", TV2J(&kp.ki_rusage.ru_utime)); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %lld /usr/src/sys/compat/linprocfs/linprocfs.c:122:17: note: expanded from = macro 'TV2J' #define TV2J(x) ((x)->tv_sec * 100UL + (x)->tv_usec / 10000) ^ /usr/src/sys/compat/linprocfs/linprocfs.c:723:57: note: expanded from = macro 'PS_ADD' #define PS_ADD(name, fmt, arg) sbuf_printf(sb, " " fmt, arg) ^~~ /usr/src/sys/compat/linprocfs/linprocfs.c:748:26: error: format = specifies type 'long' but the argument has type 'long long' = [-Werror,-Wformat] PS_ADD("stime", "%ld", TV2J(&kp.ki_rusage.ru_stime)); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %lld /usr/src/sys/compat/linprocfs/linprocfs.c:122:17: note: expanded from = macro 'TV2J' #define TV2J(x) ((x)->tv_sec * 100UL + (x)->tv_usec / 10000) ^ /usr/src/sys/compat/linprocfs/linprocfs.c:723:57: note: expanded from = macro 'PS_ADD' #define PS_ADD(name, fmt, arg) sbuf_printf(sb, " " fmt, arg) ^~~ /usr/src/sys/compat/linprocfs/linprocfs.c:749:26: error: format = specifies type 'long' but the argument has type 'long long' = [-Werror,-Wformat] PS_ADD("cutime", "%ld", = TV2J(&kp.ki_rusage_ch.ru_utime)); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %lld /usr/src/sys/compat/linprocfs/linprocfs.c:122:17: note: expanded from = macro 'TV2J' #define TV2J(x) ((x)->tv_sec * 100UL + (x)->tv_usec / 10000) ^ /usr/src/sys/compat/linprocfs/linprocfs.c:723:57: note: expanded from = macro 'PS_ADD' #define PS_ADD(name, fmt, arg) sbuf_printf(sb, " " fmt, arg) ^~~ /usr/src/sys/compat/linprocfs/linprocfs.c:750:26: error: format = specifies type 'long' but the argument has type 'long long' = [-Werror,-Wformat] PS_ADD("cstime", "%ld", = TV2J(&kp.ki_rusage_ch.ru_stime)); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %lld /usr/src/sys/compat/linprocfs/linprocfs.c:122:17: note: expanded from = macro 'TV2J' #define TV2J(x) ((x)->tv_sec * 100UL + (x)->tv_usec / 10000) ^ /usr/src/sys/compat/linprocfs/linprocfs.c:723:57: note: expanded from = macro 'PS_ADD' #define PS_ADD(name, fmt, arg) sbuf_printf(sb, " " fmt, arg) ^~~ /usr/src/sys/compat/linprocfs/linprocfs.c:755:29: error: format = specifies type 'unsigned long' but the argument has type 'long long' = [-Werror,-Wformat] PS_ADD("starttime", "%lu", TV2J(&kp.ki_start) - = TV2J(&boottime)); = ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %lld /usr/src/sys/compat/linprocfs/linprocfs.c:122:17: note: expanded from = macro 'TV2J' #define TV2J(x) ((x)->tv_sec * 100UL + (x)->tv_usec / 10000) ^ /usr/src/sys/compat/linprocfs/linprocfs.c:723:57: note: expanded from = macro 'PS_ADD' #define PS_ADD(name, fmt, arg) sbuf_printf(sb, " " fmt, arg) ^~~ . . . --- all_subdir_linprocfs --- 5 errors generated. *** [linprocfs.o] Error code 1 mips64 is different but still broken . . . https://ci.freebsd.org/job/FreeBSD-head-mips64-build/3089/consoleText : --- all_subdir_linprocfs --- In file included from /usr/src/sys/compat/linprocfs/linprocfs.c:108: /usr/src/sys/compat/linux/linux_util.h:76:1: error: "DUMMY" redefined In file included from ./machine/reg.h:51, from /usr/src/sys/sys/ptrace.h:40, from /usr/src/sys/compat/linprocfs/linprocfs.c:64: ./machine/regnum.h:107:1: error: this is the location of the previous = definition . . . --- all_subdir_linprocfs --- *** [linprocfs.o] Error code 1 (powerpc64 built okay.) =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Tue Jun 26 19:13:50 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@freebsd.org Tue Jun 26 19:26:29 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@freebsd.org Tue Jun 26 19:57:48 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@freebsd.org Tue Jun 26 20:26:58 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@freebsd.org Tue Jun 26 21:56:07 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@freebsd.org Tue Jun 26 23:19:56 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@freebsd.org Tue Jun 26 23:28:04 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-head@freebsd.org Wed Jun 27 01:28:10 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 01:51:19 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 02:55:31 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 03:50:12 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 04:10:49 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 04:11:10 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 04:11:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 04:11:20 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 06:49:21 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 06:50:25 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 07:00:01 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3972C100AB0D for ; Wed, 27 Jun 2018 07:00:01 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-yw0-x22c.google.com (mail-yw0-x22c.google.com [IPv6:2607:f8b0:4002:c05::22c]) (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 BAB1D97BB9 for ; Wed, 27 Jun 2018 07:00:00 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-yw0-x22c.google.com with SMTP id n187-v6so341177ywd.1 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=J6hES1M+QkuJbZTkU0qzFCejvvIF/yIo2Uw2rehuWoLw/aHZcrC4GTvPpnO4v9XzGD egV3Ls9IghXcuL+UHaSj18dhPVViumaH1ZPDHtl7+LbRGvO37mfrbt9jCGd3unlbP+zA GdU51bSCu08jbp8w9wjk/kNA6y+ExPDpOQ+zIzHpURYv2dZ67KbWZICOlZVsTnVUeAK7 KqhHzZJ+Nh6LyIOR3ekuqJ1rR7sy+0yr2Zi1bNmTJfuj68KzllVs1ynPpsQnFGryMKUa TwZlm/g7jOdyf/avQcF0qrXmitrv8pxFS0KrjMEtu3DVew4dNxT2BEBrWShrw1y73ktY Vj2Q== X-Gm-Message-State: APt69E1eieGlpDvqmIZBCrBiYmZOoa0Hy+3N5FQuyNaqmDUqapPWaHEV aReiv82GDB/HE1yWd+qrEMGJjxdDDse9mfT0amk1bw== 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 12:08:13 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 13:42:54 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD6991024DDD for ; Wed, 27 Jun 2018 13:42:54 +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 347F97DC74 for ; Wed, 27 Jun 2018 13:42:54 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x234.google.com with SMTP id u23-v6so1927598ioc.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=svB3XSW9kZaOtC8Q6U5mWci+CafA0qav7eKoPgiRiGCZOYQfiSH9YqT4no+U9z8TkE E0Tamtn330Ec+cn4CaZFDxjbvpSGJWeHT7bL5ACdbV5wUsOd4nj98RwT0c/Ms7JVSP/C dwxZicwaHBwdGUxsnuzqU5aledJ/i9b6vliFkGU8qHjOWAU9VHd1xa9LqtIDq+2Q5oGf BQhDwSKoYB/+4uRDVSNVHgVZgh3vK0O/wlNH+KQN+0JmG1XUQv/TVvccP/Q7p2+VxTf1 W2poDJm0FsM6rkp37q54nUHoNOGLxuPYUYjwgRmGgubjuAVZ6+cSfWzp8xpQsU4l71UP oSDQ== X-Gm-Message-State: APt69E1weV736QCwrCP5YRrIqSlzIuQ35Bma9MAm0GJnwTitCHbFl/zo BhI9mQksiO1hNt6wzERbgIW83M6DapotL9Kr5tnWVg== 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 13:42:54 -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-head@freebsd.org Wed Jun 27 13:45:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 14A991024F6E for ; Wed, 27 Jun 2018 13:45:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22c.google.com (mail-io0-x22c.google.com [IPv6:2607:f8b0:4001:c06::22c]) (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 94E3E7DE29 for ; Wed, 27 Jun 2018 13:45:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22c.google.com with SMTP id q4-v6so1953482iob.2 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=Tu6NJo5dH4Zc+Wuf6HuZp9LgroJpmZBGArV50gMDrWC9s/CxNkLbiuqskRx3/W0VCu BTtBG5iRKI/Ac9bnKaj0yIT3y+7XhWicv1JUng4udeZWEtZkz9M6S+KiLjgQTEYH1A3y auRoHagYkdP6CIy+lP05xBiLfedxZ1ouKA93c0SHYQ78T2fplBvp59ePZMqTncOxyKB9 qGMrn6M7IRGV75FunJd6kRac6ZgNO3sGqZ5d1N2bkftmetIjho5NRPFDpjWH06MdZUsr 0aOdgxn0uTvnthG11xMqMVukaB6qfFHw5Mdp+Fzcfwx+5SAdZKrAd9VolmKl3kSt1K+7 H+1Q== X-Gm-Message-State: APt69E0n9xWAeqEtoh/nBYFRxGUDpRZJ+hqoxcjWQaFmu/c2Wll02z21 YefyU4B3Nh6vAP1yV7lgcxFxAa/H90lxFFBsZgFIDg== 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 13:45:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9885A1024F95 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 032937DF0E for ; Wed, 27 Jun 2018 13:45:27 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-wr0-x235.google.com with SMTP id a12-v6so2129359wro.1 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=Tr1sjVTaXcV3A1C8RUpKSUG4dEbFeARTqH0GUcFx0jwrJ7spu/DZYTQQ/QIlr99uwD SdtTjnorWwi1XhU+qfUPIeFyzCvtGocj7KJ31rPSN/VMs8JHKuNiuCi37SF/MvsUNogq XZgMmikuP6/eNQSZJUtuT4gXps6pP14EvfRWyZcX31rXtQfFjzkTaIYJ3FE4j9LL1rXc u5L3YXu7P7QAJkyHHniHdpbF5nO1lB5LCmDtRj67M/ZQ6yJ0wyA6QMqo/KH4/otMpnuF Mv99edDrNtHoSF30fZllik/gmx+wjxGr8XBMasb5AKUxdSqSdNzJiWru3XhfbLeaiUvt 1awQ== X-Gm-Message-State: APt69E0KEFmAf64nAAQCPgyJzQvUIxy0/4L+CXLn5gq22Qc9UyyxYW0K 0NpeVC2AK3VWyirg95JpC1XjdA== 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 13:46:30 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21D9F10250C4 for ; Wed, 27 Jun 2018 13:46:30 +0000 (UTC) (envelope-from wlosh@bsdimp.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 9CF697E088 for ; Wed, 27 Jun 2018 13:46:29 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x229.google.com with SMTP id k16-v6so1943362ioa.8 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=dI26vw5zW3ZiXeKaB8R+msXd15edvuFEqGive2vymgiGYILOkg2ZL11YeXI3V4ue98 RsN01C3TmSN+RqzuEufpNBABFqIeio6LvlcnLo01LijVtOpMxxqt8aegoZz2XB7bX0nO s36AfzZ9Y6Wtem35Zy89hh9PTUQKBDG5BTOWx3YdIgAU2Yzvxzg20vWMhOEfDoR+AfFf Dxelyq7seGudlWI8B2qsiN74V9DhBsQW0RJgd/ROqaljCKQV76ZXXD3pmXVxTob1Sj8F vNrkLcNpo2ZE87HebTC6rIoNrOrzQgPfuqJSHjXm1i1xJBGR9uQwtlzaB0x7PJbkfoVk Liuw== X-Gm-Message-State: APt69E3aw5zKDkg4WJnEa5TwWWCjVDFf31MCURuprM4MIQqm2OO7zmd3 G48N3t4j6TPfH2HMk4Sn1MjXFXoTPswx5P8vkFE86A== 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 14:05:59 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 14:09:29 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 14:29:14 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 14:45:15 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 15:28:11 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 16:56:47 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 16:57:49 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 16:57:54 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 16:57:57 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 16:58:03 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 16:58:09 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 16:58:06 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 16:58:19 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 17:04:02 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 17:13:40 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 17:18:13 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 17:39:48 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 17:40:30 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 18:11:48 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 18:14:34 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 18:43:35 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 18:51:55 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 19:10:34 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 19:29:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 19:37:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 19:45:56 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 20:53:30 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 21:36:50 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 21:36:58 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 22:00:51 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 22:02:01 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 22:15:52 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 23:07:23 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 23:09:02 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 23:23:35 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 23:44:38 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Wed Jun 27 23:52:24 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-head@freebsd.org Thu Jun 28 00:59:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77106102226C for ; Thu, 28 Jun 2018 00:59:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x230.google.com (mail-io0-x230.google.com [IPv6:2607:f8b0:4001:c06::230]) (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 133837CAC1 for ; Thu, 28 Jun 2018 00:59:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x230.google.com with SMTP id q4-v6so3617487iob.2 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=XcUrZ/nIa7XTz0dVwH0OOfWKaN5zFkeBlJ3adabrmjrWPhfnnqqqhBphLFNJb2zQN+ RDW2OWktvrBtBxYY/9SGIHe75a5nGg2OQ4cAgYyQCPQe08rXZht5mRIywutGTMCDxrQ5 vxEh1gOMzh2YAC0soc43OtE4hoES7PGHUSZXMbE+jBVqLn9NbafPEGlzZIpby3oCePi8 JMDQ1hwyOW0OU6OuvMyOajUig942DOhTmt7DqPB5pGxi1eNL1TXuqgCJ9eDHuqw6whZW 66KuHVjIPBQ9cIBj+ksWhBaIg8LONSZ9h88za8bHzC/0327kexYxpAMA5oJcU1UUAh/Z klwA== X-Gm-Message-State: APt69E3h/3HFsY0K0plzZ4L8XwKQqR/re9LrdC5i4zkDu4QW9c3kFQ3R o7eYs3BIVI69+MqYBcTUrPv9u3JsVqsrr3Qi4jENyQ== 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 01:27:00 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBCDC1024E4A for ; Thu, 28 Jun 2018 01:27:00 +0000 (UTC) (envelope-from marklmi26-fbsd@yahoo.com) Received: from sonic316-21.consmr.mail.ne1.yahoo.com (sonic316-21.consmr.mail.ne1.yahoo.com [66.163.187.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72F367DF0F for ; Thu, 28 Jun 2018 01:27:00 +0000 (UTC) (envelope-from marklmi26-fbsd@yahoo.com) X-YMail-OSG: maAOy64VM1l2aQy.pL3yztQlPRr2431T56EedqJ2QzIZNhY3vPDm.mh1EwmTFiW Qn1FxyAa7Z_usDMpHCMdh0D_Lk9OHPY9YloFsw_5.Erqb0D4dOXxb32cF3fcvERAhZOks5Z_kai3 OWwLz3FhlqoprijDNx8bJTs6enEjSxLw.pEVVmg9NN_MN75qRoo2yJOb.f1KPSvQSaP5EEq_lSMS 2DzTyImJQS1Z9HWDnSm9AMIA9Xh585SI1YDFWGkHV1JUR70Zz30cGEaTJRCtspqSpc3RWCNGjcvB jZSj9zONLD3rda09NOU6u98.No8fBee51bFSn40t0WNgbKEGz2bS2gL9O3_jpZ0mqxXkEI9g4ott WN6nIk6PWghS8KyxCUs_QAFDjQsmAl2GHrwLLrQG.4otnm4nwX9ajICzAs1Ukr5MPfkMt7tbC7os p1mWeiQkRpEFH8XKwpDXdU7bHZL3.a5TyZcdIeGhPu6iS3xYlb3IXTMF25_KE4MWqi4ANQ6NyIu4 _7sxUuSlQ4deqpi4PTv2_LqlszgbdRdo02xciBND1uXfjaE6VzZVL.qDWJ2QYEvxPW8BBpp81wUO .mKim6BEP2jT3WVMk0foEtmjs2kMLDViRkp5EHQlljxH.GZTI.IYBfhkOnN52f6zOBZKNVg6olnM FwxbTMY2pm_oL_9QM1TDlYBytVGmuXAjc0N5DxknkBsVjn.3dGaGRQrv2V9MqZWvxvNnEhqb7hIt .ckbudatgtDMqINjYKxn4u.Ia2MTkUzGDxF5wJj0SkyQDDDDFzS_BDMWsjfhdAfDCIi8MdXIVnI8 vkg1CeW1o10ERDKOg92Vf7g.5CL3.c76QkRctIteMu1_zjY0dif8ppx_Cqdkhm3Sn8HwqevChls6 pmg9CRKob_mNkSu7t9UfXs1JneBGUf.mQWiOruKJsCC2k_b5fPbxXHwC4Pf9g1xtUvEMtcVdIBDM mfQW4u4B2CVyBT7MZ_Nc8 Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.ne1.yahoo.com with HTTP; Thu, 28 Jun 2018 01:26:59 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp404.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID b5f5dc6c5fa953b9c644f39705c51c12; Thu, 28 Jun 2018 01:26:54 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) Subject: Re: svn commit: r335753 - head/sbin/devd [ broke the ci.freebsd.org FreeBSD-head-{mips,mip64,powerpcpowerpc64,powerpcspe,sparc64}-build ] Message-Id: Date: Wed, 27 Jun 2018 18:26:52 -0700 To: imp@FreeBSD.org, svn-src-head@freebsd.org, FreeBSD Current X-Mailer: Apple Mail (2.3445.8.2) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jun 2018 01:27:01 -0000 These are the gcc/g++ 4.2.1 based targets. For example . . . https://ci.freebsd.org/job/FreeBSD-head-powerpc64-build/6261/consoleText --- all_subdir_sbin/devd --- /usr/src/sbin/devd/devd.cc: In member function 'std::string = config::shell_quote(const std::string&)': /usr/src/sbin/devd/devd.cc:652: error: a function-definition is not = allowed here before ':' token /usr/src/sbin/devd/devd.cc:1327: error: expected primary-expression at = end of input /usr/src/sbin/devd/devd.cc:1327: error: expected `;' at end of input /usr/src/sbin/devd/devd.cc:1327: error: expected primary-expression at = end of input /usr/src/sbin/devd/devd.cc:1327: error: expected `)' at end of input /usr/src/sbin/devd/devd.cc:1327: error: expected statement at end of = input /usr/src/sbin/devd/devd.cc:1327: error: expected `}' at end of input --- all_subdir_kerberos5 --- The following is modern C++ syntax that is being rejected: . . . for (const char &c : s) { . . . (At least if I understand right.) =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Thu Jun 28 01:32:01 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 50D2610257B3 for ; Thu, 28 Jun 2018 01:32:01 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x236.google.com (mail-it0-x236.google.com [IPv6:2607:f8b0:4001:c0b::236]) (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 D6F187E4B6 for ; Thu, 28 Jun 2018 01:32:00 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x236.google.com with SMTP id 76-v6so10322664itx.4 for ; Wed, 27 Jun 2018 18:32:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Y171on4PnONujMJUv9CsNTwzepmycb6A/sutI06Ta18=; b=Yg352s6p/ar75J0HMRj+8KEM+HEqitIlOj2A3lZS5FFqdov4wgBcB6/k5/q0g/fIRh gERRvpJ6CxQOGaOW62gs9o11jceQyCw4DA7VL231J64PG2CzymyCDSsxSsDY4ya2GgC7 ocx1R299Ovn4NruxZvoeHiGGJ9rTz2bUyWoEs6mtEFqchJdzMVZpeSVNwg5yHyVOIR+f rSeRx44v7Ohf2N096MKmuZFbbv4UyKlrs/eg+WEVnFeItJ1M7lvQChGVgH4tXwQSIALs efPFF3vF3sC+zgk7DRrMv3lXTv7BxnCQicjLvwr0Bw2E6IMSAPX6xJb0EVXUrnx9TF3u dI6w== 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=Y171on4PnONujMJUv9CsNTwzepmycb6A/sutI06Ta18=; b=sLQna5Y2jlLtq3RM5vhbIuv4CfX/BZr9McH6qWz0t4yHTOzNAa/ImdSRlRdlyCk5Oz Wrp3WY5RLG6ynecAFwlEpE5Kfjok+PfF705qsJbXGLSSCv3euQTafu1Z2ZQF/lJ/XqtJ w86XvmSy0nMAeANfx649Y2crBpcblzWjrCgctqHjrzzoDHt4TwbbD39Bhu0sxBSpdwh0 QF4752YXy1LOzl1wuo61Zgsxcl+RDhUR7JctSRagAkHL/WWWfSJ/WoDF+QvDSto9Flq/ MHFORzKpuYfDk+jTUqgYpEHLC3bAOlZqJM+NiKvixcRoVLK/mF3wSoMKK4DNOTudiKe+ SYuQ== X-Gm-Message-State: APt69E3OJvw40orOWaVF9HgjR18RV1j2TiDsy74Jvc5KkZoeKMVvtPKd b1LgQ3ypVga6zGukqhmljPFv0ZYJBj6484XXQR2p9w== X-Google-Smtp-Source: AAOMgpeKCmgMRNkZ9mXptg1SiWGc8W07aCjTzF4hjtvpd/J//AgjzDzkt6YWm0QyqiRvtBHzG3jN7hHfgpcivLHdTu4= X-Received: by 2002:a02:6001:: with SMTP id i1-v6mr7148513jac.5.1530149520126; Wed, 27 Jun 2018 18:32:00 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Warner Losh Date: Wed, 27 Jun 2018 19:31:36 -0600 Message-ID: Subject: Re: svn commit: r335753 - head/sbin/devd [ broke the ci.freebsd.org FreeBSD-head-{mips,mip64,powerpcpowerpc64,powerpcspe,sparc64}-build ] To: Mark Millard Cc: Warner Losh , svn-src-head@freebsd.org, FreeBSD Current Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jun 2018 01:32:01 -0000 On Wed, Jun 27, 2018, 7:27 PM Mark Millard wrote: > These are the gcc/g++ 4.2.1 based targets. > > For example . . . > > https://ci.freebsd.org/job/FreeBSD-head-powerpc64-build/6261/consoleText > > --- all_subdir_sbin/devd --- > /usr/src/sbin/devd/devd.cc: In member function 'std::string > config::shell_quote(const std::string&)': > /usr/src/sbin/devd/devd.cc:652: error: a function-definition is not > allowed here before ':' token > /usr/src/sbin/devd/devd.cc:1327: error: expected primary-expression at end > of input > /usr/src/sbin/devd/devd.cc:1327: error: expected `;' at end of input > /usr/src/sbin/devd/devd.cc:1327: error: expected primary-expression at end > of input > /usr/src/sbin/devd/devd.cc:1327: error: expected `)' at end of input > /usr/src/sbin/devd/devd.cc:1327: error: expected statement at end of input > /usr/src/sbin/devd/devd.cc:1327: error: expected `}' at end of input > --- all_subdir_kerberos5 --- > > > The following is modern C++ syntax that is being rejected: > > . . . > for (const char &c : s) { > . . . > > (At least if I understand right.) > C++11 I thought was required. If not. That the issue. Warner > === > Mark Millard > marklmi at yahoo.com > ( dsl-only.net went > away in early 2018-Mar) > > From owner-svn-src-head@freebsd.org Thu Jun 28 01:45:54 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 01:49:46 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 01:50:45 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8931E1027B13 for ; Thu, 28 Jun 2018 01:50:45 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic302-20.consmr.mail.gq1.yahoo.com (sonic302-20.consmr.mail.gq1.yahoo.com [98.137.68.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D4BE7FB10 for ; Thu, 28 Jun 2018 01:50:44 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: 8VrzPN0VM1loPUwCfchFZcUtNsBX3xCvKYGVHcuQBzt9ElOyzwcdOUW8rvDyvs6 xL9p0QiP_H1z5QZ5sp7LwEte70GGB2W7G35qNmyJyU4JiXZ81wodCpKH9iwMLA1nq3kD8IK_Mrct P..PRxLeHBgcILA6qMhgVVaZzYlwgNinBZ.ZlVvuwVY3U6qBSpwrQtuA6nEZyJaN9fFfOtRcgVCp aFpk1dnroPokzBITkZ5tv4fXRxIv1C6l2.50EyHF64RIhyIEjO4bBVEu5dQuewzoWMDGHS5MStDM UI.zzXynR0C.D7CVfP3ziORdAjVF32qASxTT7MdTH6seP_pjd0KzBrMz3dK2oCac1F8lU47IUvof n7SYHDWfu1KGrmrcFc91qd1m5bEaiDuLwUKaibyjgc1GPxX5bFQktiYaCNUW3XzKE_RdE4N1LmA8 dE.L0RTkHf5lN3cUHoT_zYJQPIzTg5iQlxHTVfLOSA6Yq3E9Q6yWfONeT4fRlIKrgHWM2Ed59.am X9oW3fa3PYclxBBhM8J5T.KOXn33MdouUZyX0pwOvuiXgrjaUjwqcKgXYqVDLQKWQE0nUqWq8zUL oFEBMZp6fWikhD_xwkhMU2fZwlxxqNFmYGchutDiqxuhPTvMpQt0SEo.p2OrIVNMRLXWydyFhZYc iQ1TPrmZhVBwLxvJdW8u._bD2V_Ekty90UhRpeeIpQLHq47ymaShNtOa9kIDRdj32KMj84tWgoYA MKrx19PHCh6bsFNll7niHA7OAedQelZcrLumyz5ZKdVDL0BPFGBUhjgAHV3ECF1Lc8Pc8aLuKnuS EMJNcotaSj0_CR.CdE9zPp6ku1ZAu0ZuldMRY9Cva.osfftB.rwdDx6TouEf_rx2J4PHcllvdZoe AAcWCsXmvVNgRtgclUHsc7lfi56S7SaGRF48od5vFPvFbq3kEAdPOLUmWmz3q632qP4kxjmCI.YA Z9H89keD38jU8I2QUKan5AIqelyid Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.gq1.yahoo.com with HTTP; Thu, 28 Jun 2018 01:50:37 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp427.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 512eccaaade6fd164f4aed6a55c6334b; Thu, 28 Jun 2018 01:40:28 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) Subject: Re: svn commit: r335753 - head/sbin/devd [ broke the ci.freebsd.org FreeBSD-head-{mips,mip64,powerpcpowerpc64,powerpcspe,sparc64}-build ] From: Mark Millard In-Reply-To: Date: Wed, 27 Jun 2018 18:40:27 -0700 Cc: svn-src-head@freebsd.org, FreeBSD Current Content-Transfer-Encoding: quoted-printable Message-Id: <5DCB8E46-964D-4590-B1B8-31523D6834BE@yahoo.com> References: To: Warner Losh X-Mailer: Apple Mail (2.3445.8.2) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jun 2018 01:50:45 -0000 [I used the wrong Email address the first time.] On 2018-Jun-27, at 6:31 PM, Warner Losh wrote: >=20 >=20 >=20 > On Wed, Jun 27, 2018, 7:27 PM Mark Millard = wrote: > These are the gcc/g++ 4.2.1 based targets. >=20 > For example . . . >=20 > = https://ci.freebsd.org/job/FreeBSD-head-powerpc64-build/6261/consoleText >=20 > --- all_subdir_sbin/devd --- > /usr/src/sbin/devd/devd.cc: In member function 'std::string = config::shell_quote(const std::string&)': > /usr/src/sbin/devd/devd.cc:652: error: a function-definition is not = allowed here before ':' token > /usr/src/sbin/devd/devd.cc:1327: error: expected primary-expression at = end of input > /usr/src/sbin/devd/devd.cc:1327: error: expected `;' at end of input > /usr/src/sbin/devd/devd.cc:1327: error: expected primary-expression at = end of input > /usr/src/sbin/devd/devd.cc:1327: error: expected `)' at end of input > /usr/src/sbin/devd/devd.cc:1327: error: expected statement at end of = input > /usr/src/sbin/devd/devd.cc:1327: error: expected `}' at end of input > --- all_subdir_kerberos5 --- >=20 >=20 > The following is modern C++ syntax that is being rejected: >=20 > . . . > for (const char &c : s) { > . . . >=20 > (At least if I understand right.) >=20 > C++11 I thought was required. If not. That the issue.=20 Looking at "C++11 Support in GCC" in: https://gcc.gnu.org/projects/cxx-status.html shows almost nothing is supported prior to gcc 4.3 . Some things require gcc 4.8.1 . As for "Range-based for": it requires gcc 4.6 . The SD-6 feature test listed is: __cpp_range_based_for >=3D 200907 =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Thu Jun 28 01:58:40 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C70DB10288BE 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 53336801CA 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 p4-v6so2973240itf.2 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=jCriWDXevmpCvr5cqiyTYxVb2dHT36riGeq8JJ3Rpd3FeEDjh+YWTt5pOXIaA9q1X0 CkQrIBMwek/Rmsx77BUj32AuHaJPSvGUZYiqllBcm6rLX9RjULdpVSc8IndyFq1KeFAf gRtAYBuTjkML3GDZgc3sIrxSL+Y4DKsSVuhVk5o+Cxn5uA4F1X5dZyZVpTnfdKE51fo+ tqaEJX31KC5IQEAWj/y9JCX/B01DBTIHSMC/XG+QHDjZMBPLRPQCgG9dviv7egkBQmKj x03qbajj7g/DYRjSeWo9HSUSqTuY/zPpUST0cYpWt1RFnT4hpY5p4H+o9+uv9PT9g9Kq xCMw== X-Gm-Message-State: APt69E2b9a0uKabIZMwLg8Sv9XTf9SUHUkU4995y9XnLYMKU6wVF3+bs rKT0vU1HJMApsfW1KxTp3R7tLfDWOtokM+Uf8ehCDA== 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 02:14:51 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 02:35:48 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5964F102C545 for ; Thu, 28 Jun 2018 02:35:48 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x233.google.com (mail-it0-x233.google.com [IPv6:2607:f8b0:4001:c0b::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 D5FA682230 for ; Thu, 28 Jun 2018 02:35:47 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x233.google.com with SMTP id p4-v6so3060966itf.2 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=ocqsgWDNQh5XSFTPtdXqMa7hVzq8HInLIX4qYdhCyXSHrdV1ByWUtHF7J6gvfBPOwn xEdpsVWPMo04fkgLZxAPQdcWPFWNzbXYvvW/z3R5UW1xAuvA1kTsEIbVW4n5LJMhLq7P rl3FEMAt8BiGhe1k8qQgubzxJBjwoH1GXCgNt/PVF9jdM/ZzkkT4cVeALO32w/Y/tHR+ qtKMziziS3VmFXx7d2xZuK2row29sIf8jaiMbgt1Bm6klku3blqrbqFElT5/0g4rzhFj KiKZL2QCbgFtD9G4yZ21oEAL+P/6mB8QGEFuqv152DdpmnXJp5WqP458FvLg3Ezw6mJZ B9KQ== X-Gm-Message-State: APt69E2pgvmJ7f27BZM/rGZz0wZGEReX5F968gvVCWh9HO2HExfmK4o3 7oRvzIEVZPT4rMfk5adNDSlB+QwmeTyXJ8FeVr09RQ== 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 03:37:16 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 06:22:09 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 06:54:46 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 07:36:09 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E58A4102252C for ; Thu, 28 Jun 2018 07:36:08 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22a.google.com (mail-io0-x22a.google.com [IPv6:2607:f8b0:4001:c06::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 7A0498EE70 for ; Thu, 28 Jun 2018 07:36:08 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22a.google.com with SMTP id k3-v6so4304861iog.3 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=NHBPNVeCIvHQVWle1UsXfV7e5xZx8H/oKWOSO/VaPCjpfOvdaL2DN192gyHMkmZgss gY7CeIYcaTnmEyPgd6M692il9gWAN3sHpr0sG9+v0ryse2qW1JlPRDkN0fwsRv5bS6qz qGBw4jEvB9NYwWF3idFoDGw9QsAPfwWIBSTiFZhNTAJNLVfh5yuei/VSbCI1TS5mz9AG dfbzxHvFl+CgPSbPNDYKu1G/xBmeRcX1aOVH5zaGubwKMoULcro0iCqxeJB2Fi7ztQfi Vy/dlWT6gYHoH4XD73KSETxyga8N5r4hebaahLA27+IunlDkfLdBZYbPJOIhYMTQBMFN JTSQ== X-Gm-Message-State: APt69E1CO5YYYEUwBlM2TxZvKPfJWv7TKo7vDYzWDPdEZ8gwirz2mi5Z 35SLlFpDCKHV0SYDhObMvpZv6o5/Mb6rv8DpiqTwJw== 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 07:42:31 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F9C91022A1D for ; Thu, 28 Jun 2018 07:42:31 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x22d.google.com (mail-io0-x22d.google.com [IPv6:2607:f8b0:4001:c06::22d]) (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 17A808F3C6 for ; Thu, 28 Jun 2018 07:42:31 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x22d.google.com with SMTP id i23-v6so4300828iog.10 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=GOEOMP5VxVkGiU+Vkmh9EemhFXBb3zUfbANc+XMQG00hIjylEEscgOYnYiHuT5+Pf7 dkTz6m3oNjJ/sMrRNlb0wqVL4Ns8nG0nEB9m4lSQ16V1z0TYKH3s5+PPkeCZ2VSEMI/U iM6CYIjIr8qphn6u/T4M4szf0sElU6quxIcbgZzJkaHJ67dKoHUMTpp0SzMlksrL7OXC TVGJj/sjEBUiLsduEMqrqYOt8+T95VmTzLIuTdGfisU3Ixvg7kBKGZDcf8FDkCoKQ+UQ X4E7yjeVuOX2EpEv8579G3a3qkS4W64hNj4MG9VkhCEWaydxDH38ls5mXeSC6/YwIn1z USWw== X-Gm-Message-State: APt69E3NU+OCcOPnBDhpLQyHkJLprXx8JXhjuNXMqIkJQhUOVHRepbQg ZJkpf4K0DEF8YcJy87hGxoTfAyU15LO7axkWMp4BxA== 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 09:36:17 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 09:42:31 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 11:39:29 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 13:16:32 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 13:49:02 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 15:00:19 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 17:01:05 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 17:06:44 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 17:07:21 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 17:09:41 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 17:52:07 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 18:17:21 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 18:19:47 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 18:22:21 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 18:45:40 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 19:01:54 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 19:05:06 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 19:17:37 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 19:35:12 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D7521025382 for ; Thu, 28 Jun 2018 19:35:12 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 77FD28A768 for ; Thu, 28 Jun 2018 19:35:10 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-ed1-x534.google.com with SMTP id m15-v6so5847295edr.7 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=cPwtmBTU8DXcDS268yHsfzqmRm2tdLMQexsRGIO+7PN3LRBQElfJTA6E1nQPgoUVt/ +VR7TeqxtOwRyC6BdeOnOuS8nu4Y6tKNmVJb4Rv8O9ZacNJXqdWNjtiN9lfnr9OWjSQ/ r2wmfV9WNc+ZCnnPafu9EIyIvzHYC1j8e72YAAMS0RUF9DND0rIyunWcPJcfAygpEbV5 SdOP/K48NXi8BB0LTehzolqEV285+N/J/XSpi7+FBXDpeWXtBQlK4IMVqQ/5k0UAnpaY ZhADrEIK5i3wDFiaYareAOVdBOfaWVTQ6UXKZYd6DUftQHHUZZUvB/gNtegQ5b49CBJT tnVA== X-Gm-Message-State: APt69E3P718loTaIeJVzzgc+2l5wvue/tmcqZFIPOam6kJ6tCs9J5nub keqGvTlzP6nn7vU84601CZ1NkYps6X82suEeQdyNOA== 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 19:40:19 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 19:42:14 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 19:44:58 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7A1D21025794 for ; Thu, 28 Jun 2018 19:44:58 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) (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 CE5EB8AF8E for ; Thu, 28 Jun 2018 19:44:57 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-ed1-x52d.google.com with SMTP id v22-v6so5864532edq.4 for ; Thu, 28 Jun 2018 12:44:57 -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=to2cbAToF4V09wFQ5wSCaVnvBwG9sXPjBIa43TBz1aKp49EK+K0W079uvSh4NF4+CJ xqoGK8Uiu/8VnVoHDpKeB7X8F2/DLOHS4fzSFh6c1BVBp+8eouqECchbmljBVA6FRe8n G6rYV2JgSJB/TZ/JkORAk4B9ytUK3TbKpwVtLwgCb/L/0Cc9VjjzGHzbgcXbCNyfOEd5 asP7dY5OUO5MUtvRWhris1M9wGdLv9U8ESxlgndMFHH/rsOJe0WxmXD2m82jIzrAxuFI OFN6FrA2QhTo4N+28fIqtrwJwD1OlI4lRO9U4PDR35U5yNzfQo2xI2Ry68WxlqeLqvTZ Y9YQ== X-Gm-Message-State: APt69E3AQ7esqSGyReN6twt04a2TizZKpz5FbfKHPpOkGVcLHca4J804 9jfDWrWObhl8oecZOWAGWp780jeyHdLvJBPb0avkCA== 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 20:36:22 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 20:37:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 20:40:30 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 21:14:34 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 21:26:15 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 21:27:35 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 21:40:32 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 21:59:46 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 22:05:30 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 22:13:33 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 22:24:17 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 23:01:42 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 23:44:13 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Thu Jun 28 23:52:52 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 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-head@freebsd.org Fri Jun 29 00:39:50 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E48F102DF9E for ; Fri, 29 Jun 2018 00:39:50 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic313-11.consmr.mail.ne1.yahoo.com (sonic313-11.consmr.mail.ne1.yahoo.com [66.163.185.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8DD257594A for ; Fri, 29 Jun 2018 00:39:49 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: 598XcdoVM1kwYkiVoQRlSQVSImXI_ANlNskKc_YH0m_AYtQlpyw8WghXqggmeIZ I1s_Jao9mhckgH2LCB8BeopGt7Yu5Qz.814ZGeFJdmtNQWIzi71fWcrvGiXZS8MEQm6n3v.Tu0mS g3xATj5p.4xy9SlUvQCxYulZw3DGoB07Sl7xB5jaXVKKc0XtIBONfg9keTf9_OohwNsGTy43y7iH onvAbdJd6kjWL9Z09XJVdoBoepxLC.La5qIYuuHiZnc0IFuqUhrROL5myeVLpvxJfKOupqpauKIu KqCV4jTKp9Fa3hneNT4HF3QSnVTxPyvC2tQ6F4kGNGQIQICnUih1Wl3RsBdIEMUwi3HzdtQKwfzL NKiJDcrVM0K8yHMHN6TXd1kFd3ej.ZUzTLXWrrE3qYRnhKSXL6LYqT9QKJeSp2paIuMGt97TpPmD PhUbLPnpGp0frJ6XMU3wBx55o2zj65s5xt5Ab9RxXi4Lzz5cMLJV5yofaS.W.pBrZf2qRMbieJh1 IjHbOvegjVvtQapc4cx9FQkTn01DlrI3dTOknWNleRp2WtZ0KirfhiJEQh9mQT_Sg6SGRIoDfaQt adqcaputMnuE5RCCPpQK1uC7k3Ei08XmjtiZyOapTXTft1ncIvxgOf5daCAvI4fg20IuisNn01KC AvCVXfk9KluPTtjj4uPQnJZer9pcWXBBcBfkxxzEHlWNvBnEjIfJuXDqTawGDvD3y_3Tqze1f9Tv S3c5wqTLr8uxJUmuvXi40NCrhSiu2Lgi76YmZGOkbThuHR2arctS_TFYfISK5NqRlFbZNVl66jgr zEzFar5Fw3liwt7HBRAVlFspRkIRRlizORp8ibvnJc9FrerCAiimRY14ut9OxtAoajG7AYLx7_bu ebxky8ywCt..DybmViAUVOWktFZKYYIuK3KHgWqf16THxi4FouHx63wsFppGTX1kWrVQREbAmcQl 35z73qOes4NIfF0dS1Hs0bTqn_XXY_M6k8us_ Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.ne1.yahoo.com with HTTP; Fri, 29 Jun 2018 00:39:43 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp414.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID f117e9f8911bcf030321b581cb8923ba; Fri, 29 Jun 2018 00:39:42 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) Subject: head -r335782 (?) broke ci.freebsd.org's FreeBSD-head-amd64-gcc build (lib32 part of build) Message-Id: <00D1127A-1F0E-4E0E-B86C-1C5AA5B2E085@yahoo.com> Date: Thu, 28 Jun 2018 17:39:40 -0700 To: John Baldwin , svn-src-head@freebsd.org, FreeBSD Current X-Mailer: Apple Mail (2.3445.8.2) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jun 2018 00:39:50 -0000 [ ci.free.bsd.org jumped from -r335773 (built) to -r335784 (failed) for FreeBSD-head-amd64-gcc. It looked to me like the most likely breaking-change was the following but I've not tried personal builds to confirm. ] It looks to me that: > Author: jhb > Date: Thu Jun 28 21:26:14 2018 > New Revision: 335782 > URL:=20 > https://svnweb.freebsd.org/changeset/base/335782 >=20 >=20 > Log: > Remove the various build flag hacks for GCC cross-compile. > =20 > 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. > =20 > Reviewed by: bdrewery > Sponsored by: DARPA / AFRL > Differential Revision:=09 > https://reviews.freebsd.org/D16055 . . . broke ci.freebsd.org's FreeBSD-head-amd64-gcc build. https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/6331/consoleText = shows: --- catrigl.o --- /usr/local/bin/x86_64-unknown-freebsd11.1-gcc -DCOMPAT_32BIT -march=3Di686= -mmmx -msse -msse2 -m32 = -L/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/lib32 = --sysroot=3D/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp = -B/usr/local/x86_64-unknown-freebsd11.1/bin/ = -B/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/lib32 -O2 = -pipe -I/workspace/src/lib/msun/x86 -I/workspace/src/lib/msun/ld80 = -I/workspace/src/lib/msun/i387 -I/workspace/src/lib/msun/src = -I/workspace/src/lib/libc/include -I/workspace/src/lib/libc/i386 -g = -MD -MF.depend.catrigl.o -MTcatrigl.o -std=3Dgnu99 = -fstack-protector-strong -Wsystem-headers -Werror -Wno-pointer-sign = -Wno-error=3Daddress -Wno-error=3Darray-bounds -Wno-error=3Dattributes = -Wno-error=3Dbool-compare -Wno-error=3Dcast-align -Wno-error=3Dclobbered = -Wno-error=3Denum-compare -Wno-error=3Dextra -Wno-error=3Dinline = -Wno-error=3Dlogical-not-parentheses -Wno-error=3Dstrict-aliasing = -Wno-error=3Duninitialized -Wno-error=3Dunused-but-set-variable = -Wno-error=3Dunused-function -Wno-error=3Dunused-value = -Wno-error=3Dmisleading-indentation -Wno-error=3Dnonnull-compare = -Wno-error=3Dshift-negative-value -Wno-error=3Dtautological-compare = -Wno-error=3Dunused-const-variable -Wno-unknown-pragmas -c = /workspace/src/lib/msun/src/catrigl.c -o catrigl.o /workspace/src/lib/msun/src/catrigl.c:90:2: error: #error "Unsupported = long double format" #error "Unsupported long double format" ^~~~~ /workspace/src/lib/msun/src/catrigl.c: In function 'casinhl': /workspace/src/lib/msun/src/catrigl.c:190:35: error: 'm_ln2' undeclared = (first use in this function) w =3D clog_for_large_values(z) + m_ln2; ^~~~~ /workspace/src/lib/msun/src/catrigl.c:190:35: note: each undeclared = identifier is reported only once for each function it appears in /workspace/src/lib/msun/src/catrigl.c:202:11: error: 'SQRT_6_EPSILON' = undeclared (first use in this function) if (ax < SQRT_6_EPSILON / 4 && ay < SQRT_6_EPSILON / 4) ^~~~~~~~~~~~~~ /workspace/src/lib/msun/src/catrigl.c: In function 'cacosl': /workspace/src/lib/msun/src/catrigl.c:250:20: error: 'm_ln2' undeclared = (first use in this function) ry =3D creall(w) + m_ln2; ^~~~~ /workspace/src/lib/msun/src/catrigl.c:261:11: error: 'SQRT_6_EPSILON' = undeclared (first use in this function) if (ax < SQRT_6_EPSILON / 4 && ay < SQRT_6_EPSILON / 4) ^~~~~~~~~~~~~~ In file included from /workspace/src/lib/msun/src/catrigl.c:45:0: /workspace/src/lib/msun/src/catrigl.c: In function = 'clog_for_large_values': /workspace/src/lib/msun/src/catrigl.c:316:34: error: 'm_e' undeclared = (first use in this function) return (CMPLXL(logl(hypotl(x / m_e, y / m_e)) + 1, ^ /workspace/src/lib/msun/src/catrigl.c:316:11: error: '__builtin_complex' = operand not of real binary floating-point type return (CMPLXL(logl(hypotl(x / m_e, y / m_e)) + 1, ^ /workspace/src/lib/msun/src/catrigl.c: In function 'catanhl': /workspace/src/lib/msun/src/catrigl.c:390:11: error: 'SQRT_3_EPSILON' = undeclared (first use in this function) if (ax < SQRT_3_EPSILON / 2 && ay < SQRT_3_EPSILON / 2) { ^~~~~~~~~~~~~~ /workspace/src/lib/msun/src/catrigl.c:396:9: error: 'm_ln2' undeclared = (first use in this function) rx =3D (m_ln2 - logl(ay)) / 2; ^~~~~ *** [catrigl.o] Error code 1 =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Fri Jun 29 01:15:17 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 271D0102EC04 for ; Fri, 29 Jun 2018 01:15:17 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic313-12.consmr.mail.ne1.yahoo.com (sonic313-12.consmr.mail.ne1.yahoo.com [66.163.185.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB20E76AE4 for ; Fri, 29 Jun 2018 01:15:16 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: YYf1xk8VM1mm0gWbxCFbx2WDPgKIJo5a0T165e.R0ClpFYkgOJv6x3s_RiiwjSq iCpfwrQxOe_M4zrzazO9GZJvyiZTSaTmaascPO4GOizzHBp5m3zouc7s6QgkXUxy6IN94zezVMgr dpSLQbSXiR_vHLbWrAeANra1sBfH_oP1ifmTFj3oeX1y9_msG8R1SdIurodOURH9Tzwqh7EMYmqi KqqR0.YvZg1rHy2DjRVSTnlLxZcFx05.vSP0BCVsyTg26OiwO0Uo2c5GXc2BEPX8Th9QHUxzsRiB S3d7i1XeP9jBkrN.W1EjOGs9pq2A8oKM0uJ.kcgfjVbd3ffysuSECFoT4bQaZfyt_gYbr88X1Ui8 WOb5hg_OIyO5wqD67hPaOT38ok9ck7hMSUcpnBmMyWXifnK_m.jG87ZuUVVYvQKsQ7BQkQVv4xMi 2pVZfBNb0alHArTHWcR0_MzJoP7pDWzxHe9hIaHtvKnE6MLHLS9g7fcI5Tqf_zDr8pGv0FotiChT bgNBle_XzW65S0I9YjumuHxa5.dMpDE9zx9.Cvvr_tCaFAVLe9BHe0gbZripc4b670e.JqoS4nFA DlJNSMfxWxE6paTan.XnJ.TMO32QCD3uz96ucmLAERTbbCFSEFGk3RbnfvdYeU3GBlJ7Ej.6JtwQ bUJnzB5Yys1kXFyXgTg4KrZ2MdSB9eovF8TVmRv.BkzVqxTNaCDk3InOXbrmFPPRVocg.yTyKVfM rb22iVO0O2BlD7hiTbbGJNOXqmYl9DD4YjuEu3bVU1L2ZKgfxGcE4_hLV35UG3KtJtLH4YneKfAc FYCR.gUAqrMsxSPQGkz2g2DHSL8SesGPYVxsUnlIe98QLPiU0vI7VQveZ9b5GVdN0W7mU3hp9Ii. OWJvS6fhTtW8TAtEcLQExzLJtHvRVisJ82a7JUqn7WHEvSljoEN8HSebyJfPDn5Xkzw2786ZUV.D 83OzAsWdSd7vYuh6wCSi6YJv9nIBNc3q14MrtXDdWZj4m Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.ne1.yahoo.com with HTTP; Fri, 29 Jun 2018 01:15:10 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp404.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID c38efee9d6e0c07aa84e0bf10ab38f06; Fri, 29 Jun 2018 01:04:59 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) Subject: Re: head -r335782 (?) broke ci.freebsd.org's FreeBSD-head-amd64-gcc build (lib32 part of build) From: Mark Millard In-Reply-To: <00D1127A-1F0E-4E0E-B86C-1C5AA5B2E085@yahoo.com> Date: Thu, 28 Jun 2018 18:04:57 -0700 Cc: svn-src-head@freebsd.org, FreeBSD Current Content-Transfer-Encoding: quoted-printable Message-Id: References: <00D1127A-1F0E-4E0E-B86C-1C5AA5B2E085@yahoo.com> To: John Baldwin , Bryan Drewery X-Mailer: Apple Mail (2.3445.8.2) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jun 2018 01:15:17 -0000 On 2018-Jun-28, at 5:39 PM, Mark Millard wrote: > [ ci.free.bsd.org jumped from -r335773 (built) to -r335784 (failed) > for FreeBSD-head-amd64-gcc. It looked to me like the most likely > breaking-change was the following but I've not tried personal > builds to confirm. > ] >=20 > It looks to me that: >=20 >> Author: jhb >> Date: Thu Jun 28 21:26:14 2018 >> New Revision: 335782 >> URL:=20 >> https://svnweb.freebsd.org/changeset/base/335782 >>=20 >>=20 >> Log: >> Remove the various build flag hacks for GCC cross-compile. >>=20 >> 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. >>=20 >> Reviewed by: bdrewery >> Sponsored by: DARPA / AFRL >> Differential Revision:=09 >> https://reviews.freebsd.org/D16055 > . . . >=20 > broke ci.freebsd.org's FreeBSD-head-amd64-gcc build. >=20 > https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/6331/consoleText = shows: >=20 > --- catrigl.o --- > /usr/local/bin/x86_64-unknown-freebsd11.1-gcc -DCOMPAT_32BIT = -march=3Di686 -mmmx -msse -msse2 -m32 = -L/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/lib32 = --sysroot=3D/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp = -B/usr/local/x86_64-unknown-freebsd11.1/bin/ = -B/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/lib32 -O2 = -pipe -I/workspace/src/lib/msun/x86 -I/workspace/src/lib/msun/ld80 = -I/workspace/src/lib/msun/i387 -I/workspace/src/lib/msun/src = -I/workspace/src/lib/libc/include -I/workspace/src/lib/libc/i386 -g = -MD -MF.depend.catrigl.o -MTcatrigl.o -std=3Dgnu99 = -fstack-protector-strong -Wsystem-headers -Werror -Wno-pointer-sign = -Wno-error=3Daddress -Wno-error=3Darray-bounds -Wno-error=3Dattributes = -Wno-error=3Dbool-compare -Wno-error=3Dcast-align -Wno-error=3Dclobbered = -Wno-error=3Denum-compare -Wno-error=3Dextra -Wno-error=3Dinline = -Wno-error=3Dlogical-not-parentheses -Wno-error=3Dstrict-aliasing = -Wno-error=3Duninitialized -Wno-error=3Dunused-but-set-variable = -Wno-error=3Dunused-function -Wno-error=3Dunused-value = -Wno-error=3Dmisleading-indentation -Wno-error=3Dnonnull-compare = -Wno-error=3Dshift-negative-value -Wno-error=3Dtautological-compare = -Wno-error=3Dunused-const-variable -Wno-unknown-pragmas -c = /workspace/src/lib/msun/src/catrigl.c -o catrigl.o > /workspace/src/lib/msun/src/catrigl.c:90:2: error: #error "Unsupported = long double format" > #error "Unsupported long double format" > ^~~~~ > /workspace/src/lib/msun/src/catrigl.c: In function 'casinhl': > /workspace/src/lib/msun/src/catrigl.c:190:35: error: 'm_ln2' = undeclared (first use in this function) > w =3D clog_for_large_values(z) + m_ln2; > ^~~~~ > /workspace/src/lib/msun/src/catrigl.c:190:35: note: each undeclared = identifier is reported only once for each function it appears in > /workspace/src/lib/msun/src/catrigl.c:202:11: error: 'SQRT_6_EPSILON' = undeclared (first use in this function) > if (ax < SQRT_6_EPSILON / 4 && ay < SQRT_6_EPSILON / 4) > ^~~~~~~~~~~~~~ > /workspace/src/lib/msun/src/catrigl.c: In function 'cacosl': > /workspace/src/lib/msun/src/catrigl.c:250:20: error: 'm_ln2' = undeclared (first use in this function) > ry =3D creall(w) + m_ln2; > ^~~~~ > /workspace/src/lib/msun/src/catrigl.c:261:11: error: 'SQRT_6_EPSILON' = undeclared (first use in this function) > if (ax < SQRT_6_EPSILON / 4 && ay < SQRT_6_EPSILON / 4) > ^~~~~~~~~~~~~~ > In file included from /workspace/src/lib/msun/src/catrigl.c:45:0: > /workspace/src/lib/msun/src/catrigl.c: In function = 'clog_for_large_values': > /workspace/src/lib/msun/src/catrigl.c:316:34: error: 'm_e' undeclared = (first use in this function) > return (CMPLXL(logl(hypotl(x / m_e, y / m_e)) + 1, > ^ > /workspace/src/lib/msun/src/catrigl.c:316:11: error: = '__builtin_complex' operand not of real binary floating-point type > return (CMPLXL(logl(hypotl(x / m_e, y / m_e)) + 1, > ^ > /workspace/src/lib/msun/src/catrigl.c: In function 'catanhl': > /workspace/src/lib/msun/src/catrigl.c:390:11: error: 'SQRT_3_EPSILON' = undeclared (first use in this function) > if (ax < SQRT_3_EPSILON / 2 && ay < SQRT_3_EPSILON / 2) { > ^~~~~~~~~~~~~~ > /workspace/src/lib/msun/src/catrigl.c:396:9: error: 'm_ln2' undeclared = (first use in this function) > rx =3D (m_ln2 - logl(ay)) / 2; > ^~~~~ > *** [catrigl.o] Error code 1 Later below expand the failing and previoly good commands, one option per line. The summary of the distinction in content is a one line difference, the working example ( -r335773 )had the option: -isystem = /workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/include but the failing one did not. Working ( -r335773 ) is shown first. --- catrigl.o --- /usr/local/bin/x86_64-unknown-freebsd11.1-gcc -DCOMPAT_32BIT -march=3Di686 -mmmx -msse -msse2 -m32 -L/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/lib32 --sysroot=3D/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp -B/usr/local/x86_64-unknown-freebsd11.1/bin/ -B/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/lib32 -isystem = /workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/include -O2 -pipe -I/workspace/src/lib/msun/x86 -I/workspace/src/lib/msun/ld80 -I/workspace/src/lib/msun/i387 -I/workspace/src/lib/msun/src -I/workspace/src/lib/libc/include -I/workspace/src/lib/libc/i386 -g -MD -MF.depend.catrigl.o -MTcatrigl.o -std=3Dgnu99 -fstack-protector-strong -Wsystem-headers -Werror -Wno-pointer-sign -Wno-error=3Daddress -Wno-error=3Darray-bounds -Wno-error=3Dattributes -Wno-error=3Dbool-compare -Wno-error=3Dcast-align -Wno-error=3Dclobbered -Wno-error=3Denum-compare -Wno-error=3Dextra -Wno-error=3Dinline -Wno-error=3Dlogical-not-parentheses -Wno-error=3Dstrict-aliasing -Wno-error=3Duninitialized -Wno-error=3Dunused-but-set-variable -Wno-error=3Dunused-function -Wno-error=3Dunused-value -Wno-error=3Dmisleading-indentation -Wno-error=3Dnonnull-compare -Wno-error=3Dshift-negative-value -Wno-error=3Dtautological-compare -Wno-error=3Dunused-const-variable -Wno-unknown-pragmas -c /workspace/src/lib/msun/src/catrigl.c -o catrigl.o --- catrigl.o --- /usr/local/bin/x86_64-unknown-freebsd11.1-gcc -DCOMPAT_32BIT -march=3Di686 -mmmx -msse -msse2 -m32 -L/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/lib32 --sysroot=3D/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp -B/usr/local/x86_64-unknown-freebsd11.1/bin/ -B/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/lib32 -O2 -pipe -I/workspace/src/lib/msun/x86 -I/workspace/src/lib/msun/ld80 -I/workspace/src/lib/msun/i387 -I/workspace/src/lib/msun/src -I/workspace/src/lib/libc/include=20 -I/workspace/src/lib/libc/i386 -g -MD -MF.depend.catrigl.o -MTcatrigl.o -std=3Dgnu99 -fstack-protector-strong -Wsystem-headers -Werror -Wno-pointer-sign -Wno-error=3Daddress -Wno-error=3Darray-bounds -Wno-error=3Dattributes -Wno-error=3Dbool-compare -Wno-error=3Dcast-align -Wno-error=3Dclobbered -Wno-error=3Denum-compare -Wno-error=3Dextra -Wno-error=3Dinline -Wno-error=3Dlogical-not-parentheses -Wno-error=3Dstrict-aliasing -Wno-error=3Duninitialized -Wno-error=3Dunused-but-set-variable -Wno-error=3Dunused-function -Wno-error=3Dunused-value -Wno-error=3Dmisleading-indentation -Wno-error=3Dnonnull-compare -Wno-error=3Dshift-negative-value -Wno-error=3Dtautological-compare -Wno-error=3Dunused-const-variable -Wno-unknown-pragmas -c /workspace/src/lib/msun/src/catrigl.c -o catrigl.o =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Fri Jun 29 02:54:22 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 396DE1030105 for ; Fri, 29 Jun 2018 02:54:22 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic313-21.consmr.mail.gq1.yahoo.com (sonic313-21.consmr.mail.gq1.yahoo.com [98.137.65.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B4C4C79121 for ; Fri, 29 Jun 2018 02:54:21 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: 3X3SCZsVM1lhRsZIVQEvFtkj3So1MradXbAFqYwNcrOJ_cCWRQz2TzuJgMBmHXk CBJvCDqqtONsAuWZURtq30qAZYz4MqyI2IdZm9UQ4fLHBxWEHISMHQ_QzHhtDrbYyMOJmF7Lo_h5 TVDbh6WBu_k.9c56R.CYnw58wiAU6GFywaZbYDmvMQh5WAomf1JR5kZ8utZq4JouEYBBzggZJN5W _AOX4nCaw9lyr3fbcgxHRuwmUdSqKsQSS5dG6DcwtFiJUTygWC39ZySmKTfXhPWdx44gL9QWoPJ3 fOtkbtYlcJEL39Qyz1lXp5w.6tCr3BnughvOBZZvTGYNEklorUT9.Wclo_JSC5ck9nf1MStZY5iY 8TFFMQyfuGsJlSmPS.M4Yrxn5pmXq7Vup8l9lpRTerF.sXBFVlz80QtK_QEIW0WlB1iha0HHs_pM cz8LGWoyCtxUjvtaRACjbFDQf6juwfPjXD6xoqVlMeAaqlk3jqDrlQ_WbNFiBXNAJBTDffnHYJJi Nhmo0Gj3c1mGsRlArom5xTpk7aMOGJWg5lkL_HVq4qGDQA8_udjwUnY5K_JbR_SMADYYyufe.I5C SV8RKhANxrp1ROLA93clxG5UDKlwRZc.iP2jhXFvT_FBLeMVQA9yNpiUbMYveJFaz0sqnIDHSkDB 11EzfNKWFPxrDql8tG43VmoZJO4gCzKZnfYq_Jt1_ivfhc8qb63PjL1sLtn3C1gmOsChmwAU4d2B SsAZJDp8c92TgRjHme4U9Fw06UzT0JWxba.hOAaLf5k3KWoOOXAXSKJK6OqEgxZy1lQeyfiSvlIB o2XHvQX9NDAIWLRuB4JlTzjNDE8VuYcK8HbXlfckQ0iHDnjixsjnjeXUFILgrp0Y0z1mifE5w2Gg Wiw20KGDnymMDwvlKKsXua9Qh17CLUOxwFYVQsfo0gHC0BHqy0dQFpPSFfnmPNOG2O96lqcKfC_Q Gagyr1eIrROmf_ZhiE_ZcszdGAeSUoHnkeq09_sg6 Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.gq1.yahoo.com with HTTP; Fri, 29 Jun 2018 02:54:20 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp417.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 570b07594d9674c1461421b894b43d2c; Fri, 29 Jun 2018 02:54:19 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) Subject: Re: head -r335782 (?) broke ci.freebsd.org's FreeBSD-head-amd64-gcc build (lib32 part of build) From: Mark Millard In-Reply-To: Date: Thu, 28 Jun 2018 19:54:17 -0700 Cc: svn-src-head@freebsd.org, FreeBSD Current Content-Transfer-Encoding: quoted-printable Message-Id: <7A845F2C-C994-4828-823D-33A97B7B6EB0@yahoo.com> References: <00D1127A-1F0E-4E0E-B86C-1C5AA5B2E085@yahoo.com> To: John Baldwin , Bryan Drewery X-Mailer: Apple Mail (2.3445.8.2) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jun 2018 02:54:22 -0000 On 2018-Jun-28, at 6:04 PM, Mark Millard wrote: > On 2018-Jun-28, at 5:39 PM, Mark Millard wrote: >=20 >> [ ci.free.bsd.org jumped from -r335773 (built) to -r335784 (failed) >> for FreeBSD-head-amd64-gcc. It looked to me like the most likely >> breaking-change was the following but I've not tried personal >> builds to confirm. >> ] >>=20 >> It looks to me that: >>=20 >>> Author: jhb >>> Date: Thu Jun 28 21:26:14 2018 >>> New Revision: 335782 >>> URL:=20 >>> https://svnweb.freebsd.org/changeset/base/335782 >>>=20 >>>=20 >>> Log: >>> Remove the various build flag hacks for GCC cross-compile. >>>=20 >>> 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. >>>=20 >>> Reviewed by: bdrewery >>> Sponsored by: DARPA / AFRL >>> Differential Revision:=09 >>> https://reviews.freebsd.org/D16055 >> . . . >>=20 >> broke ci.freebsd.org's FreeBSD-head-amd64-gcc build. >>=20 >> https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/6331/consoleText = shows: >>=20 >> --- catrigl.o --- >> /usr/local/bin/x86_64-unknown-freebsd11.1-gcc -DCOMPAT_32BIT = -march=3Di686 -mmmx -msse -msse2 -m32 = -L/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/lib32 = --sysroot=3D/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp = -B/usr/local/x86_64-unknown-freebsd11.1/bin/ = -B/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/lib32 -O2 = -pipe -I/workspace/src/lib/msun/x86 -I/workspace/src/lib/msun/ld80 = -I/workspace/src/lib/msun/i387 -I/workspace/src/lib/msun/src = -I/workspace/src/lib/libc/include -I/workspace/src/lib/libc/i386 -g = -MD -MF.depend.catrigl.o -MTcatrigl.o -std=3Dgnu99 = -fstack-protector-strong -Wsystem-headers -Werror -Wno-pointer-sign = -Wno-error=3Daddress -Wno-error=3Darray-bounds -Wno-error=3Dattributes = -Wno-error=3Dbool-compare -Wno-error=3Dcast-align -Wno-error=3Dclobbered = -Wno-error=3Denum-compare -Wno-error=3Dextra -Wno-error=3Dinline = -Wno-error=3Dlogical-not-parentheses -Wno-error=3Dstrict-aliasing = -Wno-error=3Duninitialized -Wno-error=3Dunused-but-set-variable = -Wno-error=3Dunused-function -Wno-error=3Dunused-value = -Wno-error=3Dmisleading-indentation -Wno-error=3Dnonnull-compare = -Wno-error=3Dshift-negative-value -Wno-error=3Dtautological-compare = -Wno-error=3Dunused-const-variable -Wno-unknown-pragmas -c = /workspace/src/lib/msun/src/catrigl.c -o catrigl.o >> /workspace/src/lib/msun/src/catrigl.c:90:2: error: #error = "Unsupported long double format" >> #error "Unsupported long double format" >> ^~~~~ >> /workspace/src/lib/msun/src/catrigl.c: In function 'casinhl': >> /workspace/src/lib/msun/src/catrigl.c:190:35: error: 'm_ln2' = undeclared (first use in this function) >> w =3D clog_for_large_values(z) + m_ln2; >> ^~~~~ >> /workspace/src/lib/msun/src/catrigl.c:190:35: note: each undeclared = identifier is reported only once for each function it appears in >> /workspace/src/lib/msun/src/catrigl.c:202:11: error: 'SQRT_6_EPSILON' = undeclared (first use in this function) >> if (ax < SQRT_6_EPSILON / 4 && ay < SQRT_6_EPSILON / 4) >> ^~~~~~~~~~~~~~ >> /workspace/src/lib/msun/src/catrigl.c: In function 'cacosl': >> /workspace/src/lib/msun/src/catrigl.c:250:20: error: 'm_ln2' = undeclared (first use in this function) >> ry =3D creall(w) + m_ln2; >> ^~~~~ >> /workspace/src/lib/msun/src/catrigl.c:261:11: error: 'SQRT_6_EPSILON' = undeclared (first use in this function) >> if (ax < SQRT_6_EPSILON / 4 && ay < SQRT_6_EPSILON / 4) >> ^~~~~~~~~~~~~~ >> In file included from /workspace/src/lib/msun/src/catrigl.c:45:0: >> /workspace/src/lib/msun/src/catrigl.c: In function = 'clog_for_large_values': >> /workspace/src/lib/msun/src/catrigl.c:316:34: error: 'm_e' undeclared = (first use in this function) >> return (CMPLXL(logl(hypotl(x / m_e, y / m_e)) + 1, >> ^ >> /workspace/src/lib/msun/src/catrigl.c:316:11: error: = '__builtin_complex' operand not of real binary floating-point type >> return (CMPLXL(logl(hypotl(x / m_e, y / m_e)) + 1, >> ^ >> /workspace/src/lib/msun/src/catrigl.c: In function 'catanhl': >> /workspace/src/lib/msun/src/catrigl.c:390:11: error: 'SQRT_3_EPSILON' = undeclared (first use in this function) >> if (ax < SQRT_3_EPSILON / 2 && ay < SQRT_3_EPSILON / 2) { >> ^~~~~~~~~~~~~~ >> /workspace/src/lib/msun/src/catrigl.c:396:9: error: 'm_ln2' = undeclared (first use in this function) >> rx =3D (m_ln2 - logl(ay)) / 2; >> ^~~~~ >> *** [catrigl.o] Error code 1 >=20 > Later below expand the failing and previoly good commands, one > option per line. The summary of the distinction in content is > a one line difference, the working example ( -r335773 )had the > option: >=20 > -isystem = /workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/include >=20 > but the failing one did not. Working ( -r335773 ) is shown first. >=20 > --- catrigl.o --- > /usr/local/bin/x86_64-unknown-freebsd11.1-gcc > -DCOMPAT_32BIT > -march=3Di686 > -mmmx > -msse > -msse2 > -m32 > -L/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/lib32 > --sysroot=3D/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp > -B/usr/local/x86_64-unknown-freebsd11.1/bin/ > -B/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/lib32 > -isystem = /workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/include > -O2 > -pipe > -I/workspace/src/lib/msun/x86 > -I/workspace/src/lib/msun/ld80 > -I/workspace/src/lib/msun/i387 > -I/workspace/src/lib/msun/src > -I/workspace/src/lib/libc/include > -I/workspace/src/lib/libc/i386 > -g > -MD > -MF.depend.catrigl.o > -MTcatrigl.o > -std=3Dgnu99 > -fstack-protector-strong > -Wsystem-headers > -Werror > -Wno-pointer-sign > -Wno-error=3Daddress > -Wno-error=3Darray-bounds > -Wno-error=3Dattributes > -Wno-error=3Dbool-compare > -Wno-error=3Dcast-align > -Wno-error=3Dclobbered > -Wno-error=3Denum-compare > -Wno-error=3Dextra > -Wno-error=3Dinline > -Wno-error=3Dlogical-not-parentheses > -Wno-error=3Dstrict-aliasing > -Wno-error=3Duninitialized > -Wno-error=3Dunused-but-set-variable > -Wno-error=3Dunused-function > -Wno-error=3Dunused-value > -Wno-error=3Dmisleading-indentation > -Wno-error=3Dnonnull-compare > -Wno-error=3Dshift-negative-value > -Wno-error=3Dtautological-compare > -Wno-error=3Dunused-const-variable > -Wno-unknown-pragmas > -c /workspace/src/lib/msun/src/catrigl.c > -o catrigl.o >=20 >=20 > --- catrigl.o --- > /usr/local/bin/x86_64-unknown-freebsd11.1-gcc > -DCOMPAT_32BIT > -march=3Di686 > -mmmx > -msse > -msse2 > -m32 > -L/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/lib32 > --sysroot=3D/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp > -B/usr/local/x86_64-unknown-freebsd11.1/bin/ > -B/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/lib32 > -O2 > -pipe > -I/workspace/src/lib/msun/x86 > -I/workspace/src/lib/msun/ld80 > -I/workspace/src/lib/msun/i387 > -I/workspace/src/lib/msun/src > -I/workspace/src/lib/libc/include=20 > -I/workspace/src/lib/libc/i386 > -g > -MD > -MF.depend.catrigl.o > -MTcatrigl.o > -std=3Dgnu99 > -fstack-protector-strong > -Wsystem-headers > -Werror > -Wno-pointer-sign > -Wno-error=3Daddress > -Wno-error=3Darray-bounds > -Wno-error=3Dattributes > -Wno-error=3Dbool-compare > -Wno-error=3Dcast-align > -Wno-error=3Dclobbered > -Wno-error=3Denum-compare > -Wno-error=3Dextra > -Wno-error=3Dinline > -Wno-error=3Dlogical-not-parentheses > -Wno-error=3Dstrict-aliasing > -Wno-error=3Duninitialized > -Wno-error=3Dunused-but-set-variable > -Wno-error=3Dunused-function > -Wno-error=3Dunused-value > -Wno-error=3Dmisleading-indentation > -Wno-error=3Dnonnull-compare > -Wno-error=3Dshift-negative-value > -Wno-error=3Dtautological-compare > -Wno-error=3Dunused-const-variable > -Wno-unknown-pragmas > -c /workspace/src/lib/msun/src/catrigl.c > -o catrigl.o For the report: > The xtoolchain GCC packages have not required these flags since ports > commits r465416 and r466701 Looking at = https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/6331/consoleText there is: > Updating FreeBSD repository catalogue... > FreeBSD repository is up to date. > All repositories are up to date. > The following 6 package(s) will be affected (of 0 checked): >=20 > New packages to be INSTALLED: > amd64-xtoolchain-gcc: 0.4_1 > amd64-gcc: 6.4.0 > mpfr: 4.0.1 > gmp: 6.1.2 > mpc: 1.1.0_1 > amd64-binutils: 2.30_3,1 and amd64-gcc being 6.4.0 (via powerpc64-gcc) is from -r466834 (via looking up in https://svnweb.freebsd.org/ports/head/devel/ ). This indicates that -r465416 and -r466701 did not cause: --sysroot=3D/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp to lead to include files being looked up in: /workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/include Thus there appears to still be a need for: -isystem = /workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/include unless more is done to the devel/*-gcc to make them look in that additional place automatically (based on --sysroot). =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Fri Jun 29 04:08:15 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-head@freebsd.org Fri Jun 29 04:46:16 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-head@freebsd.org Fri Jun 29 04:52:28 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-head@freebsd.org Fri Jun 29 06:13:21 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-head@freebsd.org Fri Jun 29 10:55:43 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-head@freebsd.org Fri Jun 29 12:41:38 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-head@freebsd.org Fri Jun 29 13:59:34 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-head@freebsd.org Fri Jun 29 14:50:46 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 208BEEF9900 for ; Fri, 29 Jun 2018 14:50:46 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic311-13.consmr.mail.bf2.yahoo.com (sonic311-13.consmr.mail.bf2.yahoo.com [74.6.131.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B84908DD45 for ; Fri, 29 Jun 2018 14:50:45 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: oTC3__MVM1muTGrwH74cKbTMhxRbb3arkeNFiVPG7XUNs65pnnQHZ.KHLadpI.m rZ1Ty6NT.RMdlOCu3cW22_V.go0S3IDZOH2bVnUbDJLHOSC4NzhYGozr2nfFBkNTr5rLRTbAQCOJ sPh57jqp4M819SKCup3bFCpEEgqV_MKmE40QbbbQRZncR7CFSQkhDH1XtXnEmt9cN.dGJIIhrtTE DbXWjhcQXt9CtYqWc827y2tR4zhiRssNfAA9j4XQ3Z6C0lU0Khp_mUAJlJz3exFL_CTuf8cQAZc. eUPHvqxCcqamZvNmDdklVby9fFYrktRwNCubrZgUr_t34ucZJ0.7LgluFKGMHHeI0xQTXpVJgmaB n0.0HvrUNxJtg337uSGuxuvtYUheJb0Ln2gIipas20eu.uZJhvrrx3GHLhUjYZsDPBLlexvmLck5 ZpRm89h2igu2wz46QKAgoYbFikDl3CeUpsfv_kz7tlvQrkxxJXyDIr7nhph32yz88x9K8JqHt2Ux 1AKIBX.81VTXPpUqMKg8VUeP.MkBJC3d4MXqkQeqkspKgGF03ETqUgKs6wV.tYusZkqL96t3zvQJ NnG7tE2QvW3UrYUi3VdoxHjdqd0HAQFSS_Kll9AE6amtzIcEXDwpHWHRoBGHYXLFiMzFk0f7A6tq enQTW0bYQrJXDry5BmDoLLRpILHRI3byd4gBHNianiHoqImiqDIbyDUxbiHuy1pFjUOgda8GW.f3 OfPywJ9WHuT7tc1SYJQeVjnIj7uZ2bMnAHH9SwtBWfL_cTbtBxVt7JFwaS1VWyUQ5T3SNJw.eaL1 EKAsNVer4ESEOFMOQ.h9fTKqvv6i1LiYjEQVh2Naf1it5d6EAFEsih7bOv8oLXxpj5_98mVAeI78 UX6yGOBUZPFJj3rMINcVxsFfvtggLQPgqnTSfWdsJ_jncE7JpoIpaJOrx6Djm8m6g7U.5a8ZcO76 gOagEpPrFq.y5z5q5d8OmbWEOCYW28giWyKGRdynS3oEr1Bo6vZDusvJSeQCzxBMb.PmbYA-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.bf2.yahoo.com with HTTP; Fri, 29 Jun 2018 14:50:44 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp405.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 7e235119bc02ca8724c4031421d0783e; Fri, 29 Jun 2018 14:50:40 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) Subject: head -r335795 broke the builds for ci.freebsd.org 's FreeBSD-head-{amd64,i386,powerpc,risc64,sparc64}-build Message-Id: Date: Fri, 29 Jun 2018 07:50:38 -0700 To: ae@FreeBSD.org, FreeBSD Current , svn-src-head@freebsd.org X-Mailer: Apple Mail (2.3445.8.2) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jun 2018 14:50:46 -0000 clang example: ( https://ci.freebsd.org/job/FreeBSD-head-amd64-build/9257/consoleText ) --- key_debug.o --- /usr/src/sys/netipsec/key_debug.c:89:1: error: no previous prototype for = function 'kdebug_sadb_type' [-Werror,-Wmissing-prototypes] kdebug_sadb_type(uint8_t type) ^ /usr/src/sys/netipsec/key_debug.c:124:1: error: no previous prototype = for function 'kdebug_sadb_exttype' [-Werror,-Wmissing-prototypes] kdebug_sadb_exttype(uint16_t type) ^ 2 errors generated. *** [key_debug.o] Error code 1 gcc 4.2.1 example: ( https://ci.freebsd.org/job/FreeBSD-head-sparc64-build/8445/consoleText = ) --- key_debug.o --- cc1: warnings being treated as errors /usr/src/sys/netipsec/key_debug.c:90: warning: no previous prototype for = 'kdebug_sadb_type' [-Wmissing-prototypes] /usr/src/sys/netipsec/key_debug.c:125: warning: no previous prototype = for 'kdebug_sadb_exttype' [-Wmissing-prototypes] *** [key_debug.o] Error code 1 Side note: All I get for the lists that I normally look at is: Error 503 Backend fetch failed Backend status: Backend fetch failed Transaction ID: . . . =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Fri Jun 29 14:51:37 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-head@freebsd.org Fri Jun 29 15:56:42 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 440F6EFC359; Fri, 29 Jun 2018 15:56:42 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (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 B3F2F70310; Fri, 29 Jun 2018 15:56:41 +0000 (UTC) (envelope-from sbruno@freebsd.org) Received: from [192.168.0.6] (67-0-234-146.albq.qwest.net [67.0.234.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 7BAEF1AF636; Fri, 29 Jun 2018 08:01:50 +0000 (UTC) Subject: Re: head -r335795 broke the builds for ci.freebsd.org 's FreeBSD-head-{amd64,i386,powerpc,risc64,sparc64}-build To: Mark Millard , FreeBSD Current , svn-src-head@freebsd.org References: From: Sean Bruno Openpgp: preference=signencrypt Autocrypt: addr=sbruno@freebsd.org; prefer-encrypt=mutual; keydata= xsBNBFk+0UEBCADaf4bgxxKvMOhRV5NPoGWRCCGm49d6+1VFNlQ77WsY/+Zvf95TPULdRlnG w648KfxWt7+O3kdKhdRwnqlXWC7zA2Qt0dRE1yIqOGJ4jp4INvp/bcxWzgr0aoKOjrlnfxRV bh+s0rzdZt6TsNL3cVYxkC8oezjaUkHdW4mFJU249U1QJogkF8g0FeKNfEcjEkwJNX6lQJH+ EzCWT0NCk6J+Xyo+zOOljxPp1OUfdvZi3ulkU/qTZstGVWxFVsP8xQklV/y3AFcbIYx6iGJ4 5L7WuB0IWhO7Z4yHENr8wFaNYwpod9i4egX2BugbrM8pOfhN2/qqdeG1L5LMtXw3yyAhABEB AAHNN1NlYW4gQnJ1bm8gKEZyZWVCU0QgRGV2ZWxvcGVyIEtleSkgPHNicnVub0BmcmVlYnNk Lm9yZz7CwJQEEwEKAD4WIQToxOn4gDUE4eP0ujS95PX+ibX8tgUCWT7RQQIbAwUJBaOagAUL CQgHAwUVCgkICwUWAwIBAAIeAQIXgAAKCRC95PX+ibX8ttKTCACFKzRc56EBAlVotq02EjZP SfX+unlk6AuPBzShxqRxeK+bGYVCigrYd1M8nnskv0dEiZ5iYeND9HIxbpEyopqgpVTibA7w gBXaZ7SOEhNX1wXwg14JrralfSmPFMYni+sWegPMX/zwfAsn1z4mG1Nn44Xqo3o7CfpkMPy6 M5Bow2IDzIhEYISLR+urxs74/aHU35PLtBSDtu18914SEMDdva27MARN8mbeCDbuJVfGCPWy YHuy2t+9u2Zn5Dd+t3sBXLM9gpeaMm+4x6TNPpESygbVdh4tDdjVZ9DK/bWFg0kMgfZoaq6J l0jNsQXrZV3bzYNFbVw04pFcvA2GIJ7xzsBNBFk+0UEBCADIXBmQOaKMHGbc9vwjhV4Oj5aZ DdhNedn12FVeTdOXJvuTOusgxS29lla0RenHGDsgD08UiFpasBXWq/E+BhQ19d+iRbLLR17O KKc1ZGefoVbLARLXD68J5j4XAyK+6k2KqBLlqzAEpHTzsksM9naARkVXiEVcrt6ciw0FSm8n kuK3gDKKe93XfzfP+TQdbvvzJc7Fa+appLbXz61TM1aikaQlda8bWubDegwXbuoJdB34xU1m yjr/N4o+raL0x7QrzdH+wwgrTTo+H4S2c1972Skt5K5tbxLowfHicRl23V8itVQr3sBtlX4+ 66q+Apm7+R36bUS/k+G45Sp6iPpxABEBAAHCwHwEGAEKACYWIQToxOn4gDUE4eP0ujS95PX+ ibX8tgUCWT7RQQIbDAUJBaOagAAKCRC95PX+ibX8trrIB/9Pljqt/JGamD9tx4dOVmxSyFg9 z2xzgklTLuDgS73MM120mM7ao9AQUeWiSle/H0UCK7xPOzC/aeUC4oygDQKAfkkNbCNTo3+A qDjBRA8qx0e9a/QjDL+RFgD4L5kLT4tToY8T8HaBp8h03LBfk510IaI8oL/Jg7vpM3PDtJMW tUi2H+yNFmL3NfM2oBToWKLFsoP54f/eeeImrNnrlLjLHPzqS+/9apgYqX2Jwiv3tHBc4FTO GuY8VvF7BpixJs8Pc2RUuCfSyodrp1YG1kRGlXAH0cqwwr0Zmk4+7dZvtVQMCl6kS6q1+84q JwtItxS2eXSEA4NO0sQ3BXUywANh Message-ID: <07054dd3-7d1f-88a8-f489-bfe9663b2a5f@freebsd.org> Date: Fri, 29 Jun 2018 09:56:37 -0600 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; 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="jbcO3VRmIBXfDmKHyWMwogIzzknOImJcY" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jun 2018 15:56:42 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --jbcO3VRmIBXfDmKHyWMwogIzzknOImJcY Content-Type: multipart/mixed; boundary="esTg2uO22avk07yig6GZkJcFf3WhPDmVD"; protected-headers="v1" From: Sean Bruno To: Mark Millard , FreeBSD Current , svn-src-head@freebsd.org Message-ID: <07054dd3-7d1f-88a8-f489-bfe9663b2a5f@freebsd.org> Subject: Re: head -r335795 broke the builds for ci.freebsd.org 's FreeBSD-head-{amd64,i386,powerpc,risc64,sparc64}-build References: In-Reply-To: --esTg2uO22avk07yig6GZkJcFf3WhPDmVD Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 06/29/18 08:50, Mark Millard wrote: > Side note: >=20 > All I get for the lists that I normally look at is: >=20 > Error 503 Backend fetch failed >=20 > Backend status: Backend fetch failed >=20 > Transaction ID: . . . I think I fixed that about an hour ago. Try again. sean --esTg2uO22avk07yig6GZkJcFf3WhPDmVD-- --jbcO3VRmIBXfDmKHyWMwogIzzknOImJcY Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAEBCgB9FiEE6MTp+IA1BOHj9Lo0veT1/om1/LYFAls2VrVfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEU4 QzRFOUY4ODAzNTA0RTFFM0Y0QkEzNEJERTRGNUZFODlCNUZDQjYACgkQveT1/om1 /LbQBQgA0NvZAE/KGbGobi+qidzamxZ/NwYA5Y1QGN+tK+wg5+v/xOKnWwqIkDox gbplGnU9esfC8tfwlyzu3o50cr7i/VI6xbaDZkGG/cLrPjyANgTSSnV72RwurWAl ESRVdcnWJ+XwKVWdRqb4QGhfqk+BYFsfYOOlgMvJjUFJrSiN9yjPGrW5hdzUwbQw /glCBVECbCKv9YCcjU36oo83Ef3Y8xwADsr/p8hpIb6nbdWbiKsVO23bbYMVGKL1 8WXcXQ6uAEaA35XM/yjkVzzM9XKKNX6XnAoRi6IrlsD7LydMDLZXapVcasZUhkM+ kwIquYdwA4Ta52T6Rm5y5dPxBYRDuQ== =DMTW -----END PGP SIGNATURE----- --jbcO3VRmIBXfDmKHyWMwogIzzknOImJcY-- From owner-svn-src-head@freebsd.org Fri Jun 29 16:07:58 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-head@freebsd.org Fri Jun 29 17:38:08 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 30882F719C5; Fri, 29 Jun 2018 17:38:08 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (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 C153A73E65; Fri, 29 Jun 2018 17:38:07 +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 BFBE910AFD2; Fri, 29 Jun 2018 13:38:05 -0400 (EDT) Subject: Re: head -r335782 (?) broke ci.freebsd.org's FreeBSD-head-amd64-gcc build (lib32 part of build) To: Mark Millard , Bryan Drewery References: <00D1127A-1F0E-4E0E-B86C-1C5AA5B2E085@yahoo.com> <7A845F2C-C994-4828-823D-33A97B7B6EB0@yahoo.com> Cc: svn-src-head@freebsd.org, FreeBSD Current From: John Baldwin Message-ID: <72081b02-cf23-82ec-32df-7f5793c35f57@FreeBSD.org> Date: Fri, 29 Jun 2018 10:38:03 -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: <7A845F2C-C994-4828-823D-33A97B7B6EB0@yahoo.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: base64 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Fri, 29 Jun 2018 13:38:06 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jun 2018 17:38:08 -0000 T24gNi8yOC8xOCA3OjU0IFBNLCBNYXJrIE1pbGxhcmQgd3JvdGU6DQo+IE9uIDIwMTgtSnVu LTI4LCBhdCA2OjA0IFBNLCBNYXJrIE1pbGxhcmQgPG1hcmtsbWkgYXQgeWFob28uY29tPiB3 cm90ZToNCj4gDQo+PiBPbiAyMDE4LUp1bi0yOCwgYXQgNTozOSBQTSwgTWFyayBNaWxsYXJk IDxtYXJrbG1pIGF0IHlhaG9vLmNvbT4gd3JvdGU6DQo+Pg0KPj4+IFsgY2kuZnJlZS5ic2Qu b3JnIGp1bXBlZCBmcm9tIC1yMzM1NzczIChidWlsdCkgdG8gLXIzMzU3ODQgKGZhaWxlZCkN Cj4+PiBmb3IgRnJlZUJTRC1oZWFkLWFtZDY0LWdjYy4gSXQgbG9va2VkIHRvIG1lIGxpa2Ug dGhlIG1vc3QgbGlrZWx5DQo+Pj4gYnJlYWtpbmctY2hhbmdlIHdhcyB0aGUgZm9sbG93aW5n IGJ1dCBJJ3ZlIG5vdCB0cmllZCBwZXJzb25hbA0KPj4+IGJ1aWxkcyB0byBjb25maXJtLg0K Pj4+IF0NCj4+Pg0KPj4+IEl0IGxvb2tzIHRvIG1lIHRoYXQ6DQo+Pj4NCj4+Pj4gQXV0aG9y OiBqaGINCj4+Pj4gRGF0ZTogVGh1IEp1biAyOCAyMToyNjoxNCAyMDE4DQo+Pj4+IE5ldyBS ZXZpc2lvbjogMzM1NzgyDQo+Pj4+IFVSTDogDQo+Pj4+IGh0dHBzOi8vc3Zud2ViLmZyZWVi c2Qub3JnL2NoYW5nZXNldC9iYXNlLzMzNTc4Mg0KPj4+Pg0KPj4+Pg0KPj4+PiBMb2c6DQo+ Pj4+IFJlbW92ZSB0aGUgdmFyaW91cyBidWlsZCBmbGFnIGhhY2tzIGZvciBHQ0MgY3Jvc3Mt Y29tcGlsZS4NCj4+Pj4NCj4+Pj4gVGhlIHh0b29sY2hhaW4gR0NDIHBhY2thZ2VzIGhhdmUg bm90IHJlcXVpcmVkIHRoZXNlIGZsYWdzIHNpbmNlIHBvcnRzDQo+Pj4+IGNvbW1pdHMgcjQ2 NTQxNiBhbmQgcjQ2NjcwMS4gIFRoZSBpbi10cmVlIEdDQyA0LjIuMSBoYXMgYWxzbyBiZWVu IHBhdGNoZWQNCj4+Pj4gaW4gcjMzNTcxNiBhbmQgcjMzNTcxNyB0byBjb3JyZWN0bHkgaG9u b3IgLS1zeXNyb290IHdoZW4gbG9va2luZyBmb3INCj4+Pj4gaW5jbHVkZXMgYW5kIGxpYnJh cmllcy4NCj4+Pj4NCj4+Pj4gUmV2aWV3ZWQgYnk6CWJkcmV3ZXJ5DQo+Pj4+IFNwb25zb3Jl ZCBieToJREFSUEEgLyBBRlJMDQo+Pj4+IERpZmZlcmVudGlhbCBSZXZpc2lvbjoJDQo+Pj4+ IGh0dHBzOi8vcmV2aWV3cy5mcmVlYnNkLm9yZy9EMTYwNTUNCj4+PiAuIC4gLg0KPj4+DQo+ Pj4gYnJva2UgY2kuZnJlZWJzZC5vcmcncyBGcmVlQlNELWhlYWQtYW1kNjQtZ2NjIGJ1aWxk Lg0KPj4+DQo+Pj4gaHR0cHM6Ly9jaS5mcmVlYnNkLm9yZy9qb2IvRnJlZUJTRC1oZWFkLWFt ZDY0LWdjYy82MzMxL2NvbnNvbGVUZXh0IHNob3dzOg0KPj4+DQo+Pj4gLS0tIGNhdHJpZ2wu byAtLS0NCj4+PiAvdXNyL2xvY2FsL2Jpbi94ODZfNjQtdW5rbm93bi1mcmVlYnNkMTEuMS1n Y2MgLURDT01QQVRfMzJCSVQgLW1hcmNoPWk2ODYgLW1tbXggLW1zc2UgLW1zc2UyIC1tMzIg IC1ML3dvcmtzcGFjZS9vYmovd29ya3NwYWNlL3NyYy9hbWQ2NC5hbWQ2NC9vYmotbGliMzIv dG1wL3Vzci9saWIzMiAgLS1zeXNyb290PS93b3Jrc3BhY2Uvb2JqL3dvcmtzcGFjZS9zcmMv YW1kNjQuYW1kNjQvb2JqLWxpYjMyL3RtcCAgLUIvdXNyL2xvY2FsL3g4Nl82NC11bmtub3du LWZyZWVic2QxMS4xL2Jpbi8gLUIvd29ya3NwYWNlL29iai93b3Jrc3BhY2Uvc3JjL2FtZDY0 LmFtZDY0L29iai1saWIzMi90bXAvdXNyL2xpYjMyICAtTzIgLXBpcGUgLUkvd29ya3NwYWNl L3NyYy9saWIvbXN1bi94ODYgLUkvd29ya3NwYWNlL3NyYy9saWIvbXN1bi9sZDgwIC1JL3dv cmtzcGFjZS9zcmMvbGliL21zdW4vaTM4NyAtSS93b3Jrc3BhY2Uvc3JjL2xpYi9tc3VuL3Ny YyAtSS93b3Jrc3BhY2Uvc3JjL2xpYi9saWJjL2luY2x1ZGUgIC1JL3dvcmtzcGFjZS9zcmMv bGliL2xpYmMvaTM4NiAgLWcgLU1EICAtTUYuZGVwZW5kLmNhdHJpZ2wubyAtTVRjYXRyaWds Lm8gLXN0ZD1nbnU5OSAtZnN0YWNrLXByb3RlY3Rvci1zdHJvbmcgLVdzeXN0ZW0taGVhZGVy cyAtV2Vycm9yIC1Xbm8tcG9pbnRlci1zaWduIC1Xbm8tZXJyb3I9YWRkcmVzcyAtV25vLWVy cm9yPWFycmF5LWJvdW5kcyAtV25vLWVycm9yPWF0dHJpYnV0ZXMgLVduby1lcnJvcj1ib29s LWNvbXBhcmUgLVduby1lcnJvcj1jYXN0LWFsaWduIC1Xbm8tZXJyb3I9Y2xvYmJlcmVkIC1X bm8tZXJyb3I9ZW51bS1jb21wYXJlIC1Xbm8tZXJyb3I9ZXh0cmEgLVduby1lcnJvcj1pbmxp bmUgLVduby1lcnJvcj1sb2dpY2FsLW5vdC1wYXJlbnRoZXNlcyAtV25vLWVycm9yPXN0cmlj dC1hbGlhc2luZyAtV25vLWVycm9yPXVuaW5pdGlhbGl6ZWQgLVduby1lcnJvcj11bnVzZWQt YnV0LXNldC12YXJpYWJsZSAtV25vLWVycm9yPXVudXNlZC1mdW5jdGlvbiAtV25vLWVycm9y PXVudXNlZC12YWx1ZSAtV25vLWVycm9yPW1pc2xlYWRpbmctaW5kZW50YXRpb24gLVduby1l cnJvcj1ub25udWxsLWNvbXBhcmUgLVduby1lcnJvcj1zaGlmdC1uZWdhdGl2ZS12YWx1ZSAt V25vLWVycm9yPXRhdXRvbG9naWNhbC1jb21wYXJlIC1Xbm8tZXJyb3I9dW51c2VkLWNvbnN0 LXZhcmlhYmxlIC1Xbm8tdW5rbm93bi1wcmFnbWFzICAgICAtYyAvd29ya3NwYWNlL3NyYy9s aWIvbXN1bi9zcmMvY2F0cmlnbC5jIC1vIGNhdHJpZ2wubw0KPj4+IC93b3Jrc3BhY2Uvc3Jj L2xpYi9tc3VuL3NyYy9jYXRyaWdsLmM6OTA6MjogZXJyb3I6ICNlcnJvciAiVW5zdXBwb3J0 ZWQgbG9uZyBkb3VibGUgZm9ybWF0Ig0KPj4+ICNlcnJvciAiVW5zdXBwb3J0ZWQgbG9uZyBk b3VibGUgZm9ybWF0Ig0KPj4+IF5+fn5+DQo+Pj4gL3dvcmtzcGFjZS9zcmMvbGliL21zdW4v c3JjL2NhdHJpZ2wuYzogSW4gZnVuY3Rpb24gJ2Nhc2luaGwnOg0KPj4+IC93b3Jrc3BhY2Uv c3JjL2xpYi9tc3VuL3NyYy9jYXRyaWdsLmM6MTkwOjM1OiBlcnJvcjogJ21fbG4yJyB1bmRl Y2xhcmVkIChmaXJzdCB1c2UgaW4gdGhpcyBmdW5jdGlvbikNCj4+PiAgIHcgPSBjbG9nX2Zv cl9sYXJnZV92YWx1ZXMoeikgKyBtX2xuMjsNCj4+PiAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBefn5+fg0KPj4+IC93b3Jrc3BhY2Uvc3JjL2xpYi9tc3VuL3NyYy9jYXRy aWdsLmM6MTkwOjM1OiBub3RlOiBlYWNoIHVuZGVjbGFyZWQgaWRlbnRpZmllciBpcyByZXBv cnRlZCBvbmx5IG9uY2UgZm9yIGVhY2ggZnVuY3Rpb24gaXQgYXBwZWFycyBpbg0KPj4+IC93 b3Jrc3BhY2Uvc3JjL2xpYi9tc3VuL3NyYy9jYXRyaWdsLmM6MjAyOjExOiBlcnJvcjogJ1NR UlRfNl9FUFNJTE9OJyB1bmRlY2xhcmVkIChmaXJzdCB1c2UgaW4gdGhpcyBmdW5jdGlvbikN Cj4+PiBpZiAoYXggPCBTUVJUXzZfRVBTSUxPTiAvIDQgJiYgYXkgPCBTUVJUXzZfRVBTSUxP TiAvIDQpDQo+Pj4gICAgICAgICAgXn5+fn5+fn5+fn5+fn4NCj4+PiAvd29ya3NwYWNlL3Ny Yy9saWIvbXN1bi9zcmMvY2F0cmlnbC5jOiBJbiBmdW5jdGlvbiAnY2Fjb3NsJzoNCj4+PiAv d29ya3NwYWNlL3NyYy9saWIvbXN1bi9zcmMvY2F0cmlnbC5jOjI1MDoyMDogZXJyb3I6ICdt X2xuMicgdW5kZWNsYXJlZCAoZmlyc3QgdXNlIGluIHRoaXMgZnVuY3Rpb24pDQo+Pj4gIHJ5 ID0gY3JlYWxsKHcpICsgbV9sbjI7DQo+Pj4gICAgICAgICAgICAgICAgICAgXn5+fn4NCj4+ PiAvd29ya3NwYWNlL3NyYy9saWIvbXN1bi9zcmMvY2F0cmlnbC5jOjI2MToxMTogZXJyb3I6 ICdTUVJUXzZfRVBTSUxPTicgdW5kZWNsYXJlZCAoZmlyc3QgdXNlIGluIHRoaXMgZnVuY3Rp b24pDQo+Pj4gaWYgKGF4IDwgU1FSVF82X0VQU0lMT04gLyA0ICYmIGF5IDwgU1FSVF82X0VQ U0lMT04gLyA0KQ0KPj4+ICAgICAgICAgIF5+fn5+fn5+fn5+fn5+DQo+Pj4gSW4gZmlsZSBp bmNsdWRlZCBmcm9tIC93b3Jrc3BhY2Uvc3JjL2xpYi9tc3VuL3NyYy9jYXRyaWdsLmM6NDU6 MDoNCj4+PiAvd29ya3NwYWNlL3NyYy9saWIvbXN1bi9zcmMvY2F0cmlnbC5jOiBJbiBmdW5j dGlvbiAnY2xvZ19mb3JfbGFyZ2VfdmFsdWVzJzoNCj4+PiAvd29ya3NwYWNlL3NyYy9saWIv bXN1bi9zcmMvY2F0cmlnbC5jOjMxNjozNDogZXJyb3I6ICdtX2UnIHVuZGVjbGFyZWQgKGZp cnN0IHVzZSBpbiB0aGlzIGZ1bmN0aW9uKQ0KPj4+ICByZXR1cm4gKENNUExYTChsb2dsKGh5 cG90bCh4IC8gbV9lLCB5IC8gbV9lKSkgKyAxLA0KPj4+ICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgXg0KPj4+IC93b3Jrc3BhY2Uvc3JjL2xpYi9tc3VuL3NyYy9jYXRyaWds LmM6MzE2OjExOiBlcnJvcjogJ19fYnVpbHRpbl9jb21wbGV4JyBvcGVyYW5kIG5vdCBvZiBy ZWFsIGJpbmFyeSBmbG9hdGluZy1wb2ludCB0eXBlDQo+Pj4gIHJldHVybiAoQ01QTFhMKGxv Z2woaHlwb3RsKHggLyBtX2UsIHkgLyBtX2UpKSArIDEsDQo+Pj4gICAgICAgICAgXg0KPj4+ IC93b3Jrc3BhY2Uvc3JjL2xpYi9tc3VuL3NyYy9jYXRyaWdsLmM6IEluIGZ1bmN0aW9uICdj YXRhbmhsJzoNCj4+PiAvd29ya3NwYWNlL3NyYy9saWIvbXN1bi9zcmMvY2F0cmlnbC5jOjM5 MDoxMTogZXJyb3I6ICdTUVJUXzNfRVBTSUxPTicgdW5kZWNsYXJlZCAoZmlyc3QgdXNlIGlu IHRoaXMgZnVuY3Rpb24pDQo+Pj4gaWYgKGF4IDwgU1FSVF8zX0VQU0lMT04gLyAyICYmIGF5 IDwgU1FSVF8zX0VQU0lMT04gLyAyKSB7DQo+Pj4gICAgICAgICAgXn5+fn5+fn5+fn5+fn4N Cj4+PiAvd29ya3NwYWNlL3NyYy9saWIvbXN1bi9zcmMvY2F0cmlnbC5jOjM5Njo5OiBlcnJv cjogJ21fbG4yJyB1bmRlY2xhcmVkIChmaXJzdCB1c2UgaW4gdGhpcyBmdW5jdGlvbikNCj4+ PiAgcnggPSAobV9sbjIgLSBsb2dsKGF5KSkgLyAyOw0KPj4+ICAgICAgICBefn5+fg0KPj4+ ICoqKiBbY2F0cmlnbC5vXSBFcnJvciBjb2RlIDENCj4+DQo+PiBMYXRlciBiZWxvdyBleHBh bmQgdGhlIGZhaWxpbmcgYW5kIHByZXZpb2x5IGdvb2QgY29tbWFuZHMsIG9uZQ0KPj4gb3B0 aW9uIHBlciBsaW5lLiBUaGUgc3VtbWFyeSBvZiB0aGUgZGlzdGluY3Rpb24gaW4gY29udGVu dCBpcw0KPj4gYSBvbmUgbGluZSBkaWZmZXJlbmNlLCB0aGUgd29ya2luZyBleGFtcGxlICgg LXIzMzU3NzMgKWhhZCB0aGUNCj4+IG9wdGlvbjoNCj4+DQo+PiAtaXN5c3RlbSAvd29ya3Nw YWNlL29iai93b3Jrc3BhY2Uvc3JjL2FtZDY0LmFtZDY0L29iai1saWIzMi90bXAvdXNyL2lu Y2x1ZGUNCj4+DQo+PiBidXQgdGhlIGZhaWxpbmcgb25lIGRpZCBub3QuIFdvcmtpbmcgKCAt cjMzNTc3MyApIGlzIHNob3duIGZpcnN0Lg0KPj4NCj4+IC0tLSBjYXRyaWdsLm8gLS0tDQo+ PiAvdXNyL2xvY2FsL2Jpbi94ODZfNjQtdW5rbm93bi1mcmVlYnNkMTEuMS1nY2MNCj4+IC1E Q09NUEFUXzMyQklUDQo+PiAtbWFyY2g9aTY4Ng0KPj4gLW1tbXgNCj4+IC1tc3NlDQo+PiAt bXNzZTINCj4+IC1tMzINCj4+IC1ML3dvcmtzcGFjZS9vYmovd29ya3NwYWNlL3NyYy9hbWQ2 NC5hbWQ2NC9vYmotbGliMzIvdG1wL3Vzci9saWIzMg0KPj4gLS1zeXNyb290PS93b3Jrc3Bh Y2Uvb2JqL3dvcmtzcGFjZS9zcmMvYW1kNjQuYW1kNjQvb2JqLWxpYjMyL3RtcA0KPj4gLUIv dXNyL2xvY2FsL3g4Nl82NC11bmtub3duLWZyZWVic2QxMS4xL2Jpbi8NCj4+IC1CL3dvcmtz cGFjZS9vYmovd29ya3NwYWNlL3NyYy9hbWQ2NC5hbWQ2NC9vYmotbGliMzIvdG1wL3Vzci9s aWIzMg0KPj4gLWlzeXN0ZW0gL3dvcmtzcGFjZS9vYmovd29ya3NwYWNlL3NyYy9hbWQ2NC5h bWQ2NC9vYmotbGliMzIvdG1wL3Vzci9pbmNsdWRlDQo+PiAtTzINCj4+IC1waXBlDQo+PiAt SS93b3Jrc3BhY2Uvc3JjL2xpYi9tc3VuL3g4Ng0KPj4gLUkvd29ya3NwYWNlL3NyYy9saWIv bXN1bi9sZDgwDQo+PiAtSS93b3Jrc3BhY2Uvc3JjL2xpYi9tc3VuL2kzODcNCj4+IC1JL3dv cmtzcGFjZS9zcmMvbGliL21zdW4vc3JjDQo+PiAtSS93b3Jrc3BhY2Uvc3JjL2xpYi9saWJj L2luY2x1ZGUNCj4+IC1JL3dvcmtzcGFjZS9zcmMvbGliL2xpYmMvaTM4Ng0KPj4gLWcNCj4+ IC1NRA0KPj4gLU1GLmRlcGVuZC5jYXRyaWdsLm8NCj4+IC1NVGNhdHJpZ2wubw0KPj4gLXN0 ZD1nbnU5OQ0KPj4gLWZzdGFjay1wcm90ZWN0b3Itc3Ryb25nDQo+PiAtV3N5c3RlbS1oZWFk ZXJzDQo+PiAtV2Vycm9yDQo+PiAtV25vLXBvaW50ZXItc2lnbg0KPj4gLVduby1lcnJvcj1h ZGRyZXNzDQo+PiAtV25vLWVycm9yPWFycmF5LWJvdW5kcw0KPj4gLVduby1lcnJvcj1hdHRy aWJ1dGVzDQo+PiAtV25vLWVycm9yPWJvb2wtY29tcGFyZQ0KPj4gLVduby1lcnJvcj1jYXN0 LWFsaWduDQo+PiAtV25vLWVycm9yPWNsb2JiZXJlZA0KPj4gLVduby1lcnJvcj1lbnVtLWNv bXBhcmUNCj4+IC1Xbm8tZXJyb3I9ZXh0cmENCj4+IC1Xbm8tZXJyb3I9aW5saW5lDQo+PiAt V25vLWVycm9yPWxvZ2ljYWwtbm90LXBhcmVudGhlc2VzDQo+PiAtV25vLWVycm9yPXN0cmlj dC1hbGlhc2luZw0KPj4gLVduby1lcnJvcj11bmluaXRpYWxpemVkDQo+PiAtV25vLWVycm9y PXVudXNlZC1idXQtc2V0LXZhcmlhYmxlDQo+PiAtV25vLWVycm9yPXVudXNlZC1mdW5jdGlv bg0KPj4gLVduby1lcnJvcj11bnVzZWQtdmFsdWUNCj4+IC1Xbm8tZXJyb3I9bWlzbGVhZGlu Zy1pbmRlbnRhdGlvbg0KPj4gLVduby1lcnJvcj1ub25udWxsLWNvbXBhcmUNCj4+IC1Xbm8t ZXJyb3I9c2hpZnQtbmVnYXRpdmUtdmFsdWUNCj4+IC1Xbm8tZXJyb3I9dGF1dG9sb2dpY2Fs LWNvbXBhcmUNCj4+IC1Xbm8tZXJyb3I9dW51c2VkLWNvbnN0LXZhcmlhYmxlDQo+PiAtV25v LXVua25vd24tcHJhZ21hcw0KPj4gLWMgL3dvcmtzcGFjZS9zcmMvbGliL21zdW4vc3JjL2Nh dHJpZ2wuYw0KPj4gLW8gY2F0cmlnbC5vDQo+Pg0KPj4NCj4+IC0tLSBjYXRyaWdsLm8gLS0t DQo+PiAvdXNyL2xvY2FsL2Jpbi94ODZfNjQtdW5rbm93bi1mcmVlYnNkMTEuMS1nY2MNCj4+ IC1EQ09NUEFUXzMyQklUDQo+PiAtbWFyY2g9aTY4Ng0KPj4gLW1tbXgNCj4+IC1tc3NlDQo+ PiAtbXNzZTINCj4+IC1tMzINCj4+IC1ML3dvcmtzcGFjZS9vYmovd29ya3NwYWNlL3NyYy9h bWQ2NC5hbWQ2NC9vYmotbGliMzIvdG1wL3Vzci9saWIzMg0KPj4gLS1zeXNyb290PS93b3Jr c3BhY2Uvb2JqL3dvcmtzcGFjZS9zcmMvYW1kNjQuYW1kNjQvb2JqLWxpYjMyL3RtcA0KPj4g LUIvdXNyL2xvY2FsL3g4Nl82NC11bmtub3duLWZyZWVic2QxMS4xL2Jpbi8NCj4+IC1CL3dv cmtzcGFjZS9vYmovd29ya3NwYWNlL3NyYy9hbWQ2NC5hbWQ2NC9vYmotbGliMzIvdG1wL3Vz ci9saWIzMg0KPj4gLU8yDQo+PiAtcGlwZQ0KPj4gLUkvd29ya3NwYWNlL3NyYy9saWIvbXN1 bi94ODYNCj4+IC1JL3dvcmtzcGFjZS9zcmMvbGliL21zdW4vbGQ4MA0KPj4gLUkvd29ya3Nw YWNlL3NyYy9saWIvbXN1bi9pMzg3DQo+PiAtSS93b3Jrc3BhY2Uvc3JjL2xpYi9tc3VuL3Ny Yw0KPj4gLUkvd29ya3NwYWNlL3NyYy9saWIvbGliYy9pbmNsdWRlIA0KPj4gLUkvd29ya3Nw YWNlL3NyYy9saWIvbGliYy9pMzg2DQo+PiAtZw0KPj4gLU1EDQo+PiAtTUYuZGVwZW5kLmNh dHJpZ2wubw0KPj4gLU1UY2F0cmlnbC5vDQo+PiAtc3RkPWdudTk5DQo+PiAtZnN0YWNrLXBy b3RlY3Rvci1zdHJvbmcNCj4+IC1Xc3lzdGVtLWhlYWRlcnMNCj4+IC1XZXJyb3INCj4+IC1X bm8tcG9pbnRlci1zaWduDQo+PiAtV25vLWVycm9yPWFkZHJlc3MNCj4+IC1Xbm8tZXJyb3I9 YXJyYXktYm91bmRzDQo+PiAtV25vLWVycm9yPWF0dHJpYnV0ZXMNCj4+IC1Xbm8tZXJyb3I9 Ym9vbC1jb21wYXJlDQo+PiAtV25vLWVycm9yPWNhc3QtYWxpZ24NCj4+IC1Xbm8tZXJyb3I9 Y2xvYmJlcmVkDQo+PiAtV25vLWVycm9yPWVudW0tY29tcGFyZQ0KPj4gLVduby1lcnJvcj1l eHRyYQ0KPj4gLVduby1lcnJvcj1pbmxpbmUNCj4+IC1Xbm8tZXJyb3I9bG9naWNhbC1ub3Qt cGFyZW50aGVzZXMNCj4+IC1Xbm8tZXJyb3I9c3RyaWN0LWFsaWFzaW5nDQo+PiAtV25vLWVy cm9yPXVuaW5pdGlhbGl6ZWQNCj4+IC1Xbm8tZXJyb3I9dW51c2VkLWJ1dC1zZXQtdmFyaWFi bGUNCj4+IC1Xbm8tZXJyb3I9dW51c2VkLWZ1bmN0aW9uDQo+PiAtV25vLWVycm9yPXVudXNl ZC12YWx1ZQ0KPj4gLVduby1lcnJvcj1taXNsZWFkaW5nLWluZGVudGF0aW9uDQo+PiAtV25v LWVycm9yPW5vbm51bGwtY29tcGFyZQ0KPj4gLVduby1lcnJvcj1zaGlmdC1uZWdhdGl2ZS12 YWx1ZQ0KPj4gLVduby1lcnJvcj10YXV0b2xvZ2ljYWwtY29tcGFyZQ0KPj4gLVduby1lcnJv cj11bnVzZWQtY29uc3QtdmFyaWFibGUNCj4+IC1Xbm8tdW5rbm93bi1wcmFnbWFzDQo+PiAt YyAvd29ya3NwYWNlL3NyYy9saWIvbXN1bi9zcmMvY2F0cmlnbC5jDQo+PiAtbyBjYXRyaWds Lm8NCj4gDQo+IA0KPiBGb3IgdGhlIHJlcG9ydDoNCj4gDQo+PiBUaGUgeHRvb2xjaGFpbiBH Q0MgcGFja2FnZXMgaGF2ZSBub3QgcmVxdWlyZWQgdGhlc2UgZmxhZ3Mgc2luY2UgcG9ydHMN Cj4+ICAgY29tbWl0cyByNDY1NDE2IGFuZCByNDY2NzAxDQo+IA0KPiBMb29raW5nIGF0IGh0 dHBzOi8vY2kuZnJlZWJzZC5vcmcvam9iL0ZyZWVCU0QtaGVhZC1hbWQ2NC1nY2MvNjMzMS9j b25zb2xlVGV4dA0KPiB0aGVyZSBpczoNCj4gDQo+PiBVcGRhdGluZyBGcmVlQlNEIHJlcG9z aXRvcnkgY2F0YWxvZ3VlLi4uDQo+PiBGcmVlQlNEIHJlcG9zaXRvcnkgaXMgdXAgdG8gZGF0 ZS4NCj4+IEFsbCByZXBvc2l0b3JpZXMgYXJlIHVwIHRvIGRhdGUuDQo+PiBUaGUgZm9sbG93 aW5nIDYgcGFja2FnZShzKSB3aWxsIGJlIGFmZmVjdGVkIChvZiAwIGNoZWNrZWQpOg0KPj4N Cj4+IE5ldyBwYWNrYWdlcyB0byBiZSBJTlNUQUxMRUQ6DQo+PiAJYW1kNjQteHRvb2xjaGFp bi1nY2M6IDAuNF8xDQo+PiAJYW1kNjQtZ2NjOiA2LjQuMA0KPj4gCW1wZnI6IDQuMC4xDQo+ PiAJZ21wOiA2LjEuMg0KPj4gCW1wYzogMS4xLjBfMQ0KPj4gCWFtZDY0LWJpbnV0aWxzOiAy LjMwXzMsMQ0KPiANCj4gYW5kIGFtZDY0LWdjYyBiZWluZyA2LjQuMCAodmlhIHBvd2VycGM2 NC1nY2MpIGlzIGZyb20gLXI0NjY4MzQNCj4gKHZpYSBsb29raW5nIHVwIGluIGh0dHBzOi8v c3Zud2ViLmZyZWVic2Qub3JnL3BvcnRzL2hlYWQvZGV2ZWwvICkuDQo+IA0KPiBUaGlzIGlu ZGljYXRlcyB0aGF0IC1yNDY1NDE2IGFuZCAtcjQ2NjcwMSBkaWQgbm90IGNhdXNlOg0KPiAN Cj4gLS1zeXNyb290PS93b3Jrc3BhY2Uvb2JqL3dvcmtzcGFjZS9zcmMvYW1kNjQuYW1kNjQv b2JqLWxpYjMyL3RtcA0KPiANCj4gdG8gbGVhZCB0byBpbmNsdWRlIGZpbGVzIGJlaW5nIGxv b2tlZCB1cCBpbjoNCj4gDQo+IC93b3Jrc3BhY2Uvb2JqL3dvcmtzcGFjZS9zcmMvYW1kNjQu YW1kNjQvb2JqLWxpYjMyL3RtcC91c3IvaW5jbHVkZQ0KPiANCj4gVGh1cyB0aGVyZSBhcHBl YXJzIHRvIHN0aWxsIGJlIGEgbmVlZCBmb3I6DQo+IA0KPiAtaXN5c3RlbSAvd29ya3NwYWNl L29iai93b3Jrc3BhY2Uvc3JjL2FtZDY0LmFtZDY0L29iai1saWIzMi90bXAvdXNyL2luY2x1 ZGUNCj4gDQo+IHVubGVzcyBtb3JlIGlzIGRvbmUgdG8gdGhlIGRldmVsLyotZ2NjIHRvIG1h a2UgdGhlbSBsb29rDQo+IGluIHRoYXQgYWRkaXRpb25hbCBwbGFjZSBhdXRvbWF0aWNhbGx5 IChiYXNlZCBvbiAtLXN5c3Jvb3QpLg0KDQotLXN5c3Jvb3QgZG9lcyB3b3JrLCBhbmQgeW91 IGNhbiB2ZXJpZnkgaXQgYnkgZG9pbmcgdGhlIGZvbGxvd2luZzoNCg0KJSB0b3VjaCBlbXB0 eS5jDQolIHg4Nl82NC11bmtub3duLWZyZWVic2QxMS4yLWdjYyAtYyAtdiBlbXB0eS5jDQpV c2luZyBidWlsdC1pbiBzcGVjcy4NCkNPTExFQ1RfR0NDPXg4Nl82NC11bmtub3duLWZyZWVi c2QxMS4yLWdjYw0KVGFyZ2V0OiB4ODZfNjQtdW5rbm93bi1mcmVlYnNkMTEuMg0KLi4uDQpp Z25vcmluZyBub25leGlzdGVudCBkaXJlY3RvcnkgIi91c3IvbG9jYWwvbGliL2djYy94ODZf NjQtdW5rbm93bi1mcmVlYnNkMTEuMi82LjQuMC9pbmNsdWRlLWZpeGVkIg0KaWdub3Jpbmcg bm9uZXhpc3RlbnQgZGlyZWN0b3J5ICIvdXNyL2xvY2FsL2xpYi9nY2MveDg2XzY0LXVua25v d24tZnJlZWJzZDExLjIvNi40LjAvLi4vLi4vLi4vLi4veDg2XzY0LXVua25vd24tZnJlZWJz ZDExLjIvaW5jbHVkZSINCiNpbmNsdWRlICIuLi4iIHNlYXJjaCBzdGFydHMgaGVyZToNCiNp bmNsdWRlIDwuLi4+IHNlYXJjaCBzdGFydHMgaGVyZToNCiAvdXNyL2xvY2FsL2xpYi9nY2Mv eDg2XzY0LXVua25vd24tZnJlZWJzZDExLjIvNi40LjAvaW5jbHVkZQ0KIC91c3IvaW5jbHVk ZQ0KRW5kIG9mIHNlYXJjaCBsaXN0Lg0KLi4uDQolIHg4Nl82NC11bmtub3duLWZyZWVic2Qx MS4yLWdjYyAtYyAtdiBlbXB0eS5jICAtLXN5c3Jvb3Q9L2Zvbw0KVXNpbmcgYnVpbHQtaW4g c3BlY3MuDQpDT0xMRUNUX0dDQz14ODZfNjQtdW5rbm93bi1mcmVlYnNkMTEuMi1nY2MNClRh cmdldDogeDg2XzY0LXVua25vd24tZnJlZWJzZDExLjINCi4uLg0KaWdub3Jpbmcgbm9uZXhp c3RlbnQgZGlyZWN0b3J5ICIvdXNyL2xvY2FsL2xpYi9nY2MveDg2XzY0LXVua25vd24tZnJl ZWJzZDExLjIvNi40LjAvaW5jbHVkZS1maXhlZCINCmlnbm9yaW5nIG5vbmV4aXN0ZW50IGRp cmVjdG9yeSAiL3Vzci9sb2NhbC9saWIvZ2NjL3g4Nl82NC11bmtub3duLWZyZWVic2QxMS4y LzYuNC4wLy4uLy4uLy4uLy4uL3g4Nl82NC11bmtub3duLWZyZWVic2QxMS4yL2luY2x1ZGUi DQppZ25vcmluZyBub25leGlzdGVudCBkaXJlY3RvcnkgIi9mb28vdXNyL2luY2x1ZGUiDQoj aW5jbHVkZSAiLi4uIiBzZWFyY2ggc3RhcnRzIGhlcmU6DQojaW5jbHVkZSA8Li4uPiBzZWFy Y2ggc3RhcnRzIGhlcmU6DQogL3Vzci9sb2NhbC9saWIvZ2NjL3g4Nl82NC11bmtub3duLWZy ZWVic2QxMS4yLzYuNC4wL2luY2x1ZGUNCkVuZCBvZiBzZWFyY2ggbGlzdC4NCg0KSSB3aWxs IHNlZSBpZiBJIGNhbiByZXByb2R1Y2UgdGhlIGZhaWx1cmUgbG9jYWxseS4NCg0KLS0gDQpK b2huIEJhbGR3aW4NCg== From owner-svn-src-head@freebsd.org Fri Jun 29 17:51:44 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-head@freebsd.org Fri Jun 29 18:45:30 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-head@freebsd.org Fri Jun 29 19:35:26 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-head@freebsd.org Fri Jun 29 20:26:06 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 956F7F7889F; Fri, 29 Jun 2018 20:26:06 +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 349FD7A2AB; Fri, 29 Jun 2018 20:26:06 +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 4C42910AFCD; Fri, 29 Jun 2018 16:26:04 -0400 (EDT) Subject: Re: head -r335782 (?) broke ci.freebsd.org's FreeBSD-head-amd64-gcc build (lib32 part of build) To: Mark Millard , Bryan Drewery References: <00D1127A-1F0E-4E0E-B86C-1C5AA5B2E085@yahoo.com> <7A845F2C-C994-4828-823D-33A97B7B6EB0@yahoo.com> Cc: svn-src-head@freebsd.org, FreeBSD Current From: John Baldwin Message-ID: Date: Fri, 29 Jun 2018 13:26:03 -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: <7A845F2C-C994-4828-823D-33A97B7B6EB0@yahoo.com> Content-Type: text/plain; charset=utf-8 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); Fri, 29 Jun 2018 16:26:04 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jun 2018 20:26:06 -0000 On 6/28/18 7:54 PM, Mark Millard wrote: > On 2018-Jun-28, at 6:04 PM, Mark Millard wrote: > >> On 2018-Jun-28, at 5:39 PM, Mark Millard wrote: >> >>> [ ci.free.bsd.org jumped from -r335773 (built) to -r335784 (failed) >>> for FreeBSD-head-amd64-gcc. It looked to me like the most likely >>> breaking-change was the following but I've not tried personal >>> builds to confirm. >>> ] So this is a bit complicated and I'm not sure what the correct fix is. What is happening is that the shipped with GCC is now being used after this change instead of sys/x86/include/float.h. A sledgehammer approach would be to remove float.h from the GCC package (we currently don't install the float.h for the base system clang either). However, looking at this in more detail, it seems that x86/include/float.h is also busted in some ways. First, the #error I don't understand how it is happening. The GCC float.h defines LDBL_MAX_EXP to the __LDBL_MAX_EXP__ builtin which is 16384 just like the x86 float.h: # x86_64-unknown-freebsd12.0-gcc -dM -E empty.c -m32 | grep LDBL_MAX_EXP #define __LDBL_MAX_EXP__ 16384 I even hacked catrigl.c to add the following lines before the #error check: LDBL_MAX_EXP_ = LDBL_MAX_EXP LDBL_MANT_DIG_ = LDBL_MANT_DIG #if LDBL_MAX_EXP != 0x4000 #error "Unsupported long double format" #endif And the -E output is: DBL_MAX_EXP_ = 16384 LDBL_MANT_DIG_ = 53 # 51 "/zoo/jhb/zoo/jhb/git/freebsd/lib/msun/src/catrigl.c:93:2: error: #error "U nsupported long double format" #error "Unsupported long double format" ^~~~~ Yet clearly, 16384 == 0x4000 assuming it is doing a numeric comparison (which it must be since the x86 float.h uses '16384' not '0x4000' as the value). However, LDBL_MANT_DIG of 53 is a bit more fun. We have a comment about the initial FPU control word in sys/amd64/include/fpu.h that reads thus: /* * The hardware default control word for i387's and later coprocessors is * 0x37F, giving: * * round to nearest * 64-bit precision * all exceptions masked. * * FreeBSD/i386 uses 53 bit precision for things like fadd/fsub/fsqrt etc * because of the difference between memory and fpu register stack arguments. * If its using an intermediate fpu register, it has 80/64 bits to work * with. If it uses memory, it has 64/53 bits to work with. However, * gcc is aware of this and goes to a fair bit of trouble to make the * best use of it. * * This is mostly academic for AMD64, because the ABI prefers the use * SSE2 based math. For FreeBSD/amd64, we go with the default settings. */ #define __INITIAL_FPUCW__ 0x037F #define __INITIAL_FPUCW_I386__ 0x127F #define __INITIAL_NPXCW__ __INITIAL_FPUCW_I386__ #define __INITIAL_MXCSR__ 0x1F80 #define __INITIAL_MXCSR_MASK__ 0xFFBF GCC is indeed aware of this in gcc/config/i386/freebsd.h which results in __LDBL_MANT_DIG__ being set to 53 instead of 64: /* FreeBSD sets the rounding precision of the FPU to 53 bits. Let the compiler get the contents of and std::numeric_limits correct. */ #undef TARGET_96_ROUND_53_LONG_DOUBLE #define TARGET_96_ROUND_53_LONG_DOUBLE (!TARGET_64BIT) clang seems unaware of this as it reports all the same values for LDBL_MIN/MAX for both amd64 and i386 (values that match GCC for amd64 but not i386): # cc -dM -E empty.c | egrep 'LDBL_(MIN|MAX)__' #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __LDBL_MIN__ 3.36210314311209350626e-4932L # cc -dM -E empty.c -m32 | egrep 'LDBL_(MIN|MAX)__' #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __LDBL_MIN__ 3.36210314311209350626e-4932L # x86_64-unknown-freebsd12.0-gcc -dM -E empty.c | egrep 'LDBL_(MIN|MAX)__' #define __LDBL_MAX__ 1.18973149535723176502e+4932L #define __LDBL_MIN__ 3.36210314311209350626e-4932L # x86_64-unknown-freebsd12.0-gcc -dM -E empty.c -m32 | egrep 'LDBL_(MIN|MAX)__' #define __LDBL_MAX__ 1.1897314953572316e+4932L #define __LDBL_MIN__ 3.3621031431120935e-4932L The x86/include/float.h header though reports the MIN/MAX values somewhere in between the two ranges for both amd64 and i386 while reporting an LDBL_MANT_DIG of 64: #define LDBL_MANT_DIG 64 #define LDBL_MIN 3.3621031431120935063E-4932L #define LDBL_MAX 1.1897314953572317650E+4932L I guess for now I will remove float.h from the amd64-gcc pkg-plist, but we should really be fixing our tree to work with compiler-provided language headers when at all possible. It's not clear to me if amd64 should be using the compiler provided values of things like LDBL_MIN/MAX either btw. -- John Baldwin From owner-svn-src-head@freebsd.org Fri Jun 29 21:15:18 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-head@freebsd.org Fri Jun 29 21:15:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-head@freebsd.org Fri Jun 29 21:48:09 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBD66F7DE37 for ; Fri, 29 Jun 2018 21:48:09 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic306-21.consmr.mail.gq1.yahoo.com (sonic306-21.consmr.mail.gq1.yahoo.com [98.137.68.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 510807D601 for ; Fri, 29 Jun 2018 21:48:09 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: kd46I7oVM1lvRhfvJTN5ixEGj_EQ2w1I6KSrwUgxSufWVcivsT34ltwi6snz76f 71BSTYvaJNgW_M7etNgSAOD5grnXy3JAYvZ1tig56LB5kH4GKRoTX6AXyMRE4a_4eTU3mT7IP3N_ dh0pyEVkJNq694ynYJHLao6jFtpejVUloeITs9zCbSkiuXZZMJhP7M3nM2i5xzf1ysIkX8cZuKzx ZZDSUvwQJTd4st5.yoI6a5HqADO7OZFO8ib1k6.2ZF48K6.hubEM2107jfTBolFYJIlSSD_cPUeo MsqIe5Ze3Ll9j9IA3YHK0nQ5aBqISHARIarbrSSjVruXJ2OwNjEZ8vdljRly7_7z.xg.2y_L_7lE V2qf.9VcNo5Gxn.mcIGzVv.RXj20Do2_ycF_9xJXkeyLetoyLb8V3mmTHJCvOaHycNYkrOsEi73Y N1ApwNw17telYS7Ifz9WMgosihlCXcikOAaMNbz39aUsN11F9bqCknn27l1zR1F_N1hDIW6PeE9K IjOogv91WMx.8rQ5Id8serkmOPVYkShCbqK.bc2GEt5h_ffUYBLlD.6qBK4axGCmgpOIwFJ6d1cP oYHhtn40.bBYBNvigXqTKoV6kfL.OF9AJ96cb0mIwXg9mMkMt5un7Om26.Qo_ZhULRn9f.cUPNNq IXBqcV.F8pUDuU7FgbjIujObZP2NPKC9hfc1gSrgNFMh5Z9cBR.MM4mSBWdueHDYwh8ra29LHIwG ypysy1dyFuTcjnh8wiWe7zBVZQj_IfigMg4XfKXWJvYRNhI.06YmRT0oSXfDvPoQUVu.wLfxgk_c LP8HeOrlqpiCS24KDWILxjqBhBAegAAfybOnz2Z9nkG.raEdZFFpxf7pSXbLIB_B7drffgfPOoF4 Ynt09rtPn7MIFBB2K4n4gymA9qVgWcvRvkkEPFDZbYp_gT.0UMh7Gw3c1XOh8fh4W5PHeywbm3sz rRA80k.6JRST3z1ai2Xorfd6VWk9HnVc- Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.gq1.yahoo.com with HTTP; Fri, 29 Jun 2018 21:48:01 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp407.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 5ff4b36b23986c2b46e7ca46bb74cb75; Fri, 29 Jun 2018 21:37:51 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) Subject: Re: head -r335782 (?) broke ci.freebsd.org's FreeBSD-head-amd64-gcc build (lib32 part of build) From: Mark Millard In-Reply-To: <72081b02-cf23-82ec-32df-7f5793c35f57@FreeBSD.org> Date: Fri, 29 Jun 2018 14:37:49 -0700 Cc: Bryan Drewery , svn-src-head@freebsd.org, FreeBSD Current Content-Transfer-Encoding: quoted-printable Message-Id: <003509F0-F2F4-4A43-82FE-3F6FC23D19D4@yahoo.com> References: <00D1127A-1F0E-4E0E-B86C-1C5AA5B2E085@yahoo.com> <7A845F2C-C994-4828-823D-33A97B7B6EB0@yahoo.com> <72081b02-cf23-82ec-32df-7f5793c35f57@FreeBSD.org> To: John Baldwin X-Mailer: Apple Mail (2.3445.8.2) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jun 2018 21:48:10 -0000 [I expect this is more than just amd64-gcc related but that is all that ci.freebsd.org normally builds via a devel/*-gcc .] On 2018-Jun-29, at 10:38 AM, John Baldwin wrote: > On 6/28/18 7:54 PM, Mark Millard wrote: >> On 2018-Jun-28, at 6:04 PM, Mark Millard = wrote: >>=20 >>> On 2018-Jun-28, at 5:39 PM, Mark Millard = wrote: >>>=20 >>> . . . >>> Later below expand the failing and previoly good commands, one >>> option per line. The summary of the distinction in content is >>> a one line difference, the working example ( -r335773 )had the >>> option: >>>=20 >>> -isystem = /workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/include >>>=20 >>> but the failing one did not. Working ( -r335773 ) is shown first. >>>=20 >>> --- catrigl.o --- >>> /usr/local/bin/x86_64-unknown-freebsd11.1-gcc >>> -DCOMPAT_32BIT >>> -march=3Di686 >>> -mmmx >>> -msse >>> -msse2 >>> -m32 >>> -L/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/lib32 >>> --sysroot=3D/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp >>> -B/usr/local/x86_64-unknown-freebsd11.1/bin/ >>> -B/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/lib32 >>> -isystem = /workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/include >>> -O2 >>> -pipe >>> -I/workspace/src/lib/msun/x86 >>> -I/workspace/src/lib/msun/ld80 >>> -I/workspace/src/lib/msun/i387 >>> -I/workspace/src/lib/msun/src >>> -I/workspace/src/lib/libc/include >>> -I/workspace/src/lib/libc/i386 >>> . . . >>>=20 >>> --- catrigl.o --- >>> /usr/local/bin/x86_64-unknown-freebsd11.1-gcc >>> -DCOMPAT_32BIT >>> -march=3Di686 >>> -mmmx >>> -msse >>> -msse2 >>> -m32 >>> -L/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/lib32 >>> --sysroot=3D/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp >>> -B/usr/local/x86_64-unknown-freebsd11.1/bin/ >>> -B/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/lib32 >>> -O2 >>> -pipe >>> -I/workspace/src/lib/msun/x86 >>> -I/workspace/src/lib/msun/ld80 >>> -I/workspace/src/lib/msun/i387 >>> -I/workspace/src/lib/msun/src >>> -I/workspace/src/lib/libc/include=20 >>> -I/workspace/src/lib/libc/i386 >>> . . . >>=20 >>=20 >> For the report: >>=20 >>> The xtoolchain GCC packages have not required these flags since = ports >>> commits r465416 and r466701 >>=20 >> Looking at = https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/6331/consoleText >> there is: >>=20 >>> Updating FreeBSD repository catalogue... >>> FreeBSD repository is up to date. >>> All repositories are up to date. >>> The following 6 package(s) will be affected (of 0 checked): >>>=20 >>> New packages to be INSTALLED: >>> amd64-xtoolchain-gcc: 0.4_1 >>> amd64-gcc: 6.4.0 >>> mpfr: 4.0.1 >>> gmp: 6.1.2 >>> mpc: 1.1.0_1 >>> amd64-binutils: 2.30_3,1 >>=20 >> and amd64-gcc being 6.4.0 (via powerpc64-gcc) is from -r466834 >> (via looking up in https://svnweb.freebsd.org/ports/head/devel/ ). >>=20 >> This indicates that -r465416 and -r466701 did not cause: >>=20 >> --sysroot=3D/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp >>=20 >> to lead to include files being looked up in: >>=20 >> /workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/include >>=20 >> Thus there appears to still be a need for: >>=20 >> -isystem = /workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/include >>=20 >> unless more is done to the devel/*-gcc to make them look >> in that additional place automatically (based on --sysroot). >=20 > --sysroot does work, and you can verify it by doing the following: >=20 > % touch empty.c > % x86_64-unknown-freebsd11.2-gcc -c -v empty.c > Using built-in specs. > COLLECT_GCC=3Dx86_64-unknown-freebsd11.2-gcc > Target: x86_64-unknown-freebsd11.2 > ... > ignoring nonexistent directory = "/usr/local/lib/gcc/x86_64-unknown-freebsd11.2/6.4.0/include-fixed" > ignoring nonexistent directory = "/usr/local/lib/gcc/x86_64-unknown-freebsd11.2/6.4.0/../../../../x86_64-un= known-freebsd11.2/include" > #include "..." search starts here: > #include <...> search starts here: > /usr/local/lib/gcc/x86_64-unknown-freebsd11.2/6.4.0/include > /usr/include > End of search list. > ... > % x86_64-unknown-freebsd11.2-gcc -c -v empty.c --sysroot=3D/foo > Using built-in specs. > COLLECT_GCC=3Dx86_64-unknown-freebsd11.2-gcc > Target: x86_64-unknown-freebsd11.2 > ... > ignoring nonexistent directory = "/usr/local/lib/gcc/x86_64-unknown-freebsd11.2/6.4.0/include-fixed" > ignoring nonexistent directory = "/usr/local/lib/gcc/x86_64-unknown-freebsd11.2/6.4.0/../../../../x86_64-un= known-freebsd11.2/include" > ignoring nonexistent directory "/foo/usr/include" > #include "..." search starts here: > #include <...> search starts here: > /usr/local/lib/gcc/x86_64-unknown-freebsd11.2/6.4.0/include > End of search list. >=20 > I will see if I can reproduce the failure locally. The: ignoring nonexistent directory "/foo/usr/include" means that the order of the search alternatives was not shown ("search starts here"). That is what I expect is different. It will take a while before I'll have a build from either before or after the change to show a search order with. (And longer to have both for comparison.) My context is freebsd12.0 . My buildworld buildkernel context has: # more ~/src.configs/make.conf=20 CFLAGS.gcc+=3D -v so my script file for a build is very explicit about the order. I'll be starting from # uname -apKU FreeBSD FBSDUSSD 12.0-CURRENT FreeBSD 12.0-CURRENT r335245M amd64 = amd64 1200069 1200069 =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Fri Jun 29 22:17:29 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-head@freebsd.org Fri Jun 29 22:24:43 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-head@freebsd.org Fri Jun 29 23:48:35 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-head@freebsd.org Sat Jun 30 00:05:17 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4ED4FD4F12; Sat, 30 Jun 2018 00:05:16 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-pl0-x233.google.com (mail-pl0-x233.google.com [IPv6:2607:f8b0:400e:c01::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 3AA56821A8; Sat, 30 Jun 2018 00:05:16 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-pl0-x233.google.com with SMTP id bi1-v6so5165900plb.12; Fri, 29 Jun 2018 17:05:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=evN0dJ+3tS5Odd/ZRXg3SF2Jl5U4GgRB8DSHHsoe+yc=; b=n/U7SNkXPUgP532+k9d9QT8xtjtcLdLK8w1Wzlm/ew/jKDYVTvYwESF4bzwraHhhzb osd/ZNmn9rxGIjqGXzkC+A3LP3FS8MRs81BmCofbvl+yZU+CPXqyYByQokoVY2ATBGn7 ItfII8OYT+YfdOAQQiuxhVhiIPYxJ9f66+6OkJkSpwSi5MLwbRJ9B7JRvTU+tE8uJff/ c3fGv1JKkiqFYnyEhO3UfvaPOCVyGTzozI4uexnR/wkfUQTRhEIuRmFfB6Ce39nIhdFE x58yHpziBglYIvVG5bXs0EATuab6dDSEt8U5vuyhqJPHqQzqwDS+Gb8v1x/l7yChCldZ i+4Q== 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=evN0dJ+3tS5Odd/ZRXg3SF2Jl5U4GgRB8DSHHsoe+yc=; b=WUhmG0H54lW5zIHbv2eGCuTgaBCUfnuuQaeWmm1p3k4Iu5zKp2x09F/HyEBbMEDNcs uCdpkKjjPJXFvvvmm9+0wOSRqhZXBbw9b4PitugMOtR+T5eyCFYJa+PdijYY6SjE1LO4 XXBPdDjYyYFBoHVWejgAJlisuRAnQXGDOWKivZsOZ2CjA/15AoRA5r2NsaslSJCQx3Oj a/aTzo2fHOuTRmRFSWJkDQmEq9g2yH/jUbN4/HRQ2Dv7IfOF/TQpYh1YMOAzGfoYiacY Y+PLAWuDFIjsUC4R7RySlRHZC0/F/yRPckut2e2Y2w6RvE2KAdbPUhys0uJPUkKswRto 5s4Q== X-Gm-Message-State: APt69E3fJMZcD/7xFGAbsGYuiq6o4XzTqe1a41G4XGiFrLGXXPuVbDZG nHagbCBReTJRXCAjpu55JTkqKPAt70/1FpyRT+nc2ltE X-Google-Smtp-Source: ADUXVKLGFyQvEbacjVfcqnx7WNmhUwHuRLMSwTf/wxY+YOUxtEU066sPm9voUIkMrONr9QQeiRXIUgm+GkIZUB8dBKg= X-Received: by 2002:a17:902:6acc:: with SMTP id i12-v6mr16849374plt.278.1530317114687; Fri, 29 Jun 2018 17:05:14 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a17:90a:1581:0:0:0:0 with HTTP; Fri, 29 Jun 2018 17:05:13 -0700 (PDT) In-Reply-To: References: <00D1127A-1F0E-4E0E-B86C-1C5AA5B2E085@yahoo.com> <7A845F2C-C994-4828-823D-33A97B7B6EB0@yahoo.com> From: Ryan Libby Date: Fri, 29 Jun 2018 17:05:13 -0700 Message-ID: Subject: Re: head -r335782 (?) broke ci.freebsd.org's FreeBSD-head-amd64-gcc build (lib32 part of build) To: John Baldwin Cc: Mark Millard , Bryan Drewery , svn-src-head@freebsd.org, FreeBSD Current Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jun 2018 00:05:17 -0000 On Fri, Jun 29, 2018 at 1:26 PM, John Baldwin wrote: > On 6/28/18 7:54 PM, Mark Millard wrote: >> On 2018-Jun-28, at 6:04 PM, Mark Millard wrote: >> >>> On 2018-Jun-28, at 5:39 PM, Mark Millard wrote: >>> >>>> [ ci.free.bsd.org jumped from -r335773 (built) to -r335784 (failed) >>>> for FreeBSD-head-amd64-gcc. It looked to me like the most likely >>>> breaking-change was the following but I've not tried personal >>>> builds to confirm. >>>> ] > > So this is a bit complicated and I'm not sure what the correct fix is. > > What is happening is that the shipped with GCC is now being used > after this change instead of sys/x86/include/float.h. A sledgehammer approach > would be to remove float.h from the GCC package (we currently don't install > the float.h for the base system clang either). However, looking at this > in more detail, it seems that x86/include/float.h is also busted in some > ways. > > First, the #error I don't understand how it is happening. The GCC float.h > defines LDBL_MAX_EXP to the __LDBL_MAX_EXP__ builtin which is 16384 just > like the x86 float.h: > > # x86_64-unknown-freebsd12.0-gcc -dM -E empty.c -m32 | grep LDBL_MAX_EXP > #define __LDBL_MAX_EXP__ 16384 > > I even hacked catrigl.c to add the following lines before the #error > check: > > LDBL_MAX_EXP_ = LDBL_MAX_EXP > LDBL_MANT_DIG_ = LDBL_MANT_DIG > > #if LDBL_MAX_EXP != 0x4000 > #error "Unsupported long double format" > #endif > > And the -E output is: > > DBL_MAX_EXP_ = 16384 > LDBL_MANT_DIG_ = 53 > > # 51 "/zoo/jhb/zoo/jhb/git/freebsd/lib/msun/src/catrigl.c:93:2: error: #error "U > nsupported long double format" > #error "Unsupported long double format" > ^~~~~ > > Yet clearly, 16384 == 0x4000 assuming it is doing a numeric comparison (which > it must be since the x86 float.h uses '16384' not '0x4000' as the value). > Isn't this just the unsupported LDBL_MANT_DIG you're hitting here? Note line 93. I reused the same error message for LDBL_MAX_EXP :/ > However, LDBL_MANT_DIG of 53 is a bit more fun. We have a comment about the > initial FPU control word in sys/amd64/include/fpu.h that reads thus: > > /* > * The hardware default control word for i387's and later coprocessors is > * 0x37F, giving: > * > * round to nearest > * 64-bit precision > * all exceptions masked. > * > * FreeBSD/i386 uses 53 bit precision for things like fadd/fsub/fsqrt etc > * because of the difference between memory and fpu register stack arguments. > * If its using an intermediate fpu register, it has 80/64 bits to work > * with. If it uses memory, it has 64/53 bits to work with. However, > * gcc is aware of this and goes to a fair bit of trouble to make the > * best use of it. > * > * This is mostly academic for AMD64, because the ABI prefers the use > * SSE2 based math. For FreeBSD/amd64, we go with the default settings. > */ > #define __INITIAL_FPUCW__ 0x037F > #define __INITIAL_FPUCW_I386__ 0x127F > #define __INITIAL_NPXCW__ __INITIAL_FPUCW_I386__ > #define __INITIAL_MXCSR__ 0x1F80 > #define __INITIAL_MXCSR_MASK__ 0xFFBF > > GCC is indeed aware of this in gcc/config/i386/freebsd.h which results in > __LDBL_MANT_DIG__ being set to 53 instead of 64: > > /* FreeBSD sets the rounding precision of the FPU to 53 bits. Let the > compiler get the contents of and std::numeric_limits correct. */ > #undef TARGET_96_ROUND_53_LONG_DOUBLE > #define TARGET_96_ROUND_53_LONG_DOUBLE (!TARGET_64BIT) > > clang seems unaware of this as it reports all the same values for > LDBL_MIN/MAX for both amd64 and i386 (values that match GCC for amd64 > but not i386): > > # cc -dM -E empty.c | egrep 'LDBL_(MIN|MAX)__' > #define __LDBL_MAX__ 1.18973149535723176502e+4932L > #define __LDBL_MIN__ 3.36210314311209350626e-4932L > # cc -dM -E empty.c -m32 | egrep 'LDBL_(MIN|MAX)__' > #define __LDBL_MAX__ 1.18973149535723176502e+4932L > #define __LDBL_MIN__ 3.36210314311209350626e-4932L > # x86_64-unknown-freebsd12.0-gcc -dM -E empty.c | egrep 'LDBL_(MIN|MAX)__' > #define __LDBL_MAX__ 1.18973149535723176502e+4932L > #define __LDBL_MIN__ 3.36210314311209350626e-4932L > # x86_64-unknown-freebsd12.0-gcc -dM -E empty.c -m32 | egrep 'LDBL_(MIN|MAX)__' > #define __LDBL_MAX__ 1.1897314953572316e+4932L > #define __LDBL_MIN__ 3.3621031431120935e-4932L > > The x86/include/float.h header though reports the MIN/MAX values somewhere > in between the two ranges for both amd64 and i386 while reporting an > LDBL_MANT_DIG of 64: > > #define LDBL_MANT_DIG 64 > #define LDBL_MIN 3.3621031431120935063E-4932L > #define LDBL_MAX 1.1897314953572317650E+4932L > > I guess for now I will remove float.h from the amd64-gcc pkg-plist, but we > should really be fixing our tree to work with compiler-provided language > headers when at all possible. It's not clear to me if amd64 should be > using the compiler provided values of things like LDBL_MIN/MAX either btw. > > -- > John Baldwin > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" The whole situation is a little messed up. LDBL_MAX, LDBL_MIN, and LDBL_MANT_DIG are IMHO broken by design, because they are just the defaults. User code can change the mode, and then the constants necessarily yield weird things, like max - epsilon becoming infinity, or not actually being the maximum possible finite value. It's difficult for code to use them correctly--which was why I removed references to LDBL_MAX in [1]. Some general background on that aspect here [2]. [1] https://svnweb.freebsd.org/base?view=revision&revision=323003 [2] https://lists.freebsd.org/pipermail/freebsd-numerics/2012-September/000288.html From owner-svn-src-head@freebsd.org Sat Jun 30 01:02:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7CDFFDC87C for ; Sat, 30 Jun 2018 01:02:27 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic316-9.consmr.mail.gq1.yahoo.com (sonic316-9.consmr.mail.gq1.yahoo.com [98.137.69.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39C4983B4A for ; Sat, 30 Jun 2018 01:02:27 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: gsWnNjkVM1mKsS8iC4u_UCrJvS3oP9r7JnvHfapCkT94oXxCQ2wJZqAnSKI.rA2 FD01zFi53MbNl2q_XyzCeztmmCOeX8xkU4JOkSEe_9bPe6L..BG2lRcbk5ejCZxDHGJl05cywAgm 28mc8rrGSjdHm9xDkwnNsa38KLV8Qt_6aaIIvHEaEJi6.tEgZenSjJl3dMWZ3mltIQac1uj4j2Z6 XKkGyBk5wRVctD.wPX_zIpQ6asOG0HwP4nGnmPQeh8AlRRfEiGe3S4ygqM4_wfy4CkvIFxIebi7Y 8QcRMF_7bBS_Fot9dbzbaCevD5pawmag2rIpxwVPz9rj38G0Jhn2FK10WeZto.6CPikrPjT71o6u 5zmIOvTG9M7LmkwfM8KnRq7.cW8BMW1EJBmmHSLLwM0.rGq3oGS9j98Or3wHETGz3D_BPWAxxHav Ud_F3xWowaDIHLKRbho0oyNghyLGV7_k_riFN_ThZGOr8lxYoLrliOb2HKJrXwvROIip_tZQ2mZ7 2qUZJ9Pqo_E.8ZvHFzy5tFq_FqL1WKRrujaQoSA.fQRaTjZ49x1YMqOMrK3_gmGM31.WWvCxB4si U5GUNIasJxFo1Shc.Pt2SnidJiT2.48IO245da7Si8wq1GVKr6YhrXpOWiirpCKY33SfgTIIHhxw ULaCsE9.CX2npMJYo5amLxSoF4DXxuRWApV3Yr.yLMfiVu3ncUK8LexiYBnJJ4EzlWSNM0BzviHR BY2ZzYiAyhM5lz.e0IFmR3gIBmwvTcsy21X96SWRWU6g3IwzBuB8ra4Buwbf.qV1QFQ3mVZjbCkI 72bHImslvu7bCeFJoHNwiryRYXIyb_75RQ3WdXMOym.1MpAHUjsC.Z_DcPGFd4WeZ2rpOF9Bfy1N pBGlEAtRmoBo8gMxKSvzGITF6mhKtThL9yJlvoZlp0yCRAmUreRfzLEE20sXCdOPgnmpcEkKBOgF P_7aVjbYzWkqkI_q4WNZjTsG1bwWOvw-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.gq1.yahoo.com with HTTP; Sat, 30 Jun 2018 01:02:20 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp420.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 10f15d5305dd862f0cfb450bf9eee85e; Sat, 30 Jun 2018 01:02:15 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) Subject: Re: head -r335782 (?) broke ci.freebsd.org's FreeBSD-head-amd64-gcc build (lib32 part of build) From: Mark Millard In-Reply-To: <003509F0-F2F4-4A43-82FE-3F6FC23D19D4@yahoo.com> Date: Fri, 29 Jun 2018 18:02:13 -0700 Cc: Bryan Drewery , svn-src-head@freebsd.org, FreeBSD Current Content-Transfer-Encoding: quoted-printable Message-Id: <3010D324-3852-4EFC-BC7C-E4A905A0F665@yahoo.com> References: <00D1127A-1F0E-4E0E-B86C-1C5AA5B2E085@yahoo.com> <7A845F2C-C994-4828-823D-33A97B7B6EB0@yahoo.com> <72081b02-cf23-82ec-32df-7f5793c35f57@FreeBSD.org> <003509F0-F2F4-4A43-82FE-3F6FC23D19D4@yahoo.com> To: John Baldwin X-Mailer: Apple Mail (2.3445.8.2) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jun 2018 01:02:28 -0000 On 2018-Jun-29, at 2:37 PM, Mark Millard wrote: > [I expect this is more than just amd64-gcc related but that is all > that ci.freebsd.org normally builds via a devel/*-gcc .] >=20 > On 2018-Jun-29, at 10:38 AM, John Baldwin wrote: >=20 >> On 6/28/18 7:54 PM, Mark Millard wrote: >>> On 2018-Jun-28, at 6:04 PM, Mark Millard = wrote: >>>=20 >>>> On 2018-Jun-28, at 5:39 PM, Mark Millard = wrote: >>>>=20 >>>> . . . >>>> Later below expand the failing and previoly good commands, one >>>> option per line. The summary of the distinction in content is >>>> a one line difference, the working example ( -r335773 )had the >>>> option: >>>>=20 >>>> -isystem = /workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/include >>>>=20 >>>> but the failing one did not. Working ( -r335773 ) is shown first. >>>>=20 >>>> --- catrigl.o --- >>>> /usr/local/bin/x86_64-unknown-freebsd11.1-gcc >>>> -DCOMPAT_32BIT >>>> -march=3Di686 >>>> -mmmx >>>> -msse >>>> -msse2 >>>> -m32 >>>> -L/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/lib32 >>>> --sysroot=3D/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp >>>> -B/usr/local/x86_64-unknown-freebsd11.1/bin/ >>>> -B/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/lib32 >>>> -isystem = /workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/include >>>> -O2 >>>> -pipe >>>> -I/workspace/src/lib/msun/x86 >>>> -I/workspace/src/lib/msun/ld80 >>>> -I/workspace/src/lib/msun/i387 >>>> -I/workspace/src/lib/msun/src >>>> -I/workspace/src/lib/libc/include >>>> -I/workspace/src/lib/libc/i386 >>>> . . . >>>>=20 >>>> --- catrigl.o --- >>>> /usr/local/bin/x86_64-unknown-freebsd11.1-gcc >>>> -DCOMPAT_32BIT >>>> -march=3Di686 >>>> -mmmx >>>> -msse >>>> -msse2 >>>> -m32 >>>> -L/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/lib32 >>>> --sysroot=3D/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp >>>> -B/usr/local/x86_64-unknown-freebsd11.1/bin/ >>>> -B/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/lib32 >>>> -O2 >>>> -pipe >>>> -I/workspace/src/lib/msun/x86 >>>> -I/workspace/src/lib/msun/ld80 >>>> -I/workspace/src/lib/msun/i387 >>>> -I/workspace/src/lib/msun/src >>>> -I/workspace/src/lib/libc/include=20 >>>> -I/workspace/src/lib/libc/i386 >>>> . . . >>>=20 >>>=20 >>> For the report: >>>=20 >>>> The xtoolchain GCC packages have not required these flags since = ports >>>> commits r465416 and r466701 >>>=20 >>> Looking at = https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/6331/consoleText >>> there is: >>>=20 >>>> Updating FreeBSD repository catalogue... >>>> FreeBSD repository is up to date. >>>> All repositories are up to date. >>>> The following 6 package(s) will be affected (of 0 checked): >>>>=20 >>>> New packages to be INSTALLED: >>>> amd64-xtoolchain-gcc: 0.4_1 >>>> amd64-gcc: 6.4.0 >>>> mpfr: 4.0.1 >>>> gmp: 6.1.2 >>>> mpc: 1.1.0_1 >>>> amd64-binutils: 2.30_3,1 >>>=20 >>> and amd64-gcc being 6.4.0 (via powerpc64-gcc) is from -r466834 >>> (via looking up in https://svnweb.freebsd.org/ports/head/devel/ ). >>>=20 >>> This indicates that -r465416 and -r466701 did not cause: >>>=20 >>> --sysroot=3D/workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp >>>=20 >>> to lead to include files being looked up in: >>>=20 >>> /workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/include >>>=20 >>> Thus there appears to still be a need for: >>>=20 >>> -isystem = /workspace/obj/workspace/src/amd64.amd64/obj-lib32/tmp/usr/include >>>=20 >>> unless more is done to the devel/*-gcc to make them look >>> in that additional place automatically (based on --sysroot). >>=20 >> --sysroot does work, and you can verify it by doing the following: >>=20 >> % touch empty.c >> % x86_64-unknown-freebsd11.2-gcc -c -v empty.c >> Using built-in specs. >> COLLECT_GCC=3Dx86_64-unknown-freebsd11.2-gcc >> Target: x86_64-unknown-freebsd11.2 >> ... >> ignoring nonexistent directory = "/usr/local/lib/gcc/x86_64-unknown-freebsd11.2/6.4.0/include-fixed" >> ignoring nonexistent directory = "/usr/local/lib/gcc/x86_64-unknown-freebsd11.2/6.4.0/../../../../x86_64-un= known-freebsd11.2/include" >> #include "..." search starts here: >> #include <...> search starts here: >> /usr/local/lib/gcc/x86_64-unknown-freebsd11.2/6.4.0/include >> /usr/include >> End of search list. >> ... >> % x86_64-unknown-freebsd11.2-gcc -c -v empty.c --sysroot=3D/foo >> Using built-in specs. >> COLLECT_GCC=3Dx86_64-unknown-freebsd11.2-gcc >> Target: x86_64-unknown-freebsd11.2 >> ... >> ignoring nonexistent directory = "/usr/local/lib/gcc/x86_64-unknown-freebsd11.2/6.4.0/include-fixed" >> ignoring nonexistent directory = "/usr/local/lib/gcc/x86_64-unknown-freebsd11.2/6.4.0/../../../../x86_64-un= known-freebsd11.2/include" >> ignoring nonexistent directory "/foo/usr/include" >> #include "..." search starts here: >> #include <...> search starts here: >> /usr/local/lib/gcc/x86_64-unknown-freebsd11.2/6.4.0/include >> End of search list. >>=20 >> I will see if I can reproduce the failure locally. >=20 > The: >=20 > ignoring nonexistent directory "/foo/usr/include" >=20 > means that the order of the search alternatives was not shown > ("search starts here"). That is what I expect is different. >=20 > It will take a while before I'll have a build from either > before or after the change to show a search order with. > (And longer to have both for comparison.) >=20 > My context is freebsd12.0 . My buildworld buildkernel > context has: >=20 > # more ~/src.configs/make.conf=20 > CFLAGS.gcc+=3D -v >=20 > so my script file for a build is very explicit about the > order. >=20 > I'll be starting from # uname -apKU > FreeBSD FBSDUSSD 12.0-CURRENT FreeBSD 12.0-CURRENT r335245M amd64 = amd64 1200069 1200069 >=20 Here is what head -r335245 got for my build . . . = /usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/obj-lib32/li= b/msun/catrigl.o.meta shows: ignoring nonexistent directory = "/usr/local/lib/gcc/x86_64-unknown-freebsd12.0/6.4.0/include-fixed" ignoring nonexistent directory = "/usr/local/lib/gcc/x86_64-unknown-freebsd12.0/6.4.0/../../../../x86_64-un= known-freebsd12.0/include" ignoring duplicate directory = "/usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/obj-lib32/t= mp/usr/include" #include "..." search starts here: #include <...> search starts here: /usr/src/lib/msun/x86 /usr/src/lib/msun/ld80 /usr/src/lib/msun/i387 /usr/src/lib/msun/src /usr/src/lib/libc/include /usr/src/lib/libc/i386 = /usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/obj-lib32/tm= p/usr/include /usr/local/lib/gcc/x86_64-unknown-freebsd12.0/6.4.0/include End of search list. It will be some time before I have an attempted build of -r335782 or later to compare such with. But the above found FreeBSD's: # ls -lT = /usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/obj-lib32/tm= p/usr/include/float.h=20 lrwxr-xr-x 1 root wheel 15 Jun 29 16:27:34 2018 = /usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/obj-lib32/tm= p/usr/include/float.h -> machine/float.h # ls -lT = /usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/obj-lib32/tm= p/usr/include/machine/float.h -rwxr-xr-x 1 root wheel 151 Nov 3 02:27:25 2016 = /usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/obj-lib32/tm= p/usr/include/machine/float.h instead of: # ls -lT = /usr/local/lib/gcc/x86_64-unknown-freebsd12.0/6.4.0/include/float.h=20 -rw-r--r-- 1 root wheel 8729 May 26 05:05:37 2018 = /usr/local/lib/gcc/x86_64-unknown-freebsd12.0/6.4.0/include/float.h =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Sat Jun 30 01:03:00 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-head@freebsd.org Sat Jun 30 01:04:38 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-head@freebsd.org Sat Jun 30 01:20:00 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F53AFDDD18; Sat, 30 Jun 2018 01:20:00 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-pg0-f51.google.com (mail-pg0-f51.google.com [74.125.83.51]) (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 E197E84974; Sat, 30 Jun 2018 01:19:59 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-pg0-f51.google.com with SMTP id n15-v6so1444004pgv.4; Fri, 29 Jun 2018 18:19:59 -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:in-reply-to:references:from:date :message-id:subject:to:cc; bh=eD7t1Z8opqcesVGKuPnig4TspTzTJ1Q6Rp1EReGaQCc=; b=A7eEKUHS5XYkDxKSykSLgOba2lcUqDnJaKuzOE9lNYsrg+cKL0udzUkrpVn7Sn8aXK r/qRF0wfiLmkYQXvS/KC9Md/TUH26zOKgkAj7VZ7s+SsSfaP3GTXZ7kYahnLtusgQKNc QZVdPZyr+7s/AvJc5o14CIDAhzhgUNvK+YBnJIA6L4QmxE3KPOAsDiUttzkG1R59dOdK o748yRs8+sHL79H+pZRR+JSTV0JP5YjoljnFcGPxIkR7+d0Zsx6YgsXy1WHgVQVdXzPq UMoxuehVMPURTMh6lk/RViGZpkYydrMBAVDeD+48DdV9GyWkh0fy0sjNFUu+IcerJidR Pb/Q== X-Gm-Message-State: APt69E28q6WV8IjJPUlOHWN5KXJfs3jpayNTKKjdjUTu+cf8dS987zwl RG00qHlQA196KkA/C/4wIBuyC2+28C0= X-Google-Smtp-Source: AAOMgpeP2E5m4ufls7DjSaLQDZwqCk/GM9vsjUnNdwJuOQkuUQEAoPhNMdIg9+Vy2sA1944Obs22DQ== X-Received: by 2002:a62:930c:: with SMTP id b12-v6mr16365461pfe.193.1530317437783; Fri, 29 Jun 2018 17:10:37 -0700 (PDT) Received: from mail-pl0-f54.google.com (mail-pl0-f54.google.com. [209.85.160.54]) by smtp.gmail.com with ESMTPSA id 15-v6sm16937509pfq.81.2018.06.29.17.10.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Jun 2018 17:10:37 -0700 (PDT) Received: by mail-pl0-f54.google.com with SMTP id 30-v6so5167572pld.13; Fri, 29 Jun 2018 17:10:37 -0700 (PDT) X-Received: by 2002:a17:902:8d91:: with SMTP id v17-v6mr17117928plo.9.1530317437496; Fri, 29 Jun 2018 17:10:37 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a17:90a:1581:0:0:0:0 with HTTP; Fri, 29 Jun 2018 17:10:36 -0700 (PDT) In-Reply-To: References: <00D1127A-1F0E-4E0E-B86C-1C5AA5B2E085@yahoo.com> <7A845F2C-C994-4828-823D-33A97B7B6EB0@yahoo.com> From: Ryan Libby Date: Fri, 29 Jun 2018 17:10:36 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: head -r335782 (?) broke ci.freebsd.org's FreeBSD-head-amd64-gcc build (lib32 part of build) To: John Baldwin Cc: Mark Millard , Bryan Drewery , svn-src-head@freebsd.org, FreeBSD Current Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jun 2018 01:20:00 -0000 [Re-sending from my subscription address, sorry for the spam] On Fri, Jun 29, 2018 at 1:26 PM, John Baldwin wrote: > On 6/28/18 7:54 PM, Mark Millard wrote: >> On 2018-Jun-28, at 6:04 PM, Mark Millard wrote: >> >>> On 2018-Jun-28, at 5:39 PM, Mark Millard wrote: >>> >>>> [ ci.free.bsd.org jumped from -r335773 (built) to -r335784 (failed) >>>> for FreeBSD-head-amd64-gcc. It looked to me like the most likely >>>> breaking-change was the following but I've not tried personal >>>> builds to confirm. >>>> ] > > So this is a bit complicated and I'm not sure what the correct fix is. > > What is happening is that the shipped with GCC is now being used > after this change instead of sys/x86/include/float.h. A sledgehammer approach > would be to remove float.h from the GCC package (we currently don't install > the float.h for the base system clang either). However, looking at this > in more detail, it seems that x86/include/float.h is also busted in some > ways. > > First, the #error I don't understand how it is happening. The GCC float.h > defines LDBL_MAX_EXP to the __LDBL_MAX_EXP__ builtin which is 16384 just > like the x86 float.h: > > # x86_64-unknown-freebsd12.0-gcc -dM -E empty.c -m32 | grep LDBL_MAX_EXP > #define __LDBL_MAX_EXP__ 16384 > > I even hacked catrigl.c to add the following lines before the #error > check: > > LDBL_MAX_EXP_ = LDBL_MAX_EXP > LDBL_MANT_DIG_ = LDBL_MANT_DIG > > #if LDBL_MAX_EXP != 0x4000 > #error "Unsupported long double format" > #endif > > And the -E output is: > > DBL_MAX_EXP_ = 16384 > LDBL_MANT_DIG_ = 53 > > # 51 "/zoo/jhb/zoo/jhb/git/freebsd/lib/msun/src/catrigl.c:93:2: error: #error "U > nsupported long double format" > #error "Unsupported long double format" > ^~~~~ > > Yet clearly, 16384 == 0x4000 assuming it is doing a numeric comparison (which > it must be since the x86 float.h uses '16384' not '0x4000' as the value). > Isn't this just the unsupported LDBL_MANT_DIG you're hitting here? Note line 93. I reused the same error message for LDBL_MAX_EXP :/ > However, LDBL_MANT_DIG of 53 is a bit more fun. We have a comment about the > initial FPU control word in sys/amd64/include/fpu.h that reads thus: > > /* > * The hardware default control word for i387's and later coprocessors is > * 0x37F, giving: > * > * round to nearest > * 64-bit precision > * all exceptions masked. > * > * FreeBSD/i386 uses 53 bit precision for things like fadd/fsub/fsqrt etc > * because of the difference between memory and fpu register stack arguments. > * If its using an intermediate fpu register, it has 80/64 bits to work > * with. If it uses memory, it has 64/53 bits to work with. However, > * gcc is aware of this and goes to a fair bit of trouble to make the > * best use of it. > * > * This is mostly academic for AMD64, because the ABI prefers the use > * SSE2 based math. For FreeBSD/amd64, we go with the default settings. > */ > #define __INITIAL_FPUCW__ 0x037F > #define __INITIAL_FPUCW_I386__ 0x127F > #define __INITIAL_NPXCW__ __INITIAL_FPUCW_I386__ > #define __INITIAL_MXCSR__ 0x1F80 > #define __INITIAL_MXCSR_MASK__ 0xFFBF > > GCC is indeed aware of this in gcc/config/i386/freebsd.h which results in > __LDBL_MANT_DIG__ being set to 53 instead of 64: > > /* FreeBSD sets the rounding precision of the FPU to 53 bits. Let the > compiler get the contents of and std::numeric_limits correct. */ > #undef TARGET_96_ROUND_53_LONG_DOUBLE > #define TARGET_96_ROUND_53_LONG_DOUBLE (!TARGET_64BIT) > > clang seems unaware of this as it reports all the same values for > LDBL_MIN/MAX for both amd64 and i386 (values that match GCC for amd64 > but not i386): > > # cc -dM -E empty.c | egrep 'LDBL_(MIN|MAX)__' > #define __LDBL_MAX__ 1.18973149535723176502e+4932L > #define __LDBL_MIN__ 3.36210314311209350626e-4932L > # cc -dM -E empty.c -m32 | egrep 'LDBL_(MIN|MAX)__' > #define __LDBL_MAX__ 1.18973149535723176502e+4932L > #define __LDBL_MIN__ 3.36210314311209350626e-4932L > # x86_64-unknown-freebsd12.0-gcc -dM -E empty.c | egrep 'LDBL_(MIN|MAX)__' > #define __LDBL_MAX__ 1.18973149535723176502e+4932L > #define __LDBL_MIN__ 3.36210314311209350626e-4932L > # x86_64-unknown-freebsd12.0-gcc -dM -E empty.c -m32 | egrep 'LDBL_(MIN|MAX)__' > #define __LDBL_MAX__ 1.1897314953572316e+4932L > #define __LDBL_MIN__ 3.3621031431120935e-4932L > > The x86/include/float.h header though reports the MIN/MAX values somewhere > in between the two ranges for both amd64 and i386 while reporting an > LDBL_MANT_DIG of 64: > > #define LDBL_MANT_DIG 64 > #define LDBL_MIN 3.3621031431120935063E-4932L > #define LDBL_MAX 1.1897314953572317650E+4932L > > I guess for now I will remove float.h from the amd64-gcc pkg-plist, but we > should really be fixing our tree to work with compiler-provided language > headers when at all possible. It's not clear to me if amd64 should be > using the compiler provided values of things like LDBL_MIN/MAX either btw. > > -- > John Baldwin > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" The whole situation is a little messed up. LDBL_MAX, LDBL_MIN, and LDBL_MANT_DIG are IMHO broken by design, because they are just the defaults. User code can change the mode, and then the constants necessarily yield weird things, like max - epsilon becoming infinity, or not actually being the maximum possible finite value. It's difficult for code to use them correctly--which was why I removed references to LDBL_MAX in [1]. Some general background on that aspect here [2]. [1] https://svnweb.freebsd.org/base?view=revision&revision=323003 [2] https://lists.freebsd.org/pipermail/freebsd-numerics/2012-September/000288.html From owner-svn-src-head@freebsd.org Sat Jun 30 04:30:09 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-head@freebsd.org Sat Jun 30 10:04:46 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-head@freebsd.org Sat Jun 30 12:04:55 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-head@freebsd.org Sat Jun 30 12:14:21 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-head@freebsd.org Sat Jun 30 12:51:09 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-head@freebsd.org Sat Jun 30 13:22:34 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B200B102FEAB for ; Sat, 30 Jun 2018 13:22:34 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic307-8.consmr.mail.gq1.yahoo.com (sonic307-8.consmr.mail.gq1.yahoo.com [98.137.64.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C2D47D9E7 for ; Sat, 30 Jun 2018 13:22:33 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: OxQmL2EVM1mCriugJK3j36WMW7l4ylh0m6lA1LVhSLrrnyBh1mtt8DMOWfa_MEq fHZJBEg3EEQjS5v8Tn6iFzO.lxMKBwlzFdWjDx6jU_eExr.hLHB4CeOGUYn7_zgQtp_krTgWbJO. Sfccqf32sj33pH38MVY62e7pbYdXauP2cMnAxaWlCcldf9dEqMRCSgu.YkU.Ei36PYwiW7BKiTDS j04FVarFHzoM7UrpNq7BhcGIzz1qQIWJItBJjCGfUdz2W4xgLwH9K_0IbProbneBhvp431OKvlEk YpKExiG_g6cFL1oEDu1RQ0MS6tstmPV4uw8dpqYTFfZKFWI5cM7tm93NBffIGWc9SQxLdoRvaCmP dcgJzmsWnQqzeV4GcWQlfVT_yI5wiAU9Ys1ebG0rNLkmmGH7yPcd_mydyhIiBK6gk7K2cLdEV204 nyqRBJFzB7xy6Ax76XI_.quZZajlFAP1A__BpTYbQ8H1KC80Eg6uQk6pl7QsCw8iS3H83cOs15oQ F51rG78m9y1NzWUiW6imIk85VLKesPJLM7eZD1f_a09AC8lgrBBivCyuf9NBgttZ1ql_zTVhv9Ms ZA6YFpMhfsiPKPG_uiwwSaPnkOEZCBg5av4_rpOP64.CvJeq8BxnPJWpllWcz8dD.Nzm5QqsExh3 Bxa0SwUP7MZFU2IBk6VHE3I9v6aUXxWsH1KfG52RzJyqJeNoDl8rISVd44hjW8nmCdFf6bZyBbFU NXrsvRzzabJn4.fGFcvOFHssIij..MArK.ZrvtozbFalq70.ALpgnB6rDUoqqbWYkFoBlV9H4blu JrrDFwSUJ_Jd02gldK_DsDCCsMg6iCdY2GSq7yhChz5M.nDertkhad_U.dioyA8Tg2ipxWhQ4PyT NkIBt4CWwWWvCWDSZeh7vb_jMKBsqnhZjeQ..faGS.t0.ROCxsOxGbwwfLGiySQAEcU39bf2LAmC 4bE6jS9KRH75AtuTSYz1OFmA- Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.gq1.yahoo.com with HTTP; Sat, 30 Jun 2018 13:22:27 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp407.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID f17f94342df0209c6deaf38635825644; Sat, 30 Jun 2018 13:22:26 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) Subject: Re: svn commit: r335813 [ broke ci.freebsd.org 's FreeBSD-head-{aarch64,amd64,i386}-build ] Message-Id: <84175A6B-B159-4320-95FD-C5BC7F3B4C96@yahoo.com> Date: Sat, 30 Jun 2018 06:22:25 -0700 To: Dimitry Andric , svn-src-head@freebsd.org, FreeBSD Current X-Mailer: Apple Mail (2.3445.8.2) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jun 2018 13:22:35 -0000 https://ci.freebsd.org/job/FreeBSD-head-aarch64-build/8358/consoleText --- all_subdir_armv8crypto --- /usr/src/sys/crypto/armv8/armv8_crypto_wrap.c:46:10: fatal error: = 'arm_neon.h' file not found #include ^~~~~~~~~~~~ 1 error generated. *** [armv8_crypto_wrap.o] Error code 1 https://ci.freebsd.org/job/FreeBSD-head-amd64-build/9268/consoleText --- lib/liblzma__L --- In file included from = /usr/src/contrib/xz/src/liblzma/lz/lz_encoder.c:23: /usr/src/contrib/xz/src/liblzma/common/memcmplen.h:19:11: fatal error: = 'immintrin.h' file not found # include ^~~~~~~~~~~~~ 1 error generated. *** [lz_encoder.o] Error code 1 https://ci.freebsd.org/job/FreeBSD-head-i386-build/8370/consoleText --- aesni_ghash.o --- cc -target i386-unknown-freebsd12.0 = --sysroot=3D/usr/obj/usr/src/i386.i386/tmp = -B/usr/obj/usr/src/i386.i386/tmp/usr/bin -c -O3 -pipe = -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE = -DHAVE_KERNEL_OPTION_HEADERS -include = /usr/obj/usr/src/i386.i386/sys/GENERIC/opt_global.h -I. -I/usr/src/sys = -I/usr/src/sys/contrib/ck/include -fno-common -g = -I/usr/obj/usr/src/i386.i386/sys/GENERIC -mno-mmx -mno-sse -msoft-float = -ffreestanding -fwrapv -fstack-protector -gdwarf-2 -Wall = -Wredundant-decls -Wnested-externs -Wstrict-prototypes = -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef = -Wno-pointer-sign -D__printf__=3D__freebsd_kprintf__ = -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas = -Wno-error-tautological-compare -Wno-error-empty-body = -Wno-error-parentheses-equality -Wno-error-unused-function = -Wno-error-pointer-sign -Wno-error-shift-negative-value = -Wno-address-of-packed-member -Wno-error-cast-qual -mno-aes -mno-avx = -std=3Diso9899:1999 -Werror -mmmx -msse -msse4 -maes -mpclmul = /usr/src/sys/crypto/aesni/aesni_ghash.c /usr/src/sys/crypto/aesni/aesni_ghash.c:75:10: fatal error: = 'wmmintrin.h' file not found #include ^~~~~~~~~~~~~ 1 error generated. *** [aesni_ghash.o] Error code 1 =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Sat Jun 30 13:58:51 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 626AC1030FC8; Sat, 30 Jun 2018 13:58:51 +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 DF4637E7AD; Sat, 30 Jun 2018 13:58:50 +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 EC9E3D5BC; Sat, 30 Jun 2018 15:58:48 +0200 (CEST) From: Dimitry Andric Message-Id: <082D396D-639C-445F-A04E-5C56F219D177@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_255F8461-A9AA-411D-BFBD-91EED23ED1AA"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) Subject: Re: svn commit: r335813 [ broke ci.freebsd.org 's FreeBSD-head-{aarch64,amd64,i386}-build ] Date: Sat, 30 Jun 2018 15:58:36 +0200 In-Reply-To: <84175A6B-B159-4320-95FD-C5BC7F3B4C96@yahoo.com> Cc: svn-src-head@freebsd.org, FreeBSD Current To: Mark Millard References: <84175A6B-B159-4320-95FD-C5BC7F3B4C96@yahoo.com> X-Mailer: Apple Mail (2.3445.8.2) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jun 2018 13:58:51 -0000 --Apple-Mail=_255F8461-A9AA-411D-BFBD-91EED23ED1AA Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 30 Jun 2018, at 15:22, Mark Millard wrote: >=20 > https://ci.freebsd.org/job/FreeBSD-head-aarch64-build/8358/consoleText >=20 > --- all_subdir_armv8crypto --- > /usr/src/sys/crypto/armv8/armv8_crypto_wrap.c:46:10: fatal error: = 'arm_neon.h' file not found > #include > ^~~~~~~~~~~~ > 1 error generated. > *** [armv8_crypto_wrap.o] Error code 1 >=20 >=20 > https://ci.freebsd.org/job/FreeBSD-head-amd64-build/9268/consoleText >=20 > --- lib/liblzma__L --- > In file included from = /usr/src/contrib/xz/src/liblzma/lz/lz_encoder.c:23: > /usr/src/contrib/xz/src/liblzma/common/memcmplen.h:19:11: fatal error: = 'immintrin.h' file not found > # include > ^~~~~~~~~~~~~ > 1 error generated. > *** [lz_encoder.o] Error code 1 Yeah, sorry about that, working on it now. I'm awaiting a full build to see if there are any other issues. -Dimitry --Apple-Mail=_255F8461-A9AA-411D-BFBD-91EED23ED1AA 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 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCWzeMjAAKCRCwXqMKLiCW oz8IAKDxNVFQXCyzXvPSE5XRWLLjEjGdTQCfZbgvC2KcRs0MQUY5V3cNiMaPgv8= =KdEl -----END PGP SIGNATURE----- --Apple-Mail=_255F8461-A9AA-411D-BFBD-91EED23ED1AA-- From owner-svn-src-head@freebsd.org Sat Jun 30 14:51:53 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7828B1032EE7; Sat, 30 Jun 2018 14:51:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (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 20C4180573; Sat, 30 Jun 2018 14:51:53 +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 BDDFE10AFCD; Sat, 30 Jun 2018 10:51:51 -0400 (EDT) Subject: Re: head -r335782 (?) broke ci.freebsd.org's FreeBSD-head-amd64-gcc build (lib32 part of build) To: Mark Millard References: <00D1127A-1F0E-4E0E-B86C-1C5AA5B2E085@yahoo.com> <7A845F2C-C994-4828-823D-33A97B7B6EB0@yahoo.com> <72081b02-cf23-82ec-32df-7f5793c35f57@FreeBSD.org> <003509F0-F2F4-4A43-82FE-3F6FC23D19D4@yahoo.com> Cc: Bryan Drewery , svn-src-head@freebsd.org, FreeBSD Current From: John Baldwin Message-ID: <65b19cc4-eaf0-13ed-43e6-9f04a1f7f196@FreeBSD.org> Date: Sat, 30 Jun 2018 07:51:59 -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: <003509F0-F2F4-4A43-82FE-3F6FC23D19D4@yahoo.com> Content-Type: text/plain; charset=utf-8 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); Sat, 30 Jun 2018 10:51:52 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jun 2018 14:51:53 -0000 On 6/29/18 2:37 PM, Mark Millard wrote: > [I expect this is more than just amd64-gcc related but that is all > that ci.freebsd.org normally builds via a devel/*-gcc .] As indicated by my other mail, this is i386 and amd64 specific as it only matters for float.h on i386 due to the disagreement on LDBL_MANT_DIG. -- John Baldwin From owner-svn-src-head@freebsd.org Sat Jun 30 15:03:24 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-head@freebsd.org Sat Jun 30 16:17:26 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB11A1038005 for ; Sat, 30 Jun 2018 16:17:26 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic302-3.consmr.mail.bf2.yahoo.com (sonic302-3.consmr.mail.bf2.yahoo.com [74.6.135.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CBBAB83215 for ; Sat, 30 Jun 2018 16:17:25 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: pGSt4RkVM1lCvHUZlypj94lLqhPMdx01CrPywH937XUxxwY8jGJi2kgXZhHNpFY 6QJS.H_Hx1p.nRmRXHx0Yiwg1rUkAxTEXkjzgQYKZQDZa65H69i59ZDAm6TReI.LIa1y4XUcfpWn x2QjNxb6X5z9UUDwycpYuf10ksoNE8zJzJo_m7XJvoAQIgyV58blHCHoVpvzhjsFSvRtvp4mPgi. RPALnBpI.dtCPe2MP8RdngDxjGH7tZd2edGiCmZxYA9pJCxSp.YF2jVNZCi8l3l6Ms8LRp0hV6Pd sD4oaxZKpHZFYGKTFxZjDJLQuBZXMeBUSQ0HuXhBa8MVCIGpxim9.CEQRkHUfUciCFs4a78SXaBV i9lzUp9ZtvBlvVkh7dE55ZHAzZygJca7P5rIHC4p653FsxJikHFf.z38rs5PpcKeihkJuNs9hnZN XjeBgBHzh4ar.uW745NRBbI1Xe.jOJe8IpJXeiacAyKRtOW9hynvbyTsrPXd7Ds8KRn2iwkdmldk 1JTC2QdLkVK27EuTj0Wz8hGxba0DmBIR4FrZb1oHTmbHQb9M2fGISDFlaUVf4Px6ukAx0AMCA_0J IscZx_0FvcV_r14OKPFovkkAnSOYmPlseZk4.WWxtd1xlqlfbXlDxHlB8lvgxui4YySczy1P.i3M XPpvfmr4foldylaa63pcpfSkIPreCW4XizbR_uyZreT8LyA8ZVPgo9niSpJTyqnIkKMhjV9d1709 5bJGHruhwPTVARKoyWOKISa9CbHCZ6lX36.rBqIhKbWjzjKoxAl0puUHrASTnuW6OykSJzO5_u80 7ksOWDhMzISGod3wihIK8e5UAY.MTRoAshrKqkXlW6C44SUJZe9SBGH7hMFj7nUXA6RDpepbeMGa .tTl1WtSfrmmdhv7TzDTtvsHT9incknqzOdXsrS089yW1Hj9uddvsqH__mUiZnoeB76MHJs6LS_c 32ARV7FKxjk0dCkte6W6WnSsC137TEXdswwrvrOc- Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.bf2.yahoo.com with HTTP; Sat, 30 Jun 2018 16:17:24 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp427.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 50f1d279f5af2185a20f90ae09f34b8c; Sat, 30 Jun 2018 16:17:24 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) Subject: Re: head -r335782 (?) broke ci.freebsd.org's FreeBSD-head-amd64-gcc build (lib32 part of build) From: Mark Millard In-Reply-To: <65b19cc4-eaf0-13ed-43e6-9f04a1f7f196@FreeBSD.org> Date: Sat, 30 Jun 2018 09:17:21 -0700 Cc: Bryan Drewery , svn-src-head@freebsd.org, FreeBSD Current Content-Transfer-Encoding: quoted-printable Message-Id: References: <00D1127A-1F0E-4E0E-B86C-1C5AA5B2E085@yahoo.com> <7A845F2C-C994-4828-823D-33A97B7B6EB0@yahoo.com> <72081b02-cf23-82ec-32df-7f5793c35f57@FreeBSD.org> <003509F0-F2F4-4A43-82FE-3F6FC23D19D4@yahoo.com> <65b19cc4-eaf0-13ed-43e6-9f04a1f7f196@FreeBSD.org> To: John Baldwin , Dimitry Andric X-Mailer: Apple Mail (2.3445.8.2) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jun 2018 16:17:27 -0000 On 2018-Jun-30, at 7:51 AM, John Baldwin wrote: > On 6/29/18 2:37 PM, Mark Millard wrote: >> [I expect this is more than just amd64-gcc related but that is all >> that ci.freebsd.org normally builds via a devel/*-gcc .] >=20 > As indicated by my other mail, this is i386 and amd64 specific as it > only matters for float.h on i386 due to the disagreement on > LDBL_MANT_DIG. I was correct about the search order for include files being different before -r335782 vs. -r335782 and later: head -r335812 uses the gcc headers (and fails): ignoring nonexistent directory = "/usr/local/lib/gcc/x86_64-unknown-freebsd12.0/6.4.0/include-fixed" ignoring nonexistent directory = "/usr/local/lib/gcc/x86_64-unknown-freebsd12.0/6.4.0/../../../../x86_64-un= known-freebsd12.0/include" #include "..." search starts here: #include <...> search starts here: /usr/src/lib/msun/x86 /usr/src/lib/msun/ld80 /usr/src/lib/msun/i387 /usr/src/lib/msun/src /usr/src/lib/libc/include /usr/src/lib/libc/i386 /usr/local/lib/gcc/x86_64-unknown-freebsd12.0/6.4.0/include = /usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/obj-lib32/tm= p/usr/include End of search list. head -r335245 uses the FreeBSD headers and works: ignoring nonexistent directory = "/usr/local/lib/gcc/x86_64-unknown-freebsd12.0/6.4.0/include-fixed" ignoring nonexistent directory = "/usr/local/lib/gcc/x86_64-unknown-freebsd12.0/6.4.0/../../../../x86_64-un= known-freebsd12.0/include" ignoring duplicate directory = "/usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/obj-lib32/t= mp/usr/include" #include "..." search starts here: #include <...> search starts here: /usr/src/lib/msun/x86 /usr/src/lib/msun/ld80 /usr/src/lib/msun/i387 /usr/src/lib/msun/src /usr/src/lib/libc/include /usr/src/lib/libc/i386 = /usr/obj/amd64_xtoolchain-gcc/amd64.amd64/usr/src/amd64.amd64/obj-lib32/tm= p/usr/include /usr/local/lib/gcc/x86_64-unknown-freebsd12.0/6.4.0/include End of search list. Might this reversal have other effects even for architectures for which the code does compile via devel/*-gcc ? =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Sat Jun 30 16:29:14 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A101A10398BF; Sat, 30 Jun 2018 16:29:14 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (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 3388B83847; Sat, 30 Jun 2018 16:29:14 +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 2E30510A87D; Sat, 30 Jun 2018 12:29:12 -0400 (EDT) Subject: Re: head -r335782 (?) broke ci.freebsd.org's FreeBSD-head-amd64-gcc build (lib32 part of build) To: Mark Millard , Dimitry Andric References: <00D1127A-1F0E-4E0E-B86C-1C5AA5B2E085@yahoo.com> <7A845F2C-C994-4828-823D-33A97B7B6EB0@yahoo.com> <72081b02-cf23-82ec-32df-7f5793c35f57@FreeBSD.org> <003509F0-F2F4-4A43-82FE-3F6FC23D19D4@yahoo.com> <65b19cc4-eaf0-13ed-43e6-9f04a1f7f196@FreeBSD.org> Cc: Bryan Drewery , svn-src-head@freebsd.org, FreeBSD Current From: John Baldwin Message-ID: Date: Sat, 30 Jun 2018 09:29:19 -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: Content-Type: text/plain; charset=utf-8 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); Sat, 30 Jun 2018 12:29:12 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jun 2018 16:29:14 -0000 On 6/30/18 9:17 AM, Mark Millard wrote: > On 2018-Jun-30, at 7:51 AM, John Baldwin wrote: > >> On 6/29/18 2:37 PM, Mark Millard wrote: >>> [I expect this is more than just amd64-gcc related but that is all >>> that ci.freebsd.org normally builds via a devel/*-gcc .] >> >> As indicated by my other mail, this is i386 and amd64 specific as it >> only matters for float.h on i386 due to the disagreement on >> LDBL_MANT_DIG. > > I was correct about the search order for include files being > different before -r335782 vs. -r335782 and later: Yes, but this is kind of a feature, not a bug, and the issue there is that as much as possible we should allow FreeBSD to work with the standard headers that are supposed to be part of the language (and thus provided by the toolchain). Right now we don't ship any of the 'std*.h' headers clang provides for example in our base system clang, though a few months ago I fixed the one place that was using instead of in userland that was breaking the use of the toolchain-provided stdarg.h (both GCC and clang). > Might this reversal have other effects even for > architectures for which the code does compile > via devel/*-gcc ? It depends on the header. This particular failure is due to a quirk of on FreeBSD/i386. I have built other platforms with external GCC just fine. To the extent that we encounter any other issues we should try to make our source more conformant with C and only fall back to axeing the toolchain-provided language headers as a last resort. -- John Baldwin From owner-svn-src-head@freebsd.org Sat Jun 30 17:05:04 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94D85BB5 for ; Sat, 30 Jun 2018 17:05:04 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic306-20.consmr.mail.gq1.yahoo.com (sonic306-20.consmr.mail.gq1.yahoo.com [98.137.68.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 150AF84CA1 for ; Sat, 30 Jun 2018 17:05:04 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: XeMX4HgVM1lRZ7liL7rVIPGTquJSZscRE5dNnhy9axojtLxx8X1JTq_eNdNzZIu OGlodgEFSXt5UN8ZOBCqGXkdF0mx78sXmjZ2hdhaCoSf1jpIU8Em_T4bnqm4VRvCdxm7r.ecmw2W 0Yx1c78Fl5FC8Bz1BAhEXrlGudgxZGfauKwxQ9ztruUMLot_1xowidWNgrdbtqDJXlFxXjnu8P5r TpW2l67C0hX_gSfABgIqhJ.J2ozGZ07_m2CMWusM5WD5n1AVWdJ8YwbGLI2VOzzPXReKcLyqb.fO ULpfcMCU6A0Ml31JEaFwz8GoZjjBEYhOz64nWZmxZoXdRg7WQDb_5.q4BqAknGBkLc8TehPsGIMs FCdzec3UXcD0qsJAXFarfn4sDNPdk3CYoatfLf8KSiOTeR0vyWPP6ZN7ykGHqpJStgSE4u_N4hS5 q6EJtLLeEbqMD8z9MvfK5EZP0fRh00untUTcT4NwNzyCwfJa4ZAKG7bQKXyf0qb.OykNTThLm2kn Ae.Ac157uuDVfsok6JmlDAUtRL02ZVq7NeSyZ2Ftn7boaBRDnxfHnWqFXQgmSVWnktYun0crLdex UVIqwtCx5qMp8iJUwNIgDqmscEHe0uMVHyogb7X8wjej.u7eYbg38psk4xEJHGl_XnVGNXpSawSM yTfwKHwIyiz8LfLJj8NuMWdP0XDpGT.4wHcVmmeRN8t7zKdL0fcM_ba6s_P5D70._7lTCpz.tO1J z7mSohpuW9mJxyDOPF1YLspiCX.P9YhoOp8.qOmIbeAvDpiBKdxnfiGhyyBEhvJTMbPF388.J3lC n9gT432tgjH0CzJ1879xxq61QDiUAAGUEkeKHer1h_PWaiMPcxTcz2z097r1NSKS7rG1VebLHoml LArxt5fAbqDd7y6kcftDibSoIXJo4MVDUWt6LY6RXDOj4t9nCaqR7svzcyOwAAone3w_2LEp7L31 Gb2Rt6CBfMY4reDFGwRV2pvXSnuSElQV6 Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.gq1.yahoo.com with HTTP; Sat, 30 Jun 2018 17:04:56 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp418.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID f284a0a421dafd545100c752ffb27663; Sat, 30 Jun 2018 17:04:53 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) Subject: Re: head -r335782 (?) broke ci.freebsd.org's FreeBSD-head-amd64-gcc build (lib32 part of build) From: Mark Millard In-Reply-To: Date: Sat, 30 Jun 2018 10:04:51 -0700 Cc: Dimitry Andric , Bryan Drewery , svn-src-head@freebsd.org, FreeBSD Current Content-Transfer-Encoding: quoted-printable Message-Id: <49BF6569-96A9-4104-BDE6-8BB94C0D9626@yahoo.com> References: <00D1127A-1F0E-4E0E-B86C-1C5AA5B2E085@yahoo.com> <7A845F2C-C994-4828-823D-33A97B7B6EB0@yahoo.com> <72081b02-cf23-82ec-32df-7f5793c35f57@FreeBSD.org> <003509F0-F2F4-4A43-82FE-3F6FC23D19D4@yahoo.com> <65b19cc4-eaf0-13ed-43e6-9f04a1f7f196@FreeBSD.org> To: John Baldwin X-Mailer: Apple Mail (2.3445.8.2) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jun 2018 17:05:04 -0000 On 2018-Jun-30, at 9:29 AM, John Baldwin wrote: > On 6/30/18 9:17 AM, Mark Millard wrote: >> On 2018-Jun-30, at 7:51 AM, John Baldwin wrote: >>=20 >>> On 6/29/18 2:37 PM, Mark Millard wrote: >>>> [I expect this is more than just amd64-gcc related but that is all >>>> that ci.freebsd.org normally builds via a devel/*-gcc .] >>>=20 >>> As indicated by my other mail, this is i386 and amd64 specific as it >>> only matters for float.h on i386 due to the disagreement on >>> LDBL_MANT_DIG. >>=20 >> I was correct about the search order for include files being >> different before -r335782 vs. -r335782 and later: >=20 > Yes, but this is kind of a feature, not a bug, and the issue there is = that > as much as possible we should allow FreeBSD to work with the standard = headers > that are supposed to be part of the language (and thus provided by the > toolchain). Right now we don't ship any of the 'std*.h' headers clang > provides for example in our base system clang, though a few months ago = I > fixed the one place that was using instead of > in userland that was breaking the use of the = toolchain-provided > stdarg.h (both GCC and clang). >=20 >> Might this reversal have other effects even for >> architectures for which the code does compile >> via devel/*-gcc ? >=20 > It depends on the header. This particular failure is due to a quirk = of > on FreeBSD/i386. I have built other platforms with external > GCC just fine. To the extent that we encounter any other issues we > should try to make our source more conformant with C and only fall = back to > axeing the toolchain-provided language headers as a last resort. It is too bad that the review https://reviews.freebsd.org/D16055 did not catch the change in what headers are used by buildworld and buildkernel. I'd view such switching of long established header bindings as a fairly big deal, possibly even warranting being explicitly proposed and debated. I'm not claiming my opinion on which search order that I have is actually relevant. I'm just now nervous about my powerpc64-gcc based builds having unexpected differences, for example. [I sometimes explore the status of powerpc family builds via more modern toolchains.] (But lib32 for powerpc64 via modern gcc's is messed up anyway, generating code in crtbeginS.o for the wrong ABI: using R30 incorrectly. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206123 has more = about that.) =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Sat Jun 30 17:19:36 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6B7DDFD05D5 for ; Sat, 30 Jun 2018 17:19:36 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic305-21.consmr.mail.ne1.yahoo.com (sonic305-21.consmr.mail.ne1.yahoo.com [66.163.185.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E2A1185336 for ; Sat, 30 Jun 2018 17:19:35 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: Xt_DqMoVM1l_bXXQbL7opZX8yHE4ysXbHpB.KhBDQzxRDVSFeEFGAyL6w5l5bJ_ HZpEJLlULyPEcAga4Rw.4qbMtRKWuggCzye2sFaAzPSdkIPsOxdOZqa_VjZ8Avs9J.ufhcwHXsTz Er3pAEuTa6r5a..VZy5PvzW7Ka1XBNvurJHE9mpzb0nx4UHPot4uZiAScj0PP0lh3XgxrYN9cR6H 9ICQtk4IEUyccm0xF1LLcV53kadiPeIGNX1ZxcPsLxj_ROKM9YC9ygsSE2PlbNMt0IAJohxl_hLh YKowHf9GDoo..uoz.i1OMG9OXTdq4MCVLfHltmHcpI5FhexmEjs1o617FQc_O1qN5LQTlDlwJ9WZ T1MB6G0erN1EpDo28OovK.AUyEv8dnZbDLLye5LlOz6IwXtlR.ETGE4w3cFdfrMh1cA_6uX.KLpi lHyP_lyGH5tUbtMxogiCZs2NDUa0i1OSX2LFoxap0K8nYWT9_6zIOorRBRMSG4ywezrYLN0eRDDH C8UC9PMWZqlA2YjaTiw0LFFn5wfZXuQx5ZTuYK_DWo2AH6i.Lzn4LbUjd7paKC6r1MVC1cT8hRUm gN6Kmtx.ZXN48NwEI.KylSCH_viUpw_pMK1Wv9.ZmHZnajO5k8FuiJtd48PtWglIYSe1GShD6_PU C8svR5.0NUic0ylXmPT9iDw.Rb6qq4pkS80q2N9lmktj1G3WAmbwXTGa8sk0S1bn6BUrp24.ZqqE PRLkzKG5e.BJQSCdnEYSlgJrdmxLkIX3e7tQ71b7yF30XnVb2rkyCtEvTF6xFLZ8RVcEBtFrmadc n8APb0_Rr7Dt7F0H6OuWSFCyPIm5QdjGxXAbh05i4dXJfPX7RIwbDmIN3jvp1m2qBS6wRAXY0e9p bl6o.j6VqDcajC9GftP07OmCzT9Gfnql7ED1NCE0sTe7Cktiw37hFX2A6k.eI9145hZdrrmpM0em Tx1i8GqDU2cABvAZ3ED60lIYRDuQETHBFkQDv34QCUw-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.ne1.yahoo.com with HTTP; Sat, 30 Jun 2018 17:19:29 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp419.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID c0a53a6b3e4e8bea18e82ab34bc09f84; Sat, 30 Jun 2018 17:19:24 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) Subject: Re: head -r335782 (?) broke ci.freebsd.org's FreeBSD-head-amd64-gcc build (lib32 part of build) From: Mark Millard In-Reply-To: <49BF6569-96A9-4104-BDE6-8BB94C0D9626@yahoo.com> Date: Sat, 30 Jun 2018 10:19:22 -0700 Cc: Bryan Drewery , svn-src-head@freebsd.org, FreeBSD Current Content-Transfer-Encoding: quoted-printable Message-Id: References: <00D1127A-1F0E-4E0E-B86C-1C5AA5B2E085@yahoo.com> <7A845F2C-C994-4828-823D-33A97B7B6EB0@yahoo.com> <72081b02-cf23-82ec-32df-7f5793c35f57@FreeBSD.org> <003509F0-F2F4-4A43-82FE-3F6FC23D19D4@yahoo.com> <65b19cc4-eaf0-13ed-43e6-9f04a1f7f196@FreeBSD.org> <49BF6569-96A9-4104-BDE6-8BB94C0D9626@yahoo.com> To: John Baldwin , Dimitry Andric X-Mailer: Apple Mail (2.3445.8.2) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jun 2018 17:19:36 -0000 On 2018-Jun-30, at 10:04 AM, Mark Millard wrote: > On 2018-Jun-30, at 9:29 AM, John Baldwin wrote: >=20 >> On 6/30/18 9:17 AM, Mark Millard wrote: >>> On 2018-Jun-30, at 7:51 AM, John Baldwin wrote: >>>=20 >>>> On 6/29/18 2:37 PM, Mark Millard wrote: >>>>> [I expect this is more than just amd64-gcc related but that is all >>>>> that ci.freebsd.org normally builds via a devel/*-gcc .] >>>>=20 >>>> As indicated by my other mail, this is i386 and amd64 specific as = it >>>> only matters for float.h on i386 due to the disagreement on >>>> LDBL_MANT_DIG. >>>=20 >>> I was correct about the search order for include files being >>> different before -r335782 vs. -r335782 and later: >>=20 >> Yes, but this is kind of a feature, not a bug, and the issue there is = that >> as much as possible we should allow FreeBSD to work with the standard = headers >> that are supposed to be part of the language (and thus provided by = the >> toolchain). Right now we don't ship any of the 'std*.h' headers = clang >> provides for example in our base system clang, though a few months = ago I >> fixed the one place that was using instead of >> in userland that was breaking the use of the = toolchain-provided >> stdarg.h (both GCC and clang). >>=20 >>> Might this reversal have other effects even for >>> architectures for which the code does compile >>> via devel/*-gcc ? >>=20 >> It depends on the header. This particular failure is due to a quirk = of >> on FreeBSD/i386. I have built other platforms with = external >> GCC just fine. To the extent that we encounter any other issues we >> should try to make our source more conformant with C and only fall = back to >> axeing the toolchain-provided language headers as a last resort. >=20 > It is too bad that the review https://reviews.freebsd.org/D16055 did = not > catch the change in what headers are used by buildworld and = buildkernel. > I'd view such switching of long established header bindings as a > fairly big deal, possibly even warranting being explicitly proposed = and > debated. >=20 > I'm not claiming my opinion on which search order that I have is > actually relevant. I'm just now nervous about my powerpc64-gcc based > builds having unexpected differences, for example. [I sometimes = explore > the status of powerpc family builds via more modern toolchains.] >=20 > (But lib32 for powerpc64 via modern gcc's is messed up anyway, > generating code in crtbeginS.o for the wrong ABI: using R30 = incorrectly. > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206123 has more = about > that.) Looks like my being nervous is justified: there is a conflicting = altivec.h that has nothing to do with C/C++ language standards: # ls /usr/local/lib/gcc/powerpc64-unknown-freebsd12.0/6.4.0/include/ altivec.h htmxlintrin.h ppc-asm.h = spe.h stdarg.h stddef.h = stdint.h varargs.h float.h iso646.h ppu_intrinsics.h = spu2vmx.h stdatomic.h stdfix.h = stdnoreturn.h vec_types.h htmintrin.h paired.h si2vmx.h = stdalign.h stdbool.h stdint-gcc.h = tgmath.h I've not checked for other name conflicts vs. FreeBSD. I just happen to recognize altivec.h . There is: = /usr/obj/powerpc64vtsc_xtoolchain-gcc/powerpc.powerpc64/usr/src/powerpc.po= werpc64/tmp/usr/include/machine/altivec.h = /usr/obj/powerpc64vtsc_xtoolchain-gcc/powerpc.powerpc64/usr/src/powerpc.po= werpc64/tmp/usr/lib/clang/6.0.0/include/altivec.h = /usr/obj/powerpc64vtsc_xtoolchain-gcc/powerpc.powerpc64/usr/src/powerpc.po= werpc64/obj-lib32/tmp/usr/include/machine/altivec.h =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) From owner-svn-src-head@freebsd.org Sat Jun 30 18:18:42 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-head@freebsd.org Sat Jun 30 18:53:56 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BAB80FD4645; Sat, 30 Jun 2018 18:53:56 +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 67BCC88815; Sat, 30 Jun 2018 18:53:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (unknown [IPv6:2601:648:8880:1e30:28be:12f1:cde2:51bd]) by mail.baldwin.cx (Postfix) with ESMTPSA id AB21F10A87D; Sat, 30 Jun 2018 14:53:49 -0400 (EDT) Subject: Re: head -r335782 (?) broke ci.freebsd.org's FreeBSD-head-amd64-gcc build (lib32 part of build) To: Mark Millard , Dimitry Andric References: <00D1127A-1F0E-4E0E-B86C-1C5AA5B2E085@yahoo.com> <7A845F2C-C994-4828-823D-33A97B7B6EB0@yahoo.com> <72081b02-cf23-82ec-32df-7f5793c35f57@FreeBSD.org> <003509F0-F2F4-4A43-82FE-3F6FC23D19D4@yahoo.com> <65b19cc4-eaf0-13ed-43e6-9f04a1f7f196@FreeBSD.org> <49BF6569-96A9-4104-BDE6-8BB94C0D9626@yahoo.com> Cc: Bryan Drewery , svn-src-head@freebsd.org, FreeBSD Current From: John Baldwin Message-ID: Date: Sat, 30 Jun 2018 11:53:48 -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: Content-Type: text/plain; charset=utf-8 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); Sat, 30 Jun 2018 14:53:50 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jun 2018 18:53:57 -0000 On 6/30/18 10:19 AM, Mark Millard wrote: > > > On 2018-Jun-30, at 10:04 AM, Mark Millard wrote: > >> On 2018-Jun-30, at 9:29 AM, John Baldwin wrote: >> >>> On 6/30/18 9:17 AM, Mark Millard wrote: >>>> On 2018-Jun-30, at 7:51 AM, John Baldwin wrote: >>>> >>>>> On 6/29/18 2:37 PM, Mark Millard wrote: >>>>>> [I expect this is more than just amd64-gcc related but that is all >>>>>> that ci.freebsd.org normally builds via a devel/*-gcc .] >>>>> >>>>> As indicated by my other mail, this is i386 and amd64 specific as it >>>>> only matters for float.h on i386 due to the disagreement on >>>>> LDBL_MANT_DIG. >>>> >>>> I was correct about the search order for include files being >>>> different before -r335782 vs. -r335782 and later: >>> >>> Yes, but this is kind of a feature, not a bug, and the issue there is that >>> as much as possible we should allow FreeBSD to work with the standard headers >>> that are supposed to be part of the language (and thus provided by the >>> toolchain). Right now we don't ship any of the 'std*.h' headers clang >>> provides for example in our base system clang, though a few months ago I >>> fixed the one place that was using instead of >>> in userland that was breaking the use of the toolchain-provided >>> stdarg.h (both GCC and clang). >>> >>>> Might this reversal have other effects even for >>>> architectures for which the code does compile >>>> via devel/*-gcc ? >>> >>> It depends on the header. This particular failure is due to a quirk of >>> on FreeBSD/i386. I have built other platforms with external >>> GCC just fine. To the extent that we encounter any other issues we >>> should try to make our source more conformant with C and only fall back to >>> axeing the toolchain-provided language headers as a last resort. >> >> It is too bad that the review https://reviews.freebsd.org/D16055 did not >> catch the change in what headers are used by buildworld and buildkernel. >> I'd view such switching of long established header bindings as a >> fairly big deal, possibly even warranting being explicitly proposed and >> debated. >> >> I'm not claiming my opinion on which search order that I have is >> actually relevant. I'm just now nervous about my powerpc64-gcc based >> builds having unexpected differences, for example. [I sometimes explore >> the status of powerpc family builds via more modern toolchains.] >> >> (But lib32 for powerpc64 via modern gcc's is messed up anyway, >> generating code in crtbeginS.o for the wrong ABI: using R30 incorrectly. >> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206123 has more about >> that.) > > Looks like my being nervous is justified: there is a conflicting altivec.h > that has nothing to do with C/C++ language standards: > > # ls /usr/local/lib/gcc/powerpc64-unknown-freebsd12.0/6.4.0/include/ > altivec.h htmxlintrin.h ppc-asm.h spe.h stdarg.h stddef.h stdint.h varargs.h > float.h iso646.h ppu_intrinsics.h spu2vmx.h stdatomic.h stdfix.h stdnoreturn.h vec_types.h > htmintrin.h paired.h si2vmx.h stdalign.h stdbool.h stdint-gcc.h tgmath.h > > I've not checked for other name conflicts vs. FreeBSD. I just happen > to recognize altivec.h . There is: > > /usr/obj/powerpc64vtsc_xtoolchain-gcc/powerpc.powerpc64/usr/src/powerpc.powerpc64/tmp/usr/include/machine/altivec.h > > /usr/obj/powerpc64vtsc_xtoolchain-gcc/powerpc.powerpc64/usr/src/powerpc.powerpc64/tmp/usr/lib/clang/6.0.0/include/altivec.h > > /usr/obj/powerpc64vtsc_xtoolchain-gcc/powerpc.powerpc64/usr/src/powerpc.powerpc64/obj-lib32/tmp/usr/include/machine/altivec.h Actually, that is a compiler intrinsincs header similar to the , etc. headers used for SSE on x86 that are always provided by the compiler. However, this header is '' not '' so it won't conflict. (On x86, these headers provide the _mm_* functions documented in Intel's SDM as the official C bindings for vector extensions, and probably plays a similar role in providing the vendor-specified C bindings for altivec instructions.) -- John Baldwin From owner-svn-src-head@freebsd.org Sat Jun 30 19:36:03 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 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-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-head@freebsd.org Sat Jun 30 19:53:02 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8B7EDFD5DA6 for ; Sat, 30 Jun 2018 19:53:02 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic313-20.consmr.mail.gq1.yahoo.com (sonic313-20.consmr.mail.gq1.yahoo.com [98.137.65.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 09AE98A65E for ; Sat, 30 Jun 2018 19:53:01 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: NXGhhtwVM1n4_uoSr6_P_DdcqOlvMf0178FElPlm.ZnpSLskbfHPmt4ZtgdP6aI U3zY0434R4mWFdi.5GbAGV9eJaz8B8qrISShix5fqqHsOUnjof0S1IAaH.ab7RloL2Y_WkJF9QXi MbOdQNoYcr37j6ATqSNKOhLnLi.mWWbSrK41VDYkX5od7RsIahaJqrZEPEFB_aEWlcwB.jOEGEXZ xkDEHUP4Yfu00ZDsvW4wt7VHKq2LfWgvuIXrqOFXSrDuebhhJ05JrCJYq7bwUQppXBk_zCHZGQ7I 0R7PGahDhp.bHAWxkcmhOsWJ32.44sCayLt9_niAjS58OThCourzbb9gssT1_.M5U.YzAj5MM3dM qgibMC5CYh5.heu25Nd.nNB9NUJVvbIeo9Evn2GySQCcaUUFFcv9uCSZiRJzZ0w4bycXh1EUB2aV JlZTsdn7ZGez1JWlOq6rodYREyswosTpsOCREgbYxFki5W0z4kRkuksAxNfQTllQINnr_R5JfHXR HMeABCWtLBJ70vXC0QpA.IZnDKQRG1u9fJ6Yeomc1P6B6fUVmdCrgMqOnxjDf0CXiHW_cxIHr5AZ W2qjXXU79sSXNEzBXEuH_9qwKftl3ieONydtGOWAdNy_jRmA6JhTq_vBdFM2z010EGpXSM_qDVXi TmrPoRN90dlvG.zQCIJb2JtJYWCmLVOMj6sqLuMOjxjX3LBb0YURr2CzI.30ss4ieIWuSkb59rgH RSODvLhr0I0ze2BY4XWRg6DQVvkajSTu_MJXXpm7lQIwvjIGBMqENwr5uli9QBnDBTA_iCOQG6lU jXN1HRgQQCVhyYIgtxtZONCaRQ4W9HT3qZezqhpgapGLk5NYIJKW9FtxMKowSyzlhf2EFhppc8_Q PHQiY3X55x185A5HxWu3XLrTZXjRCMT5cnJZQn7c4aESXYPCaegwuPArsqql.dIdWIKeFTrUufqP RKq1hzZPROn9c9JpChKuorxYIN6MBSY1e.g-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.gq1.yahoo.com with HTTP; Sat, 30 Jun 2018 19:52:54 +0000 Received: from ip70-189-131-151.lv.lv.cox.net (EHLO [192.168.0.105]) ([70.189.131.151]) by smtp405.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 5aa676cfba08ebfdb7125dd985a49388; Sat, 30 Jun 2018 19:52:50 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) Subject: Re: head -r335782 (?) broke ci.freebsd.org's FreeBSD-head-amd64-gcc build (lib32 part of build) From: Mark Millard In-Reply-To: Date: Sat, 30 Jun 2018 12:52:48 -0700 Cc: Dimitry Andric , Bryan Drewery , svn-src-head@freebsd.org, FreeBSD Current Content-Transfer-Encoding: quoted-printable Message-Id: References: <00D1127A-1F0E-4E0E-B86C-1C5AA5B2E085@yahoo.com> <7A845F2C-C994-4828-823D-33A97B7B6EB0@yahoo.com> <72081b02-cf23-82ec-32df-7f5793c35f57@FreeBSD.org> <003509F0-F2F4-4A43-82FE-3F6FC23D19D4@yahoo.com> <65b19cc4-eaf0-13ed-43e6-9f04a1f7f196@FreeBSD.org> <49BF6569-96A9-4104-BDE6-8BB94C0D9626@yahoo.com> To: John Baldwin X-Mailer: Apple Mail (2.3445.8.2) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jun 2018 19:53:02 -0000 On 2018-Jun-30, at 11:53 AM, John Baldwin wrote: > On 6/30/18 10:19 AM, Mark Millard wrote: >=20 >=20 > On 2018-Jun-30, at 10:04 AM, Mark Millard = wrote: >=20 >> On 2018-Jun-30, at 9:29 AM, John Baldwin wrote: >>=20 >>> On 6/30/18 9:17 AM, Mark Millard wrote: >>>> On 2018-Jun-30, at 7:51 AM, John Baldwin = wrote: >>>>=20 >>>>> On 6/29/18 2:37 PM, Mark Millard wrote: >>>>>> [I expect this is more than just amd64-gcc related but that is = all >>>>>> that ci.freebsd.org normally builds via a devel/*-gcc .] >>>>>=20 >>>>> As indicated by my other mail, this is i386 and amd64 specific as = it >>>>> only matters for float.h on i386 due to the disagreement on >>>>> LDBL_MANT_DIG. >>>>=20 >>>> I was correct about the search order for include files being >>>> different before -r335782 vs. -r335782 and later: >>>=20 >>> Yes, but this is kind of a feature, not a bug, and the issue there = is that >>> as much as possible we should allow FreeBSD to work with the = standard headers >>> that are supposed to be part of the language (and thus provided by = the >>> toolchain). Right now we don't ship any of the 'std*.h' headers = clang >>> provides for example in our base system clang, though a few months = ago I >>> fixed the one place that was using instead of >>> in userland that was breaking the use of the = toolchain-provided >>> stdarg.h (both GCC and clang). >>>=20 >>>> Might this reversal have other effects even for >>>> architectures for which the code does compile >>>> via devel/*-gcc ? >>>=20 >>> It depends on the header. This particular failure is due to a quirk = of >>> on FreeBSD/i386. I have built other platforms with = external >>> GCC just fine. To the extent that we encounter any other issues we >>> should try to make our source more conformant with C and only fall = back to >>> axeing the toolchain-provided language headers as a last resort. >>=20 >> It is too bad that the review https://reviews.freebsd.org/D16055 did = not >> catch the change in what headers are used by buildworld and = buildkernel. >> I'd view such switching of long established header bindings as a >> fairly big deal, possibly even warranting being explicitly proposed = and >> debated. >>=20 >> I'm not claiming my opinion on which search order that I have is >> actually relevant. I'm just now nervous about my powerpc64-gcc based >> builds having unexpected differences, for example. [I sometimes = explore >> the status of powerpc family builds via more modern toolchains.] >>=20 >> (But lib32 for powerpc64 via modern gcc's is messed up anyway, >> generating code in crtbeginS.o for the wrong ABI: using R30 = incorrectly. >> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206123 has more = about >> that.) >=20 > Looks like my being nervous is justified: there is a conflicting = altivec.h > that has nothing to do with C/C++ language standards: >=20 > # ls /usr/local/lib/gcc/powerpc64-unknown-freebsd12.0/6.4.0/include/ > altivec.h htmxlintrin.h ppc-asm.h = spe.h stdarg.h stddef.h = stdint.h varargs.h > float.h iso646.h ppu_intrinsics.h = spu2vmx.h stdatomic.h stdfix.h = stdnoreturn.h vec_types.h > htmintrin.h paired.h si2vmx.h = stdalign.h stdbool.h stdint-gcc.h = tgmath.h >=20 > I've not checked for other name conflicts vs. FreeBSD. I just happen > to recognize altivec.h . There is: >=20 > = /usr/obj/powerpc64vtsc_xtoolchain-gcc/powerpc.powerpc64/usr/src/powerpc.po= werpc64/tmp/usr/include/machine/altivec.h >=20 > = /usr/obj/powerpc64vtsc_xtoolchain-gcc/powerpc.powerpc64/usr/src/powerpc.po= werpc64/tmp/usr/lib/clang/6.0.0/include/altivec.h >=20 > = /usr/obj/powerpc64vtsc_xtoolchain-gcc/powerpc.powerpc64/usr/src/powerpc.po= werpc64/obj-lib32/tmp/usr/include/machine/altivec.h >=20 > Actually, that is a compiler intrinsincs header similar to the = , > etc. headers used for SSE on x86 that are always provided by the = compiler. > However, this header is '' not '' so it = won't conflict. >=20 > (On x86, these headers provide the _mm_* functions documented in = Intel's > SDM as the official C bindings for vector extensions, and > probably plays a similar role in providing the vendor-specified C > bindings for altivec instructions.) [This is based on a -r335812 build still.] If I have a modern gcc build a system that includes building the system clang, I do not expect it is that simple. There is: /usr/src/contrib/llvm/tools/clang/lib/Lex/Lexer.cpp:#include and altivec.h files around: /usr/lib/clang/6.0.0/include/altivec.h /usr/src/contrib/llvm/tools/clang/lib/Headers/altivec.h /usr/src/contrib/gcc/config/rs6000/altivec.h /usr/src/sys/powerpc/include/altivec.h /usr/local/lib/gcc/powerpc64-unknown-freebsd12.0/6.4.0/include/altivec.h = /usr/obj/powerpc64vtsc_xtoolchain-gcc/powerpc.powerpc64/usr/src/powerpc.po= werpc64/tmp/usr/include/machine/altivec.h = /usr/obj/powerpc64vtsc_xtoolchain-gcc/powerpc.powerpc64/usr/src/powerpc.po= werpc64/tmp/usr/lib/clang/6.0.0/include/altivec.h = /usr/obj/powerpc64vtsc_xtoolchain-gcc/powerpc.powerpc64/usr/src/powerpc.po= werpc64/obj-lib32/tmp/usr/include/machine/altivec.h If I read the below right the gcc altivec.h will be found by the above #include when building system clang via a modern gcc. The Lex_Lexer.o.meta shows (note the lack of include in some of the = paths compared to the above places where altivec.h files actually are --and = other path mismatches): ignoring nonexistent directory = "/usr/obj/powerpc64vtsc_xtoolchain-gcc/powerpc.powerpc64/usr/src/powerpc.p= owerpc64/tmp/usr/include/c++/v1//powerpc64-unknown-freebsd12.0" ignoring nonexistent directory = "/usr/obj/powerpc64vtsc_xtoolchain-gcc/powerpc.powerpc64/usr/src/powerpc.p= owerpc64/tmp/usr/include/c++/v1//backward" ignoring nonexistent directory = "/usr/local/lib/gcc/powerpc64-unknown-freebsd12.0/6.4.0/include-fixed" ignoring nonexistent directory = "/usr/local/lib/gcc/powerpc64-unknown-freebsd12.0/6.4.0/../../../../powerp= c64-unknown-freebsd12.0/include" #include "..." search starts here: #include <...> search starts here: = /usr/obj/powerpc64vtsc_xtoolchain-gcc/powerpc.powerpc64/usr/src/powerpc.po= werpc64/lib/clang/libclang = /usr/obj/powerpc64vtsc_xtoolchain-gcc/powerpc.powerpc64/usr/src/powerpc.po= werpc64/lib/clang/libllvm /usr/src/contrib/llvm/tools/clang/lib/Basic /usr/src/contrib/llvm/tools/clang/lib/Driver /usr/src/contrib/llvm/tools/clang/include /usr/src/lib/clang/include /usr/src/contrib/llvm/include = /usr/obj/powerpc64vtsc_xtoolchain-gcc/powerpc.powerpc64/usr/src/powerpc.po= werpc64/tmp/usr/include/c++/v1/ /usr/local/lib/gcc/powerpc64-unknown-freebsd12.0/6.4.0/include = /usr/obj/powerpc64vtsc_xtoolchain-gcc/powerpc.powerpc64/usr/src/powerpc.po= werpc64/tmp/usr/include End of search list. But the old order would have found the FreeBSD one, not the clang one, for its different order if I understand right. So it is not clear that before -r335782 was right either. But is is now different from what I can tell. What the consequences might be I do not (yet) know. Just for completeness . . . There are also uses of machine/altivec.h : /usr/src/sys/powerpc/aim/aim_machdep.c:#include /usr/src/sys/powerpc/booke/spe.c:#include /usr/src/sys/powerpc/powermac/platform_powermac.c:#include = /* For save_vec() */ /usr/src/sys/powerpc/powerpc/altivec.c:#include /usr/src/sys/powerpc/powerpc/elf32_machdep.c:#include = /usr/src/sys/powerpc/powerpc/elf64_machdep.c:#include = /usr/src/sys/powerpc/powerpc/exec_machdep.c:#include /usr/src/sys/powerpc/powerpc/machdep.c:#include /usr/src/sys/powerpc/powerpc/ptrace_machdep.c:#include = /usr/src/sys/powerpc/powerpc/trap.c:#include I'd wish that the file names for the 3 contexts had been made distinct = to avoid all potential aliasing problems. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)