From owner-svn-src-head@freebsd.org Sun Jul 22 02:17: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 8075D103A132; Sun, 22 Jul 2018 02:17:25 +0000 (UTC) (envelope-from woodsb02@gmail.com) Received: from mail-ua0-x230.google.com (mail-ua0-x230.google.com [IPv6:2607:f8b0:400c:c08::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 12ABF81723; Sun, 22 Jul 2018 02:17:25 +0000 (UTC) (envelope-from woodsb02@gmail.com) Received: by mail-ua0-x230.google.com with SMTP id p22-v6so9734157uao.7; Sat, 21 Jul 2018 19:17:25 -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=+SEr2SL0kdy9BKEi+iq6lFWfc7vdzufOxh08b7KxAmM=; b=tGvCua68DeTFAc8FqIo0KEJJuzhKoEgJ+xR+eN5MbxbeHygZ6Ld4Fo1R8pZYqAK+XU 1QgwSf5nEU/dbIQ06T0IvfdlMnA+RD/fK0Jw1sVJeyIq57UJQ0LqFQA3jLciSgb5Em75 9auYnUX8isk58JXJrRzgYl+ZZx6oFjPhMEjm6hT01zec4gyrG49zfmraDC71W6dEiIHe QLTmjynBdBiE/CHGBpMYMPlxYbcWwetuGevRUNAVoRzKq6NTb+hrohAidwgpg4ew/P7S +gffQxlPcJq85ftrnn+eRy4B+mKSicXfLDkmRhNGt+sLLto5AYfEptQ0emOOA02JjU51 NRBw== 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=+SEr2SL0kdy9BKEi+iq6lFWfc7vdzufOxh08b7KxAmM=; b=N0K46a9uY2K2jf/gDdHpevREWIUUtLy98hnfdPcM6Q6LI9zRYj/MWDTyXcypF+MBQT SnK1SAIEAUmXb9AhiWew831fI+2ZubhLzT4cNuLY0kAhGvBYNFCCC8oe5OHFuWG4osmW d4JS5kk5lVkWVLedDRckUU5Xl0L4TF0m68JQtnvaxxJ6WEj3VtqtES0RoLmKqizsgq+D PxCrO/g9qkZi1VunYAdkKvUz1Gdb6gbD75lQnl3lewy6JenJt++XjFjouSW3wvKB9YGo bVq4wBiaf3hniAieSbNR/UoRfWJIzJmXXPnxOtCLx9mpv9oXS8M7ksmWYBsdyL099CQp qBLg== X-Gm-Message-State: AOUpUlHFWgd4BQkX3pCedW+POxO1A9X6BPG6bzf3FjER7zgt0io3QQCT xTNSf+wEAa1aUIwoh2kp9zjWRf1J0sWYgQ2vtqbEE18m X-Google-Smtp-Source: AAOMgpfPEYZgQsjF6k/40sOwZLDuJRsmaD/9JJcp2kV1N5jMwTyXiDBX+fS5i9Do72uYaiuCzsVBDig5PCtS4FNmcm0= X-Received: by 2002:ab0:13c7:: with SMTP id n7-v6mr5217681uae.47.1532225844288; Sat, 21 Jul 2018 19:17:24 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab0:6a:0:0:0:0:0 with HTTP; Sat, 21 Jul 2018 19:17:23 -0700 (PDT) In-Reply-To: References: <201806261807.w5QI7Hod072088@repo.freebsd.org> From: Ben Woods Date: Sun, 22 Jul 2018 10:17:23 +0800 Message-ID: Subject: Re: svn commit: r335673 - in head: etc/defaults etc/rc.d lib/geom/eli share/man/man5 To: Alan Somers Cc: Ben Woods , 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.27 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: Sun, 22 Jul 2018 02:17:25 -0000 On 22 July 2018 at 00:41, Alan Somers wrote: > It looks like this change is causing several of geli's tests to fail in > CI. Could you please take a look? The failure mode is that "geli attach" > exits 0 when it should fail instead. > > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/ > lastCompletedBuild/testReport/ > > Hi Alan, Thanks for the heads up - you are quite right! I have proposed a fix here - can you please review and approve for me to commit if you are happy with it? https://reviews.freebsd.org/D16386 Regards, Ben From owner-svn-src-head@freebsd.org Sun Jul 22 03:46: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 51730103E484; Sun, 22 Jul 2018 03:46:34 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) (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 A11B084BBC; Sun, 22 Jul 2018 03:46:33 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf1-x130.google.com with SMTP id m12-v6so4214506lfc.10; Sat, 21 Jul 2018 20:46:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=jtuoySD+mdtdTUOUj2Pq2r4YahKoywCBbG+anW0GUXU=; b=J/WbhBoHwHtNUUTOCdDURjmC7D0tVBvclVbqAbHpvowDsIdq2EtJNbnwgdGIPr+3qh hLkSqZtQ/cV8yh0fFg5eYvkQQ7WkpMM7M/+TqEw9BW6mkXLgbNbbE/VhEvwA3r4ElyMU elH/tC8B7G6AawQ2c52PxOYJZZ5X50NtDTrShEsatmsKpfLSKDyfJcqD/uIpphvBPd5x 3G4S5KBEPzPygqOLXNd3KuHAY+EIfhTBwwPx3wFAURyGvHT8O3yMb3J7C0+DBPSpaNSj qXlDX4XWiKWd8V3zfQJWv939mvTUuTQegVbyxp4nP1K8rY0hrjll3Eo8OEUfOwFNqS7s fiEw== 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=jtuoySD+mdtdTUOUj2Pq2r4YahKoywCBbG+anW0GUXU=; b=LVJ9FkmxTR4rJqob//agrYIsG7V5ICqrPFlXDT8MfeisWBNVUASv7QbLoPiczKBMF/ ajcD861cXBdgrgXNGg5suLjGRvs3vzqbQQwod/BYDSEAH7SWJd++/LWjW05f8jz9zC9v BHQ50E93TFmUBVnk+/EUK049UkmvtP8ynpja/oL/VE98MrXe+E7jEXDLQVUnQanc4q7T OhdEioD/+CUV3IuetcxB1uuduIiSf2YzXHQ86XOwY/t1CjAokmLB8P0lHnTcX+7lNCyI Oqs2b+XjpJSpBfCBYEjmCTHVcq50OVw73JrPdc4i14W7sq3B99pwTV1Zpf86np1FfTGa lrwA== X-Gm-Message-State: AOUpUlGmGgFw5PX4lCfekYbj05YXL2R1LIcES4b3Jjk7NQtobd5lYbKC lefnYuhccak16Ak29rYK1W3lJvNqh0P2/64PIgx2gQ== X-Google-Smtp-Source: AAOMgpdVrnA8Hlfl+afqryROFYA+I3qLGJA1LT2DmfbUZhrY9VOaqJqpoPNfK4mpkVFFL0OYxZccFNZFX1vnoAmmcqE= X-Received: by 2002:a19:a417:: with SMTP id q23-v6mr4286156lfc.59.1532231190896; Sat, 21 Jul 2018 20:46:30 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 2002:ab3:7851:0:0:0:0:0 with HTTP; Sat, 21 Jul 2018 20:46:30 -0700 (PDT) In-Reply-To: <201806110535.w5B5Zv7a017614@repo.freebsd.org> References: <201806110535.w5B5Zv7a017614@repo.freebsd.org> From: Alan Somers Date: Sat, 21 Jul 2018 21:46:30 -0600 X-Google-Sender-Auth: adcUXuK7rv-seDmH8c75ypmSHD0 Message-ID: Subject: Re: svn commit: r334944 - in head/usr.bin/indent: . tests To: Piotr Pawel Stefaniak 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.27 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: Sun, 22 Jul 2018 03:46:34 -0000 On Sun, Jun 10, 2018 at 11:35 PM, Piotr Pawel Stefaniak wrote: > Author: pstef > Date: Mon Jun 11 05:35:57 2018 > New Revision: 334944 > URL: https://svnweb.freebsd.org/changeset/base/334944 > > Log: > indent(1): rename -nsac/-sac ("space after cast") to -ncs/-cs > > Also update tests and the manpage. > > GNU indent had the option earlier as -cs, let's not diverge > unnecessarily. > > Added: > head/usr.bin/indent/tests/cs.0 > - copied unchanged from r334943, head/usr.bin/indent/tests/sac.0 > head/usr.bin/indent/tests/cs.0.pro > - copied, changed from r334943, head/usr.bin/indent/tests/sac.0.pro > head/usr.bin/indent/tests/cs.0.stdout > - copied unchanged from r334943, head/usr.bin/indent/tests/sac. > 0.stdout > head/usr.bin/indent/tests/ncs.0 > - copied unchanged from r334943, head/usr.bin/indent/tests/nsac.0 > head/usr.bin/indent/tests/ncs.0.pro > - copied, changed from r334943, head/usr.bin/indent/tests/nsac.0.pro > head/usr.bin/indent/tests/ncs.0.stdout > - copied unchanged from r334943, head/usr.bin/indent/tests/ > nsac.0.stdout > Deleted: > head/usr.bin/indent/tests/nsac.0 > head/usr.bin/indent/tests/nsac.0.pro > head/usr.bin/indent/tests/nsac.0.stdout > head/usr.bin/indent/tests/sac.0 > head/usr.bin/indent/tests/sac.0.pro > head/usr.bin/indent/tests/sac.0.stdout > Modified: > head/usr.bin/indent/args.c > head/usr.bin/indent/indent.1 > head/usr.bin/indent/tests/Makefile > When you remove old files, you need to add them to ObsoleteFiles.inc. Otherwise, they linger around after an upgrade. On my system the indent tests are failing because the old sac and nsac files are still there. -Alan From owner-svn-src-head@freebsd.org Sun Jul 22 03:58: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 9F3B2103E982; Sun, 22 Jul 2018 03:58:02 +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 4D33B851CA; Sun, 22 Jul 2018 03:58:02 +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 2D92781C; Sun, 22 Jul 2018 03:58:02 +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 w6M3w2VJ054463; Sun, 22 Jul 2018 03:58:02 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6M3w21v054462; Sun, 22 Jul 2018 03:58:02 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201807220358.w6M3w21v054462@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sun, 22 Jul 2018 03:58:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336595 - head/sbin/pfctl/tests X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/sbin/pfctl/tests X-SVN-Commit-Revision: 336595 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: Sun, 22 Jul 2018 03:58:02 -0000 Author: asomers Date: Sun Jul 22 03:58:01 2018 New Revision: 336595 URL: https://svnweb.freebsd.org/changeset/base/336595 Log: Skip the pftcl(8) tests if pf isn't loaded. Previously, they would simply fail. MFC after: 2 weeks Modified: head/sbin/pfctl/tests/pfctl_test.sh Modified: head/sbin/pfctl/tests/pfctl_test.sh ============================================================================== --- head/sbin/pfctl/tests/pfctl_test.sh Sat Jul 21 23:54:40 2018 (r336594) +++ head/sbin/pfctl/tests/pfctl_test.sh Sun Jul 22 03:58:01 2018 (r336595) @@ -30,6 +30,7 @@ for i in ${pftests} ; do atf_test_case "pf${i}" eval "pf${i}_head () { atf_set descr \"$(pf${i}_descr)\" ; }" eval "pf${i}_body () { \ + kldstat -m pf || atf_skip \"pf(4) is not loaded\" && \ cd $(atf_get_srcdir)/files && \ atf_check -o file:pf${i}.ok \ pfctl -o none -nvf - < pf${i}.in ; }" From owner-svn-src-head@freebsd.org Sun Jul 22 05: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 2238810404F7; Sun, 22 Jul 2018 05:19:36 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: from mail-io0-x22e.google.com (mail-io0-x22e.google.com [IPv6:2607:f8b0:4001:c06::22e]) (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 90E5A8707B; Sun, 22 Jul 2018 05:19:35 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: by mail-io0-x22e.google.com with SMTP id o22-v6so11964485ioh.6; Sat, 21 Jul 2018 22:19:35 -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=cx+IrR7LlMaVIBvCByTTb6/XWJThm7usUnN8fuSRme4=; b=d3LVRPdArqy8kK5Sruh6FcyxywZb/VXWICZu64Lt7aRC7phNOd2xX17lyXfGEIPIYl suVBgoE4DmFJRgXuLGWZrjHestx6IYMYeLTg7Q47wG/u4z0IrEX5JKxDRt1ydJFWzvVd z1sNqXtDG0/4yvWJLg+nIiPXJ3Mg+gQ9obYMe6yWjQyJ0nCLu+xC8hHkglz6dtNx9t8J In7KvQVve+nkPNmYpdJMg2e+apat3tGoBw3Zx2Hbu/H4lg7v3jl1T1jM6tcVZH7mZK0W CZqIMZHhQWVdrmlZThowvZw39suKMSmTPxdZGY9J7pb1z4qXMNACb/7UnA6B+aTkG5k5 4U7Q== 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=cx+IrR7LlMaVIBvCByTTb6/XWJThm7usUnN8fuSRme4=; b=Vg08rdemXBBmOCqHkjKxZRXw97sKD0y0DiT3DgjMTGwE8E62Ho0safhRfo2ufJy+aj 3LQtwvdfx0wHcGrM7iZh/ifMNY3RwYJbNWO/jVLhy+5LuincTuVa6VpyQOEQ423Tvg1P kQqiJItFeuYAGk96LR4cvv3XfGrlc2Z5j4QXTjWCyKTEQTDsMMI6fr2oneyqfnOJ4lh7 qGGV+TKpsyaZ/g9fIXvwRBNwpEV3Ac5lqDreDasQzOkJ6HoAkteVnMudn+rNwSaEVDX/ p23aykCjuljdI9nbX6x3syoaQldue7+NBzvm9KZcQ4wmTmmnt1RnkwN/2Il2CUC9dNYf iuHA== X-Gm-Message-State: AOUpUlEhSNQBlzn4Po0PcabX6Ka7ppNTXgSCB7LCeUJ4spVQuyml6jQm WIt3TMOQW3BFO9E+xwQfxb5xr1ooNUzd7PZOzs1UVZsP X-Google-Smtp-Source: AAOMgpcbXZCXeoBJx6uANrtdBgWmL4+MCUJDdnqOoLjFv8gb3J7uaDvqTH1coh0rxeo/2dokpWAjGf+gtY4AK9cLK5o= X-Received: by 2002:a5e:dc49:: with SMTP id s9-v6mr6133386iop.237.1532236774282; Sat, 21 Jul 2018 22:19:34 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:8d2:0:0:0:0:0 with HTTP; Sat, 21 Jul 2018 22:19:33 -0700 (PDT) In-Reply-To: <201807212254.w6LMsi3v000889@repo.freebsd.org> References: <201807212254.w6LMsi3v000889@repo.freebsd.org> From: Matthew Macy Date: Sat, 21 Jul 2018 22:19:33 -0700 Message-ID: Subject: Re: svn commit: r336593 - head/release To: Colin Percival 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.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: Sun, 22 Jul 2018 05:19:36 -0000 Build still works, but you're assuming that developers only use svn. make[1]: "/usr/home/mmacy/devel/freebsd/Makefile.inc1" line 343: SYSTEM_COMPILER: libclang will be built for bootstrapping a cross-compiler. make[1]: "/usr/home/mmacy/devel/freebsd/Makefile.inc1" line 348: SYSTEM_LINKER: libclang will be built for bootstrapping a cross-linker. svn: E155007: '/usr/home/mmacy/devel/freebsd' is not a working copy svn: E155007: '/usr/home/mmacy/devel/freebsd' is not a working copy make[2]: "/usr/home/mmacy/devel/freebsd/release/Makefile.ec2" line 19: warning: "/usr/local/bin/svn info --show-item last-changed-revision /usr/home/mmacy/devel/freebsd/release/.." returned non-zero status svn: E155007: '/usr/home/mmacy/devel/freebsd' is not a working copy svn: E155007: '/usr/home/mmacy/devel/freebsd' is not a working copy make[2]: "/usr/home/mmacy/devel/freebsd/release/Makefile.ec2" line 19: warning: "/usr/local/bin/svn info --show-item last-changed-revision /usr/home/mmacy/devel/freebsd/release/.." returned non-zero status On Sat, Jul 21, 2018 at 3:54 PM, Colin Percival wrote: > Author: cperciva > Date: Sat Jul 21 22:54:43 2018 > New Revision: 336593 > URL: https://svnweb.freebsd.org/changeset/base/336593 > > Log: > Use svn or svnlite, or ${SVN_CMD} if set, for extracting the SVN branch > and revision number announced in SNS notifications about new EC2 AMIs. > > While I'm here, incorporate that information into the AMI "description" > fields, since it's more useful than simply echoing the information > already provided via the AMI "name". > > Approved by: gjb > > Modified: > head/release/Makefile.ec2 > > Modified: head/release/Makefile.ec2 > ============================================================================== > --- head/release/Makefile.ec2 Sat Jul 21 22:15:48 2018 (r336592) > +++ head/release/Makefile.ec2 Sat Jul 21 22:54:43 2018 (r336593) > @@ -5,6 +5,19 @@ > # Makefile for creating an EC2 AMI from a disk image. > # > > +# Figure out where SVN is > +.if !defined(SVN_CMD) || empty(SVN_CMD) > +. for _P in /usr/bin /usr/local/bin > +. for _S in svn svnlite > +. if exists(${_P}/${_S}) > +SVN_CMD= ${_P}/${_S} > +. endif > +. endfor > +. endfor > +.endif > +EC2_SVNBRANCH!= ${SVN_CMD} info --show-item relative-url ${WORLDDIR} | sed -e 's/\^\///' > +EC2_SVNREV!= ${SVN_CMD} info --show-item last-changed-revision ${WORLDDIR} > + > .if ${BRANCH} == "CURRENT" || ${BRANCH} == "STABLE" || ${BRANCH} == "PRERELEASE" > AMINAMESUFFIX!= date +-%Y-%m-%d > .endif > @@ -13,8 +26,6 @@ PUBLISH= --public > .endif > .if defined(EC2SNSTOPIC) && !empty(EC2SNSTOPIC) > EC2SNSREL= ${REVISION}-${BRANCH} > -EC2_SVNBRANCH!= svn info --show-item relative-url ${WORLDDIR} | sed -e 's/\^\///' > -EC2_SVNREV!= svn info --show-item last-changed-revision ${WORLDDIR} > EC2SNSVERS= ${EC2_SVNBRANCH}@${EC2_SVNREV} > .endif > > @@ -60,7 +71,7 @@ ec2ami: cw-ec2 ${CW_EC2_PORTINSTALL} > /usr/local/bin/bsdec2-image-upload ${PUBLISH} --sriov --ena \ > ${.OBJDIR}/ec2.raw \ > "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX}" \ > - "${TYPE} ${REVISION}-${BRANCH}-${TARGET}" \ > + "${TYPE}/${TARGET} ${EC2_SVNBRANCH}@${EC2_SVNREV}" \ > ${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE} \ > ${EC2SNSTOPIC} ${EC2SNSREL} ${EC2SNSVERS} > @touch ${.TARGET} > From owner-svn-src-head@freebsd.org Sun Jul 22 05:38: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 720201040B2A; Sun, 22 Jul 2018 05:38:00 +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 229EB88197; Sun, 22 Jul 2018 05:38:00 +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 ECC571864; Sun, 22 Jul 2018 05:37:59 +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 w6M5bxY6005581; Sun, 22 Jul 2018 05:37:59 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6M5bwTh005574; Sun, 22 Jul 2018 05:37:58 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201807220537.w6M5bwTh005574@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sun, 22 Jul 2018 05:37:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336596 - in head/sys/netinet: . cc X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: in head/sys/netinet: . cc X-SVN-Commit-Revision: 336596 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: Sun, 22 Jul 2018 05:38:00 -0000 Author: mmacy Date: Sun Jul 22 05:37:58 2018 New Revision: 336596 URL: https://svnweb.freebsd.org/changeset/base/336596 Log: NULL out cc_data in pluggable TCP {cc}_cb_destroy When ABE was added (rS331214) to NewReno and leak fixed (rS333699) , it now has a destructor (newreno_cb_destroy) for per connection state. Other congestion controls may allocate and free cc_data on entry and exit, but the field is never explicitly NULLed if moving back to NewReno which only internally allocates stateful data (no entry contstructor) resulting in a situation where newreno_cb_destory might be called on a junk pointer. - NULL out cc_data in the framework after calling {cc}_cb_destroy - free(9) checks for NULL so there is no need to perform not NULL checks before calling free. - Improve a comment about NewReno in tcp_ccalgounload This is the result of a debugging session from Jason Wolfe, Jason Eggleston, and mmacy@ and very helpful insight from lstewart@. Submitted by: Kevin Bowling Reviewed by: lstewart Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D16282 Modified: head/sys/netinet/cc/cc_chd.c head/sys/netinet/cc/cc_cubic.c head/sys/netinet/cc/cc_dctcp.c head/sys/netinet/cc/cc_htcp.c head/sys/netinet/cc/cc_newreno.c head/sys/netinet/cc/cc_vegas.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_usrreq.c Modified: head/sys/netinet/cc/cc_chd.c ============================================================================== --- head/sys/netinet/cc/cc_chd.c Sun Jul 22 03:58:01 2018 (r336595) +++ head/sys/netinet/cc/cc_chd.c Sun Jul 22 05:37:58 2018 (r336596) @@ -307,8 +307,7 @@ static void chd_cb_destroy(struct cc_var *ccv) { - if (ccv->cc_data != NULL) - free(ccv->cc_data, M_CHD); + free(ccv->cc_data, M_CHD); } static int Modified: head/sys/netinet/cc/cc_cubic.c ============================================================================== --- head/sys/netinet/cc/cc_cubic.c Sun Jul 22 03:58:01 2018 (r336595) +++ head/sys/netinet/cc/cc_cubic.c Sun Jul 22 05:37:58 2018 (r336596) @@ -213,9 +213,7 @@ cubic_ack_received(struct cc_var *ccv, uint16_t type) static void cubic_cb_destroy(struct cc_var *ccv) { - - if (ccv->cc_data != NULL) - free(ccv->cc_data, M_CUBIC); + free(ccv->cc_data, M_CUBIC); } static int Modified: head/sys/netinet/cc/cc_dctcp.c ============================================================================== --- head/sys/netinet/cc/cc_dctcp.c Sun Jul 22 03:58:01 2018 (r336595) +++ head/sys/netinet/cc/cc_dctcp.c Sun Jul 22 05:37:58 2018 (r336596) @@ -184,8 +184,7 @@ dctcp_after_idle(struct cc_var *ccv) static void dctcp_cb_destroy(struct cc_var *ccv) { - if (ccv->cc_data != NULL) - free(ccv->cc_data, M_dctcp); + free(ccv->cc_data, M_dctcp); } static int Modified: head/sys/netinet/cc/cc_htcp.c ============================================================================== --- head/sys/netinet/cc/cc_htcp.c Sun Jul 22 03:58:01 2018 (r336595) +++ head/sys/netinet/cc/cc_htcp.c Sun Jul 22 05:37:58 2018 (r336596) @@ -238,9 +238,7 @@ htcp_ack_received(struct cc_var *ccv, uint16_t type) static void htcp_cb_destroy(struct cc_var *ccv) { - - if (ccv->cc_data != NULL) - free(ccv->cc_data, M_HTCP); + free(ccv->cc_data, M_HTCP); } static int Modified: head/sys/netinet/cc/cc_newreno.c ============================================================================== --- head/sys/netinet/cc/cc_newreno.c Sun Jul 22 03:58:01 2018 (r336595) +++ head/sys/netinet/cc/cc_newreno.c Sun Jul 22 05:37:58 2018 (r336596) @@ -127,9 +127,7 @@ newreno_malloc(struct cc_var *ccv) static void newreno_cb_destroy(struct cc_var *ccv) { - - if (ccv->cc_data != NULL) - free(ccv->cc_data, M_NEWRENO); + free(ccv->cc_data, M_NEWRENO); } static void Modified: head/sys/netinet/cc/cc_vegas.c ============================================================================== --- head/sys/netinet/cc/cc_vegas.c Sun Jul 22 03:58:01 2018 (r336595) +++ head/sys/netinet/cc/cc_vegas.c Sun Jul 22 05:37:58 2018 (r336596) @@ -170,9 +170,7 @@ vegas_ack_received(struct cc_var *ccv, uint16_t ack_ty static void vegas_cb_destroy(struct cc_var *ccv) { - - if (ccv->cc_data != NULL) - free(ccv->cc_data, M_VEGAS); + free(ccv->cc_data, M_VEGAS); } static int Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Sun Jul 22 03:58:01 2018 (r336595) +++ head/sys/netinet/tcp_subr.c Sun Jul 22 05:37:58 2018 (r336596) @@ -1730,10 +1730,18 @@ tcp_ccalgounload(struct cc_algo *unload_algo) */ if (CC_ALGO(tp) == unload_algo) { tmpalgo = CC_ALGO(tp); - /* NewReno does not require any init. */ - CC_ALGO(tp) = &newreno_cc_algo; if (tmpalgo->cb_destroy != NULL) tmpalgo->cb_destroy(tp->ccv); + CC_DATA(tp) = NULL; + /* + * NewReno may allocate memory on + * demand for certain stateful + * configuration as needed, but is + * coded to never fail on memory + * allocation failure so it is a safe + * fallback. + */ + CC_ALGO(tp) = &newreno_cc_algo; } } INP_WUNLOCK(inp); @@ -1885,6 +1893,7 @@ tcp_discardcb(struct tcpcb *tp) /* Allow the CC algorithm to clean up after itself. */ if (CC_ALGO(tp)->cb_destroy != NULL) CC_ALGO(tp)->cb_destroy(tp->ccv); + CC_DATA(tp) = NULL; #ifdef TCP_HHOOK khelp_destroy_osd(tp->osd); Modified: head/sys/netinet/tcp_usrreq.c ============================================================================== --- head/sys/netinet/tcp_usrreq.c Sun Jul 22 03:58:01 2018 (r336595) +++ head/sys/netinet/tcp_usrreq.c Sun Jul 22 05:37:58 2018 (r336596) @@ -1729,6 +1729,7 @@ unlock_and_done: */ if (CC_ALGO(tp)->cb_destroy != NULL) CC_ALGO(tp)->cb_destroy(tp->ccv); + CC_DATA(tp) = NULL; CC_ALGO(tp) = algo; /* * If something goes pear shaped initialising the new From owner-svn-src-head@freebsd.org Sun Jul 22 10:51: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 A76931047F23; Sun, 22 Jul 2018 10:51:01 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 53D4D70C53; Sun, 22 Jul 2018 10:51:01 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 34F864F0C; Sun, 22 Jul 2018 10:51:01 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6MAp01h069795; Sun, 22 Jul 2018 10:51:00 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6MAp0aJ069790; Sun, 22 Jul 2018 10:51:00 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201807221051.w6MAp0aJ069790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 22 Jul 2018 10:51:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336597 - in head/cddl: contrib/opensolaris/cmd/dtrace/test/tst/common/ip usr.sbin/dtrace/tests/tools X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: in head/cddl: contrib/opensolaris/cmd/dtrace/test/tst/common/ip usr.sbin/dtrace/tests/tools X-SVN-Commit-Revision: 336597 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: Sun, 22 Jul 2018 10:51:02 -0000 Author: tuexen Date: Sun Jul 22 10:50:59 2018 New Revision: 336597 URL: https://svnweb.freebsd.org/changeset/base/336597 Log: Improve TCP related tests for dtrace. Ensure that the TCP connections are terminated gracefully as expected by the test. Use appropriate numbers for sent/received packets. In addition, enable tst.localtcpstate.ksh, which should pass, but doesn't until https://reviews.freebsd.org/D16369 is committed. Reviewed by: markj@ Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D16288 Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localtcp.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4remotetcp.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.localtcpstate.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.remotetcpstate.ksh head/cddl/usr.sbin/dtrace/tests/tools/exclude.sh Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localtcp.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localtcp.ksh Sun Jul 22 05:37:58 2018 (r336596) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localtcp.ksh Sun Jul 22 10:50:59 2018 (r336597) @@ -38,17 +38,14 @@ # This test performs a TCP connection and checks that at least the # following packet counts were traced: # -# 3 x ip:::send (2 during the TCP handshake, then a FIN) -# 3 x tcp:::send (2 during the TCP handshake, then a FIN) -# 2 x ip:::receive (1 during the TCP handshake, then the FIN ACK) -# 2 x tcp:::receive (1 during the TCP handshake, then the FIN ACK) +# 7 x ip:::send (3 during the setup, 4 during the teardown) +# 7 x tcp:::send (3 during the setup, 4 during the teardown) +# 7 x ip:::receive (3 during the setup, 4 during the teardown) +# 7 x tcp:::receive (3 during the setup, 4 during the teardown) -# The actual count tested is 5 each way, since we are tracing both +# The actual count tested is 7 each way, since we are tracing both # source and destination events. # -# For this test to work, we are assuming that the TCP handshake and -# TCP close will enter the IP code path and not use tcp fusion. -# if (( $# != 1 )); then print -u2 "expected one argument: " @@ -123,10 +120,10 @@ tcp:::receive END { printf("Minimum TCP events seen\n\n"); - printf("ip:::send - %s\n", ipsend >= 5 ? "yes" : "no"); - printf("ip:::receive - %s\n", ipreceive >= 5 ? "yes" : "no"); - printf("tcp:::send - %s\n", tcpsend >= 5 ? "yes" : "no"); - printf("tcp:::receive - %s\n", tcpreceive >= 5 ? "yes" : "no"); + printf("ip:::send - %s\n", ipsend >= 7 ? "yes" : "no"); + printf("ip:::receive - %s\n", ipreceive >= 7 ? "yes" : "no"); + printf("tcp:::send - %s\n", tcpsend >= 7 ? "yes" : "no"); + printf("tcp:::receive - %s\n", tcpreceive >= 7 ? "yes" : "no"); } EODTRACE Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4remotetcp.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4remotetcp.ksh Sun Jul 22 05:37:58 2018 (r336596) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4remotetcp.ksh Sun Jul 22 10:50:59 2018 (r336597) @@ -39,11 +39,12 @@ # This test performs a TCP connection and checks that at least the # following packet counts were traced: # -# 3 x ip:::send (2 during the TCP handshake, then a FIN) -# 3 x tcp:::send (2 during the TCP handshake, then a FIN) -# 2 x ip:::receive (1 during the TCP handshake, then the FIN ACK) -# 2 x tcp:::receive (1 during the TCP handshake, then the FIN ACK) -# +# 4 x ip:::send (2 during connection setup, 2 during connection teardown) +# 4 x tcp:::send (2 during connection setup, 2 during connection teardown) +# 5 x ip:::receive (1 during connection setup, the response, 1 window update, +# 1 banner line, 2 during connection teardown) +# 5 x tcp:::receive (1 during connection setup, the response, 1 window update, +# 1 banner line, 2 during connection teardown) if (( $# != 1 )); then print -u2 "expected one argument: " @@ -75,6 +76,7 @@ cat > test.pl <<-EOPERL PeerPort => $tcpport, Timeout => 3); die "Could not connect to host $dest port $tcpport" unless \$s; + readline \$s; close \$s; sleep(2); EOPERL @@ -114,10 +116,10 @@ tcp:::receive END { printf("Minimum TCP events seen\n\n"); - printf("ip:::send - %s\n", ipsend >= 3 ? "yes" : "no"); - printf("ip:::receive - %s\n", ipreceive >= 2 ? "yes" : "no"); - printf("tcp:::send - %s\n", tcpsend >= 3 ? "yes" : "no"); - printf("tcp:::receive - %s\n", tcpreceive >= 2 ? "yes" : "no"); + printf("ip:::send - %s\n", ipsend >= 4 ? "yes" : "no"); + printf("ip:::receive - %s\n", ipreceive >= 5 ? "yes" : "no"); + printf("tcp:::send - %s\n", tcpsend >= 4 ? "yes" : "no"); + printf("tcp:::receive - %s\n", tcpreceive >= 5 ? "yes" : "no"); } EODTRACE Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.localtcpstate.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.localtcpstate.ksh Sun Jul 22 05:37:58 2018 (r336596) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.localtcpstate.ksh Sun Jul 22 10:50:59 2018 (r336597) @@ -42,18 +42,14 @@ # This test performs a TCP connection and checks that at least the # following packet counts were traced: # -# 3 x ip:::send (2 during the TCP handshake, then a FIN) -# 4 x tcp:::send (2 during the TCP handshake, 1 message then a FIN) -# 2 x ip:::receive (1 during the TCP handshake, then the FIN ACK) -# 3 x tcp:::receive (1 during the TCP handshake, 1 message then the FIN ACK) +# 7 x ip:::send (3 during the setup, 4 during the teardown) +# 7 x tcp:::send (3 during the setup, 4 during the teardown) +# 7 x ip:::receive (3 during the setup, 4 during the teardown) +# 7 x tcp:::receive (3 during the setup, 4 during the teardown) # -# The actual ip count tested is 5 each way, since we are tracing both -# source and destination events. The actual tcp count tested is 7 -# each way, since the TCP fusion send/receive events will not reach IP. +# The actual count tested is 7 each way, since we are tracing both +# source and destination events. # -# For this test to work, we are assuming that the TCP handshake and -# TCP close will enter the IP code path and not use tcp fusion. -# if (( $# != 1 )); then print -u2 "expected one argument: " @@ -157,8 +153,8 @@ tcp:::accept-established END { printf("Minimum TCP events seen\n\n"); - printf("ip:::send - %s\n", ipsend >= 5 ? "yes" : "no"); - printf("ip:::receive - %s\n", ipreceive >= 5 ? "yes" : "no"); + printf("ip:::send - %s\n", ipsend >= 7 ? "yes" : "no"); + printf("ip:::receive - %s\n", ipreceive >= 7 ? "yes" : "no"); printf("tcp:::send - %s\n", tcpsend >= 7 ? "yes" : "no"); printf("tcp:::receive - %s\n", tcpreceive >= 7 ? "yes" : "no"); printf("tcp:::state-change to syn-sent - %s\n", Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.remotetcpstate.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.remotetcpstate.ksh Sun Jul 22 05:37:58 2018 (r336596) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.remotetcpstate.ksh Sun Jul 22 10:50:59 2018 (r336597) @@ -43,14 +43,13 @@ # This test performs a TCP connection to the ssh service (port 22) and # checks that at least the following packet counts were traced: # -# 4 x ip:::send (2 during the TCP handshake, the message, then a FIN) -# 4 x tcp:::send (2 during the TCP handshake, the messages, then a FIN) -# 3 x ip:::receive (1 during the TCP handshake, the response, then the FIN ACK) -# 3 x tcp:::receive (1 during the TCP handshake, the response, then the FIN ACK) +# 4 x ip:::send (2 during connection setup, 2 during connection teardown) +# 4 x tcp:::send (2 during connection setup, 2 during connection teardown) +# 5 x ip:::receive (1 during connection setup, the response, 1 window update, +# 1 banner line, 2 during connection teardown) +# 5 x tcp:::receive (1 during connection setup, the response, 1 window update, +# 1 banner line, 2 during connection teardown) # -# For this test to work, we are assuming that the TCP handshake and -# TCP close will enter the IP code path and not use tcp fusion. -# if (( $# != 1 )); then print -u2 "expected one argument: " @@ -82,7 +81,7 @@ cat > test.pl <<-EOPERL PeerPort => $tcpport, Timeout => 3); die "Could not connect to host $dest port $tcpport" unless \$s; - print \$s "testing state machine transitions"; + readline \$s; close \$s; sleep(2); EOPERL @@ -145,9 +144,9 @@ END { printf("Minimum TCP events seen\n\n"); printf("ip:::send - %s\n", ipsend >= 4 ? "yes" : "no"); - printf("ip:::receive - %s\n", ipreceive >= 3 ? "yes" : "no"); + printf("ip:::receive - %s\n", ipreceive >= 5 ? "yes" : "no"); printf("tcp:::send - %s\n", tcpsend >= 4 ? "yes" : "no"); - printf("tcp:::receive - %s\n", tcpreceive >= 3 ? "yes" : "no"); + printf("tcp:::receive - %s\n", tcpreceive >= 5 ? "yes" : "no"); printf("tcp:::state-change to syn-sent - %s\n", state_event[TCP_STATE_SYN_SENT] >=1 ? "yes" : "no"); printf("tcp:::state-change to established - %s\n", Modified: head/cddl/usr.sbin/dtrace/tests/tools/exclude.sh ============================================================================== --- head/cddl/usr.sbin/dtrace/tests/tools/exclude.sh Sun Jul 22 05:37:58 2018 (r336596) +++ head/cddl/usr.sbin/dtrace/tests/tools/exclude.sh Sun Jul 22 10:50:59 2018 (r336597) @@ -121,9 +121,6 @@ exclude EXFAIL common/ip/tst.ipv4remotetcp.ksh exclude EXFAIL common/ip/tst.ipv4remoteudp.ksh exclude EXFAIL common/ip/tst.ipv6remoteicmp.ksh exclude EXFAIL common/ip/tst.ipv4remoteicmp.ksh - -# FreeBSD never places tcpcbs in the TIME_WAIT state, so the probe never fires. -exclude EXFAIL common/ip/tst.localtcpstate.ksh exclude EXFAIL common/ip/tst.remotetcpstate.ksh # Tries to enable pid$target:libc::entry, though there's no "libc" module. From owner-svn-src-head@freebsd.org Sun Jul 22 12:02: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 7A32D1049B6B; Sun, 22 Jul 2018 12:02:09 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E77AC72A17; Sun, 22 Jul 2018 12:02:08 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C8AE05BE9; Sun, 22 Jul 2018 12:02:08 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6MC28jF005295; Sun, 22 Jul 2018 12:02:08 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6MC27de005288; Sun, 22 Jul 2018 12:02:07 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201807221202.w6MC27de005288@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sun, 22 Jul 2018 12:02:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336598 - head/release/arm X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/release/arm X-SVN-Commit-Revision: 336598 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: Sun, 22 Jul 2018 12:02:09 -0000 Author: manu Date: Sun Jul 22 12:02:07 2018 New Revision: 336598 URL: https://svnweb.freebsd.org/changeset/base/336598 Log: release: Uniform release arm image size Create a 50m fat16 for all boards. Reviewed by: gjb Differential Revision: https://reviews.freebsd.org/D16238 Modified: head/release/arm/BANANAPI.conf head/release/arm/BEAGLEBONE.conf head/release/arm/CUBIEBOARD.conf head/release/arm/CUBIEBOARD2.conf head/release/arm/GUMSTIX.conf head/release/arm/PANDABOARD.conf head/release/arm/RPI-B.conf Modified: head/release/arm/BANANAPI.conf ============================================================================== --- head/release/arm/BANANAPI.conf Sun Jul 22 10:50:59 2018 (r336597) +++ head/release/arm/BANANAPI.conf Sun Jul 22 12:02:07 2018 (r336598) @@ -7,7 +7,7 @@ EMBEDDED_TARGET_ARCH="armv7" EMBEDDED_TARGET="arm" EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-bananapi" -FAT_SIZE="32m -b 1m" +FAT_SIZE="50m -b 1m" FAT_TYPE="16" IMAGE_SIZE="3072M" KERNEL="GENERIC" Modified: head/release/arm/BEAGLEBONE.conf ============================================================================== --- head/release/arm/BEAGLEBONE.conf Sun Jul 22 10:50:59 2018 (r336597) +++ head/release/arm/BEAGLEBONE.conf Sun Jul 22 12:02:07 2018 (r336598) @@ -7,7 +7,7 @@ EMBEDDED_TARGET_ARCH="armv7" EMBEDDED_TARGET="arm" EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-beaglebone" -FAT_SIZE="41m" +FAT_SIZE="50m" FAT_TYPE="16" IMAGE_SIZE="3072M" KERNEL="GENERIC" Modified: head/release/arm/CUBIEBOARD.conf ============================================================================== --- head/release/arm/CUBIEBOARD.conf Sun Jul 22 10:50:59 2018 (r336597) +++ head/release/arm/CUBIEBOARD.conf Sun Jul 22 12:02:07 2018 (r336598) @@ -7,7 +7,7 @@ EMBEDDED_TARGET_ARCH="armv7" EMBEDDED_TARGET="arm" EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-cubieboard" -FAT_SIZE="32m -b 1m" +FAT_SIZE="50m -b 1m" FAT_TYPE="16" IMAGE_SIZE="3072M" KERNEL="GENERIC" Modified: head/release/arm/CUBIEBOARD2.conf ============================================================================== --- head/release/arm/CUBIEBOARD2.conf Sun Jul 22 10:50:59 2018 (r336597) +++ head/release/arm/CUBIEBOARD2.conf Sun Jul 22 12:02:07 2018 (r336598) @@ -7,7 +7,7 @@ EMBEDDED_TARGET_ARCH="armv7" EMBEDDED_TARGET="arm" EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-cubieboard2" -FAT_SIZE="32m -b 1m" +FAT_SIZE="50m -b 1m" FAT_TYPE="16" IMAGE_SIZE="3072M" KERNEL="GENERIC" Modified: head/release/arm/GUMSTIX.conf ============================================================================== --- head/release/arm/GUMSTIX.conf Sun Jul 22 10:50:59 2018 (r336597) +++ head/release/arm/GUMSTIX.conf Sun Jul 22 12:02:07 2018 (r336598) @@ -7,7 +7,7 @@ EMBEDDED_TARGET_ARCH="arm" EMBEDDED_TARGET="arm" EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-duovero" -FAT_SIZE="41m" +FAT_SIZE="50m" FAT_TYPE="16" IMAGE_SIZE="3072M" KERNEL="GUMSTIX" Modified: head/release/arm/PANDABOARD.conf ============================================================================== --- head/release/arm/PANDABOARD.conf Sun Jul 22 10:50:59 2018 (r336597) +++ head/release/arm/PANDABOARD.conf Sun Jul 22 12:02:07 2018 (r336598) @@ -7,7 +7,7 @@ EMBEDDED_TARGET_ARCH="armv7" EMBEDDED_TARGET="arm" EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-pandaboard" -FAT_SIZE="41m" +FAT_SIZE="50m" FAT_TYPE="16" IMAGE_SIZE="3072M" KERNEL="GENERIC" Modified: head/release/arm/RPI-B.conf ============================================================================== --- head/release/arm/RPI-B.conf Sun Jul 22 10:50:59 2018 (r336597) +++ head/release/arm/RPI-B.conf Sun Jul 22 12:02:07 2018 (r336598) @@ -7,7 +7,7 @@ EMBEDDED_TARGET_ARCH="armv6" EMBEDDED_TARGET="arm" EMBEDDEDBUILD=1 EMBEDDEDPORTS="sysutils/u-boot-rpi sysutils/rpi-firmware" -FAT_SIZE="41m" +FAT_SIZE="50m" FAT_TYPE="16" IMAGE_SIZE="3072M" KERNEL="RPI-B" From owner-svn-src-head@freebsd.org Sun Jul 22 12:03: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 4FBCA1049D2E; Sun, 22 Jul 2018 12:03:20 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 023D172D44; Sun, 22 Jul 2018 12:03:20 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D793C5C12; Sun, 22 Jul 2018 12:03:19 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6MC3JF5007610; Sun, 22 Jul 2018 12:03:19 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6MC3HRv007601; Sun, 22 Jul 2018 12:03:17 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201807221203.w6MC3HRv007601@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sun, 22 Jul 2018 12:03:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336599 - in head/release: . arm arm64 tools X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/release: . arm arm64 tools X-SVN-Commit-Revision: 336599 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: Sun, 22 Jul 2018 12:03:20 -0000 Author: manu Date: Sun Jul 22 12:03:17 2018 New Revision: 336599 URL: https://svnweb.freebsd.org/changeset/base/336599 Log: release: Add arm_install_boot to install the commit boot bits This reduce the per-board arm_install_uboot to just install u-boot. While here remove the installation of rpi.dtb and rpi2.dtb as we load them from the UFS partition via ubldr. Reviewed by: gjb, imp (older version) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D16239 Modified: head/release/arm/BANANAPI.conf head/release/arm/BEAGLEBONE.conf head/release/arm/RPI-B.conf head/release/arm/RPI2.conf head/release/arm/WANDBOARD.conf head/release/arm64/PINE64.conf head/release/arm64/RPI3.conf head/release/release.sh head/release/tools/arm.subr Modified: head/release/arm/BANANAPI.conf ============================================================================== --- head/release/arm/BANANAPI.conf Sun Jul 22 12:02:07 2018 (r336598) +++ head/release/arm/BANANAPI.conf Sun Jul 22 12:03:17 2018 (r336599) @@ -19,22 +19,8 @@ export BOARDNAME="BANANAPI" arm_install_uboot() { UBOOT_DIR="/usr/local/share/u-boot/u-boot-bananapi" UBOOT_FILES="u-boot-sunxi-with-spl.bin" - FATMOUNT="${DESTDIR%${KERNEL}}/fat" - UFSMOUNT="${DESTDIR%${KERNEL}}/ufs" chroot ${CHROOTDIR} dd if=${UBOOT_DIR}/${UBOOT_FILES} \ of=/dev/${mddev} bs=1k seek=8 conv=sync - chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" - chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} - chroot ${CHROOTDIR} cp ${UBOOT_DIR}/boot.scr ${FATMOUNT}/boot.scr - chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT} - chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr.bin \ - ${FATMOUNT}/ubldr.bin - chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot - sync - umount_loop ${CHROOTDIR}/${FATMOUNT} - umount_loop ${CHROOTDIR}/${UFSMOUNT} - chroot ${CHROOTDIR} rmdir ${FATMOUNT} - chroot ${CHROOTDIR} rmdir ${UFSMOUNT} return 0 } Modified: head/release/arm/BEAGLEBONE.conf ============================================================================== --- head/release/arm/BEAGLEBONE.conf Sun Jul 22 12:02:07 2018 (r336598) +++ head/release/arm/BEAGLEBONE.conf Sun Jul 22 12:03:17 2018 (r336599) @@ -19,21 +19,14 @@ export BOARDNAME="BEAGLEBONE" arm_install_uboot() { UBOOT_DIR="/usr/local/share/u-boot/u-boot-beaglebone" FATMOUNT="${DESTDIR%${KERNEL}}/fat" - UFSMOUNT="${DESTDIR%${KERNEL}}/ufs" - chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" + chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} - chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT} chroot ${CHROOTDIR} cp -p ${UBOOT_DIR}/MLO ${FATMOUNT}/MLO chroot ${CHROOTDIR} cp -p ${UBOOT_DIR}/u-boot.img ${FATMOUNT}/u-boot.img chroot ${CHROOTDIR} cp ${UBOOT_DIR}/boot.scr ${FATMOUNT}/boot.scr - chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr.bin \ - ${FATMOUNT}/ubldr.bin - chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot sync umount_loop ${CHROOTDIR}/${FATMOUNT} - umount_loop ${CHROOTDIR}/${UFSMOUNT} chroot ${CHROOTDIR} rmdir ${FATMOUNT} - chroot ${CHROOTDIR} rmdir ${UFSMOUNT} return 0 } Modified: head/release/arm/RPI-B.conf ============================================================================== --- head/release/arm/RPI-B.conf Sun Jul 22 12:02:07 2018 (r336598) +++ head/release/arm/RPI-B.conf Sun Jul 22 12:03:17 2018 (r336599) @@ -23,10 +23,8 @@ arm_install_uboot() { fixup.dat fixup_cd.dat fixup_db.dat fixup_x.dat \ start.elf start_cd.elf start_db.elf start_x.elf" FATMOUNT="${DESTDIR%${KERNEL}}/fat" - UFSMOUNT="${DESTDIR%${KERNEL}}/ufs" - chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" + chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} - chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT} for _UF in ${UBOOT_FILES}; do chroot ${CHROOTDIR} cp -p ${UBOOT_DIR}/${_UF} \ ${FATMOUNT}/${_UF} @@ -35,17 +33,10 @@ arm_install_uboot() { chroot ${CHROOTDIR} cp -p ${RPI_FIRMWARE_DIR}/${_UF} \ ${FATMOUNT}/${_UF} done - chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr.bin \ - ${FATMOUNT}/ubldr.bin - chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/dtb/rpi.dtb \ - ${FATMOUNT}/rpi.dtb chroot ${CHROOTDIR} cp ${UBOOT_DIR}/boot.scr ${FATMOUNT}/boot.scr - chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot sync umount_loop ${CHROOTDIR}/${FATMOUNT} - umount_loop ${CHROOTDIR}/${UFSMOUNT} chroot ${CHROOTDIR} rmdir ${FATMOUNT} - chroot ${CHROOTDIR} rmdir ${UFSMOUNT} return 0 } Modified: head/release/arm/RPI2.conf ============================================================================== --- head/release/arm/RPI2.conf Sun Jul 22 12:02:07 2018 (r336598) +++ head/release/arm/RPI2.conf Sun Jul 22 12:03:17 2018 (r336599) @@ -24,10 +24,8 @@ arm_install_uboot() { fixup.dat fixup_cd.dat fixup_db.dat fixup_x.dat \ start.elf start_cd.elf start_db.elf start_x.elf" FATMOUNT="${DESTDIR%${KERNEL}}/fat" - UFSMOUNT="${DESTDIR%${KERNEL}}/ufs" - chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" + chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} - chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT} for _UF in ${UBOOT_FILES}; do chroot ${CHROOTDIR} cp -p ${UBOOT_DIR}/${_UF} \ ${FATMOUNT}/${_UF} @@ -36,17 +34,10 @@ arm_install_uboot() { chroot ${CHROOTDIR} cp -p ${RPI_FIRMWARE_DIR}/${_UF} \ ${FATMOUNT}/${_UF} done - chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr.bin \ - ${FATMOUNT}/ubldr.bin - chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/dtb/rpi2.dtb \ - ${FATMOUNT}/rpi2.dtb chroot ${CHROOTDIR} cp ${UBOOT_DIR}/boot.scr ${FATMOUNT}/boot.scr - chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot sync umount_loop ${CHROOTDIR}/${FATMOUNT} - umount_loop ${CHROOTDIR}/${UFSMOUNT} chroot ${CHROOTDIR} rmdir ${FATMOUNT} - chroot ${CHROOTDIR} rmdir ${UFSMOUNT} return 0 } Modified: head/release/arm/WANDBOARD.conf ============================================================================== --- head/release/arm/WANDBOARD.conf Sun Jul 22 12:02:07 2018 (r336598) +++ head/release/arm/WANDBOARD.conf Sun Jul 22 12:03:17 2018 (r336599) @@ -19,22 +19,8 @@ export BOARDNAME="WANDBOARD" arm_install_uboot() { UBOOT_DIR="/usr/local/share/u-boot/u-boot-wandboard" UBOOT_FILES="u-boot.imx" - FATMOUNT="${DESTDIR%${KERNEL}}/fat" - UFSMOUNT="${DESTDIR%${KERNEL}}/ufs" chroot ${CHROOTDIR} dd if=${UBOOT_DIR}/${UBOOT_FILES} \ of=/dev/${mddev} bs=512 seek=2 conv=sync - chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" - chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} - chroot ${CHROOTDIR} cp ${UBOOT_DIR}/boot.scr ${FATMOUNT}/boot.scr - chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT} - chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr.bin \ - ${FATMOUNT}/ubldr.bin - chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot - sync - umount_loop ${CHROOTDIR}/${FATMOUNT} - umount_loop ${CHROOTDIR}/${UFSMOUNT} - chroot ${CHROOTDIR} rmdir ${FATMOUNT} - chroot ${CHROOTDIR} rmdir ${UFSMOUNT} return 0 } Modified: head/release/arm64/PINE64.conf ============================================================================== --- head/release/arm64/PINE64.conf Sun Jul 22 12:02:07 2018 (r336598) +++ head/release/arm64/PINE64.conf Sun Jul 22 12:03:17 2018 (r336599) @@ -19,29 +19,8 @@ export BOARDNAME="PINE64" arm_install_uboot() { UBOOT_DIR="/usr/local/share/u-boot/u-boot-pine64" UBOOT_FILES="u-boot-sunxi-with-spl.bin" - FATMOUNT="${DESTDIR%${KERNEL}}fat" - UFSMOUNT="${DESTDIR%${KERNEL}}ufs" chroot ${CHROOTDIR} dd if=${UBOOT_DIR}/${UBOOT_FILES} \ of=/dev/${mddev} bs=1k seek=8 conv=sync - chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" - chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} - chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT} - - BOOTFILES="$(chroot ${CHROOTDIR} \ - env TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \ - WITH_UNIFIED_OBJDIR=yes \ - make -C ${WORLDDIR}/stand -V .OBJDIR)" - BOOTFILES="$(chroot ${CHROOTDIR} realpath ${BOOTFILES})" - - chroot ${CHROOTDIR} mkdir -p ${FATMOUNT}/EFI/BOOT - chroot ${CHROOTDIR} cp -p ${BOOTFILES}/efi/loader/loader.efi \ - ${FATMOUNT}/EFI/BOOT/bootaa64.efi - chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot - sync - umount_loop ${CHROOTDIR}/${FATMOUNT} - umount_loop ${CHROOTDIR}/${UFSMOUNT} - chroot ${CHROOTDIR} rmdir ${FATMOUNT} - chroot ${CHROOTDIR} rmdir ${UFSMOUNT} return 0 } Modified: head/release/arm64/RPI3.conf ============================================================================== --- head/release/arm64/RPI3.conf Sun Jul 22 12:02:07 2018 (r336598) +++ head/release/arm64/RPI3.conf Sun Jul 22 12:03:17 2018 (r336599) @@ -27,10 +27,8 @@ arm_install_uboot() { fixup_db.dat fixup_x.dat fixup.dat LICENCE.broadcom \ start_cd.elf start_db.elf start_x.elf start.elf ${DTB}" FATMOUNT="${DESTDIR%${KERNEL}}fat" - UFSMOUNT="${DESTDIR%${KERNEL}}ufs" - chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" + chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} - chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT} for _UF in ${UBOOT_FILES}; do chroot ${CHROOTDIR} cp -p ${UBOOT_DIR}/${_UF} \ ${FATMOUNT}/${_UF} @@ -47,21 +45,9 @@ arm_install_uboot() { ${FATMOUNT}/overlays/${_OL} done - BOOTFILES="$(chroot ${CHROOTDIR} \ - env TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \ - WITH_UNIFIED_OBJDIR=yes \ - make -C ${WORLDDIR}/stand -V .OBJDIR)" - BOOTFILES="$(chroot ${CHROOTDIR} realpath ${BOOTFILES})" - - chroot ${CHROOTDIR} mkdir -p ${FATMOUNT}/EFI/BOOT - chroot ${CHROOTDIR} cp -p ${BOOTFILES}/efi/loader/loader.efi \ - ${FATMOUNT}/EFI/BOOT/bootaa64.efi - chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot sync umount_loop ${CHROOTDIR}/${FATMOUNT} - umount_loop ${CHROOTDIR}/${UFSMOUNT} chroot ${CHROOTDIR} rmdir ${FATMOUNT} - chroot ${CHROOTDIR} rmdir ${UFSMOUNT} return 0 } Modified: head/release/release.sh ============================================================================== --- head/release/release.sh Sun Jul 22 12:02:07 2018 (r336598) +++ head/release/release.sh Sun Jul 22 12:03:17 2018 (r336599) @@ -358,6 +358,21 @@ chroot_build_release() { return 0 } # chroot_build_release() +efi_boot_name() +{ + case $1 in + arm) + echo "bootarm.efi" + ;; + arm64) + echo "bootaa64.efi" + ;; + amd64) + echo "bootx86.efi" + ;; + esac +} + # chroot_arm_build_release(): Create arm SD card image. chroot_arm_build_release() { load_target_env @@ -387,6 +402,7 @@ chroot_arm_build_release() { mdconfig -f ${IMGBASE##${CHROOTDIR}} ${MD_ARGS}) arm_create_disk arm_install_base + arm_install_boot arm_install_uboot mdconfig -d -u ${mddev} chroot ${CHROOTDIR} rmdir ${DESTDIR} Modified: head/release/tools/arm.subr ============================================================================== --- head/release/tools/arm.subr Sun Jul 22 12:02:07 2018 (r336598) +++ head/release/tools/arm.subr Sun Jul 22 12:03:17 2018 (r336599) @@ -165,6 +165,36 @@ arm_install_base() { return 0 } +arm_install_boot() { + FATMOUNT="${DESTDIR%${KERNEL}}/fat" + UFSMOUNT="${DESTDIR%${KERNEL}}/ufs" + chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" + chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} + chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT} + + if [ "${EMBEDDED_TARGET}" == "arm" ]; then + chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr.bin \ + ${FATMOUNT}/ubldr.bin + fi + + BOOTFILES="$(chroot ${CHROOTDIR} \ + env TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \ + WITH_UNIFIED_OBJDIR=yes \ + make -C ${WORLDDIR}/stand -V .OBJDIR)" + BOOTFILES="$(chroot ${CHROOTDIR} realpath ${BOOTFILES})" + + chroot ${CHROOTDIR} mkdir -p ${FATMOUNT}/EFI/BOOT + chroot ${CHROOTDIR} cp -p ${BOOTFILES}/efi/loader/loader.efi \ + ${FATMOUNT}/EFI/BOOT/$(efi_boot_name ${EMBEDDED_TARGET}) + + chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot + sync + umount_loop ${CHROOTDIR}/${FATMOUNT} + umount_loop ${CHROOTDIR}/${UFSMOUNT} + chroot ${CHROOTDIR} rmdir ${FATMOUNT} + chroot ${CHROOTDIR} rmdir ${UFSMOUNT} +} + arm_install_uboot() { # Override in the arm/KERNEL.conf file. From owner-svn-src-head@freebsd.org Sun Jul 22 12:04: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 8E5321049EBE; Sun, 22 Jul 2018 12:04:22 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4140272F18; Sun, 22 Jul 2018 12:04:22 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 084C55C1B; Sun, 22 Jul 2018 12:04:22 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6MC4LiA007695; Sun, 22 Jul 2018 12:04:21 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6MC4La8007693; Sun, 22 Jul 2018 12:04:21 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201807221204.w6MC4La8007693@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sun, 22 Jul 2018 12:04:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336600 - head/release/arm X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/release/arm X-SVN-Commit-Revision: 336600 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: Sun, 22 Jul 2018 12:04:22 -0000 Author: manu Date: Sun Jul 22 12:04:21 2018 New Revision: 336600 URL: https://svnweb.freebsd.org/changeset/base/336600 Log: release: Add rpi firmware dtb and mmc overlays for RPI-B and RPI2 This is needed with new u-boot that uses the rpi-firmware dtbs. Reviewed by: gjb MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D16240 Modified: head/release/arm/RPI-B.conf head/release/arm/RPI2.conf Modified: head/release/arm/RPI-B.conf ============================================================================== --- head/release/arm/RPI-B.conf Sun Jul 22 12:03:17 2018 (r336599) +++ head/release/arm/RPI-B.conf Sun Jul 22 12:04:21 2018 (r336600) @@ -13,6 +13,7 @@ IMAGE_SIZE="3072M" KERNEL="RPI-B" MD_ARGS="-x 63 -y 255" NODOC=1 +OVERLAYS="mmc.dtbo pi3-disable-bt.dtbo" PART_SCHEME="MBR" arm_install_uboot() { @@ -21,7 +22,9 @@ arm_install_uboot() { UBOOT_FILES="u-boot.bin" RPI_FIRMWARE_FILES="bootcode.bin config.txt \ fixup.dat fixup_cd.dat fixup_db.dat fixup_x.dat \ - start.elf start_cd.elf start_db.elf start_x.elf" + start.elf start_cd.elf start_db.elf start_x.elf \ + bcm2708-rpi-0-w.dtb bcm2708-rpi-b-plus.dtb bcm2708-rpi-b.dtb \ + bcm2708-rpi-cm.dtb" FATMOUNT="${DESTDIR%${KERNEL}}/fat" chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} @@ -32,6 +35,11 @@ arm_install_uboot() { for _UF in ${RPI_FIRMWARE_FILES}; do chroot ${CHROOTDIR} cp -p ${RPI_FIRMWARE_DIR}/${_UF} \ ${FATMOUNT}/${_UF} + done + chroot ${CHROOTDIR} mkdir -p ${FATMOUNT}/overlays + for _OL in ${OVERLAYS}; do + chroot ${CHROOTDIR} cp -p ${OL_DIR}/${_OL} \ + ${FATMOUNT}/overlays/${_OL} done chroot ${CHROOTDIR} cp ${UBOOT_DIR}/boot.scr ${FATMOUNT}/boot.scr sync Modified: head/release/arm/RPI2.conf ============================================================================== --- head/release/arm/RPI2.conf Sun Jul 22 12:03:17 2018 (r336599) +++ head/release/arm/RPI2.conf Sun Jul 22 12:04:21 2018 (r336600) @@ -13,6 +13,7 @@ IMAGE_SIZE="3072M" KERNEL="GENERIC" MD_ARGS="-x 63 -y 255" NODOC=1 +OVERLAYS="mmc.dtbo" PART_SCHEME="MBR" export BOARDNAME="RPI2" @@ -22,7 +23,8 @@ arm_install_uboot() { UBOOT_FILES="u-boot.bin" RPI_FIRMWARE_FILES="bootcode.bin config.txt \ fixup.dat fixup_cd.dat fixup_db.dat fixup_x.dat \ - start.elf start_cd.elf start_db.elf start_x.elf" + start.elf start_cd.elf start_db.elf start_x.elf \ + bcm2709-rpi-2-b.dtb" FATMOUNT="${DESTDIR%${KERNEL}}/fat" chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT} @@ -33,6 +35,11 @@ arm_install_uboot() { for _UF in ${RPI_FIRMWARE_FILES}; do chroot ${CHROOTDIR} cp -p ${RPI_FIRMWARE_DIR}/${_UF} \ ${FATMOUNT}/${_UF} + done + chroot ${CHROOTDIR} mkdir -p ${FATMOUNT}/overlays + for _OL in ${OVERLAYS}; do + chroot ${CHROOTDIR} cp -p ${OL_DIR}/${_OL} \ + ${FATMOUNT}/overlays/${_OL} done chroot ${CHROOTDIR} cp ${UBOOT_DIR}/boot.scr ${FATMOUNT}/boot.scr sync From owner-svn-src-head@freebsd.org Sun Jul 22 12:05: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 B12741049F6C; Sun, 22 Jul 2018 12:05:20 +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 09BDF73089; Sun, 22 Jul 2018 12:05:19 +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 9ac59917; Sun, 22 Jul 2018 14:05:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=mail; bh=TZTJ6c3+gG/+ qtM3rowG/kgDd5o=; b=H4jtf2s8vQGS1hx63se4YRkTvV7e7Zkml8SPgFkJlRwO esb6QgqkzSpepkcQGS9dvfm8cN0xRvS52OzE3Gm/2ZI/rL3KKryLeY9KM3ETlNjk dPrT0MrBfcILTAFWMT6cXwEdbAd3KFYzNRAY6cudKTKPpJtrziwttX/bSvs9i/A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; q=dns; s=mail; b=dGZSda c6w9hq5u6XEnEA4TQ7lIo/IEZj4M8V2+hXJOGygePZxtKsv+aKcE97E6mmytgPXg pt+3AMvLxbG/yN2oZtFRml87Jx9vP9WT5DTNLD9Du7nt5mR8KcSuryyD9TpQ/Z6f DIlRf303HExxnwSzd9Y/KDkXv/OYYp0GL8ML8= 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 dbf9e810 TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Sun, 22 Jul 2018 14:05:11 +0200 (CEST) Date: Sun, 22 Jul 2018 14:05:11 +0200 From: Emmanuel Vadot To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336598 - head/release/arm Message-Id: <20180722140511.c07019d5b292a8c7faa566e9@bidouilliste.com> In-Reply-To: <201807221202.w6MC27de005288@repo.freebsd.org> References: <201807221202.w6MC27de005288@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.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: Sun, 22 Jul 2018 12:05:20 -0000 On Sun, 22 Jul 2018 12:02:07 +0000 (UTC) Emmanuel Vadot wrote: > Author: manu > Date: Sun Jul 22 12:02:07 2018 > New Revision: 336598 > URL: https://svnweb.freebsd.org/changeset/base/336598 > > Log: > release: Uniform release arm image size > > Create a 50m fat16 for all boards. > > Reviewed by: gjb > Differential Revision: https://reviews.freebsd.org/D16238 MFC after: 3 days > Modified: > head/release/arm/BANANAPI.conf > head/release/arm/BEAGLEBONE.conf > head/release/arm/CUBIEBOARD.conf > head/release/arm/CUBIEBOARD2.conf > head/release/arm/GUMSTIX.conf > head/release/arm/PANDABOARD.conf > head/release/arm/RPI-B.conf > > Modified: head/release/arm/BANANAPI.conf > ============================================================================== > --- head/release/arm/BANANAPI.conf Sun Jul 22 10:50:59 2018 (r336597) > +++ head/release/arm/BANANAPI.conf Sun Jul 22 12:02:07 2018 (r336598) > @@ -7,7 +7,7 @@ EMBEDDED_TARGET_ARCH="armv7" > EMBEDDED_TARGET="arm" > EMBEDDEDBUILD=1 > EMBEDDEDPORTS="sysutils/u-boot-bananapi" > -FAT_SIZE="32m -b 1m" > +FAT_SIZE="50m -b 1m" > FAT_TYPE="16" > IMAGE_SIZE="3072M" > KERNEL="GENERIC" > > Modified: head/release/arm/BEAGLEBONE.conf > ============================================================================== > --- head/release/arm/BEAGLEBONE.conf Sun Jul 22 10:50:59 2018 (r336597) > +++ head/release/arm/BEAGLEBONE.conf Sun Jul 22 12:02:07 2018 (r336598) > @@ -7,7 +7,7 @@ EMBEDDED_TARGET_ARCH="armv7" > EMBEDDED_TARGET="arm" > EMBEDDEDBUILD=1 > EMBEDDEDPORTS="sysutils/u-boot-beaglebone" > -FAT_SIZE="41m" > +FAT_SIZE="50m" > FAT_TYPE="16" > IMAGE_SIZE="3072M" > KERNEL="GENERIC" > > Modified: head/release/arm/CUBIEBOARD.conf > ============================================================================== > --- head/release/arm/CUBIEBOARD.conf Sun Jul 22 10:50:59 2018 (r336597) > +++ head/release/arm/CUBIEBOARD.conf Sun Jul 22 12:02:07 2018 (r336598) > @@ -7,7 +7,7 @@ EMBEDDED_TARGET_ARCH="armv7" > EMBEDDED_TARGET="arm" > EMBEDDEDBUILD=1 > EMBEDDEDPORTS="sysutils/u-boot-cubieboard" > -FAT_SIZE="32m -b 1m" > +FAT_SIZE="50m -b 1m" > FAT_TYPE="16" > IMAGE_SIZE="3072M" > KERNEL="GENERIC" > > Modified: head/release/arm/CUBIEBOARD2.conf > ============================================================================== > --- head/release/arm/CUBIEBOARD2.conf Sun Jul 22 10:50:59 2018 (r336597) > +++ head/release/arm/CUBIEBOARD2.conf Sun Jul 22 12:02:07 2018 (r336598) > @@ -7,7 +7,7 @@ EMBEDDED_TARGET_ARCH="armv7" > EMBEDDED_TARGET="arm" > EMBEDDEDBUILD=1 > EMBEDDEDPORTS="sysutils/u-boot-cubieboard2" > -FAT_SIZE="32m -b 1m" > +FAT_SIZE="50m -b 1m" > FAT_TYPE="16" > IMAGE_SIZE="3072M" > KERNEL="GENERIC" > > Modified: head/release/arm/GUMSTIX.conf > ============================================================================== > --- head/release/arm/GUMSTIX.conf Sun Jul 22 10:50:59 2018 (r336597) > +++ head/release/arm/GUMSTIX.conf Sun Jul 22 12:02:07 2018 (r336598) > @@ -7,7 +7,7 @@ EMBEDDED_TARGET_ARCH="arm" > EMBEDDED_TARGET="arm" > EMBEDDEDBUILD=1 > EMBEDDEDPORTS="sysutils/u-boot-duovero" > -FAT_SIZE="41m" > +FAT_SIZE="50m" > FAT_TYPE="16" > IMAGE_SIZE="3072M" > KERNEL="GUMSTIX" > > Modified: head/release/arm/PANDABOARD.conf > ============================================================================== > --- head/release/arm/PANDABOARD.conf Sun Jul 22 10:50:59 2018 (r336597) > +++ head/release/arm/PANDABOARD.conf Sun Jul 22 12:02:07 2018 (r336598) > @@ -7,7 +7,7 @@ EMBEDDED_TARGET_ARCH="armv7" > EMBEDDED_TARGET="arm" > EMBEDDEDBUILD=1 > EMBEDDEDPORTS="sysutils/u-boot-pandaboard" > -FAT_SIZE="41m" > +FAT_SIZE="50m" > FAT_TYPE="16" > IMAGE_SIZE="3072M" > KERNEL="GENERIC" > > Modified: head/release/arm/RPI-B.conf > ============================================================================== > --- head/release/arm/RPI-B.conf Sun Jul 22 10:50:59 2018 (r336597) > +++ head/release/arm/RPI-B.conf Sun Jul 22 12:02:07 2018 (r336598) > @@ -7,7 +7,7 @@ EMBEDDED_TARGET_ARCH="armv6" > EMBEDDED_TARGET="arm" > EMBEDDEDBUILD=1 > EMBEDDEDPORTS="sysutils/u-boot-rpi sysutils/rpi-firmware" > -FAT_SIZE="41m" > +FAT_SIZE="50m" > FAT_TYPE="16" > IMAGE_SIZE="3072M" > KERNEL="RPI-B" -- Emmanuel Vadot From owner-svn-src-head@freebsd.org Sun Jul 22 12:45: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 1D062104AE10; Sun, 22 Jul 2018 12:45:03 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B7530740D9; Sun, 22 Jul 2018 12:45:02 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 96DB66287; Sun, 22 Jul 2018 12:45:02 +0000 (UTC) (envelope-from pstef@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6MCj2M7028282; Sun, 22 Jul 2018 12:45:02 GMT (envelope-from pstef@FreeBSD.org) Received: (from pstef@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6MCj2W0028281; Sun, 22 Jul 2018 12:45:02 GMT (envelope-from pstef@FreeBSD.org) Message-Id: <201807221245.w6MCj2W0028281@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pstef set sender to pstef@FreeBSD.org using -f From: Piotr Pawel Stefaniak Date: Sun, 22 Jul 2018 12:45:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336601 - head X-SVN-Group: head X-SVN-Commit-Author: pstef X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 336601 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: Sun, 22 Jul 2018 12:45:03 -0000 Author: pstef Date: Sun Jul 22 12:45:02 2018 New Revision: 336601 URL: https://svnweb.freebsd.org/changeset/base/336601 Log: Remove old Kyua test files for indent(1) after a rename. This continues work in r334944. Reported by: asomers Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Jul 22 12:04:21 2018 (r336600) +++ head/ObsoleteFiles.inc Sun Jul 22 12:45:02 2018 (r336601) @@ -38,6 +38,13 @@ # xargs -n1 | sort | uniq -d; # done +# 20180722: indent(1) option renamed, test files follow +OLD_FILES+=usr/bin/indent/tests/nsac.0 +OLD_FILES+=usr/bin/indent/tests/nsac.0.pro +OLD_FILES+=usr/bin/indent/tests/nsac.0.stdout +OLD_FILES+=usr/bin/indent/tests/sac.0 +OLD_FILES+=usr/bin/indent/tests/sac.0.pro +OLD_FILES+=usr/bin/indent/tests/sac.0.stdout # 20180721: move of libmlx5.so.1 and libibverbs.so.1 OLD_LIBS+=usr/lib/libmlx5.so.1 OLD_LIBS+=usr/lib/libibverbs.so.1 From owner-svn-src-head@freebsd.org Sun Jul 22 13:40: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 2025D104BEAB; Sun, 22 Jul 2018 13:40:53 +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 C213475520; Sun, 22 Jul 2018 13:40:52 +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 8935E6AC4; Sun, 22 Jul 2018 13:40:52 +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 w6MDeq1R053635; Sun, 22 Jul 2018 13:40:52 GMT (envelope-from woodsb02@FreeBSD.org) Received: (from woodsb02@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6MDeqMs053634; Sun, 22 Jul 2018 13:40:52 GMT (envelope-from woodsb02@FreeBSD.org) Message-Id: <201807221340.w6MDeqMs053634@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: woodsb02 set sender to woodsb02@FreeBSD.org using -f From: Ben Woods Date: Sun, 22 Jul 2018 13:40:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336602 - head/lib/geom/eli X-SVN-Group: head X-SVN-Commit-Author: woodsb02 X-SVN-Commit-Paths: head/lib/geom/eli X-SVN-Commit-Revision: 336602 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: Sun, 22 Jul 2018 13:40:53 -0000 Author: woodsb02 (ports committer) Date: Sun Jul 22 13:40:52 2018 New Revision: 336602 URL: https://svnweb.freebsd.org/changeset/base/336602 Log: geli attach: Fix exit codes and errors not being printed after r335673 Now that multiple providers can be attached at once, exit codes and error messages must be handled correctly if there are failures in on any of the providers. Reported by: asomers (Kyua test failures via continuous integration) Reviewed by: asomers Approved by: allanjude Differential Revision: https://reviews.freebsd.org/D16386 Modified: head/lib/geom/eli/geom_eli.c Modified: head/lib/geom/eli/geom_eli.c ============================================================================== --- head/lib/geom/eli/geom_eli.c Sun Jul 22 12:45:02 2018 (r336601) +++ head/lib/geom/eli/geom_eli.c Sun Jul 22 13:40:52 2018 (r336602) @@ -941,18 +941,26 @@ eli_attach(struct gctl_req *req) prov = gctl_get_ascii(req, "arg%d", i); gctl_ro_param(r, "arg0", -1, prov); - if (eli_metadata_read(r, prov, &md) == -1) - return; + if (eli_metadata_read(r, prov, &md) == -1) { + /* + * Error reading metadata - details added to geom + * request by eli_metadata_read(). + */ + goto out; + } mediasize = g_get_mediasize(prov); if (md.md_provsize != (uint64_t)mediasize) { gctl_error(r, "Provider size mismatch."); - return; + goto out; } if (eli_genkey(r, &md, key, false) == NULL) { - explicit_bzero(key, sizeof(key)); - return; + /* + * Error generating key - details added to geom request + * by eli_genkey(). + */ + goto out; } gctl_ro_param(r, "key", sizeof(key), key); @@ -962,19 +970,20 @@ eli_attach(struct gctl_req *req) printf("Attached to %s.\n", prov); } +out: /* 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."); - } + if (r->error != NULL && r->error[0] != '\0') { + warnx("%s", r->error); + gctl_error(req, "There was an error with at least one provider."); + } gctl_free(r); - /* Clear the derived key */ + /* Clear sensitive data from memory. */ explicit_bzero(key, sizeof(key)); } - /* Clear the cached passphrase */ + /* Clear sensitive data from memory. */ explicit_bzero(cached_passphrase, sizeof(cached_passphrase)); } From owner-svn-src-head@freebsd.org Sun Jul 22 14:01: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 B8139104C671; Sun, 22 Jul 2018 14:01:50 +0000 (UTC) (envelope-from ganbold@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6483A76036; Sun, 22 Jul 2018 14:01:50 +0000 (UTC) (envelope-from ganbold@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 459326F4A; Sun, 22 Jul 2018 14:01:50 +0000 (UTC) (envelope-from ganbold@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6ME1oh5068656; Sun, 22 Jul 2018 14:01:50 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6ME1olL068655; Sun, 22 Jul 2018 14:01:50 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201807221401.w6ME1olL068655@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Sun, 22 Jul 2018 14:01:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336603 - head/sys/modules/dtb/allwinner X-SVN-Group: head X-SVN-Commit-Author: ganbold X-SVN-Commit-Paths: head/sys/modules/dtb/allwinner X-SVN-Commit-Revision: 336603 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: Sun, 22 Jul 2018 14:01:50 -0000 Author: ganbold Date: Sun Jul 22 14:01:49 2018 New Revision: 336603 URL: https://svnweb.freebsd.org/changeset/base/336603 Log: dtb/allwinner: Build sun8i-h2-plus-orangepi-r1.dts We have a u-boot port for this board so add the dtb to the build. Modified: head/sys/modules/dtb/allwinner/Makefile Modified: head/sys/modules/dtb/allwinner/Makefile ============================================================================== --- head/sys/modules/dtb/allwinner/Makefile Sun Jul 22 13:40:52 2018 (r336602) +++ head/sys/modules/dtb/allwinner/Makefile Sun Jul 22 14:01:49 2018 (r336603) @@ -12,6 +12,7 @@ DTS= \ sun7i-a20-olimex-som-evb.dts \ sun7i-a20-pcduino3.dts \ sun8i-a83t-bananapi-m3.dts \ + sun8i-h2-plus-orangepi-r1.dts \ sun8i-h2-plus-orangepi-zero.dts \ sun8i-h3-nanopi-m1.dts \ sun8i-h3-nanopi-m1-plus.dts \ From owner-svn-src-head@freebsd.org Sun Jul 22 14:08: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 DFEB6104C8F2; Sun, 22 Jul 2018 14:08:25 +0000 (UTC) (envelope-from ganbold@gmail.com) Received: from mail-qk0-x241.google.com (mail-qk0-x241.google.com [IPv6:2607:f8b0:400d:c09::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 68D4C76275; Sun, 22 Jul 2018 14:08:25 +0000 (UTC) (envelope-from ganbold@gmail.com) Received: by mail-qk0-x241.google.com with SMTP id o2-v6so8746897qkc.13; Sun, 22 Jul 2018 07:08:25 -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=riB6ZFpmrExVG6M0EElr+e8D6v+nWgSjdtN54JlcOVA=; b=QA2o2R42je6pUE1g9hQ7jSYJmWJ8UaS09Ksmc8UUxeMZ4+SfrL+eMYf0z2x021/WEI o4dJBye228LFb2/Ve8mo/kck+CVEZgggjs0eas+k9KJLzUjMpFANk6AhVGswQWNQEWe4 tHtdnUFUAEWMqGsekabvUyX6guv167upEmwsV9Z2NAKP6ruwOHrx78iaJZNKjQ25NENB OMS8SJInVhCHniGaYFR0gnjpHjJCHrCLC+gtFhjS81RcR+NxVB0kHrSyB0FxhM3+qCDy JETvdD1Ta2Y6sqXQXINIAkhZKjWcYpKOhw5XeI4R4Y37endgqofZANzpoo0F1ClpYsNS AzBA== 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=riB6ZFpmrExVG6M0EElr+e8D6v+nWgSjdtN54JlcOVA=; b=aMD/Jlux2fR14V6/8JQKCfzuPGeVGOShHxz4xXB7XNfY1yPZeXXdjtE46TT+oV4eUd Vn8hppZA/PmbCHmhQGNnGbZSB1w/A3u1bOVfvVjAKOTrc2bnqMsBdXIEiIHbQHJ2uI0E 8a5e+OSpjLZ4az/BFiqCmQnaIcpdtg9P7b1ifk+if7lxjN4w/A2yn1zKzJhLs58pIO2f 9ZBrLv5eVT0OzY6M15K+wOgUs+Ndm/lrBSUJio+iKtXoX6ZuxjSGBDxNXvtYT3A7j2Pq T4cHthcn9D2k4JNQKH4SkCZBlzUvmqGa/2KEaKig9P7cnu1m3xxW7k/8jmfW3t075ZjV 7Q5w== X-Gm-Message-State: AOUpUlHQmGLg9F7js8JIBwBnlaoZZLwilodDmJahyyasSJWo8LmRSkNe C5mUQxqiG44Y9wmSG6gBLzcmct11ZFXw3uQxizwRORZZ X-Google-Smtp-Source: AAOMgpfQPFCK1pxl0n2XXRzYDf5vW3DDDRjh/4M/Vop8KKBkI2K9qPxJSwIM2JA+Kw/r5kulnFkCnmpilJriIyoiHuU= X-Received: by 2002:a37:6251:: with SMTP id w78-v6mr8318849qkb.364.1532268504851; Sun, 22 Jul 2018 07:08:24 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac8:3182:0:0:0:0:0 with HTTP; Sun, 22 Jul 2018 07:08:24 -0700 (PDT) In-Reply-To: <201807221401.w6ME1olL068655@repo.freebsd.org> References: <201807221401.w6ME1olL068655@repo.freebsd.org> From: Ganbold Tsagaankhuu Date: Sun, 22 Jul 2018 22:08:24 +0800 Message-ID: Subject: Re: svn commit: r336603 - head/sys/modules/dtb/allwinner To: Ganbold Tsagaankhuu 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.27 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: Sun, 22 Jul 2018 14:08:26 -0000 On Sun, Jul 22, 2018 at 10:01 PM, Ganbold Tsagaankhuu wrote: > Author: ganbold > Date: Sun Jul 22 14:01:49 2018 > New Revision: 336603 > URL: https://svnweb.freebsd.org/changeset/base/336603 > > Log: > dtb/allwinner: Build sun8i-h2-plus-orangepi-r1.dts > We have a u-boot port for this board so add the dtb to the build. > the u-boot port hopefully will be added soon: https://reviews.freebsd.org/D16390 thanks, Ganbold > > Modified: > head/sys/modules/dtb/allwinner/Makefile > > Modified: head/sys/modules/dtb/allwinner/Makefile > ============================================================ > ================== > --- head/sys/modules/dtb/allwinner/Makefile Sun Jul 22 13:40:52 2018 > (r336602) > +++ head/sys/modules/dtb/allwinner/Makefile Sun Jul 22 14:01:49 2018 > (r336603) > @@ -12,6 +12,7 @@ DTS= \ > sun7i-a20-olimex-som-evb.dts \ > sun7i-a20-pcduino3.dts \ > sun8i-a83t-bananapi-m3.dts \ > + sun8i-h2-plus-orangepi-r1.dts \ > sun8i-h2-plus-orangepi-zero.dts \ > sun8i-h3-nanopi-m1.dts \ > sun8i-h3-nanopi-m1-plus.dts \ > > From owner-svn-src-head@freebsd.org Sun Jul 22 14:11: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 A6A50104CB35; Sun, 22 Jul 2018 14:11:53 +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 4F98D765F4; Sun, 22 Jul 2018 14:11:53 +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 30A7C70F7; Sun, 22 Jul 2018 14:11:53 +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 w6MEBr2r072044; Sun, 22 Jul 2018 14:11:53 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6MEBqpB072040; Sun, 22 Jul 2018 14:11:52 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201807221411.w6MEBqpB072040@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sun, 22 Jul 2018 14:11:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336604 - in head: sys/security/audit tests/sys/audit X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in head: sys/security/audit tests/sys/audit X-SVN-Commit-Revision: 336604 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: Sun, 22 Jul 2018 14:11:53 -0000 Author: asomers Date: Sun Jul 22 14:11:52 2018 New Revision: 336604 URL: https://svnweb.freebsd.org/changeset/base/336604 Log: Fix audit of chflagsat, lgetfh, and setfib These syscalls were always supposed to have been auditted, but due to oversights never were. PR: 228374 Reported by: aniketp Reviewed by: aniketp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D16388 Modified: head/sys/security/audit/audit_bsm.c head/tests/sys/audit/file-attribute-access.c head/tests/sys/audit/file-attribute-modify.c head/tests/sys/audit/network.c Modified: head/sys/security/audit/audit_bsm.c ============================================================================== --- head/sys/security/audit/audit_bsm.c Sun Jul 22 14:01:49 2018 (r336603) +++ head/sys/security/audit/audit_bsm.c Sun Jul 22 14:11:52 2018 (r336604) @@ -770,6 +770,7 @@ kaudit_to_bsm(struct kaudit_record *kar, struct au_rec case AUE_PROFILE: case AUE_RTPRIO: case AUE_SEMSYS: + case AUE_SETFIB: case AUE_SHMSYS: case AUE_SETPGRP: case AUE_SETRLIMIT: @@ -810,6 +811,7 @@ kaudit_to_bsm(struct kaudit_record *kar, struct au_rec case AUE_JAIL: case AUE_LUTIMES: case AUE_NFS_GETFH: + case AUE_LGETFH: case AUE_LSTAT: case AUE_LPATHCONF: case AUE_PATHCONF: @@ -851,6 +853,7 @@ kaudit_to_bsm(struct kaudit_record *kar, struct au_rec case AUE_CHFLAGS: case AUE_LCHFLAGS: + case AUE_CHFLAGSAT: if (ARG_IS_VALID(kar, ARG_FFLAGS)) { tok = au_to_arg32(2, "flags", ar->ar_arg_fflags); kau_write(rec, tok); Modified: head/tests/sys/audit/file-attribute-access.c ============================================================================== --- head/tests/sys/audit/file-attribute-access.c Sun Jul 22 14:01:49 2018 (r336603) +++ head/tests/sys/audit/file-attribute-access.c Sun Jul 22 14:11:52 2018 (r336604) @@ -383,9 +383,6 @@ ATF_TC_HEAD(lgetfh_success, tc) ATF_TC_BODY(lgetfh_success, tc) { - /* BSM conversion requested for unknown event 43061 */ - atf_tc_expect_fail("PR 228374: lgetfh(2) does not get audited in success mode"); - /* Symbolic link needs to exist to get a file-handle */ ATF_REQUIRE_EQ(0, symlink("symlink", path)); const char *regex = "lgetfh.*return,success"; @@ -409,9 +406,6 @@ ATF_TC_HEAD(lgetfh_failure, tc) ATF_TC_BODY(lgetfh_failure, tc) { - /* BSM conversion requested for unknown event 43061 */ - atf_tc_expect_fail("PR 228374: lgetfh(2) does not get audited in failure mode"); - const char *regex = "lgetfh.*return,failure"; FILE *pipefd = setup(fds, "fa"); /* Failure reason: symbolic link does not exist */ Modified: head/tests/sys/audit/file-attribute-modify.c ============================================================================== --- head/tests/sys/audit/file-attribute-modify.c Sun Jul 22 14:01:49 2018 (r336603) +++ head/tests/sys/audit/file-attribute-modify.c Sun Jul 22 14:11:52 2018 (r336604) @@ -701,9 +701,6 @@ ATF_TC_HEAD(chflagsat_success, tc) ATF_TC_BODY(chflagsat_success, tc) { - /* BSM conversion requested for unknown event 43209 */ - atf_tc_expect_fail("PR 228374: chflagsat(2) does not get audited in success mode"); - /* File needs to exist to call chflagsat(2) */ ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1); FILE *pipefd = setup(fds, auclass); @@ -727,9 +724,6 @@ ATF_TC_HEAD(chflagsat_failure, tc) ATF_TC_BODY(chflagsat_failure, tc) { - /* BSM conversion requested for unknown event 43209 */ - atf_tc_expect_fail("PR 228374: chflagsat(2) does not get audited in failure mode"); - FILE *pipefd = setup(fds, auclass); /* Failure reason: file does not exist */ ATF_REQUIRE_EQ(-1, chflagsat(AT_FDCWD, errpath, SF_IMMUTABLE, 0)); Modified: head/tests/sys/audit/network.c ============================================================================== --- head/tests/sys/audit/network.c Sun Jul 22 14:01:49 2018 (r336603) +++ head/tests/sys/audit/network.c Sun Jul 22 14:11:52 2018 (r336604) @@ -1097,9 +1097,6 @@ ATF_TC_HEAD(setfib_success, tc) ATF_TC_BODY(setfib_success, tc) { - /* BSM conversion requested for unknown event 43228 */ - atf_tc_expect_fail("PR 228374: setfib(2) does not get audited in success mode"); - pid = getpid(); snprintf(extregex, sizeof(extregex), "setfib.*%d.*return,success", pid); @@ -1123,9 +1120,6 @@ ATF_TC_HEAD(setfib_failure, tc) ATF_TC_BODY(setfib_failure, tc) { - /* BSM conversion requested for unknown event 43228 */ - atf_tc_expect_fail("PR 228374: setfib(2) does not get audited in failure mode"); - pid = getpid(); snprintf(extregex, sizeof(extregex), "setfib.*%d.*return,failure", pid); From owner-svn-src-head@freebsd.org Sun Jul 22 15:04: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 87AB8104DC9D; Sun, 22 Jul 2018 15:04:47 +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 C84A377BFE; Sun, 22 Jul 2018 15:04:46 +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 w6MF4b26027110; Sun, 22 Jul 2018 08:04:37 -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 w6MF4bWW027109; Sun, 22 Jul 2018 08:04:37 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201807221504.w6MF4bWW027109@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r336593 - head/release In-Reply-To: To: Matthew Macy Date: Sun, 22 Jul 2018 08:04:37 -0700 (PDT) CC: Colin Percival , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-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: Sun, 22 Jul 2018 15:04:47 -0000 > Build still works, but you're assuming that developers only use svn. No, he correctly assumed that RELEASE engineering only uses svn/svnlite for building release images. This Makefile is for production of official AMIs, official stuff always uses svn. > make[1]: "/usr/home/mmacy/devel/freebsd/Makefile.inc1" line 343: > SYSTEM_COMPILER: libclang will be built for bootstrapping a > cross-compiler. > make[1]: "/usr/home/mmacy/devel/freebsd/Makefile.inc1" line 348: > SYSTEM_LINKER: libclang will be built for bootstrapping a > cross-linker. > svn: E155007: '/usr/home/mmacy/devel/freebsd' is not a working copy > svn: E155007: '/usr/home/mmacy/devel/freebsd' is not a working copy > make[2]: "/usr/home/mmacy/devel/freebsd/release/Makefile.ec2" line 19: > warning: "/usr/local/bin/svn info --show-item last-changed-revision > /usr/home/mmacy/devel/freebsd/release/.." returned non-zero status > svn: E155007: '/usr/home/mmacy/devel/freebsd' is not a working copy > svn: E155007: '/usr/home/mmacy/devel/freebsd' is not a working copy > make[2]: "/usr/home/mmacy/devel/freebsd/release/Makefile.ec2" line 19: > warning: "/usr/local/bin/svn info --show-item last-changed-revision > /usr/home/mmacy/devel/freebsd/release/.." returned non-zero status > > On Sat, Jul 21, 2018 at 3:54 PM, Colin Percival wrote: > > Author: cperciva > > Date: Sat Jul 21 22:54:43 2018 > > New Revision: 336593 > > URL: https://svnweb.freebsd.org/changeset/base/336593 > > > > Log: > > Use svn or svnlite, or ${SVN_CMD} if set, for extracting the SVN branch > > and revision number announced in SNS notifications about new EC2 AMIs. > > > > While I'm here, incorporate that information into the AMI "description" > > fields, since it's more useful than simply echoing the information > > already provided via the AMI "name". > > > > Approved by: gjb > > > > Modified: > > head/release/Makefile.ec2 ^^^^^^^^^^ > > > > Modified: head/release/Makefile.ec2 > > ============================================================================== > > --- head/release/Makefile.ec2 Sat Jul 21 22:15:48 2018 (r336592) > > +++ head/release/Makefile.ec2 Sat Jul 21 22:54:43 2018 (r336593) > > @@ -5,6 +5,19 @@ > > # Makefile for creating an EC2 AMI from a disk image. > > # > > > > +# Figure out where SVN is > > +.if !defined(SVN_CMD) || empty(SVN_CMD) > > +. for _P in /usr/bin /usr/local/bin > > +. for _S in svn svnlite > > +. if exists(${_P}/${_S}) > > +SVN_CMD= ${_P}/${_S} > > +. endif > > +. endfor > > +. endfor > > +.endif > > +EC2_SVNBRANCH!= ${SVN_CMD} info --show-item relative-url ${WORLDDIR} | sed -e 's/\^\///' > > +EC2_SVNREV!= ${SVN_CMD} info --show-item last-changed-revision ${WORLDDIR} > > + > > .if ${BRANCH} == "CURRENT" || ${BRANCH} == "STABLE" || ${BRANCH} == "PRERELEASE" > > AMINAMESUFFIX!= date +-%Y-%m-%d > > .endif > > @@ -13,8 +26,6 @@ PUBLISH= --public > > .endif > > .if defined(EC2SNSTOPIC) && !empty(EC2SNSTOPIC) > > EC2SNSREL= ${REVISION}-${BRANCH} > > -EC2_SVNBRANCH!= svn info --show-item relative-url ${WORLDDIR} | sed -e 's/\^\///' > > -EC2_SVNREV!= svn info --show-item last-changed-revision ${WORLDDIR} > > EC2SNSVERS= ${EC2_SVNBRANCH}@${EC2_SVNREV} > > .endif > > > > @@ -60,7 +71,7 @@ ec2ami: cw-ec2 ${CW_EC2_PORTINSTALL} > > /usr/local/bin/bsdec2-image-upload ${PUBLISH} --sriov --ena \ > > ${.OBJDIR}/ec2.raw \ > > "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX}" \ > > - "${TYPE} ${REVISION}-${BRANCH}-${TARGET}" \ > > + "${TYPE}/${TARGET} ${EC2_SVNBRANCH}@${EC2_SVNREV}" \ > > ${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE} \ > > ${EC2SNSTOPIC} ${EC2SNSREL} ${EC2SNSVERS} > > @touch ${.TARGET} > > > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Sun Jul 22 16:14: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 14B91104F5A4; Sun, 22 Jul 2018 16:14:32 +0000 (UTC) (envelope-from asomers@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B21C379FA5; Sun, 22 Jul 2018 16:14:31 +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 9053010475; Sun, 22 Jul 2018 16:14:31 +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 w6MGEV4s034309; Sun, 22 Jul 2018 16:14:31 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6MGEUrb034306; Sun, 22 Jul 2018 16:14:30 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201807221614.w6MGEUrb034306@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sun, 22 Jul 2018 16:14:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336605 - head/libexec/tftpd X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/libexec/tftpd X-SVN-Commit-Revision: 336605 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: Sun, 22 Jul 2018 16:14:32 -0000 Author: asomers Date: Sun Jul 22 16:14:30 2018 New Revision: 336605 URL: https://svnweb.freebsd.org/changeset/base/336605 Log: Fix multiple Coverity warnings in tftpd(8) * Initialize uninitialized variable (CID 1006502) * strcpy => strlcpy (CID 1006792, 1006791, 1006790) * Check function return values (CID 1009442, 1009441, 1009440) * Delete dead code in receive_packet (not reported by Coverity) * Remove redundant alarm(3) in receive_packet (not reported by Coverity) Reported by: Coverity CID: 1006502, 1006792, 1006791, 1006790, 1009442, 1009441, 1009440 MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D11287 Modified: head/libexec/tftpd/tftp-file.c head/libexec/tftpd/tftp-io.c head/libexec/tftpd/tftp-utils.c head/libexec/tftpd/tftpd.c Modified: head/libexec/tftpd/tftp-file.c ============================================================================== --- head/libexec/tftpd/tftp-file.c Sun Jul 22 14:11:52 2018 (r336604) +++ head/libexec/tftpd/tftp-file.c Sun Jul 22 16:14:30 2018 (r336605) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -80,7 +81,8 @@ convert_from_net(char *buffer, size_t count) if (buffer[i] == '\n') { if (n == 0) { if (ftell(file) != 0) { - fseek(file, -1, SEEK_END); + int r = fseek(file, -1, SEEK_END); + assert(r == 0); convbuffer[n++] = '\n'; } else { /* This shouldn't happen */ Modified: head/libexec/tftpd/tftp-io.c ============================================================================== --- head/libexec/tftpd/tftp-io.c Sun Jul 22 14:11:52 2018 (r336604) +++ head/libexec/tftpd/tftp-io.c Sun Jul 22 16:14:30 2018 (r336605) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -395,7 +396,7 @@ receive_packet(int peer, char *data, int size, struct struct sockaddr_storage *pfrom; socklen_t fromlen; int n; - static int waiting; + static int timed_out; if (debug&DEBUG_PACKETS) tftp_log(LOG_DEBUG, @@ -403,23 +404,16 @@ receive_packet(int peer, char *data, int size, struct pkt = (struct tftphdr *)data; - waiting = 0; signal(SIGALRM, timeout); - setjmp(timeoutbuf); + timed_out = setjmp(timeoutbuf); alarm(thistimeout); - if (waiting > 0) { - alarm(0); - return (RP_TIMEOUT); - } - - if (waiting > 0) { + if (timed_out != 0) { tftp_log(LOG_ERR, "receive_packet: timeout"); alarm(0); return (RP_TIMEOUT); } - waiting++; pfrom = (from == NULL) ? &from_local : from; fromlen = sizeof(*pfrom); n = recvfrom(peer, data, size, 0, (struct sockaddr *)pfrom, &fromlen); @@ -432,8 +426,6 @@ receive_packet(int peer, char *data, int size, struct tftp_log(LOG_ERR, "receive_packet: timeout"); return (RP_TIMEOUT); } - - alarm(0); if (n < 0) { /* No idea what could have happened if it isn't a timeout */ Modified: head/libexec/tftpd/tftp-utils.c ============================================================================== --- head/libexec/tftpd/tftp-utils.c Sun Jul 22 14:11:52 2018 (r336604) +++ head/libexec/tftpd/tftp-utils.c Sun Jul 22 16:14:30 2018 (r336605) @@ -270,11 +270,13 @@ char * rp_strerror(int error) { static char s[100]; + size_t space = sizeof(s); int i = 0; while (rp_errors[i].desc != NULL) { if (rp_errors[i].error == error) { - strcpy(s, rp_errors[i].desc); + strlcpy(s, rp_errors[i].desc, space); + space -= strlen(rp_errors[i].desc); } i++; } Modified: head/libexec/tftpd/tftpd.c ============================================================================== --- head/libexec/tftpd/tftpd.c Sun Jul 22 14:11:52 2018 (r336604) +++ head/libexec/tftpd/tftpd.c Sun Jul 22 16:14:30 2018 (r336605) @@ -374,7 +374,10 @@ main(int argc, char *argv[]) exit(1); } chdir("/"); - setgroups(1, &nobody->pw_gid); + if (setgroups(1, &nobody->pw_gid) != 0) { + tftp_log(LOG_ERR, "setgroups failed"); + exit(1); + } if (setuid(nobody->pw_uid) != 0) { tftp_log(LOG_ERR, "setuid failed"); exit(1); @@ -522,7 +525,7 @@ tftp_wrq(int peer, char *recvbuffer, ssize_t size) cp = parse_header(peer, recvbuffer, size, &filename, &mode); size -= (cp - recvbuffer) + 1; - strcpy(fnbuf, filename); + strlcpy(fnbuf, filename, sizeof(fnbuf)); reduce_path(fnbuf); filename = fnbuf; @@ -567,7 +570,7 @@ tftp_rrq(int peer, char *recvbuffer, ssize_t size) cp = parse_header(peer, recvbuffer, size, &filename, &mode); size -= (cp - recvbuffer) + 1; - strcpy(fnbuf, filename); + strlcpy(fnbuf, filename, sizeof(fnbuf)); reduce_path(fnbuf); filename = fnbuf; @@ -804,6 +807,7 @@ tftp_xmitfile(int peer, const char *mode) time_t now; struct tftp_stats ts; + memset(&ts, 0, sizeof(ts)); now = time(NULL); if (debug&DEBUG_SIMPLE) tftp_log(LOG_DEBUG, "Transmitting file"); From owner-svn-src-head@freebsd.org Sun Jul 22 16:17: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 5FA10104F666; Sun, 22 Jul 2018 16:17:46 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0BD4F7A129; Sun, 22 Jul 2018 16:17:46 +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 D24A110478; Sun, 22 Jul 2018 16:17:45 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6MGHjCJ034475; Sun, 22 Jul 2018 16:17:45 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6MGHjKZ034474; Sun, 22 Jul 2018 16:17:45 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201807221617.w6MGHjKZ034474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 22 Jul 2018 16:17:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336606 - head/etc X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/etc X-SVN-Commit-Revision: 336606 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: Sun, 22 Jul 2018 16:17:46 -0000 Author: ian Date: Sun Jul 22 16:17:45 2018 New Revision: 336606 URL: https://svnweb.freebsd.org/changeset/base/336606 Log: Add ntpd to the list of users not allowed to log into ftp. Modified: head/etc/ftpusers Modified: head/etc/ftpusers ============================================================================== --- head/etc/ftpusers Sun Jul 22 16:14:30 2018 (r336605) +++ head/etc/ftpusers Sun Jul 22 16:17:45 2018 (r336606) @@ -11,6 +11,7 @@ tty kmem games news +ntpd man sshd smmsp From owner-svn-src-head@freebsd.org Sun Jul 22 16:36: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 15DFA104FC90 for ; Sun, 22 Jul 2018 16:36:21 +0000 (UTC) (envelope-from cperciva@freebsd.org) Received: from mail.tarsnap.com (mail.tarsnap.com [54.86.246.204]) by mx1.freebsd.org (Postfix) with ESMTP id AD6857ABE3 for ; Sun, 22 Jul 2018 16:36:20 +0000 (UTC) (envelope-from cperciva@freebsd.org) Received: (qmail 63302 invoked from network); 22 Jul 2018 16:32:10 -0000 Received: from unknown (HELO exbuntu.daemonology.net) (127.0.0.1) by ec2-107-20-205-189.compute-1.amazonaws.com with ESMTP; 22 Jul 2018 16:32:10 -0000 Received: (qmail 47031 invoked from network); 22 Jul 2018 16:31:25 -0000 Received: from unknown (HELO ?127.0.0.1?) (127.0.0.1) by clamshell.daemonology.net with SMTP; 22 Jul 2018 16:31:25 -0000 Subject: Re: svn commit: r336593 - head/release To: rgrimes@freebsd.org, Matthew Macy Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201807221504.w6MF4bWW027109@pdx.rh.CN85.dnsmgr.net> From: Colin Percival Openpgp: preference=signencrypt Autocrypt: addr=cperciva@freebsd.org; prefer-encrypt=mutual; keydata= xsDhBElrAAcRBACDfDys4ZtK+ErCJ1HAzYeteKpm3OEsvT/49AjUTLihkF79HhIKrCQU+1KC zv7BwHCMLb6hq30As9L7iFKG7n5QFLFC4Te/VcITUnWHMG/c3ViLOfJGvi+9/nOEHaM1dVJY D6tEp5yM1nHmVQpo9932j4KGuGFR0LhOK5IHXOSfGwCgxSFDPdgxe2OEjWxjGgY+oV3EafcD +JROXCTjlcQiG/OguQH4Vks3mhHfFnEppLxTkDuYgHZQiUtpcT9ssH5khgqoTyMar05OUdAj ZIhNbWDh4LgTj+7ZmvLhXT5Zxw8LX9d7T36aTB8XDQSenDqEtinMWOb0TCBBLbsB8EFG1WTT ESbZci9jJS5yhtktuZoY/eM8uXMD/3k4FWFO80VRRkELSp+XSy/VlSQjyi/rhl2nQq/oOA9F oJbDaB0yq9VNhxP+uFBzBWSqeIX0t1ZWLtNfVFr4TRP5hihI5ICrg/0OpqgisKsU2NFe9xyO hyJLYmfD8ebpDJ/9k30C7Iju9pVrwLm1QgS4S2fqJRcR+U4WbjvP7CgSzSVDb2xpbiBQZXJj aXZhbCA8Y3BlcmNpdmFAdGFyc25hcC5jb20+wmEEExECACEFAklrALYCGwMHCwkIBwMCAQQV AggDBBYCAwECHgECF4AACgkQOM7KaQxqam6/igCgn+z2k3V5ggNppmWrZstt1U2lugsAoL7L wS9V9yLtil3oWmHtwpUqYruEzsFNBElrAAcQCAD3ZLMIsP4CIDoJORg+YY0lqLVBgcnF7pFb 4Uy2+KvdWofN+DKH61rZLjgXXkNE9M4EQC1B4lGttBP8IY2gs41y3AUogGdyFbidq99rCBz7 LTsgARHwFxZoaHmXyiZLEU1QZuMqwPZV1mCviRhN5E3rRqYNXVcrnXAAuhBpvNyj/ntHvcDN 2/m+ochiuBYueU4kX3lHya7sOj+mTsndcWmQ9soOUyr8O0r/BG088bMn4qqtUw4dl5/pglXk jbl7uOOPinKf0WVd2r6M0wLPJCD4NPHrCWRLLLAjwfjrtoSRvXxDbXhCdgGBa72+K8eYLzVs hgq7tJOoBWzjVK6XRxR7AAMGB/9Mo3iJ2DxqDecd02KCB5BsFDICbJGhPltU7FwrtbC7djSb XUrwsEVLHi4st4cbdGNCWCrp0BRezXZKohKnNAPFOTK++ZfgeKxrV2sJod+Q9RILF86tQ4XF 7A7Yme5hy92t/WgiU4vc/fWbgP8gV/19f8nunaT2E9NSa70mZFjZNu4iuwThoUUO5CV3Wo0Y UISsnRK8XD1+LR3A2qVyLiFRwh/miC1hgLFCTGCQ3GLxZeZzIpYSlGdQJ0L5lixW5ZQD9r1I 8i/8zhE6qRFAM0upUMI3Gt1Oq2w03DiXrZU0Fu/R8Rm8rlnkQKA+95mRTUq1xL5P5NZIi4gJ Z569OPMFwkkEGBECAAkFAklrAAcCGwwACgkQOM7KaQxqam41igCfbaldnFTu5uAdrnrghESv EI3CAo8AoLkNMks1pThl2BJNRm4CtTK9xZeH Message-ID: Date: Sun, 22 Jul 2018 09:31:25 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.9.0 MIME-Version: 1.0 In-Reply-To: <201807221504.w6MF4bWW027109@pdx.rh.CN85.dnsmgr.net> 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.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: Sun, 22 Jul 2018 16:36:21 -0000 On 07/22/18 08:04, Rodney W. Grimes wrote: >> Build still works, but you're assuming that developers only use svn. > > No, he correctly assumed that RELEASE engineering only uses svn/svnlite > for building release images. This Makefile is for production of > official AMIs, official stuff always uses svn. I'm about to head mostly-AFK for the week, but one option here would be to change EC2_SVNBRANCH!= ${SVN_CMD} info --show-item relative-url ${WORLDDIR} | sed -e 's/\^\///' EC2_SVNREV!= ${SVN_CMD} info --show-item last-changed-revision ${WORLDDIR} to .if defined(SVN_CMD) EC2_SVNBRANCH!= ${SVN_CMD} info --show-item relative-url ${WORLDDIR} | sed -e 's/\^\///' EC2_SVNREV!= ${SVN_CMD} info --show-item last-changed-revision ${WORLDDIR} .else EC2_SVNBRANCH= unknown EC2_SVNREV= unknown .endif I don't know if this will make any difference to anyone using this code, but it should at least silence the warnings for people who aren't checking code out from svn. Colin Percival >> make[1]: "/usr/home/mmacy/devel/freebsd/Makefile.inc1" line 343: >> SYSTEM_COMPILER: libclang will be built for bootstrapping a >> cross-compiler. >> make[1]: "/usr/home/mmacy/devel/freebsd/Makefile.inc1" line 348: >> SYSTEM_LINKER: libclang will be built for bootstrapping a >> cross-linker. >> svn: E155007: '/usr/home/mmacy/devel/freebsd' is not a working copy >> svn: E155007: '/usr/home/mmacy/devel/freebsd' is not a working copy >> make[2]: "/usr/home/mmacy/devel/freebsd/release/Makefile.ec2" line 19: >> warning: "/usr/local/bin/svn info --show-item last-changed-revision >> /usr/home/mmacy/devel/freebsd/release/.." returned non-zero status >> svn: E155007: '/usr/home/mmacy/devel/freebsd' is not a working copy >> svn: E155007: '/usr/home/mmacy/devel/freebsd' is not a working copy >> make[2]: "/usr/home/mmacy/devel/freebsd/release/Makefile.ec2" line 19: >> warning: "/usr/local/bin/svn info --show-item last-changed-revision >> /usr/home/mmacy/devel/freebsd/release/.." returned non-zero status >> >> On Sat, Jul 21, 2018 at 3:54 PM, Colin Percival wrote: >>> Author: cperciva >>> Date: Sat Jul 21 22:54:43 2018 >>> New Revision: 336593 >>> URL: https://svnweb.freebsd.org/changeset/base/336593 >>> >>> Log: >>> Use svn or svnlite, or ${SVN_CMD} if set, for extracting the SVN branch >>> and revision number announced in SNS notifications about new EC2 AMIs. >>> >>> While I'm here, incorporate that information into the AMI "description" >>> fields, since it's more useful than simply echoing the information >>> already provided via the AMI "name". >>> >>> Approved by: gjb >>> >>> Modified: >>> head/release/Makefile.ec2 > ^^^^^^^^^^ > >>> >>> Modified: head/release/Makefile.ec2 >>> ============================================================================== >>> --- head/release/Makefile.ec2 Sat Jul 21 22:15:48 2018 (r336592) >>> +++ head/release/Makefile.ec2 Sat Jul 21 22:54:43 2018 (r336593) >>> @@ -5,6 +5,19 @@ >>> # Makefile for creating an EC2 AMI from a disk image. >>> # >>> >>> +# Figure out where SVN is >>> +.if !defined(SVN_CMD) || empty(SVN_CMD) >>> +. for _P in /usr/bin /usr/local/bin >>> +. for _S in svn svnlite >>> +. if exists(${_P}/${_S}) >>> +SVN_CMD= ${_P}/${_S} >>> +. endif >>> +. endfor >>> +. endfor >>> +.endif >>> +EC2_SVNBRANCH!= ${SVN_CMD} info --show-item relative-url ${WORLDDIR} | sed -e 's/\^\///' >>> +EC2_SVNREV!= ${SVN_CMD} info --show-item last-changed-revision ${WORLDDIR} >>> + >>> .if ${BRANCH} == "CURRENT" || ${BRANCH} == "STABLE" || ${BRANCH} == "PRERELEASE" >>> AMINAMESUFFIX!= date +-%Y-%m-%d >>> .endif >>> @@ -13,8 +26,6 @@ PUBLISH= --public >>> .endif >>> .if defined(EC2SNSTOPIC) && !empty(EC2SNSTOPIC) >>> EC2SNSREL= ${REVISION}-${BRANCH} >>> -EC2_SVNBRANCH!= svn info --show-item relative-url ${WORLDDIR} | sed -e 's/\^\///' >>> -EC2_SVNREV!= svn info --show-item last-changed-revision ${WORLDDIR} >>> EC2SNSVERS= ${EC2_SVNBRANCH}@${EC2_SVNREV} >>> .endif >>> >>> @@ -60,7 +71,7 @@ ec2ami: cw-ec2 ${CW_EC2_PORTINSTALL} >>> /usr/local/bin/bsdec2-image-upload ${PUBLISH} --sriov --ena \ >>> ${.OBJDIR}/ec2.raw \ >>> "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX}" \ >>> - "${TYPE} ${REVISION}-${BRANCH}-${TARGET}" \ >>> + "${TYPE}/${TARGET} ${EC2_SVNBRANCH}@${EC2_SVNREV}" \ >>> ${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE} \ >>> ${EC2SNSTOPIC} ${EC2SNSREL} ${EC2SNSVERS} >>> @touch ${.TARGET} >>> >> >> > -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From owner-svn-src-head@freebsd.org Sun Jul 22 16:42: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 46F3C1050072; Sun, 22 Jul 2018 16:42:23 +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 EA7417B203; Sun, 22 Jul 2018 16:42:22 +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 CC4CD10952; Sun, 22 Jul 2018 16:42:22 +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 w6MGgM9n049532; Sun, 22 Jul 2018 16:42:22 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6MGgMtY049531; Sun, 22 Jul 2018 16:42:22 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201807221642.w6MGgMtY049531@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 22 Jul 2018 16:42:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336607 - head X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 336607 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: Sun, 22 Jul 2018 16:42:23 -0000 Author: ian Date: Sun Jul 22 16:42:22 2018 New Revision: 336607 URL: https://svnweb.freebsd.org/changeset/base/336607 Log: Remove the .if ${MK_FOO} wrappers around the user/group ID checks. These names are referenced in mtree files without any conditional logic, so the users/groups must exist even if the corresponding tool(s) are disabled. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sun Jul 22 16:17:45 2018 (r336606) +++ head/Makefile.inc1 Sun Jul 22 16:42:22 2018 (r336607) @@ -1175,22 +1175,14 @@ __installcheck_DESTDIR: .PHONY # CHECK_UIDS= auditdistd CHECK_GIDS= audit -.if ${MK_SENDMAIL} != "no" CHECK_UIDS+= smmsp CHECK_GIDS+= smmsp -.endif -.if ${MK_PF} != "no" CHECK_UIDS+= proxy CHECK_GIDS+= proxy authpf -.endif -.if ${MK_UNBOUND} != "no" CHECK_UIDS+= unbound CHECK_GIDS+= unbound -.endif -.if ${MK_NTP} != "no" CHECK_UIDS+= ntpd CHECK_GIDS+= ntpd -.endif _installcheck_world: __installcheck_UGID __installcheck_UGID: .PHONY .for uid in ${CHECK_UIDS} From owner-svn-src-head@freebsd.org Sun Jul 22 16:51: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 1C0591050330; Sun, 22 Jul 2018 16:51:12 +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 C39817B70F; Sun, 22 Jul 2018 16:51:11 +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 A4B891098D; Sun, 22 Jul 2018 16:51:11 +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 w6MGpBwp051019; Sun, 22 Jul 2018 16:51:11 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6MGpBdT051018; Sun, 22 Jul 2018 16:51:11 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201807221651.w6MGpBdT051018@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 22 Jul 2018 16:51:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336608 - head X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 336608 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: Sun, 22 Jul 2018 16:51:12 -0000 Author: ian Date: Sun Jul 22 16:51:11 2018 New Revision: 336608 URL: https://svnweb.freebsd.org/changeset/base/336608 Log: Alpha-sort the list of user/group IDs to check at install time. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sun Jul 22 16:42:22 2018 (r336607) +++ head/Makefile.inc1 Sun Jul 22 16:51:11 2018 (r336608) @@ -1175,14 +1175,14 @@ __installcheck_DESTDIR: .PHONY # CHECK_UIDS= auditdistd CHECK_GIDS= audit -CHECK_UIDS+= smmsp -CHECK_GIDS+= smmsp +CHECK_UIDS+= ntpd +CHECK_GIDS+= ntpd CHECK_UIDS+= proxy CHECK_GIDS+= proxy authpf +CHECK_UIDS+= smmsp +CHECK_GIDS+= smmsp CHECK_UIDS+= unbound CHECK_GIDS+= unbound -CHECK_UIDS+= ntpd -CHECK_GIDS+= ntpd _installcheck_world: __installcheck_UGID __installcheck_UGID: .PHONY .for uid in ${CHECK_UIDS} From owner-svn-src-head@freebsd.org Sun Jul 22 17:10: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 95A7A105099A; Sun, 22 Jul 2018 17:10:14 +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 3881C7C041; Sun, 22 Jul 2018 17:10:14 +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 0F21810CA6; Sun, 22 Jul 2018 17:10:14 +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 w6MHADRm060176; Sun, 22 Jul 2018 17:10:13 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6MHADvi060173; Sun, 22 Jul 2018 17:10:13 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201807221710.w6MHADvi060173@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sun, 22 Jul 2018 17:10:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336609 - in head: libexec/tftpd usr.bin/tftp X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in head: libexec/tftpd usr.bin/tftp X-SVN-Commit-Revision: 336609 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: Sun, 22 Jul 2018 17:10:14 -0000 Author: asomers Date: Sun Jul 22 17:10:12 2018 New Revision: 336609 URL: https://svnweb.freebsd.org/changeset/base/336609 Log: Fix several Coverity warnings in tftp Some of the changes are in the libexec/tftpd directory, but to functions that are only used by tftp(1) (they share some code). * strcpy => strlcpy (1006793, 1006794, 1006796, 1006741) * Unchecked return value and TOCTTOU (1009314) * NULL pointer dereference (1018035, 1018036) Reported by: Coverity CID: 1006793, 1006794, 1006796, 1006741, 1009314, 1018035 CID: 1018036 MFC after: 2 weeks Modified: head/libexec/tftpd/tftp-io.c head/libexec/tftpd/tftp-utils.c head/usr.bin/tftp/main.c head/usr.bin/tftp/tftp.c Modified: head/libexec/tftpd/tftp-io.c ============================================================================== --- head/libexec/tftpd/tftp-io.c Sun Jul 22 16:51:11 2018 (r336608) +++ head/libexec/tftpd/tftp-io.c Sun Jul 22 17:10:12 2018 (r336609) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -193,16 +194,16 @@ send_wrq(int peer, char *filename, char *mode) tp = (struct tftphdr *)buf; tp->th_opcode = htons((u_short)WRQ); - size = 2; + size = offsetof(struct tftphdr, th_stuff); bp = tp->th_stuff; - strcpy(bp, filename); + strlcpy(bp, filename, sizeof(buf) - size); bp += strlen(filename); *bp = 0; bp++; size += strlen(filename) + 1; - strcpy(bp, mode); + strlcpy(bp, mode, sizeof(buf) - size); bp += strlen(mode); *bp = 0; bp++; @@ -241,16 +242,16 @@ send_rrq(int peer, char *filename, char *mode) tp = (struct tftphdr *)buf; tp->th_opcode = htons((u_short)RRQ); - size = 2; + size = offsetof(struct tftphdr, th_stuff); bp = tp->th_stuff; - strcpy(bp, filename); + strlcpy(bp, filename, sizeof(buf) - size); bp += strlen(filename); *bp = 0; bp++; size += strlen(filename) + 1; - strcpy(bp, mode); + strlcpy(bp, mode, sizeof(buf) - size); bp += strlen(mode); *bp = 0; bp++; Modified: head/libexec/tftpd/tftp-utils.c ============================================================================== --- head/libexec/tftpd/tftp-utils.c Sun Jul 22 16:51:11 2018 (r336608) +++ head/libexec/tftpd/tftp-utils.c Sun Jul 22 17:10:12 2018 (r336609) @@ -237,14 +237,15 @@ const char * debug_show(int d) { static char s[100]; + size_t space = sizeof(s); int i = 0; s[0] = '\0'; while (debugs[i].name != NULL) { if (d&debugs[i].value) { - if (s[0] != '\0') - strcat(s, " "); - strcat(s, debugs[i].name); + if (s[0] != '\0') + strlcat(s, " ", space); + strlcat(s, debugs[i].name, space); } i++; } Modified: head/usr.bin/tftp/main.c ============================================================================== --- head/usr.bin/tftp/main.c Sun Jul 22 16:51:11 2018 (r336608) +++ head/usr.bin/tftp/main.c Sun Jul 22 17:10:12 2018 (r336609) @@ -429,7 +429,7 @@ static void settftpmode(const char *newmode) { - strcpy(mode, newmode); + strlcpy(mode, newmode, sizeof(mode)); if (verbose) printf("mode set to %s\n", mode); } @@ -489,7 +489,10 @@ put(int argc, char *argv[]) return; } - stat(cp, &sb); + if (fstat(fd, &sb) < 0) { + warn("%s", cp); + return; + } asprintf(&options[OPT_TSIZE].o_request, "%ju", sb.st_size); if (verbose) @@ -510,7 +513,10 @@ put(int argc, char *argv[]) continue; } - stat(cp, &sb); + if (fstat(fd, &sb) < 0) { + warn("%s", argv[n]); + continue; + } asprintf(&options[OPT_TSIZE].o_request, "%ju", sb.st_size); if (verbose) Modified: head/usr.bin/tftp/tftp.c ============================================================================== --- head/usr.bin/tftp/tftp.c Sun Jul 22 16:51:11 2018 (r336608) +++ head/usr.bin/tftp/tftp.c Sun Jul 22 17:10:12 2018 (r336609) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -85,6 +86,7 @@ xmitfile(int peer, char *port, int fd, char *name, cha if (port == NULL) { struct servent *se; se = getservbyname("tftp", "udp"); + assert(se != NULL); ((struct sockaddr_in *)&peer_sock)->sin_port = se->s_port; } else ((struct sockaddr_in *)&peer_sock)->sin_port = @@ -184,6 +186,7 @@ recvfile(int peer, char *port, int fd, char *name, cha if (port == NULL) { struct servent *se; se = getservbyname("tftp", "udp"); + assert(se != NULL); ((struct sockaddr_in *)&peer_sock)->sin_port = se->s_port; } else ((struct sockaddr_in *)&peer_sock)->sin_port = From owner-svn-src-head@freebsd.org Sun Jul 22 17:40: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 C041B1051383; Sun, 22 Jul 2018 17:40:14 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6F6297D255; Sun, 22 Jul 2018 17:40:14 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4D7E211193; Sun, 22 Jul 2018 17:40:14 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6MHeEjv075731; Sun, 22 Jul 2018 17:40:14 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6MHeEGi075730; Sun, 22 Jul 2018 17:40:14 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201807221740.w6MHeEGi075730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 22 Jul 2018 17:40:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336610 - head/sys/dev/e1000 X-SVN-Group: head X-SVN-Commit-Author: marius X-SVN-Commit-Paths: head/sys/dev/e1000 X-SVN-Commit-Revision: 336610 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: Sun, 22 Jul 2018 17:40:15 -0000 Author: marius Date: Sun Jul 22 17:40:13 2018 New Revision: 336610 URL: https://svnweb.freebsd.org/changeset/base/336610 Log: o In em_if_update_admin_status(): - Don't bother calling if_setbaudrate(9) as iflib_link_state_change(9) takes care of that, - correctly check for E1000_CTRL_EXT_LINK_MODE_GMII in E1000_CTRL_EXT [1], - properly convert the uint16_t link_speed to a uint64_t baudrate by using IF_Mbps() which contains an appropriate cast [2], - remove the duplicate link down announcement when bootverbose isn't zero and bring the remaining one in line with the other link state messages. o Remove a dead store to rid in em_if_msix_intr_assign(). [3] o Or in the DMA coalescing Rx threshold so the other bits set in E1000_DMACR remain intact as intended in igb_init_dmac(). [4] Reported by: Coverity CID: 1378464 [1], 1368765 [2], 1381681 [3], 1304929 [4] Modified: head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Sun Jul 22 17:10:12 2018 (r336609) +++ head/sys/dev/e1000/if_em.c Sun Jul 22 17:40:13 2018 (r336610) @@ -1722,7 +1722,6 @@ em_if_update_admin_status(if_ctx_t ctx) { struct adapter *adapter = iflib_get_softc(ctx); struct e1000_hw *hw = &adapter->hw; - struct ifnet *ifp = iflib_get_ifp(ctx); device_t dev = iflib_get_dev(ctx); u32 link_check, thstat, ctrl; @@ -1786,8 +1785,8 @@ em_if_update_admin_status(if_ctx_t ctx) "Full Duplex" : "Half Duplex")); adapter->link_active = 1; adapter->smartspeed = 0; - if_setbaudrate(ifp, adapter->link_speed * 1000000); - if ((ctrl & E1000_CTRL_EXT_LINK_MODE_GMII) && + if ((ctrl & E1000_CTRL_EXT_LINK_MODE_MASK) == + E1000_CTRL_EXT_LINK_MODE_GMII && (thstat & E1000_THSTAT_LINK_THROTTLE)) device_printf(dev, "Link: thermal downshift\n"); /* Delay Link Up for Phy update */ @@ -1802,17 +1801,15 @@ em_if_update_admin_status(if_ctx_t ctx) adapter->flags |= IGB_MEDIA_RESET; em_reset(ctx); } - iflib_link_state_change(ctx, LINK_STATE_UP, ifp->if_baudrate); + iflib_link_state_change(ctx, LINK_STATE_UP, + IF_Mbps(adapter->link_speed)); printf("Link state changed to up\n"); } else if (!link_check && (adapter->link_active == 1)) { - if_setbaudrate(ifp, 0); adapter->link_speed = 0; adapter->link_duplex = 0; - if (bootverbose) - device_printf(dev, "Link is Down\n"); adapter->link_active = 0; - iflib_link_state_change(ctx, LINK_STATE_DOWN, ifp->if_baudrate); - printf("link state changed to down\n"); + iflib_link_state_change(ctx, LINK_STATE_DOWN, 0); + printf("Link state changed to down\n"); } em_update_stats_counters(adapter); @@ -1985,7 +1982,6 @@ em_if_msix_intr_assign(if_ctx_t ctx, int msix) vector = 0; for (i = 0; i < adapter->tx_num_queues; i++, tx_que++, vector++) { - rid = vector + 1; snprintf(buf, sizeof(buf), "txq%d", i); tx_que = &adapter->tx_queues[i]; iflib_softirq_alloc_generic(ctx, @@ -2324,7 +2320,7 @@ igb_init_dmac(struct adapter *adapter, u32 pba) dmac = pba - 10; reg = E1000_READ_REG(hw, E1000_DMACR); reg &= ~E1000_DMACR_DMACTHR_MASK; - reg = ((dmac << E1000_DMACR_DMACTHR_SHIFT) + reg |= ((dmac << E1000_DMACR_DMACTHR_SHIFT) & E1000_DMACR_DMACTHR_MASK); /* transition to L0x or L1 if available..*/ From owner-svn-src-head@freebsd.org Sun Jul 22 17:45: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 09222105164F; Sun, 22 Jul 2018 17:45:46 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A43407D7A8; Sun, 22 Jul 2018 17:45:45 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7821A1131F; Sun, 22 Jul 2018 17:45:45 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6MHjj1P080706; Sun, 22 Jul 2018 17:45:45 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6MHjjAD080705; Sun, 22 Jul 2018 17:45:45 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201807221745.w6MHjjAD080705@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 22 Jul 2018 17:45:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336611 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: marius X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 336611 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: Sun, 22 Jul 2018 17:45:46 -0000 Author: marius Date: Sun Jul 22 17:45:44 2018 New Revision: 336611 URL: https://svnweb.freebsd.org/changeset/base/336611 Log: - Given that the controlling expression of the receive loop in iflib_rxeof() tests for avail > 0, avail can never be 0 within that loop. Thus, move decrementing avail and budget_left into the loop and before the code which checks for additional descriptors having become available in case all the previous ones have been processed but there still is budget left so the latter code works as expected. [1] - In iflib_{busdma_load_mbuf_sg,parse_header}(), remove dead stores to m and n respectively. [2, 3] - In collapse_pkthdr(), ensure that m_next isn't NULL before dereferencing it. [4] - Remove a duplicate assignment of segs in iflib_encap(). Reported by: Coverity CID: 1356027 [1], 1356047 [2], 1368205 [3], 1356028 [4] Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Sun Jul 22 17:40:13 2018 (r336610) +++ head/sys/net/iflib.c Sun Jul 22 17:45:44 2018 (r336611) @@ -2663,7 +2663,7 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) return (false); } - for (budget_left = budget; (budget_left > 0) && (avail > 0); budget_left--, avail--) { + for (budget_left = budget; budget_left > 0 && avail > 0;) { if (__predict_false(!CTX_ACTIVE(ctx))) { DBG_COUNTER_INC(rx_ctx_inactive); break; @@ -2697,6 +2697,8 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) /* will advance the cidx on the corresponding free lists */ m = iflib_rxd_pkt_get(rxq, &ri); + avail--; + budget_left--; if (avail == 0 && budget_left) avail = iflib_rxd_avail(ctx, rxq, *cidxp, budget_left); @@ -2873,14 +2875,14 @@ iflib_parse_header(iflib_txq_t txq, if_pkt_info_t pi, struct ether_vlan_header *eh; struct mbuf *m, *n; - n = m = *mp; + m = *mp; if ((sctx->isc_flags & IFLIB_NEED_SCRATCH) && M_WRITABLE(m) == 0) { if ((m = m_dup(m, M_NOWAIT)) == NULL) { return (ENOMEM); } else { m_freem(*mp); - n = *mp = m; + *mp = m; } } @@ -3048,6 +3050,8 @@ collapse_pkthdr(struct mbuf *m0) } m = m0; m->m_next = m_next; + if (m_next == NULL) + return (m); if ((m_next->m_flags & M_EXT) == 0) { m = m_defrag(m, M_NOWAIT); } else { @@ -3108,7 +3112,7 @@ iflib_busdma_load_mbuf_sg(iflib_txq_t txq, bus_dma_tag * Please don't ever do this */ if (__predict_false(m->m_len == 0)) - *m0 = m = collapse_pkthdr(m); + *m0 = collapse_pkthdr(m); ctx = txq->ift_ctx; sctx = ctx->ifc_sctx; @@ -3285,7 +3289,6 @@ iflib_encap(iflib_txq_t txq, struct mbuf **m_headp) int err, nsegs, ndesc, max_segs, pidx, cidx, next, ntxd; bus_dma_tag_t desc_tag; - segs = txq->ift_segs; ctx = txq->ift_ctx; sctx = ctx->ifc_sctx; scctx = &ctx->ifc_softc_ctx; From owner-svn-src-head@freebsd.org Sun Jul 22 17:51: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 E90B910517D3; Sun, 22 Jul 2018 17:51:11 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9AE747DA1A; Sun, 22 Jul 2018 17:51:11 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7D21011456; Sun, 22 Jul 2018 17:51:11 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6MHpBNb081674; Sun, 22 Jul 2018 17:51:11 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6MHpBfa081673; Sun, 22 Jul 2018 17:51:11 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201807221751.w6MHpBfa081673@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 22 Jul 2018 17:51:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336612 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: marius X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 336612 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: Sun, 22 Jul 2018 17:51:12 -0000 Author: marius Date: Sun Jul 22 17:51:11 2018 New Revision: 336612 URL: https://svnweb.freebsd.org/changeset/base/336612 Log: Use the maximum of isc_tx_{nsegments,tso_segments_max} for MAX_TX_DESC. Since r336313, TSO support for LEM-class devices is removed again as it was before the conversion of {l,}em(4) to iflib(4) in r311849 and as a result, isc_tx_tso_segments_max is 0 for LEM-class devices now. Thus, inappropriate watermarks were used for this class. This is really only a band-aid, though, because so far iflib(9) doesn't fully take into account that DMA engines can support different maxima of segments for transfers of TSO and non-TSO packets. For example, the DESC_RECLAIMABLE macro is based on isc_tx_nsegments while MAX_TX_DESC used isc_tx_tso_segments_max only. For most in-tree consumers that doesn't make a difference as the maxima are the same for both kinds of transfers (that is, apart from the fact that TSO may require up to 2 sentinel descriptors but also not with every MAC supported). However, isc_tx_nsegments is 8 but isc_tx_tso_segments_max is 85 by default with ixl(4). Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Sun Jul 22 17:45:44 2018 (r336611) +++ head/sys/net/iflib.c Sun Jul 22 17:51:11 2018 (r336612) @@ -2831,7 +2831,8 @@ txq_max_rs_deferred(iflib_txq_t txq) /* XXX we should be setting this to something other than zero */ #define RECLAIM_THRESH(ctx) ((ctx)->ifc_sctx->isc_tx_reclaim_thresh) -#define MAX_TX_DESC(ctx) ((ctx)->ifc_softc_ctx.isc_tx_tso_segments_max) +#define MAX_TX_DESC(ctx) max((ctx)->ifc_softc_ctx.isc_tx_tso_segments_max, \ + (ctx)->ifc_softc_ctx.isc_tx_nsegments) static inline bool iflib_txd_db_check(if_ctx_t ctx, iflib_txq_t txq, int ring, qidx_t in_use) From owner-svn-src-head@freebsd.org Sun Jul 22 18:06: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 481911051C80; Sun, 22 Jul 2018 18:06:43 +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 E99C17E28F; Sun, 22 Jul 2018 18:06:42 +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 CAE0411660; Sun, 22 Jul 2018 18:06:42 +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 w6MI6gvg091122; Sun, 22 Jul 2018 18:06:42 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6MI6git091121; Sun, 22 Jul 2018 18:06:42 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201807221806.w6MI6git091121@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sun, 22 Jul 2018 18:06:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336613 - head/contrib/openbsm/libauditd X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/contrib/openbsm/libauditd X-SVN-Commit-Revision: 336613 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: Sun, 22 Jul 2018 18:06:43 -0000 Author: asomers Date: Sun Jul 22 18:06:42 2018 New Revision: 336613 URL: https://svnweb.freebsd.org/changeset/base/336613 Log: auditd(8): Log a better error when no hostname is set in audit_control Cherry-pick from https://github.com/openbsm/openbsm/commit/01ba03b Reviewed by: cem Obtained from: OpenBSM MFC after: 2 weeks Pull Request: https://github.com/openbsm/openbsm/pull/38 Modified: head/contrib/openbsm/libauditd/auditd_lib.c Modified: head/contrib/openbsm/libauditd/auditd_lib.c ============================================================================== --- head/contrib/openbsm/libauditd/auditd_lib.c Sun Jul 22 17:51:11 2018 (r336612) +++ head/contrib/openbsm/libauditd/auditd_lib.c Sun Jul 22 18:06:42 2018 (r336613) @@ -261,7 +261,8 @@ auditd_set_host(void) struct auditinfo_addr aia; int error, ret = ADE_NOERR; - if (getachost(auditd_host, sizeof(auditd_host)) != 0) { + if ((getachost(auditd_host, sizeof(auditd_host)) != 0) || + ((auditd_hostlen = strlen(auditd_host)) == 0)) { ret = ADE_PARSE; /* @@ -278,7 +279,6 @@ auditd_set_host(void) ret = ADE_AUDITON; return (ret); } - auditd_hostlen = strlen(auditd_host); error = getaddrinfo(auditd_host, NULL, NULL, &res); if (error) return (ADE_GETADDR); From owner-svn-src-head@freebsd.org Sun Jul 22 18:07: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 ADCF91051CBA; Sun, 22 Jul 2018 18:07:09 +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 616F67E3DF; Sun, 22 Jul 2018 18:07:09 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 42AA611661; Sun, 22 Jul 2018 18:07:09 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6MI79nf091185; Sun, 22 Jul 2018 18:07:09 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6MI79E0091184; Sun, 22 Jul 2018 18:07:09 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201807221807.w6MI79E0091184@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 22 Jul 2018 18:07:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336614 - head/tests/sys/kern X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/tests/sys/kern X-SVN-Commit-Revision: 336614 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: Sun, 22 Jul 2018 18:07:10 -0000 Author: markj Date: Sun Jul 22 18:07:08 2018 New Revision: 336614 URL: https://svnweb.freebsd.org/changeset/base/336614 Log: Add a regression test for PR 131876. PR: 131876 MFC after: 1 week Modified: head/tests/sys/kern/unix_passfd_test.c Modified: head/tests/sys/kern/unix_passfd_test.c ============================================================================== --- head/tests/sys/kern/unix_passfd_test.c Sun Jul 22 18:06:42 2018 (r336613) +++ head/tests/sys/kern/unix_passfd_test.c Sun Jul 22 18:07:08 2018 (r336614) @@ -23,10 +23,11 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include @@ -100,6 +101,23 @@ dofstat(int fd, struct stat *sb) "fstat failed: %s", strerror(errno)); } +static int +getnfds(void) +{ + size_t len; + int mib[4], n, rc; + + len = sizeof(n); + mib[0] = CTL_KERN; + mib[1] = KERN_PROC; + mib[2] = KERN_PROC_NFDS; + mib[3] = 0; + + rc = sysctl(mib, 4, &n, &len, NULL, 0); + ATF_REQUIRE_MSG(rc != -1, "sysctl(KERN_PROC_NFDS) failed"); + return (n); +} + static void samefile(struct stat *sb1, struct stat *sb2) { @@ -129,7 +147,7 @@ sendfd_payload(int sockfd, int send_fd, void *payload, msghdr.msg_iov = &iovec; msghdr.msg_iovlen = 1; - cmsghdr = (struct cmsghdr *)(void*)message; + cmsghdr = (struct cmsghdr *)(void *)message; cmsghdr->cmsg_len = CMSG_LEN(sizeof(int)); cmsghdr->cmsg_level = SOL_SOCKET; cmsghdr->cmsg_type = SCM_RIGHTS; @@ -380,6 +398,55 @@ ATF_TC_BODY(rights_creds_payload, tc) closesocketpair(fd); } +/* + * Test for PR 131876. Receiver uses a control message buffer that is too + * small for the incoming SCM_RIGHTS message, so the message is truncated. + * The kernel must not leak the copied right into the receiver's namespace. + */ +ATF_TC_WITHOUT_HEAD(truncated_rights); +ATF_TC_BODY(truncated_rights, tc) +{ + struct iovec iovec; + struct msghdr msghdr; + char buf[16], message[CMSG_SPACE(0)]; + ssize_t len; + int fd[2], nfds, putfd; + + atf_tc_expect_fail("PR 131876: " + "FD leak when 'control' message is truncated"); + + memset(buf, 42, sizeof(buf)); + domainsocketpair(fd); + devnull(&putfd); + nfds = getnfds(); + + sendfd_payload(fd[0], putfd, buf, sizeof(buf)); + + bzero(&msghdr, sizeof(msghdr)); + bzero(message, sizeof(message)); + + iovec.iov_base = buf; + iovec.iov_len = sizeof(buf); + msghdr.msg_control = message; + msghdr.msg_controllen = sizeof(message); + msghdr.msg_iov = &iovec; + msghdr.msg_iovlen = 1; + + len = recvmsg(fd[1], &msghdr, 0); + ATF_REQUIRE_MSG(len != -1, "recvmsg failed: %s", strerror(errno)); + ATF_REQUIRE_MSG((size_t)len == sizeof(buf), + "recvmsg: %zd bytes received; expected %zd", len, sizeof(buf)); + for (size_t i = 0; i < sizeof(buf); i++) + ATF_REQUIRE_MSG(buf[i] == 42, "unexpected buffer contents"); + + ATF_REQUIRE_MSG((msghdr.msg_flags & MSG_CTRUNC) != 0, + "MSG_CTRUNC not set after truncation"); + ATF_REQUIRE(getnfds() == nfds); + + close(putfd); + closesocketpair(fd); +} + ATF_TP_ADD_TCS(tp) { @@ -391,6 +458,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, bundle_cancel); ATF_TP_ADD_TC(tp, devfs_orphan); ATF_TP_ADD_TC(tp, rights_creds_payload); + ATF_TP_ADD_TC(tp, truncated_rights); return (atf_no_error()); } From owner-svn-src-head@freebsd.org Sun Jul 22 18:08: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 361E11051D9E; Sun, 22 Jul 2018 18:08:23 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "alchemy.franken.de", Issuer "alchemy.franken.de" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id BB69D7E5E4; Sun, 22 Jul 2018 18:08:22 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.15.2/8.15.2/ALCHEMY.FRANKEN.DE) with ESMTPS id w6MI2cK3091010 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 22 Jul 2018 20:02:38 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.15.2/8.15.2/Submit) id w6MI2c0S091009; Sun, 22 Jul 2018 20:02:38 +0200 (CEST) (envelope-from marius) Date: Sun, 22 Jul 2018 20:02:38 +0200 From: Marius Strobl To: Alexander Leidinger Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336313 - in head/sys: dev/bnxt dev/e1000 dev/ixgbe dev/ixl net sys Message-ID: <20180722180238.GY21523@alchemy.franken.de> References: <201807151904.w6FJ4NNg039896@repo.freebsd.org> <20180718223313.Horde.lYE8PRYqLdkrN3QMTTHx3aV@webmail.leidinger.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180718223313.Horde.lYE8PRYqLdkrN3QMTTHx3aV@webmail.leidinger.net> User-Agent: Mutt/1.9.2 (2017-12-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (alchemy.franken.de [0.0.0.0]); Sun, 22 Jul 2018 20:02:38 +0200 (CEST) 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: Sun, 22 Jul 2018 18:08:23 -0000 On Wed, Jul 18, 2018 at 10:33:13PM +0200, Alexander Leidinger wrote: > Quoting Marius Strobl (from Sun, 15 Jul 2018 > 19:04:23 +0000 (UTC)): > > > Author: marius > > Date: Sun Jul 15 19:04:23 2018 > > New Revision: 336313 > > URL: https://svnweb.freebsd.org/changeset/base/336313 > > > > Log: > > Assorted TSO fixes for em(4)/iflib(9) and dead code removal: > [...] > > Okayed by: sbruno@ at 201806 DevSummit Transport Working Group [1] > > Reviewed by: sbruno (earlier version), erj > > PR: 219428 (part of; comment #10) [1], 220997 (part of; comment #3) > > Hi Marius, > > thanks a lot for this change, it improves the situation (PR 220997) a > lot. The system is running at r336329, as such I don't have your > change r336356 yet on the system. Maybe the 2 panics (more below) I've > seen are fixed by this. Before I try your second change (surely not > before the WE), here at least the report in case it is related to your > changes and not related to r336313: > > I got 2 panics, both within 6 minutes (based upon the timestamp of the > coredumps in the filesystem): > > 1) > panic: Assertion ifsd_m[next] == NULL failed at /usr/src/sys/net/iflib.c:3151 > cpuid = 2 > time = 1531944124 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe008af85850 > vpanic() at vpanic+0x1a3/frame 0xfffffe008af858b0 > doadump() at doadump/frame 0xfffffe008af85930 > iflib_txq_drain() at iflib_txq_drain+0xe58/frame 0xfffffe008af85aa0 > ifmp_ring_check_drainage() at ifmp_ring_check_drainage+0x16c/frame > 0xfffffe008af85b00 > _task_fn_tx() at _task_fn_tx+0x76/frame 0xfffffe008af85b30 > gtaskqueue_run_locked() at gtaskqueue_run_locked+0x139/frame > 0xfffffe008af85b80 > gtaskqueue_thread_loop() at gtaskqueue_thread_loop+0x88/frame > 0xfffffe008af85bb0 > fork_exit() at fork_exit+0x84/frame 0xfffffe008af85bf0 > fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe008af85bf0 > --- trap 0, rip = 0, rsp = 0, rbp = 0 --- > Uptime: 1d22h51m17s > Dumping 2990 out of 8037 MB:..1%..11%..21%..31%..41%..51%..61%..71%..81%..91% > > __curthread () at ./machine/pcpu.h:230 > 230 __asm("movq %%gs:%1,%0" : "=r" (td) > (kgdb) #0 __curthread () at ./machine/pcpu.h:230 > #1 doadump (textdump=1) at /usr/src/sys/kern/kern_shutdown.c:366 > #2 0xffffffff80485ea1 in kern_reboot (howto=260) > at /usr/src/sys/kern/kern_shutdown.c:446 > #3 0xffffffff80486483 in vpanic (fmt=, ap=0xfffffe008af858f0) > at /usr/src/sys/kern/kern_shutdown.c:863 > #4 0xffffffff804861f0 in kassert_panic ( > fmt=0xffffffff807e085f "Assertion %s failed at %s:%d") > at /usr/src/sys/kern/kern_shutdown.c:749 > #5 0xffffffff8059cd78 in iflib_busdma_load_mbuf_sg (flags=0, > txq=, tag=, map=, > m0=, segs=, nsegs=, > max_segs=) at /usr/src/sys/net/iflib.c:3151 > #6 iflib_encap (txq=0xfffff800028dc000, m_headp=0xfffffe00959bdd30) > at /usr/src/sys/net/iflib.c:3321 > #7 iflib_txq_drain (r=0xfffffe00959ba000, cidx=, > pidx=41319936) at /usr/src/sys/net/iflib.c:3636 > #8 0xffffffff805a0f4c in drain_ring_lockless (r=, os=..., > prev=, budget=) > at /usr/src/sys/net/mp_ring.c:199 > #9 ifmp_ring_check_drainage (r=, budget=32) > at /usr/src/sys/net/mp_ring.c:502 > #10 0xffffffff80599c46 in _task_fn_tx (context=) > at /usr/src/sys/net/iflib.c:3747 > #11 0xffffffff804cd2c9 in gtaskqueue_run_locked (queue=0xfffff800025e0d00) > at /usr/src/sys/kern/subr_gtaskqueue.c:332 > #12 0xffffffff804cd048 in gtaskqueue_thread_loop (arg=) > at /usr/src/sys/kern/subr_gtaskqueue.c:507 > #13 0xffffffff8044cc34 in fork_exit ( > callout=0xffffffff804ccfc0 , > arg=0xfffffe0007ffd038, frame=0xfffffe008af85c00) > at /usr/src/sys/kern/kern_fork.c:1057 > (kgdb) up 5 > #5 0xffffffff8059cd78 in iflib_busdma_load_mbuf_sg (flags=0, > txq=, tag=, > map=, m0=, segs=, > nsegs=, max_segs=) > at /usr/src/sys/net/iflib.c:3151 > 3151 MPASS(ifsd_m[next] == NULL); > (kgdb) list > 3146 /* > 3147 * see if we can't be smarter about physically > 3148 * contiguous mappings > 3149 */ > 3150 next = (pidx + count) & (ntxd-1); > 3151 MPASS(ifsd_m[next] == NULL); > 3152 #if MEMORY_LOGGING > 3153 txq->ift_enqueued++; > 3154 #endif > 3155 ifsd_m[next] = m; > (kgdb) print ifsd_m > $1 = (struct mbuf **) 0xfffffe00959b8000 > (kgdb) print next > $2 = > (kgdb) print pidx > $3 = 277 > (kgdb) print count > $4 = 0 > (kgdb) print ntxd > $5 = > > > 2) > Unread portion of the kernel message buffer: > panic: Assertion ifsd_m[next] == NULL failed at /usr/src/sys/net/iflib.c:3151 > cpuid = 2 > time = 1531944550 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe008af85850 > vpanic() at vpanic+0x1a3/frame 0xfffffe008af858b0 > doadump() at doadump/frame 0xfffffe008af85930 > iflib_txq_drain() at iflib_txq_drain+0xe58/frame 0xfffffe008af85aa0 > ifmp_ring_check_drainage() at ifmp_ring_check_drainage+0x16c/frame > 0xfffffe008af85b00 > _task_fn_tx() at _task_fn_tx+0x76/frame 0xfffffe008af85b30 > gtaskqueue_run_locked() at gtaskqueue_run_locked+0x139/frame > 0xfffffe008af85b80 > gtaskqueue_thread_loop() at gtaskqueue_thread_loop+0x88/frame > 0xfffffe008af85bb0 > fork_exit() at fork_exit+0x84/frame 0xfffffe008af85bf0 > fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe008af85bf0 > --- trap 0, rip = 0, rsp = 0, rbp = 0 --- > Uptime: 5m27s > Dumping 1555 out of 8037 MB:..2%..11%..21%..31%..41%..51%..61%..71%..81%..91% > > __curthread () at ./machine/pcpu.h:230 > 230 __asm("movq %%gs:%1,%0" : "=r" (td) > (kgdb) bt > #0 __curthread () at ./machine/pcpu.h:230 > #1 doadump (textdump=1) at /usr/src/sys/kern/kern_shutdown.c:366 > #2 0xffffffff80485ea1 in kern_reboot (howto=260) at > /usr/src/sys/kern/kern_shutdown.c:446 > #3 0xffffffff80486483 in vpanic (fmt=, ap=0xfffffe008af858f0) > at /usr/src/sys/kern/kern_shutdown.c:863 > #4 0xffffffff804861f0 in kassert_panic (fmt=0xffffffff807e085f > "Assertion %s failed at %s:%d") > at /usr/src/sys/kern/kern_shutdown.c:749 > #5 0xffffffff8059cd78 in iflib_busdma_load_mbuf_sg (flags=0, > txq=, tag=, > map=, m0=, segs=, > nsegs=, max_segs=) > at /usr/src/sys/net/iflib.c:3151 > #6 iflib_encap (txq=0xfffff800028fe000, m_headp=0xfffffe00959bdde8) > at /usr/src/sys/net/iflib.c:3321 > #7 iflib_txq_drain (r=0xfffffe00959ba000, cidx=, > pidx=42948608) at /usr/src/sys/net/iflib.c:3636 > #8 0xffffffff805a0f4c in drain_ring_lockless (r=, > os=..., prev=, > budget=) at /usr/src/sys/net/mp_ring.c:199 > #9 ifmp_ring_check_drainage (r=, budget=32) at > /usr/src/sys/net/mp_ring.c:502 > #10 0xffffffff80599c46 in _task_fn_tx (context=) at > /usr/src/sys/net/iflib.c:3747 > #11 0xffffffff804cd2c9 in gtaskqueue_run_locked (queue=0xfffff800025a2200) > at /usr/src/sys/kern/subr_gtaskqueue.c:332 > #12 0xffffffff804cd048 in gtaskqueue_thread_loop (arg=) > at /usr/src/sys/kern/subr_gtaskqueue.c:507 > #13 0xffffffff8044cc34 in fork_exit (callout=0xffffffff804ccfc0 > , arg=0xfffffe0007ffd038, > frame=0xfffffe008af85c00) at /usr/src/sys/kern/kern_fork.c:1057 > #14 > (kgdb) up 5 > #5 0xffffffff8059cd78 in iflib_busdma_load_mbuf_sg (flags=0, > txq=, tag=, > map=, m0=, segs=, > nsegs=, max_segs=) > at /usr/src/sys/net/iflib.c:3151 > 3151 MPASS(ifsd_m[next] == NULL); > (kgdb) print ifsd_m > $1 = (struct mbuf **) 0xfffffe00959b8000 > (kgdb) print pidx > $2 = 707 > (kgdb) print count > $3 = 0 Hrm, so far I neither see how iflib(9) could get into that state nor did I succeed in reproducing the panic, including not with a LEM-class MAC. Is that an old or a new problem? If the latter, please try with r336612. The fix in r336356 is only relevant for IGB-class devices so doesn't apply to your machine unless the above panics are from gear different than what PR 220997 is about. Marius From owner-svn-src-head@freebsd.org Sun Jul 22 18:31: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 8195E105274E; Sun, 22 Jul 2018 18:31:16 +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 365537F6B1; Sun, 22 Jul 2018 18:31:16 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 178C111AD1; Sun, 22 Jul 2018 18:31:16 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6MIVF62002709; Sun, 22 Jul 2018 18:31:15 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6MIVFgv002708; Sun, 22 Jul 2018 18:31:15 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201807221831.w6MIVFgv002708@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 22 Jul 2018 18:31:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336615 - head/sys/dev/ocs_fc X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/dev/ocs_fc X-SVN-Commit-Revision: 336615 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: Sun, 22 Jul 2018 18:31:16 -0000 Author: markj Date: Sun Jul 22 18:31:15 2018 New Revision: 336615 URL: https://svnweb.freebsd.org/changeset/base/336615 Log: Use the right buffer size when calling snprintf(). PR: 229952 Modified: head/sys/dev/ocs_fc/ocs_ioctl.c Modified: head/sys/dev/ocs_fc/ocs_ioctl.c ============================================================================== --- head/sys/dev/ocs_fc/ocs_ioctl.c Sun Jul 22 18:07:08 2018 (r336614) +++ head/sys/dev/ocs_fc/ocs_ioctl.c Sun Jul 22 18:31:15 2018 (r336615) @@ -1080,7 +1080,7 @@ ocs_sysctl_init(ocs_t *ocs) struct sysctl_oid *tree = device_get_sysctl_tree(ocs->dev); struct sysctl_oid *vtree; const char *str = NULL; - char sli_intf[16], name[16]; + char name[16]; uint32_t rev, if_type, family, i; ocs_fcport *fcp = NULL; @@ -1120,7 +1120,7 @@ ocs_sysctl_init(ocs_t *ocs) 0, "Firmware Revision"); memset(ocs->sli_intf, 0, sizeof(ocs->sli_intf)); - snprintf(ocs->sli_intf, sizeof(sli_intf), "%08x", + snprintf(ocs->sli_intf, sizeof(ocs->sli_intf), "%08x", ocs_config_read32(ocs, SLI4_INTF_REG)); SYSCTL_ADD_STRING(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "sli_intf", CTLFLAG_RD, From owner-svn-src-head@freebsd.org Sun Jul 22 20:02: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 1391A10547FE; Sun, 22 Jul 2018 20:02:15 +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 AEAB2828E2; Sun, 22 Jul 2018 20:02:14 +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 909A2129E1; Sun, 22 Jul 2018 20:02:14 +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 w6MK2EEF051883; Sun, 22 Jul 2018 20:02:14 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6MK2EdG051882; Sun, 22 Jul 2018 20:02:14 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201807222002.w6MK2EdG051882@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sun, 22 Jul 2018 20:02:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336616 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 336616 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: Sun, 22 Jul 2018 20:02:15 -0000 Author: mmacy Date: Sun Jul 22 20:02:14 2018 New Revision: 336616 URL: https://svnweb.freebsd.org/changeset/base/336616 Log: Fix a potential use after free in getsockopt() access to inp_options Discussed with: jhb Reviewed by: sbruno, transport MFC after: 2 weeks Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D14621 Modified: head/sys/netinet/ip_output.c Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Sun Jul 22 18:31:15 2018 (r336615) +++ head/sys/netinet/ip_output.c Sun Jul 22 20:02:14 2018 (r336616) @@ -1256,13 +1256,23 @@ ip_ctloutput(struct socket *so, struct sockopt *sopt) switch (sopt->sopt_name) { case IP_OPTIONS: case IP_RETOPTS: - if (inp->inp_options) - error = sooptcopyout(sopt, - mtod(inp->inp_options, - char *), - inp->inp_options->m_len); - else + INP_RLOCK(inp); + if (inp->inp_options) { + struct mbuf *options; + + options = m_dup(inp->inp_options, M_NOWAIT); + INP_RUNLOCK(inp); + if (options != NULL) { + error = sooptcopyout(sopt, + mtod(options, char *), + options->m_len); + m_freem(options); + } else + error = ENOMEM; + } else { + INP_RUNLOCK(inp); sopt->sopt_valsize = 0; + } break; case IP_TOS: From owner-svn-src-head@freebsd.org Sun Jul 22 21:00: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 C7C99102ABFD; Sun, 22 Jul 2018 21:00:12 +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 7E8B7845BB; Sun, 22 Jul 2018 21:00:12 +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 5FC4113250; Sun, 22 Jul 2018 21:00:12 +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 w6ML0Cor079079; Sun, 22 Jul 2018 21:00:12 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6ML0C0X079078; Sun, 22 Jul 2018 21:00:12 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201807222100.w6ML0C0X079078@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sun, 22 Jul 2018 21:00:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336617 - head/tests/sys/acl X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: head/tests/sys/acl X-SVN-Commit-Revision: 336617 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: Sun, 22 Jul 2018 21:00:13 -0000 Author: asomers Date: Sun Jul 22 21:00:11 2018 New Revision: 336617 URL: https://svnweb.freebsd.org/changeset/base/336617 Log: Temporarily disable the sys/acl/00 and sys/acl/02 tests These tests are failing due to PR 229930. Unfortunately, TAP tests can't be marked as expected failures. PR: 229930 Reported by: Jenkins Modified: head/tests/sys/acl/Makefile Modified: head/tests/sys/acl/Makefile ============================================================================== --- head/tests/sys/acl/Makefile Sun Jul 22 20:02:14 2018 (r336616) +++ head/tests/sys/acl/Makefile Sun Jul 22 21:00:11 2018 (r336617) @@ -14,9 +14,11 @@ ${PACKAGE}FILES+= tools-posix.test SCRIPTS+= run -TAP_TESTS_SH+= 00 +# Disable 00 and 02 until they've been updated for setfacl's new behavior +# PR 229930 tests/sys/acl/00:main fails in CI due to unexpected error message +# TAP_TESTS_SH+= 00 +# TAP_TESTS_SH+= 02 TAP_TESTS_SH+= 01 -TAP_TESTS_SH+= 02 TAP_TESTS_SH+= 03 TAP_TESTS_SH+= 04 @@ -30,8 +32,8 @@ _ACL_PROGS= getfacl setfacl TEST_METADATA.$t+= required_programs="perl zpool ${_ACL_PROGS}" .endfor -.for t in 00 02 -TEST_METADATA.$t+= required_programs="perl ${_ACL_PROGS}" -.endfor +# .for t in 00 02 +# TEST_METADATA.$t+= required_programs="perl ${_ACL_PROGS}" +# .endfor .include From owner-svn-src-head@freebsd.org Sun Jul 22 22:34: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 2510F10313FB; Sun, 22 Jul 2018 22:34: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 CEF67887E9; Sun, 22 Jul 2018 22:34:20 +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 B011414266; Sun, 22 Jul 2018 22:34:20 +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 w6MMYKJR030238; Sun, 22 Jul 2018 22:34:20 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6MMYKpn030237; Sun, 22 Jul 2018 22:34:20 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201807222234.w6MMYKpn030237@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 22 Jul 2018 22:34:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336619 - head/lib/libc/gen X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/lib/libc/gen X-SVN-Commit-Revision: 336619 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: Sun, 22 Jul 2018 22:34:21 -0000 Author: ian Date: Sun Jul 22 22:34:20 2018 New Revision: 336619 URL: https://svnweb.freebsd.org/changeset/base/336619 Log: Set the pw_class field to NULL when scanning the non-master passwd file. This avoids a null pointer deref in pw_dup(), which assumes that all pointers are either NULL or valid. Modified: head/lib/libc/gen/pw_scan.c Modified: head/lib/libc/gen/pw_scan.c ============================================================================== --- head/lib/libc/gen/pw_scan.c Sun Jul 22 21:39:27 2018 (r336618) +++ head/lib/libc/gen/pw_scan.c Sun Jul 22 22:34:20 2018 (r336619) @@ -170,7 +170,8 @@ __pw_scan(char *bp, struct passwd *pw, int flags) if (p[0]) pw->pw_fields |= _PWF_EXPIRE; pw->pw_expire = atol(p); - } + } else + pw->pw_class = NULL; if (!(pw->pw_gecos = strsep(&bp, ":"))) /* gecos */ goto fmt; if (pw->pw_gecos[0]) From owner-svn-src-head@freebsd.org Sun Jul 22 22:35: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 1C27D10314C3; Sun, 22 Jul 2018 22:35:18 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C1B718899E; Sun, 22 Jul 2018 22:35:17 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A3A2214268; Sun, 22 Jul 2018 22:35:17 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6MMZH7Y030352; Sun, 22 Jul 2018 22:35:17 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6MMZHdX030351; Sun, 22 Jul 2018 22:35:17 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <201807222235.w6MMZHdX030351@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Sun, 22 Jul 2018 22:35:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336620 - head/contrib/ofed/include X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/contrib/ofed/include X-SVN-Commit-Revision: 336620 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: Sun, 22 Jul 2018 22:35:18 -0000 Author: lwhsu (ports committer) Date: Sun Jul 22 22:35:17 2018 New Revision: 336620 URL: https://svnweb.freebsd.org/changeset/base/336620 Log: Add udma_barrier definitions for RISC-V Reviewed by: kib Sponsored by: The FreeBSD Foundation Modified: head/contrib/ofed/include/udma_barrier.h Modified: head/contrib/ofed/include/udma_barrier.h ============================================================================== --- head/contrib/ofed/include/udma_barrier.h Sun Jul 22 22:34:20 2018 (r336619) +++ head/contrib/ofed/include/udma_barrier.h Sun Jul 22 22:35:17 2018 (r336620) @@ -104,6 +104,10 @@ #include #include #define udma_to_device_barrier() dmb() +#elif defined(__riscv) +#include +#include +#define udma_to_device_barrier() fence() #else #error No architecture specific memory barrier defines found! #endif @@ -140,6 +144,8 @@ #define udma_from_device_barrier() mips_sync() #elif defined(__arm__) #define udma_from_device_barrier() dmb() +#elif defined(__riscv) +#define udma_from_device_barrier() fence() #else #error No architecture specific memory barrier defines found! #endif @@ -208,6 +214,8 @@ #define mmio_flush_writes() mips_sync() #elif defined(__arm__) #define mmio_flush_writes() dmb() +#elif defined(__riscv) +#define mmio_flush_writes() fence() #else #error No architecture specific memory barrier defines found! #endif From owner-svn-src-head@freebsd.org Sun Jul 22 22:53: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 87F101031B9B; Sun, 22 Jul 2018 22:53:13 +0000 (UTC) (envelope-from mat.macy@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 16B4089270; Sun, 22 Jul 2018 22:53:13 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: by mail-io0-x229.google.com with SMTP id w11-v6so8555726iob.2; Sun, 22 Jul 2018 15:53:13 -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=7z2MiCHiGmWNf63dTcESPbXLQ5yctBotFCdAZ8ZELo4=; b=F3X+Iq5l7eS8HqsL/2G8c313CBzZ4muYAn/qC8HJ9YxAjHmZSJydBy37J1dCPngi4O jRSFSnV3RhnfSyhXj7rS9jWVg58NP7ZONGgEB4x3sGiS7xieXNvxMYABJUK/CG3SpLEA waH2rIOtaF4sl6avvIJpQv0D2czpK3teaQW9ygvFzwv8Wq9a9Q4dqiistMHbTQdHaVQk J2vRYN9Gs9EnjkuZysF93PSgPsvgH8etCbPIZce3QQMftJqFrwvgLjXvcYUYLvPKRrKC fsq3nfB8CgxaG9r8+KGiBNvX+lkazWiB0Nx6ojAmDXr/hSQA7Z/XjJkzaQbeLN1ZxuHX lkfg== 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=7z2MiCHiGmWNf63dTcESPbXLQ5yctBotFCdAZ8ZELo4=; b=oMygWRsxIlWO1ablpuwx+CYFahdi79hDRDP7/f4LfpqckqSsXe9OonaNCZbgVchyLg mXJgyLbSMWbjamabfb8ocj3x3X0jRpOBs9EJrcVNX85FKEv8V/FHuSebbmabXnE9OgsU gSLSEs+GFSyFhn+CPKeInzNe+piwzkUcbp+R5G4W/3IfuUbBQlCrC9Dc6fnkhG4HT/Jg 2vnoH1gvDrYDtnrBPTSKoEUlyQAEmMdoix8dYImWHywj85eMOJ+NNZLYgxiu9Gd7REPU 21DI4YRazCOiLTW4BrWEevLjRjwdVh82yaO9ZhwWmNjh19CcaDwvrDY8LGYR5/5Ruhqx rrIA== X-Gm-Message-State: AOUpUlGv1lE62I+pRiJiGcXAY1qIcIfWx7luS9S1CWrRzX+sb5VSl9TH +o/1pENOTDmCZKqDig9JNJSO8i7INgICN7z/BEpEo9eG X-Google-Smtp-Source: AAOMgpcuJRabVoQJ9dzshSsXAhbM+VpuWnWCJ8/mR6NoUhyaOS017A/oEySsPvhLu7Yg3V7ByNXoEIMBXgE0KjnjLd8= X-Received: by 2002:a6b:5a08:: with SMTP id o8-v6mr8257467iob.5.1532299991938; Sun, 22 Jul 2018 15:53:11 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:8d2:0:0:0:0:0 with HTTP; Sun, 22 Jul 2018 15:53:11 -0700 (PDT) In-Reply-To: References: <201807221504.w6MF4bWW027109@pdx.rh.CN85.dnsmgr.net> From: Matthew Macy Date: Sun, 22 Jul 2018 15:53:11 -0700 Message-ID: Subject: Re: svn commit: r336593 - head/release To: Colin Percival Cc: rgrimes@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.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: Sun, 22 Jul 2018 22:53:13 -0000 That would only fix it if svn weren't installed. On Sun, Jul 22, 2018 at 9:31 AM, Colin Percival wrote: > On 07/22/18 08:04, Rodney W. Grimes wrote: >>> Build still works, but you're assuming that developers only use svn. >> >> No, he correctly assumed that RELEASE engineering only uses svn/svnlite >> for building release images. This Makefile is for production of >> official AMIs, official stuff always uses svn. > > I'm about to head mostly-AFK for the week, but one option here would be > to change > > EC2_SVNBRANCH!= ${SVN_CMD} info --show-item relative-url ${WORLDDIR} | > sed -e 's/\^\///' > EC2_SVNREV!= ${SVN_CMD} info --show-item last-changed-revision ${WORLDDIR} > > to > > .if defined(SVN_CMD) > EC2_SVNBRANCH!= ${SVN_CMD} info --show-item relative-url ${WORLDDIR} | > sed -e 's/\^\///' > EC2_SVNREV!= ${SVN_CMD} info --show-item last-changed-revision ${WORLDDIR} > .else > EC2_SVNBRANCH= unknown > EC2_SVNREV= unknown > .endif > > I don't know if this will make any difference to anyone using this code, > but it should at least silence the warnings for people who aren't checking > code out from svn. > > Colin Percival > >>> make[1]: "/usr/home/mmacy/devel/freebsd/Makefile.inc1" line 343: >>> SYSTEM_COMPILER: libclang will be built for bootstrapping a >>> cross-compiler. >>> make[1]: "/usr/home/mmacy/devel/freebsd/Makefile.inc1" line 348: >>> SYSTEM_LINKER: libclang will be built for bootstrapping a >>> cross-linker. >>> svn: E155007: '/usr/home/mmacy/devel/freebsd' is not a working copy >>> svn: E155007: '/usr/home/mmacy/devel/freebsd' is not a working copy >>> make[2]: "/usr/home/mmacy/devel/freebsd/release/Makefile.ec2" line 19: >>> warning: "/usr/local/bin/svn info --show-item last-changed-revision >>> /usr/home/mmacy/devel/freebsd/release/.." returned non-zero status >>> svn: E155007: '/usr/home/mmacy/devel/freebsd' is not a working copy >>> svn: E155007: '/usr/home/mmacy/devel/freebsd' is not a working copy >>> make[2]: "/usr/home/mmacy/devel/freebsd/release/Makefile.ec2" line 19: >>> warning: "/usr/local/bin/svn info --show-item last-changed-revision >>> /usr/home/mmacy/devel/freebsd/release/.." returned non-zero status >>> >>> On Sat, Jul 21, 2018 at 3:54 PM, Colin Percival wrote: >>>> Author: cperciva >>>> Date: Sat Jul 21 22:54:43 2018 >>>> New Revision: 336593 >>>> URL: https://svnweb.freebsd.org/changeset/base/336593 >>>> >>>> Log: >>>> Use svn or svnlite, or ${SVN_CMD} if set, for extracting the SVN branch >>>> and revision number announced in SNS notifications about new EC2 AMIs. >>>> >>>> While I'm here, incorporate that information into the AMI "description" >>>> fields, since it's more useful than simply echoing the information >>>> already provided via the AMI "name". >>>> >>>> Approved by: gjb >>>> >>>> Modified: >>>> head/release/Makefile.ec2 >> ^^^^^^^^^^ >> >>>> >>>> Modified: head/release/Makefile.ec2 >>>> ============================================================================== >>>> --- head/release/Makefile.ec2 Sat Jul 21 22:15:48 2018 (r336592) >>>> +++ head/release/Makefile.ec2 Sat Jul 21 22:54:43 2018 (r336593) >>>> @@ -5,6 +5,19 @@ >>>> # Makefile for creating an EC2 AMI from a disk image. >>>> # >>>> >>>> +# Figure out where SVN is >>>> +.if !defined(SVN_CMD) || empty(SVN_CMD) >>>> +. for _P in /usr/bin /usr/local/bin >>>> +. for _S in svn svnlite >>>> +. if exists(${_P}/${_S}) >>>> +SVN_CMD= ${_P}/${_S} >>>> +. endif >>>> +. endfor >>>> +. endfor >>>> +.endif >>>> +EC2_SVNBRANCH!= ${SVN_CMD} info --show-item relative-url ${WORLDDIR} | sed -e 's/\^\///' >>>> +EC2_SVNREV!= ${SVN_CMD} info --show-item last-changed-revision ${WORLDDIR} >>>> + >>>> .if ${BRANCH} == "CURRENT" || ${BRANCH} == "STABLE" || ${BRANCH} == "PRERELEASE" >>>> AMINAMESUFFIX!= date +-%Y-%m-%d >>>> .endif >>>> @@ -13,8 +26,6 @@ PUBLISH= --public >>>> .endif >>>> .if defined(EC2SNSTOPIC) && !empty(EC2SNSTOPIC) >>>> EC2SNSREL= ${REVISION}-${BRANCH} >>>> -EC2_SVNBRANCH!= svn info --show-item relative-url ${WORLDDIR} | sed -e 's/\^\///' >>>> -EC2_SVNREV!= svn info --show-item last-changed-revision ${WORLDDIR} >>>> EC2SNSVERS= ${EC2_SVNBRANCH}@${EC2_SVNREV} >>>> .endif >>>> >>>> @@ -60,7 +71,7 @@ ec2ami: cw-ec2 ${CW_EC2_PORTINSTALL} >>>> /usr/local/bin/bsdec2-image-upload ${PUBLISH} --sriov --ena \ >>>> ${.OBJDIR}/ec2.raw \ >>>> "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX}" \ >>>> - "${TYPE} ${REVISION}-${BRANCH}-${TARGET}" \ >>>> + "${TYPE}/${TARGET} ${EC2_SVNBRANCH}@${EC2_SVNREV}" \ >>>> ${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE} \ >>>> ${EC2SNSTOPIC} ${EC2SNSREL} ${EC2SNSVERS} >>>> @touch ${.TARGET} >>>> >>> >>> >> > > -- > Colin Percival > Security Officer Emeritus, FreeBSD | The power to serve > Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From owner-svn-src-head@freebsd.org Sun Jul 22 22:57: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 213A61031C81; Sun, 22 Jul 2018 22:57:53 +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 CA92E89408; Sun, 22 Jul 2018 22:57:52 +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 ABB32145C3; Sun, 22 Jul 2018 22:57:52 +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 w6MMvqlW040886; Sun, 22 Jul 2018 22:57:52 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6MMvq3f040885; Sun, 22 Jul 2018 22:57:52 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201807222257.w6MMvq3f040885@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sun, 22 Jul 2018 22:57:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336621 - head/release X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/release X-SVN-Commit-Revision: 336621 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: Sun, 22 Jul 2018 22:57:53 -0000 Author: mmacy Date: Sun Jul 22 22:57:52 2018 New Revision: 336621 URL: https://svnweb.freebsd.org/changeset/base/336621 Log: fix build non-svn checkouts post r336593 The change made in r336593 assumes that the build is happening in a svn checkout resulting in misleading debug output. Check that we're actually working in an svn checkout before proceeding to call svn. Modified: head/release/Makefile.ec2 Modified: head/release/Makefile.ec2 ============================================================================== --- head/release/Makefile.ec2 Sun Jul 22 22:35:17 2018 (r336620) +++ head/release/Makefile.ec2 Sun Jul 22 22:57:52 2018 (r336621) @@ -15,8 +15,13 @@ SVN_CMD= ${_P}/${_S} . endfor . endfor .endif +.if exists($SRCTOP/.svn) EC2_SVNBRANCH!= ${SVN_CMD} info --show-item relative-url ${WORLDDIR} | sed -e 's/\^\///' EC2_SVNREV!= ${SVN_CMD} info --show-item last-changed-revision ${WORLDDIR} +.else +EC2_SVNBRANCH= unknown +EC2_SVNREV= unknown +.endif .if ${BRANCH} == "CURRENT" || ${BRANCH} == "STABLE" || ${BRANCH} == "PRERELEASE" AMINAMESUFFIX!= date +-%Y-%m-%d From owner-svn-src-head@freebsd.org Sun Jul 22 23:20: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 B81761032879; Sun, 22 Jul 2018 23:20:25 +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 6A54A89F4A; Sun, 22 Jul 2018 23:20:25 +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 4B9A514909; Sun, 22 Jul 2018 23:20:25 +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 w6MNKPqJ050780; Sun, 22 Jul 2018 23:20:25 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6MNKPeT050779; Sun, 22 Jul 2018 23:20:25 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201807222320.w6MNKPeT050779@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sun, 22 Jul 2018 23:20:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336622 - head/release X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/release X-SVN-Commit-Revision: 336622 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: Sun, 22 Jul 2018 23:20:25 -0000 Author: mmacy Date: Sun Jul 22 23:20:24 2018 New Revision: 336622 URL: https://svnweb.freebsd.org/changeset/base/336622 Log: Correctly reference SRCTOP, avoid multiple invocations of svn Reported by: sjg Modified: head/release/Makefile.ec2 Modified: head/release/Makefile.ec2 ============================================================================== --- head/release/Makefile.ec2 Sun Jul 22 22:57:52 2018 (r336621) +++ head/release/Makefile.ec2 Sun Jul 22 23:20:24 2018 (r336622) @@ -15,9 +15,15 @@ SVN_CMD= ${_P}/${_S} . endfor . endfor .endif -.if exists($SRCTOP/.svn) -EC2_SVNBRANCH!= ${SVN_CMD} info --show-item relative-url ${WORLDDIR} | sed -e 's/\^\///' -EC2_SVNREV!= ${SVN_CMD} info --show-item last-changed-revision ${WORLDDIR} +.if exists(${SRCTOP}/.svn) +. if empty(${EC2_SVNBRANCH}) + EC2_SVNBRANCH!= ${SVN_CMD} info --show-item relative-url ${WORLDDIR} | sed -e 's/\^\///' +. export EC2_SVNBRANCH +. endif +. if empty(${EC2_SVNREV}) + EC2_SVNREV!= ${SVN_CMD} info --show-item last-changed-revision ${WORLDDIR} +. export EC2_SVNREV +. endif .else EC2_SVNBRANCH= unknown EC2_SVNREV= unknown From owner-svn-src-head@freebsd.org Sun Jul 22 23:32: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 3459B1032EB9; Sun, 22 Jul 2018 23:32:23 +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 DA10D8A99C; Sun, 22 Jul 2018 23:32:22 +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 A2B5414B44; Sun, 22 Jul 2018 23:32:22 +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 w6MNWMpk061105; Sun, 22 Jul 2018 23:32:22 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6MNWMNp061103; Sun, 22 Jul 2018 23:32:22 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201807222332.w6MNWMNp061103@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sun, 22 Jul 2018 23:32:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336623 - head/sys/dev/uart X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/dev/uart X-SVN-Commit-Revision: 336623 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: Sun, 22 Jul 2018 23:32:23 -0000 Author: mmacy Date: Sun Jul 22 23:32:21 2018 New Revision: 336623 URL: https://svnweb.freebsd.org/changeset/base/336623 Log: Add busy detect quirk to list of console options This change allows one to set the busy_detect flag required by the synopsys UART at the loader prompt. This is needed by the EPYC 3000 SoC. This will give users a working console up to the point where getty is required: hw.uart.console="mm:0xfedc9000,rs:2,bd:1" Reviewed by: imp MFC after: 4 weeks Differential Revision: https://reviews.freebsd.org/D16399 Modified: head/sys/dev/uart/uart.h head/sys/dev/uart/uart_dev_ns8250.c head/sys/dev/uart/uart_subr.c Modified: head/sys/dev/uart/uart.h ============================================================================== --- head/sys/dev/uart/uart.h Sun Jul 22 23:20:24 2018 (r336622) +++ head/sys/dev/uart/uart.h Sun Jul 22 23:32:21 2018 (r336623) @@ -44,6 +44,7 @@ struct uart_bas { u_int rclk; u_int regshft; u_int regiowidth; + u_int busy_detect; }; #define uart_regofs(bas, reg) ((reg) << (bas)->regshft) Modified: head/sys/dev/uart/uart_dev_ns8250.c ============================================================================== --- head/sys/dev/uart/uart_dev_ns8250.c Sun Jul 22 23:20:24 2018 (r336622) +++ head/sys/dev/uart/uart_dev_ns8250.c Sun Jul 22 23:32:21 2018 (r336623) @@ -469,6 +469,7 @@ ns8250_bus_attach(struct uart_softc *sc) bas = &sc->sc_bas; + ns8250->busy_detect = bas->busy_detect; ns8250->mcr = uart_getreg(bas, REG_MCR); ns8250->fcr = FCR_ENABLE; #ifdef CPU_XBURST Modified: head/sys/dev/uart/uart_subr.c ============================================================================== --- head/sys/dev/uart/uart_subr.c Sun Jul 22 23:20:24 2018 (r336622) +++ head/sys/dev/uart/uart_subr.c Sun Jul 22 23:32:21 2018 (r336623) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #define UART_TAG_RS 7 #define UART_TAG_SB 8 #define UART_TAG_XO 9 +#define UART_TAG_BD 10 static struct uart_class *uart_classes[] = { &uart_ns8250_class, @@ -124,6 +125,10 @@ uart_parse_tag(const char **p) { int tag; + if ((*p)[0] == 'b' && (*p)[1] == 'd') { + tag = UART_TAG_BD; + goto out; + } if ((*p)[0] == 'b' && (*p)[1] == 'r') { tag = UART_TAG_BR; goto out; @@ -179,6 +184,7 @@ out: * separated by commas. Each attribute is a tag-value pair with the tag and * value separated by a colon. Supported tags are: * + * bd = Busy Detect * br = Baudrate * ch = Channel * db = Data bits @@ -242,6 +248,9 @@ uart_getenv(int devtype, struct uart_devinfo *di, stru spec = cp; for (;;) { switch (uart_parse_tag(&spec)) { + case UART_TAG_BD: + di->bas.busy_detect = uart_parse_long(&spec); + break; case UART_TAG_BR: di->baudrate = uart_parse_long(&spec); break; From owner-svn-src-head@freebsd.org Sun Jul 22 23:33: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 BE86C1032F62; Sun, 22 Jul 2018 23:33:49 +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 6A9658AB17; Sun, 22 Jul 2018 23:33:49 +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 4BCCA14C47; Sun, 22 Jul 2018 23:33:49 +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 w6MNXn6E061223; Sun, 22 Jul 2018 23:33:49 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6MNXnoj061222; Sun, 22 Jul 2018 23:33:49 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201807222333.w6MNXnoj061222@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Sun, 22 Jul 2018 23:33:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336624 - head/release X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/release X-SVN-Commit-Revision: 336624 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: Sun, 22 Jul 2018 23:33:49 -0000 Author: mmacy Date: Sun Jul 22 23:33:48 2018 New Revision: 336624 URL: https://svnweb.freebsd.org/changeset/base/336624 Log: fix use of empty in Makefile.ec2 empty() takes a variable name - not the expanded value Reported by: sjg Modified: head/release/Makefile.ec2 Modified: head/release/Makefile.ec2 ============================================================================== --- head/release/Makefile.ec2 Sun Jul 22 23:32:21 2018 (r336623) +++ head/release/Makefile.ec2 Sun Jul 22 23:33:48 2018 (r336624) @@ -16,11 +16,11 @@ SVN_CMD= ${_P}/${_S} . endfor .endif .if exists(${SRCTOP}/.svn) -. if empty(${EC2_SVNBRANCH}) +. if empty(EC2_SVNBRANCH) EC2_SVNBRANCH!= ${SVN_CMD} info --show-item relative-url ${WORLDDIR} | sed -e 's/\^\///' . export EC2_SVNBRANCH . endif -. if empty(${EC2_SVNREV}) +. if empty(EC2_SVNREV) EC2_SVNREV!= ${SVN_CMD} info --show-item last-changed-revision ${WORLDDIR} . export EC2_SVNREV . endif From owner-svn-src-head@freebsd.org Sun Jul 22 23:41: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 456AC103319B; Sun, 22 Jul 2018 23:41:41 +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 EF7C48AE2B; Sun, 22 Jul 2018 23:41:40 +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 D22DC14DA6; Sun, 22 Jul 2018 23:41:40 +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 w6MNfeUf065289; Sun, 22 Jul 2018 23:41:40 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6MNfeDa065288; Sun, 22 Jul 2018 23:41:40 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201807222341.w6MNfeDa065288@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 22 Jul 2018 23:41:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336625 - head/usr.sbin/pw X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/usr.sbin/pw X-SVN-Commit-Revision: 336625 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: Sun, 22 Jul 2018 23:41:41 -0000 Author: ian Date: Sun Jul 22 23:41:40 2018 New Revision: 336625 URL: https://svnweb.freebsd.org/changeset/base/336625 Log: Make pw(8) showuser work the same with or without -R for non-root users. Without -R, pw(8) uses getpwnam(3), which will open master.passwd for the root user or passwd for non-root users. With -R pw(8) was always opening /master.passwd, which would fail for a non-root user, then falsely claim the userid you're trying to show doesn't exist. Now for a non-root user it opens /passwd and zeroes out the 3 fields that aren't available in the passwd file, which duplicates the behavior of getpwnam(3). The net effect is that the showuser output is identical whether using -R or not. Modified: head/usr.sbin/pw/pw_vpw.c Modified: head/usr.sbin/pw/pw_vpw.c ============================================================================== --- head/usr.sbin/pw/pw_vpw.c Sun Jul 22 23:33:48 2018 (r336624) +++ head/usr.sbin/pw/pw_vpw.c Sun Jul 22 23:41:40 2018 (r336625) @@ -39,10 +39,13 @@ static const char rcsid[] = #include #include #include +#include #include "pwupd.h" static FILE * pwd_fp = NULL; +static int pwd_scanflag; +static const char *pwd_filename; void vendpwent(void) @@ -71,7 +74,18 @@ vnextpwent(char const *nam, uid_t uid, int doclose) line = NULL; linecap = 0; - if (pwd_fp != NULL || (pwd_fp = fopen(getpwpath(_MASTERPASSWD), "r")) != NULL) { + if (pwd_fp == NULL) { + if (geteuid() == 0) { + pwd_filename = _MASTERPASSWD; + pwd_scanflag = PWSCAN_MASTER; + } else { + pwd_filename = _PASSWD; + pwd_scanflag = 0; + } + pwd_fp = fopen(getpwpath(pwd_filename), "r"); + } + + if (pwd_fp != NULL) { while ((linelen = getline(&line, &linecap, pwd_fp)) > 0) { /* Skip comments and empty lines */ if (*line == '\n' || *line == '#') @@ -79,10 +93,10 @@ vnextpwent(char const *nam, uid_t uid, int doclose) /* trim latest \n */ if (line[linelen - 1 ] == '\n') line[linelen - 1] = '\0'; - pw = pw_scan(line, PWSCAN_MASTER); + pw = pw_scan(line, pwd_scanflag); if (pw == NULL) errx(EXIT_FAILURE, "Invalid user entry in '%s':" - " '%s'", getpwpath(_MASTERPASSWD), line); + " '%s'", getpwpath(pwd_filename), line); if (uid != (uid_t)-1) { if (uid == pw->pw_uid) break; @@ -98,6 +112,18 @@ vnextpwent(char const *nam, uid_t uid, int doclose) vendpwent(); } free(line); + + /* + * If we read the non-master passwd, some fields may not have been + * populated. Clean them up so that the output looks the same as that + * generated using getpwnam() which also inits them to these values. + */ + if (!(pw->pw_fields & _PWF_CLASS)) + pw->pw_class = ""; + if (!(pw->pw_fields & _PWF_CHANGE)) + pw->pw_change = 0; + if (!(pw->pw_fields & _PWF_EXPIRE)) + pw->pw_expire = 0; return (pw); } From owner-svn-src-head@freebsd.org Mon Jul 23 05: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 AF85D103ECA9; Mon, 23 Jul 2018 05:13:33 +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 EEB6094032; Mon, 23 Jul 2018 05:13:32 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id hT9ufYj4j5HxqhT9wf3zry; Sun, 22 Jul 2018 23:13:25 -0600 X-Authority-Analysis: v=2.3 cv=BMcHU2YG c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=R9QF1RCXAYgA:10 a=6I5d2MoRAAAA:8 a=mDV3o1hIAAAA:8 a=YxBL1-UpAAAA:8 a=tAtvTxkdm60LNoFt9B0A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=_FVE-zBwftR9WsbkzFJk:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 5D2E21AA; Sun, 22 Jul 2018 22:13:26 -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 w6N5DMEN049116; Sun, 22 Jul 2018 22:13:22 -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 w6N5DM8u049113; Sun, 22 Jul 2018 22:13:22 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201807230513.w6N5DM8u049113@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: r336619 - head/lib/libc/gen In-Reply-To: Message from Ian Lepore of "Sun, 22 Jul 2018 22:34:20 -0000." <201807222234.w6MMYKpn030237@repo.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 22 Jul 2018 22:13:22 -0700 X-CMAE-Envelope: MS4wfMx0db2SzubghSIG7iy+G0yDdSOGkUbvIrRV8znRXbv+B/OwXeIO6NLN4s3W2UmBALvZA5+nN1G8OGUABUqoOFOL0sfS+kmLcLYO2zuQ1to8sxmkhtwo 5c6BdM4SJamhqNKD+h32Vgu6DOMIQkPOKuQ+Znx8ApT2ceE5TExcfDWDgbhf2DJdTHa9qxYLi6RTuoDe7AiYma78ow/ekMglb+fZlZI5BrBmrnlU5Ve2dZBt 8rCDYxDwrZwTytTHIHLLH/j3993N9xonRkbjh+ZQ5ELSz1q1Ji1QDlkq33w4N35G 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: Mon, 23 Jul 2018 05:13:33 -0000 In message <201807222234.w6MMYKpn030237@repo.freebsd.org>, Ian Lepore writes: > Author: ian > Date: Sun Jul 22 22:34:20 2018 > New Revision: 336619 > URL: https://svnweb.freebsd.org/changeset/base/336619 > > Log: > Set the pw_class field to NULL when scanning the non-master passwd file. > This avoids a null pointer deref in pw_dup(), which assumes that all > pointers are either NULL or valid. > > Modified: > head/lib/libc/gen/pw_scan.c > > Modified: head/lib/libc/gen/pw_scan.c > ============================================================================= > = > --- head/lib/libc/gen/pw_scan.c Sun Jul 22 21:39:27 2018 (r33661 > 8) > +++ head/lib/libc/gen/pw_scan.c Sun Jul 22 22:34:20 2018 (r33661 > 9) > @@ -170,7 +170,8 @@ __pw_scan(char *bp, struct passwd *pw, int flags) > if (p[0]) > pw->pw_fields |= _PWF_EXPIRE; > pw->pw_expire = atol(p); > - } > + } else > + pw->pw_class = NULL; > if (!(pw->pw_gecos = strsep(&bp, ":"))) /* gecos */ > goto fmt; > if (pw->pw_gecos[0]) > Hi Ian, This causes ssh a bit of gas. slippy$ gdb ssh GNU gdb (GDB) 8.1 [GDB v8.1 for FreeBSD] Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-portbld-freebsd12.0". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from ssh...Reading symbols from /usr/lib/debug//usr/bin/ ssh.debug...done. done. (gdb) set args bob id (gdb) run Starting program: /usr/bin/ssh bob id Program received signal SIGSEGV, Segmentation fault. strlen (str=0x0) at /opt/src/svn-current/lib/libc/string/strlen.c:101 101 va = (*lp - mask01); (gdb) bt #0 strlen (str=0x0) at /opt/src/svn-current/lib/libc/string/strlen.c:10 1 #1 0x000000002bf10462 in Fssh_xstrdup (str=0x0) at /opt/src/svn-current/crypto/openssh/xmalloc.c:98 #2 0x000000002bf0ce38 in Fssh_pwcopy (pw=0x2c5962d0) at /opt/src/svn-current/crypto/openssh/misc.c:302 #3 0x0000000000214391 in main (ac=3, av=0x7fffffffe648) at /opt/src/svn-current/crypto/openssh/ssh.c:633 (gdb) l 96 * p and (p & ~LONGPTR_MASK) must be equally accessible since 97 * they always fall in the same memory page, as long as page 98 * boundaries is integral multiple of word size. 99 */ 100 lp = (const unsigned long *)((uintptr_t)str & ~LONGPTR_MASK); 101 va = (*lp - mask01); 102 vb = ((~*lp) & mask80); 103 lp++; 104 if (va & vb) 105 /* Check if we have \0 in the first part */ (gdb) p lp $1 = (const unsigned long *) 0x0 (gdb) up #1 0x000000002bf10462 in Fssh_xstrdup (str=0x0) at /opt/src/svn-current/crypto/openssh/xmalloc.c:98 98 len = strlen(str) + 1; (gdb) l 93 xstrdup(const char *str) 94 { 95 size_t len; 96 char *cp; 97 98 len = strlen(str) + 1; 99 cp = xmalloc(len); 100 strlcpy(cp, str, len); 101 return cp; 102 } (gdb) p str $2 = 0x0 (gdb) up #2 0x000000002bf0ce38 in Fssh_pwcopy (pw=0x2c5962d0) at /opt/src/svn-current/crypto/openssh/misc.c:302 302 copy->pw_class = xstrdup(pw->pw_class); (gdb) l 297 #endif 298 #ifdef HAVE_STRUCT_PASSWD_PW_CHANGE 299 copy->pw_change = pw->pw_change; 300 #endif 301 #ifdef HAVE_STRUCT_PASSWD_PW_CLASS 302 copy->pw_class = xstrdup(pw->pw_class); 303 #endif 304 copy->pw_dir = xstrdup(pw->pw_dir); 305 copy->pw_shell = xstrdup(pw->pw_shell); 306 return copy; (gdb) p pw->pw_class $3 = 0x0 (gdb) (If anyone's wondering, I name my systems after dead pets.) -- 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 Mon Jul 23 05:25: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 6BE53103F22D; Mon, 23 Jul 2018 05:25:52 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D672494550; Mon, 23 Jul 2018 05:25:51 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from freyja.zeit4.iv.bundesimmobilien.de ([87.138.105.249]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0M0hT0-1g0nLI3KEo-00umtd; Mon, 23 Jul 2018 07:20:35 +0200 Date: Mon, 23 Jul 2018 07:20:28 +0200 From: "O. Hartmann" To: Ian Lepore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336525 - in head: contrib/ntp/ntpd etc etc/mtree share/man/man4 sys/conf sys/modules sys/modules/mac_ntpd sys/security/mac_ntpd usr.sbin/ntp Message-ID: <20180723072022.27ad4a8a@freyja.zeit4.iv.bundesimmobilien.de> In-Reply-To: <201807192355.w6JNtTqc054644@repo.freebsd.org> References: <201807192355.w6JNtTqc054644@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:wQPmIDyHlVZ20zNWDZWMFKWhyffWBbpsLVwF8m1S2wX1zYqQ+u5 a/PpSewqF0Qke+8nG+3zMT5mHcz8nUIHrWKq26YE09OIHqRcqyfydD7YlktKklHj/JRTtFP h7n21+WJ9iN4m/N6AZyWkWLgHlphheRtcP9FJXBRC2LHSgXP807qz1y2Mp03Uenh2Cx6rE0 oWBkvhRABLanj/cYGi+jQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:S6C3PUn7uX8=:ctsgL2zLPK5p7EZj2J1UAL 2l9rO7v2e+4w7TvOLAzaCRYiXKlPTC39bF+E2kOJk7cVdyNxOimST6nuJW6ox1cvYR1WtM2Iq bklMdpiLo6+4pt9E/V7W0jkZ1zAihaOzl62tGt8hlhLMgFv4zGiIGOBK+Dw1YVl8nDO8mvWsr 4k6GXiZfwgT5t6fU1ZT0r+80uk9TwaGkDM59CVgOD6xOuZMVzSSdTGz6Dbk8aVQFrmqd6RODK 089q1yDKb/qwtAwSkLZam15/Ui3EnJNLceszjSbUIrz2nYTW8jRPWysPzpMaZd9wL+hSot8UY qhg5YxcoyCJhhs88WsH2VSo1LadzdjE3h9YN+iNSLL8K7WseS9jqbIry3v+P3OqVVm0or5qjO IsvvSQkNnfBIE56h0Eb6K0E/yjnrq9Xe7pwfGUEXlyYFSdmojvmF7tSAkpavlCdLLQTcCWQOq EbsD8mnwtkO99vf+LlZUJlLqjS4yKmgRLiy73EGrdeowFTsIFdUYSmrTysNel+WFt7N4veNj7 EVe6mpph4cp1117NIIrNbRI69josPsD1UZO66l9EwNKR9SLX1pAMKmb3POqPdJzj0OSjHCVXz d1Xwwq3659Dl0BdUNcBNjZ8i+UXdZ3bmaUoB4b3Y/rr6o4MTlMAtZKuMDRseT0hkbYf+yolW8 xpXJaWPP2Xxb86KUZfavdkUj32ns2BD7Pd5XDG1toFSe/WjPkDhs//rK15MIqve/g+4LQ69Ja ayTQIMHDIExdFxYoqqWARsL8kiWjEgGb/ZnKUhOm4Mo/WrzI2Y/JaI/e3SeXtY9915uJTA1dv dehQjDQ 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: Mon, 23 Jul 2018 05:25:52 -0000 On Thu, 19 Jul 2018 23:55:29 +0000 (UTC) Ian Lepore wrote: > Author: ian > Date: Thu Jul 19 23:55:29 2018 > New Revision: 336525 > URL: https://svnweb.freebsd.org/changeset/base/336525 > > Log: > Make it possible to run ntpd as a non-root user, add ntpd uid and gid. > > Code analysis and runtime analysis using truss(8) indicate that the only > privileged operations performed by ntpd are adjusting system time, and > (re-)binding to privileged UDP port 123. These changes add a new mac(4) > policy module, mac_ntpd(4), which grants just those privileges to any > process running with uid 123. > > This also adds a new user and group, ntpd:ntpd, (uid:gid 123:123), and makes > them the owner of the /var/db/ntp directory, so that it can be used as a > location where the non-privileged daemon can write files such as the > driftfile, and any optional logfile or stats files. > > Because there are so many ways to configure ntpd, the question of how to > configure it to run without root privs can be a bit complex, so that will be > addressed in a separate commit. These changes are just what's required to > grant the limited subset of privs to ntpd, and the small change to ntpd to > prevent it from exiting with an error if running as non-root. > > Differential Revision: https://reviews.freebsd.org/D16281 > > Added: > head/share/man/man4/mac_ntpd.4 (contents, props changed) > head/sys/modules/mac_ntpd/ > head/sys/modules/mac_ntpd/Makefile (contents, props changed) > head/sys/security/mac_ntpd/ > head/sys/security/mac_ntpd/mac_ntpd.c (contents, props changed) > Modified: > head/contrib/ntp/ntpd/ntpd.c > head/etc/group > head/etc/master.passwd > head/etc/mtree/BSD.var.dist > head/sys/conf/NOTES > head/sys/conf/files > head/sys/conf/options > head/sys/modules/Makefile > head/usr.sbin/ntp/config.h > > Modified: head/contrib/ntp/ntpd/ntpd.c > ============================================================================== > --- head/contrib/ntp/ntpd/ntpd.c Thu Jul 19 23:54:18 2018 > (r336524) +++ head/contrib/ntp/ntpd/ntpd.c Thu Jul 19 23:55:29 > 2018 (r336525) @@ -123,6 +123,9 @@ > #if defined(HAVE_PRIV_H) && defined(HAVE_SOLARIS_PRIVS) > # include > #endif /* HAVE_PRIV_H */ > +#if defined(HAVE_TRUSTEDBSD_MAC) > +# include > +#endif /* HAVE_TRUSTEDBSD_MAC */ > #endif /* HAVE_DROPROOT */ > > #if defined (LIBSECCOMP) && (KERN_SECCOMP) > @@ -634,7 +637,12 @@ ntpdmain( > /* MPE lacks the concept of root */ > # if defined(HAVE_GETUID) && !defined(MPE) > uid = getuid(); > - if (uid && !HAVE_OPT( SAVECONFIGQUIT )) { > + if (uid && !HAVE_OPT( SAVECONFIGQUIT ) > +# if defined(HAVE_TRUSTEDBSD_MAC) > + /* We can run as non-root if the mac_ntpd policy is enabled. */ > + && mac_is_present("ntpd") != 1 > +# endif > + ) { > msyslog_term = TRUE; > msyslog(LOG_ERR, > "must be run as root, not uid %ld", (long)uid); > @@ -1082,7 +1090,17 @@ getgroup: > exit (-1); > } > > -# if !defined(HAVE_LINUX_CAPABILITIES) && !defined(HAVE_SOLARIS_PRIVS) > +# if defined(HAVE_TRUSTEDBSD_MAC) > + /* > + * To manipulate system time and (re-)bind to NTP_PORT as > needed > + * following interface changes, we must either run as uid 0 > or > + * the mac_ntpd policy module must be enabled. > + */ > + if (sw_uid != 0 && mac_is_present("ntpd") != 1) { > + msyslog(LOG_ERR, "Need MAC 'ntpd' policy enabled to > drop root privileges"); > + exit (-1); > + } > +# elif !defined(HAVE_LINUX_CAPABILITIES) && !defined(HAVE_SOLARIS_PRIVS) > /* > * for now assume that the privilege to bind to privileged > ports > * is associated with running with uid 0 - should be refined > on > > Modified: head/etc/group > ============================================================================== > --- head/etc/group Thu Jul 19 23:54:18 2018 (r336524) > +++ head/etc/group Thu Jul 19 23:55:29 2018 (r336525) > @@ -29,6 +29,7 @@ dialer:*:68: > network:*:69: > audit:*:77: > www:*:80: > +ntpd:*:123: > _ypldap:*:160: > hast:*:845: > nogroup:*:65533: > > Modified: head/etc/master.passwd > ============================================================================== > --- head/etc/master.passwd Thu Jul 19 23:54:18 2018 (r336524) > +++ head/etc/master.passwd Thu Jul 19 23:55:29 2018 (r336525) > @@ -22,6 +22,7 @@ uucp:*:66:66::0:0:UUCP pseudo-user:/var/spool/uucppubl > pop:*:68:6::0:0:Post Office Owner:/nonexistent:/usr/sbin/nologin > auditdistd:*:78:77::0:0:Auditdistd unprivileged > user:/var/empty:/usr/sbin/nologin www:*:80:80::0:0:World Wide Web > Owner:/nonexistent:/usr/sbin/nologin +ntpd:*:123:123::0:0:NTP > Daemon:/var/db/ntp:/usr/sbin/nologin _ypldap:*:160:160::0:0:YP LDAP > unprivileged user:/var/empty:/usr/sbin/nologin hast:*:845:845::0:0:HAST > unprivileged user:/var/empty:/usr/sbin/nologin > nobody:*:65534:65534::0:0:Unprivileged user:/nonexistent:/usr/sbin/nologin > > Modified: head/etc/mtree/BSD.var.dist > ============================================================================== > --- head/etc/mtree/BSD.var.dist Thu Jul 19 23:54:18 2018 > (r336524) +++ head/etc/mtree/BSD.var.dist Thu Jul 19 23:55:29 > 2018 (r336525) @@ -46,7 +46,7 @@ > .. > ipf mode=0700 > .. > - ntp mode=0700 > + ntp uname=ntpd gname=ntpd > .. > pkg > .. > > Added: head/share/man/man4/mac_ntpd.4 > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/share/man/man4/mac_ntpd.4 Thu Jul 19 23:55:29 2018 > (r336525) @@ -0,0 +1,116 @@ > +.\" Copyright (c) 2018 Ian Lepore > +.\" > +.\" 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 AUTHORS 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 AUTHORS OR CONTRIBUTORS > BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR > CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF > SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS > INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN > CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) > ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF > THE POSSIBILITY OF +.\" SUCH DAMAGE. > +.\" > +.\" $FreeBSD$ > +.\" > +.Dd June 28, 2018 > +.Dt MAC_NTPD 4 > +.Os > +.Sh NAME > +.Nm mac_ntpd > +.Nd "policy allowing ntpd to run as non-root user" > +.Sh SYNOPSIS > +To compile the ntpd policy into your kernel, place the following lines > +in your kernel configuration file: > +.Bd -ragged -offset indent > +.Cd "options MAC" > +.Cd "options MAC_NTPD" > +.Ed > +.Pp > +Alternately, to load the ntpd policy module at boot time, > +place the following line in your kernel configuration file: > +.Bd -ragged -offset indent > +.Cd "options MAC" > +.Ed > +.Pp > +and in > +.Xr loader.conf 5 : > +.Pp > +.Dl "mac_ntpd_load=""YES""" > +.Sh DESCRIPTION > +The > +.Nm > +policy grants any process running as user > +.Sq ntpd > +(uid 123) the privileges needed to manipulate > +system time, and to (re-)bind to the privileged NTP port. > +.Pp > +When > +.Xr ntpd 8 > +is started with > +.Sq -u\ > +on the command line, it performs all initializations requiring root > +privileges, then drops root privileges by switching to the given user id. > +From that point on, the only privileges it requires are the ability > +to manipulate system time, and the ability to re-bind a UDP socket > +to the NTP port (port 123) after a network interface change. > +By default, > +.Fx > +starts > +.Xr ntpd 8 > +with > +.Sq -u\ ntpd:ntpd > +on the command line, if the mac_ntpd policy is available to grant > +the required privileges. > +.Pp > +.Ss Privileges Granted > +The exact set of kernel privileges granted to any process running > +with the configured uid is: > +.Bl -inset -compact -offset indent > +.It PRIV_ADJTIME > +.It PRIV_CLOCK_SETTIME > +.It PRIV_NTP_ADJTIME > +.It PRIV_NETINET_RESERVEDPORT > +.It PRIV_NETINET_REUSEPORT > +.El > +.Pp > +.Ss Runtime Configuration > +The following > +.Xr sysctl 8 > +MIBs are available for fine-tuning this MAC policy. > +All > +.Xr sysctl 8 > +variables can also be set as > +.Xr loader 8 > +tunables in > +.Xr loader.conf 5 . > +.Bl -tag -width indent > +.It Va security.mac.ntpd.enabled > +Enable the > +.Nm > +policy. > +(Default: 1). > +.It Va security.mac.ntpd.uid > +The numeric uid of the ntpd user. > +(Default: 123). > +.El > +.Sh SEE ALSO > +.Xr mac 4 , > +.Xr ntpd 8 > +.Sh HISTORY > +MAC first appeared in > +.Fx 5.0 > +and > +.Nm > +first appeared in > +.Fx 12.0 . > > Modified: head/sys/conf/NOTES > ============================================================================== > --- head/sys/conf/NOTES Thu Jul 19 23:54:18 2018 (r336524) > +++ head/sys/conf/NOTES Thu Jul 19 23:55:29 2018 (r336525) > @@ -1193,6 +1193,7 @@ options MAC_IFOFF > options MAC_LOMAC > options MAC_MLS > options MAC_NONE > +options MAC_NTPD > options MAC_PARTITION > options MAC_PORTACL > options MAC_SEEOTHERUIDS > > Modified: head/sys/conf/files > ============================================================================== > --- head/sys/conf/files Thu Jul 19 23:54:18 2018 (r336524) > +++ head/sys/conf/files Thu Jul 19 23:55:29 2018 (r336525) > @@ -4887,6 +4887,7 @@ security/mac_ifoff/mac_ifoff.c optional mac_ifoff > security/mac_lomac/mac_lomac.c optional mac_lomac > security/mac_mls/mac_mls.c optional mac_mls > security/mac_none/mac_none.c optional mac_none > +security/mac_ntpd/mac_ntpd.c optional mac_ntpd > security/mac_partition/mac_partition.c optional mac_partition > security/mac_portacl/mac_portacl.c optional mac_portacl > security/mac_seeotheruids/mac_seeotheruids.c optional mac_seeotheruids > > Modified: head/sys/conf/options > ============================================================================== > --- head/sys/conf/options Thu Jul 19 23:54:18 2018 (r336524) > +++ head/sys/conf/options Thu Jul 19 23:55:29 2018 (r336525) > @@ -158,6 +158,7 @@ MAC_IFOFF opt_dontuse.h > MAC_LOMAC opt_dontuse.h > MAC_MLS opt_dontuse.h > MAC_NONE opt_dontuse.h > +MAC_NTPD opt_dontuse.h > MAC_PARTITION opt_dontuse.h > MAC_PORTACL opt_dontuse.h > MAC_SEEOTHERUIDS opt_dontuse.h > > Modified: head/sys/modules/Makefile > ============================================================================== > --- head/sys/modules/Makefile Thu Jul 19 23:54:18 2018 (r336524) > +++ head/sys/modules/Makefile Thu Jul 19 23:55:29 2018 (r336525) > @@ -230,6 +230,7 @@ SUBDIR= \ > mac_lomac \ > mac_mls \ > mac_none \ > + mac_ntpd \ > mac_partition \ > mac_portacl \ > mac_seeotheruids \ > > Added: head/sys/modules/mac_ntpd/Makefile > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/modules/mac_ntpd/Makefile Thu Jul 19 23:55:29 2018 > (r336525) @@ -0,0 +1,8 @@ > +# $FreeBSD$ > + > +.PATH: ${SRCTOP}/sys/security/mac_ntpd > + > +KMOD= mac_ntpd > +SRCS= mac_ntpd.c > + > +.include > > Added: head/sys/security/mac_ntpd/mac_ntpd.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/security/mac_ntpd/mac_ntpd.c Thu Jul 19 23:55:29 > 2018 (r336525) @@ -0,0 +1,77 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause > + * > + * Copyright (c) 2018 Ian Lepore > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + * > + * $FreeBSD$ > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > + > +SYSCTL_DECL(_security_mac); > + > +static SYSCTL_NODE(_security_mac, OID_AUTO, ntpd, CTLFLAG_RW, 0, > + "mac_ntpd policy controls"); > + > +static int ntpd_enabled = 1; > +SYSCTL_INT(_security_mac_ntpd, OID_AUTO, enabled, CTLFLAG_RWTUN, > + &ntpd_enabled, 0, "Enable mac_ntpd policy"); > + > +static int ntpd_uid = 123; > +SYSCTL_INT(_security_mac_ntpd, OID_AUTO, uid, CTLFLAG_RWTUN, > + &ntpd_uid, 0, "User id for ntpd user"); > + > +static int > +ntpd_priv_grant(struct ucred *cred, int priv) > +{ > + > + if (ntpd_enabled && cred->cr_uid == ntpd_uid) { > + switch (priv) { > + case PRIV_ADJTIME: > + case PRIV_CLOCK_SETTIME: > + case PRIV_NTP_ADJTIME: > + case PRIV_NETINET_RESERVEDPORT: > + case PRIV_NETINET_REUSEPORT: > + return (0); > + default: > + break; > + } > + } > + return (EPERM); > +} > + > +static struct mac_policy_ops ntpd_ops = > +{ > + .mpo_priv_grant = ntpd_priv_grant, > +}; > + > +MAC_POLICY_SET(&ntpd_ops, mac_ntpd, "MAC/ntpd", > + MPC_LOADTIME_FLAG_UNLOADOK, NULL); > > Modified: head/usr.sbin/ntp/config.h > ============================================================================== > --- head/usr.sbin/ntp/config.h Thu Jul 19 23:54:18 2018 > (r336524) +++ head/usr.sbin/ntp/config.h Thu Jul 19 23:55:29 > 2018 (r336525) @@ -392,7 +392,7 @@ > /* #undef HAVE_DOPRNT */ > > /* Can we drop root privileges? */ > -/* #undef HAVE_DROPROOT */ > +#define HAVE_DROPROOT > > /* Define to 1 if you have the header file. */ > #define HAVE_ERRNO_H 1 > @@ -1118,6 +1118,9 @@ > > /* Do we have the TIO serial stuff? */ > /* #undef HAVE_TIO_SERIAL_STUFF */ > + > +/* Are TrustedBSD MAC policy privileges available? */ > +#define HAVE_TRUSTEDBSD_MAC 1 > > /* Define to 1 if the system has the type `uint16_t'. */ > #define HAVE_UINT16_T 1 > _______________________________________________ > 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" After updating CURRENT to r336625, adding user ntpd (UID 123, GID 123) to /etc/master.passwd and /etc/group file(s) and correcting the flags for ntpd given in /etc/rc.conf according to ntpd_flags="-4 -I XXX.XXX.XXX.XXX", and performing a mergemaster to apply the new rc scripts in /etc/rc.d for ntpd, and(!) terminating the remnant ntpd daemon via a killal -9 command, I find myself with the follwoing situation right now: ntpd rejects to start, the console log message reports: [...] Jul 23 07:14:03 segestes ntpd[50407]: ntpd 4.2.8p11-a (1): Starting Jul 23 07:14:03 segestes ntpd[50407]: Command line: /usr/sbin/ntpd -4 -I 192.168.178.231 -p /var/db/ntp/ntpd.pid -c /etc/ntp.conf -f /var/db/ntp/ntpd.drift -g Jul 23 07:14:03 segestes ntpd[51295]: proto: precision = 0.108 usec (-23) Jul 23 07:14:03 segestes ntpd[51295]: leapsecond file ('/var/db/ntpd.leap-seconds.list'): good hash signature Jul 23 07:14:03 segestes ntpd[51295]: leapsecond file ('/var/db/ntpd.leap-seconds.list'): loaded, expire=2017-12-28T00:00:00Z last=2017-01-01T00:00:00Z ofs=37 Jul 23 07:14:03 segestes ntpd[51295]: leapsecond file ('/var/db/ntpd.leap-seconds.list'): expired less than 208 days ago Jul 23 07:14:03 segestes ntpd[51295]: unable to bind to wildcard address 0.0.0.0 - another process may be running - EXITING [...] On all boxes updated to the most recent CURRENT I face this situation right now. Kernel module mac_ntpd is successfully loaded. As soon as "service ntpd start/restart" is issued, console receives [...] ntpd not running? (check /var/db/ntp/ntpd.pid). Starting ntpd. And checking /var/db/ntp: ll /var/db/ntp total 16 242583 drwxr-xr-x 2 ntpd ntpd - 512B 23 Juli 07:07 ./ 240768 drwxr-xr-x 27 root wheel - 1.0K 23 Juli 07:07 ../ 241233 -rw-r--r-- 1 ntpd ntpd - 8B 23 Juli 07:03 ntpd.drift 241270 -rw-r--r-- 1 ntpd ntpd - 5B 23 Juli 07:16 ntpd.pid Another issue is regarding when /var/dv/ntp doesn't exist. The rc script doesn't create /var/db/ntp and terminates with an error: # service ntpd restart ntpd not running? (check /var/db/ntp/ntpd.pid). stat: /var/db/ntp: stat: No such file or directory Starting ntpd. Kind regards, Oliver From owner-svn-src-head@freebsd.org Mon Jul 23 06:04: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 F1CD11040159; Mon, 23 Jul 2018 06:04:06 +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 8E32095903; Mon, 23 Jul 2018 06:04:06 +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 69CE918BAE; Mon, 23 Jul 2018 06:04:06 +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 w6N6460O061391; Mon, 23 Jul 2018 06:04:06 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6N645YH061388; Mon, 23 Jul 2018 06:04:05 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807230604.w6N645YH061388@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 23 Jul 2018 06:04:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336626 - in head: . stand/i386/loader stand/sparc64/loader X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: . stand/i386/loader stand/sparc64/loader X-SVN-Commit-Revision: 336626 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: Mon, 23 Jul 2018 06:04:07 -0000 Author: imp Date: Mon Jul 23 06:04:05 2018 New Revision: 336626 URL: https://svnweb.freebsd.org/changeset/base/336626 Log: Older zfs boot blocks don't support symlinks. install the link to zfsloader as a hard link. While newer ones do, the whole point of the link was to transition to the new world order smoothly. A hard link is less flexible, but it works and will result in fewer bumps. Adjust UPDATING entry to match. Modified: head/UPDATING head/stand/i386/loader/Makefile head/stand/sparc64/loader/Makefile Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Jul 22 23:41:40 2018 (r336625) +++ head/UPDATING Mon Jul 23 06:04:05 2018 (r336626) @@ -34,9 +34,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: 20180720: zfsloader's functionality has now been folded into loader. zfsloader is no longer necesasary once you've updated your - boot blocks. For a transition period, there will be a symlink - in place from zfsloader to loader to allow a smooth transition - until the boot blocks can be updated. + boot blocks. For a transition period, we will install a + hardlink for zfsloader to loader to allow a smooth transition + until the boot blocks can be updated (hard link because old + zfs boot blocks don't understand symlinks). 20180719: New uid:gid added, ntpd:ntpd (123:123). Be sure to run mergemaster Modified: head/stand/i386/loader/Makefile ============================================================================== --- head/stand/i386/loader/Makefile Sun Jul 22 23:41:40 2018 (r336625) +++ head/stand/i386/loader/Makefile Mon Jul 23 06:04:05 2018 (r336626) @@ -65,7 +65,7 @@ ${LOADER}.bin: ${LOADER}.sym strip -R .comment -R .note -o ${.TARGET} ${.ALLSRC} .if ${MK_ZFS} == "yes" -SYMLINKS= ${BINDIR}/${LOADER} ${BINDIR}/zfs${LOADER} +LINKS= ${BINDIR}/${LOADER} ${BINDIR}/zfs${LOADER} .endif FILES+= ${LOADER} # XXX INSTALLFLAGS_loader= -b Modified: head/stand/sparc64/loader/Makefile ============================================================================== --- head/stand/sparc64/loader/Makefile Sun Jul 22 23:41:40 2018 (r336625) +++ head/stand/sparc64/loader/Makefile Mon Jul 23 06:04:05 2018 (r336626) @@ -43,7 +43,7 @@ HELP_FILES= ${.CURDIR}/help.sparc64 LDFLAGS+= -static .if ${MK_ZFS} == "yes" -SYMLINKS= ${BINDIR}/loader ${BINDIR}/zfsloader +LINKS= ${BINDIR}/loader ${BINDIR}/zfsloader .endif # Open Firmware standalone support library From owner-svn-src-head@freebsd.org Mon Jul 23 06:38: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 D52371040C58; Mon, 23 Jul 2018 06:38: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 852C696567; Mon, 23 Jul 2018 06:38:49 +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 658A919084; Mon, 23 Jul 2018 06:38:49 +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 w6N6cnHu076858; Mon, 23 Jul 2018 06:38:49 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6N6cnsf076857; Mon, 23 Jul 2018 06:38:49 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807230638.w6N6cnsf076857@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 23 Jul 2018 06:38:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336627 - head/stand/efi/loader X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/efi/loader X-SVN-Commit-Revision: 336627 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: Mon, 23 Jul 2018 06:38:50 -0000 Author: imp Date: Mon Jul 23 06:38:48 2018 New Revision: 336627 URL: https://svnweb.freebsd.org/changeset/base/336627 Log: Fix the attempt to see if we're overriding the console in the command line args. I had thought console would be NULL, but it's efi. Set it to efi (as a clue) before we initialize the console, then test it to see if it changed on the command line to do the automatic override. This gets my serial console back. Modified: head/stand/efi/loader/main.c Modified: head/stand/efi/loader/main.c ============================================================================== --- head/stand/efi/loader/main.c Mon Jul 23 06:04:05 2018 (r336626) +++ head/stand/efi/loader/main.c Mon Jul 23 06:38:48 2018 (r336627) @@ -567,6 +567,7 @@ main(int argc, CHAR16 *argv[]) * eg. the boot device, which we can't do yet. We can use * printf() etc. once this is done. */ + setenv("console", "efi", 1); cons_probe(); /* @@ -589,7 +590,7 @@ main(int argc, CHAR16 *argv[]) #define VID_SER_BOTH RB_MULTIPLE #define SER_VID_BOTH (RB_SERIAL | RB_MULTIPLE) #define CON_MASK (RB_SERIAL | RB_MULTIPLE) - if (getenv("console") == NULL) { + if (strcmp(getenv("console"), "efi") == 0) { if ((howto & CON_MASK) == 0) { /* No override, uhowto is controlling and efi cons is perfect */ howto = howto | (uhowto & CON_MASK); From owner-svn-src-head@freebsd.org Mon Jul 23 07: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 EC97E104143E; Mon, 23 Jul 2018 07:02:00 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [45.63.28.37]) (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 1FF6096F59; Mon, 23 Jul 2018 07:02:00 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: by lauren.room52.net (Postfix) with ESMTPSA id 683D62A2DB; Mon, 23 Jul 2018 17:01:47 +1000 (AEST) Subject: Re: svn commit: r336596 - in head/sys/netinet: . cc To: Matt Macy , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201807220537.w6M5bwTh005574@repo.freebsd.org> From: Lawrence Stewart Openpgp: preference=signencrypt Autocrypt: addr=lstewart@freebsd.org; prefer-encrypt=mutual; keydata= xsFNBFNq7K8BEADQFhZprR6joPIvqFonlsbZ0M72rkzHkCtGzk+hiE/TZh8df32VaGhXvgAH yP9ictqRai6lYRhO5LyjwR4ysBu4jAZlLCwWWBMY8l2JjuOohsv2+87+hQy+F1nVcPYuNJ4O Eqvqmi/RTU2+kZYGT2kbsSYVWiCUqwzSNWsbVZ8Sw1+ds2e380655Cstm+Ewn3gmX/wXPn3Y 22M+h5KRj3yDn8aJ439lUTcVDQ+Dah/7h4DTn3cXfZdKFSb3HEoiwPh78R3dyQGOQgYnJ3Fp KfKu5gRlXMyB1+6wUBh7G1henvYFrN+HClr+z1fBmsm22Lb7LLs/g6p0FtWslnNxA2CvIC9I Q1nbBoA0bKji/f0S3K7LlAIv/scUqPChfp1EkBvkTOek9N0znzcVCwJTjRjfS0uu6TMWuMXr qpCCrGKonN3gdqKW9pdWmn33kDt0GaESIPOgIRwBk8Ak9/j9Hd/vdtyHab1GKGJTZfIvnJB6 xVy/zwBhUIK/h5dboYqYZds+Ky5g+j+Q4j4bsKdgwjlrRO+eGQTCjRcZoiE0M2PZGK/dt/eS zuHWv0l6r7NkQXn5RBU+5JpdzECyyolKoBrDhHMDdI+Cc3KeQfMSkftKV7UwkScoplI86pLg yKHNxyrmqp3NTE04yxpY1KlEAUv3I/lnkikpj6j1PzGXyReMewARAQABzSpMYXdyZW5jZSBB LiBTdGV3YXJ0IDxsc3Rld2FydEBmcmVlYnNkLm9yZz7CwYAEEwEKACoCGwMFCRLMAwAFCwkI BwMFFQoJCAsFFgMCAQACHgECF4AFAlNq7/0CGQEACgkQmlC8/PQNmwmFSQ/+MpZl3Ysk1D8o FzhmuL5gHyMKWhM6lFGgRVzYW219CyJlxw/twkrdTjZ8YQBTCNnjOLg4ecV+0RQGsRzczfnW 1faBGEOC9CDInwuL00M+sybbiAylotEI54yR+ey0MRcCMuP1+y4LoHLZsCoOOa3PgR5ZrTUq 3Zlq2Zfhq9dq/zrdorWyGxrynlrmZFMqkf1F3ZsHkIvyOkfoJ8+icf/nAcbzsNJP7JMYE1fP PbqbLTR2jRSbHFOu9J1+3yumA5WNbTvHwEgOmxqA20XtGxlpwXXciWWzTN2RJ3EFqCjCiTFC mtYt9/zelkOnLncVQ9s1JHbs6vr4sYNST8bA9LvGOn2BZMDmECoazHfdmM3Q+hcnPYDX8W5h FKqgV049gQZItdZpMuSQ5xgx3K2EkwI5e63XK+SNcC/PUrmbmsAHHhwlrDbBy9LQ6DFQ5uf+ yX3J3+4f4MqSRNQJ4GaLIJXz1lII+CZ3iSEVIJyFMYK2eFlxxo1g26g2USSC0gxxyL4vuz9v GHk90aGPnz6ci0JZiTcBaXr7ObdZoHgDxKjWOq8Mg0juVj5S7Dcwa3vulf5N0Iq0hFffxfoM AAy6Pa+OxKVP6sz1VltTflM73ZqVM+30FLe96iAXzhe/Ku+zI19mJ/87ZKo/5b1lKgDu3II6 dV3IwSQFrV/S0lZEsYBOMw3OwU0EU2rsrwEQALlqsHLKoqF/jfV6O3Nn9MY8r9qeO5tc7jWA lg04uM83itX/E+1ci/V2EqVmsTQFEq2TdGzhxSU1FzoKRxJrsP4dSbazOK54xiXhWMA0fMOL DkM94DXlJwV1+9aamfHshcEHdp6V6nV6YIG7lDD0RDLeTeEtMaK+nSHPWN6beJpRBdLNP+/k 9jtW4Jw/sFXSD1vq7Eb871d9sxY31LijqR+6AJrQ0vJmSH6b8gpr23pslU2f/9utQPFT6tqH H2ZoQoIyGYjyWv6IlYS33/9Idl/A8Zdcsk+aelK/1gzhKwMxvJM7dLCckS8Ir6OTl/72bMZ0 Kb/bFDx0OVPZYhOu53SfUqy8eqhy7KIN6iOgd0mn4rH9+FiJuONq0hMe+Q2NVP7392CRGXXc zgTTwcVc3Nm4zAmEF0h/JpWZWN/AjA9+8zetMnCFjivkr68DGZHLyhbgj+TGan56cTayLLvY Zc/KVfAsI3nGmwMrQhysXZo9JdHPGJwBfTqZOsTDUbrcT4DbU56/1xt3/zpoajnJu+RcfLSd k1TXWzly/BZY60TxewDWxK0f10MzZd7mzidFdvyZKEL6lTkwzZ/kAaqLy4inpqdkicskg020 +kqKxlaCHPFedXLbwfMTthi67jwO8+ZOA7/QWChPL6bmNgZlK7VMHoi7uu+vwCgeh/H3xrMH ABEBAAHCwWUEGAEKAA8FAlNq7K8CGwwFCRLMAwAACgkQmlC8/PQNmwkOWQ//Xxuo/LWfNlqI lsvpnlPgEhVaDQX3vhuru/nMiZ7wq0eTmCD011eHw8wIaF7aOjs6zKM8sf/TpfF30V3GAQSL MpzeebSHWvBfN+XQSgMmwzgrKeQd6kTUf1I501rlzX0vz2NrUqUxktaLMZd6K/1hu7smDHEx fX8SZddz124QpjQJlmCZ0ewFKJ+bMz9W3prdCwV45Gu+glWYnREIXnMd1sXtbQMiu4Z+3CTG VOXmDj14lM3KnO2Vuc6IZTf9LeEeXM5Kvy4JCH4PK3DVInv+1e7KWqFo8KIapUumLxpGHg4c OG+3LTpLg+HTFiuSKqutZU2MDjp49/YdYAGLCEHgQ4rAUWqPNLzva+fbcHIuV/RpjJd6amNC LvtjsizvpE78TzACDtUV8mAHxrVXyrukvHHl+kJVfBH0XpKXxVT1aup+O4eBj5celCNaHF2z m2nKdJW/zjO8lr17Z1q/AxFgHb0blaKNqrpauKC3QUaHjbQEKxTxQXebKrfBdhDg/nG3Qiw9 4NYb/n84KIZMgzXN9OqoOlKgiaLDJ7ijH359GQAhl3UB1Nezfg0BcuxGORlkC063279ilBkE Pw5TRO/8gJH0+We+2unIqUZyHj4P4SLk2xXeyJxqoH+WUNCJBK3IItBQYLb2v0vsutbT193j xwpvFODEWa5OVDC+bcpRp1M= Message-ID: <932986e5-ee47-fdc9-abb8-dd0b26dcfe6a@freebsd.org> Date: Mon, 23 Jul 2018 17:01:46 +1000 User-Agent: Not your concern MIME-Version: 1.0 In-Reply-To: <201807220537.w6M5bwTh005574@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.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: Mon, 23 Jul 2018 07:02:01 -0000 On 22/07/2018 15:37, Matt Macy wrote: > Author: mmacy > Date: Sun Jul 22 05:37:58 2018 > New Revision: 336596 > URL: https://svnweb.freebsd.org/changeset/base/336596 > > Log: > NULL out cc_data in pluggable TCP {cc}_cb_destroy > > When ABE was added (rS331214) to NewReno and leak fixed (rS333699) , it now has > a destructor (newreno_cb_destroy) for per connection state. Other congestion > controls may allocate and free cc_data on entry and exit, but the field is > never explicitly NULLed if moving back to NewReno which only internally > allocates stateful data (no entry contstructor) resulting in a situation where > newreno_cb_destory might be called on a junk pointer. > > - NULL out cc_data in the framework after calling {cc}_cb_destroy > - free(9) checks for NULL so there is no need to perform not NULL checks > before calling free. > - Improve a comment about NewReno in tcp_ccalgounload > > This is the result of a debugging session from Jason Wolfe, Jason Eggleston, > and mmacy@ and very helpful insight from lstewart@. > > Submitted by: Kevin Bowling > Reviewed by: lstewart > Sponsored by: Limelight Networks > Differential Revision: https://reviews.freebsd.org/D16282 Pointy hat to: lstewart Apologies for the bug and thanks for fixing. Cheers, Lawrence From owner-svn-src-head@freebsd.org Mon Jul 23 07:11: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 E47F2104179F; Mon, 23 Jul 2018 07:11:58 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 959D99757C; Mon, 23 Jul 2018 07:11:58 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 76D89196AB; Mon, 23 Jul 2018 07:11:58 +0000 (UTC) (envelope-from eugen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6N7BwTG095905; Mon, 23 Jul 2018 07:11:58 GMT (envelope-from eugen@FreeBSD.org) Received: (from eugen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6N7BwOj095904; Mon, 23 Jul 2018 07:11:58 GMT (envelope-from eugen@FreeBSD.org) Message-Id: <201807230711.w6N7BwOj095904@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eugen set sender to eugen@FreeBSD.org using -f From: Eugene Grosbein Date: Mon, 23 Jul 2018 07:11:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336628 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: eugen X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 336628 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: Mon, 23 Jul 2018 07:11:59 -0000 Author: eugen Date: Mon Jul 23 07:11:58 2018 New Revision: 336628 URL: https://svnweb.freebsd.org/changeset/base/336628 Log: epair(4): make sure we do not duplicate MAC addresses in case of reused if_index. PR: 229957 Tested by: O. Hartmann Approved by: avg (mentor) Modified: head/sys/net/if_epair.c Modified: head/sys/net/if_epair.c ============================================================================== --- head/sys/net/if_epair.c Mon Jul 23 06:38:48 2018 (r336627) +++ head/sys/net/if_epair.c Mon Jul 23 07:11:58 2018 (r336628) @@ -107,6 +107,7 @@ static int epair_clone_create(struct if_clone *, char static int epair_clone_destroy(struct if_clone *, struct ifnet *); static const char epairname[] = "epair"; +static unsigned int next_index = 0; /* Netisr related definitions and sysctl. */ static struct netisr_handler epair_nh = { @@ -843,12 +844,22 @@ epair_clone_create(struct if_clone *ifc, char *name, s /* * Calculate the etheraddr hashing the hostid and the - * interface index. The result would be hopefully unique + * interface index. The result would be hopefully unique. + * Note that the "a" component of an epair instance may get moved + * to a different VNET after creation. In that case its index + * will be freed and the index can get reused by new epair instance. + * Make sure we do not create same etheraddr again. */ getcredhostid(curthread->td_ucred, (unsigned long *)&hostid); if (hostid == 0) arc4rand(&hostid, sizeof(hostid), 0); - key[0] = (uint32_t)ifp->if_index; + + if (ifp->if_index > next_index) + next_index = ifp->if_index; + else + next_index++; + + key[0] = (uint32_t)next_index; key[1] = (uint32_t)(hostid & 0xffffffff); key[2] = (uint32_t)((hostid >> 32) & 0xfffffffff); hash = jenkins_hash32(key, 3, 0); From owner-svn-src-head@freebsd.org Mon Jul 23 08:52: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 984DF1044002; Mon, 23 Jul 2018 08:52:58 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 418097288C; Mon, 23 Jul 2018 08:52:58 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F8441A6CD; Mon, 23 Jul 2018 08:52:58 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6N8qwNH048276; Mon, 23 Jul 2018 08:52:58 GMT (envelope-from uqs@FreeBSD.org) Received: (from uqs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6N8qwhE048274; Mon, 23 Jul 2018 08:52:58 GMT (envelope-from uqs@FreeBSD.org) Message-Id: <201807230852.w6N8qwhE048274@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: uqs set sender to uqs@FreeBSD.org using -f From: Ulrich Spoerlein Date: Mon, 23 Jul 2018 08:52:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336631 - head X-SVN-Group: head X-SVN-Commit-Author: uqs X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 336631 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: Mon, 23 Jul 2018 08:52:58 -0000 Author: uqs Date: Mon Jul 23 08:52:57 2018 New Revision: 336631 URL: https://svnweb.freebsd.org/changeset/base/336631 Log: Remove duplicated entry Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Mon Jul 23 07:49:15 2018 (r336630) +++ head/UPDATING Mon Jul 23 08:52:57 2018 (r336631) @@ -92,11 +92,6 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: needed to be changed to work with it. This change was made with r335763 and requires a mergemaster / etcupdate / etc to update the installed file. -20180628: - r335753 introduced a new quoting method. However, etc/devd/devmatch.conf - needed to be changed to work with it. This change was made with r335763 - and requires a mergemaster / etcupdate / etc to update the installed file. - 20180612: r334930 changed the interface between the NFS modules, so they all need to be rebuilt. r335018 did a __FreeBSD_version bump for this. From owner-svn-src-head@freebsd.org Mon Jul 23 09:14: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 4FB9310449F1; Mon, 23 Jul 2018 09:14:23 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9FA0773552; Mon, 23 Jul 2018 09:14:22 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from freyja.zeit4.iv.bundesimmobilien.de ([87.138.105.249]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M2LZc-1fxxL81zr2-00s7pt; Mon, 23 Jul 2018 11:14:14 +0200 Date: Mon, 23 Jul 2018 11:14:13 +0200 From: "O. Hartmann" To: Eugene Grosbein Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336628 - head/sys/net Message-ID: <20180723111409.3cff3d80@freyja.zeit4.iv.bundesimmobilien.de> In-Reply-To: <201807230711.w6N7BwOj095904@repo.freebsd.org> References: <201807230711.w6N7BwOj095904@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:LmuEEQULNRZKG1QeLrD2XFb3bQHrCs/hW/2M6wiWXIb9/02i9fX rd2thnFhydUULDNOOYWFmJS5sqe3OoMlIzp+BZ0DJ2yUREEUUfOgcBq4lHP3m9ns1xW1sys VFkgnbzt9lrRgAzCjbyeIcnlw/9nNnlzSVITaekKSMV3Vssc5AkdGoEEAPCj33wF1aiSU9I 5VY9ssfw1+R5hWQjjE5wA== X-UI-Out-Filterresults: notjunk:1;V01:K0:06ToTemCvUM=:YYCdSrUXfLaNfivHE36Wkw hpzUIX5wPeuI/Mi/vVYBisMYUPb1mVZjvIixvqDwFTe2dPL3D/vHA41Kp86j/WUwS3r0BauHP QdIOhPMSJJqtPWaIrwEyUqvBuNvney5AJVrhhMjfnto/bzvXQFOTTklhzfbeqmoOuhlvr8Q81 GnYZ6IS7QRWG/5ZISPbW5NfIh2jQ6/uM79JGSJRf3E8PMC3dc61fwOwj0ErGxafc3yGX0Y8BA ilXlrSF5uUZwIf9wUDUpmYoL0GRMDoVYdVBI24/qtur6u5bvOTPSoaI/caBnekJ2uoKuQmn5F L9VC2r2Muu4ZrtqbsKX5h6iaQOyYyBBw4RRDO89lEruGOMyS1TfEzgb6bRR0XJSHJq/Q0ZRqN 2AKPhcgE41PfHes+RREyiwxA4vSOkMXEYiUevWnOxQkpMUSquciZ/akVz9OC/qcWSMqOVZXuk abGi8pjwWyNkDZm2acVaLMwY8wmT6R3YFfLxC26iWS1y8b3eVwodaGJGc4wIuglbKv9u/LW64 NML5ZYIBdd1MMCiZhkmHaSntjzrU0DZdNJ9sITXqUR5YjraKk2RfDz/zk15tQb8zCGST7/J8A bNjh1PsNtDz33cZe0x/F2j4w3N76ubLa66MNWdt03ZJh0W5Y0wCtQXrCxBcV3+WjVY4gNtK4A w2UmPz44WkwYNYO8kc+49ciVle9VDZgSasOBxzQgEKg+6AHsD+dgkDI6xOJLOOAaV/b2ypUwT UguGBxml8ufL5SaP6tMIQ4o7SRSfikHJ1+qOX7DEH0cWOWyfe2kqzzJNjS5pFbBJCFMIhC7Wh 07Stgww 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: Mon, 23 Jul 2018 09:14:23 -0000 On Mon, 23 Jul 2018 07:11:58 +0000 (UTC) Eugene Grosbein wrote: > Author: eugen > Date: Mon Jul 23 07:11:58 2018 > New Revision: 336628 > URL: https://svnweb.freebsd.org/changeset/base/336628 > > Log: > epair(4): make sure we do not duplicate MAC addresses > in case of reused if_index. > > PR: 229957 > Tested by: O. Hartmann > Approved by: avg (mentor) > > Modified: > head/sys/net/if_epair.c > > Modified: head/sys/net/if_epair.c > ============================================================================== > --- head/sys/net/if_epair.c Mon Jul 23 06:38:48 2018 (r336627) > +++ head/sys/net/if_epair.c Mon Jul 23 07:11:58 2018 (r336628) > @@ -107,6 +107,7 @@ static int epair_clone_create(struct if_clone *, char > static int epair_clone_destroy(struct if_clone *, struct ifnet *); > > static const char epairname[] = "epair"; > +static unsigned int next_index = 0; > > /* Netisr related definitions and sysctl. */ > static struct netisr_handler epair_nh = { > @@ -843,12 +844,22 @@ epair_clone_create(struct if_clone *ifc, char *name, s > > /* > * Calculate the etheraddr hashing the hostid and the > - * interface index. The result would be hopefully unique > + * interface index. The result would be hopefully unique. > + * Note that the "a" component of an epair instance may get moved > + * to a different VNET after creation. In that case its index > + * will be freed and the index can get reused by new epair instance. > + * Make sure we do not create same etheraddr again. > */ > getcredhostid(curthread->td_ucred, (unsigned long *)&hostid); > if (hostid == 0) > arc4rand(&hostid, sizeof(hostid), 0); > - key[0] = (uint32_t)ifp->if_index; > + > + if (ifp->if_index > next_index) > + next_index = ifp->if_index; > + else > + next_index++; > + > + key[0] = (uint32_t)next_index; > key[1] = (uint32_t)(hostid & 0xffffffff); > key[2] = (uint32_t)((hostid >> 32) & 0xfffffffff); > hash = jenkins_hash32(key, 3, 0); > _______________________________________________ > 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" Thank you very much for the pretty fast patch! Regards, oh From owner-svn-src-head@freebsd.org Mon Jul 23 09:16: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 85B881044BF4; Mon, 23 Jul 2018 09:16:24 +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 37BB373798; Mon, 23 Jul 2018 09:16:24 +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 18B591A9FC; Mon, 23 Jul 2018 09:16:24 +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 w6N9GN1O061172; Mon, 23 Jul 2018 09:16:23 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6N9GNlp061171; Mon, 23 Jul 2018 09:16:23 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807230916.w6N9GNlp061171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 23 Jul 2018 09:16:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336632 - head/sys/dev/sound/pcm X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/sound/pcm X-SVN-Commit-Revision: 336632 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: Mon, 23 Jul 2018 09:16:24 -0000 Author: hselasky Date: Mon Jul 23 09:16:23 2018 New Revision: 336632 URL: https://svnweb.freebsd.org/changeset/base/336632 Log: Update modify counter when setting a mixer control. PR: 229969 MFC after: 1 week Modified: head/sys/dev/sound/pcm/mixer.c Modified: head/sys/dev/sound/pcm/mixer.c ============================================================================== --- head/sys/dev/sound/pcm/mixer.c Mon Jul 23 08:52:57 2018 (r336631) +++ head/sys/dev/sound/pcm/mixer.c Mon Jul 23 09:16:23 2018 (r336632) @@ -324,6 +324,7 @@ mixer_set(struct snd_mixer *m, u_int dev, u_int lev) MIXER_SET_LOCK(m, dropmtx); m->level[dev] = l | (r << 8); + m->modify_counter++; return 0; } From owner-svn-src-head@freebsd.org Mon Jul 23 09:38: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 BEA1D104535D; Mon, 23 Jul 2018 09:38:00 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (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 5A47A7426D; Mon, 23 Jul 2018 09:38:00 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id E3BFE260404; Mon, 23 Jul 2018 11:37:57 +0200 (CEST) Subject: Re: svn commit: r336620 - head/contrib/ofed/include To: Li-Wen Hsu , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201807222235.w6MMZHdX030351@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <3c44d182-8291-5cae-8845-4791978cbae8@selasky.org> Date: Mon, 23 Jul 2018 11:37:38 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <201807222235.w6MMZHdX030351@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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: Mon, 23 Jul 2018 09:38:00 -0000 On 07/23/18 00:35, Li-Wen Hsu wrote: > Author: lwhsu (ports committer) > Date: Sun Jul 22 22:35:17 2018 > New Revision: 336620 > URL: https://svnweb.freebsd.org/changeset/base/336620 > > Log: > Add udma_barrier definitions for RISC-V > > Reviewed by: kib > Sponsored by: The FreeBSD Foundation > > Modified: > head/contrib/ofed/include/udma_barrier.h > Was this change build tested? /usr/local/bin/riscv64-unknown-freebsd11.1-gcc --sysroot=/workspace/obj/workspace/src/riscv.riscv64/tmp -B/usr/local/riscv64-unknown-freebsd11.1/bin/ -O2 -pipe -I/workspace/src/contrib/ofed/librdmacm -march=rv64imafdc -mabi=lp64d -g -MD -MF.depend.acm.o -MTacm.o -std=gnu99 -fstack-protector-strong -Wno-error=address -Wno-error=array-bounds -Wno-error=attributes -Wno-error=bool-compare -Wno-error=cast-align -Wno-error=clobbered -Wno-error=enum-compare -Wno-error=extra -Wno-error=inline -Wno-error=logical-not-parentheses -Wno-error=strict-aliasing -Wno-error=uninitialized -Wno-error=unused-but-set-variable -Wno-error=unused-function -Wno-error=unused-value -Wno-error=misleading-indentation -Wno-error=nonnull-compare -Wno-error=shift-negative-value -Wno-error=tautological-compare -Wno-error=unused-const-variable -Wno-error=bool-operation -Wno-error=deprecated -Wno-error=expansion-to-defined -Wno-error=format-overflow -Wno-error=format-truncation -Wno-error=implicit-fallthrough -Wno-error=int-in-bool-context -Wno-error=memset-elt-size -Wno-error=noexcept-type -Wno-error=nonnull -Wno-error=pointer-compare -Wno-error=stringop-overflow -c /workspace/src/contrib/ofed/librdmacm/acm.c -o acm.o In file included from /workspace/src/contrib/ofed/librdmacm/cma.h:43:0, from /workspace/src/contrib/ofed/librdmacm/acm.c:42: /workspace/src/contrib/ofed/librdmacm/cma.h: In function 'fastlock_init': /workspace/src/contrib/ofed/librdmacm/cma.h:60:2: error: invalid initializer atomic_store(&lock->cnt, 0); ^ In file included from /workspace/src/contrib/ofed/librdmacm/acm.c:42:0: /workspace/src/contrib/ofed/librdmacm/cma.h: In function 'fastlock_acquire': /workspace/src/contrib/ofed/librdmacm/cma.h:68:2: error: operand type 'struct *' is incompatible with argument 1 of '__atomic_fetch_add' if (atomic_fetch_add(&lock->cnt, 1) > 0) ^~ /workspace/src/contrib/ofed/librdmacm/cma.h: In function 'fastlock_release': /workspace/src/contrib/ofed/librdmacm/cma.h:73:2: error: operand type 'struct *' is incompatible with argument 1 of '__atomic_fetch_sub' if (atomic_fetch_sub(&lock->cnt, 1) > 1) --HPS From owner-svn-src-head@freebsd.org Mon Jul 23 09:54: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 B0FF91045951; Mon, 23 Jul 2018 09:54:29 +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 6485A74FA2; Mon, 23 Jul 2018 09:54:29 +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 4199D1B05B; Mon, 23 Jul 2018 09:54:29 +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 w6N9sTaF081282; Mon, 23 Jul 2018 09:54:29 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6N9sSe5081280; Mon, 23 Jul 2018 09:54:28 GMT (envelope-from br@FreeBSD.org) Message-Id: <201807230954.w6N9sSe5081280@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Mon, 23 Jul 2018 09:54:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336633 - in head: lib/libc/riscv/gen sys/riscv/include X-SVN-Group: head X-SVN-Commit-Author: br X-SVN-Commit-Paths: in head: lib/libc/riscv/gen sys/riscv/include X-SVN-Commit-Revision: 336633 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: Mon, 23 Jul 2018 09:54:29 -0000 Author: br Date: Mon Jul 23 09:54:28 2018 New Revision: 336633 URL: https://svnweb.freebsd.org/changeset/base/336633 Log: Fix setjmp for RISC-V: o The correct value for _JB_SIGMASK is 27. o The storage size for double-precision floating point register is 8 bytes. Submitted by: "James Clarke" Reviewed by: markj@ Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D16344 Modified: head/lib/libc/riscv/gen/_setjmp.S head/lib/libc/riscv/gen/setjmp.S head/sys/riscv/include/setjmp.h Modified: head/lib/libc/riscv/gen/_setjmp.S ============================================================================== --- head/lib/libc/riscv/gen/_setjmp.S Mon Jul 23 09:16:23 2018 (r336632) +++ head/lib/libc/riscv/gen/_setjmp.S Mon Jul 23 09:54:28 2018 (r336633) @@ -63,19 +63,19 @@ ENTRY(_setjmp) #if !defined(_STANDALONE) && defined(__riscv_float_abi_double) /* Store the fpe registers */ - fsd fs0, (0 * 16)(a0) - fsd fs1, (1 * 16)(a0) - fsd fs2, (2 * 16)(a0) - fsd fs3, (3 * 16)(a0) - fsd fs4, (4 * 16)(a0) - fsd fs5, (5 * 16)(a0) - fsd fs6, (6 * 16)(a0) - fsd fs7, (7 * 16)(a0) - fsd fs8, (8 * 16)(a0) - fsd fs9, (9 * 16)(a0) - fsd fs10, (10 * 16)(a0) - fsd fs11, (11 * 16)(a0) - addi a0, a0, (12 * 16) + fsd fs0, (0 * 8)(a0) + fsd fs1, (1 * 8)(a0) + fsd fs2, (2 * 8)(a0) + fsd fs3, (3 * 8)(a0) + fsd fs4, (4 * 8)(a0) + fsd fs5, (5 * 8)(a0) + fsd fs6, (6 * 8)(a0) + fsd fs7, (7 * 8)(a0) + fsd fs8, (8 * 8)(a0) + fsd fs9, (9 * 8)(a0) + fsd fs10, (10 * 8)(a0) + fsd fs11, (11 * 8)(a0) + addi a0, a0, (12 * 8) #endif /* Return value */ @@ -116,19 +116,19 @@ ENTRY(_longjmp) #if !defined(_STANDALONE) && defined(__riscv_float_abi_double) /* Restore the fpe registers */ - fld fs0, (0 * 16)(a0) - fld fs1, (1 * 16)(a0) - fld fs2, (2 * 16)(a0) - fld fs3, (3 * 16)(a0) - fld fs4, (4 * 16)(a0) - fld fs5, (5 * 16)(a0) - fld fs6, (6 * 16)(a0) - fld fs7, (7 * 16)(a0) - fld fs8, (8 * 16)(a0) - fld fs9, (9 * 16)(a0) - fld fs10, (10 * 16)(a0) - fld fs11, (11 * 16)(a0) - addi a0, a0, (12 * 16) + fld fs0, (0 * 8)(a0) + fld fs1, (1 * 8)(a0) + fld fs2, (2 * 8)(a0) + fld fs3, (3 * 8)(a0) + fld fs4, (4 * 8)(a0) + fld fs5, (5 * 8)(a0) + fld fs6, (6 * 8)(a0) + fld fs7, (7 * 8)(a0) + fld fs8, (8 * 8)(a0) + fld fs9, (9 * 8)(a0) + fld fs10, (10 * 8)(a0) + fld fs11, (11 * 8)(a0) + addi a0, a0, (12 * 8) #endif /* Load the return value */ Modified: head/lib/libc/riscv/gen/setjmp.S ============================================================================== --- head/lib/libc/riscv/gen/setjmp.S Mon Jul 23 09:16:23 2018 (r336632) +++ head/lib/libc/riscv/gen/setjmp.S Mon Jul 23 09:54:28 2018 (r336633) @@ -77,19 +77,19 @@ ENTRY(setjmp) #ifdef __riscv_float_abi_double /* Store the fpe registers */ - fsd fs0, (0 * 16)(a0) - fsd fs1, (1 * 16)(a0) - fsd fs2, (2 * 16)(a0) - fsd fs3, (3 * 16)(a0) - fsd fs4, (4 * 16)(a0) - fsd fs5, (5 * 16)(a0) - fsd fs6, (6 * 16)(a0) - fsd fs7, (7 * 16)(a0) - fsd fs8, (8 * 16)(a0) - fsd fs9, (9 * 16)(a0) - fsd fs10, (10 * 16)(a0) - fsd fs11, (11 * 16)(a0) - addi a0, a0, (12 * 16) + fsd fs0, (0 * 8)(a0) + fsd fs1, (1 * 8)(a0) + fsd fs2, (2 * 8)(a0) + fsd fs3, (3 * 8)(a0) + fsd fs4, (4 * 8)(a0) + fsd fs5, (5 * 8)(a0) + fsd fs6, (6 * 8)(a0) + fsd fs7, (7 * 8)(a0) + fsd fs8, (8 * 8)(a0) + fsd fs9, (9 * 8)(a0) + fsd fs10, (10 * 8)(a0) + fsd fs11, (11 * 8)(a0) + addi a0, a0, (12 * 8) #endif /* Return value */ @@ -146,19 +146,19 @@ ENTRY(longjmp) #ifdef __riscv_float_abi_double /* Restore the fpe registers */ - fld fs0, (0 * 16)(a0) - fld fs1, (1 * 16)(a0) - fld fs2, (2 * 16)(a0) - fld fs3, (3 * 16)(a0) - fld fs4, (4 * 16)(a0) - fld fs5, (5 * 16)(a0) - fld fs6, (6 * 16)(a0) - fld fs7, (7 * 16)(a0) - fld fs8, (8 * 16)(a0) - fld fs9, (9 * 16)(a0) - fld fs10, (10 * 16)(a0) - fld fs11, (11 * 16)(a0) - addi a0, a0, (12 * 16) + fld fs0, (0 * 8)(a0) + fld fs1, (1 * 8)(a0) + fld fs2, (2 * 8)(a0) + fld fs3, (3 * 8)(a0) + fld fs4, (4 * 8)(a0) + fld fs5, (5 * 8)(a0) + fld fs6, (6 * 8)(a0) + fld fs7, (7 * 8)(a0) + fld fs8, (8 * 8)(a0) + fld fs9, (9 * 8)(a0) + fld fs10, (10 * 8)(a0) + fld fs11, (11 * 8)(a0) + addi a0, a0, (12 * 8) #endif /* Load the return value */ Modified: head/sys/riscv/include/setjmp.h ============================================================================== --- head/sys/riscv/include/setjmp.h Mon Jul 23 09:16:23 2018 (r336632) +++ head/sys/riscv/include/setjmp.h Mon Jul 23 09:54:28 2018 (r336633) @@ -40,7 +40,7 @@ #include #define _JBLEN 63 /* sp, ra, [f]s0-11, magic val, sigmask */ -#define _JB_SIGMASK 21 +#define _JB_SIGMASK 27 #ifdef __ASSEMBLER__ #define _JB_MAGIC__SETJMP 0xbe87fd8a2910af00 From owner-svn-src-head@freebsd.org Mon Jul 23 11:21: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 0F2371047D80; Mon, 23 Jul 2018 11:21:45 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B22C277590; Mon, 23 Jul 2018 11:21:44 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 941F91BE6F; Mon, 23 Jul 2018 11:21:44 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6NBLiwQ026950; Mon, 23 Jul 2018 11:21:44 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6NBLhG3026946; Mon, 23 Jul 2018 11:21:43 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201807231121.w6NBLhG3026946@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 23 Jul 2018 11:21:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336634 - in head/sys/contrib/ck/include: . gcc/x86 gcc/x86_64 X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in head/sys/contrib/ck/include: . gcc/x86 gcc/x86_64 X-SVN-Commit-Revision: 336634 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: Mon, 23 Jul 2018 11:21:45 -0000 Author: avg Date: Mon Jul 23 11:21:43 2018 New Revision: 336634 URL: https://svnweb.freebsd.org/changeset/base/336634 Log: MFV CK@r336629: Import CK as of commit 1c1f9901c2dea7a883342cd03d3906a1bc482583 This adds CK_SLIST_INSERT_PREVPTR and CK_SLIST_REMOVE_PREVPTR macros as well as ck_pr_dec_is_zero family of functions. MFC after: 3 weeks Modified: head/sys/contrib/ck/include/ck_pr.h head/sys/contrib/ck/include/ck_queue.h head/sys/contrib/ck/include/gcc/x86/ck_pr.h head/sys/contrib/ck/include/gcc/x86_64/ck_pr.h Directory Properties: head/sys/contrib/ck/ (props changed) Modified: head/sys/contrib/ck/include/ck_pr.h ============================================================================== --- head/sys/contrib/ck/include/ck_pr.h Mon Jul 23 09:54:28 2018 (r336633) +++ head/sys/contrib/ck/include/ck_pr.h Mon Jul 23 11:21:43 2018 (r336634) @@ -619,8 +619,8 @@ CK_PR_BTX_S(bts, 16, uint16_t, |,) } #define CK_PR_UNARY_Z(K, S, M, T, P, C, Z) \ - CK_CC_INLINE static void \ - ck_pr_##K##_##S##_zero(M *target, bool *zero) \ + CK_CC_INLINE static bool \ + ck_pr_##K##_##S##_is_zero(M *target) \ { \ T previous; \ C punt; \ @@ -631,12 +631,21 @@ CK_PR_BTX_S(bts, 16, uint16_t, |,) (C)(previous P 1), \ &previous) == false) \ ck_pr_stall(); \ - *zero = previous == (T)Z; \ + return previous == (T)Z; \ + } + +#define CK_PR_UNARY_Z_STUB(K, S, M) \ + CK_CC_INLINE static void \ + ck_pr_##K##_##S##_zero(M *target, bool *zero) \ + { \ + *zero = ck_pr_##K##_##S##_is_zero(target); \ return; \ } #define CK_PR_UNARY_S(K, X, S, M) CK_PR_UNARY(K, X, S, M, M) -#define CK_PR_UNARY_Z_S(K, S, M, P, Z) CK_PR_UNARY_Z(K, S, M, M, P, M, Z) +#define CK_PR_UNARY_Z_S(K, S, M, P, Z) \ + CK_PR_UNARY_Z(K, S, M, M, P, M, Z) \ + CK_PR_UNARY_Z_STUB(K, S, M) #if defined(CK_F_PR_LOAD_CHAR) && defined(CK_F_PR_CAS_CHAR_VALUE) @@ -648,6 +657,8 @@ CK_PR_UNARY_S(inc, add, char, char) #ifndef CK_F_PR_INC_CHAR_ZERO #define CK_F_PR_INC_CHAR_ZERO CK_PR_UNARY_Z_S(inc, char, char, +, -1) +#else +CK_PR_UNARY_Z_STUB(inc, char, char) #endif /* CK_F_PR_INC_CHAR_ZERO */ #ifndef CK_F_PR_DEC_CHAR @@ -658,6 +669,8 @@ CK_PR_UNARY_S(dec, sub, char, char) #ifndef CK_F_PR_DEC_CHAR_ZERO #define CK_F_PR_DEC_CHAR_ZERO CK_PR_UNARY_Z_S(dec, char, char, -, 1) +#else +CK_PR_UNARY_Z_STUB(dec, char, char) #endif /* CK_F_PR_DEC_CHAR_ZERO */ #endif /* CK_F_PR_LOAD_CHAR && CK_F_PR_CAS_CHAR_VALUE */ @@ -672,6 +685,8 @@ CK_PR_UNARY_S(inc, add, int, int) #ifndef CK_F_PR_INC_INT_ZERO #define CK_F_PR_INC_INT_ZERO CK_PR_UNARY_Z_S(inc, int, int, +, -1) +#else +CK_PR_UNARY_Z_STUB(inc, int, int) #endif /* CK_F_PR_INC_INT_ZERO */ #ifndef CK_F_PR_DEC_INT @@ -682,6 +697,8 @@ CK_PR_UNARY_S(dec, sub, int, int) #ifndef CK_F_PR_DEC_INT_ZERO #define CK_F_PR_DEC_INT_ZERO CK_PR_UNARY_Z_S(dec, int, int, -, 1) +#else +CK_PR_UNARY_Z_STUB(dec, int, int) #endif /* CK_F_PR_DEC_INT_ZERO */ #endif /* CK_F_PR_LOAD_INT && CK_F_PR_CAS_INT_VALUE */ @@ -711,6 +728,8 @@ CK_PR_UNARY_S(inc, add, uint, unsigned int) #ifndef CK_F_PR_INC_UINT_ZERO #define CK_F_PR_INC_UINT_ZERO CK_PR_UNARY_Z_S(inc, uint, unsigned int, +, UINT_MAX) +#else +CK_PR_UNARY_Z_STUB(inc, uint, unsigned int) #endif /* CK_F_PR_INC_UINT_ZERO */ #ifndef CK_F_PR_DEC_UINT @@ -721,6 +740,8 @@ CK_PR_UNARY_S(dec, sub, uint, unsigned int) #ifndef CK_F_PR_DEC_UINT_ZERO #define CK_F_PR_DEC_UINT_ZERO CK_PR_UNARY_Z_S(dec, uint, unsigned int, -, 1) +#else +CK_PR_UNARY_Z_STUB(dec, uint, unsigned int) #endif /* CK_F_PR_DEC_UINT_ZERO */ #endif /* CK_F_PR_LOAD_UINT && CK_F_PR_CAS_UINT_VALUE */ @@ -735,6 +756,8 @@ CK_PR_UNARY(inc, add, ptr, void, uintptr_t) #ifndef CK_F_PR_INC_PTR_ZERO #define CK_F_PR_INC_PTR_ZERO CK_PR_UNARY_Z(inc, ptr, void, uintptr_t, +, void *, UINT_MAX) +#else +CK_PR_UNARY_Z_STUB(inc, ptr, void) #endif /* CK_F_PR_INC_PTR_ZERO */ #ifndef CK_F_PR_DEC_PTR @@ -745,6 +768,8 @@ CK_PR_UNARY(dec, sub, ptr, void, uintptr_t) #ifndef CK_F_PR_DEC_PTR_ZERO #define CK_F_PR_DEC_PTR_ZERO CK_PR_UNARY_Z(dec, ptr, void, uintptr_t, -, void *, 1) +#else +CK_PR_UNARY_Z_STUB(dec, ptr, void) #endif /* CK_F_PR_DEC_PTR_ZERO */ #endif /* CK_F_PR_LOAD_PTR && CK_F_PR_CAS_PTR_VALUE */ @@ -759,6 +784,8 @@ CK_PR_UNARY_S(inc, add, 64, uint64_t) #ifndef CK_F_PR_INC_64_ZERO #define CK_F_PR_INC_64_ZERO CK_PR_UNARY_Z_S(inc, 64, uint64_t, +, UINT64_MAX) +#else +CK_PR_UNARY_Z_STUB(inc, 64, uint64_t) #endif /* CK_F_PR_INC_64_ZERO */ #ifndef CK_F_PR_DEC_64 @@ -769,6 +796,8 @@ CK_PR_UNARY_S(dec, sub, 64, uint64_t) #ifndef CK_F_PR_DEC_64_ZERO #define CK_F_PR_DEC_64_ZERO CK_PR_UNARY_Z_S(dec, 64, uint64_t, -, 1) +#else +CK_PR_UNARY_Z_STUB(dec, 64, uint64_t) #endif /* CK_F_PR_DEC_64_ZERO */ #endif /* CK_F_PR_LOAD_64 && CK_F_PR_CAS_64_VALUE */ @@ -783,6 +812,8 @@ CK_PR_UNARY_S(inc, add, 32, uint32_t) #ifndef CK_F_PR_INC_32_ZERO #define CK_F_PR_INC_32_ZERO CK_PR_UNARY_Z_S(inc, 32, uint32_t, +, UINT32_MAX) +#else +CK_PR_UNARY_Z_STUB(inc, 32, uint32_t) #endif /* CK_F_PR_INC_32_ZERO */ #ifndef CK_F_PR_DEC_32 @@ -793,6 +824,8 @@ CK_PR_UNARY_S(dec, sub, 32, uint32_t) #ifndef CK_F_PR_DEC_32_ZERO #define CK_F_PR_DEC_32_ZERO CK_PR_UNARY_Z_S(dec, 32, uint32_t, -, 1) +#else +CK_PR_UNARY_Z_STUB(dec, 32, uint32_t) #endif /* CK_F_PR_DEC_32_ZERO */ #endif /* CK_F_PR_LOAD_32 && CK_F_PR_CAS_32_VALUE */ @@ -807,6 +840,8 @@ CK_PR_UNARY_S(inc, add, 16, uint16_t) #ifndef CK_F_PR_INC_16_ZERO #define CK_F_PR_INC_16_ZERO CK_PR_UNARY_Z_S(inc, 16, uint16_t, +, UINT16_MAX) +#else +CK_PR_UNARY_Z_STUB(inc, 16, uint16_t) #endif /* CK_F_PR_INC_16_ZERO */ #ifndef CK_F_PR_DEC_16 @@ -817,6 +852,8 @@ CK_PR_UNARY_S(dec, sub, 16, uint16_t) #ifndef CK_F_PR_DEC_16_ZERO #define CK_F_PR_DEC_16_ZERO CK_PR_UNARY_Z_S(dec, 16, uint16_t, -, 1) +#else +CK_PR_UNARY_Z_STUB(dec, 16, uint16_t) #endif /* CK_F_PR_DEC_16_ZERO */ #endif /* CK_F_PR_LOAD_16 && CK_F_PR_CAS_16_VALUE */ @@ -831,6 +868,8 @@ CK_PR_UNARY_S(inc, add, 8, uint8_t) #ifndef CK_F_PR_INC_8_ZERO #define CK_F_PR_INC_8_ZERO CK_PR_UNARY_Z_S(inc, 8, uint8_t, +, UINT8_MAX) +#else +CK_PR_UNARY_Z_STUB(inc, 8, uint8_t) #endif /* CK_F_PR_INC_8_ZERO */ #ifndef CK_F_PR_DEC_8 @@ -841,6 +880,8 @@ CK_PR_UNARY_S(dec, sub, 8, uint8_t) #ifndef CK_F_PR_DEC_8_ZERO #define CK_F_PR_DEC_8_ZERO CK_PR_UNARY_Z_S(dec, 8, uint8_t, -, 1) +#else +CK_PR_UNARY_Z_STUB(dec, 8, uint8_t) #endif /* CK_F_PR_DEC_8_ZERO */ #endif /* CK_F_PR_LOAD_8 && CK_F_PR_CAS_8_VALUE */ Modified: head/sys/contrib/ck/include/ck_queue.h ============================================================================== --- head/sys/contrib/ck/include/ck_queue.h Mon Jul 23 09:54:28 2018 (r336633) +++ head/sys/contrib/ck/include/ck_queue.h Mon Jul 23 11:21:43 2018 (r336634) @@ -180,8 +180,14 @@ struct { \ ck_pr_store_ptr(&(head)->cslh_first, elm); \ } while (0) +#define CK_SLIST_INSERT_PREVPTR(prevp, slistelm, elm, field) do { \ + (elm)->field.csle_next = (slistelm); \ + ck_pr_fence_store(); \ + ck_pr_store_ptr(prevp, elm); \ +} while (0) + #define CK_SLIST_REMOVE_AFTER(elm, field) do { \ - ck_pr_store_ptr(&(elm)->field.csle_next, \ + ck_pr_store_ptr(&(elm)->field.csle_next, \ (elm)->field.csle_next->field.csle_next); \ } while (0) @@ -190,7 +196,7 @@ struct { \ CK_SLIST_REMOVE_HEAD((head), field); \ } else { \ struct type *curelm = (head)->cslh_first; \ - while (curelm->field.csle_next != (elm)) \ + while (curelm->field.csle_next != (elm)) \ curelm = curelm->field.csle_next; \ CK_SLIST_REMOVE_AFTER(curelm, field); \ } \ @@ -199,6 +205,10 @@ struct { \ #define CK_SLIST_REMOVE_HEAD(head, field) do { \ ck_pr_store_ptr(&(head)->cslh_first, \ (head)->cslh_first->field.csle_next); \ +} while (0) + +#define CK_SLIST_REMOVE_PREVPTR(prevp, elm, field) do { \ + ck_pr_store_ptr(prevptr, (elm)->field.csle_next); \ } while (0) #define CK_SLIST_MOVE(head1, head2, field) do { \ Modified: head/sys/contrib/ck/include/gcc/x86/ck_pr.h ============================================================================== --- head/sys/contrib/ck/include/gcc/x86/ck_pr.h Mon Jul 23 09:54:28 2018 (r336633) +++ head/sys/contrib/ck/include/gcc/x86/ck_pr.h Mon Jul 23 11:21:43 2018 (r336634) @@ -233,17 +233,17 @@ CK_PR_FAA_S(8, uint8_t, "xaddb") } #define CK_PR_UNARY_V(K, S, T, C, I) \ - CK_CC_INLINE static void \ - ck_pr_##K##_##S##_zero(T *target, bool *r) \ + CK_CC_INLINE static bool \ + ck_pr_##K##_##S##_is_zero(T *target) \ { \ + bool ret; \ __asm__ __volatile__(CK_PR_LOCK_PREFIX I " %0; setz %1" \ : "+m" (*(C *)target), \ - "=m" (*r) \ + "=rm" (ret) \ : \ : "memory", "cc"); \ - return; \ + return ret; \ } - #define CK_PR_UNARY_S(K, S, T, I) CK_PR_UNARY(K, S, T, T, I) Modified: head/sys/contrib/ck/include/gcc/x86_64/ck_pr.h ============================================================================== --- head/sys/contrib/ck/include/gcc/x86_64/ck_pr.h Mon Jul 23 09:54:28 2018 (r336633) +++ head/sys/contrib/ck/include/gcc/x86_64/ck_pr.h Mon Jul 23 11:21:43 2018 (r336634) @@ -332,17 +332,17 @@ CK_PR_FAA_S(8, uint8_t, "xaddb") } #define CK_PR_UNARY_V(K, S, T, C, I) \ - CK_CC_INLINE static void \ - ck_pr_##K##_##S##_zero(T *target, bool *r) \ + CK_CC_INLINE static bool \ + ck_pr_##K##_##S##_is_zero(T *target) \ { \ + bool ret; \ __asm__ __volatile__(CK_PR_LOCK_PREFIX I " %0; setz %1" \ : "+m" (*(C *)target), \ - "=m" (*r) \ + "=rm" (ret) \ : \ : "memory", "cc"); \ - return; \ + return ret; \ } - #define CK_PR_UNARY_S(K, S, T, I) CK_PR_UNARY(K, S, T, T, I) From owner-svn-src-head@freebsd.org Mon Jul 23 12:22: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 69B341049D56; Mon, 23 Jul 2018 12:22:05 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) (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 E6F7879C5E; Mon, 23 Jul 2018 12:22:04 +0000 (UTC) (envelope-from lwhsu.freebsd@gmail.com) Received: by mail-wr1-f65.google.com with SMTP id r16-v6so480801wrt.11; Mon, 23 Jul 2018 05:22:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uEXiJMEJozL/cWWS0Hb8pAPgMQ+uyxe54sjAxnBiiAo=; b=t5XP3IenKjfq97renT/HYyBO4SnBcdNPjrAL9FYgbdReDLOxIVMfEby0VowPieHPSX pHsG86dqJQsQ1I33aXnc7Wx2QQLtcI678/8fMdBd29k+4SGD5Tda3uic7bO5YeoFl3pG G9yyD8w7+8ZJkp6FF1wPpXM3ADq//nsOLcNPf67gtKddA0MG1xDsTr5iW8RYTWXSyJ1x 54ogrqAls+86GisYSq6b8P8sq8jT0k8/3i/BdXwd4ZEu1r7bPU9zeYBv5Agg0CJbxE2q e6zUG60gO80grNWetYF984iGeeYKvGtHndVmwTb8qoxIKMLn+LTMZqZW2eOQflkfTWpM wuKw== X-Gm-Message-State: AOUpUlEmKdKm2VbAOvibkuhwNlTxpWirYllo7gGxA3LzklaR9iP36doS YSYOFQetewbEGnKwEcyplXCDW0bbB8sgZzSapBqYVMt/ X-Google-Smtp-Source: AAOMgpflzxpkU1R+lmoukcnTFfos20f4ezqW8lR+xUrgu6wiJEvn2uw357896EA6aPMErDKVrmHXF94mrBJy4NYj49c= X-Received: by 2002:adf:e190:: with SMTP id k16-v6mr8457632wri.36.1532348064920; Mon, 23 Jul 2018 05:14:24 -0700 (PDT) MIME-Version: 1.0 References: <201807222235.w6MMZHdX030351@repo.freebsd.org> <3c44d182-8291-5cae-8845-4791978cbae8@selasky.org> In-Reply-To: <3c44d182-8291-5cae-8845-4791978cbae8@selasky.org> From: Li-Wen Hsu Date: Mon, 23 Jul 2018 13:14:12 +0100 Message-ID: Subject: Re: svn commit: r336620 - head/contrib/ofed/include To: hps@selasky.org 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.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: Mon, 23 Jul 2018 12:22:05 -0000 On Mon, Jul 23, 2018 at 10:38 AM Hans Petter Selasky wrote: > > On 07/23/18 00:35, Li-Wen Hsu wrote: > > Author: lwhsu (ports committer) > > Date: Sun Jul 22 22:35:17 2018 > > New Revision: 336620 > > URL: https://svnweb.freebsd.org/changeset/base/336620 > > > > Log: > > Add udma_barrier definitions for RISC-V > > > > Reviewed by: kib > > Sponsored by: The FreeBSD Foundation > > > > Modified: > > head/contrib/ofed/include/udma_barrier.h > > > > Was this change build tested? Yes, although it is still not enough for fixing RISC-V build, please see this one: https://lists.freebsd.org/pipermail/freebsd-current/2018-July/070279.html Best, Li-Wen -- Li-Wen Hsu https://lwhsu.org From owner-svn-src-head@freebsd.org Mon Jul 23 12:51: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 79925104A6CD; Mon, 23 Jul 2018 12:51:24 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2F30D7AD6F; Mon, 23 Jul 2018 12:51:24 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 105591CC8F; Mon, 23 Jul 2018 12:51:24 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6NCpNBY070274; Mon, 23 Jul 2018 12:51:23 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6NCpNYK070272; Mon, 23 Jul 2018 12:51:23 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201807231251.w6NCpNYK070272@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 23 Jul 2018 12:51:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336635 - in head/sys: kern sys X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in head/sys: kern sys X-SVN-Commit-Revision: 336635 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: Mon, 23 Jul 2018 12:51:24 -0000 Author: avg Date: Mon Jul 23 12:51:23 2018 New Revision: 336635 URL: https://svnweb.freebsd.org/changeset/base/336635 Log: change interrupt event's list of handlers from TAILQ to CK_SLIST The primary reason for this commit is to separate mechanical and nearly mechanical code changes from an upcoming fix for unsafe teardown of shared interrupt handlers that have only filters (see D15905). The technical rationale is that SLIST is sufficient. The only operation that gets worse performance -- O(n) instead of O(1) is a removal of a handler, but it is not a critical operation and the list is expected to be rather short. Additionally, it is easier to reason about SLIST when considering the concurrent lock-free access to the list from the interrupt context and the interrupt thread. CK_SLIST is used because the upcoming change depends on the memory order provided by CK_SLIST insert and the fact that CL_SLIST remove does not trash the linkage in a removed element. While here, I also fixed a couple of whitespace issues, made code under ifdef notyet compilable, added a lock assertion to ithread_update() and made intr_event_execute_handlers() static as it had no external callers. Reviewed by: cem (earlier version) MFC after: 4 weeks Differential Revision: https://reviews.freebsd.org/D16016 Modified: head/sys/kern/kern_intr.c head/sys/sys/interrupt.h Modified: head/sys/kern/kern_intr.c ============================================================================== --- head/sys/kern/kern_intr.c Mon Jul 23 11:21:43 2018 (r336634) +++ head/sys/kern/kern_intr.c Mon Jul 23 12:51:23 2018 (r336635) @@ -160,12 +160,13 @@ ithread_update(struct intr_thread *ithd) ie = ithd->it_event; td = ithd->it_thread; + mtx_assert(&ie->ie_lock, MA_OWNED); /* Determine the overall priority of this event. */ - if (TAILQ_EMPTY(&ie->ie_handlers)) + if (CK_SLIST_EMPTY(&ie->ie_handlers)) pri = PRI_MAX_ITHD; else - pri = TAILQ_FIRST(&ie->ie_handlers)->ih_pri; + pri = CK_SLIST_FIRST(&ie->ie_handlers)->ih_pri; /* Update name and priority. */ strlcpy(td->td_name, ie->ie_fullname, sizeof(td->td_name)); @@ -195,7 +196,7 @@ intr_event_update(struct intr_event *ie) space = 1; /* Run through all the handlers updating values. */ - TAILQ_FOREACH(ih, &ie->ie_handlers, ih_next) { + CK_SLIST_FOREACH(ih, &ie->ie_handlers, ih_next) { if (strlen(ie->ie_fullname) + strlen(ih->ih_name) + 1 < sizeof(ie->ie_fullname)) { strcat(ie->ie_fullname, " "); @@ -257,7 +258,7 @@ intr_event_create(struct intr_event **event, void *sou ie->ie_flags = flags; ie->ie_irq = irq; ie->ie_cpu = NOCPU; - TAILQ_INIT(&ie->ie_handlers); + CK_SLIST_INIT(&ie->ie_handlers); mtx_init(&ie->ie_lock, "intr event", NULL, MTX_DEF); va_start(ap, fmt); @@ -378,7 +379,7 @@ intr_lookup(int irq) TAILQ_FOREACH(ie, &event_list, ie_list) if (ie->ie_irq == irq && (ie->ie_flags & IE_SOFT) == 0 && - TAILQ_FIRST(&ie->ie_handlers) != NULL) + CK_SLIST_FIRST(&ie->ie_handlers) != NULL) break; mtx_unlock(&event_lock); return (ie); @@ -474,7 +475,7 @@ intr_event_destroy(struct intr_event *ie) mtx_lock(&event_lock); mtx_lock(&ie->ie_lock); - if (!TAILQ_EMPTY(&ie->ie_handlers)) { + if (!CK_SLIST_EMPTY(&ie->ie_handlers)) { mtx_unlock(&ie->ie_lock); mtx_unlock(&event_lock); return (EBUSY); @@ -504,7 +505,7 @@ ithread_create(const char *name) error = kproc_kthread_add(ithread_loop, ithd, &intrproc, &td, RFSTOPPED | RFHIGHPID, - 0, "intr", "%s", name); + 0, "intr", "%s", name); if (error) panic("kproc_create() failed with %d", error); thread_lock(td); @@ -539,6 +540,7 @@ intr_event_add_handler(struct intr_event *ie, const ch enum intr_type flags, void **cookiep) { struct intr_handler *ih, *temp_ih; + struct intr_handler **prevptr; struct intr_thread *it; if (ie == NULL || name == NULL || (handler == NULL && filter == NULL)) @@ -561,9 +563,9 @@ intr_event_add_handler(struct intr_event *ie, const ch /* We can only have one exclusive handler in a event. */ mtx_lock(&ie->ie_lock); - if (!TAILQ_EMPTY(&ie->ie_handlers)) { + if (!CK_SLIST_EMPTY(&ie->ie_handlers)) { if ((flags & INTR_EXCL) || - (TAILQ_FIRST(&ie->ie_handlers)->ih_flags & IH_EXCLUSIVE)) { + (CK_SLIST_FIRST(&ie->ie_handlers)->ih_flags & IH_EXCLUSIVE)) { mtx_unlock(&ie->ie_lock); free(ih, M_ITHREAD); return (EINVAL); @@ -588,14 +590,12 @@ intr_event_add_handler(struct intr_event *ie, const ch } /* Add the new handler to the event in priority order. */ - TAILQ_FOREACH(temp_ih, &ie->ie_handlers, ih_next) { + CK_SLIST_FOREACH_PREVPTR(temp_ih, prevptr, &ie->ie_handlers, ih_next) { if (temp_ih->ih_pri > ih->ih_pri) break; } - if (temp_ih == NULL) - TAILQ_INSERT_TAIL(&ie->ie_handlers, ih, ih_next); - else - TAILQ_INSERT_BEFORE(temp_ih, ih, ih_next); + CK_SLIST_INSERT_PREVPTR(prevptr, temp_ih, ih, ih_next); + intr_event_update(ie); CTR3(KTR_INTR, "%s: added %s to %s", __func__, ih->ih_name, @@ -621,7 +621,7 @@ intr_event_describe_handler(struct intr_event *ie, voi mtx_lock(&ie->ie_lock); #ifdef INVARIANTS - TAILQ_FOREACH(ih, &ie->ie_handlers, ih_next) { + CK_SLIST_FOREACH(ih, &ie->ie_handlers, ih_next) { if (ih == cookie) break; } @@ -721,15 +721,13 @@ _intr_drain(int irq) return; } - int intr_event_remove_handler(void *cookie) { struct intr_handler *handler = (struct intr_handler *)cookie; struct intr_event *ie; -#ifdef INVARIANTS struct intr_handler *ih; -#endif + struct intr_handler **prevptr; #ifdef notyet int dead; #endif @@ -740,25 +738,26 @@ intr_event_remove_handler(void *cookie) KASSERT(ie != NULL, ("interrupt handler \"%s\" has a NULL interrupt event", handler->ih_name)); + mtx_lock(&ie->ie_lock); CTR3(KTR_INTR, "%s: removing %s from %s", __func__, handler->ih_name, ie->ie_name); -#ifdef INVARIANTS - TAILQ_FOREACH(ih, &ie->ie_handlers, ih_next) + CK_SLIST_FOREACH_PREVPTR(ih, prevptr, &ie->ie_handlers, ih_next) { if (ih == handler) - goto ok; - mtx_unlock(&ie->ie_lock); - panic("interrupt handler \"%s\" not found in interrupt event \"%s\"", - ih->ih_name, ie->ie_name); -ok: -#endif + break; + } + if (ih == NULL) { + panic("interrupt handler \"%s\" not found in " + "interrupt event \"%s\"", handler->ih_name, ie->ie_name); + } + /* * If there is no ithread, then just remove the handler and return. * XXX: Note that an INTR_FAST handler might be running on another * CPU! */ if (ie->ie_thread == NULL) { - TAILQ_REMOVE(&ie->ie_handlers, handler, ih_next); + CK_SLIST_REMOVE_PREVPTR(prevptr, ih, ih_next); mtx_unlock(&ie->ie_lock); free(handler, M_ITHREAD); return (0); @@ -789,11 +788,12 @@ ok: */ atomic_store_rel_int(&ie->ie_thread->it_need, 1); } else - TAILQ_REMOVE(&ie->ie_handlers, handler, ih_next); + CK_SLIST_REMOVE_PREVPTR(prevptr, ih, ih_next); thread_unlock(ie->ie_thread->it_thread); while (handler->ih_flags & IH_DEAD) msleep(handler, &ie->ie_lock, 0, "iev_rmh", 0); intr_event_update(ie); + #ifdef notyet /* * XXX: This could be bad in the case of ppbus(8). Also, I think @@ -801,8 +801,8 @@ ok: * interrupt. */ dead = 1; - TAILQ_FOREACH(ih, &ie->ie_handlers, ih_next) { - if (!(ih->ih_flags & IH_FAST)) { + CK_SLIST_FOREACH(ih, &ie->ie_handlers, ih_next) { + if (ih->ih_handler != NULL) { dead = 0; break; } @@ -828,7 +828,7 @@ intr_event_schedule_thread(struct intr_event *ie) /* * If no ithread or no handlers, then we have a stray interrupt. */ - if (ie == NULL || TAILQ_EMPTY(&ie->ie_handlers) || + if (ie == NULL || CK_SLIST_EMPTY(&ie->ie_handlers) || ie->ie_thread == NULL) return (EINVAL); @@ -962,30 +962,35 @@ swi_remove(void *cookie) return (intr_event_remove_handler(cookie)); } - -/* - * This is a public function for use by drivers that mux interrupt - * handlers for child devices from their interrupt handler. - */ -void +static void intr_event_execute_handlers(struct proc *p, struct intr_event *ie) { - struct intr_handler *ih, *ihn; + struct intr_handler *ih, *ihn, *ihp; - TAILQ_FOREACH_SAFE(ih, &ie->ie_handlers, ih_next, ihn) { + ihp = NULL; + CK_SLIST_FOREACH_SAFE(ih, &ie->ie_handlers, ih_next, ihn) { /* * If this handler is marked for death, remove it from * the list of handlers and wake up the sleeper. */ if (ih->ih_flags & IH_DEAD) { mtx_lock(&ie->ie_lock); - TAILQ_REMOVE(&ie->ie_handlers, ih, ih_next); + if (ihp == NULL) + CK_SLIST_REMOVE_HEAD(&ie->ie_handlers, ih_next); + else + CK_SLIST_REMOVE_AFTER(ihp, ih_next); ih->ih_flags &= ~IH_DEAD; wakeup(ih); mtx_unlock(&ie->ie_lock); continue; } + /* + * Now that we know that the current element won't be removed + * update the previous element. + */ + ihp = ih; + /* Skip filter only handlers */ if (ih->ih_handler == NULL) continue; @@ -1157,7 +1162,7 @@ intr_event_handle(struct intr_event *ie, struct trapfr #endif /* An interrupt with no event or handlers is a stray interrupt. */ - if (ie == NULL || TAILQ_EMPTY(&ie->ie_handlers)) + if (ie == NULL || CK_SLIST_EMPTY(&ie->ie_handlers)) return (EINVAL); /* @@ -1172,7 +1177,8 @@ intr_event_handle(struct intr_event *ie, struct trapfr critical_enter(); oldframe = td->td_intr_frame; td->td_intr_frame = frame; - TAILQ_FOREACH(ih, &ie->ie_handlers, ih_next) { + + CK_SLIST_FOREACH(ih, &ie->ie_handlers, ih_next) { if (ih->ih_filter == NULL) { thread = 1; continue; @@ -1218,7 +1224,7 @@ intr_event_handle(struct intr_event *ie, struct trapfr if (ie->ie_post_filter != NULL) ie->ie_post_filter(ie->ie_source); } - + /* Schedule the ithread if needed. */ if (thread) { int error __unused; @@ -1364,7 +1370,7 @@ db_dump_intr_event(struct intr_event *ie, int handlers db_printf("\n"); if (handlers) - TAILQ_FOREACH(ih, &ie->ie_handlers, ih_next) + CK_SLIST_FOREACH(ih, &ie->ie_handlers, ih_next) db_dump_intrhand(ih); } @@ -1379,7 +1385,7 @@ DB_SHOW_COMMAND(intr, db_show_intr) verbose = strchr(modif, 'v') != NULL; all = strchr(modif, 'a') != NULL; TAILQ_FOREACH(ie, &event_list, ie_list) { - if (!all && TAILQ_EMPTY(&ie->ie_handlers)) + if (!all && CK_SLIST_EMPTY(&ie->ie_handlers)) continue; db_dump_intr_event(ie, verbose); if (db_pager_quit) Modified: head/sys/sys/interrupt.h ============================================================================== --- head/sys/sys/interrupt.h Mon Jul 23 11:21:43 2018 (r336634) +++ head/sys/sys/interrupt.h Mon Jul 23 12:51:23 2018 (r336635) @@ -33,6 +33,7 @@ #include #include +#include struct intr_event; struct intr_thread; @@ -52,7 +53,7 @@ struct intr_handler { char ih_name[MAXCOMLEN + 1]; /* Name of handler. */ struct intr_event *ih_event; /* Event we are connected to. */ int ih_need; /* Needs service. */ - TAILQ_ENTRY(intr_handler) ih_next; /* Next handler for this event. */ + CK_SLIST_ENTRY(intr_handler) ih_next; /* Next handler for this event. */ u_char ih_pri; /* Priority of this handler. */ struct intr_thread *ih_thread; /* Ithread for filtered handler. */ }; @@ -105,7 +106,7 @@ struct intr_handler { */ struct intr_event { TAILQ_ENTRY(intr_event) ie_list; - TAILQ_HEAD(, intr_handler) ie_handlers; /* Interrupt handlers. */ + CK_SLIST_HEAD(, intr_handler) ie_handlers; /* Interrupt handlers. */ char ie_name[MAXCOMLEN + 1]; /* Individual event name. */ char ie_fullname[MAXCOMLEN + 1]; struct mtx ie_lock; @@ -174,7 +175,6 @@ int intr_event_create(struct intr_event **event, void int intr_event_describe_handler(struct intr_event *ie, void *cookie, const char *descr); int intr_event_destroy(struct intr_event *ie); -void intr_event_execute_handlers(struct proc *p, struct intr_event *ie); int intr_event_handle(struct intr_event *ie, struct trapframe *frame); int intr_event_remove_handler(void *cookie); int intr_getaffinity(int irq, int mode, void *mask); From owner-svn-src-head@freebsd.org Mon Jul 23 12:55: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 E7F53104A76C; Mon, 23 Jul 2018 12:55:27 +0000 (UTC) (envelope-from dch@skunkwerks.at) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (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 7990F7B11E; Mon, 23 Jul 2018 12:55:27 +0000 (UTC) (envelope-from dch@skunkwerks.at) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 8D65A2C4; Mon, 23 Jul 2018 08:55:24 -0400 (EDT) Received: from web6 ([10.202.2.216]) by compute7.internal (MEProxy); Mon, 23 Jul 2018 08:55:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skunkwerks.at; h=cc:content-transfer-encoding:content-type:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=fH+QDSmpsd5JwCJjz DB7oZNJ3RsdiG77LAXFsOKoZfw=; b=dNYed35Q4JECWfPhRl4u8uomfnBxy0Wvm lHFH0x0nPXce/C01H2nFGWNZVslBTJgjzA3cOSM9N3uesv6P7nISHp7SE26zuLPq fcqE13B64CU+Z1tz2fyzg/FrIiLY7qFgfYBel9VWDV2Fde1S1P0xQTdD1fsp6Nuk OYcxeOCaVJP2xSTlXx3ObFoOomfV5Ej/NWP+26yoqZbZNOfZYuOMLGU7OfFhtt4/ YmWyzi6h0zqRgPVxqWpbkTSBHCPkrM8DevY1/u1Qz7K66AZVlbhwAyj3NIWn4GGs FALhFpUV1xmLTJS8Qx1OnlT8WK9Bi96E+llMWA+N9ECcgkCr+m+Rw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=fH+QDS mpsd5JwCJjzDB7oZNJ3RsdiG77LAXFsOKoZfw=; b=JG2JYfn20DGUqFi7zoztRg bcrnWgDqz36Dr5CPgD/kVYvBvW9wUCsfdkcgGhwy/LHAO3xbfYjeBWvQE+86o6GB IJPvlrrQpMYxICYrVENofyR5yt69SYZUiKnazSDLuwUvX05OitI1LhcSvwSNDkQZ asj00Qlnfs2Mes9ggUv5CnTtPW+qF3qF8QO1x0rrnRhhLztDINRGHqAM5UFJeStk W09uADP2keGjfn7adbhZ7gSK2sCIfbeKDQ4UIiZyKPmKNoLtsPv/GQ/JSr6KjUNs 1fZNQ6Hu3eM204FzLIPk1aPF98ReAlvMMikIw5uFnkBNUsY5O2c6TDm2xifFuPUA == X-ME-Proxy: X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id 936E442A9; Mon, 23 Jul 2018 08:55:23 -0400 (EDT) Message-Id: <1532350523.2338008.1449756200.7870027F@webmail.messagingengine.com> From: Dave Cottlehuber To: Niclas Zeising , Cy Schubert Cc: Alexey Dokuchaev , "src-committers" , Kyle Evans , svn-src-all@freebsd.org, "Andrey V. Elsukov" , Cy Schubert , svn-src-head@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-0843ff3e Date: Mon, 23 Jul 2018 14:55:23 +0200 In-Reply-To: References: <201807191320.w6JDK2hD033732@slippy.cwsent.com> Subject: Re: svn commit: r336203 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers c... 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: Mon, 23 Jul 2018 12:55:28 -0000 On Thu, 19 Jul 2018, at 15:25, Niclas Zeising wrote: > On 07/19/18 15:20, Cy Schubert wrote: > > In message <2f0ab2c2-b7cc-3dae-2d65-ea3c4a9515cb@daemonic.se>, Niclas > > Zeising w > > rites: > >> [ sending this again since I missed the list the first time, apologies > >> if anyone receives a duplicate ] > >> > >> On 07/19/18 13:57, Kyle Evans wrote: > >>> On Thu, Jul 19, 2018 at 4:51 AM, Alexey Dokuchaev wrote > >> : > >>>> On Thu, Jul 19, 2018 at 11:48:03AM +0300, Andrey V. Elsukov wrote: > >>>>> ... > >>>>> Yesterday I updated my notebook (with iwm(4)) and also noticed that > >>>>> wi-fi connection periodically breaks. /etc/rc.d/wpa_supplicant restart > >>>>> wlan0 helps. After your message I reinstalled wpa_supplicant from old > >>>>> source and now it works stable already about 2 hours. Reporting the same thing. At my end it looks like an issue with the AP itself, not iwm but maybe more expert eyes see something I don't? I've seen this once downstairs where the family has an imac on wifi, and it also disconnected at the same time, and reconnected. I collected all this for the Ubiquiti forums but maybe it helps here. I'm using intel 8265, WPA-PSK, and unifi UAC Pro AP. I've been seeing this for ~ 5 days, around the time my UAC firmware got bumped to 3.9.27.8537, and also the last CURRENT update I did. Sometimes it's brutal (every 1-2 minutes) and other times it takes a while (hours) to occur: 2018-07-18T19:03:10.843020+00:00 akai kernel: [9200] wlan0: [80:2a:a8:5a:bd:3f] AMRR: current rate 2, txcnt=12, retrycnt=167 2018-07-18T19:03:11.684065+00:00 akai kernel: [9200] wlan0: [80:2a:a8:5a:bd:3f] AMRR: current rate 2, txcnt=11, retrycnt=94 2018-07-18T19:03:11.847485+00:00 akai 1 2018-07-18T19:03:11.847320+00:00 akai.skunkwerks.at wpa_supplicant 91696 - - wlan0: CTRL-EVENT-DISCONNECTED bssid=80:2a:a8:5a:bd:3f reason=1 locally_generated=1 2018-07-18T19:03:11.848239+00:00 akai 1 2018-07-18T19:03:11.848123+00:00 akai.skunkwerks.at devd 17186 - - Processing event '!system=IFNET subsystem=wlan0 type=LINK_DOWN' 2018-07-18T19:03:11.848846+00:00 akai 1 2018-07-18T19:03:11.848384+00:00 akai.skunkwerks.at dhclient 57397 - - wlan0 link state up -> down 2018-07-18T19:03:11.848899+00:00 akai 1 2018-07-18T19:03:11.848593+00:00 akai.skunkwerks.at devd 17186 - - Popping table 2018-07-18T19:03:11.892696+00:00 akai kernel: [9201] wlan0: [80:2a:a8:5a:bd:3f] station deauth via MLME (reason: 1 (unspecified)) 2018-07-18T19:03:11.892720+00:00 akai kernel: [9201] wlan0: ieee80211_swscan_cancel_scan: called; F_SCAN=0, vap=match, signal=0 2018-07-18T19:03:11.892733+00:00 akai kernel: [9201] wlan0: ieee80211_swscan_cancel_scan: called; F_SCAN=0, vap=match, signal=0 2018-07-18T19:03:11.892736+00:00 akai kernel: [9201] wlan0: [80:2a:a8:5a:bd:3f] send station disassociate (reason: 8 (sending STA is leaving/has left BSS)) 2018-07-18T19:03:11.892740+00:00 akai kernel: [9201] [80:2a:a8:5a:bd:3f] send disassoc on channel 6 2018-07-18T19:03:11.892743+00:00 akai kernel: [9201] wlan0: [00:28:f8:d0:91:52] amrr_node_init: non-11n node 2018-07-18T19:03:11.892746+00:00 akai kernel: [9201] wlan0: link state changed to DOWN 2018-07-18T19:03:11.892749+00:00 akai kernel: [9201] wlan0: [00:28:f8:d0:91:52] AMRR: nrates=0, initial rate 0 2018-07-18T19:03:12.114718+00:00 akai kernel: [9201] wlan0: ieee80211_scanreq: flags 0x20052 duration 0x7fffffff mindwell 0 maxdwell 0 nssid 1 2018-07-18T19:03:12.114744+00:00 akai kernel: [9201] wlan0: ieee80211_scan_flush this time I got both the wlandebug output and also /var/log/messages & pcap from the AP. I'm not sure how much privileged info is in the AP pcap so its available privately on request if needed. laptop - looks like a normal exit of the AP to me: 2018-07-23T12:20:22.469857+00:00 akai kernel: [1823] wlan0: [80:2a:a8:5a:bd:3f] AMRR decreasing rate 11 (txcnt=46 retrycnt=16) 2018-07-23T12:20:25.396670+00:00 akai kernel: [1825] wlan0: [80:2a:a8:5a:bd:3f] AMRR: current rate 11, txcnt=11, retrycnt=105 2018-07-23T12:20:25.396700+00:00 akai kernel: [1825] wlan0: [80:2a:a8:5a:bd:3f] AMRR decreasing rate 4 (txcnt=11 retrycnt=105) 2018-07-23T12:20:25.698421+00:00 akai 1 2018-07-23T12:20:25.698238+00:00 akai.skunkwerks.at wpa_supplicant 22034 - - wlan0: CTRL-EVENT-DISCONNECTED bssid=80:2a:a8:5a:bd:3f reason=1 locally_generated=1 2018-07-23T12:20:25.699374+00:00 akai 1 2018-07-23T12:20:25.699249+00:00 akai.skunkwerks.at dhclient 23843 - - wlan0 link state up -> down 2018-07-23T12:20:25.699465+00:00 akai 1 2018-07-23T12:20:25.699319+00:00 akai.skunkwerks.at devd 37330 - - Processing event '!system=IFNET subsystem=wlan0 type=LINK_DOWN' 2018-07-23T12:20:25.699521+00:00 akai 1 2018-07-23T12:20:25.699377+00:00 akai.skunkwerks.at devd 37330 - - Pushing table 2018-07-23T12:20:25.699569+00:00 akai 1 2018-07-23T12:20:25.699447+00:00 akai.skunkwerks.at devd 37330 - - Processing notify event 2018-07-23T12:20:25.699778+00:00 akai 1 2018-07-23T12:20:25.699701+00:00 akai.skunkwerks.at devd 37330 - - Popping table 2018-07-23T12:20:25.864867+00:00 akai kernel: [1826] wlan0: [80:2a:a8:5a:bd:3f] station deauth via MLME (reason: 1 (unspecified)) 2018-07-23T12:20:25.864893+00:00 akai kernel: [1826] wlan0: ieee80211_swscan_cancel_scan: called; F_SCAN=0, vap=match, signal=0 2018-07-23T12:20:25.864896+00:00 akai kernel: [1826] wlan0: ieee80211_swscan_cancel_scan: called; F_SCAN=0, vap=match, signal=0 2018-07-23T12:20:25.864898+00:00 akai kernel: [1826] wlan0: [80:2a:a8:5a:bd:3f] send station disassociate (reason: 8 (sending STA is leaving/has left BSS)) 2018-07-23T12:20:25.864903+00:00 akai kernel: [1826] [80:2a:a8:5a:bd:3f] send disassoc on channel 1 2018-07-23T12:20:25.864926+00:00 akai kernel: [1826] wlan0: [00:28:f8:d0:91:52] amrr_node_init: non-11n node 2018-07-23T12:20:25.864929+00:00 akai kernel: [1826] wlan0: link state changed to DOWN 2018-07-23T12:20:25.864936+00:00 akai kernel: [1826] wlan0: [00:28:f8:d0:91:52] AMRR: nrates=0, initial rate 0 2018-07-23T12:20:25.864943+00:00 akai kernel: [1826] wlan0: ieee80211_scanreq: flags 0x20052 duration 0x7fffffff mindwell 0 maxdwell 0 nssid 1 2018-07-23T12:20:26.084679+00:00 akai kernel: [1826] wlan0: ieee80211_scan_flush AP logs - looking very much like a large chunk of the AP stack restarted but not the AP itself: Jul 23 12:24:36 ap2terrace user.info syslog: ubnt_protocol.ubnt_usr1_handler(): Get DHCP IP Jul 23 12:24:36 ap2terrace user.info syslog: ubnt_protocol.ubnt_usr1_handler(): my_ip is 172.16.2.10 Jul 23 12:24:36 ap2terrace user.err syslog: ubnt_protocol.ubnt_multicast_socket_init(): already drop membership Jul 23 12:24:36 ap2terrace user.notice syswrapper: hostapd update: conf=/etc/aaa2.cfg iterface=ath1 nas_ip=172.16.2.10 res=OK Jul 23 12:24:36 ap2terrace user.notice syswrapper: hostapd update: conf=/etc/aaa1.cfg iterface=ath0 nas_ip=172.16.2.10 res=OK Jul 23 12:24:37 ap2terrace daemon.info init: process '/bin/dropbear -F -d /var/run/dropbear_dss_host_key -r /var/run/dropbear_rsa_host_key -p br0:22' (pid 918) exited. Sc Jul 23 12:24:37 ap2terrace daemon.info init: starting pid 1029, tty '/dev/null': '/bin/dropbear -F -d /var/run/dropbear_dss_host_key -r /var/run/dropbear_rsa_host_key -p Jul 23 12:24:37 ap2terrace authpriv.info dropbear[1029]: Not backgrounding Jul 23 12:25:06 ap2terrace user.err syslog: ace_reporter.reporter_fail(): Unknown[11] (http://172.16.1.14:8080/inform) Jul 23 12:25:06 ap2terrace user.err syslog: ace_reporter.reporter_fail(): initial contact failed #1, url=http://172.16.1.14:8080/inform, rc=11 Jul 23 12:25:08 ap2terrace daemon.info hostapd: ath1: STA 80:2a:a8:5b:bd:3f DRIVER: Sead AUTH addr=80:ed:2c:45:8e:f7 status_code=0 Jul 23 12:25:08 ap2terrace kern.warn kernel: [ 52.510000] wmi_unified_event_rx : no registered event handler : event id 0x901b Jul 23 12:25:08 ap2terrace daemon.info hostapd: ath1: STA 80:ed:2c:45:8e:f7 IEEE 802.11: associated Jul 23 12:25:08 ap2terrace user.info syslog: wevent.ubnt_custom_event(): EVENT_STA_JOIN ath1: 80:ed:2c:45:8e:f7 / 1 Jul 23 12:25:08 ap2terrace daemon.info hostapd: ath1: STA 80:ed:2c:45:8e:f7 WPA: pairwise key handshake completed (RSN) Jul 23 12:25:08 ap2terrace user.info syslog: wevent.ubnt_custom_event(): EVENT_STA_IP ath1: 80:ed:2c:45:8e:f7 / 172.16.2.14 Jul 23 12:25:09 ap2terrace kern.warn kernel: [ 53.000000] [wifi1] FWLOG: [73760] RATE: ChainMask 3, phymode 1044489, ni_flags 0x02233006, vht_mcs_set 0xfffa, ht_mcs_set 0xffff, legacy_rate_set 0x12027 Jul 23 12:25:09 ap2terrace kern.warn kernel: [ 53.000000] [wifi1] FWLOG: [73767] WAL_DBGID_SECURITY_ALLOW_DATA ( 0x435110 ) Jul 23 12:25:09 ap2terrace kern.warn kernel: [ 53.000000] [wifi1] FWLOG: [73792] RATE: ChainMask 3, phymode 1044490, ni_flags 0x02233006, vht_mcs_set 0xfffa, ht_mcs_set 0xffff, legacy_rate_set 0x0401 Jul 23 12:25:18 ap2terrace daemon.info hostapd: ath1: STA 80:ed:2c:45:8e:f7 RADIUS: starting accounting session 5AAD0B98-00000000 Jul 23 12:25:20 ap2terrace daemon.info hostapd: ath0: STA 80:2a:a8:5a:bd:3f DRIVER: Sead AUTH addr=00:28:f8:d0:91:52 status_code=0 Jul 23 12:25:20 ap2terrace user.info syslog: wevent.ubnt_custom_event(): EVENT_STA_JOIN ath0: 00:28:f8:d0:91:52 / 1 Jul 23 12:25:20 ap2terrace daemon.info hostapd: ath0: STA 00:28:f8:d0:91:52 IEEE 802.11: associated Jul 23 12:25:20 ap2terrace daemon.info hostapd: ath0: STA 00:28:f8:d0:91:52 WPA: pairwise key handshake completed (RSN) Jul 23 12:25:20 ap2terrace user.info syslog: wevent.ubnt_custom_event(): EVENT_STA_IP ath0: 00:28:f8:d0:91:52 / 172.16.2.92 Jul 23 12:25:30 ap2terrace daemon.info hostapd: ath0: STA 00:28:f8:d0:91:52 RADIUS: starting accounting session 5AAD0B98-00000000 I'll roll back my boot environment and let you know if it behaves differently. A+ Dave From owner-svn-src-head@freebsd.org Mon Jul 23 13:03: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 38795104A9FE; Mon, 23 Jul 2018 13:03:05 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DC9577B782; Mon, 23 Jul 2018 13:03:04 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com [209.85.208.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 7D929A9CE; Mon, 23 Jul 2018 13:03:04 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-lj1-f176.google.com with SMTP id f8-v6so494563ljk.1; Mon, 23 Jul 2018 06:03:04 -0700 (PDT) X-Gm-Message-State: AOUpUlHI95rDc+l3QGk6eMqNwzrxx9j/DwoshQ8FWNXvsAY0QDNQBXH8 w4JldTRUvvdJ9mejuXfhll2dg4+JUJSNlKsnf3Q= X-Google-Smtp-Source: AAOMgpfTv/q0NGeqERQXyWzvAS+h3Pmk8dFCwlWeYDrnv6VbOwJB0rk+wy+H/5OLKqYU+b9Mckqkhh0GncNVl8dRDCY= X-Received: by 2002:a2e:1004:: with SMTP id j4-v6mr9310426lje.2.1532350982725; Mon, 23 Jul 2018 06:03:02 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:5742:0:0:0:0:0 with HTTP; Mon, 23 Jul 2018 06:02:41 -0700 (PDT) In-Reply-To: <1532350523.2338008.1449756200.7870027F@webmail.messagingengine.com> References: <201807191320.w6JDK2hD033732@slippy.cwsent.com> <1532350523.2338008.1449756200.7870027F@webmail.messagingengine.com> From: Kyle Evans Date: Mon, 23 Jul 2018 08:02:41 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r336203 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers c... To: Dave Cottlehuber Cc: Niclas Zeising , Cy Schubert , Alexey Dokuchaev , src-committers , svn-src-all@freebsd.org, "Andrey V. Elsukov" , Cy Schubert , svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" 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: Mon, 23 Jul 2018 13:03:05 -0000 On Mon, Jul 23, 2018 at 7:55 AM, Dave Cottlehuber wrote: > On Thu, 19 Jul 2018, at 15:25, Niclas Zeising wrote: >> On 07/19/18 15:20, Cy Schubert wrote: >> > In message <2f0ab2c2-b7cc-3dae-2d65-ea3c4a9515cb@daemonic.se>, Niclas >> > Zeising w >> > rites: >> >> [ sending this again since I missed the list the first time, apologies >> >> if anyone receives a duplicate ] >> >> >> >> On 07/19/18 13:57, Kyle Evans wrote: >> >>> On Thu, Jul 19, 2018 at 4:51 AM, Alexey Dokuchaev wrote >> >> : >> >>>> On Thu, Jul 19, 2018 at 11:48:03AM +0300, Andrey V. Elsukov wrote: >> >>>>> ... >> >>>>> Yesterday I updated my notebook (with iwm(4)) and also noticed that >> >>>>> wi-fi connection periodically breaks. /etc/rc.d/wpa_supplicant restart >> >>>>> wlan0 helps. After your message I reinstalled wpa_supplicant from old >> >>>>> source and now it works stable already about 2 hours. > > Reporting the same thing. At my end it looks like an issue with the AP itself, > not iwm but maybe more expert eyes see something I don't? I've seen this once > downstairs where the family has an imac on wifi, and it also disconnected at > the same time, and reconnected. I collected all this for the Ubiquiti forums > but maybe it helps here. > > I'm using intel 8265, WPA-PSK, and unifi UAC Pro AP. I've been seeing this > for ~ 5 days, around the time my UAC firmware got bumped to 3.9.27.8537, and > also the last CURRENT update I did. > > Sometimes it's brutal (every 1-2 minutes) and other times it takes a while (hours) to occur: > > 2018-07-18T19:03:10.843020+00:00 akai kernel: [9200] wlan0: [80:2a:a8:5a:bd:3f] AMRR: current rate 2, txcnt=12, retrycnt=167 > 2018-07-18T19:03:11.684065+00:00 akai kernel: [9200] wlan0: [80:2a:a8:5a:bd:3f] AMRR: current rate 2, txcnt=11, retrycnt=94 > 2018-07-18T19:03:11.847485+00:00 akai 1 2018-07-18T19:03:11.847320+00:00 akai.skunkwerks.at wpa_supplicant 91696 - - wlan0: CTRL-EVENT-DISCONNECTED bssid=80:2a:a8:5a:bd:3f reason=1 locally_generated=1 > 2018-07-18T19:03:11.848239+00:00 akai 1 2018-07-18T19:03:11.848123+00:00 akai.skunkwerks.at devd 17186 - - Processing event '!system=IFNET subsystem=wlan0 type=LINK_DOWN' > 2018-07-18T19:03:11.848846+00:00 akai 1 2018-07-18T19:03:11.848384+00:00 akai.skunkwerks.at dhclient 57397 - - wlan0 link state up -> down > 2018-07-18T19:03:11.848899+00:00 akai 1 2018-07-18T19:03:11.848593+00:00 akai.skunkwerks.at devd 17186 - - Popping table > 2018-07-18T19:03:11.892696+00:00 akai kernel: [9201] wlan0: [80:2a:a8:5a:bd:3f] station deauth via MLME (reason: 1 (unspecified)) > 2018-07-18T19:03:11.892720+00:00 akai kernel: [9201] wlan0: ieee80211_swscan_cancel_scan: called; F_SCAN=0, vap=match, signal=0 > 2018-07-18T19:03:11.892733+00:00 akai kernel: [9201] wlan0: ieee80211_swscan_cancel_scan: called; F_SCAN=0, vap=match, signal=0 > 2018-07-18T19:03:11.892736+00:00 akai kernel: [9201] wlan0: [80:2a:a8:5a:bd:3f] send station disassociate (reason: 8 (sending STA is leaving/has left BSS)) > 2018-07-18T19:03:11.892740+00:00 akai kernel: [9201] [80:2a:a8:5a:bd:3f] send disassoc on channel 6 > 2018-07-18T19:03:11.892743+00:00 akai kernel: [9201] wlan0: [00:28:f8:d0:91:52] amrr_node_init: non-11n node > 2018-07-18T19:03:11.892746+00:00 akai kernel: [9201] wlan0: link state changed to DOWN > 2018-07-18T19:03:11.892749+00:00 akai kernel: [9201] wlan0: [00:28:f8:d0:91:52] AMRR: nrates=0, initial rate 0 > 2018-07-18T19:03:12.114718+00:00 akai kernel: [9201] wlan0: ieee80211_scanreq: flags 0x20052 duration 0x7fffffff mindwell 0 maxdwell 0 nssid 1 > 2018-07-18T19:03:12.114744+00:00 akai kernel: [9201] wlan0: ieee80211_scan_flush > > this time I got both the wlandebug output and also /var/log/messages & pcap from > the AP. I'm not sure how much privileged info is in the AP pcap so its available > privately on request if needed. > > laptop - looks like a normal exit of the AP to me: > > 2018-07-23T12:20:22.469857+00:00 akai kernel: [1823] wlan0: [80:2a:a8:5a:bd:3f] AMRR decreasing rate 11 (txcnt=46 retrycnt=16) > 2018-07-23T12:20:25.396670+00:00 akai kernel: [1825] wlan0: [80:2a:a8:5a:bd:3f] AMRR: current rate 11, txcnt=11, retrycnt=105 > 2018-07-23T12:20:25.396700+00:00 akai kernel: [1825] wlan0: [80:2a:a8:5a:bd:3f] AMRR decreasing rate 4 (txcnt=11 retrycnt=105) > 2018-07-23T12:20:25.698421+00:00 akai 1 2018-07-23T12:20:25.698238+00:00 akai.skunkwerks.at wpa_supplicant 22034 - - wlan0: CTRL-EVENT-DISCONNECTED bssid=80:2a:a8:5a:bd:3f reason=1 locally_generated=1 > 2018-07-23T12:20:25.699374+00:00 akai 1 2018-07-23T12:20:25.699249+00:00 akai.skunkwerks.at dhclient 23843 - - wlan0 link state up -> down > 2018-07-23T12:20:25.699465+00:00 akai 1 2018-07-23T12:20:25.699319+00:00 akai.skunkwerks.at devd 37330 - - Processing event '!system=IFNET subsystem=wlan0 type=LINK_DOWN' > 2018-07-23T12:20:25.699521+00:00 akai 1 2018-07-23T12:20:25.699377+00:00 akai.skunkwerks.at devd 37330 - - Pushing table > 2018-07-23T12:20:25.699569+00:00 akai 1 2018-07-23T12:20:25.699447+00:00 akai.skunkwerks.at devd 37330 - - Processing notify event > 2018-07-23T12:20:25.699778+00:00 akai 1 2018-07-23T12:20:25.699701+00:00 akai.skunkwerks.at devd 37330 - - Popping table > 2018-07-23T12:20:25.864867+00:00 akai kernel: [1826] wlan0: [80:2a:a8:5a:bd:3f] station deauth via MLME (reason: 1 (unspecified)) > 2018-07-23T12:20:25.864893+00:00 akai kernel: [1826] wlan0: ieee80211_swscan_cancel_scan: called; F_SCAN=0, vap=match, signal=0 > 2018-07-23T12:20:25.864896+00:00 akai kernel: [1826] wlan0: ieee80211_swscan_cancel_scan: called; F_SCAN=0, vap=match, signal=0 > 2018-07-23T12:20:25.864898+00:00 akai kernel: [1826] wlan0: [80:2a:a8:5a:bd:3f] send station disassociate (reason: 8 (sending STA is leaving/has left BSS)) > 2018-07-23T12:20:25.864903+00:00 akai kernel: [1826] [80:2a:a8:5a:bd:3f] send disassoc on channel 1 > 2018-07-23T12:20:25.864926+00:00 akai kernel: [1826] wlan0: [00:28:f8:d0:91:52] amrr_node_init: non-11n node > 2018-07-23T12:20:25.864929+00:00 akai kernel: [1826] wlan0: link state changed to DOWN > 2018-07-23T12:20:25.864936+00:00 akai kernel: [1826] wlan0: [00:28:f8:d0:91:52] AMRR: nrates=0, initial rate 0 > 2018-07-23T12:20:25.864943+00:00 akai kernel: [1826] wlan0: ieee80211_scanreq: flags 0x20052 duration 0x7fffffff mindwell 0 maxdwell 0 nssid 1 > 2018-07-23T12:20:26.084679+00:00 akai kernel: [1826] wlan0: ieee80211_scan_flush > > AP logs - looking very much like a large chunk of the AP stack restarted but not the AP itself: > > Jul 23 12:24:36 ap2terrace user.info syslog: ubnt_protocol.ubnt_usr1_handler(): Get DHCP IP > Jul 23 12:24:36 ap2terrace user.info syslog: ubnt_protocol.ubnt_usr1_handler(): my_ip is 172.16.2.10 > Jul 23 12:24:36 ap2terrace user.err syslog: ubnt_protocol.ubnt_multicast_socket_init(): already drop membership > Jul 23 12:24:36 ap2terrace user.notice syswrapper: hostapd update: conf=/etc/aaa2.cfg iterface=ath1 nas_ip=172.16.2.10 res=OK > Jul 23 12:24:36 ap2terrace user.notice syswrapper: hostapd update: conf=/etc/aaa1.cfg iterface=ath0 nas_ip=172.16.2.10 res=OK > Jul 23 12:24:37 ap2terrace daemon.info init: process '/bin/dropbear -F -d /var/run/dropbear_dss_host_key -r /var/run/dropbear_rsa_host_key -p br0:22' (pid 918) exited. Sc > Jul 23 12:24:37 ap2terrace daemon.info init: starting pid 1029, tty '/dev/null': '/bin/dropbear -F -d /var/run/dropbear_dss_host_key -r /var/run/dropbear_rsa_host_key -p > Jul 23 12:24:37 ap2terrace authpriv.info dropbear[1029]: Not backgrounding > Jul 23 12:25:06 ap2terrace user.err syslog: ace_reporter.reporter_fail(): Unknown[11] (http://172.16.1.14:8080/inform) > Jul 23 12:25:06 ap2terrace user.err syslog: ace_reporter.reporter_fail(): initial contact failed #1, url=http://172.16.1.14:8080/inform, rc=11 > Jul 23 12:25:08 ap2terrace daemon.info hostapd: ath1: STA 80:2a:a8:5b:bd:3f DRIVER: Sead AUTH addr=80:ed:2c:45:8e:f7 status_code=0 > Jul 23 12:25:08 ap2terrace kern.warn kernel: [ 52.510000] wmi_unified_event_rx : no registered event handler : event id 0x901b > Jul 23 12:25:08 ap2terrace daemon.info hostapd: ath1: STA 80:ed:2c:45:8e:f7 IEEE 802.11: associated > Jul 23 12:25:08 ap2terrace user.info syslog: wevent.ubnt_custom_event(): EVENT_STA_JOIN ath1: 80:ed:2c:45:8e:f7 / 1 > Jul 23 12:25:08 ap2terrace daemon.info hostapd: ath1: STA 80:ed:2c:45:8e:f7 WPA: pairwise key handshake completed (RSN) > Jul 23 12:25:08 ap2terrace user.info syslog: wevent.ubnt_custom_event(): EVENT_STA_IP ath1: 80:ed:2c:45:8e:f7 / 172.16.2.14 > Jul 23 12:25:09 ap2terrace kern.warn kernel: [ 53.000000] [wifi1] FWLOG: [73760] RATE: ChainMask 3, phymode 1044489, ni_flags 0x02233006, vht_mcs_set 0xfffa, ht_mcs_set 0xffff, legacy_rate_set 0x12027 > Jul 23 12:25:09 ap2terrace kern.warn kernel: [ 53.000000] [wifi1] FWLOG: [73767] WAL_DBGID_SECURITY_ALLOW_DATA ( 0x435110 ) > Jul 23 12:25:09 ap2terrace kern.warn kernel: [ 53.000000] [wifi1] FWLOG: [73792] RATE: ChainMask 3, phymode 1044490, ni_flags 0x02233006, vht_mcs_set 0xfffa, ht_mcs_set 0xffff, legacy_rate_set 0x0401 > Jul 23 12:25:18 ap2terrace daemon.info hostapd: ath1: STA 80:ed:2c:45:8e:f7 RADIUS: starting accounting session 5AAD0B98-00000000 > Jul 23 12:25:20 ap2terrace daemon.info hostapd: ath0: STA 80:2a:a8:5a:bd:3f DRIVER: Sead AUTH addr=00:28:f8:d0:91:52 status_code=0 > Jul 23 12:25:20 ap2terrace user.info syslog: wevent.ubnt_custom_event(): EVENT_STA_JOIN ath0: 00:28:f8:d0:91:52 / 1 > Jul 23 12:25:20 ap2terrace daemon.info hostapd: ath0: STA 00:28:f8:d0:91:52 IEEE 802.11: associated > Jul 23 12:25:20 ap2terrace daemon.info hostapd: ath0: STA 00:28:f8:d0:91:52 WPA: pairwise key handshake completed (RSN) > Jul 23 12:25:20 ap2terrace user.info syslog: wevent.ubnt_custom_event(): EVENT_STA_IP ath0: 00:28:f8:d0:91:52 / 172.16.2.92 > Jul 23 12:25:30 ap2terrace daemon.info hostapd: ath0: STA 00:28:f8:d0:91:52 RADIUS: starting accounting session 5AAD0B98-00000000 > > I'll roll back my boot environment and let you know if it behaves differently. > Hi, Please also try updating wpa_supplicant from a revision >= r336529 -- some other stuff has been straightened out since. Thanks, Kyle Evans From owner-svn-src-head@freebsd.org Mon Jul 23 13:55: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 1E1DF104BCD8; Mon, 23 Jul 2018 13:55:24 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.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)) by mx1.freebsd.org (Postfix) with ESMTPS id 84A427D614; Mon, 23 Jul 2018 13:55:23 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lf1-f52.google.com with SMTP id f18-v6so538830lfc.2; Mon, 23 Jul 2018 06:55:23 -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:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=6omnmO0xiiAFc8BhtoIAOu+qUNUpmu2nBD6Fk3H/x4c=; b=JtkfdBf9aeqx38Cd4cTsJPoYGExpcTUNNh/JVCS7gTOf9huU1FqMnTjVT1MK07/u84 IsoESPHjcHhBreHVuMVkiN2c3jPGg1mxTgK7RYNriuIi3KwNXY5xhgvxIOCR/Ho6eAzk lO4QiyHOmLQTNuD6AWOYTZdRmk6jF6lX+Ck1//46N38UhbZSMod3ls8vhJPjzkrzzmqa /otKnN07QhjqlUb3TxdzsKvC/r5GvgYOorCeLn1BzB8fph1HdCdZDmzgSSsawLHDXBc7 j0EMCS8C5SdWB5/Z+V8swf9o9zxZRjFp+IYlXbYsqqFIGVceZ4RdYT4OTSvlzXekCXPO D7LQ== X-Gm-Message-State: AOUpUlErgPCP3CcyCeXDkVrzDE61iy+iTy5JS0ew/JwvVNDITttAti0F dbzxKnexgRC3eGfkObCmLOsaWFzr X-Google-Smtp-Source: AAOMgpf9DNTOBTt+Ltwa7TfBnND0J+888LaGh5jBbtAOHy+FSH3CQpS04kDhLMpE2fR92FTe7llBmg== X-Received: by 2002:a19:cb44:: with SMTP id b65-v6mr7870004lfg.12.1532354116217; Mon, 23 Jul 2018 06:55:16 -0700 (PDT) Received: from [192.168.1.36] (broadband-82-140-206-85.atc.tvcom.ru. [82.140.206.85]) by smtp.googlemail.com with ESMTPSA id u19-v6sm1834489lje.51.2018.07.23.06.55.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Jul 2018 06:55:15 -0700 (PDT) Subject: Re: svn commit: r336635 - in head/sys: kern sys To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201807231251.w6NCpNYK070272@repo.freebsd.org> From: Andriy Gapon Openpgp: preference=signencrypt Message-ID: <17d787c0-adb2-a4fd-16a8-9ea5af5d87e0@FreeBSD.org> Date: Mon, 23 Jul 2018 16:55:17 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <201807231251.w6NCpNYK070272@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.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: Mon, 23 Jul 2018 13:55:24 -0000 On 23/07/2018 15:51, Andriy Gapon wrote: > Author: avg > Date: Mon Jul 23 12:51:23 2018 > New Revision: 336635 > URL: https://svnweb.freebsd.org/changeset/base/336635 > > Log: > change interrupt event's list of handlers from TAILQ to CK_SLIST This commit broke a lot of !x86 architectures that access ie_handlers directly. I am building testing a fix for that now. But maybe we should think about making sys/interrupt.h interface more expressive so that the consumers do not need to poke into what could be considered the internals of MI interrupt handling code. -- Andriy Gapon From owner-svn-src-head@freebsd.org Mon Jul 23 14: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 7FD65104CC5E; Mon, 23 Jul 2018 14:48:09 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::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 E22897F442; Mon, 23 Jul 2018 14:48:08 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lj1-x236.google.com with SMTP id s12-v6so796306ljj.0; Mon, 23 Jul 2018 07:48:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=L33IQiy4tdLg7Bj2Z6/VLZ0ehRcfgNt+vVyeGbduMp0=; b=PZzEpfPGeoaoItr9Uu2a/CqlB1K5W1QYEXWu6uPgnrT8wK6NCiN2BGD5nj3B3oqqyY kCPHrmnpkF7CgtruY9zXUcip4ca2ACfFnBAn6OZRmQQJglQOE4dgDhUiW/0B+8NwAMhq 4EWvc3yuUYJhE+Ie3dEEePPVQPKLceh+VgghWR0aHDgv62ip2zDa/Hofx+hkyU/zKcu0 Ty8XvW5w9YyocGV55ERgW9fr8Z9mSPMFO8MbvVBsaG9uxNwQI+bQeQz0Kau7nON24Etw Cmgicghp1uL7SMIVmpXDPY7uz3E9tx23S1h6WdHLizlldYnR3hyd+lrgTB4ZqTtjJcaw 87MA== 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=L33IQiy4tdLg7Bj2Z6/VLZ0ehRcfgNt+vVyeGbduMp0=; b=aOJFAnhW6UGydk23rn6iie8ZG9Si5j79upItXzMMRLJMejajL3W52esihEw3oQLN24 GtFdEEyAZ59eufdgKIddoEr63GBOiXn3PlsBDlzLYI1tmoy9diaV4/JWRe/rfQcRztho qfN8O2NoUqkvhVfJ2S/xcZpWavoFb4hYjvpI0L4dIKFmBQ1V1ojuk+STy2Izd2JH0s5b TyIl/IIRGtbCSlvWcBF4UG0yrLCHf8mykZ7mCEX4UsK3o8tSSUSuUhVPJQdIltn0V3ib C7fn32HCeubwUpuB5mjgXE6xd4I9ezCGDGebsBUuHciVEcaeJrCStQoZwVRR4pmUspzc 7XFw== X-Gm-Message-State: AOUpUlFCtwAGD3hFzVCX2tEAsmpUpvrB31ml4yYPbW6ZNMZkXrFeolY/ Cg1W9XrmRnUHAE7CqoDB2YN9DveIFGvvnWHAcoP97Q== X-Google-Smtp-Source: AAOMgpcVb85RXNpbrR6BbR7+F8D5raJH2SEnPT7GdxbcMUKuOKNxaYbCEjqcMjGRWytymRpBUSgMkv9j+0BaMpdc3KU= X-Received: by 2002:a2e:87da:: with SMTP id v26-v6mr9073266ljj.69.1532357286974; Mon, 23 Jul 2018 07:48:06 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 2002:ab3:7851:0:0:0:0:0 with HTTP; Mon, 23 Jul 2018 07:48:06 -0700 (PDT) In-Reply-To: <201807230513.w6N5DM8u049113@slippy.cwsent.com> References: <201807222234.w6MMYKpn030237@repo.freebsd.org> <201807230513.w6N5DM8u049113@slippy.cwsent.com> From: Alan Somers Date: Mon, 23 Jul 2018 08:48:06 -0600 X-Google-Sender-Auth: TB-W8hV5ncaQ4r45APY6R0qC-Yc Message-ID: Subject: Re: svn commit: r336619 - head/lib/libc/gen To: Cy Schubert Cc: Ian Lepore , 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.27 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: Mon, 23 Jul 2018 14:48:09 -0000 On Sun, Jul 22, 2018 at 11:13 PM, Cy Schubert wrote: > In message <201807222234.w6MMYKpn030237@repo.freebsd.org>, Ian Lepore > writes: > > Author: ian > > Date: Sun Jul 22 22:34:20 2018 > > New Revision: 336619 > > URL: https://svnweb.freebsd.org/changeset/base/336619 > > > > Log: > > Set the pw_class field to NULL when scanning the non-master passwd > file. > > This avoids a null pointer deref in pw_dup(), which assumes that all > > pointers are either NULL or valid. > > > > Modified: > > head/lib/libc/gen/pw_scan.c > > > > Hi Ian, > > This causes ssh a bit of gas. > > Are you sure, Cy? Judging by the Jenkins output, I think it was the next revision to pw (336625) that broke everything. https://ci.freebsd.org/job/FreeBSD-head-amd64-test/8320/ . -Alan From owner-svn-src-head@freebsd.org Mon Jul 23 14:53: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 9E2A6104CEF0; Mon, 23 Jul 2018 14:53:47 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) (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 0B0A37F913; Mon, 23 Jul 2018 14:53:47 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf1-x143.google.com with SMTP id y200-v6so681269lfd.7; Mon, 23 Jul 2018 07:53:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=n5lW5fzU5uma2Q8ZAlbsndaN0lCHMqQys/Ftpum17mU=; b=MTYD7BThnlNLF9mWs7PE2GxPyGX7j00uRLGatTajpgDhDUhtI5E32dQtZwwspXU78L iTxDHSUYXdRHx5TBPl3tWqf+jFfj6nLkf2fcRPBB/zbZE3BctHo+z6j1gX0W8LO6BadT Ntg19eMI/0+jdIeQCVWWnImOYVw31mbbpzWLwZxT1WCRpkidu03OMqfacn4uO5lwquom b0Hl4IJHwO/PzlWtmGr9wKk2muyAVjjgDZ0LCHdg7PcoFNt+FzfyEWbpCyl33rSIuJG1 usySpOOOsbQSWuXa2VUBVp71Hq2u8LujRAtCWXSQ32iPmi6mtdKKFcR/3TpVteF0ro1f zstA== 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=n5lW5fzU5uma2Q8ZAlbsndaN0lCHMqQys/Ftpum17mU=; b=GIXgt+ZYbdSzhNkifD5ZOJdRM/ekOPE9DqhP2rT4G+PJ9N72Oml8/fhyLdIDVLp53c WRpHX8dnpuT/UofvYl/DHOY5nS4rLrWzBHYudnDpGzVDvISuAtNLvOGQ91/zDz8Un1oB vE1lhT2KOSBXXR/hPji0hl7B/ql2+896o2zEBdwAoij/tifVAbUn9fvO1VbXWzjarWDL 9VUP/QXxf/cy/+1spHz5o8LM8j38wPylBRYRcoE4cB5/mcdpypMjGlaEjyWFWC48AEqq ViuqK5of52gza50gb0WS7NONzCZhPTik2lS4BflP0Nmbw9xC4foL12Tmp4HUhvjCqRdV 0PmQ== X-Gm-Message-State: AOUpUlFJGLYIfRZgwLDfF8OG66cuLkCQq7KFCVIs8S1FwyJNBKhanDCy X/sXitCZpHej1HTi2QUjJ1Qt7nMamLKlsTCZaY85//6V X-Google-Smtp-Source: AAOMgpfMTBsAOO1aIg/qs2xUrM+NLYbCt6/9AtJPcPAXLQuOG9IUSxIY26mIk2F8U6+Q1AJys1fZdegPjgScHURaz0I= X-Received: by 2002:a19:fc3:: with SMTP id 64-v6mr7897064lfp.46.1532357625355; Mon, 23 Jul 2018 07:53:45 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 2002:ab3:7851:0:0:0:0:0 with HTTP; Mon, 23 Jul 2018 07:53:44 -0700 (PDT) In-Reply-To: <201807222341.w6MNfeDa065288@repo.freebsd.org> References: <201807222341.w6MNfeDa065288@repo.freebsd.org> From: Alan Somers Date: Mon, 23 Jul 2018 08:53:44 -0600 X-Google-Sender-Auth: MSNPGNleRaWuZZcmPyl_Sk4uwb4 Message-ID: Subject: Re: svn commit: r336625 - head/usr.sbin/pw To: Ian Lepore 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.27 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: Mon, 23 Jul 2018 14:53:48 -0000 On Sun, Jul 22, 2018 at 5:41 PM, Ian Lepore wrote: > Author: ian > Date: Sun Jul 22 23:41:40 2018 > New Revision: 336625 > URL: https://svnweb.freebsd.org/changeset/base/336625 > > Log: > Make pw(8) showuser work the same with or without -R for non-root > users. Without -R, pw(8) uses getpwnam(3), which will open master.passwd > for the root user or passwd for non-root users. With -R pw(8) was > always opening /master.passwd, which would fail for a non-root > user, > then falsely claim the userid you're trying to show doesn't exist. > > Now for a non-root user it opens /passwd and zeroes out the 3 > fields > that aren't available in the passwd file, which duplicates the behavior > of > getpwnam(3). The net effect is that the showuser output is identical > whether using -R or not. > > Modified: > head/usr.sbin/pw/pw_vpw.c > It looks like this change has broken approximately all of pw's tests. Please fix or revert it ASAP. https://ci.freebsd.org/job/FreeBSD-head-amd64-test/8320/testReport/ BTW, you can easily run these tests by hand, rather than wait for Jenkins to do it. If you're not familiar with Kyua/atf, you can do it like this: 1) sudo pkg install kyua 2) cd /usr/tests/usr.sbin/pw 3) sudo kyua test 4) sudo kyua report -Alan From owner-svn-src-head@freebsd.org Mon Jul 23 14:58: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 F41B8104D0E1; Mon, 23 Jul 2018 14:58:45 +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 A3FFD7FCAD; Mon, 23 Jul 2018 14:58:45 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6B03E1E04E; Mon, 23 Jul 2018 14:58:45 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6NEwjxd035685; Mon, 23 Jul 2018 14:58:45 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6NEwjgL035684; Mon, 23 Jul 2018 14:58:45 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201807231458.w6NEwjgL035684@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 23 Jul 2018 14:58:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336638 - head/usr.sbin/pw X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/usr.sbin/pw X-SVN-Commit-Revision: 336638 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: Mon, 23 Jul 2018 14:58:46 -0000 Author: ian Date: Mon Jul 23 14:58:44 2018 New Revision: 336638 URL: https://svnweb.freebsd.org/changeset/base/336638 Log: Revert r336625 until I figure out why it worked with simple testing but reportedly fails the kyua tests and causes other real-world problems. Reported by: cy@ asomers@ Modified: head/usr.sbin/pw/pw_vpw.c Modified: head/usr.sbin/pw/pw_vpw.c ============================================================================== --- head/usr.sbin/pw/pw_vpw.c Mon Jul 23 13:36:17 2018 (r336637) +++ head/usr.sbin/pw/pw_vpw.c Mon Jul 23 14:58:44 2018 (r336638) @@ -39,13 +39,10 @@ static const char rcsid[] = #include #include #include -#include #include "pwupd.h" static FILE * pwd_fp = NULL; -static int pwd_scanflag; -static const char *pwd_filename; void vendpwent(void) @@ -74,18 +71,7 @@ vnextpwent(char const *nam, uid_t uid, int doclose) line = NULL; linecap = 0; - if (pwd_fp == NULL) { - if (geteuid() == 0) { - pwd_filename = _MASTERPASSWD; - pwd_scanflag = PWSCAN_MASTER; - } else { - pwd_filename = _PASSWD; - pwd_scanflag = 0; - } - pwd_fp = fopen(getpwpath(pwd_filename), "r"); - } - - if (pwd_fp != NULL) { + if (pwd_fp != NULL || (pwd_fp = fopen(getpwpath(_MASTERPASSWD), "r")) != NULL) { while ((linelen = getline(&line, &linecap, pwd_fp)) > 0) { /* Skip comments and empty lines */ if (*line == '\n' || *line == '#') @@ -93,10 +79,10 @@ vnextpwent(char const *nam, uid_t uid, int doclose) /* trim latest \n */ if (line[linelen - 1 ] == '\n') line[linelen - 1] = '\0'; - pw = pw_scan(line, pwd_scanflag); + pw = pw_scan(line, PWSCAN_MASTER); if (pw == NULL) errx(EXIT_FAILURE, "Invalid user entry in '%s':" - " '%s'", getpwpath(pwd_filename), line); + " '%s'", getpwpath(_MASTERPASSWD), line); if (uid != (uid_t)-1) { if (uid == pw->pw_uid) break; @@ -112,18 +98,6 @@ vnextpwent(char const *nam, uid_t uid, int doclose) vendpwent(); } free(line); - - /* - * If we read the non-master passwd, some fields may not have been - * populated. Clean them up so that the output looks the same as that - * generated using getpwnam() which also inits them to these values. - */ - if (!(pw->pw_fields & _PWF_CLASS)) - pw->pw_class = ""; - if (!(pw->pw_fields & _PWF_CHANGE)) - pw->pw_change = 0; - if (!(pw->pw_fields & _PWF_EXPIRE)) - pw->pw_expire = 0; return (pw); } From owner-svn-src-head@freebsd.org Mon Jul 23 14:59: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 1D4C4104D1C6 for ; Mon, 23 Jul 2018 14:59:59 +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 949727FF5F for ; Mon, 23 Jul 2018 14:59:58 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: 0f4c867f-8e89-11e8-904b-1d2e466b3c59 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 0f4c867f-8e89-11e8-904b-1d2e466b3c59; Mon, 23 Jul 2018 14:59:55 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w6NExtUh013168; Mon, 23 Jul 2018 08:59:55 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1532357995.1344.132.camel@freebsd.org> Subject: Re: svn commit: r336625 - head/usr.sbin/pw From: Ian Lepore To: Alan Somers Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Mon, 23 Jul 2018 08:59:55 -0600 In-Reply-To: References: <201807222341.w6MNfeDa065288@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.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: Mon, 23 Jul 2018 14:59:59 -0000 On Mon, 2018-07-23 at 08:53 -0600, Alan Somers wrote: > On Sun, Jul 22, 2018 at 5:41 PM, Ian Lepore wrote: > > > > > Author: ian > > Date: Sun Jul 22 23:41:40 2018 > > New Revision: 336625 > > URL: https://svnweb.freebsd.org/changeset/base/336625 > > > > Log: > >   Make pw(8) showuser work the same with or without -R for > > non-root > >   users.  Without -R, pw(8) uses getpwnam(3), which will open > > master.passwd > >   for the root user or passwd for non-root users.  With -R > > pw(8) was > >   always opening /master.passwd, which would fail for a non- > > root > > user, > >   then falsely claim the userid you're trying to show doesn't > > exist. > > > >   Now for a non-root user it opens /passwd and zeroes out the > > 3 > > fields > >   that aren't available in the passwd file, which duplicates the > > behavior > > of > >   getpwnam(3).  The net effect is that the showuser output is > > identical > >   whether using -R or not. > > > > Modified: > >   head/usr.sbin/pw/pw_vpw.c > > > It looks like this change has broken approximately all of pw's tests. > Please fix or revert it ASAP. > > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/8320/testReport/ > > BTW, you can easily run these tests by hand, rather than wait for > Jenkins > to do it. If you're not familiar with Kyua/atf, you can do it like > this: > 1) sudo pkg install kyua > 2) cd /usr/tests/usr.sbin/pw > 3) sudo kyua test > 4) sudo kyua report > > -Alan Hrm, it worked with the admittedly simplistic testing I did by hand. I'll look into running the kyua tests and see what's going on; until I get that worked out, it's reverted in r336638. Sorry for the breakage. -- Ian From owner-svn-src-head@freebsd.org Mon Jul 23 14:23: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 CDAE3104C507; Mon, 23 Jul 2018 14:23:53 +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 B50327E3C4; Mon, 23 Jul 2018 14:23:52 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id hbW4f0IUhwyxUhbW5fSWVS; Mon, 23 Jul 2018 08:08:51 -0600 X-Authority-Analysis: v=2.3 cv=NPJhBHyg c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=R9QF1RCXAYgA:10 a=pwxSU7ffAAAA:8 a=6I5d2MoRAAAA:8 a=yzOrrXH3AAAA:8 a=2imQQCwUAAAA:8 a=fQfmUbWOAAAA:8 a=WuFjoxRHAAAA:8 a=YxBL1-UpAAAA:8 a=j7GXJ-y8OB5HAgjSyf8A:9 a=CjuIK1q_8ugA:10 a=vlsaR0gtvmEA:10 a=qiWi7Edwir4A:10 a=IPcZcscSuAkA:10 a=NWVoK91CQyQA:10 a=zOhIhOpZmA3SINFph3zL:22 a=fPZJm5J38vnTTye--D-X:22 a=IjZwj45LgO3ly-622nXo:22 a=wJ07XTJWiQ-_TuXd2b14:22 a=ssJKQMnrLbq1UR0lVSsA:22 a=LWTEZSnhwy1crucKGNEr:22 a=1wAt7nxaChJNlLLYrx5g:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id 073AE7CA; Mon, 23 Jul 2018 07:08:52 -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 w6NE8W0E002393; Mon, 23 Jul 2018 07:08:32 -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 w6NE8T5D002390; Mon, 23 Jul 2018 07:08:31 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201807231408.w6NE8T5D002390@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: Dave Cottlehuber cc: Niclas Zeising , Cy Schubert , Alexey Dokuchaev , "src-committers" , Kyle Evans , svn-src-all@freebsd.org, "Andrey V. Elsukov" , Cy Schubert , svn-src-head@freebsd.org Subject: Re: svn commit: r336203 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers c... In-Reply-To: Message from Dave Cottlehuber of "Mon, 23 Jul 2018 14:55:23 +0200." <1532350523.2338008.1449756200.7870027F@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 23 Jul 2018 07:08:29 -0700 X-CMAE-Envelope: MS4wfHgHxQITwYHRcGsJjrZNBwuI/3pv1kyBdCUeW1sZn1RAaVxMgp5SLG5dX3QBMlO6Ja7vb8MpT6XQiEvromF0khmTRompTxdQfsfELQzNAss2omAh2PqB ttZ5U6fpxGR8rYzJ9WruYpwTH4JK/iQA838y7L/ZpfJ+Jm5VccjzQA0VBiwM6RyGoMR7pwgbHpRyJKXBIDWDYqowCPKZgXW97n+kgCzQIFt+LS4ygisZsR7/ SedKJ7TTFKakibUiouYDwGPQ+svMlUatqbI7mdrzavX3egJ3ccGXMig8bZA1kXtr7ru/TH2C/nmJTJxetc/njM6GXeWSA5ILwJzstH75bt7ZwY6xMQ/+WhPC RRma7HW8gigGJL7tDghQMAs3HV+QlayYMFCcyPnjzNvJ3D7EzoE= X-Mailman-Approved-At: Mon, 23 Jul 2018 15:33:59 +0000 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: Mon, 23 Jul 2018 14:23:54 -0000 In message <1532350523.2338008.1449756200.7870027F@webmail.messagingengi ne.com> , Dave Cottlehuber writes: > On Thu, 19 Jul 2018, at 15:25, Niclas Zeising wrote: > > On 07/19/18 15:20, Cy Schubert wrote: > > > In message <2f0ab2c2-b7cc-3dae-2d65-ea3c4a9515cb@daemonic.se>, Niclas > > > Zeising w > > > rites: > > >> [ sending this again since I missed the list the first time, apologies > > >> if anyone receives a duplicate ] > > >> > > >> On 07/19/18 13:57, Kyle Evans wrote: > > >>> On Thu, Jul 19, 2018 at 4:51 AM, Alexey Dokuchaev w > rote > > >> : > > >>>> On Thu, Jul 19, 2018 at 11:48:03AM +0300, Andrey V. Elsukov wrote: > > >>>>> ... > > >>>>> Yesterday I updated my notebook (with iwm(4)) and also noticed that > > >>>>> wi-fi connection periodically breaks. /etc/rc.d/wpa_supplicant restar > t > > >>>>> wlan0 helps. After your message I reinstalled wpa_supplicant from old > > >>>>> source and now it works stable already about 2 hours. > > Reporting the same thing. At my end it looks like an issue with the AP itself > , > not iwm but maybe more expert eyes see something I don't? I've seen this once > downstairs where the family has an imac on wifi, and it also disconnected at > the same time, and reconnected. I collected all this for the Ubiquiti forums > but maybe it helps here. > > I'm using intel 8265, WPA-PSK, and unifi UAC Pro AP. I've been seeing this > for ~ 5 days, around the time my UAC firmware got bumped to 3.9.27.8537, and > also the last CURRENT update I did. > > Sometimes it's brutal (every 1-2 minutes) and other times it takes a while (h > ours) to occur: > > 2018-07-18T19:03:10.843020+00:00 akai kernel: [9200] wlan0: [80:2a:a8:5a:bd:3 > f] AMRR: current rate 2, txcnt=12, retrycnt=167 > 2018-07-18T19:03:11.684065+00:00 akai kernel: [9200] wlan0: [80:2a:a8:5a:bd:3 > f] AMRR: current rate 2, txcnt=11, retrycnt=94 > 2018-07-18T19:03:11.847485+00:00 akai 1 2018-07-18T19:03:11.847320+00:00 akai > .skunkwerks.at wpa_supplicant 91696 - - wlan0: CTRL-EVENT-DISCONNECTED bssid= > 80:2a:a8:5a:bd:3f reason=1 locally_generated=1 > 2018-07-18T19:03:11.848239+00:00 akai 1 2018-07-18T19:03:11.848123+00:00 akai > .skunkwerks.at devd 17186 - - Processing event '!system=IFNET subsystem=wlan0 > type=LINK_DOWN' > 2018-07-18T19:03:11.848846+00:00 akai 1 2018-07-18T19:03:11.848384+00:00 akai > .skunkwerks.at dhclient 57397 - - wlan0 link state up -> down > 2018-07-18T19:03:11.848899+00:00 akai 1 2018-07-18T19:03:11.848593+00:00 akai > .skunkwerks.at devd 17186 - - Popping table > 2018-07-18T19:03:11.892696+00:00 akai kernel: [9201] wlan0: [80:2a:a8:5a:bd:3 > f] station deauth via MLME (reason: 1 (unspecified)) > 2018-07-18T19:03:11.892720+00:00 akai kernel: [9201] wlan0: ieee80211_swscan_ > cancel_scan: called; F_SCAN=0, vap=match, signal=0 > 2018-07-18T19:03:11.892733+00:00 akai kernel: [9201] wlan0: ieee80211_swscan_ > cancel_scan: called; F_SCAN=0, vap=match, signal=0 > 2018-07-18T19:03:11.892736+00:00 akai kernel: [9201] wlan0: [80:2a:a8:5a:bd:3 > f] send station disassociate (reason: 8 (sending STA is leaving/has left BSS) > ) > 2018-07-18T19:03:11.892740+00:00 akai kernel: [9201] [80:2a:a8:5a:bd:3f] send > disassoc on channel 6 > 2018-07-18T19:03:11.892743+00:00 akai kernel: [9201] wlan0: [00:28:f8:d0:91:5 > 2] amrr_node_init: non-11n node > 2018-07-18T19:03:11.892746+00:00 akai kernel: [9201] wlan0: link state change > d to DOWN > 2018-07-18T19:03:11.892749+00:00 akai kernel: [9201] wlan0: [00:28:f8:d0:91:5 > 2] AMRR: nrates=0, initial rate 0 > 2018-07-18T19:03:12.114718+00:00 akai kernel: [9201] wlan0: ieee80211_scanreq > : flags 0x20052 duration 0x7fffffff mindwell 0 maxdwell 0 nssid 1 > 2018-07-18T19:03:12.114744+00:00 akai kernel: [9201] wlan0: ieee80211_scan_fl > ush > > this time I got both the wlandebug output and also /var/log/messages & pcap f > rom > the AP. I'm not sure how much privileged info is in the AP pcap so its availa > ble > privately on request if needed. > > laptop - looks like a normal exit of the AP to me: > > 2018-07-23T12:20:22.469857+00:00 akai kernel: [1823] wlan0: [80:2a:a8:5a:bd:3 > f] AMRR decreasing rate 11 (txcnt=46 retrycnt=16) > 2018-07-23T12:20:25.396670+00:00 akai kernel: [1825] wlan0: [80:2a:a8:5a:bd:3 > f] AMRR: current rate 11, txcnt=11, retrycnt=105 > 2018-07-23T12:20:25.396700+00:00 akai kernel: [1825] wlan0: [80:2a:a8:5a:bd:3 > f] AMRR decreasing rate 4 (txcnt=11 retrycnt=105) > 2018-07-23T12:20:25.698421+00:00 akai 1 2018-07-23T12:20:25.698238+00:00 akai > .skunkwerks.at wpa_supplicant 22034 - - wlan0: CTRL-EVENT-DISCONNECTED bssid= > 80:2a:a8:5a:bd:3f reason=1 locally_generated=1 > 2018-07-23T12:20:25.699374+00:00 akai 1 2018-07-23T12:20:25.699249+00:00 akai > .skunkwerks.at dhclient 23843 - - wlan0 link state up -> down > 2018-07-23T12:20:25.699465+00:00 akai 1 2018-07-23T12:20:25.699319+00:00 akai > .skunkwerks.at devd 37330 - - Processing event '!system=IFNET subsystem=wlan0 > type=LINK_DOWN' > 2018-07-23T12:20:25.699521+00:00 akai 1 2018-07-23T12:20:25.699377+00:00 akai > .skunkwerks.at devd 37330 - - Pushing table > 2018-07-23T12:20:25.699569+00:00 akai 1 2018-07-23T12:20:25.699447+00:00 akai > .skunkwerks.at devd 37330 - - Processing notify event > 2018-07-23T12:20:25.699778+00:00 akai 1 2018-07-23T12:20:25.699701+00:00 akai > .skunkwerks.at devd 37330 - - Popping table > 2018-07-23T12:20:25.864867+00:00 akai kernel: [1826] wlan0: [80:2a:a8:5a:bd:3 > f] station deauth via MLME (reason: 1 (unspecified)) > 2018-07-23T12:20:25.864893+00:00 akai kernel: [1826] wlan0: ieee80211_swscan_ > cancel_scan: called; F_SCAN=0, vap=match, signal=0 > 2018-07-23T12:20:25.864896+00:00 akai kernel: [1826] wlan0: ieee80211_swscan_ > cancel_scan: called; F_SCAN=0, vap=match, signal=0 > 2018-07-23T12:20:25.864898+00:00 akai kernel: [1826] wlan0: [80:2a:a8:5a:bd:3 > f] send station disassociate (reason: 8 (sending STA is leaving/has left BSS) > ) > 2018-07-23T12:20:25.864903+00:00 akai kernel: [1826] [80:2a:a8:5a:bd:3f] send > disassoc on channel 1 > 2018-07-23T12:20:25.864926+00:00 akai kernel: [1826] wlan0: [00:28:f8:d0:91:5 > 2] amrr_node_init: non-11n node > 2018-07-23T12:20:25.864929+00:00 akai kernel: [1826] wlan0: link state change > d to DOWN > 2018-07-23T12:20:25.864936+00:00 akai kernel: [1826] wlan0: [00:28:f8:d0:91:5 > 2] AMRR: nrates=0, initial rate 0 > 2018-07-23T12:20:25.864943+00:00 akai kernel: [1826] wlan0: ieee80211_scanreq > : flags 0x20052 duration 0x7fffffff mindwell 0 maxdwell 0 nssid 1 > 2018-07-23T12:20:26.084679+00:00 akai kernel: [1826] wlan0: ieee80211_scan_fl > ush > > AP logs - looking very much like a large chunk of the AP stack restarted but > not the AP itself: > > Jul 23 12:24:36 ap2terrace user.info syslog: ubnt_protocol.ubnt_usr1_handler( > ): Get DHCP IP > Jul 23 12:24:36 ap2terrace user.info syslog: ubnt_protocol.ubnt_usr1_handler( > ): my_ip is 172.16.2.10 > Jul 23 12:24:36 ap2terrace user.err syslog: ubnt_protocol.ubnt_multicast_sock > et_init(): already drop membership > Jul 23 12:24:36 ap2terrace user.notice syswrapper: hostapd update: conf=/etc/ > aaa2.cfg iterface=ath1 nas_ip=172.16.2.10 res=OK > Jul 23 12:24:36 ap2terrace user.notice syswrapper: hostapd update: conf=/etc/ > aaa1.cfg iterface=ath0 nas_ip=172.16.2.10 res=OK > Jul 23 12:24:37 ap2terrace daemon.info init: process '/bin/dropbear -F -d /va > r/run/dropbear_dss_host_key -r /var/run/dropbear_rsa_host_key -p br0:22' (pid > 918) exited. Sc > Jul 23 12:24:37 ap2terrace daemon.info init: starting pid 1029, tty '/dev/nul > l': '/bin/dropbear -F -d /var/run/dropbear_dss_host_key -r /var/run/dropbear_ > rsa_host_key -p > Jul 23 12:24:37 ap2terrace authpriv.info dropbear[1029]: Not backgrounding > Jul 23 12:25:06 ap2terrace user.err syslog: ace_reporter.reporter_fail(): Unk > nown[11] (http://172.16.1.14:8080/inform) > Jul 23 12:25:06 ap2terrace user.err syslog: ace_reporter.reporter_fail(): ini > tial contact failed #1, url=http://172.16.1.14:8080/inform, rc=11 > Jul 23 12:25:08 ap2terrace daemon.info hostapd: ath1: STA 80:2a:a8:5b:bd:3f D > RIVER: Sead AUTH addr=80:ed:2c:45:8e:f7 status_code=0 > Jul 23 12:25:08 ap2terrace kern.warn kernel: [ 52.510000] wmi_unified_event > _rx : no registered event handler : event id 0x901b > Jul 23 12:25:08 ap2terrace daemon.info hostapd: ath1: STA 80:ed:2c:45:8e:f7 I > EEE 802.11: associated > Jul 23 12:25:08 ap2terrace user.info syslog: wevent.ubnt_custom_event(): EVEN > T_STA_JOIN ath1: 80:ed:2c:45:8e:f7 / 1 > Jul 23 12:25:08 ap2terrace daemon.info hostapd: ath1: STA 80:ed:2c:45:8e:f7 W > PA: pairwise key handshake completed (RSN) > Jul 23 12:25:08 ap2terrace user.info syslog: wevent.ubnt_custom_event(): EVEN > T_STA_IP ath1: 80:ed:2c:45:8e:f7 / 172.16.2.14 > Jul 23 12:25:09 ap2terrace kern.warn kernel: [ 53.000000] [wifi1] FWLOG: [7 > 3760] RATE: ChainMask 3, phymode 1044489, ni_flags 0x02233006, vht_mcs_set 0x > fffa, ht_mcs_set 0xffff, legacy_rate_set 0x12027 > Jul 23 12:25:09 ap2terrace kern.warn kernel: [ 53.000000] [wifi1] FWLOG: [7 > 3767] WAL_DBGID_SECURITY_ALLOW_DATA ( 0x435110 ) > Jul 23 12:25:09 ap2terrace kern.warn kernel: [ 53.000000] [wifi1] FWLOG: [7 > 3792] RATE: ChainMask 3, phymode 1044490, ni_flags 0x02233006, vht_mcs_set 0x > fffa, ht_mcs_set 0xffff, legacy_rate_set 0x0401 > Jul 23 12:25:18 ap2terrace daemon.info hostapd: ath1: STA 80:ed:2c:45:8e:f7 R > ADIUS: starting accounting session 5AAD0B98-00000000 > Jul 23 12:25:20 ap2terrace daemon.info hostapd: ath0: STA 80:2a:a8:5a:bd:3f D > RIVER: Sead AUTH addr=00:28:f8:d0:91:52 status_code=0 > Jul 23 12:25:20 ap2terrace user.info syslog: wevent.ubnt_custom_event(): EVEN > T_STA_JOIN ath0: 00:28:f8:d0:91:52 / 1 > Jul 23 12:25:20 ap2terrace daemon.info hostapd: ath0: STA 00:28:f8:d0:91:52 I > EEE 802.11: associated > Jul 23 12:25:20 ap2terrace daemon.info hostapd: ath0: STA 00:28:f8:d0:91:52 W > PA: pairwise key handshake completed (RSN) > Jul 23 12:25:20 ap2terrace user.info syslog: wevent.ubnt_custom_event(): EVEN > T_STA_IP ath0: 00:28:f8:d0:91:52 / 172.16.2.92 > Jul 23 12:25:30 ap2terrace daemon.info hostapd: ath0: STA 00:28:f8:d0:91:52 R > ADIUS: starting accounting session 5AAD0B98-00000000 > > I'll roll back my boot environment and let you know if it behaves differently > . > > A+ > Dave Are you at least at r336531? -- 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 Mon Jul 23 15: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 6B634104E063; Mon, 23 Jul 2018 15:36:58 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1E4DD81929; Mon, 23 Jul 2018 15:36:58 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EF5221E6B5; Mon, 23 Jul 2018 15:36:57 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6NFavIq056759; Mon, 23 Jul 2018 15:36:57 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6NFat7s056748; Mon, 23 Jul 2018 15:36:55 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201807231536.w6NFat7s056748@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 23 Jul 2018 15:36:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336639 - in head/sys: arm/arm arm/mv mips/atheros mips/atheros/ar531x mips/malta mips/mediatek mips/mips sparc64/sparc64 X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: in head/sys: arm/arm arm/mv mips/atheros mips/atheros/ar531x mips/malta mips/mediatek mips/mips sparc64/sparc64 X-SVN-Commit-Revision: 336639 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: Mon, 23 Jul 2018 15:36:58 -0000 Author: avg Date: Mon Jul 23 15:36:55 2018 New Revision: 336639 URL: https://svnweb.freebsd.org/changeset/base/336639 Log: follow-up to r336635, update TAILQ to CK_SLIST for ie_handlers arm, mips and sparc64 were affected. Modified: head/sys/arm/arm/intr.c head/sys/arm/mv/gpio.c head/sys/mips/atheros/apb.c head/sys/mips/atheros/ar531x/apb.c head/sys/mips/atheros/ar71xx_pci.c head/sys/mips/atheros/ar724x_pci.c head/sys/mips/atheros/qca955x_pci.c head/sys/mips/malta/gt_pci.c head/sys/mips/mediatek/mtk_pcie.c head/sys/mips/mips/intr_machdep.c head/sys/sparc64/sparc64/intr_machdep.c Modified: head/sys/arm/arm/intr.c ============================================================================== --- head/sys/arm/arm/intr.c Mon Jul 23 14:58:44 2018 (r336638) +++ head/sys/arm/arm/intr.c Mon Jul 23 15:36:55 2018 (r336639) @@ -170,7 +170,7 @@ arm_remove_irqhandler(int irq, void *cookie) error = intr_event_remove_handler(cookie); - if (!TAILQ_EMPTY(&event->ie_handlers)) + if (!CK_SLIST_EMPTY(&event->ie_handlers)) arm_unmask_irq(irq); return (error); } Modified: head/sys/arm/mv/gpio.c ============================================================================== --- head/sys/arm/mv/gpio.c Mon Jul 23 14:58:44 2018 (r336638) +++ head/sys/arm/mv/gpio.c Mon Jul 23 15:36:55 2018 (r336639) @@ -515,7 +515,8 @@ mv_gpio_intr_handler(device_t dev, int pin) #endif isrc.isrc_event = sc->gpio_events[pin]; - if (isrc.isrc_event == NULL || TAILQ_EMPTY(&isrc.isrc_event->ie_handlers)) + if (isrc.isrc_event == NULL || + CK_SLIST_EMPTY(&isrc.isrc_event->ie_handlers)) return; intr_isrc_dispatch(&isrc, NULL); Modified: head/sys/mips/atheros/apb.c ============================================================================== --- head/sys/mips/atheros/apb.c Mon Jul 23 14:58:44 2018 (r336638) +++ head/sys/mips/atheros/apb.c Mon Jul 23 15:36:55 2018 (r336639) @@ -382,7 +382,7 @@ apb_filter(void *arg) event = sc->sc_eventstab[irq]; /* always count interrupts; spurious or otherwise */ mips_intrcnt_inc(sc->sc_intr_counter[irq]); - if (!event || TAILQ_EMPTY(&event->ie_handlers)) { + if (!event || CK_SLIST_EMPTY(&event->ie_handlers)) { if (irq == APB_INTR_PMC) { td = PCPU_GET(curthread); tf = td->td_intr_frame; Modified: head/sys/mips/atheros/ar531x/apb.c ============================================================================== --- head/sys/mips/atheros/ar531x/apb.c Mon Jul 23 14:58:44 2018 (r336638) +++ head/sys/mips/atheros/ar531x/apb.c Mon Jul 23 15:36:55 2018 (r336639) @@ -508,7 +508,7 @@ apb_filter(void *arg) } event = sc->sc_eventstab[irq]; - if (!event || TAILQ_EMPTY(&event->ie_handlers)) { + if (!event || CK_SLIST_EMPTY(&event->ie_handlers)) { if(irq == 1 && ar531x_soc < AR531X_SOC_AR5315) { ATH_READ_REG(AR5312_SYSREG_BASE + AR5312_SYSREG_AHBPERR); Modified: head/sys/mips/atheros/ar71xx_pci.c ============================================================================== --- head/sys/mips/atheros/ar71xx_pci.c Mon Jul 23 14:58:44 2018 (r336638) +++ head/sys/mips/atheros/ar71xx_pci.c Mon Jul 23 15:36:55 2018 (r336639) @@ -630,7 +630,7 @@ ar71xx_pci_intr(void *arg) for (irq = AR71XX_PCI_IRQ_START; irq <= AR71XX_PCI_IRQ_END; irq++) { if (reg & (1 << irq)) { event = sc->sc_eventstab[irq]; - if (!event || TAILQ_EMPTY(&event->ie_handlers)) { + if (!event || CK_SLIST_EMPTY(&event->ie_handlers)) { /* Ignore timer interrupts */ if (irq != 0) printf("Stray IRQ %d\n", irq); Modified: head/sys/mips/atheros/ar724x_pci.c ============================================================================== --- head/sys/mips/atheros/ar724x_pci.c Mon Jul 23 14:58:44 2018 (r336638) +++ head/sys/mips/atheros/ar724x_pci.c Mon Jul 23 15:36:55 2018 (r336639) @@ -605,7 +605,7 @@ ar724x_pci_intr(void *arg) irq = AR71XX_PCI_IRQ_START; event = sc->sc_eventstab[irq]; - if (!event || TAILQ_EMPTY(&event->ie_handlers)) { + if (!event || CK_SLIST_EMPTY(&event->ie_handlers)) { printf("Stray IRQ %d\n", irq); return (FILTER_STRAY); } Modified: head/sys/mips/atheros/qca955x_pci.c ============================================================================== --- head/sys/mips/atheros/qca955x_pci.c Mon Jul 23 14:58:44 2018 (r336638) +++ head/sys/mips/atheros/qca955x_pci.c Mon Jul 23 15:36:55 2018 (r336639) @@ -539,7 +539,7 @@ qca955x_pci_intr(void *arg) if (reg & QCA955X_PCI_INTR_DEV0) { irq = AR71XX_PCI_IRQ_START; event = sc->sc_eventstab[irq]; - if (!event || TAILQ_EMPTY(&event->ie_handlers)) { + if (!event || CK_SLIST_EMPTY(&event->ie_handlers)) { printf("Stray IRQ %d\n", irq); return (FILTER_STRAY); } Modified: head/sys/mips/malta/gt_pci.c ============================================================================== --- head/sys/mips/malta/gt_pci.c Mon Jul 23 14:58:44 2018 (r336638) +++ head/sys/mips/malta/gt_pci.c Mon Jul 23 15:36:55 2018 (r336639) @@ -231,7 +231,7 @@ gt_pci_intr(void *v) event = sc->sc_eventstab[irq]; - if (!event || TAILQ_EMPTY(&event->ie_handlers)) + if (!event || CK_SLIST_EMPTY(&event->ie_handlers)) continue; /* TODO: frame instead of NULL? */ Modified: head/sys/mips/mediatek/mtk_pcie.c ============================================================================== --- head/sys/mips/mediatek/mtk_pcie.c Mon Jul 23 14:58:44 2018 (r336638) +++ head/sys/mips/mediatek/mtk_pcie.c Mon Jul 23 15:36:55 2018 (r336639) @@ -762,7 +762,7 @@ mtk_pci_intr(void *arg) if (reg & (1u<sc_irq_start; event = sc->sc_eventstab[irqidx]; - if (!event || TAILQ_EMPTY(&event->ie_handlers)) { + if (!event || CK_SLIST_EMPTY(&event->ie_handlers)) { if (irq != 0) printf("Stray PCI IRQ %d\n", irq); continue; Modified: head/sys/mips/mips/intr_machdep.c ============================================================================== --- head/sys/mips/mips/intr_machdep.c Mon Jul 23 14:58:44 2018 (r336638) +++ head/sys/mips/mips/intr_machdep.c Mon Jul 23 15:36:55 2018 (r336639) @@ -257,7 +257,7 @@ cpu_intr(struct trapframe *tf) break; } - if (!event || TAILQ_EMPTY(&event->ie_handlers)) { + if (!event || CK_SLIST_EMPTY(&event->ie_handlers)) { printf("stray %s interrupt %d\n", hard ? "hard" : "soft", i); continue; Modified: head/sys/sparc64/sparc64/intr_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/intr_machdep.c Mon Jul 23 14:58:44 2018 (r336638) +++ head/sys/sparc64/sparc64/intr_machdep.c Mon Jul 23 15:36:55 2018 (r336639) @@ -375,7 +375,7 @@ inthand_add(const char *name, int vec, driver_filter_t * pretty rare in practice. */ filter = 0; - TAILQ_FOREACH(ih, &ie->ie_handlers, ih_next) { + CK_SLIST_FOREACH(ih, &ie->ie_handlers, ih_next) { if (ih->ih_filter != NULL && ih->ih_filter != filt) { filter = 1; break; From owner-svn-src-head@freebsd.org Mon Jul 23 14:28: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 82379104C5C9; Mon, 23 Jul 2018 14:28:41 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (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 826B87E60A; Mon, 23 Jul 2018 14:28:40 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id hbahffVTxWppDhbajf2m2Y; Mon, 23 Jul 2018 08:13:39 -0600 X-Authority-Analysis: v=2.3 cv=YIcrNiOx c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=kj9zAlcOel0A:10 a=R9QF1RCXAYgA:10 a=xfDLHkLGAAAA:8 a=6I5d2MoRAAAA:8 a=yzOrrXH3AAAA:8 a=2imQQCwUAAAA:8 a=fQfmUbWOAAAA:8 a=WuFjoxRHAAAA:8 a=YxBL1-UpAAAA:8 a=dmLp1XT3UCqn0VqZsX8A:9 a=CjuIK1q_8ugA:10 a=vlsaR0gtvmEA:10 a=qiWi7Edwir4A:10 a=IPcZcscSuAkA:10 a=NWVoK91CQyQA:10 a=zOhIhOpZmA3SINFph3zL:22 a=IfaqVvZgccqrtc8gcwf2:22 a=IjZwj45LgO3ly-622nXo:22 a=wJ07XTJWiQ-_TuXd2b14:22 a=ssJKQMnrLbq1UR0lVSsA:22 a=LWTEZSnhwy1crucKGNEr:22 a=1wAt7nxaChJNlLLYrx5g:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id 0C8B47DD; Mon, 23 Jul 2018 07:13:41 -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 w6NEDKjc002869; Mon, 23 Jul 2018 07:13: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 w6NEDK6b002866; Mon, 23 Jul 2018 07:13:20 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201807231413.w6NEDK6b002866@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: Kyle Evans cc: Dave Cottlehuber , Niclas Zeising , Cy Schubert , Alexey Dokuchaev , src-committers , svn-src-all@freebsd.org, "Andrey V. Elsukov" , Cy Schubert , svn-src-head@freebsd.org Subject: Re: svn commit: r336203 - in head: contrib/wpa contrib/wpa/hostapd contrib/wpa/hs20/client contrib/wpa/patches contrib/wpa/src/ap contrib/wpa/src/common contrib/wpa/src/crypto contrib/wpa/src/drivers c... In-Reply-To: Message from Kyle Evans of "Mon, 23 Jul 2018 08:02:41 -0500." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 23 Jul 2018 07:13:20 -0700 X-CMAE-Envelope: MS4wfBaHl2lwNqe4Ju0+4z0G9SVb7MXlC0JcNxFrLoDMwRfrizOzQ8Hnseij4qan9/hyAcBkt5TO17LGCPmrwKkwDH6v2Vx8flxer0zUriKeuyfcw5UT5ImG HAKi+FrDEAtcJWOmuvsvIGpdgbf7QxW9bEgbL7MHAYtO6fOcpI6loVpYym7GhFcht6ailPMP0b31DOLUPjeJTbdwEtslPqajbKRRc5SpqSqGtwOPouFmwl2R SMroCaZH2lBPYlj86wDJpd10Py64Bjx6YTZWScbciuaGypjp4GZYDLJm9+pi78jjVmPcwaKI5VbOY5Shic6qF5N8gXVxtW07qna94zbAWGsR+7NDwauLIGPa XKPL2ougG/MUYzRftJtvdKj5lkZLIBMkclybG8ohVM9XIry42Nc= X-Mailman-Approved-At: Mon, 23 Jul 2018 15:46:28 +0000 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: Mon, 23 Jul 2018 14:28:41 -0000 In message , Kyle Evans writes: > On Mon, Jul 23, 2018 at 7:55 AM, Dave Cottlehuber wrote: > > On Thu, 19 Jul 2018, at 15:25, Niclas Zeising wrote: > >> On 07/19/18 15:20, Cy Schubert wrote: > >> > In message <2f0ab2c2-b7cc-3dae-2d65-ea3c4a9515cb@daemonic.se>, Niclas > >> > Zeising w > >> > rites: > >> >> [ sending this again since I missed the list the first time, apologies > >> >> if anyone receives a duplicate ] > >> >> > >> >> On 07/19/18 13:57, Kyle Evans wrote: > >> >>> On Thu, Jul 19, 2018 at 4:51 AM, Alexey Dokuchaev > wrote > >> >> : > >> >>>> On Thu, Jul 19, 2018 at 11:48:03AM +0300, Andrey V. Elsukov wrote: > >> >>>>> ... > >> >>>>> Yesterday I updated my notebook (with iwm(4)) and also noticed that > >> >>>>> wi-fi connection periodically breaks. /etc/rc.d/wpa_supplicant resta > rt > >> >>>>> wlan0 helps. After your message I reinstalled wpa_supplicant from ol > d > >> >>>>> source and now it works stable already about 2 hours. > > > > Reporting the same thing. At my end it looks like an issue with the AP itse > lf, > > not iwm but maybe more expert eyes see something I don't? I've seen this on > ce > > downstairs where the family has an imac on wifi, and it also disconnected a > t > > the same time, and reconnected. I collected all this for the Ubiquiti forum > s > > but maybe it helps here. > > > > I'm using intel 8265, WPA-PSK, and unifi UAC Pro AP. I've been seeing this > > for ~ 5 days, around the time my UAC firmware got bumped to 3.9.27.8537, an > d > > also the last CURRENT update I did. > > > > Sometimes it's brutal (every 1-2 minutes) and other times it takes a while > (hours) to occur: > > > > 2018-07-18T19:03:10.843020+00:00 akai kernel: [9200] wlan0: [80:2a:a8:5a:bd > :3f] AMRR: current rate 2, txcnt=12, retrycnt=167 > > 2018-07-18T19:03:11.684065+00:00 akai kernel: [9200] wlan0: [80:2a:a8:5a:bd > :3f] AMRR: current rate 2, txcnt=11, retrycnt=94 > > 2018-07-18T19:03:11.847485+00:00 akai 1 2018-07-18T19:03:11.847320+00:00 ak > ai.skunkwerks.at wpa_supplicant 91696 - - wlan0: CTRL-EVENT-DISCONNECTED bssi > d=80:2a:a8:5a:bd:3f reason=1 locally_generated=1 > > 2018-07-18T19:03:11.848239+00:00 akai 1 2018-07-18T19:03:11.848123+00:00 ak > ai.skunkwerks.at devd 17186 - - Processing event '!system=IFNET subsystem=wla > n0 type=LINK_DOWN' > > 2018-07-18T19:03:11.848846+00:00 akai 1 2018-07-18T19:03:11.848384+00:00 ak > ai.skunkwerks.at dhclient 57397 - - wlan0 link state up -> down > > 2018-07-18T19:03:11.848899+00:00 akai 1 2018-07-18T19:03:11.848593+00:00 ak > ai.skunkwerks.at devd 17186 - - Popping table > > 2018-07-18T19:03:11.892696+00:00 akai kernel: [9201] wlan0: [80:2a:a8:5a:bd > :3f] station deauth via MLME (reason: 1 (unspecified)) > > 2018-07-18T19:03:11.892720+00:00 akai kernel: [9201] wlan0: ieee80211_swsca > n_cancel_scan: called; F_SCAN=0, vap=match, signal=0 > > 2018-07-18T19:03:11.892733+00:00 akai kernel: [9201] wlan0: ieee80211_swsca > n_cancel_scan: called; F_SCAN=0, vap=match, signal=0 > > 2018-07-18T19:03:11.892736+00:00 akai kernel: [9201] wlan0: [80:2a:a8:5a:bd > :3f] send station disassociate (reason: 8 (sending STA is leaving/has left BS > S)) > > 2018-07-18T19:03:11.892740+00:00 akai kernel: [9201] [80:2a:a8:5a:bd:3f] se > nd disassoc on channel 6 > > 2018-07-18T19:03:11.892743+00:00 akai kernel: [9201] wlan0: [00:28:f8:d0:91 > :52] amrr_node_init: non-11n node > > 2018-07-18T19:03:11.892746+00:00 akai kernel: [9201] wlan0: link state chan > ged to DOWN > > 2018-07-18T19:03:11.892749+00:00 akai kernel: [9201] wlan0: [00:28:f8:d0:91 > :52] AMRR: nrates=0, initial rate 0 > > 2018-07-18T19:03:12.114718+00:00 akai kernel: [9201] wlan0: ieee80211_scanr > eq: flags 0x20052 duration 0x7fffffff mindwell 0 maxdwell 0 nssid 1 > > 2018-07-18T19:03:12.114744+00:00 akai kernel: [9201] wlan0: ieee80211_scan_ > flush > > > > this time I got both the wlandebug output and also /var/log/messages & pcap > from > > the AP. I'm not sure how much privileged info is in the AP pcap so its avai > lable > > privately on request if needed. > > > > laptop - looks like a normal exit of the AP to me: > > > > 2018-07-23T12:20:22.469857+00:00 akai kernel: [1823] wlan0: [80:2a:a8:5a:bd > :3f] AMRR decreasing rate 11 (txcnt=46 retrycnt=16) > > 2018-07-23T12:20:25.396670+00:00 akai kernel: [1825] wlan0: [80:2a:a8:5a:bd > :3f] AMRR: current rate 11, txcnt=11, retrycnt=105 > > 2018-07-23T12:20:25.396700+00:00 akai kernel: [1825] wlan0: [80:2a:a8:5a:bd > :3f] AMRR decreasing rate 4 (txcnt=11 retrycnt=105) > > 2018-07-23T12:20:25.698421+00:00 akai 1 2018-07-23T12:20:25.698238+00:00 ak > ai.skunkwerks.at wpa_supplicant 22034 - - wlan0: CTRL-EVENT-DISCONNECTED bssi > d=80:2a:a8:5a:bd:3f reason=1 locally_generated=1 > > 2018-07-23T12:20:25.699374+00:00 akai 1 2018-07-23T12:20:25.699249+00:00 ak > ai.skunkwerks.at dhclient 23843 - - wlan0 link state up -> down > > 2018-07-23T12:20:25.699465+00:00 akai 1 2018-07-23T12:20:25.699319+00:00 ak > ai.skunkwerks.at devd 37330 - - Processing event '!system=IFNET subsystem=wla > n0 type=LINK_DOWN' > > 2018-07-23T12:20:25.699521+00:00 akai 1 2018-07-23T12:20:25.699377+00:00 ak > ai.skunkwerks.at devd 37330 - - Pushing table > > 2018-07-23T12:20:25.699569+00:00 akai 1 2018-07-23T12:20:25.699447+00:00 ak > ai.skunkwerks.at devd 37330 - - Processing notify event > > 2018-07-23T12:20:25.699778+00:00 akai 1 2018-07-23T12:20:25.699701+00:00 ak > ai.skunkwerks.at devd 37330 - - Popping table > > 2018-07-23T12:20:25.864867+00:00 akai kernel: [1826] wlan0: [80:2a:a8:5a:bd > :3f] station deauth via MLME (reason: 1 (unspecified)) > > 2018-07-23T12:20:25.864893+00:00 akai kernel: [1826] wlan0: ieee80211_swsca > n_cancel_scan: called; F_SCAN=0, vap=match, signal=0 > > 2018-07-23T12:20:25.864896+00:00 akai kernel: [1826] wlan0: ieee80211_swsca > n_cancel_scan: called; F_SCAN=0, vap=match, signal=0 > > 2018-07-23T12:20:25.864898+00:00 akai kernel: [1826] wlan0: [80:2a:a8:5a:bd > :3f] send station disassociate (reason: 8 (sending STA is leaving/has left BS > S)) > > 2018-07-23T12:20:25.864903+00:00 akai kernel: [1826] [80:2a:a8:5a:bd:3f] se > nd disassoc on channel 1 > > 2018-07-23T12:20:25.864926+00:00 akai kernel: [1826] wlan0: [00:28:f8:d0:91 > :52] amrr_node_init: non-11n node > > 2018-07-23T12:20:25.864929+00:00 akai kernel: [1826] wlan0: link state chan > ged to DOWN > > 2018-07-23T12:20:25.864936+00:00 akai kernel: [1826] wlan0: [00:28:f8:d0:91 > :52] AMRR: nrates=0, initial rate 0 > > 2018-07-23T12:20:25.864943+00:00 akai kernel: [1826] wlan0: ieee80211_scanr > eq: flags 0x20052 duration 0x7fffffff mindwell 0 maxdwell 0 nssid 1 > > 2018-07-23T12:20:26.084679+00:00 akai kernel: [1826] wlan0: ieee80211_scan_ > flush > > > > AP logs - looking very much like a large chunk of the AP stack restarted bu > t not the AP itself: > > > > Jul 23 12:24:36 ap2terrace user.info syslog: ubnt_protocol.ubnt_usr1_handle > r(): Get DHCP IP > > Jul 23 12:24:36 ap2terrace user.info syslog: ubnt_protocol.ubnt_usr1_handle > r(): my_ip is 172.16.2.10 > > Jul 23 12:24:36 ap2terrace user.err syslog: ubnt_protocol.ubnt_multicast_so > cket_init(): already drop membership > > Jul 23 12:24:36 ap2terrace user.notice syswrapper: hostapd update: conf=/et > c/aaa2.cfg iterface=ath1 nas_ip=172.16.2.10 res=OK > > Jul 23 12:24:36 ap2terrace user.notice syswrapper: hostapd update: conf=/et > c/aaa1.cfg iterface=ath0 nas_ip=172.16.2.10 res=OK > > Jul 23 12:24:37 ap2terrace daemon.info init: process '/bin/dropbear -F -d / > var/run/dropbear_dss_host_key -r /var/run/dropbear_rsa_host_key -p br0:22' (p > id 918) exited. Sc > > Jul 23 12:24:37 ap2terrace daemon.info init: starting pid 1029, tty '/dev/n > ull': '/bin/dropbear -F -d /var/run/dropbear_dss_host_key -r /var/run/dropbea > r_rsa_host_key -p > > Jul 23 12:24:37 ap2terrace authpriv.info dropbear[1029]: Not backgrounding > > Jul 23 12:25:06 ap2terrace user.err syslog: ace_reporter.reporter_fail(): U > nknown[11] (http://172.16.1.14:8080/inform) > > Jul 23 12:25:06 ap2terrace user.err syslog: ace_reporter.reporter_fail(): i > nitial contact failed #1, url=http://172.16.1.14:8080/inform, rc=11 > > Jul 23 12:25:08 ap2terrace daemon.info hostapd: ath1: STA 80:2a:a8:5b:bd:3f > DRIVER: Sead AUTH addr=80:ed:2c:45:8e:f7 status_code=0 > > Jul 23 12:25:08 ap2terrace kern.warn kernel: [ 52.510000] wmi_unified_eve > nt_rx : no registered event handler : event id 0x901b > > Jul 23 12:25:08 ap2terrace daemon.info hostapd: ath1: STA 80:ed:2c:45:8e:f7 > IEEE 802.11: associated > > Jul 23 12:25:08 ap2terrace user.info syslog: wevent.ubnt_custom_event(): EV > ENT_STA_JOIN ath1: 80:ed:2c:45:8e:f7 / 1 > > Jul 23 12:25:08 ap2terrace daemon.info hostapd: ath1: STA 80:ed:2c:45:8e:f7 > WPA: pairwise key handshake completed (RSN) > > Jul 23 12:25:08 ap2terrace user.info syslog: wevent.ubnt_custom_event(): EV > ENT_STA_IP ath1: 80:ed:2c:45:8e:f7 / 172.16.2.14 > > Jul 23 12:25:09 ap2terrace kern.warn kernel: [ 53.000000] [wifi1] FWLOG: > [73760] RATE: ChainMask 3, phymode 1044489, ni_flags 0x02233006, vht_mcs_set > 0xfffa, ht_mcs_set 0xffff, legacy_rate_set 0x12027 > > Jul 23 12:25:09 ap2terrace kern.warn kernel: [ 53.000000] [wifi1] FWLOG: > [73767] WAL_DBGID_SECURITY_ALLOW_DATA ( 0x435110 ) > > Jul 23 12:25:09 ap2terrace kern.warn kernel: [ 53.000000] [wifi1] FWLOG: > [73792] RATE: ChainMask 3, phymode 1044490, ni_flags 0x02233006, vht_mcs_set > 0xfffa, ht_mcs_set 0xffff, legacy_rate_set 0x0401 > > Jul 23 12:25:18 ap2terrace daemon.info hostapd: ath1: STA 80:ed:2c:45:8e:f7 > RADIUS: starting accounting session 5AAD0B98-00000000 > > Jul 23 12:25:20 ap2terrace daemon.info hostapd: ath0: STA 80:2a:a8:5a:bd:3f > DRIVER: Sead AUTH addr=00:28:f8:d0:91:52 status_code=0 > > Jul 23 12:25:20 ap2terrace user.info syslog: wevent.ubnt_custom_event(): EV > ENT_STA_JOIN ath0: 00:28:f8:d0:91:52 / 1 > > Jul 23 12:25:20 ap2terrace daemon.info hostapd: ath0: STA 00:28:f8:d0:91:52 > IEEE 802.11: associated > > Jul 23 12:25:20 ap2terrace daemon.info hostapd: ath0: STA 00:28:f8:d0:91:52 > WPA: pairwise key handshake completed (RSN) > > Jul 23 12:25:20 ap2terrace user.info syslog: wevent.ubnt_custom_event(): EV > ENT_STA_IP ath0: 00:28:f8:d0:91:52 / 172.16.2.92 > > Jul 23 12:25:30 ap2terrace daemon.info hostapd: ath0: STA 00:28:f8:d0:91:52 > RADIUS: starting accounting session 5AAD0B98-00000000 > > > > I'll roll back my boot environment and let you know if it behaves different > ly. > > > > Hi, > > Please also try updating wpa_supplicant from a revision >= r336529 -- > some other stuff has been straightened out since. In addition 2.6 addressed a long standing issue I had with 2.5 at a popular wifi spot just down the hall from $JOB which disconnected me every 30 minutes when my DHCP lease expired. -- 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 Mon Jul 23 16:11: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 6FB02104F310; Mon, 23 Jul 2018 16:11:04 +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 203C68328B; Mon, 23 Jul 2018 16:11:04 +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 02C091EBC0; Mon, 23 Jul 2018 16:11:04 +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 w6NGB3ZL074169; Mon, 23 Jul 2018 16:11:03 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6NGB3gh074167; Mon, 23 Jul 2018 16:11:03 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201807231611.w6NGB3gh074167@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Mon, 23 Jul 2018 16:11:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336640 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 336640 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: Mon, 23 Jul 2018 16:11:04 -0000 Author: brd Date: Mon Jul 23 16:11:03 2018 New Revision: 336640 URL: https://svnweb.freebsd.org/changeset/base/336640 Log: Add the initial DIRS infrastructure for creating directories with the necessary owner, group, mode and flags. Approved by: bapt (mentor) Differential Revision: https://reviews.freebsd.org/D16405 Added: head/share/mk/bsd.dirs.mk (contents, props changed) Modified: head/share/mk/bsd.README Modified: head/share/mk/bsd.README ============================================================================== --- head/share/mk/bsd.README Mon Jul 23 15:36:55 2018 (r336639) +++ head/share/mk/bsd.README Mon Jul 23 16:11:03 2018 (r336640) @@ -22,6 +22,7 @@ bsd.confs.mk - install of configuration files bsd.cpu.mk - sets CPU/arch-related variables (included from sys.mk) bsd.crunchgen.mk - building crunched binaries using crunchgen(1) bsd.dep.mk - handle Makefile dependencies +bsd.dirs.mk - handle directory creation bsd.doc.mk - building troff system documents bsd.endian.mk - TARGET_ENDIAN=1234(little) or 4321 (big) for target bsd.files.mk - install of general purpose files @@ -291,6 +292,18 @@ CFLAGS Flags to the compiler when creating C objects. CLEANDIRS Additional files (CLEANFILES) and directories (CLEANDIRS) to CLEANFILES remove during clean and cleandir targets. "rm -rf" and "rm -f" are used, respectively. + +DIRS A list of variables referring to directories. For example: + + DIRS+= FOO + FOO= /usr/share/foo + + Owner, Group, Mode and Flags are handled by FOO_OWN, + FOO_GRP, FOO_MODE and FOO_FLAGS, respectively. + + This allows FILESDIR to be set to FOO, and the directory + will be created before the files are installed and the + dependencies will be set correctly. DPADD Additional dependencies for the program. Usually used for libraries. For example, to depend on the compatibility and Added: head/share/mk/bsd.dirs.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/mk/bsd.dirs.mk Mon Jul 23 16:11:03 2018 (r336640) @@ -0,0 +1,42 @@ +# $FreeBSD$ +# +# Directory permissions management. + +.if !target(____) +____: +# List of directory variable names to install. Each variable name's value +# must be a full path. If non-default permissions are desired, _MODE, +# _OWN, and _GRP may be specified. +DIRS?= + +. for dir in ${DIRS:O:u} +. if defined(${dir}) && !empty(${dir}) +# Set default permissions for a directory +${dir}_MODE?= 0755 +${dir}_OWN?= root +${dir}_GRP?= wheel +. if defined(${dir}_FLAGS) && !empty(${dir}_FLAGS) +${dir}_FLAG= -f ${${dir}_FLAGS} +. endif + +. if defined(NO_ROOT) +. if !defined(${dir}TAGS) || ! ${${dir}TAGS:Mpackage=*} +${dir}TAGS+= package=${${dir}PACKAGE:Uruntime} +. endif +${dir}TAG_ARGS= -T ${${dir}TAGS:[*]:S/ /,/g} +. endif + +installdirs: installdirs-${dir} + +installdirs-${dir}: ${DESTDIR}${${dir}} + +${DESTDIR}${${dir}}: + @${ECHO} installing DIRS ${dir} + ${INSTALL} ${${dir}TAG_ARGS} -d -m ${${dir}_MODE} -o ${${dir}_OWN} \ + -g ${${dir}_GRP} ${${dir}_FLAG} ${DESTDIR}${${dir}} +. endif + +realinstall: installdirs-${dir} +. endfor + +.endif From owner-svn-src-head@freebsd.org Mon Jul 23 16:22: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 9441B104F65F for ; Mon, 23 Jul 2018 16:22:02 +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 1F1F583931 for ; Mon, 23 Jul 2018 16:22:01 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: 86286fa7-8e94-11e8-904b-1d2e466b3c59 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 86286fa7-8e94-11e8-904b-1d2e466b3c59; Mon, 23 Jul 2018 16:21:59 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w6NGLxul013374; Mon, 23 Jul 2018 10:21:59 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1532362918.1344.145.camel@freebsd.org> Subject: Re: svn commit: r336640 - head/share/mk From: Ian Lepore To: Brad Davis , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Mon, 23 Jul 2018 10:21:58 -0600 In-Reply-To: <201807231611.w6NGB3gh074167@repo.freebsd.org> References: <201807231611.w6NGB3gh074167@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.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: Mon, 23 Jul 2018 16:22:02 -0000 On Mon, 2018-07-23 at 16:11 +0000, Brad Davis wrote: > Author: brd > Date: Mon Jul 23 16:11:03 2018 > New Revision: 336640 > URL: https://svnweb.freebsd.org/changeset/base/336640 > > Log: >   Add the initial DIRS infrastructure for creating directories with the >   necessary owner, group, mode and flags. >    >   Approved by: bapt (mentor) >   Differential Revision: https://reviews.freebsd.org/D16405 > > Added: >   head/share/mk/bsd.dirs.mk   (contents, props changed) > Modified: >   head/share/mk/bsd.README > > Modified: head/share/mk/bsd.README > ============================================================================== > --- head/share/mk/bsd.README Mon Jul 23 15:36:55 2018 (r336639) > +++ head/share/mk/bsd.README Mon Jul 23 16:11:03 2018 (r336640) > @@ -22,6 +22,7 @@ bsd.confs.mk - install of configuration files >  bsd.cpu.mk - sets CPU/arch-related variables (included from sys.mk) >  bsd.crunchgen.mk - building crunched binaries using crunchgen(1) >  bsd.dep.mk - handle Makefile dependencies > +bsd.dirs.mk - handle directory creation >  bsd.doc.mk - building troff system documents >  bsd.endian.mk - TARGET_ENDIAN=1234(little) or 4321 (big) for target >  bsd.files.mk - install of general purpose files > @@ -291,6 +292,18 @@ CFLAGS Flags to the compiler when creating C objects. >  CLEANDIRS Additional files (CLEANFILES) and directories (CLEANDIRS) to >  CLEANFILES remove during clean and cleandir targets.  "rm -rf" and >   "rm -f" are used, respectively. > + > +DIRS A list of variables referring to directories.  For example: > + > + DIRS+= FOO > + FOO= /usr/share/foo > + > + Owner, Group, Mode and Flags are handled by FOO_OWN, > + FOO_GRP, FOO_MODE and FOO_FLAGS, respectively. > + > + This allows FILESDIR to be set to FOO, and the directory > + will be created before the files are installed and the > + dependencies will be set correctly. >   >  DPADD Additional dependencies for the program.  Usually used for >   libraries.  For example, to depend on the compatibility and > > Added: head/share/mk/bsd.dirs.mk > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/share/mk/bsd.dirs.mk Mon Jul 23 16:11:03 2018 (r336640) > @@ -0,0 +1,42 @@ > +# $FreeBSD$ > +# > +# Directory permissions management. > + > +.if !target(____) > +____: > +# List of directory variable names to install.  Each variable name's value > +# must be a full path.  If non-default permissions are desired, _MODE, > +# _OWN, and _GRP may be specified. > +DIRS?= > + > +.  for dir in ${DIRS:O:u} > +.    if defined(${dir}) && !empty(${dir}) > +# Set default permissions for a directory > +${dir}_MODE?= 0755 > +${dir}_OWN?= root > +${dir}_GRP?= wheel > +.      if defined(${dir}_FLAGS) && !empty(${dir}_FLAGS) > +${dir}_FLAG= -f ${${dir}_FLAGS} > +.      endif > + > +.      if defined(NO_ROOT) > +.        if !defined(${dir}TAGS) || ! ${${dir}TAGS:Mpackage=*} > +${dir}TAGS+= package=${${dir}PACKAGE:Uruntime} > +.        endif > +${dir}TAG_ARGS= -T ${${dir}TAGS:[*]:S/ /,/g} > +.      endif > + > +installdirs: installdirs-${dir} > + > +installdirs-${dir}: ${DESTDIR}${${dir}} > + > +${DESTDIR}${${dir}}: > + @${ECHO} installing DIRS ${dir} > + ${INSTALL} ${${dir}TAG_ARGS} -d -m ${${dir}_MODE} -o ${${dir}_OWN} \ > + -g ${${dir}_GRP} ${${dir}_FLAG} ${DESTDIR}${${dir}} > +.    endif > + > +realinstall: installdirs-${dir} > +.  endfor > + > +.endif > Having a variable named DIRS seems like asking for name clashes with peoples' existing makefiles (people do use the freebsd build infrastructure to build out-of-tree code). Could it be named maybe CREATEDIRS (taking a precedent-clue from CLEANDIRS)? -- Ian From owner-svn-src-head@freebsd.org Mon Jul 23 16:41: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 AB8B7104F9EF; Mon, 23 Jul 2018 16:41:14 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (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 EF3BD83FC2; Mon, 23 Jul 2018 16:41:13 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id hdtVfgIcZWppDhdtXf3HnK; Mon, 23 Jul 2018 10:41:12 -0600 X-Authority-Analysis: v=2.3 cv=YIcrNiOx c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=R9QF1RCXAYgA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=BOkEnWI0whRbsa-jNy0A:9 a=MfmKj_gv5cle6sVY:21 a=P1TnRRUsIJ0jbRFj:21 a=QEXdDO2ut3YA:10 a=dADgekYTktasRz0T3RUA:9 a=Y2boIxRUT9h_c8cq:21 a=DSnrlnj8TO91vq9H:21 a=LSsBcuTZuvz0Z21g:21 a=_W_S_7VecoQA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 Received: from [25.80.33.197] (S0106788a207e2972.gv.shawcable.net [70.66.154.233]) by spqr.komquats.com (Postfix) with ESMTPSA id 40C7E948; Mon, 23 Jul 2018 09:41:15 -0700 (PDT) MIME-Version: 1.0 From: Cy Schubert Subject: RE: svn commit: r336619 - head/lib/libc/gen Date: Mon, 23 Jul 2018 09:41:18 -0700 To: Alan Somers CC: Ian Lepore , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <20180723164115.40C7E948@spqr.komquats.com> X-CMAE-Envelope: MS4wfGsjxmy2T5v21fXHW7++4MR8sZ4VSgJpAu9eCyXM3C1Da+KeS9ubrrNpluGuZ1OVlw73q3JrE100J3n38T+pTwzahQxUeDbvQ0x69dCnv8ufgGVSiFYu oGFcdrakWj+0SZRHcFdAaLVoNANbyiv9Ki4Ub3GvsTzjWQtn889p3KlTZDmQ/aRn6oyfgQ+VQvkqP0NnwvMmXK9wIZw8tvJ6h+Gag1UVlS1gq/30qZDkNTnn pkicH8YjhzT1VL9G691RMo6rtY0Hh72KR5kcQgJsi8cm4CbNJXnDwbTLK28P5njn2asPskmNSX/UPjKW/l+d6rgrR/Hsqj1e91arhr38AGE= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.27 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: Mon, 23 Jul 2018 16:41:14 -0000 I'm sure. Rolling this libc commit back addressed the ssh segfaults on all = my systems. --- Sent using a tiny phone keyboard. Apologies for any typos and autocorrect. Also, this old phone only supports top post. Apologies. Cy Schubert or The need of the many outweighs the greed of the few. --- -----Original Message----- From: Alan Somers Sent: 23/07/2018 07:48 To: Cy Schubert Cc: Ian Lepore; src-committers; svn-src-all@freebsd.org; svn-src-head@freeb= sd.org Subject: Re: svn commit: r336619 - head/lib/libc/gen On Sun, Jul 22, 2018 at 11:13 PM, Cy Schubert w= rote: In message <201807222234.w6MMYKpn030237@repo.freebsd.org>, Ian Lepore=20 writes: =20 > Author: ian > Date: Sun Jul 22 22:34:20 2018 > New Revision: 336619 > URL: https://svnweb.freebsd.org/changeset/base/336619 > > Log: > Set the pw_class field to NULL when scanning the non-master passwd fil= e. > This avoids a null pointer deref in pw_dup(), which assumes that all > pointers are either NULL or valid. > > Modified: > head/lib/libc/gen/pw_scan.c > =20 Hi Ian, =20 This causes ssh a bit of gas. =20 Are you sure, Cy? Judging by the Jenkins output, I think it was the next r= evision to pw (336625) that broke everything. https://ci.freebsd.org/job/F= reeBSD-head-amd64-test/8320/ . -Alan = From owner-svn-src-head@freebsd.org Mon Jul 23 16:48: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 2F0B8104FBD0; Mon, 23 Jul 2018 16:48:17 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (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 BFFD4843A9; Mon, 23 Jul 2018 16:48:16 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id E4DF733F; Mon, 23 Jul 2018 12:48:14 -0400 (EDT) Received: from web6 ([10.202.2.216]) by compute5.internal (MEProxy); Mon, 23 Jul 2018 12:48:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=6HiQgz on0sCOr25TFDN9N5br0RNs+IzZuqR9XKyx8wY=; b=hv1NDFLkQDI1a6hWRQV18N pQbV/U1QtgbkjdLjOEC4wJ5YWefuDr4xxVeuhjA7dZ6+E7ddHMSZUhyjxVP1GMxs w3y5Tr34VwGmJiXHaC3Oh8VFq3KMCvcYd41lhwZ8+7DE6MNdw/TD09E8cqsl0Pvm jxaBuNWwmLKyZmvlYFstffIyfCr41kTK8ssvR4vZBzp6npbGchCz8LDFP3xvhabQ jzXyg5KvxfplCcIPzDGU1gWcqoAi5fbqdUcNlaBBjm7hgBFXTuEcKUhKQl8YMxmQ 4zw8UaUpJjiMPxZu8Nfy9/aKXThX9pw84nE8dyRQj6k3oyg6DhfG696b8M4+MKvA == X-ME-Proxy: X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id 21E48412A; Mon, 23 Jul 2018 12:48:14 -0400 (EDT) Message-Id: <1532364494.2401755.1450115552.31CB163C@webmail.messagingengine.com> From: Brad Davis To: Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-0843ff3e In-Reply-To: <1532362918.1344.145.camel@freebsd.org> References: <201807231611.w6NGB3gh074167@repo.freebsd.org> <1532362918.1344.145.camel@freebsd.org> Date: Mon, 23 Jul 2018 10:48:14 -0600 Subject: Re: svn commit: r336640 - head/share/mk 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: Mon, 23 Jul 2018 16:48:17 -0000 On Mon, Jul 23, 2018, at 10:21 AM, Ian Lepore wrote: > On Mon, 2018-07-23 at 16:11 +0000, Brad Davis wrote: > > Author: brd > > Date: Mon Jul 23 16:11:03 2018 > > New Revision: 336640 > > URL: https://svnweb.freebsd.org/changeset/base/336640 > >=20 > > Log: > > =C2=A0 Add the initial DIRS infrastructure for creating directories wit= h the > > =C2=A0 necessary owner, group, mode and flags. > > =C2=A0=C2=A0 > > =C2=A0 Approved by: bapt (mentor) > > =C2=A0 Differential Revision: https://reviews.freebsd.org/D16405 > >=20 > > Added: > > =C2=A0 head/share/mk/bsd.dirs.mk=C2=A0=C2=A0=C2=A0(contents, props chan= ged) > > Modified: > > =C2=A0 head/share/mk/bsd.README > >=20 > > Modified: head/share/mk/bsd.README > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=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/bsd.README Mon Jul 23 15:36:55 2018 (r336639) > > +++ head/share/mk/bsd.README Mon Jul 23 16:11:03 2018 (r336640) > > @@ -22,6 +22,7 @@ bsd.confs.mk - install of configuration files > > =C2=A0bsd.cpu.mk - sets CPU/arch-related variables (included from sys.= mk) > > =C2=A0bsd.crunchgen.mk - building crunched binaries using crunchgen(1) > > =C2=A0bsd.dep.mk - handle Makefile dependencies > > +bsd.dirs.mk - handle directory creation > > =C2=A0bsd.doc.mk - building troff system documents > > =C2=A0bsd.endian.mk - TARGET_ENDIAN=3D1234(little) or 4321 (big) for t= arget > > =C2=A0bsd.files.mk - install of general purpose files > > @@ -291,6 +292,18 @@ CFLAGS Flags to the compiler when creating C obje= cts. > > =C2=A0CLEANDIRS Additional files (CLEANFILES) and directories (CLEANDIR= S) to > > =C2=A0CLEANFILES remove during clean and cleandir targets.=C2=A0=C2=A0"= rm -rf" and > > =C2=A0 "rm -f" are used, respectively. > > + > > +DIRS A list of variables referring to directories.=C2=A0=C2=A0For exa= mple: > > + > > + DIRS+=3D FOO > > + FOO=3D /usr/share/foo > > + > > + Owner, Group, Mode and Flags are handled by FOO_OWN, > > + FOO_GRP, FOO_MODE and FOO_FLAGS, respectively. > > + > > + This allows FILESDIR to be set to FOO, and the directory > > + will be created before the files are installed and the > > + dependencies will be set correctly. > > =C2=A0 > > =C2=A0DPADD Additional dependencies for the program.=C2=A0=C2=A0Usuall= y used for > > =C2=A0 libraries.=C2=A0=C2=A0For example, to depend on the compatibili= ty and > >=20 > > Added: head/share/mk/bsd.dirs.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 > > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > > +++ head/share/mk/bsd.dirs.mk Mon Jul 23 16:11:03 2018 (r336640) > > @@ -0,0 +1,42 @@ > > +# $FreeBSD$ > > +# > > +# Directory permissions management. > > + > > +.if !target(____) > > +____: > > +# List of directory variable names to install.=C2=A0=C2=A0Each variabl= e name's value > > +# must be a full path.=C2=A0=C2=A0If non-default permissions are desir= ed, _MODE, > > +# _OWN, and _GRP may be specified. > > +DIRS?=3D > > + > > +.=C2=A0=C2=A0for dir in ${DIRS:O:u} > > +.=C2=A0=C2=A0=C2=A0=C2=A0if defined(${dir}) && !empty(${dir}) > > +# Set default permissions for a directory > > +${dir}_MODE?=3D 0755 > > +${dir}_OWN?=3D root > > +${dir}_GRP?=3D wheel > > +.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if defined(${dir}_FLAGS) && !empt= y(${dir}_FLAGS) > > +${dir}_FLAG=3D -f ${${dir}_FLAGS} > > +.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0endif > > + > > +.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if defined(NO_ROOT) > > +.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if !defined(${dir}TAG= S) || ! ${${dir}TAGS:Mpackage=3D*} > > +${dir}TAGS+=3D package=3D${${dir}PACKAGE:Uruntime} > > +.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0endif > > +${dir}TAG_ARGS=3D -T ${${dir}TAGS:[*]:S/ /,/g} > > +.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0endif > > + > > +installdirs: installdirs-${dir} > > + > > +installdirs-${dir}: ${DESTDIR}${${dir}} > > + > > +${DESTDIR}${${dir}}: > > + @${ECHO} installing DIRS ${dir} > > + ${INSTALL} ${${dir}TAG_ARGS} -d -m ${${dir}_MODE} -o ${${dir}_OWN} \ > > + -g ${${dir}_GRP} ${${dir}_FLAG} ${DESTDIR}${${dir}} > > +.=C2=A0=C2=A0=C2=A0=C2=A0endif > > + > > +realinstall: installdirs-${dir} > > +.=C2=A0=C2=A0endfor > > + > > +.endif > >=20 >=20 > Having a variable named DIRS seems like asking for name clashes with > peoples' existing makefiles (people do use the freebsd build > infrastructure to build out-of-tree code). Could it be named maybe > CREATEDIRS (taking a precedent-clue from CLEANDIRS)? I suppose that is possible, but it seems like other people could be using C= REATEDIRS, or anything else we might choose as well. Do you have an exampl= e of someone using DIRS already? So I am kind of doubtful that changing this to something else would avoid t= he problem entirely.. Regards, Brad Davis From owner-svn-src-head@freebsd.org Mon Jul 23 16:51: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 71B01104FD31 for ; Mon, 23 Jul 2018 16:51:24 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (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 E9D0A846CA for ; Mon, 23 Jul 2018 16:51:23 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: 9f9ce29b-8e98-11e8-93fa-f3ebd9db2b94 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.ore.mailhop.org (Halon) with ESMTPSA id 9f9ce29b-8e98-11e8-93fa-f3ebd9db2b94; Mon, 23 Jul 2018 16:51:20 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w6NGpJGJ013436; Mon, 23 Jul 2018 10:51:19 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1532364679.1344.161.camel@freebsd.org> Subject: Re: svn commit: r336619 - head/lib/libc/gen From: Ian Lepore To: Cy Schubert , Alan Somers Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Date: Mon, 23 Jul 2018 10:51:19 -0600 In-Reply-To: <20180723164115.40C7E948@spqr.komquats.com> References: <20180723164115.40C7E948@spqr.komquats.com> 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.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: Mon, 23 Jul 2018 16:51:24 -0000 On Mon, 2018-07-23 at 09:41 -0700, Cy Schubert wrote: > I'm sure. Rolling this libc commit back addressed the ssh segfaults > on all my systems. > > --- > Sent using a tiny phone keyboard. > Apologies for any typos and autocorrect. > Also, this old phone only supports top post. Apologies. > > Cy Schubert > or > The need of the many outweighs the greed of the few. > --- > My current working theory is that some of the software that uses __pw_scan() pre-stages a pointer-to-empty-string into the pw_class field and my change ruined that by replacing it with a NULL pointer. Other callers of __pw_scan() don't do that, they just assume they're running as root and will get all the fields populated. -- Ian > -----Original Message----- > From: Alan Somers > Sent: 23/07/2018 07:48 > To: Cy Schubert > Cc: Ian Lepore; src-committers; svn-src-all@freebsd.org; svn-src-head > @freebsd.org > Subject: Re: svn commit: r336619 - head/lib/libc/gen > > > > On Sun, Jul 22, 2018 at 11:13 PM, Cy Schubert com> wrote: > > In message <201807222234.w6MMYKpn030237@repo.freebsd.org>, Ian > Lepore  > writes: >   > > > > > Author: ian >  > Date: Sun Jul 22 22:34:20 2018 >  > New Revision: 336619 >  > URL: https://svnweb.freebsd.org/changeset/base/336619 >  > >  > Log: >  >   Set the pw_class field to NULL when scanning the non-master > passwd file. >  >   This avoids a null pointer deref in pw_dup(), which assumes that > all >  >   pointers are either NULL or valid. >  > >  > Modified: >  >   head/lib/libc/gen/pw_scan.c >  > > >   > Hi Ian, >   > This causes ssh a bit of gas. >   > > > > > Are you sure, Cy?  Judging by the Jenkins output, I think it was the > next revision to pw (336625) that broke everything.  https://ci.freeb > sd.org/job/FreeBSD-head-amd64-test/8320/ . > > > > > -Alan  From owner-svn-src-head@freebsd.org Mon Jul 23 16:54: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 55CE0104FF36 for ; Mon, 23 Jul 2018 16:54:12 +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 D765884A85 for ; Mon, 23 Jul 2018 16:54:11 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: 00becbd8-8e99-11e8-904b-1d2e466b3c59 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 00becbd8-8e99-11e8-904b-1d2e466b3c59; Mon, 23 Jul 2018 16:54:03 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w6NGs2Gn013444; Mon, 23 Jul 2018 10:54:02 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1532364842.1344.164.camel@freebsd.org> Subject: Re: svn commit: r336640 - head/share/mk From: Ian Lepore To: Brad Davis , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Mon, 23 Jul 2018 10:54:02 -0600 In-Reply-To: <1532364494.2401755.1450115552.31CB163C@webmail.messagingengine.com> References: <201807231611.w6NGB3gh074167@repo.freebsd.org> <1532362918.1344.145.camel@freebsd.org> <1532364494.2401755.1450115552.31CB163C@webmail.messagingengine.com> 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.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: Mon, 23 Jul 2018 16:54:12 -0000 On Mon, 2018-07-23 at 10:48 -0600, Brad Davis wrote: > On Mon, Jul 23, 2018, at 10:21 AM, Ian Lepore wrote: > > > > On Mon, 2018-07-23 at 16:11 +0000, Brad Davis wrote: > > > > > > Author: brd > > > Date: Mon Jul 23 16:11:03 2018 > > > New Revision: 336640 > > > URL: https://svnweb.freebsd.org/changeset/base/336640 > > > > > > Log: > > >   Add the initial DIRS infrastructure for creating directories > > > with the > > >   necessary owner, group, mode and flags. > > >    > > >   Approved by: bapt (mentor) > > >   Differential Revision: https://reviews.freebsd.org/D1640 > > > 5 > > > > > > Added: > > >   head/share/mk/bsd.dirs.mk   (contents, props changed) > > > Modified: > > >   head/share/mk/bsd.README > > > > > > Modified: head/share/mk/bsd.README > > > ================================================================= > > > ============= > > > --- head/share/mk/bsd.README Mon Jul 23 15:36:55 2018 > > > (r336639) > > > +++ head/share/mk/bsd.README Mon Jul 23 16:11:03 2018 > > > (r336640) > > > @@ -22,6 +22,7 @@ bsd.confs.mk - install of > > > configuration files > > >  bsd.cpu.mk - sets CPU/arch-related variables > > > (included from sys.mk) > > >  bsd.crunchgen.mk - building crunched binaries using > > > crunchgen(1) > > >  bsd.dep.mk - handle Makefile dependencies > > > +bsd.dirs.mk - handle directory creation > > >  bsd.doc.mk - building troff system documents > > >  bsd.endian.mk - TARGET_ENDIAN=1234(little) or > > > 4321 (big) for target > > >  bsd.files.mk - install of general purpose files > > > @@ -291,6 +292,18 @@ CFLAGS Flags to the compiler > > > when creating C objects. > > >  CLEANDIRS Additional files (CLEANFILES) and directories > > > (CLEANDIRS) to > > >  CLEANFILES remove during clean and cleandir targets.  "rm > > > -rf" and > > >   "rm -f" are used, respectively. > > > + > > > +DIRS A list of variables referring to > > > directories.  For example: > > > + > > > + DIRS+= FOO > > > + FOO= /usr/share/foo > > > + > > > + Owner, Group, Mode and Flags are handled by > > > FOO_OWN, > > > + FOO_GRP, FOO_MODE and FOO_FLAGS, respectively. > > > + > > > + This allows FILESDIR to be set to FOO, and the > > > directory > > > + will be created before the files are installed > > > and the > > > + dependencies will be set correctly. > > >   > > >  DPADD Additional dependencies for the > > > program.  Usually used for > > >   libraries.  For example, to depend on the > > > compatibility and > > > > > > Added: head/share/mk/bsd.dirs.mk > > > ================================================================= > > > ============= > > > --- /dev/null 00:00:00 1970 (empty, because file is > > > newly added) > > > +++ head/share/mk/bsd.dirs.mk Mon Jul 23 16:11:03 2018 > > > (r336640) > > > @@ -0,0 +1,42 @@ > > > +# $FreeBSD$ > > > +# > > > +# Directory permissions management. > > > + > > > +.if !target(____) > > > +____: > > > +# List of directory variable names to install.  Each variable > > > name's value > > > +# must be a full path.  If non-default permissions are desired, > > > _MODE, > > > +# _OWN, and _GRP may be specified. > > > +DIRS?= > > > + > > > +.  for dir in ${DIRS:O:u} > > > +.    if defined(${dir}) && !empty(${dir}) > > > +# Set default permissions for a directory > > > +${dir}_MODE?= 0755 > > > +${dir}_OWN?= root > > > +${dir}_GRP?= wheel > > > +.      if defined(${dir}_FLAGS) && !empty(${dir}_FLAGS) > > > +${dir}_FLAG= -f ${${dir}_FLAGS} > > > +.      endif > > > + > > > +.      if defined(NO_ROOT) > > > +.        if !defined(${dir}TAGS) || ! ${${dir}TAGS:Mpackage=*} > > > +${dir}TAGS+= package=${${dir}PACKAGE:Uruntime} > > > +.        endif > > > +${dir}TAG_ARGS= -T ${${dir}TAGS:[*]:S/ /,/g} > > > +.      endif > > > + > > > +installdirs: installdirs-${dir} > > > + > > > +installdirs-${dir}: ${DESTDIR}${${dir}} > > > + > > > +${DESTDIR}${${dir}}: > > > + @${ECHO} installing DIRS ${dir} > > > + ${INSTALL} ${${dir}TAG_ARGS} -d -m ${${dir}_MODE} -o > > > ${${dir}_OWN} \ > > > + -g ${${dir}_GRP} ${${dir}_FLAG} > > > ${DESTDIR}${${dir}} > > > +.    endif > > > + > > > +realinstall: installdirs-${dir} > > > +.  endfor > > > + > > > +.endif > > > > > Having a variable named DIRS seems like asking for name clashes > > with > > peoples' existing makefiles (people do use the freebsd build > > infrastructure to build out-of-tree code). Could it be named maybe > > CREATEDIRS (taking a precedent-clue from CLEANDIRS)? > I suppose that is possible, but it seems like other people could be > using CREATEDIRS, or anything else we might choose as well.  Do you > have an example of someone using DIRS already? > > So I am kind of doubtful that changing this to something else would > avoid the problem entirely.. > > > Regards, > Brad Davis > The only way to avoid it entirely would be to declare that anything starting with FREEBSD belongs to us and consistantly use it. That ship sailed about 30 years ago. My theory is that the longer the name is, the less likely it is to clash. Of course, any name you come up with that's good and sensible and self-documenting is exactly the kind of name that someone else is likely to come up with as well. -- Ian From owner-svn-src-head@freebsd.org Mon Jul 23 16:56: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 50DE0104FFF7; Mon, 23 Jul 2018 16:56:50 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 00F7D84C40; Mon, 23 Jul 2018 16:56:50 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D1A441F3C6; Mon, 23 Jul 2018 16:56:49 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6NGunlA097836; Mon, 23 Jul 2018 16:56:49 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6NGun8x097835; Mon, 23 Jul 2018 16:56:49 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201807231656.w6NGun8x097835@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 23 Jul 2018 16:56:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336641 - head/sys/security/audit X-SVN-Group: head X-SVN-Commit-Author: avg X-SVN-Commit-Paths: head/sys/security/audit X-SVN-Commit-Revision: 336641 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: Mon, 23 Jul 2018 16:56:50 -0000 Author: avg Date: Mon Jul 23 16:56:49 2018 New Revision: 336641 URL: https://svnweb.freebsd.org/changeset/base/336641 Log: fix incorrect operator in the AUDITPIPE_SET_QLIMIT bounds check PR: 229983 Submitted by: Aniket Pandey Reported by: Aniket Pandey MFC after: 1 week Modified: head/sys/security/audit/audit_pipe.c Modified: head/sys/security/audit/audit_pipe.c ============================================================================== --- head/sys/security/audit/audit_pipe.c Mon Jul 23 16:11:03 2018 (r336640) +++ head/sys/security/audit/audit_pipe.c Mon Jul 23 16:56:49 2018 (r336641) @@ -756,7 +756,7 @@ audit_pipe_ioctl(struct cdev *dev, u_long cmd, caddr_t case AUDITPIPE_SET_QLIMIT: /* Lockless integer write. */ - if (*(u_int *)data >= AUDIT_PIPE_QLIMIT_MIN || + if (*(u_int *)data >= AUDIT_PIPE_QLIMIT_MIN && *(u_int *)data <= AUDIT_PIPE_QLIMIT_MAX) { ap->ap_qlimit = *(u_int *)data; error = 0; From owner-svn-src-head@freebsd.org Mon Jul 23 17:10: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 4F04510504C5; Mon, 23 Jul 2018 17:10:09 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (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 8EC73853CE; Mon, 23 Jul 2018 17:10:08 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id heLVfgV7uWppDheLXf3Oii; Mon, 23 Jul 2018 11:10:07 -0600 X-Authority-Analysis: v=2.3 cv=YIcrNiOx c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=R9QF1RCXAYgA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=nQYHLtghUqMU1QjKQC0A:9 a=0Twf5jwiCz-Pdy4J:21 a=T2QEiDVd7MmbP0Q2:21 a=wPNLvfGTeEIA:10 a=ewwTlzS8e9JcBHLzVFQA:9 a=O-Vgo935Rrvw13y3:21 a=JxTQS23J8b3Cy4v1:21 a=Wfu566KaUAwXL-t-:21 a=_W_S_7VecoQA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 Received: from [25.80.33.197] (S0106788a207e2972.gv.shawcable.net [70.66.154.233]) by spqr.komquats.com (Postfix) with ESMTPSA id 51FE898A; Mon, 23 Jul 2018 10:10:11 -0700 (PDT) MIME-Version: 1.0 From: Cy Schubert Subject: RE: svn commit: r336625 - head/usr.sbin/pw Date: Mon, 23 Jul 2018 10:10:14 -0700 To: Ian Lepore , Alan Somers CC: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <20180723171011.51FE898A@spqr.komquats.com> X-CMAE-Envelope: MS4wfCQTLkZxy6xgrDZGatHR3qnruWy3KbR1GYDleYtiFEkWy8C/DSRjnqkjeGNjRHt4SKnyMg7yHlRlstZJJn9ky5nnTWL/OXlcDIKordBr07Ib7S1ZZHWJ bx6e1BD4WnZMGW4Q99gnkenDhGZa9lBjbAfODqduUA9Z75pudxfkNG36T8rqXztHEKVLltu3WbWYury8bJFKOPClLFsz/nNdBYZCnKodU1rV4yXcoJcC+zX8 YndArQY+/3eJ0nL/91EJsmUsGtZfJYzb78/8N4enhKoSEr7ddbUV6S87t/D09wSno8nIs4UEd5lMxYTQ9SqWd94zZEPQJFBGHJysw9fSxVQ= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.27 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: Mon, 23 Jul 2018 17:10:09 -0000 Unless I'm doing something non-standard (NIS user account Kerberos authenti= cated) the rev this reverted didn't cause the ssh segfaults, though it may = have caused other issues -- I didn't look at Jenkins builds. Reverting r336= 619 resolved my ssh segfaullt. --- Sent using a tiny phone keyboard. Apologies for any typos and autocorrect. Also, this old phone only supports top post. Apologies. Cy Schubert or The need of the many outweighs the greed of the few. --- -----Original Message----- From: Ian Lepore Sent: 23/07/2018 08:00 To: Alan Somers Cc: src-committers; svn-src-all@freebsd.org; svn-src-head@freebsd.org Subject: Re: svn commit: r336625 - head/usr.sbin/pw On Mon, 2018-07-23 at 08:53 -0600, Alan Somers wrote: > On Sun, Jul 22, 2018 at 5:41 PM, Ian Lepore wrote: >=20 > >=20 > > Author: ian > > Date: Sun Jul 22 23:41:40 2018 > > New Revision: 336625 > > URL: https://svnweb.freebsd.org/changeset/base/336625 > >=20 > > Log: > > =A0 Make pw(8) showuser work the same with or without -R for > > non-root > > =A0 users.=A0=A0Without -R, pw(8) uses getpwnam(3), which will open > > master.passwd > > =A0 for the root user or passwd for non-root users.=A0=A0With -R > > pw(8) was > > =A0 always opening /master.passwd, which would fail for a non- > > root > > user, > > =A0 then falsely claim the userid you're trying to show doesn't > > exist. > >=20 > > =A0 Now for a non-root user it opens /passwd and zeroes out the > > 3 > > fields > > =A0 that aren't available in the passwd file, which duplicates the > > behavior > > of > > =A0 getpwnam(3).=A0=A0The net effect is that the showuser output is > > identical > > =A0 whether using -R or not. > >=20 > > Modified: > > =A0 head/usr.sbin/pw/pw_vpw.c > >=20 > It looks like this change has broken approximately all of pw's tests. > Please fix or revert it ASAP. >=20 > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/8320/testReport/ >=20 > BTW, you can easily run these tests by hand, rather than wait for > Jenkins > to do it. If you're not familiar with Kyua/atf, you can do it like > this: > 1) sudo pkg install kyua > 2) cd /usr/tests/usr.sbin/pw > 3) sudo kyua test > 4) sudo kyua report >=20 > -Alan Hrm, it worked with the admittedly simplistic testing I did by hand. I'll look into running the kyua tests and see what's going on; until I get that worked out, it's reverted in r336638. Sorry for the breakage. -- Ian From owner-svn-src-head@freebsd.org Mon Jul 23 17:26: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 38DB810508B4; Mon, 23 Jul 2018 17:26:39 +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 DFE0285E7B; Mon, 23 Jul 2018 17:26:38 +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 C10E81F89B; Mon, 23 Jul 2018 17:26:38 +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 w6NHQc2V013554; Mon, 23 Jul 2018 17:26:38 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6NHQcLR013553; Mon, 23 Jul 2018 17:26:38 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201807231726.w6NHQcLR013553@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 23 Jul 2018 17:26:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336642 - head/lib/libc/gen X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/lib/libc/gen X-SVN-Commit-Revision: 336642 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: Mon, 23 Jul 2018 17:26:39 -0000 Author: ian Date: Mon Jul 23 17:26:38 2018 New Revision: 336642 URL: https://svnweb.freebsd.org/changeset/base/336642 Log: Revert r336619, it appears to cause problems with ssh, and probably other things which use pw_scan(). Modified: head/lib/libc/gen/pw_scan.c Modified: head/lib/libc/gen/pw_scan.c ============================================================================== --- head/lib/libc/gen/pw_scan.c Mon Jul 23 16:56:49 2018 (r336641) +++ head/lib/libc/gen/pw_scan.c Mon Jul 23 17:26:38 2018 (r336642) @@ -170,8 +170,7 @@ __pw_scan(char *bp, struct passwd *pw, int flags) if (p[0]) pw->pw_fields |= _PWF_EXPIRE; pw->pw_expire = atol(p); - } else - pw->pw_class = NULL; + } if (!(pw->pw_gecos = strsep(&bp, ":"))) /* gecos */ goto fmt; if (pw->pw_gecos[0]) From owner-svn-src-head@freebsd.org Mon Jul 23 17:27: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 8FC2E105097B; Mon, 23 Jul 2018 17:27:38 +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 6856A86285; Mon, 23 Jul 2018 17:27:38 +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 7A98310B45D; Mon, 23 Jul 2018 13:27:37 -0400 (EDT) Subject: Re: svn commit: r336439 - in head: share/man/man9 sys/crypto/aesni sys/crypto/armv8 sys/crypto/blake2 sys/crypto/ccp sys/crypto/via sys/dev/cesa sys/dev/cxgbe/crypto sys/dev/hifn sys/dev/safe sys/dev/s... To: Conrad Meyer , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201807180056.w6I0uPb6000705@repo.freebsd.org> From: John Baldwin Message-ID: <64ecf6f4-93ff-a8e0-9617-d299d5e52e50@FreeBSD.org> Date: Mon, 23 Jul 2018 10:27:36 -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: <201807180056.w6I0uPb6000705@repo.freebsd.org> 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); Mon, 23 Jul 2018 13:27:37 -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: Mon, 23 Jul 2018 17:27:38 -0000 On 7/17/18 5:56 PM, Conrad Meyer wrote: > Author: cem > Date: Wed Jul 18 00:56:25 2018 > New Revision: 336439 > URL: https://svnweb.freebsd.org/changeset/base/336439 > > Log: > OpenCrypto: Convert sessions to opaque handles instead of integers > > Track session objects in the framework, and pass handles between the > framework (OCF), consumers, and drivers. Avoid redundancy and complexity in > individual drivers by allocating session memory in the framework and > providing it to drivers in ::newsession(). > > Session handles are no longer integers with information encoded in various > high bits. Use of the CRYPTO_SESID2FOO() macros should be replaced with the > appropriate crypto_ses2foo() function on the opaque session handle. > > Convert OCF drivers (in particular, cryptosoft, as well as myriad others) to > the opaque handle interface. Discard existing session tracking as much as > possible (quick pass). There may be additional code ripe for deletion. > > Convert OCF consumers (ipsec, geom_eli, krb5, cryptodev) to handle-style > interface. The conversion is largely mechnical. > > The change is documented in crypto.9. > > Inspired by > https://lists.freebsd.org/pipermail/freebsd-arch/2018-January/018835.html . > > No objection from: ae (ipsec portion) > Reported by: jhb And there was much rejoicing. Thanks for doing this Conrad. -- John Baldwin From owner-svn-src-head@freebsd.org Mon Jul 23 18:08: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 D9203105171D; Mon, 23 Jul 2018 18:08:57 +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 87EB288559; Mon, 23 Jul 2018 18:08:57 +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 6481C1FF34; Mon, 23 Jul 2018 18:08:57 +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 w6NI8vOr034601; Mon, 23 Jul 2018 18:08:57 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6NI8vIJ034600; Mon, 23 Jul 2018 18:08:57 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201807231808.w6NI8vIJ034600@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Mon, 23 Jul 2018 18:08:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336645 - head/usr.sbin/crashinfo X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/usr.sbin/crashinfo X-SVN-Commit-Revision: 336645 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: Mon, 23 Jul 2018 18:08:58 -0000 Author: jhb Date: Mon Jul 23 18:08:56 2018 New Revision: 336645 URL: https://svnweb.freebsd.org/changeset/base/336645 Log: Support compressed crash dumps in crashinfo(8). Temporarily decompress a copy of a crash dump compressed with either gzip or zstd and run various tools against the decompressed copy while generating the crash information. The uncompressed copy is deleted when the script exits. Note that crashinfo is enabled by default, so this will attempt to decompress the most recent compressed crash dump after a crash that generates a compressed crash dump. Users who wish to only do offline analysis of compressed crash dumps can disable crashinfo in rc.conf. Tested by: ler Reviewed by: markj MFC after: 2 weeks Modified: head/usr.sbin/crashinfo/crashinfo.sh Modified: head/usr.sbin/crashinfo/crashinfo.sh ============================================================================== --- head/usr.sbin/crashinfo/crashinfo.sh Mon Jul 23 17:38:35 2018 (r336644) +++ head/usr.sbin/crashinfo/crashinfo.sh Mon Jul 23 18:08:56 2018 (r336645) @@ -38,6 +38,13 @@ usage() exit 1 } +# Remove an uncompressed copy of a dump +cleanup() +{ + + [ -e $VMCORE ] && rm -f $VMCORE +} + # Find a gdb binary to use and save the value in GDB. find_gdb() { @@ -133,7 +140,7 @@ if [ $# -eq 1 ]; then # Figure out the crash directory and number from the vmcore name. CRASHDIR=`dirname $1` - DUMPNR=$(expr $(basename $1) : 'vmcore\.\([0-9]*\)$') + DUMPNR=$(expr $(basename $1) : 'vmcore\.\([0-9]*\)') if [ -z "$DUMPNR" ]; then echo "Unable to determine dump number from vmcore file $1." exit 1 @@ -174,8 +181,16 @@ if [ -z "$GDB" ]; then fi if [ ! -e $VMCORE ]; then - echo "$VMCORE not found" - exit 1 + if [ -e $VMCORE.gz ]; then + trap cleanup EXIT HUP INT QUIT TERM + gzcat $VMCORE.gz > $VMCORE + elif [ -e $VMCORE.zst ]; then + trap cleanup EXIT HUP INT QUIT TERM + zstdcat $VMCORE.zst > $VMCORE + else + echo "$VMCORE not found" + exit 1 + fi fi if [ ! -e $INFO ]; then From owner-svn-src-head@freebsd.org Mon Jul 23 18:20: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 524401051C25; Mon, 23 Jul 2018 18:20:38 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (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 DD2B488BD7; Mon, 23 Jul 2018 18:20:37 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 14B2042C; Mon, 23 Jul 2018 14:20:36 -0400 (EDT) Received: from web6 ([10.202.2.216]) by compute5.internal (MEProxy); Mon, 23 Jul 2018 14:20:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=BfNcJT 1BTNZjSZ0bhniYpPiogiiYx9rmHYhhjXX0meo=; b=gsy6aA8GemAlfVv5QI+dI/ c3A456Aq2WunvjVCvuhSV8xodNUijfHgEI8MwK91Knmo37UMnkxFS4rVNIOJkKb5 kg9kDIW6MmIoQqmWewc0PosgTQXY5O1puTCGNN72Q9GU7AHee1YjLJExmAiZQ30S ynscQ5P9r5Je151nCu2BvMs9wqZj4AOB9IWrjuy+hbI9bFVVf2FEyyILu8+oNCXJ 51Q1CBZ7dT6g/heqCk4YFkcayi24UySLlPLutwIfdIw1CHiJuvC3x/+/Fu2ZNI9j xDzshA58mAvNyYmbzoZqeVS5kK2shcIJ+nAUmIj+3cPJJJuoeyWLUNL3p6Xy0ovQ == X-ME-Proxy: X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id 5486A412A; Mon, 23 Jul 2018 14:20:35 -0400 (EDT) Message-Id: <1532370035.3251993.1450222760.4825785F@webmail.messagingengine.com> From: Brad Davis To: Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-0843ff3e References: <201807231611.w6NGB3gh074167@repo.freebsd.org> <1532362918.1344.145.camel@freebsd.org> <1532364494.2401755.1450115552.31CB163C@webmail.messagingengine.com> <1532364842.1344.164.camel@freebsd.org> In-Reply-To: <1532364842.1344.164.camel@freebsd.org> Date: Mon, 23 Jul 2018 12:20:35 -0600 Subject: Re: svn commit: r336640 - head/share/mk 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: Mon, 23 Jul 2018 18:20:38 -0000 On Mon, Jul 23, 2018, at 10:54 AM, Ian Lepore wrote: > On Mon, 2018-07-23 at 10:48 -0600, Brad Davis wrote: > > On Mon, Jul 23, 2018, at 10:21 AM, Ian Lepore wrote: > > >=20 > > > On Mon, 2018-07-23 at 16:11 +0000, Brad Davis wrote: > > > >=20 > > > > Author: brd > > > > Date: Mon Jul 23 16:11:03 2018 > > > > New Revision: 336640 > > > > URL: https://svnweb.freebsd.org/changeset/base/336640 > > > >=20 > > > > Log: > > > > =C2=A0 Add the initial DIRS infrastructure for creating directories > > > > with the > > > > =C2=A0 necessary owner, group, mode and flags. > > > > =C2=A0=C2=A0 > > > > =C2=A0 Approved by: bapt (mentor) > > > > =C2=A0 Differential Revision: https://reviews.freebsd.org/D1640 > > > > 5 > > > >=20 > > > > Added: > > > > =C2=A0 head/share/mk/bsd.dirs.mk=C2=A0=C2=A0=C2=A0(contents, props = changed) > > > > Modified: > > > > =C2=A0 head/share/mk/bsd.README > > > >=20 > > > > Modified: head/share/mk/bsd.README > > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=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/bsd.README Mon Jul 23 15:36:55 2018=09 > > > > (r336639) > > > > +++ head/share/mk/bsd.README Mon Jul 23 16:11:03 2018=09 > > > > (r336640) > > > > @@ -22,6 +22,7 @@ bsd.confs.mk - install of > > > > configuration files > > > > =C2=A0bsd.cpu.mk - sets CPU/arch-related variables > > > > (included from sys.mk) > > > > =C2=A0bsd.crunchgen.mk - building crunched binaries using > > > > crunchgen(1) > > > > =C2=A0bsd.dep.mk - handle Makefile dependencies > > > > +bsd.dirs.mk - handle directory creation > > > > =C2=A0bsd.doc.mk - building troff system documents > > > > =C2=A0bsd.endian.mk - TARGET_ENDIAN=3D1234(little) or > > > > 4321 (big) for target > > > > =C2=A0bsd.files.mk - install of general purpose files > > > > @@ -291,6 +292,18 @@ CFLAGS Flags to the compiler > > > > when creating C objects. > > > > =C2=A0CLEANDIRS Additional files (CLEANFILES) and directories > > > > (CLEANDIRS) to > > > > =C2=A0CLEANFILES remove during clean and cleandir targets.=C2=A0=C2= =A0"rm > > > > -rf" and > > > > =C2=A0 "rm -f" are used, respectively. > > > > + > > > > +DIRS A list of variables referring to > > > > directories.=C2=A0=C2=A0For example: > > > > + > > > > + DIRS+=3D FOO > > > > + FOO=3D /usr/share/foo > > > > + > > > > + Owner, Group, Mode and Flags are handled by > > > > FOO_OWN, > > > > + FOO_GRP, FOO_MODE and FOO_FLAGS, respectively. > > > > + > > > > + This allows FILESDIR to be set to FOO, and the > > > > directory > > > > + will be created before the files are installed > > > > and the > > > > + dependencies will be set correctly. > > > > =C2=A0 > > > > =C2=A0DPADD Additional dependencies for the > > > > program.=C2=A0=C2=A0Usually used for > > > > =C2=A0 libraries.=C2=A0=C2=A0For example, to depend on the > > > > compatibility and > > > >=20 > > > > Added: head/share/mk/bsd.dirs.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 > > > > --- /dev/null 00:00:00 1970 (empty, because file is > > > > newly added) > > > > +++ head/share/mk/bsd.dirs.mk Mon Jul 23 16:11:03 2018=09 > > > > (r336640) > > > > @@ -0,0 +1,42 @@ > > > > +# $FreeBSD$ > > > > +# > > > > +# Directory permissions management. > > > > + > > > > +.if !target(____) > > > > +____: > > > > +# List of directory variable names to install.=C2=A0=C2=A0Each var= iable > > > > name's value > > > > +# must be a full path.=C2=A0=C2=A0If non-default permissions are d= esired, > > > > _MODE, > > > > +# _OWN, and _GRP may be specified. > > > > +DIRS?=3D > > > > + > > > > +.=C2=A0=C2=A0for dir in ${DIRS:O:u} > > > > +.=C2=A0=C2=A0=C2=A0=C2=A0if defined(${dir}) && !empty(${dir}) > > > > +# Set default permissions for a directory > > > > +${dir}_MODE?=3D 0755 > > > > +${dir}_OWN?=3D root > > > > +${dir}_GRP?=3D wheel > > > > +.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if defined(${dir}_FLAGS) && != empty(${dir}_FLAGS) > > > > +${dir}_FLAG=3D -f ${${dir}_FLAGS} > > > > +.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0endif > > > > + > > > > +.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if defined(NO_ROOT) > > > > +.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0if !defined(${dir= }TAGS) || ! ${${dir}TAGS:Mpackage=3D*} > > > > +${dir}TAGS+=3D package=3D${${dir}PACKAGE:Uruntime} > > > > +.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0endif > > > > +${dir}TAG_ARGS=3D -T ${${dir}TAGS:[*]:S/ /,/g} > > > > +.=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0endif > > > > + > > > > +installdirs: installdirs-${dir} > > > > + > > > > +installdirs-${dir}: ${DESTDIR}${${dir}} > > > > + > > > > +${DESTDIR}${${dir}}: > > > > + @${ECHO} installing DIRS ${dir} > > > > + ${INSTALL} ${${dir}TAG_ARGS} -d -m ${${dir}_MODE} -o > > > > ${${dir}_OWN} \ > > > > + -g ${${dir}_GRP} ${${dir}_FLAG} > > > > ${DESTDIR}${${dir}} > > > > +.=C2=A0=C2=A0=C2=A0=C2=A0endif > > > > + > > > > +realinstall: installdirs-${dir} > > > > +.=C2=A0=C2=A0endfor > > > > + > > > > +.endif > > > >=20 > > > Having a variable named DIRS seems like asking for name clashes > > > with > > > peoples' existing makefiles (people do use the freebsd build > > > infrastructure to build out-of-tree code). Could it be named maybe > > > CREATEDIRS (taking a precedent-clue from CLEANDIRS)? > > I suppose that is possible, but it seems like other people could be > > using CREATEDIRS, or anything else we might choose as well.=C2=A0=C2=A0= Do you > > have an example of someone using DIRS already? > >=20 > > So I am kind of doubtful that changing this to something else would > > avoid the problem entirely.. > >=20 > >=20 > > Regards, > > Brad Davis > >=20 >=20 > The only way to avoid it entirely would be to declare that anything > starting with FREEBSD belongs to us and consistantly use it. That ship > sailed about 30 years ago. >=20 > My theory is that the longer the name is, the less likely it is to > clash. Of course, any name you come up with that's good and sensible > and self-documenting is exactly the kind of name that someone else is > likely to come up with as well. Good point. But unless someone has an active example, I think I'll just le= ave it for now. Regards, Brad Davis From owner-svn-src-head@freebsd.org Mon Jul 23 18:28: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 5D28D1051EDC for ; Mon, 23 Jul 2018 18:28:51 +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 B9323891F1 for ; Mon, 23 Jul 2018 18:28:50 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: 3b192547-8ea6-11e8-aff6-0b9b8210da61 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 3b192547-8ea6-11e8-aff6-0b9b8210da61; Mon, 23 Jul 2018 18:28:45 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w6NIShnA013614; Mon, 23 Jul 2018 12:28:43 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1532370523.1344.167.camel@freebsd.org> Subject: Re: svn commit: r336640 - head/share/mk From: Ian Lepore To: Brad Davis , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Mon, 23 Jul 2018 12:28:43 -0600 In-Reply-To: <1532370035.3251993.1450222760.4825785F@webmail.messagingengine.com> References: <201807231611.w6NGB3gh074167@repo.freebsd.org> <1532362918.1344.145.camel@freebsd.org> <1532364494.2401755.1450115552.31CB163C@webmail.messagingengine.com> <1532364842.1344.164.camel@freebsd.org> <1532370035.3251993.1450222760.4825785F@webmail.messagingengine.com> 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.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: Mon, 23 Jul 2018 18:28:51 -0000 On Mon, 2018-07-23 at 12:20 -0600, Brad Davis wrote: > On Mon, Jul 23, 2018, at 10:54 AM, Ian Lepore wrote: > > > > On Mon, 2018-07-23 at 10:48 -0600, Brad Davis wrote: > > > > > > On Mon, Jul 23, 2018, at 10:21 AM, Ian Lepore wrote: > > > > > > > > > > > > On Mon, 2018-07-23 at 16:11 +0000, Brad Davis wrote: > > > > > > > > > > > > > > > Author: brd > > > > > Date: Mon Jul 23 16:11:03 2018 > > > > > New Revision: 336640 > > > > > URL: https://svnweb.freebsd.org/changeset/base/336640 > > > > > > > > > > Log: > > > > >   Add the initial DIRS infrastructure for creating > > > > > directories > > > > > with the > > > > >   necessary owner, group, mode and flags. > > > > >    > > > > >   Approved by: bapt (mentor) > > > > >   Differential Revision: https://reviews.freebsd.org/D > > > > > 1640 > > > > > 5 > > > > > > > > > > Added: > > > > >   head/share/mk/bsd.dirs.mk   (contents, props changed) > > > > > Modified: > > > > >   head/share/mk/bsd.README > > > > > > > > > > Modified: head/share/mk/bsd.README > > > > > ============================================================= > > > > > ==== > > > > > ============= > > > > > --- head/share/mk/bsd.README Mon Jul 23 15:36:55 2018 > > > > > (r336639) > > > > > +++ head/share/mk/bsd.README Mon Jul 23 16:11:03 2018 > > > > > (r336640) > > > > > @@ -22,6 +22,7 @@ bsd.confs.mk - install of > > > > > configuration files > > > > >  bsd.cpu.mk - sets CPU/arch-related variables > > > > > (included from sys.mk) > > > > >  bsd.crunchgen.mk - building crunched binaries using > > > > > crunchgen(1) > > > > >  bsd.dep.mk - handle Makefile dependencies > > > > > +bsd.dirs.mk - handle directory creation > > > > >  bsd.doc.mk - building troff system documents > > > > >  bsd.endian.mk - TARGET_ENDIAN=1234(little) or > > > > > 4321 (big) for target > > > > >  bsd.files.mk - install of general purpose > > > > > files > > > > > @@ -291,6 +292,18 @@ CFLAGS Flags to the > > > > > compiler > > > > > when creating C objects. > > > > >  CLEANDIRS Additional files (CLEANFILES) and > > > > > directories > > > > > (CLEANDIRS) to > > > > >  CLEANFILES remove during clean and cleandir > > > > > targets.  "rm > > > > > -rf" and > > > > >   "rm -f" are used, respectively. > > > > > + > > > > > +DIRS A list of variables referring to > > > > > directories.  For example: > > > > > + > > > > > + DIRS+= FOO > > > > > + FOO= /usr/share/foo > > > > > + > > > > > + Owner, Group, Mode and Flags are handled by > > > > > FOO_OWN, > > > > > + FOO_GRP, FOO_MODE and FOO_FLAGS, > > > > > respectively. > > > > > + > > > > > + This allows FILESDIR to be set to FOO, and > > > > > the > > > > > directory > > > > > + will be created before the files are > > > > > installed > > > > > and the > > > > > + dependencies will be set correctly. > > > > >   > > > > >  DPADD Additional dependencies for the > > > > > program.  Usually used for > > > > >   libraries.  For example, to depend on the > > > > > compatibility and > > > > > > > > > > Added: head/share/mk/bsd.dirs.mk > > > > > ============================================================= > > > > > ==== > > > > > ============= > > > > > --- /dev/null 00:00:00 1970 (empty, because > > > > > file is > > > > > newly added) > > > > > +++ head/share/mk/bsd.dirs.mk Mon Jul 23 16:11:03 2018 > > > > > > > > > > (r336640) > > > > > @@ -0,0 +1,42 @@ > > > > > +# $FreeBSD$ > > > > > +# > > > > > +# Directory permissions management. > > > > > + > > > > > +.if !target(____) > > > > > +____: > > > > > +# List of directory variable names to install.  Each > > > > > variable > > > > > name's value > > > > > +# must be a full path.  If non-default permissions are > > > > > desired, > > > > > _MODE, > > > > > +# _OWN, and _GRP may be specified. > > > > > +DIRS?= > > > > > + > > > > > +.  for dir in ${DIRS:O:u} > > > > > +.    if defined(${dir}) && !empty(${dir}) > > > > > +# Set default permissions for a directory > > > > > +${dir}_MODE?= 0755 > > > > > +${dir}_OWN?= root > > > > > +${dir}_GRP?= wheel > > > > > +.      if defined(${dir}_FLAGS) && !empty(${dir}_FLAGS) > > > > > +${dir}_FLAG= -f ${${dir}_FLAGS} > > > > > +.      endif > > > > > + > > > > > +.      if defined(NO_ROOT) > > > > > +.        if !defined(${dir}TAGS) || ! > > > > > ${${dir}TAGS:Mpackage=*} > > > > > +${dir}TAGS+= package=${${dir}PACKAGE:Uruntime > > > > > } > > > > > +.        endif > > > > > +${dir}TAG_ARGS= -T ${${dir}TAGS:[*]:S/ /,/g} > > > > > +.      endif > > > > > + > > > > > +installdirs: installdirs-${dir} > > > > > + > > > > > +installdirs-${dir}: ${DESTDIR}${${dir}} > > > > > + > > > > > +${DESTDIR}${${dir}}: > > > > > + @${ECHO} installing DIRS ${dir} > > > > > + ${INSTALL} ${${dir}TAG_ARGS} -d -m ${${dir}_MODE} -o > > > > > ${${dir}_OWN} \ > > > > > + -g ${${dir}_GRP} ${${dir}_FLAG} > > > > > ${DESTDIR}${${dir}} > > > > > +.    endif > > > > > + > > > > > +realinstall: installdirs-${dir} > > > > > +.  endfor > > > > > + > > > > > +.endif > > > > > > > > > Having a variable named DIRS seems like asking for name clashes > > > > with > > > > peoples' existing makefiles (people do use the freebsd build > > > > infrastructure to build out-of-tree code). Could it be named > > > > maybe > > > > CREATEDIRS (taking a precedent-clue from CLEANDIRS)? > > > I suppose that is possible, but it seems like other people could > > > be > > > using CREATEDIRS, or anything else we might choose as well.  Do > > > you > > > have an example of someone using DIRS already? > > > > > > So I am kind of doubtful that changing this to something else > > > would > > > avoid the problem entirely.. > > > > > > > > > Regards, > > > Brad Davis > > > > > The only way to avoid it entirely would be to declare that anything > > starting with FREEBSD belongs to us and consistantly use it. That > > ship > > sailed about 30 years ago. > > > > My theory is that the longer the name is, the less likely it is to > > clash. Of course, any name you come up with that's good and > > sensible > > and self-documenting is exactly the kind of name that someone else > > is > > likely to come up with as well. > Good point.  But unless someone has an active example, I think I'll > just leave it for now. > There is, of course, no way to provide an active example for "this name is common enough that it might be used in out-of-tree code we are unaware of" since "are unaware of" is the operative phrase. -- Ian From owner-svn-src-head@freebsd.org Mon Jul 23 18:43: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 7F94D1052394; Mon, 23 Jul 2018 18:43:13 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-it0-x22d.google.com (mail-it0-x22d.google.com [IPv6:2607:f8b0:4001:c0b::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 0DF5B89B2C; Mon, 23 Jul 2018 18:43:13 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-it0-x22d.google.com with SMTP id w16-v6so264779ita.0; Mon, 23 Jul 2018 11:43:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=e1REQZ+RBdulVdblpOvUx3L7j+UpKSqsdjATVmwBnU8=; b=ezk94wTnZWW95bl9lUp1y2uG7jcVAQdfTaZLwj35EAfvv/eW1yIarTjPIgCryPUJny aRYBWAFeR7V0Adxa4+Cf62IrRmJ/9UCuULXCmpzcGZ2wqKdIk7FAhAM4d3YWzUT7rTz3 ZdY1KBhckzvXDr2bbntjuErimmRRwvPQUHLhMx140Mcqr16katEj+b6GIQykJm+veRuG ckaq/NDBBm2tsGqNwklv4I0wXMJ5KGi8KCdaNpx88e606KJa0ib+AGaNfqKLIA2YP7np MhS12+NJQVISKc2beemQ7jYu6g7DMKLbHil+lZgirhywsUyYDdeRmfubpwAGDk7UyZ4Z vfGg== 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=e1REQZ+RBdulVdblpOvUx3L7j+UpKSqsdjATVmwBnU8=; b=qObyQkgcKasdEWc+lrvCfsS70d85Kt7k4RT1HDQVoC0WsYuUWPwGenRKMMGl9WHb9Q 25fcC4701ah1VGtInx6NORYmtj/STaVlnZ+k6comRMfIM58UABxoDUsLs6XbddeJa6Xb uaW9v0f9gxPCT/p7VsGAXSDjhoKpeb4n+WTJ2AaqUVQNNjSNU89bLiorXPdnEFFGKcSe xtpkCsS5Ci+qvjmNCyI4PYCPDby6GZs4EuVbiSH+fqN7xOo02mSmIgUdT7npvm3qmsrd wx//XXyuaXCs4TlnWSLqRXeasUsUQU3ZeCPv290bZim2qwLhAHrUDif8JfbviPhgMI4u Dh8Q== X-Gm-Message-State: AOUpUlGph9xhd7astRsxUuGgoZuvFTjyFU/a1fcDO+zxUAmBcpnXDq+1 Fk9GDy0kkqlQ+vtK4gpgF/5tZGvbfgiEIVRrKz+Kgw== X-Google-Smtp-Source: AAOMgpdtvYhmbDHKIdsz8ZZBg90nMv5AgXbzPUpORnOXUg8WEtF2CvJqcZq5tCY2Gw5M0cr32Tn/bp76ZPMLyLH3UYA= X-Received: by 2002:a24:c888:: with SMTP id w130-v6mr178234itf.78.1532371392259; Mon, 23 Jul 2018 11:43:12 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 2002:a6b:290d:0:0:0:0:0 with HTTP; Mon, 23 Jul 2018 11:42:51 -0700 (PDT) In-Reply-To: <201807222332.w6MNWMNp061103@repo.freebsd.org> References: <201807222332.w6MNWMNp061103@repo.freebsd.org> From: Ed Maste Date: Mon, 23 Jul 2018 14:42:51 -0400 X-Google-Sender-Auth: Ipm22V3HO--hBrxb4iyBMmH1_cg Message-ID: Subject: Re: svn commit: r336623 - head/sys/dev/uart 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.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: Mon, 23 Jul 2018 18:43:13 -0000 On 22 July 2018 at 19:32, Matt Macy wrote: > Author: mmacy > Date: Sun Jul 22 23:32:21 2018 > New Revision: 336623 > URL: https://svnweb.freebsd.org/changeset/base/336623 > > Log: > Add busy detect quirk to list of console options After rebasing my working tree and testing this morning I found that the serial console on my Pine64 no longer works; after discussion on IRC manu@ bisected and identified this commit, and I can confirm that reverting the change fixes my console. There are ongoing discussions about possible ways to address this; I'm following up with this info for now in case anyone else encounters this prior to a fix being committed. From owner-svn-src-head@freebsd.org Mon Jul 23 19:27: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 258CC10530BC; Mon, 23 Jul 2018 19:27:12 +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 C143C8B17F; Mon, 23 Jul 2018 19:27:11 +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 9637420C16; Mon, 23 Jul 2018 19:27: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 w6NJRBgN076554; Mon, 23 Jul 2018 19:27:11 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6NJRBFD076553; Mon, 23 Jul 2018 19:27:11 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807231927.w6NJRBFD076553@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 23 Jul 2018 19:27:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336648 - head/sys/dev/uart X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/dev/uart X-SVN-Commit-Revision: 336648 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: Mon, 23 Jul 2018 19:27:12 -0000 Author: imp Date: Mon Jul 23 19:27:11 2018 New Revision: 336648 URL: https://svnweb.freebsd.org/changeset/base/336648 Log: Now that we set the busy_detect bit in the bas to support setting it for the console, set our override in the bas as well. Tested by: emaste@ Modified: head/sys/dev/uart/uart_dev_snps.c Modified: head/sys/dev/uart/uart_dev_snps.c ============================================================================== --- head/sys/dev/uart/uart_dev_snps.c Mon Jul 23 18:47:04 2018 (r336647) +++ head/sys/dev/uart/uart_dev_snps.c Mon Jul 23 19:27:11 2018 (r336648) @@ -107,7 +107,7 @@ snps_uart_attach(struct uart_softc *uart_sc) sc = (struct snps_softc *)uart_sc; /* UART requires to read USR reg when IIR_BUSY */ - sc->ns8250.busy_detect = 1; + uart_sc->sc_bas.busy_detect = 1; return (ns8250_bus_attach(uart_sc)); } From owner-svn-src-head@freebsd.org Mon Jul 23 19:39: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 ED3601053502; Mon, 23 Jul 2018 19:39:21 +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 9BE2A8B820; Mon, 23 Jul 2018 19:39:21 +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 7447820DB9; Mon, 23 Jul 2018 19:39:21 +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 w6NJdLi7081799; Mon, 23 Jul 2018 19:39:21 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6NJdLlD081798; Mon, 23 Jul 2018 19:39:21 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201807231939.w6NJdLlD081798@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 23 Jul 2018 19:39:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336649 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 336649 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: Mon, 23 Jul 2018 19:39:22 -0000 Author: emaste Date: Mon Jul 23 19:39:20 2018 New Revision: 336649 URL: https://svnweb.freebsd.org/changeset/base/336649 Log: arch.7: Clarify architecture-specific macro use Compilers may define multiple variants of architecture-specific macros (for example, both __x86_64 and __x86_64__). Add a note that the macros documented in arch.7 are the preferred ones for FreeBSD. Sponsored by: The FreeBSD Foundation Modified: head/share/man/man7/arch.7 Modified: head/share/man/man7/arch.7 ============================================================================== --- head/share/man/man7/arch.7 Mon Jul 23 19:27:11 2018 (r336648) +++ head/share/man/man7/arch.7 Mon Jul 23 19:39:20 2018 (r336649) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 5, 2018 +.Dd July 23, 2018 .Dt ARCH 7 .Os .Sh NAME @@ -342,6 +342,10 @@ Architecture-specific macros: .It riscv64sf Ta Dv __riscv, Dv __riscv_xlen == 64 .It sparc64 Ta Dv __sparc64__ .El +.Pp +Compilers may define additional variants of architecture-specific macros. +The macros above are preferred for use in +.Fx . .Ss Important Xr make 1 variables Most of the externally settable variables are defined in the .Xr build 7 From owner-svn-src-head@freebsd.org Mon Jul 23 19:49: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 E89101053772; Mon, 23 Jul 2018 19:49:54 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 99A348BD27; Mon, 23 Jul 2018 19:49:54 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 76C7420F55; Mon, 23 Jul 2018 19:49:54 +0000 (UTC) (envelope-from lwhsu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6NJnsvt086806; Mon, 23 Jul 2018 19:49:54 GMT (envelope-from lwhsu@FreeBSD.org) Received: (from lwhsu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6NJns7O086805; Mon, 23 Jul 2018 19:49:54 GMT (envelope-from lwhsu@FreeBSD.org) Message-Id: <201807231949.w6NJns7O086805@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: lwhsu set sender to lwhsu@FreeBSD.org using -f From: Li-Wen Hsu Date: Mon, 23 Jul 2018 19:49:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336650 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: lwhsu X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 336650 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: Mon, 23 Jul 2018 19:49:55 -0000 Author: lwhsu (ports committer) Date: Mon Jul 23 19:49:54 2018 New Revision: 336650 URL: https://svnweb.freebsd.org/changeset/base/336650 Log: Use __riscv to determine building for RISC-V Reviewed by: br Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D16398 Modified: head/sys/vm/vm_unix.c Modified: head/sys/vm/vm_unix.c ============================================================================== --- head/sys/vm/vm_unix.c Mon Jul 23 19:39:20 2018 (r336649) +++ head/sys/vm/vm_unix.c Mon Jul 23 19:49:54 2018 (r336650) @@ -69,7 +69,7 @@ struct break_args { int sys_break(struct thread *td, struct break_args *uap) { -#if !defined(__aarch64__) && !defined(__riscv__) +#if !defined(__aarch64__) && !defined(__riscv) uintptr_t addr; int error; @@ -78,9 +78,9 @@ sys_break(struct thread *td, struct break_args *uap) if (error == 0) td->td_retval[0] = addr; return (error); -#else /* defined(__aarch64__) || defined(__riscv__) */ +#else /* defined(__aarch64__) || defined(__riscv) */ return (ENOSYS); -#endif /* defined(__aarch64__) || defined(__riscv__) */ +#endif /* defined(__aarch64__) || defined(__riscv) */ } int From owner-svn-src-head@freebsd.org Mon Jul 23 20:12: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 35FE01053BAA; Mon, 23 Jul 2018 20:12:14 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (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 75E188C74E; Mon, 23 Jul 2018 20:12:13 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id hhBgfhboxWppDhhBif430z; Mon, 23 Jul 2018 14:12:11 -0600 X-Authority-Analysis: v=2.3 cv=YIcrNiOx c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=8nJEP1OIZ-IA:10 a=R9QF1RCXAYgA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=SLG1KRGDAAAA:8 a=Tq4HStg9fdlw6S220CAA:9 a=-bbj4nsU9_4jBfzN:21 a=OjIXCo247HOtV3fr:21 a=wPNLvfGTeEIA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=-TBaU1e9WpdkKBzYXnwo:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id CAA2DAE2; Mon, 23 Jul 2018 13:12:13 -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 w6NKBqcU050309; Mon, 23 Jul 2018 13:11:52 -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 w6NKBqgT050306; Mon, 23 Jul 2018 13:11:52 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201807232011.w6NKBqgT050306@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: Cy Schubert , Alan Somers , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r336619 - head/lib/libc/gen In-Reply-To: Message from Ian Lepore of "Mon, 23 Jul 2018 10:51:19 -0600." <1532364679.1344.161.camel@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Mon, 23 Jul 2018 13:11:52 -0700 X-CMAE-Envelope: MS4wfJlUApib6/nhcE0BL0ck04rGeIQLdO7hojKmFmAD/F/cNJP1GAGLtV37yie8FM7hN+XYxvPdP/LvG6HIZ47BuLZRQMfTP4ctHgGXYNja6z0+oSWxByGx db2skofcDtPDxqmkS7siXiKwU+pUjldxX9HltxjXbNIJm4WIInEOd8EzT35qOhV1Awpf32eEZ+1d223PIkbCzHlVgJ9Ue++SSJhbERhMkfTJ4FyIOPpeFxPX Ca7J8ojABOYqFjcLtXxRrRPj4ynvQUC4R5Mt4LMYnt1ZCgIwQ1DT3dFnF0UcmvYhIicc/7A4GqevGdP6ST2oj7x4dd3SUEEECWreIHsbj7Q= 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: Mon, 23 Jul 2018 20:12:14 -0000 In message <1532364679.1344.161.camel@freebsd.org>, Ian Lepore writes: > On Mon, 2018-07-23 at 09:41 -0700, Cy Schubert wrote: > > I'm sure. Rolling this libc commit back addressed the ssh segfaults > > on all my systems. > > > > --- > > Sent using a tiny phone keyboard. > > Apologies for any typos and autocorrect. > > Also, this old phone only supports top post. Apologies. > > > > Cy Schubert > > or > > The need of the many outweighs the greed of the few. > > --- > > > > My current working theory is that some of the software that uses > __pw_scan() pre-stages a pointer-to-empty-string into the pw_class > field and my change ruined that by replacing it with a NULL pointer. > Other callers of __pw_scan() don't do that, they just assume they're > running as root and will get all the fields populated. Yes. A simple check for pw->pw_class != NULL should fix this instance. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. > > -- Ian > > > -----Original Message----- > > From: Alan Somers > > Sent: 23/07/2018 07:48 > > To: Cy Schubert > > Cc: Ian Lepore; src-committers; svn-src-all@freebsd.org; svn-src-head > > @freebsd.org > > Subject: Re: svn commit: r336619 - head/lib/libc/gen > > > > > > > > On Sun, Jul 22, 2018 at 11:13 PM, Cy Schubert > com> wrote: > > > > In message <201807222234.w6MMYKpn030237@repo.freebsd.org>, Ian > > Lepore  > > writes: > >   > > > > > > > > Author: ian > >  > Date: Sun Jul 22 22:34:20 2018 > >  > New Revision: 336619 > >  > URL: https://svnweb.freebsd.org/changeset/base/336619 > >  > > >  > Log: > >  >   Set the pw_class field to NULL when scanning the non-master > > passwd file. > >  >   This avoids a null pointer deref in pw_dup(), which assumes that > > all > >  >   pointers are either NULL or valid. > >  > > >  > Modified: > >  >   head/lib/libc/gen/pw_scan.c > >  > > > > >   > > Hi Ian, > >   > > This causes ssh a bit of gas. > >   > > > > > > > > > > Are you sure, Cy?  Judging by the Jenkins output, I think it was the > > next revision to pw (336625) that broke everything.  https://ci.freeb > > sd.org/job/FreeBSD-head-amd64-test/8320/ . > > > > > > > > > > -Alan  > From owner-svn-src-head@freebsd.org Mon Jul 23 20:36: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 63B82105438B; Mon, 23 Jul 2018 20:36:26 +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 19F0B8D36C; Mon, 23 Jul 2018 20:36:26 +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 EBC882175D; Mon, 23 Jul 2018 20:36:25 +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 w6NKaPOR012070; Mon, 23 Jul 2018 20:36:25 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6NKaPs2012068; Mon, 23 Jul 2018 20:36:25 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807232036.w6NKaPs2012068@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 23 Jul 2018 20:36:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336651 - in head/stand/efi: include libefi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/stand/efi: include libefi X-SVN-Commit-Revision: 336651 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: Mon, 23 Jul 2018 20:36:26 -0000 Author: imp Date: Mon Jul 23 20:36:25 2018 New Revision: 336651 URL: https://svnweb.freebsd.org/changeset/base/336651 Log: Implement efi_devpath_to_media_path Takes a generic device path as its input. Scans through it to find the first media_path node in it and returns a pointer to it. If none is found, NULL is returned. Sponsored by: Netflix Modified: head/stand/efi/include/efilib.h head/stand/efi/libefi/devpath.c Modified: head/stand/efi/include/efilib.h ============================================================================== --- head/stand/efi/include/efilib.h Mon Jul 23 19:49:54 2018 (r336650) +++ head/stand/efi/include/efilib.h Mon Jul 23 20:36:25 2018 (r336651) @@ -88,6 +88,7 @@ bool efi_devpath_match(EFI_DEVICE_PATH *, EFI_DEVICE_P bool efi_devpath_is_prefix(EFI_DEVICE_PATH *, EFI_DEVICE_PATH *); CHAR16 *efi_devpath_name(EFI_DEVICE_PATH *); void efi_free_devpath_name(CHAR16 *); +EFI_DEVICE_PATH *efi_devpath_to_media_path(EFI_DEVICE_PATH *); int efi_status_to_errno(EFI_STATUS); EFI_STATUS errno_to_efi_status(int errno); Modified: head/stand/efi/libefi/devpath.c ============================================================================== --- head/stand/efi/libefi/devpath.c Mon Jul 23 19:49:54 2018 (r336650) +++ head/stand/efi/libefi/devpath.c Mon Jul 23 20:36:25 2018 (r336651) @@ -195,3 +195,19 @@ efi_devpath_is_prefix(EFI_DEVICE_PATH *prefix, EFI_DEV } return (true); } + +/* + * Skip over the 'prefix' part of path and return the part of the path + * that starts with the first node that's a MEDIA_DEVICE_PATH. + */ +EFI_DEVICE_PATH * +efi_devpath_to_media_path(EFI_DEVICE_PATH *path) +{ + + while (!IsDevicePathEnd(path)) { + if (DevicePathType(path) == MEDIA_DEVICE_PATH) + return (path); + path = NextDevicePathNode(path); + } + return (NULL); +} From owner-svn-src-head@freebsd.org Mon Jul 23 20:36: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 1196F10543D8; Mon, 23 Jul 2018 20:36:42 +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 B8D098D490; Mon, 23 Jul 2018 20:36:41 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 802102175E; Mon, 23 Jul 2018 20:36:41 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6NKafNY012130; Mon, 23 Jul 2018 20:36:41 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6NKafpE012129; Mon, 23 Jul 2018 20:36:41 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807232036.w6NKafpE012129@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 23 Jul 2018 20:36:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336652 - head/stand/efi/libefi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/efi/libefi X-SVN-Commit-Revision: 336652 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: Mon, 23 Jul 2018 20:36:42 -0000 Author: imp Date: Mon Jul 23 20:36:41 2018 New Revision: 336652 URL: https://svnweb.freebsd.org/changeset/base/336652 Log: Store the number of handles we get back in efipart_nhandles rather than the number of bytes. Don't divide by the element size every time we have to iterate. Eliminate now-unused variables. Sponsored by: Netflix Modified: head/stand/efi/libefi/efipart.c Modified: head/stand/efi/libefi/efipart.c ============================================================================== --- head/stand/efi/libefi/efipart.c Mon Jul 23 20:36:25 2018 (r336651) +++ head/stand/efi/libefi/efipart.c Mon Jul 23 20:36:41 2018 (r336652) @@ -210,7 +210,7 @@ efipart_inithandles(void) return (efi_status_to_errno(status)); efipart_handles = hin; - efipart_nhandles = sz; + efipart_nhandles = sz / sizeof(*hin); #ifdef EFIPART_DEBUG printf("%s: Got %d BLOCK IO MEDIA handle(s)\n", __func__, efipart_nhandles); @@ -246,7 +246,7 @@ efipart_floppy(EFI_DEVICE_PATH *node) static bool efipart_hdd(EFI_DEVICE_PATH *dp) { - unsigned i, nin; + unsigned i; EFI_DEVICE_PATH *devpath, *node; EFI_BLOCK_IO *blkio; EFI_STATUS status; @@ -264,8 +264,7 @@ efipart_hdd(EFI_DEVICE_PATH *dp) * Test every EFI BLOCK IO handle to make sure dp is not device path * for CD/DVD. */ - nin = efipart_nhandles / sizeof (*efipart_handles); - for (i = 0; i < nin; i++) { + for (i = 0; i < efipart_nhandles; i++) { devpath = efi_lookup_devpath(efipart_handles[i]); if (devpath == NULL) return (false); @@ -340,10 +339,9 @@ efipart_updatefd(void) { EFI_DEVICE_PATH *devpath, *node; ACPI_HID_DEVICE_PATH *acpi; - int i, nin; + int i; - nin = efipart_nhandles / sizeof (*efipart_handles); - for (i = 0; i < nin; i++) { + for (i = 0; i < efipart_nhandles; i++) { devpath = efi_lookup_devpath(efipart_handles[i]); if (devpath == NULL) continue; @@ -410,14 +408,13 @@ efipart_cdinfo_add(EFI_HANDLE handle, EFI_HANDLE alias static void efipart_updatecd(void) { - int i, nin; + int i; EFI_DEVICE_PATH *devpath, *devpathcpy, *tmpdevpath, *node; EFI_HANDLE handle; EFI_BLOCK_IO *blkio; EFI_STATUS status; - nin = efipart_nhandles / sizeof (*efipart_handles); - for (i = 0; i < nin; i++) { + for (i = 0; i < efipart_nhandles; i++) { devpath = efi_lookup_devpath(efipart_handles[i]); if (devpath == NULL) continue; @@ -666,14 +663,13 @@ efipart_hdinfo_add_filepath(EFI_HANDLE disk_handle) static void efipart_updatehd(void) { - int i, nin; + int i; EFI_DEVICE_PATH *devpath, *devpathcpy, *tmpdevpath, *node; EFI_HANDLE handle; EFI_BLOCK_IO *blkio; EFI_STATUS status; - nin = efipart_nhandles / sizeof (*efipart_handles); - for (i = 0; i < nin; i++) { + for (i = 0; i < efipart_nhandles; i++) { devpath = efi_lookup_devpath(efipart_handles[i]); if (devpath == NULL) continue; From owner-svn-src-head@freebsd.org Mon Jul 23 20:36: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 5D9C51054400; Mon, 23 Jul 2018 20:36: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 6E6798D4FB; Mon, 23 Jul 2018 20:36:47 +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 8273F2175F; Mon, 23 Jul 2018 20:36:46 +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 w6NKakkh012183; Mon, 23 Jul 2018 20:36:46 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6NKajfu012182; Mon, 23 Jul 2018 20:36:45 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807232036.w6NKajfu012182@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 23 Jul 2018 20:36:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336653 - in head/stand/efi: include libefi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/stand/efi: include libefi X-SVN-Commit-Revision: 336653 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: Mon, 23 Jul 2018 20:36:49 -0000 Author: imp Date: Mon Jul 23 20:36:45 2018 New Revision: 336653 URL: https://svnweb.freebsd.org/changeset/base/336653 Log: Implement efi_devpath_match_node Returns true if the first node pointed to by devpath1 is identical to the first node pointed to by devpath2, with care taken to not read past the end of the valid parts of either devpath1 or devpath2. Otherwise, returns false. Sponsored by: Netflix Modified: head/stand/efi/include/efilib.h head/stand/efi/libefi/devpath.c Modified: head/stand/efi/include/efilib.h ============================================================================== --- head/stand/efi/include/efilib.h Mon Jul 23 20:36:41 2018 (r336652) +++ head/stand/efi/include/efilib.h Mon Jul 23 20:36:45 2018 (r336653) @@ -85,6 +85,7 @@ EFI_HANDLE efi_devpath_handle(EFI_DEVICE_PATH *); EFI_DEVICE_PATH *efi_devpath_last_node(EFI_DEVICE_PATH *); EFI_DEVICE_PATH *efi_devpath_trim(EFI_DEVICE_PATH *); bool efi_devpath_match(EFI_DEVICE_PATH *, EFI_DEVICE_PATH *); +bool efi_devpath_match_node(EFI_DEVICE_PATH *, EFI_DEVICE_PATH *); bool efi_devpath_is_prefix(EFI_DEVICE_PATH *, EFI_DEVICE_PATH *); CHAR16 *efi_devpath_name(EFI_DEVICE_PATH *); void efi_free_devpath_name(CHAR16 *); Modified: head/stand/efi/libefi/devpath.c ============================================================================== --- head/stand/efi/libefi/devpath.c Mon Jul 23 20:36:41 2018 (r336652) +++ head/stand/efi/libefi/devpath.c Mon Jul 23 20:36:45 2018 (r336653) @@ -140,25 +140,33 @@ efi_devpath_handle(EFI_DEVICE_PATH *devpath) } bool -efi_devpath_match(EFI_DEVICE_PATH *devpath1, EFI_DEVICE_PATH *devpath2) +efi_devpath_match_node(EFI_DEVICE_PATH *devpath1, EFI_DEVICE_PATH *devpath2) { size_t len; if (devpath1 == NULL || devpath2 == NULL) return (false); + if (DevicePathType(devpath1) != DevicePathType(devpath2) || + DevicePathSubType(devpath1) != DevicePathSubType(devpath2)) + return (false); + len = DevicePathNodeLength(devpath1); + if (len != DevicePathNodeLength(devpath2)) + return (false); + if (memcmp(devpath1, devpath2, len) != 0) + return (false); + return (true); +} - while (true) { - if (DevicePathType(devpath1) != DevicePathType(devpath2) || - DevicePathSubType(devpath1) != DevicePathSubType(devpath2)) - return (false); +bool +efi_devpath_match(EFI_DEVICE_PATH *devpath1, EFI_DEVICE_PATH *devpath2) +{ - len = DevicePathNodeLength(devpath1); - if (len != DevicePathNodeLength(devpath2)) - return (false); + if (devpath1 == NULL || devpath2 == NULL) + return (false); - if (memcmp(devpath1, devpath2, len) != 0) - return (false); - + while (true) { + if (!efi_devpath_match_node(devpath1, devpath2)) + return false; if (IsDevicePathEnd(devpath1)) break; devpath1 = NextDevicePathNode(devpath1); From owner-svn-src-head@freebsd.org Mon Jul 23 20:36: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 5B1BE1054411; Mon, 23 Jul 2018 20:36:51 +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 0E2388D579; Mon, 23 Jul 2018 20:36:51 +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 E4D6C21760; Mon, 23 Jul 2018 20:36:50 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6NKaoZu012237; Mon, 23 Jul 2018 20:36:50 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6NKaoru012235; Mon, 23 Jul 2018 20:36:50 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807232036.w6NKaoru012235@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 23 Jul 2018 20:36:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336654 - in head/stand/efi: include libefi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/stand/efi: include libefi X-SVN-Commit-Revision: 336654 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: Mon, 23 Jul 2018 20:36:51 -0000 Author: imp Date: Mon Jul 23 20:36:50 2018 New Revision: 336654 URL: https://svnweb.freebsd.org/changeset/base/336654 Log: Implement efi_devpath_length Return the total length, in bytes, of the device path (including the terminating node at the end). Sponsored by: Netflix Modified: head/stand/efi/include/efilib.h head/stand/efi/libefi/devpath.c Modified: head/stand/efi/include/efilib.h ============================================================================== --- head/stand/efi/include/efilib.h Mon Jul 23 20:36:45 2018 (r336653) +++ head/stand/efi/include/efilib.h Mon Jul 23 20:36:50 2018 (r336654) @@ -90,6 +90,7 @@ bool efi_devpath_is_prefix(EFI_DEVICE_PATH *, EFI_DEVI CHAR16 *efi_devpath_name(EFI_DEVICE_PATH *); void efi_free_devpath_name(CHAR16 *); EFI_DEVICE_PATH *efi_devpath_to_media_path(EFI_DEVICE_PATH *); +UINTN efi_devpath_length(EFI_DEVICE_PATH *); int efi_status_to_errno(EFI_STATUS); EFI_STATUS errno_to_efi_status(int errno); Modified: head/stand/efi/libefi/devpath.c ============================================================================== --- head/stand/efi/libefi/devpath.c Mon Jul 23 20:36:45 2018 (r336653) +++ head/stand/efi/libefi/devpath.c Mon Jul 23 20:36:50 2018 (r336654) @@ -219,3 +219,13 @@ efi_devpath_to_media_path(EFI_DEVICE_PATH *path) } return (NULL); } + +UINTN +efi_devpath_length(EFI_DEVICE_PATH *path) +{ + EFI_DEVICE_PATH *start = path; + + while (!IsDevicePathEnd(path)) + path = NextDevicePathNode(path); + return ((UINTN)path - (UINTN)start) + DevicePathNodeLength(path); +} From owner-svn-src-head@freebsd.org Mon Jul 23 20:37: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 255B41054446; Mon, 23 Jul 2018 20:37:01 +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 0615B8D65F; Mon, 23 Jul 2018 20:36:55 +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 9536121761; Mon, 23 Jul 2018 20:36:55 +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 w6NKatYJ012292; Mon, 23 Jul 2018 20:36:55 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6NKatBr012291; Mon, 23 Jul 2018 20:36:55 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807232036.w6NKatBr012291@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 23 Jul 2018 20:36:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336655 - in head/stand/efi: include libefi X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/stand/efi: include libefi X-SVN-Commit-Revision: 336655 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: Mon, 23 Jul 2018 20:37:01 -0000 Author: imp Date: Mon Jul 23 20:36:54 2018 New Revision: 336655 URL: https://svnweb.freebsd.org/changeset/base/336655 Log: Implement efiblk_get_pdinfo_by_device_path Lookup a block device by it's device path. We use a 'loose' lookup whereby we scan forward to the first Media Path portion of the device path, then look at all our handles for one whose first Media Path matches. This will also work if the device path pointed to has a following file path (or paths) as that's ignored. It assumes that there's only one media path node that describes the entire device, which is true as of the latest UEFI spec (2.7 Errata A) as far as I've been able to determine. Sponsored by: Netflix Modified: head/stand/efi/include/efilib.h head/stand/efi/libefi/efipart.c Modified: head/stand/efi/include/efilib.h ============================================================================== --- head/stand/efi/include/efilib.h Mon Jul 23 20:36:50 2018 (r336654) +++ head/stand/efi/include/efilib.h Mon Jul 23 20:36:54 2018 (r336655) @@ -66,6 +66,7 @@ typedef struct pdinfo pdinfo_list_t *efiblk_get_pdinfo_list(struct devsw *dev); pdinfo_t *efiblk_get_pdinfo(struct devdesc *dev); pdinfo_t *efiblk_get_pdinfo_by_handle(EFI_HANDLE h); +pdinfo_t *efiblk_get_pdinfo_by_device_path(EFI_DEVICE_PATH *path); void *efi_get_table(EFI_GUID *tbl); Modified: head/stand/efi/libefi/efipart.c ============================================================================== --- head/stand/efi/libefi/efipart.c Mon Jul 23 20:36:50 2018 (r336654) +++ head/stand/efi/libefi/efipart.c Mon Jul 23 20:36:54 2018 (r336655) @@ -137,6 +137,28 @@ efiblk_get_pdinfo(struct devdesc *dev) return (pd); } +pdinfo_t * +efiblk_get_pdinfo_by_device_path(EFI_DEVICE_PATH *path) +{ + unsigned i; + EFI_DEVICE_PATH *media, *devpath; + EFI_HANDLE h; + + media = efi_devpath_to_media_path(path); + if (media == NULL) + return (NULL); + for (i = 0; i < efipart_nhandles; i++) { + h = efipart_handles[i]; + devpath = efi_lookup_devpath(h); + if (devpath == NULL) + continue; + if (!efi_devpath_match_node(media, efi_devpath_to_media_path(devpath))) + continue; + return (efiblk_get_pdinfo_by_handle(h)); + } + return (NULL); +} + static bool same_handle(pdinfo_t *pd, EFI_HANDLE h) { From owner-svn-src-head@freebsd.org Mon Jul 23 20:37: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 3CB96105444E; Mon, 23 Jul 2018 20:37: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 7093B8D73D; Mon, 23 Jul 2018 20:37:00 +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 2DFA821762; Mon, 23 Jul 2018 20:37:00 +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 w6NKb0qC012347; Mon, 23 Jul 2018 20:37:00 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6NKax98012346; Mon, 23 Jul 2018 20:36:59 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807232036.w6NKax98012346@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 23 Jul 2018 20:36:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336656 - in head: . stand/efi/loader X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: . stand/efi/loader X-SVN-Commit-Revision: 336656 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: Mon, 23 Jul 2018 20:37:02 -0000 Author: imp Date: Mon Jul 23 20:36:59 2018 New Revision: 336656 URL: https://svnweb.freebsd.org/changeset/base/336656 Log: Finalize the boot manager protocol support for next-stage boot loading. If we are booting in a conforming UEFI Boot Manager Environment, then use the BootCurrent variable to find the BootXXXX we're using. Once we find that, then if it contains more than one EFI_DEVICE_PATH in its what to boot section, try to use the last one as the kernel to load. This will also set the default root partition as well. If there's only one path, or if there's an error along the way, assume that nothing specific was specified and revert to the old algorithm. If something was specified, but not found, then fail the boot. Otherwise you that, specific thing. On FreeBSD, this can be set using efibootmgr -l -k . We try a few variations of kernel to cope with the fact that UEFI comes from a DOS world where paths might be upper case and/or contain back-slashes. Note: In an ideal world, we'd work out where we are in chain loading by looking at the passed-in image handle and doing name matching. However, that's unreliable since at least boot1.efi booted images don't have that, hence the assumption that loader.efi needs to load the last thing on the list, if possible. The reason we fail for something specific is so that we can fully participate in the UEFI Boot Manager Protocol and fail over to the next item in the list of BootOrder choices when something goes wrong at this stage. This implements was was talked about in freebsd-arch@ last year https://docs.freebsd.org/cgi/getmsg.cgi?fetch=3576+0+archive/2017/freebsd-arch/20171022.freebsd-arch and documented in full (after changed resulting from the discussion) in https://docs.google.com/document/d/1aK9IqF-60JPEbUeSAUAkYjF2W_8EnmczFs6RqCT90Jg/edit# although one or two minor details may have been modified in this implementation to make it work, and the ZFS MEDIA PATH extension isn't implemented. This does not yet move things to ESP:\efi\freebsd\loader.efi. RelNotes: Yes Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D16403 Modified: head/UPDATING head/stand/efi/loader/main.c Modified: head/UPDATING ============================================================================== --- head/UPDATING Mon Jul 23 20:36:54 2018 (r336655) +++ head/UPDATING Mon Jul 23 20:36:59 2018 (r336656) @@ -31,6 +31,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20180723: + loader.efi has been augmented to participate more fully in the + UEFI boot manager protocol. + 20180720: zfsloader's functionality has now been folded into loader. zfsloader is no longer necesasary once you've updated your Modified: head/stand/efi/loader/main.c ============================================================================== --- head/stand/efi/loader/main.c Mon Jul 23 20:36:54 2018 (r336655) +++ head/stand/efi/loader/main.c Mon Jul 23 20:36:59 2018 (r336656) @@ -1,6 +1,7 @@ /*- * Copyright (c) 2008-2010 Rui Paulo * Copyright (c) 2006 Marcel Moolenaar + * Copyright (c) 2018 Netflix, Inc * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -41,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include @@ -83,6 +85,11 @@ EFI_GUID inputid = SIMPLE_TEXT_INPUT_PROTOCOL; */ static int fail_timeout = 5; +/* + * Current boot variable + */ +UINT16 boot_current; + static bool has_keyboard(void) { @@ -274,9 +281,145 @@ try_as_currdev(pdinfo_t *hd, pdinfo_t *pp) return (sanity_check_currdev()); } +/* + * Sometimes we get filenames that are all upper case + * and/or have backslashes in them. Filter all this out + * if it looks like we need to do so. + */ +static void +fix_dosisms(char *p) +{ + while (*p) { + if (isupper(*p)) + *p = tolower(*p); + else if (*p == '\\') + *p = '/'; + p++; + } +} + +enum { BOOT_INFO_OK = 0, BAD_CHOICE = 1, NOT_SPECIFIC = 2 }; static int -find_currdev(EFI_LOADED_IMAGE *img) +match_boot_info(EFI_LOADED_IMAGE *img __unused, char *boot_info, size_t bisz) { + uint32_t attr; + uint16_t fplen; + size_t len; + char *walker, *ep; + EFI_DEVICE_PATH *dp, *edp, *first_dp, *last_dp; + pdinfo_t *pp; + CHAR16 *descr; + char *kernel = NULL; + FILEPATH_DEVICE_PATH *fp; + struct stat st; + + /* + * FreeBSD encodes it's boot loading path into the boot loader + * BootXXXX variable. We look for the last one in the path + * and use that to load the kernel. However, if we only fine + * one DEVICE_PATH, then there's nothing specific and we should + * fall back. + * + * In an ideal world, we'd look at the image handle we were + * passed, match up with the loader we are and then return the + * next one in the path. This would be most flexible and cover + * many chain booting scenarios where you need to use this + * boot loader to get to the next boot loader. However, that + * doesn't work. We rarely have the path to the image booted + * (just the device) so we can't count on that. So, we do the + * enxt best thing, we look through the device path(s) passed + * in the BootXXXX varaible. If there's only one, we return + * NOT_SPECIFIC. Otherwise, we look at the last one and try to + * load that. If we can, we return BOOT_INFO_OK. Otherwise we + * return BAD_CHOICE for the caller to sort out. + */ + if (bisz < sizeof(attr) + sizeof(fplen) + sizeof(CHAR16)) + return NOT_SPECIFIC; + walker = boot_info; + ep = walker + bisz; + memcpy(&attr, walker, sizeof(attr)); + walker += sizeof(attr); + memcpy(&fplen, walker, sizeof(fplen)); + walker += sizeof(fplen); + descr = (CHAR16 *)(intptr_t)walker; + len = ucs2len(descr); + walker += (len + 1) * sizeof(CHAR16); + last_dp = first_dp = dp = (EFI_DEVICE_PATH *)walker; + edp = (EFI_DEVICE_PATH *)(walker + fplen); + if ((char *)edp > ep) + return NOT_SPECIFIC; + while (dp < edp) { + last_dp = dp; + dp = (EFI_DEVICE_PATH *)((char *)dp + efi_devpath_length(dp)); + } + + /* + * If there's only one item in the list, then nothing was + * specified. + */ + if (last_dp == first_dp) + return NOT_SPECIFIC; + + /* + * OK. At this point we either have a good path or a bad one. + * Let's check. + */ + pp = efiblk_get_pdinfo_by_device_path(last_dp); + if (pp == NULL) + return BAD_CHOICE; + set_currdev_pdinfo(pp); + if (!sanity_check_currdev()) + return BAD_CHOICE; + + /* + * OK. We've found a device that matches, next we need to check the last + * component of the path. If it's a file, then we set the default kernel + * to that. Otherwise, just use this as the default root. + * + * Reminder: we're running very early, before we've parsed the defaults + * file, so we may need to have a hack override. + */ + dp = efi_devpath_last_node(last_dp); + if (DevicePathType(dp) != MEDIA_DEVICE_PATH || + DevicePathSubType(dp) != MEDIA_FILEPATH_DP) + return (BOOT_INFO_OK); /* use currdir, default kernel */ + fp = (FILEPATH_DEVICE_PATH *)dp; + ucs2_to_utf8(fp->PathName, &kernel); + if (kernel == NULL) + return (BAD_CHOICE); + if (*kernel == '\\' || isupper(*kernel)) + fix_dosisms(kernel); + if (stat(kernel, &st) != 0) { + free(kernel); + return (BAD_CHOICE); + } + setenv("kernel", kernel, 1); + free(kernel); + + return (BOOT_INFO_OK); +} + +/* + * Look at the passed-in boot_info, if any. If we find it then we need + * to see if we can find ourselves in the boot chain. If we can, and + * there's another specified thing to boot next, assume that the file + * is loaded from / and use that for the root filesystem. If can't + * find the specified thing, we must fail the boot. If we're last on + * the list, then we fallback to looking for the first available / + * candidate (ZFS, if there's a bootable zpool, otherwise a UFS + * partition that has either /boot/defaults/loader.conf on it or + * /boot/kernel/kernel (the default kernel) that we can use. + * + * We always fail if we can't find the right thing. However, as + * a concession to buggy UEFI implementations, like u-boot, if + * we have determined that the host is violating the UEFI boot + * manager protocol, we'll signal the rest of the program that + * a drop to the OK boot loader prompt is possible. + */ +static int +find_currdev(EFI_LOADED_IMAGE *img, bool do_bootmgr, bool is_last, + char *boot_info, size_t boot_info_sz) +{ pdinfo_t *dp, *pp; EFI_DEVICE_PATH *devpath, *copy; EFI_HANDLE h; @@ -284,8 +427,13 @@ find_currdev(EFI_LOADED_IMAGE *img) struct devsw *dev; int unit; uint64_t extra; + int rv; char *rootdev; + /* + * First choice: if rootdev is already set, use that, even if + * it's wrong. + */ rootdev = getenv("rootdev"); if (rootdev != NULL) { printf("Setting currdev to configured rootdev %s\n", rootdev); @@ -293,6 +441,25 @@ find_currdev(EFI_LOADED_IMAGE *img) return (0); } + /* + * Second choice: If we can find out image boot_info, and there's + * a follow-on boot image in that boot_info, use that. In this + * case root will be the partition specified in that image and + * we'll load the kernel specified by the file path. Should there + * not be a filepath, we use the default. This filepath overrides + * loader.conf. + */ + if (do_bootmgr) { + rv = match_boot_info(img, boot_info, boot_info_sz); + switch (rv) { + case BOOT_INFO_OK: /* We found it */ + return (0); + case BAD_CHOICE: /* specified file not found -> error */ + /* XXX do we want to have an escape hatch for last in boot order? */ + return (ENOENT); + } /* Nothing specified, try normal match */ + } + #ifdef EFI_ZFS_BOOT /* * Did efi_zfs_probe() detect the boot pool? If so, use the zpool @@ -332,7 +499,7 @@ find_currdev(EFI_LOADED_IMAGE *img) /* * Roll up the ZFS special case * for those partitions that have - * zpools on them + * zpools on them. */ if (try_as_currdev(dp, pp)) return (0); @@ -529,15 +696,17 @@ main(int argc, CHAR16 *argv[]) EFI_GUID *guid; int howto, i, uhowto; UINTN k; - bool has_kbd; + bool has_kbd, is_last; char *s; EFI_DEVICE_PATH *imgpath; CHAR16 *text; - EFI_STATUS status; - UINT16 boot_current; - size_t sz; + EFI_STATUS rv; + size_t sz, bosz = 0, bisz = 0; UINT16 boot_order[100]; + char boot_info[4096]; EFI_LOADED_IMAGE *img; + char buf[32]; + bool uefi_boot_mgr; archsw.arch_autoload = efi_autoload; archsw.arch_getdev = efi_getdev; @@ -669,8 +838,8 @@ main(int argc, CHAR16 *argv[]) efi_free_devpath_name(text); } - status = BS->HandleProtocol(img->DeviceHandle, &devid, (void **)&imgpath); - if (status == EFI_SUCCESS) { + rv = BS->HandleProtocol(img->DeviceHandle, &devid, (void **)&imgpath); + if (rv == EFI_SUCCESS) { text = efi_devpath_name(imgpath); if (text != NULL) { printf(" Load Device: %S\n", text); @@ -679,20 +848,55 @@ main(int argc, CHAR16 *argv[]) } } + uefi_boot_mgr = true; boot_current = 0; sz = sizeof(boot_current); - efi_global_getenv("BootCurrent", &boot_current, &sz); - printf(" BootCurrent: %04x\n", boot_current); + rv = efi_global_getenv("BootCurrent", &boot_current, &sz); + if (rv == EFI_SUCCESS) + printf(" BootCurrent: %04x\n", boot_current); + else { + boot_current = 0xffff; + uefi_boot_mgr = false; + } sz = sizeof(boot_order); - efi_global_getenv("BootOrder", &boot_order, &sz); - printf(" BootOrder:"); - for (i = 0; i < sz / sizeof(boot_order[0]); i++) - printf(" %04x%s", boot_order[i], - boot_order[i] == boot_current ? "[*]" : ""); - printf("\n"); + rv = efi_global_getenv("BootOrder", &boot_order, &sz); + if (rv == EFI_SUCCESS) { + printf(" BootOrder:"); + for (i = 0; i < sz / sizeof(boot_order[0]); i++) + printf(" %04x%s", boot_order[i], + boot_order[i] == boot_current ? "[*]" : ""); + printf("\n"); + is_last = boot_order[(sz / sizeof(boot_order[0])) - 1] == boot_current; + bosz = sz; + } else if (uefi_boot_mgr) { + /* + * u-boot doesn't set BootOrder, but otherwise participates in the + * boot manager protocol. So we fake it here and don't consider it + * a failure. + */ + bosz = sizeof(boot_order[0]); + boot_order[0] = boot_current; + is_last = true; + } /* + * Next, find the boot info structure the UEFI boot manager is + * supposed to setup. We need this so we can walk through it to + * find where we are in the booting process and what to try to + * boot next. + */ + if (uefi_boot_mgr) { + snprintf(buf, sizeof(buf), "Boot%04X", boot_current); + sz = sizeof(boot_info); + rv = efi_global_getenv(buf, &boot_info, &sz); + if (rv == EFI_SUCCESS) + bisz = sz; + else + uefi_boot_mgr = false; + } + + /* * Disable the watchdog timer. By default the boot manager sets * the timer to 5 minutes before invoking a boot option. If we * want to return to the boot manager, we have to disable the @@ -710,7 +914,7 @@ main(int argc, CHAR16 *argv[]) * the boot protocol and also allow an escape hatch for users wishing * to try something different. */ - if (find_currdev(img) != 0) + if (find_currdev(img, uefi_boot_mgr, is_last, boot_info, bisz) != 0) if (!interactive_interrupt("Failed to find bootable partition")) return (EFI_NOT_FOUND); From owner-svn-src-head@freebsd.org Mon Jul 23 20:40: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 4DA1E10547A3 for ; Mon, 23 Jul 2018 20:40:52 +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 ADF968DD7F for ; Mon, 23 Jul 2018 20:40:51 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: ac14c7d6-8eb8-11e8-aff6-0b9b8210da61 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 ac14c7d6-8eb8-11e8-aff6-0b9b8210da61; Mon, 23 Jul 2018 20:40:46 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w6NKeiHF013820; Mon, 23 Jul 2018 14:40:44 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1532378444.1344.187.camel@freebsd.org> Subject: Re: svn commit: r336619 - head/lib/libc/gen From: Ian Lepore To: Cy Schubert Cc: Alan Somers , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Date: Mon, 23 Jul 2018 14:40:44 -0600 In-Reply-To: <201807232011.w6NKBqgT050306@slippy.cwsent.com> References: <201807232011.w6NKBqgT050306@slippy.cwsent.com> 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.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: Mon, 23 Jul 2018 20:40:52 -0000 On Mon, 2018-07-23 at 13:11 -0700, Cy Schubert wrote: > In message <1532364679.1344.161.camel@freebsd.org>, Ian Lepore > writes: > > > > On Mon, 2018-07-23 at 09:41 -0700, Cy Schubert wrote: > > > > > > I'm sure. Rolling this libc commit back addressed the ssh > > > segfaults > > > on all my systems. > > > > > > --- > > > Sent using a tiny phone keyboard. > > > Apologies for any typos and autocorrect. > > > Also, this old phone only supports top post. Apologies. > > > > > > Cy Schubert > > > or > > > The need of the many outweighs the greed of the few. > > > --- > > > > > My current working theory is that some of the software that uses > > __pw_scan() pre-stages a pointer-to-empty-string into the pw_class > > field and my change ruined that by replacing it with a NULL > > pointer. > > Other callers of __pw_scan() don't do that, they just assume > > they're > > running as root and will get all the fields populated. > Yes. A simple check for pw->pw_class != NULL should fix this > instance. > > No, that doesn't work, because __pw_scan just skips setting pw_class and that leaves non-NULL garbage in that pointer.  There is a pw_fields field that uses bits to indicate which fields were parsed, but almost nothing uses it, so I'm reluctant to rely on it because this same kind of unexpected crash of some random tool will happen if there's anything that fills out a pwd struct without making those flags valid then calls pw_copy() which would rely on them being valid. I've decided that the only safe way to fix this is to have pw_scan() do the same thing getpwnam() and friends do:  first init the pwd struct to known values, including supplying empty strings rather than NULL pointers for all the char* fields, before calling __pw_scan(). But, all of a sudden I've gotten busy with $work, so I may have to set all this aside for a few days. -- Ian From owner-svn-src-head@freebsd.org Mon Jul 23 20:43: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 ED1641054A40 for ; Mon, 23 Jul 2018 20:43:56 +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 7ADDB8E298 for ; Mon, 23 Jul 2018 20:43:56 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: 1cc1dd29-8eb9-11e8-904b-1d2e466b3c59 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 1cc1dd29-8eb9-11e8-904b-1d2e466b3c59; Mon, 23 Jul 2018 20:43:54 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w6NKhrwE013830; Mon, 23 Jul 2018 14:43:53 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1532378633.1344.190.camel@freebsd.org> Subject: Re: svn commit: r336619 - head/lib/libc/gen From: Ian Lepore To: Cy Schubert Cc: Alan Somers , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Date: Mon, 23 Jul 2018 14:43:53 -0600 In-Reply-To: <201807232011.w6NKBqgT050306@slippy.cwsent.com> References: <201807232011.w6NKBqgT050306@slippy.cwsent.com> Content-Type: text/plain; charset="ASCII" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit 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: Mon, 23 Jul 2018 20:43:57 -0000 On Mon, 2018-07-23 at 13:11 -0700, Cy Schubert wrote: > In message <1532364679.1344.161.camel@freebsd.org>, Ian Lepore > writes: > > > > On Mon, 2018-07-23 at 09:41 -0700, Cy Schubert wrote: > > > > > > I'm sure. Rolling this libc commit back addressed the ssh > > > segfaults > > > on all my systems. > > > > > > --- > > > Sent using a tiny phone keyboard. > > > Apologies for any typos and autocorrect. > > > Also, this old phone only supports top post. Apologies. > > > > > > Cy Schubert > > > or > > > The need of the many outweighs the greed of the few. > > > --- > > > > > My current working theory is that some of the software that uses > > __pw_scan() pre-stages a pointer-to-empty-string into the pw_class > > field and my change ruined that by replacing it with a NULL > > pointer. > > Other callers of __pw_scan() don't do that, they just assume > > they're > > running as root and will get all the fields populated. > Yes. A simple check for pw->pw_class != NULL should fix this > instance. Oh, or... if you meant tracking down all callers of __pw_scan() and making them conform to the possibility that the pointer got changed to NULL, I don't think I want to do that. If I was going to get into examining all callers of __pw_scan() and fixing them, I'd want to make them all use the pw_fields bits (but then that means tracking down all the ways a pwd struct can get created or filled in and fixing them as well, and suddenly you're on a new career path). -- Ian From owner-svn-src-head@freebsd.org Mon Jul 23 21:09: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 28D71105505B; Mon, 23 Jul 2018 21:09:58 +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 CBB008EF99; Mon, 23 Jul 2018 21:09:57 +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 A4D9021C38; Mon, 23 Jul 2018 21:09:57 +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 w6NL9vv4028172; Mon, 23 Jul 2018 21:09:57 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6NL9vvg028171; Mon, 23 Jul 2018 21:09:57 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201807232109.w6NL9vvg028171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 23 Jul 2018 21:09:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336657 - head/share/man/man7 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/share/man/man7 X-SVN-Commit-Revision: 336657 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: Mon, 23 Jul 2018 21:09:58 -0000 Author: emaste Date: Mon Jul 23 21:09:57 2018 New Revision: 336657 URL: https://svnweb.freebsd.org/changeset/base/336657 Log: arch.7: fix whitespace from r336435 Previously armeb's Final Release rendered as 'Ta 11.x'. Sponsored by: The FreeBSD Foundation Modified: head/share/man/man7/arch.7 Modified: head/share/man/man7/arch.7 ============================================================================== --- head/share/man/man7/arch.7 Mon Jul 23 20:36:59 2018 (r336656) +++ head/share/man/man7/arch.7 Mon Jul 23 21:09:57 2018 (r336657) @@ -93,7 +93,7 @@ architectures, the final release. .It alpha Ta 3.2 Ta 6.4 .It amd64 Ta 5.1 .It arm Ta 6.0 -.It armeb Ta 8.0 Ta 11.x +.It armeb Ta 8.0 Ta 11.x .It armv6 Ta 10.0 .It armv7 Ta 12.0 .It arm64 Ta 11.0 From owner-svn-src-head@freebsd.org Mon Jul 23 22:15: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 280691055FB6; Mon, 23 Jul 2018 22:15:37 +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 C2F8270E59; Mon, 23 Jul 2018 22:15:36 +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 9EFC422770; Mon, 23 Jul 2018 22:15:36 +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 w6NMFaA8064163; Mon, 23 Jul 2018 22:15:36 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6NMFaYs064162; Mon, 23 Jul 2018 22:15:36 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807232215.w6NMFaYs064162@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 23 Jul 2018 22:15:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336658 - head X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 336658 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: Mon, 23 Jul 2018 22:15:37 -0000 Author: imp Date: Mon Jul 23 22:15:36 2018 New Revision: 336658 URL: https://svnweb.freebsd.org/changeset/base/336658 Log: Say a little more about the new protocol. Requested by: emaste@ Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Mon Jul 23 21:09:57 2018 (r336657) +++ head/UPDATING Mon Jul 23 22:15:36 2018 (r336658) @@ -33,7 +33,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: 20180723: loader.efi has been augmented to participate more fully in the - UEFI boot manager protocol. + UEFI boot manager protocol. loader.efi will now look at the + BootXXXX environment variable to determine if a specific kernel + or root partition was specified. XXXX is derived from BootCurrent. + efibootmgr(8) manages these standard UEFI variables. 20180720: zfsloader's functionality has now been folded into loader. From owner-svn-src-head@freebsd.org Mon Jul 23 23:04: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 A87771056BFC; Mon, 23 Jul 2018 23:04:44 +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 582137231B; Mon, 23 Jul 2018 23:04:44 +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 38ECD22F85; Mon, 23 Jul 2018 23:04:44 +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 w6NN4iTM089529; Mon, 23 Jul 2018 23:04:44 GMT (envelope-from woodsb02@FreeBSD.org) Received: (from woodsb02@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6NN4hUh089528; Mon, 23 Jul 2018 23:04:43 GMT (envelope-from woodsb02@FreeBSD.org) Message-Id: <201807232304.w6NN4hUh089528@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: woodsb02 set sender to woodsb02@FreeBSD.org using -f From: Ben Woods Date: Mon, 23 Jul 2018 23:04:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336659 - head/lib/geom/eli X-SVN-Group: head X-SVN-Commit-Author: woodsb02 X-SVN-Commit-Paths: head/lib/geom/eli X-SVN-Commit-Revision: 336659 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: Mon, 23 Jul 2018 23:04:44 -0000 Author: woodsb02 (ports committer) Date: Mon Jul 23 23:04:43 2018 New Revision: 336659 URL: https://svnweb.freebsd.org/changeset/base/336659 Log: geli init: Allow initialization of multiple geli providers at once if they use same passphrase and keyfiles. Unique salt will be randomly generated for each provider to ensure the Master Key for each is unique. This change follows on from r335673 and r336602, which allowed multiple providers to be attached in a single command. Reviewed by: asomers Approved by: sobomax Differential Revision: https://reviews.freebsd.org/D16115 Modified: head/lib/geom/eli/geli.8 head/lib/geom/eli/geom_eli.c Modified: head/lib/geom/eli/geli.8 ============================================================================== --- head/lib/geom/eli/geli.8 Mon Jul 23 22:15:36 2018 (r336658) +++ head/lib/geom/eli/geli.8 Mon Jul 23 23:04:43 2018 (r336659) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 27, 2018 +.Dd July 24, 2018 .Dt GELI 8 .Os .Sh NAME @@ -61,7 +61,7 @@ utility: .Op Fl l Ar keylen .Op Fl s Ar sectorsize .Op Fl V Ar version -.Ar prov +.Ar prov ... .Nm .Cm label - an alias for .Cm init @@ -233,10 +233,14 @@ The first argument to indicates an action to be performed: .Bl -tag -width ".Cm configure" .It Cm init -Initialize the provider which needs to be encrypted. +Initialize providers which need to be encrypted. +If multiple providers are listed as arguments, they will all be initialized +with the same passphrase and/or User Key. +A unique salt will be randomly generated for each provider to ensure the +Master Key for each is unique. Here you can set up the cryptographic algorithm to use, Data Key length, etc. -The last sector of the provider is used to store metadata. +The last sector of the providers is used to store metadata. The .Cm init subcommand also automatically writes metadata backups to @@ -279,6 +283,16 @@ To inhibit backups, you can use .Pa none as the .Ar backupfile . +If multiple providers were initialized in the one command, you can use +.Pa PROV +(all upper-case) in the file name, and it will be replaced with the provider +name. +If +.Pa PROV +is not found in the file name and multiple providers were initialized in the +one command, +.Pa - +will be appended to the end of the file name specified. .It Fl d When entering the passphrase to boot from this encrypted root filesystem, echo .Ql * Modified: head/lib/geom/eli/geom_eli.c ============================================================================== --- head/lib/geom/eli/geom_eli.c Mon Jul 23 22:15:36 2018 (r336658) +++ head/lib/geom/eli/geom_eli.c Mon Jul 23 23:04:43 2018 (r336659) @@ -91,7 +91,7 @@ static int eli_backup_create(struct gctl_req *req, con /* * Available commands: * - * init [-bdgPTv] [-a aalgo] [-B backupfile] [-e ealgo] [-i iterations] [-l keylen] [-J newpassfile] [-K newkeyfile] [-s sectorsize] [-V version] prov + * 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 ... * detach [-fl] prov ... @@ -129,7 +129,7 @@ struct g_command class_commands[] = { { 'V', "mdversion", "-1", G_TYPE_NUMBER }, G_OPT_SENTINEL }, - "[-bdgPTv] [-a aalgo] [-B backupfile] [-e ealgo] [-i iterations] [-l keylen] [-J newpassfile] [-K newkeyfile] [-s sectorsize] [-V version] prov" + "[-bdgPTv] [-a aalgo] [-B backupfile] [-e ealgo] [-i iterations] [-l keylen] [-J newpassfile] [-K newkeyfile] [-s sectorsize] [-V version] prov ..." }, { "label", G_FLAG_VERBOSE, eli_main, { @@ -695,6 +695,7 @@ static void eli_init(struct gctl_req *req) { struct g_eli_metadata md; + struct gctl_req *r; unsigned char sector[sizeof(struct g_eli_metadata)] __aligned(4); unsigned char key[G_ELI_USERKEYLEN]; char backfile[MAXPATHLEN]; @@ -702,22 +703,16 @@ eli_init(struct gctl_req *req) unsigned int secsize, version; off_t mediasize; intmax_t val; - int error, nargs; + int error, 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"); - mediasize = g_get_mediasize(prov); - secsize = g_get_sectorsize(prov); - if (mediasize == 0 || secsize == 0) { - gctl_error(req, "Cannot get informations about %s: %s.", prov, - strerror(errno)); - return; - } + /* Start generating metadata for provider(s) being initialized. */ explicit_bzero(&md, sizeof(md)); strlcpy(md.md_magic, G_ELI_MAGIC, sizeof(md.md_magic)); val = gctl_get_intmax(req, "mdversion"); @@ -809,7 +804,6 @@ eli_init(struct gctl_req *req) gctl_error(req, "Invalid key length."); return; } - md.md_provsize = mediasize; val = gctl_get_intmax(req, "iterations"); if (val != -1) { @@ -829,78 +823,191 @@ eli_init(struct gctl_req *req) md.md_iterations = val; val = gctl_get_intmax(req, "sectorsize"); - if (val == 0) - md.md_sectorsize = secsize; - else { - if (val < 0 || (val % secsize) != 0 || !powerof2(val)) { - gctl_error(req, "Invalid sector size."); - return; - } - if (val > sysconf(_SC_PAGE_SIZE)) { - fprintf(stderr, - "warning: Using sectorsize bigger than the page size!\n"); - } - md.md_sectorsize = val; + if (val > sysconf(_SC_PAGE_SIZE)) { + fprintf(stderr, + "warning: Using sectorsize bigger than the page size!\n"); } md.md_keys = 0x01; - arc4random_buf(md.md_salt, sizeof(md.md_salt)); - arc4random_buf(md.md_mkeys, sizeof(md.md_mkeys)); - /* Generate user key. */ - if (eli_genkey(req, &md, key, true) == NULL) { + /* + * Determine number of parameters in the parent geom request before the + * nargs parameter and list of providers. + */ + nparams = req->narg - nargs - 1; + + /* Create new child request for each provider and issue to kernel */ + for (i = 0; i < nargs; i++) { + r = gctl_get_handle(); + + /* Copy each parameter from the parent request to the child */ + 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); + + mediasize = g_get_mediasize(prov); + secsize = g_get_sectorsize(prov); + if (mediasize == 0 || secsize == 0) { + gctl_error(r, "Cannot get information about %s: %s.", + prov, strerror(errno)); + goto out; + } + + md.md_provsize = mediasize; + + val = gctl_get_intmax(r, "sectorsize"); + if (val == 0) { + md.md_sectorsize = secsize; + } else { + if (val < 0 || (val % secsize) != 0 || !powerof2(val)) { + gctl_error(r, "Invalid sector size."); + goto out; + } + md.md_sectorsize = val; + } + + /* Use different salt and Master Key for each provider. */ + arc4random_buf(md.md_salt, sizeof(md.md_salt)); + arc4random_buf(md.md_mkeys, sizeof(md.md_mkeys)); + + /* Generate user key. */ + if (eli_genkey(r, &md, key, true) == NULL) { + /* + * Error generating key - details added to geom request + * by eli_genkey(). + */ + goto out; + } + + /* Encrypt the first and the only Master Key. */ + error = g_eli_mkey_encrypt(md.md_ealgo, key, md.md_keylen, + md.md_mkeys); explicit_bzero(key, sizeof(key)); - explicit_bzero(&md, sizeof(md)); - return; - } + if (error != 0) { + gctl_error(r, "Cannot encrypt Master Key: %s.", + strerror(error)); + goto out; + } - /* Encrypt the first and the only Master Key. */ - error = g_eli_mkey_encrypt(md.md_ealgo, key, md.md_keylen, md.md_mkeys); - explicit_bzero(key, sizeof(key)); - if (error != 0) { - explicit_bzero(&md, sizeof(md)); - gctl_error(req, "Cannot encrypt Master Key: %s.", - strerror(error)); - return; - } + /* + * Convert metadata to on-disk format and then immediately erase + * sensitive data from the metadata struct. + */ + eli_metadata_encode(&md, sector); + explicit_bzero(&md.md_provsize, sizeof(md.md_provsize)); + explicit_bzero(&md.md_sectorsize, sizeof(md.md_sectorsize)); + explicit_bzero(&md.md_salt, sizeof(md.md_salt)); + explicit_bzero(&md.md_mkeys, sizeof(md.md_mkeys)); - eli_metadata_encode(&md, sector); - explicit_bzero(&md, sizeof(md)); - error = g_metadata_store(prov, sector, sizeof(sector)); - explicit_bzero(sector, sizeof(sector)); - if (error != 0) { - gctl_error(req, "Cannot store metadata on %s: %s.", prov, - strerror(error)); - return; - } - if (verbose) - printf("Metadata value stored on %s.\n", prov); - /* Backup metadata to a file. */ - str = gctl_get_ascii(req, "backupfile"); - if (str[0] != '\0') { - /* Backupfile given be the user, just copy it. */ - strlcpy(backfile, str, sizeof(backfile)); - } else { - /* Generate file name automatically. */ + /* + * Store metadata to disk and then immediately erase sensitive + * data from memory. + */ + error = g_metadata_store(prov, sector, sizeof(sector)); + explicit_bzero(sector, sizeof(sector)); + if (error != 0) { + gctl_error(r, "Cannot store metadata on %s: %s.", prov, + strerror(error)); + goto out; + } + if (verbose) + printf("Metadata value stored on %s.\n", prov); + + /* Backup metadata to a file. */ const char *p = prov; - unsigned int i; + unsigned int j; - if (strncmp(p, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0) + /* + * Check if provider string includes the devfs mountpoint + * (typically /dev/). + */ + if (strncmp(p, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0) { + /* Skip forward to the device filename only. */ p += sizeof(_PATH_DEV) - 1; - snprintf(backfile, sizeof(backfile), "%s%s.eli", - GELI_BACKUP_DIR, p); - /* Replace all / with _. */ - for (i = strlen(GELI_BACKUP_DIR); backfile[i] != '\0'; i++) { - if (backfile[i] == '/') - backfile[i] = '_'; } + + str = gctl_get_ascii(r, "backupfile"); + if (str[0] != '\0') { + /* Backupfile given by the user, just copy it. */ + strlcpy(backfile, str, sizeof(backfile)); + + /* Make the backup filename unique if multiple providers + * initialized in one command. */ + if (nargs > 1) { + /* + * Replace first occurrence of "PROV" with + * provider name. + */ + str = strnstr(backfile, "PROV", + sizeof(backfile)); + if (str != NULL) { + char suffix[MAXPATHLEN]; + j = str - backfile; + strlcpy(suffix, &backfile[j+4], + sizeof(suffix)); + backfile[j] = '\0'; + strlcat(backfile, p, sizeof(backfile)); + strlcat(backfile, suffix, + sizeof(backfile)); + } else { + /* + * "PROV" not found in backfile, append + * provider name. + */ + strlcat(backfile, "-", + sizeof(backfile)); + strlcat(backfile, p, sizeof(backfile)); + } + } + } else { + /* Generate filename automatically. */ + snprintf(backfile, sizeof(backfile), "%s%s.eli", + GELI_BACKUP_DIR, p); + /* Replace all / with _. */ + for (j = strlen(GELI_BACKUP_DIR); backfile[j] != '\0'; + j++) { + if (backfile[j] == '/') + backfile[j] = '_'; + } + } + if (strcmp(backfile, "none") != 0 && + eli_backup_create(r, prov, backfile) == 0) { + printf("\nMetadata backup for provider %s can be found " + "in %s\n", prov, backfile); + printf("and can be restored with the following " + "command:\n"); + printf("\n\t# geli restore %s %s\n\n", backfile, prov); + } + +out: + /* + * 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, "There was an error with at least one " + "provider."); + } + + gctl_free(r); + + /* + * Erase sensitive data from memory, and ensure subsequent + * providers are initialized with unique metadata. + */ + explicit_bzero(key, sizeof(key)); + explicit_bzero(&md, sizeof(md)); } - if (strcmp(backfile, "none") != 0 && - eli_backup_create(req, prov, backfile) == 0) { - printf("\nMetadata backup can be found in %s and\n", backfile); - printf("can be restored with the following command:\n"); - printf("\n\t# geli restore %s %s\n\n", backfile, prov); - } + + /* Clear the cached metadata, including keys. */ + explicit_bzero(&md, sizeof(md)); } static void @@ -914,7 +1021,7 @@ eli_attach(struct gctl_req *req) const int one = 1; nargs = gctl_get_int(req, "nargs"); - if (nargs == 0) { + if (nargs <= 0) { gctl_error(req, "Too few arguments."); return; } @@ -927,13 +1034,14 @@ eli_attach(struct gctl_req *req) */ nparams = req->narg - nargs - 1; - /* Create new child geom request for each provider and issue to kernel */ + /* Create new child request for each provider and issue to kernel */ for (i = 0; i < nargs; i++) { r = gctl_get_handle(); - /* Copy each parameter from the parent request to the child request */ + /* Copy each parameter from the parent request to the child */ for (param = 0; param < nparams; param++) { - gctl_ro_param(r, req->arg[param].name, req->arg[param].len, req->arg[param].value); + 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 */ @@ -971,10 +1079,14 @@ eli_attach(struct gctl_req *req) } out: - /* Print error for this request, and set parent request error message */ + /* + * 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, "There was an error with at least one provider."); + gctl_error(req, "There was an error with at least one " + "provider."); } gctl_free(r); From owner-svn-src-head@freebsd.org Mon Jul 23 23:52: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 622DC105756C; Mon, 23 Jul 2018 23:52:58 +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 9FDDD736E2; Mon, 23 Jul 2018 23:52:57 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id hkdIfdlAs5HxqhkdJf6hAR; Mon, 23 Jul 2018 17:52:55 -0600 X-Authority-Analysis: v=2.3 cv=BMcHU2YG c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=R9QF1RCXAYgA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=8lvgirPTP3_Ux8JaNysA:9 a=z2oZpG1v89SIaMLB:21 a=kU4lhY3wRZSrKRwn:21 a=wPNLvfGTeEIA:10 a=xN_wL00nb8BHSiEss3MA:9 a=Ysl1PTvUpGQXxRmH:21 a=u3TfuPd13cBKW6c_:21 a=fUCoWJuRHluB_zAX:21 a=_W_S_7VecoQA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 Received: from [25.80.33.197] (S0106788a207e2972.gv.shawcable.net [70.66.154.233]) by spqr.komquats.com (Postfix) with ESMTPSA id 2DB5EC73; Mon, 23 Jul 2018 16:52:58 -0700 (PDT) MIME-Version: 1.0 From: Cy Schubert Subject: RE: svn commit: r336619 - head/lib/libc/gen Date: Mon, 23 Jul 2018 16:52:51 -0700 To: Ian Lepore CC: Alan Somers , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <20180723235258.2DB5EC73@spqr.komquats.com> X-CMAE-Envelope: MS4wfCXSw7zUQsyHgwl8RmgcVQvFmvOaCUvT8k2GetElp9gJCiCptgp3XJJyOKjNPCZHUGWXQQZXkISBTkUc7jjEdJBeBuVQG1Qv7TdODW7QKOV8j4ibLBHN zROfpuplHiJH+vgt8q5yUrAKPSP2+BqnHzYGViB6U/f49q31zz9WFAWoKeNEOTRxsgjRRUZrIh7wuQEHgHFwdTcq+ljO+ylKz9I6XG5SuNiVXQVYwrDiw6dx VOtJJutuYlXdWUQwUyy+/qv7X+fUy7d0goPLmSOYU1TzJ6+EWxB8ge2aFq34VUgTuprOh6rvwMBt/WaMl+0b7tj1yN2wYi5TjqemPeJRqlQ= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.27 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: Mon, 23 Jul 2018 23:52:58 -0000 I think you misunderstood me because of my terse email. Sorry about that. W= e can address this with a NULL check in openssh's misc.c. I can't recall th= e actual path. I'll post a patch, which will explain it better than I can i= n English, as soon as I get home. --- Sent using a tiny phone keyboard. Apologies for any typos and autocorrect. Also, this old phone only supports top post. Apologies. Cy Schubert or The need of the many outweighs the greed of the few. --- -----Original Message----- From: Ian Lepore Sent: 23/07/2018 13:40 To: Cy Schubert Cc: Alan Somers; src-committers; svn-src-all@freebsd.org; svn-src-head@free= bsd.org Subject: Re: svn commit: r336619 - head/lib/libc/gen On Mon, 2018-07-23 at 13:11 -0700, Cy Schubert wrote: > In message <1532364679.1344.161.camel@freebsd.org>, Ian Lepore > writes: > >=20 > > On Mon, 2018-07-23 at 09:41 -0700, Cy Schubert wrote: > > >=20 > > > I'm sure. Rolling this libc commit back addressed the ssh > > > segfaults > > > on all my systems. > > >=20 > > > --- > > > Sent using a tiny phone keyboard. > > > Apologies for any typos and autocorrect. > > > Also, this old phone only supports top post. Apologies. > > >=20 > > > Cy Schubert > > > or > > > The need of the many outweighs the greed of the few. > > > --- > > >=20 > > My current working theory is that some of the software that uses > > __pw_scan() pre-stages a pointer-to-empty-string into the pw_class > > field and my change ruined that by replacing it with a NULL > > pointer. > > Other callers of __pw_scan() don't do that, they just assume > > they're > > running as root and will get all the fields populated. > Yes. A simple check for pw->pw_class !=3D NULL should fix this > instance. >=20 >=20 No, that doesn't work, because __pw_scan just skips setting pw_class and that leaves non-NULL garbage in that pointer. =A0There is a pw_fields field that uses bits to indicate which fields were parsed, but almost nothing uses it, so I'm reluctant to rely on it because this same kind of unexpected crash of some random tool will happen if there's anything that fills out a pwd struct without making those flags valid then calls pw_copy() which would rely on them being valid. I've decided that the only safe way to fix this is to have pw_scan() do the same thing getpwnam() and friends do: =A0first init the pwd struct to known values, including supplying empty strings rather than NULL pointers for all the char* fields, before calling __pw_scan(). But, all of a sudden I've gotten busy with $work, so I may have to set all this aside for a few days. -- Ian From owner-svn-src-head@freebsd.org Tue Jul 24 00: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 192EC1057AD1 for ; Tue, 24 Jul 2018 00:05:30 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (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 9602073CCB for ; Tue, 24 Jul 2018 00:05:29 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: 449126fd-8ed5-11e8-93fa-f3ebd9db2b94 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.ore.mailhop.org (Halon) with ESMTPSA id 449126fd-8ed5-11e8-93fa-f3ebd9db2b94; Tue, 24 Jul 2018 00:05:27 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w6O05QQs014151; Mon, 23 Jul 2018 18:05:26 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1532390726.1344.194.camel@freebsd.org> Subject: Re: svn commit: r336619 - head/lib/libc/gen From: Ian Lepore To: Cy Schubert Cc: Alan Somers , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Date: Mon, 23 Jul 2018 18:05:26 -0600 In-Reply-To: <20180723235258.2DB5EC73@spqr.komquats.com> References: <20180723235258.2DB5EC73@spqr.komquats.com> 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.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: Tue, 24 Jul 2018 00:05:30 -0000 I don't wanna play whack-a-mole like that. This whole area is a great big mess, and it needs a great big cleanup, and I've got too many other irons in the fire right now to do that. -- Ian On Mon, 2018-07-23 at 16:52 -0700, Cy Schubert wrote: > I think you misunderstood me because of my terse email. Sorry about > that. We can address this with a NULL check in openssh's misc.c. I > can't recall the actual path. I'll post a patch, which will explain > it better than I can in English, as soon as I get home. > > --- > Sent using a tiny phone keyboard. > Apologies for any typos and autocorrect. > Also, this old phone only supports top post. Apologies. > > Cy Schubert > or > The need of the many outweighs the greed of the few. > --- > > -----Original Message----- > From: Ian Lepore > Sent: 23/07/2018 13:40 > To: Cy Schubert > Cc: Alan Somers; src-committers; svn-src-all@freebsd.org; svn-src-hea > d@freebsd.org > Subject: Re: svn commit: r336619 - head/lib/libc/gen > > On Mon, 2018-07-23 at 13:11 -0700, Cy Schubert wrote: > > > > In message <1532364679.1344.161.camel@freebsd.org>, Ian Lepore > > writes: > > > > > > > > > On Mon, 2018-07-23 at 09:41 -0700, Cy Schubert wrote: > > > > > > > > > > > > I'm sure. Rolling this libc commit back addressed the ssh > > > > segfaults > > > > on all my systems. > > > > > > > > --- > > > > Sent using a tiny phone keyboard. > > > > Apologies for any typos and autocorrect. > > > > Also, this old phone only supports top post. Apologies. > > > > > > > > Cy Schubert > > > > or > > > > The need of the many outweighs the greed of the few. > > > > --- > > > > > > > My current working theory is that some of the software that uses > > > __pw_scan() pre-stages a pointer-to-empty-string into the > > > pw_class > > > field and my change ruined that by replacing it with a NULL > > > pointer. > > > Other callers of __pw_scan() don't do that, they just assume > > > they're > > > running as root and will get all the fields populated. > > Yes. A simple check for pw->pw_class != NULL should fix this > > instance. > > > > > No, that doesn't work, because __pw_scan just skips setting pw_class > and that leaves non-NULL garbage in that pointer.  There is a > pw_fields > field that uses bits to indicate which fields were parsed, but almost > nothing uses it, so I'm reluctant to rely on it because this same > kind > of unexpected crash of some random tool will happen if there's > anything > that fills out a pwd struct without making those flags valid then > calls > pw_copy() which would rely on them being valid. > > I've decided that the only safe way to fix this is to have pw_scan() > do > the same thing getpwnam() and friends do:  first init the pwd struct > to > known values, including supplying empty strings rather than NULL > pointers for all the char* fields, before calling __pw_scan(). > > But, all of a sudden I've gotten busy with $work, so I may have to > set > all this aside for a few days. > > -- Ian > From owner-svn-src-head@freebsd.org Tue Jul 24 01:47: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 9FEA01031D0E; Tue, 24 Jul 2018 01:47:48 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DC07577CB4; Tue, 24 Jul 2018 01:47:47 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id hmQRf3uRBwyxUhmQSfUwre; Mon, 23 Jul 2018 19:47:45 -0600 X-Authority-Analysis: v=2.3 cv=NPJhBHyg c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=R9QF1RCXAYgA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=ZG7JwcREcfMdwwf1eYsA:9 a=-7L1LNRrWOYp5KFS:21 a=wM0xPb2ybMGysFtY:21 a=wPNLvfGTeEIA:10 a=SF0I7z1-NXcR-S14nisA:9 a=j4Th2aoYb5MAmu98:21 a=OEEB9RI5AYsv71Oq:21 a=FMSec9of-L8gub9h:21 a=_W_S_7VecoQA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 Received: from [25.169.253.91] (unknown [72.143.235.66]) by spqr.komquats.com (Postfix) with ESMTPSA id A948C1564; Mon, 23 Jul 2018 18:47:48 -0700 (PDT) MIME-Version: 1.0 From: Cy Schubert Subject: RE: svn commit: r336619 - head/lib/libc/gen Date: Mon, 23 Jul 2018 18:47:41 -0700 To: Ian Lepore CC: Alan Somers , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Message-Id: <20180724014748.A948C1564@spqr.komquats.com> X-CMAE-Envelope: MS4wfAGUsaKfwlXU8Df61hAQQcxsOwCigFwHM4BZHRtX3ZMnQWZx/peZjcNLPEpCLQiKFPnKd11F/YcR4CNY1agM/LQZiZHGC/hAfiyd4RF/YH3ER/W0uzfq Z0E772ICwnoZhS094rUP7nlb80Ha/hZACrFuVf1Z4NkfCTtf2LMZhdzT80ciPzSygZiQgHNiRkRS/1oT7ajDebuyIqeFQFKfN8geVG7zN/NLlY3/bTY+9x9L 5LSUNzc/7XWn2zVRhgvUpgFKsC3jnmoWDm9EN4l517/3lmopK44dk/Fa4ycPfEF1P5zy0BY9YpxLLXi16PDgPRKHEJ5ZH+zgjGrTRfA1a4Y= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.27 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: Tue, 24 Jul 2018 01:47:48 -0000 Well, the ssh client is still broken and IMO needs to be fixed sooner than = later. If we want to maintain compatibility right now before any rewrite is= attempted, our options are limited. Just saying that if this will be broke= n for a while we need some kind of workaround. Instead of a null pointer a = pointer to a statically defined null string. I know it's ugly and hate to s= uggest it but it gives us (you) more time for a better solution. BTW, I agree about the whack-a-mole thing given the brokenness. --- Sent using a tiny phone keyboard. Apologies for any typos and autocorrect. Also, this old phone only supports top post. Apologies. Cy Schubert or The need of the many outweighs the greed of the few. --- -----Original Message----- From: Ian Lepore Sent: 23/07/2018 17:05 To: Cy Schubert Cc: Alan Somers; src-committers; svn-src-all@freebsd.org; svn-src-head@free= bsd.org Subject: Re: svn commit: r336619 - head/lib/libc/gen I don't wanna play whack-a-mole like that. This whole area is a great big mess, and it needs a great big cleanup, and I've got too many other irons in the fire right now to do that. -- Ian On Mon, 2018-07-23 at 16:52 -0700, Cy Schubert wrote: > I think you misunderstood me because of my terse email. Sorry about > that. We can address this with a NULL check in openssh's misc.c. I > can't recall the actual path. I'll post a patch, which will explain > it better than I can in English, as soon as I get home. >=20 > --- > Sent using a tiny phone keyboard. > Apologies for any typos and autocorrect. > Also, this old phone only supports top post. Apologies. >=20 > Cy Schubert > or > The need of the many outweighs the greed of the few. > --- >=20 > -----Original Message----- > From: Ian Lepore > Sent: 23/07/2018 13:40 > To: Cy Schubert > Cc: Alan Somers; src-committers; svn-src-all@freebsd.org; svn-src-hea > d@freebsd.org > Subject: Re: svn commit: r336619 - head/lib/libc/gen >=20 > On Mon, 2018-07-23 at 13:11 -0700, Cy Schubert wrote: > >=20 > > In message <1532364679.1344.161.camel@freebsd.org>, Ian Lepore > > writes: > > >=20 > > >=20 > > > On Mon, 2018-07-23 at 09:41 -0700, Cy Schubert wrote: > > > >=20 > > > >=20 > > > > I'm sure. Rolling this libc commit back addressed the ssh > > > > segfaults > > > > on all my systems. > > > >=20 > > > > --- > > > > Sent using a tiny phone keyboard. > > > > Apologies for any typos and autocorrect. > > > > Also, this old phone only supports top post. Apologies. > > > >=20 > > > > Cy Schubert > > > > or > > > > The need of the many outweighs the greed of the few. > > > > --- > > > >=20 > > > My current working theory is that some of the software that uses > > > __pw_scan() pre-stages a pointer-to-empty-string into the > > > pw_class > > > field and my change ruined that by replacing it with a NULL > > > pointer. > > > Other callers of __pw_scan() don't do that, they just assume > > > they're > > > running as root and will get all the fields populated. > > Yes. A simple check for pw->pw_class !=3D NULL should fix this > > instance. > >=20 > >=20 > No, that doesn't work, because __pw_scan just skips setting pw_class > and that leaves non-NULL garbage in that pointer. =A0There is a > pw_fields > field that uses bits to indicate which fields were parsed, but almost > nothing uses it, so I'm reluctant to rely on it because this same > kind > of unexpected crash of some random tool will happen if there's > anything > that fills out a pwd struct without making those flags valid then > calls > pw_copy() which would rely on them being valid. >=20 > I've decided that the only safe way to fix this is to have pw_scan() > do > the same thing getpwnam() and friends do: =A0first init the pwd struct > to > known values, including supplying empty strings rather than NULL > pointers for all the char* fields, before calling __pw_scan(). >=20 > But, all of a sudden I've gotten busy with $work, so I may have to > set > all this aside for a few days. >=20 > -- Ian >=20 From owner-svn-src-head@freebsd.org Tue Jul 24 02:18: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 8BD871033C4E for ; Tue, 24 Jul 2018 02:18:44 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (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 136E079652 for ; Tue, 24 Jul 2018 02:18:43 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: e17b7d6c-8ee7-11e8-93fa-f3ebd9db2b94 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.ore.mailhop.org (Halon) with ESMTPSA id e17b7d6c-8ee7-11e8-93fa-f3ebd9db2b94; Tue, 24 Jul 2018 02:18:41 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w6O2IeOt014305; Mon, 23 Jul 2018 20:18:40 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1532398720.1344.206.camel@freebsd.org> Subject: Re: svn commit: r336619 - head/lib/libc/gen From: Ian Lepore To: Cy Schubert Cc: Alan Somers , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Date: Mon, 23 Jul 2018 20:18:40 -0600 In-Reply-To: <20180724014748.A948C1564@spqr.komquats.com> References: <20180724014748.A948C1564@spqr.komquats.com> 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.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: Tue, 24 Jul 2018 02:18:44 -0000 I don't think ssh is necessarily broken. It assumes pw_class will not be NULL after a call to getpwnam(). That may be a fair assumption, there's nothing in the manpage about it, but in practice the struct has always been initialized to have pointers to empty strings. I changed that so that one of them started getting chagned to a NULL pointer without realizing it was breaking a sort of hidden implicit contract. I think the right fix is to make libutil's pw_scan() do the same thing getpwnam() and other callers of __pw_scan() do, and init the struct to have pointers to empty strings. And we should update some manpages to make that an explicit contract. -- Ian On Mon, 2018-07-23 at 18:47 -0700, Cy Schubert wrote: > Well, the ssh client is still broken and IMO needs to be fixed sooner > than later. If we want to maintain compatibility right now before any > rewrite is attempted, our options are limited. Just saying that if > this will be broken for a while we need some kind of workaround. > Instead of a null pointer a pointer to a statically defined null > string. I know it's ugly and hate to suggest it but it gives us (you) > more time for a better solution. > > BTW, I agree about the whack-a-mole thing given the brokenness. > > --- > Sent using a tiny phone keyboard. > Apologies for any typos and autocorrect. > Also, this old phone only supports top post. Apologies. > > Cy Schubert > or > The need of the many outweighs the greed of the few. > --- > > -----Original Message----- > From: Ian Lepore > Sent: 23/07/2018 17:05 > To: Cy Schubert > Cc: Alan Somers; src-committers; svn-src-all@freebsd.org; svn-src-hea > d@freebsd.org > Subject: Re: svn commit: r336619 - head/lib/libc/gen > > I don't wanna play whack-a-mole like that. This whole area is a great > big mess, and it needs a great big cleanup, and I've got too many > other > irons in the fire right now to do that. > > -- Ian > > On Mon, 2018-07-23 at 16:52 -0700, Cy Schubert wrote: > > > > I think you misunderstood me because of my terse email. Sorry about > > that. We can address this with a NULL check in openssh's misc.c. I > > can't recall the actual path. I'll post a patch, which will explain > > it better than I can in English, as soon as I get home. > > > > --- > > Sent using a tiny phone keyboard. > > Apologies for any typos and autocorrect. > > Also, this old phone only supports top post. Apologies. > > > > Cy Schubert > > or > > The need of the many outweighs the greed of the few. > > --- > > > > -----Original Message----- > > From: Ian Lepore > > Sent: 23/07/2018 13:40 > > To: Cy Schubert > > Cc: Alan Somers; src-committers; svn-src-all@freebsd.org; svn-src- > > hea > > d@freebsd.org > > Subject: Re: svn commit: r336619 - head/lib/libc/gen > > > > On Mon, 2018-07-23 at 13:11 -0700, Cy Schubert wrote: > > > > > > > > > In message <1532364679.1344.161.camel@freebsd.org>, Ian Lepore > > > writes: > > > > > > > > > > > > > > > > On Mon, 2018-07-23 at 09:41 -0700, Cy Schubert wrote: > > > > > > > > > > > > > > > > > > > > I'm sure. Rolling this libc commit back addressed the ssh > > > > > segfaults > > > > > on all my systems. > > > > > > > > > > --- > > > > > Sent using a tiny phone keyboard. > > > > > Apologies for any typos and autocorrect. > > > > > Also, this old phone only supports top post. Apologies. > > > > > > > > > > Cy Schubert > > > > > or > > > > > The need of the many outweighs the greed of the few. > > > > > --- > > > > > > > > > My current working theory is that some of the software that > > > > uses > > > > __pw_scan() pre-stages a pointer-to-empty-string into the > > > > pw_class > > > > field and my change ruined that by replacing it with a NULL > > > > pointer. > > > > Other callers of __pw_scan() don't do that, they just assume > > > > they're > > > > running as root and will get all the fields populated. > > > Yes. A simple check for pw->pw_class != NULL should fix this > > > instance. > > > > > > > > No, that doesn't work, because __pw_scan just skips setting > > pw_class > > and that leaves non-NULL garbage in that pointer.  There is a > > pw_fields > > field that uses bits to indicate which fields were parsed, but > > almost > > nothing uses it, so I'm reluctant to rely on it because this same > > kind > > of unexpected crash of some random tool will happen if there's > > anything > > that fills out a pwd struct without making those flags valid then > > calls > > pw_copy() which would rely on them being valid. > > > > I've decided that the only safe way to fix this is to have > > pw_scan() > > do > > the same thing getpwnam() and friends do:  first init the pwd > > struct > > to > > known values, including supplying empty strings rather than NULL > > pointers for all the char* fields, before calling __pw_scan(). > > > > But, all of a sudden I've gotten busy with $work, so I may have to > > set > > all this aside for a few days. > > > > -- Ian > > From owner-svn-src-head@freebsd.org Tue Jul 24 02:25: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 C4FFB1034345; Tue, 24 Jul 2018 02:25:19 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id F27F379BFC; Tue, 24 Jul 2018 02:25:18 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id hn0efUWI2p5A1hn0gfeQ5A; Mon, 23 Jul 2018 20:25:11 -0600 X-Authority-Analysis: v=2.3 cv=JLKPTPCb c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=8nJEP1OIZ-IA:10 a=R9QF1RCXAYgA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=XCIwSH-Hwn2F5QzIN-oA:9 a=6FbIkE3uWnDEfb4f:21 a=KIJR5KywLR3eh5VY:21 a=wPNLvfGTeEIA:10 a=UJ0tAi3fqDAA: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 8E75D191C; Mon, 23 Jul 2018 19:25:15 -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 w6O2PA1K004914; Mon, 23 Jul 2018 19:25:10 -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 w6O2PAZ3004911; Mon, 23 Jul 2018 19:25:10 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201807240225.w6O2PAZ3004911@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: Cy Schubert , Alan Somers , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r336619 - head/lib/libc/gen In-Reply-To: Message from Ian Lepore of "Mon, 23 Jul 2018 20:18:40 -0600." <1532398720.1344.206.camel@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Mon, 23 Jul 2018 19:25:10 -0700 X-CMAE-Envelope: MS4wfLKeF6jobuwlkpN1kZX78DFdSSKIIHfwA2TaEvLwEo52jTZylCs6gVrVnr9KqttpGXReNOhFM1+/MwePlvAdjjpBjnVhW5Wi0rbgpUT9YnCFKl/xw/JH dYrIZTbn1VgpYZX86dxCZxSOp63cG3bypbSObcTZFC3uNQnmvtT37S9xUP/xYAVm8p+G2kmAaqLMTirFqiCZ7/e1DxE3X2NcqSly6V4LcNWJDjzITPWCVZLb GwCermThDB+cChEtYIL4YnHhyzS2XPs79FFKp65feP/Ierbgvbob+c6e6SxALEl0XNQ0oUtQMK6Qk4RFuXRH3e7KPDXAUcqKel5CVWswyBY= 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: Tue, 24 Jul 2018 02:25:20 -0000 In message <1532398720.1344.206.camel@freebsd.org>, Ian Lepore writes: > I don't think ssh is necessarily broken. It assumes pw_class will not > be NULL after a call to getpwnam(). That may be a fair assumption, > there's nothing in the manpage about it, but in practice the struct has > always been initialized to have pointers to empty strings. I changed > that so that one of them started getting chagned to a NULL pointer > without realizing it was breaking a sort of hidden implicit contract. > > I think the right fix is to make libutil's pw_scan() do the same thing > getpwnam() and other callers of __pw_scan() do, and init the struct to > have pointers to empty strings. And we should update some manpages to > make that an explicit contract. My previous email. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. > > -- Ian > > On Mon, 2018-07-23 at 18:47 -0700, Cy Schubert wrote: > > Well, the ssh client is still broken and IMO needs to be fixed sooner > > than later. If we want to maintain compatibility right now before any > > rewrite is attempted, our options are limited. Just saying that if > > this will be broken for a while we need some kind of workaround. > > Instead of a null pointer a pointer to a statically defined null > > string. I know it's ugly and hate to suggest it but it gives us (you) > > more time for a better solution. > > > > BTW, I agree about the whack-a-mole thing given the brokenness. > > > > --- > > Sent using a tiny phone keyboard. > > Apologies for any typos and autocorrect. > > Also, this old phone only supports top post. Apologies. > > > > Cy Schubert > > or > > The need of the many outweighs the greed of the few. > > --- > > > > -----Original Message----- > > From: Ian Lepore > > Sent: 23/07/2018 17:05 > > To: Cy Schubert > > Cc: Alan Somers; src-committers; svn-src-all@freebsd.org; svn-src-hea > > d@freebsd.org > > Subject: Re: svn commit: r336619 - head/lib/libc/gen > > > > I don't wanna play whack-a-mole like that. This whole area is a great > > big mess, and it needs a great big cleanup, and I've got too many > > other > > irons in the fire right now to do that. > > > > -- Ian > > > > On Mon, 2018-07-23 at 16:52 -0700, Cy Schubert wrote: > > > > > > I think you misunderstood me because of my terse email. Sorry about > > > that. We can address this with a NULL check in openssh's misc.c. I > > > can't recall the actual path. I'll post a patch, which will explain > > > it better than I can in English, as soon as I get home. > > > > > > --- > > > Sent using a tiny phone keyboard. > > > Apologies for any typos and autocorrect. > > > Also, this old phone only supports top post. Apologies. > > > > > > Cy Schubert > > > or > > > The need of the many outweighs the greed of the few. > > > --- > > > > > > -----Original Message----- > > > From: Ian Lepore > > > Sent: 23/07/2018 13:40 > > > To: Cy Schubert > > > Cc: Alan Somers; src-committers; svn-src-all@freebsd.org; svn-src- > > > hea > > > d@freebsd.org > > > Subject: Re: svn commit: r336619 - head/lib/libc/gen > > > > > > On Mon, 2018-07-23 at 13:11 -0700, Cy Schubert wrote: > > > > > > > > > > > > In message <1532364679.1344.161.camel@freebsd.org>, Ian Lepore > > > > writes: > > > > > > > > > > > > > > > > > > > > On Mon, 2018-07-23 at 09:41 -0700, Cy Schubert wrote: > > > > > > > > > > > > > > > > > > > > > > > > I'm sure. Rolling this libc commit back addressed the ssh > > > > > > segfaults > > > > > > on all my systems. > > > > > > > > > > > > --- > > > > > > Sent using a tiny phone keyboard. > > > > > > Apologies for any typos and autocorrect. > > > > > > Also, this old phone only supports top post. Apologies. > > > > > > > > > > > > Cy Schubert > > > > > > or > > > > > > The need of the many outweighs the greed of the few. > > > > > > --- > > > > > > > > > > > My current working theory is that some of the software that > > > > > uses > > > > > __pw_scan() pre-stages a pointer-to-empty-string into the > > > > > pw_class > > > > > field and my change ruined that by replacing it with a NULL > > > > > pointer. > > > > > Other callers of __pw_scan() don't do that, they just assume > > > > > they're > > > > > running as root and will get all the fields populated. > > > > Yes. A simple check for pw->pw_class != NULL should fix this > > > > instance. > > > > > > > > > > > No, that doesn't work, because __pw_scan just skips setting > > > pw_class > > > and that leaves non-NULL garbage in that pointer.  There is a > > > pw_fields > > > field that uses bits to indicate which fields were parsed, but > > > almost > > > nothing uses it, so I'm reluctant to rely on it because this same > > > kind > > > of unexpected crash of some random tool will happen if there's > > > anything > > > that fills out a pwd struct without making those flags valid then > > > calls > > > pw_copy() which would rely on them being valid. > > > > > > I've decided that the only safe way to fix this is to have > > > pw_scan() > > > do > > > the same thing getpwnam() and friends do:  first init the pwd > > > struct > > > to > > > known values, including supplying empty strings rather than NULL > > > pointers for all the char* fields, before calling __pw_scan(). > > > > > > But, all of a sudden I've gotten busy with $work, so I may have to > > > set > > > all this aside for a few days. > > > > > > -- Ian > > > From owner-svn-src-head@freebsd.org Tue Jul 24 03:31: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 9C87B103DAD6 for ; Tue, 24 Jul 2018 03:31:21 +0000 (UTC) (envelope-from cperciva@freebsd.org) Received: from mail.tarsnap.com (mail.tarsnap.com [54.86.246.204]) by mx1.freebsd.org (Postfix) with ESMTP id 3B4C07C802 for ; Tue, 24 Jul 2018 03:31:21 +0000 (UTC) (envelope-from cperciva@freebsd.org) Received: (qmail 30164 invoked from network); 24 Jul 2018 03:33:47 -0000 Received: from unknown (HELO exbuntu.daemonology.net) (127.0.0.1) by ec2-107-20-205-189.compute-1.amazonaws.com with ESMTP; 24 Jul 2018 03:33:47 -0000 Received: (qmail 3254 invoked from network); 24 Jul 2018 03:33:08 -0000 Received: from unknown (HELO ?127.0.0.1?) (127.0.0.1) by clamshell.daemonology.net with SMTP; 24 Jul 2018 03:33:08 -0000 Subject: Re: svn commit: r336593 - head/release To: Matthew Macy Cc: rgrimes@freebsd.org, src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201807221504.w6MF4bWW027109@pdx.rh.CN85.dnsmgr.net> From: Colin Percival Openpgp: preference=signencrypt Autocrypt: addr=cperciva@freebsd.org; prefer-encrypt=mutual; keydata= xsDhBElrAAcRBACDfDys4ZtK+ErCJ1HAzYeteKpm3OEsvT/49AjUTLihkF79HhIKrCQU+1KC zv7BwHCMLb6hq30As9L7iFKG7n5QFLFC4Te/VcITUnWHMG/c3ViLOfJGvi+9/nOEHaM1dVJY D6tEp5yM1nHmVQpo9932j4KGuGFR0LhOK5IHXOSfGwCgxSFDPdgxe2OEjWxjGgY+oV3EafcD +JROXCTjlcQiG/OguQH4Vks3mhHfFnEppLxTkDuYgHZQiUtpcT9ssH5khgqoTyMar05OUdAj ZIhNbWDh4LgTj+7ZmvLhXT5Zxw8LX9d7T36aTB8XDQSenDqEtinMWOb0TCBBLbsB8EFG1WTT ESbZci9jJS5yhtktuZoY/eM8uXMD/3k4FWFO80VRRkELSp+XSy/VlSQjyi/rhl2nQq/oOA9F oJbDaB0yq9VNhxP+uFBzBWSqeIX0t1ZWLtNfVFr4TRP5hihI5ICrg/0OpqgisKsU2NFe9xyO hyJLYmfD8ebpDJ/9k30C7Iju9pVrwLm1QgS4S2fqJRcR+U4WbjvP7CgSzSVDb2xpbiBQZXJj aXZhbCA8Y3BlcmNpdmFAdGFyc25hcC5jb20+wmEEExECACEFAklrALYCGwMHCwkIBwMCAQQV AggDBBYCAwECHgECF4AACgkQOM7KaQxqam6/igCgn+z2k3V5ggNppmWrZstt1U2lugsAoL7L wS9V9yLtil3oWmHtwpUqYruEzsFNBElrAAcQCAD3ZLMIsP4CIDoJORg+YY0lqLVBgcnF7pFb 4Uy2+KvdWofN+DKH61rZLjgXXkNE9M4EQC1B4lGttBP8IY2gs41y3AUogGdyFbidq99rCBz7 LTsgARHwFxZoaHmXyiZLEU1QZuMqwPZV1mCviRhN5E3rRqYNXVcrnXAAuhBpvNyj/ntHvcDN 2/m+ochiuBYueU4kX3lHya7sOj+mTsndcWmQ9soOUyr8O0r/BG088bMn4qqtUw4dl5/pglXk jbl7uOOPinKf0WVd2r6M0wLPJCD4NPHrCWRLLLAjwfjrtoSRvXxDbXhCdgGBa72+K8eYLzVs hgq7tJOoBWzjVK6XRxR7AAMGB/9Mo3iJ2DxqDecd02KCB5BsFDICbJGhPltU7FwrtbC7djSb XUrwsEVLHi4st4cbdGNCWCrp0BRezXZKohKnNAPFOTK++ZfgeKxrV2sJod+Q9RILF86tQ4XF 7A7Yme5hy92t/WgiU4vc/fWbgP8gV/19f8nunaT2E9NSa70mZFjZNu4iuwThoUUO5CV3Wo0Y UISsnRK8XD1+LR3A2qVyLiFRwh/miC1hgLFCTGCQ3GLxZeZzIpYSlGdQJ0L5lixW5ZQD9r1I 8i/8zhE6qRFAM0upUMI3Gt1Oq2w03DiXrZU0Fu/R8Rm8rlnkQKA+95mRTUq1xL5P5NZIi4gJ Z569OPMFwkkEGBECAAkFAklrAAcCGwwACgkQOM7KaQxqam41igCfbaldnFTu5uAdrnrghESv EI3CAo8AoLkNMks1pThl2BJNRm4CtTK9xZeH Message-ID: Date: Mon, 23 Jul 2018 20:33:08 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 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.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: Tue, 24 Jul 2018 03:31:21 -0000 On 07/22/18 15:53, Matthew Macy wrote: > That would only fix it if svn weren't installed. Oops, good point. Thanks for fixing this, your commits look good to me. Colin Percival > On Sun, Jul 22, 2018 at 9:31 AM, Colin Percival wrote: >> On 07/22/18 08:04, Rodney W. Grimes wrote: >>>> Build still works, but you're assuming that developers only use svn. >>> >>> No, he correctly assumed that RELEASE engineering only uses svn/svnlite >>> for building release images. This Makefile is for production of >>> official AMIs, official stuff always uses svn. >> >> I'm about to head mostly-AFK for the week, but one option here would be >> to change >> >> EC2_SVNBRANCH!= ${SVN_CMD} info --show-item relative-url ${WORLDDIR} | >> sed -e 's/\^\///' >> EC2_SVNREV!= ${SVN_CMD} info --show-item last-changed-revision ${WORLDDIR} >> >> to >> >> .if defined(SVN_CMD) >> EC2_SVNBRANCH!= ${SVN_CMD} info --show-item relative-url ${WORLDDIR} | >> sed -e 's/\^\///' >> EC2_SVNREV!= ${SVN_CMD} info --show-item last-changed-revision ${WORLDDIR} >> .else >> EC2_SVNBRANCH= unknown >> EC2_SVNREV= unknown >> .endif >> >> I don't know if this will make any difference to anyone using this code, >> but it should at least silence the warnings for people who aren't checking >> code out from svn. >> >> Colin Percival >> >>>> make[1]: "/usr/home/mmacy/devel/freebsd/Makefile.inc1" line 343: >>>> SYSTEM_COMPILER: libclang will be built for bootstrapping a >>>> cross-compiler. >>>> make[1]: "/usr/home/mmacy/devel/freebsd/Makefile.inc1" line 348: >>>> SYSTEM_LINKER: libclang will be built for bootstrapping a >>>> cross-linker. >>>> svn: E155007: '/usr/home/mmacy/devel/freebsd' is not a working copy >>>> svn: E155007: '/usr/home/mmacy/devel/freebsd' is not a working copy >>>> make[2]: "/usr/home/mmacy/devel/freebsd/release/Makefile.ec2" line 19: >>>> warning: "/usr/local/bin/svn info --show-item last-changed-revision >>>> /usr/home/mmacy/devel/freebsd/release/.." returned non-zero status >>>> svn: E155007: '/usr/home/mmacy/devel/freebsd' is not a working copy >>>> svn: E155007: '/usr/home/mmacy/devel/freebsd' is not a working copy >>>> make[2]: "/usr/home/mmacy/devel/freebsd/release/Makefile.ec2" line 19: >>>> warning: "/usr/local/bin/svn info --show-item last-changed-revision >>>> /usr/home/mmacy/devel/freebsd/release/.." returned non-zero status >>>> >>>> On Sat, Jul 21, 2018 at 3:54 PM, Colin Percival wrote: >>>>> Author: cperciva >>>>> Date: Sat Jul 21 22:54:43 2018 >>>>> New Revision: 336593 >>>>> URL: https://svnweb.freebsd.org/changeset/base/336593 >>>>> >>>>> Log: >>>>> Use svn or svnlite, or ${SVN_CMD} if set, for extracting the SVN branch >>>>> and revision number announced in SNS notifications about new EC2 AMIs. >>>>> >>>>> While I'm here, incorporate that information into the AMI "description" >>>>> fields, since it's more useful than simply echoing the information >>>>> already provided via the AMI "name". >>>>> >>>>> Approved by: gjb >>>>> >>>>> Modified: >>>>> head/release/Makefile.ec2 >>> ^^^^^^^^^^ >>> >>>>> >>>>> Modified: head/release/Makefile.ec2 >>>>> ============================================================================== >>>>> --- head/release/Makefile.ec2 Sat Jul 21 22:15:48 2018 (r336592) >>>>> +++ head/release/Makefile.ec2 Sat Jul 21 22:54:43 2018 (r336593) >>>>> @@ -5,6 +5,19 @@ >>>>> # Makefile for creating an EC2 AMI from a disk image. >>>>> # >>>>> >>>>> +# Figure out where SVN is >>>>> +.if !defined(SVN_CMD) || empty(SVN_CMD) >>>>> +. for _P in /usr/bin /usr/local/bin >>>>> +. for _S in svn svnlite >>>>> +. if exists(${_P}/${_S}) >>>>> +SVN_CMD= ${_P}/${_S} >>>>> +. endif >>>>> +. endfor >>>>> +. endfor >>>>> +.endif >>>>> +EC2_SVNBRANCH!= ${SVN_CMD} info --show-item relative-url ${WORLDDIR} | sed -e 's/\^\///' >>>>> +EC2_SVNREV!= ${SVN_CMD} info --show-item last-changed-revision ${WORLDDIR} >>>>> + >>>>> .if ${BRANCH} == "CURRENT" || ${BRANCH} == "STABLE" || ${BRANCH} == "PRERELEASE" >>>>> AMINAMESUFFIX!= date +-%Y-%m-%d >>>>> .endif >>>>> @@ -13,8 +26,6 @@ PUBLISH= --public >>>>> .endif >>>>> .if defined(EC2SNSTOPIC) && !empty(EC2SNSTOPIC) >>>>> EC2SNSREL= ${REVISION}-${BRANCH} >>>>> -EC2_SVNBRANCH!= svn info --show-item relative-url ${WORLDDIR} | sed -e 's/\^\///' >>>>> -EC2_SVNREV!= svn info --show-item last-changed-revision ${WORLDDIR} >>>>> EC2SNSVERS= ${EC2_SVNBRANCH}@${EC2_SVNREV} >>>>> .endif >>>>> >>>>> @@ -60,7 +71,7 @@ ec2ami: cw-ec2 ${CW_EC2_PORTINSTALL} >>>>> /usr/local/bin/bsdec2-image-upload ${PUBLISH} --sriov --ena \ >>>>> ${.OBJDIR}/ec2.raw \ >>>>> "${TYPE} ${REVISION}-${BRANCH}-${TARGET}${AMINAMESUFFIX}" \ >>>>> - "${TYPE} ${REVISION}-${BRANCH}-${TARGET}" \ >>>>> + "${TYPE}/${TARGET} ${EC2_SVNBRANCH}@${EC2_SVNREV}" \ >>>>> ${AWSREGION} ${AWSBUCKET} ${AWSKEYFILE} \ >>>>> ${EC2SNSTOPIC} ${EC2SNSREL} ${EC2SNSVERS} >>>>> @touch ${.TARGET} >>>>> >>>> >>>> >>> >> >> -- >> Colin Percival >> Security Officer Emeritus, FreeBSD | The power to serve >> Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid > > > -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From owner-svn-src-head@freebsd.org Tue Jul 24 04:38: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 5A29D103F66F; Tue, 24 Jul 2018 04:38:12 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0EF7A7E55C; Tue, 24 Jul 2018 04:38:12 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E3FB72683F; Tue, 24 Jul 2018 04:38:11 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6O4cBCi059823; Tue, 24 Jul 2018 04:38:11 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6O4cBBQ059822; Tue, 24 Jul 2018 04:38:11 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201807240438.w6O4cBBQ059822@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Tue, 24 Jul 2018 04:38:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336660 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Group: head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Commit-Revision: 336660 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: Tue, 24 Jul 2018 04:38:12 -0000 Author: allanjude Date: Tue Jul 24 04:38:11 2018 New Revision: 336660 URL: https://svnweb.freebsd.org/changeset/base/336660 Log: ZFS: Reserve DMU_BACKUP_FEATURE flags for Native Encryption and ZSTD Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h Mon Jul 23 23:04:43 2018 (r336659) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h Tue Jul 24 04:38:11 2018 (r336660) @@ -94,6 +94,8 @@ typedef enum drr_headertype { /* flag #21 is reserved for a Delphix feature */ #define DMU_BACKUP_FEATURE_COMPRESSED (1 << 22) /* flag #23 is reserved for the large dnode feature */ +/* flag #24 is reserved for the raw send (encryption) feature */ +/* flag #25 is reserved for the ZSTD compression feature */ /* * Mask of all supported backup features From owner-svn-src-head@freebsd.org Tue Jul 24 08:15: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 320A810446DD; Tue, 24 Jul 2018 08:15:04 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D0ED984ADB; Tue, 24 Jul 2018 08:15:03 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 97ACDC35; Tue, 24 Jul 2018 08:15:03 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6O8F3Dj071462; Tue, 24 Jul 2018 08:15:03 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6O8F30J071459; Tue, 24 Jul 2018 08:15:03 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201807240815.w6O8F30J071459@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Tue, 24 Jul 2018 08:15:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336662 - in head: share/man/man4 sys/dev/jedec_ts X-SVN-Group: head X-SVN-Commit-Author: rpokala X-SVN-Commit-Paths: in head: share/man/man4 sys/dev/jedec_ts X-SVN-Commit-Revision: 336662 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: Tue, 24 Jul 2018 08:15:04 -0000 Author: rpokala Date: Tue Jul 24 08:15:02 2018 New Revision: 336662 URL: https://svnweb.freebsd.org/changeset/base/336662 Log: Deprecate jedec_ts(4) and point users to jedec_dimm(4) instead jedec_dimm(4) is a superset of the functionality of jedec_ts(4). Mark jedec_ts(4) as removed in FreeBSD 12, and include a pointer to the migration instructions in the jedec_dimm(4) manpage, in both the jedec_ts(4) code and the jedec_ts(4) manpage. Add a note to the jedec_dimm(4) manpage about the fact that it is a superset of jedec_ts(4). This change will be MFCed to stable/11 and stable/10; the followup change to actually remove jedec_ts(4) from -HEAD will not. Reviewed by: avg MFC after: 1 week Relnotes: yes Differential Revision: https://reviews.freebsd.org/D16412 Modified: head/share/man/man4/jedec_dimm.4 head/share/man/man4/jedec_ts.4 head/sys/dev/jedec_ts/jedec_ts.c Modified: head/share/man/man4/jedec_dimm.4 ============================================================================== --- head/share/man/man4/jedec_dimm.4 Tue Jul 24 05:09:50 2018 (r336661) +++ head/share/man/man4/jedec_dimm.4 Tue Jul 24 08:15:02 2018 (r336662) @@ -163,6 +163,9 @@ dev.jedec_dimm.6.temp: 43.1C dev.jedec_dimm.6.type: DDR4 .Ed .Sh COMPATIBILITY +.Nm +implements a superset of the functionality of +.Xr jedec_ts 4 . Hints for .Xr jedec_ts 4 can be mechanically converted for use with Modified: head/share/man/man4/jedec_ts.4 ============================================================================== --- head/share/man/man4/jedec_ts.4 Tue Jul 24 05:09:50 2018 (r336661) +++ head/share/man/man4/jedec_ts.4 Tue Jul 24 08:15:02 2018 (r336662) @@ -63,6 +63,18 @@ In .Cd hint.jedec_ts.7.at="smbus0" .Cd hint.jedec_ts.7.addr="0x3E" .Ed +.Sh DEPRECATION NOTICE +The +.Nm +driver is not present in +.Fx 12.0 +and later. +A superset of its functionality is available in the +.Xr jedec_dimm 4 +driver. +That driver's manpage includes instructions on updating +.Pa /boot/device.hints +accordingly. .Sh DESCRIPTION The .Nm Modified: head/sys/dev/jedec_ts/jedec_ts.c ============================================================================== --- head/sys/dev/jedec_ts/jedec_ts.c Tue Jul 24 05:09:50 2018 (r336661) +++ head/sys/dev/jedec_ts/jedec_ts.c Tue Jul 24 08:15:02 2018 (r336662) @@ -247,6 +247,9 @@ ts_attach(device_t dev) CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, dev, 0, ts_temp_sysctl, "IK4", "Current temperature"); + gone_in_dev(dev, 12, + "jedec_ts(4) driver; see COMPATIBILITY section of jedec_dimm(4)"); + return (0); } From owner-svn-src-head@freebsd.org Tue Jul 24 10:10: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 9683610471E3; Tue, 24 Jul 2018 10:10:19 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4A7D488DEF; Tue, 24 Jul 2018 10:10:19 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2713B1E0A; Tue, 24 Jul 2018 10:10:19 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6OAAIKo031573; Tue, 24 Jul 2018 10:10:18 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6OAAHpe031564; Tue, 24 Jul 2018 10:10:17 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201807241010.w6OAAHpe031564@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Tue, 24 Jul 2018 10:10:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336663 - head/lib/msun/src X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: head/lib/msun/src X-SVN-Commit-Revision: 336663 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: Tue, 24 Jul 2018 10:10:19 -0000 Author: bde Date: Tue Jul 24 10:10:16 2018 New Revision: 336663 URL: https://svnweb.freebsd.org/changeset/base/336663 Log: Fix the conversion to use nan_mix() in r336362. fmod*(x, y), remainder*(x, y) and remquo*(x, y, quo) were broken for y = 0 by changing multiplication by y to addition of y. (When y is 0, the result should be NaN but became 1 for finite x.) Use a new macro nan_mix_op() to give more control over the mixing, and expand comments. Recent re-testing missed finding this bug since I only tested the macro version on amd64 and i386 and these arches don't use the C versions (they use either asm versions or builtins). Reported by: enh via freebsd-numerics Modified: head/lib/msun/src/e_fmod.c head/lib/msun/src/e_fmodf.c head/lib/msun/src/e_fmodl.c head/lib/msun/src/e_remainder.c head/lib/msun/src/e_remainderf.c head/lib/msun/src/math_private.h head/lib/msun/src/s_remquo.c head/lib/msun/src/s_remquof.c head/lib/msun/src/s_remquol.c Modified: head/lib/msun/src/e_fmod.c ============================================================================== --- head/lib/msun/src/e_fmod.c Tue Jul 24 08:15:02 2018 (r336662) +++ head/lib/msun/src/e_fmod.c Tue Jul 24 10:10:16 2018 (r336663) @@ -42,7 +42,7 @@ __ieee754_fmod(double x, double y) /* purge off exception values */ if((hy|ly)==0||(hx>=0x7ff00000)|| /* y=0,or x not finite */ ((hy|((ly|-ly)>>31))>0x7ff00000)) /* or y is NaN */ - return nan_mix(x, y)/nan_mix(x, y); + return nan_mix_op(x, y, *)/nan_mix_op(x, y, *); if(hx<=hy) { if((hx=0x7f800000)|| /* y=0,or x not finite */ (hy>0x7f800000)) /* or y is NaN */ - return nan_mix(x, y)/nan_mix(x, y); + return nan_mix_op(x, y, *)/nan_mix_op(x, y, *); if(hx>31]; /* |x|=|y| return x*0*/ Modified: head/lib/msun/src/e_fmodl.c ============================================================================== --- head/lib/msun/src/e_fmodl.c Tue Jul 24 08:15:02 2018 (r336662) +++ head/lib/msun/src/e_fmodl.c Tue Jul 24 10:10:16 2018 (r336663) @@ -79,7 +79,7 @@ fmodl(long double x, long double y) (ux.bits.exp == BIAS + LDBL_MAX_EXP) || /* or x not finite */ (uy.bits.exp == BIAS + LDBL_MAX_EXP && ((uy.bits.manh&~LDBL_NBIT)|uy.bits.manl)!=0)) /* or y is NaN */ - return nan_mix(x, y)/nan_mix(x, y); + return nan_mix_op(x, y, *)/nan_mix_op(x, y, *); if(ux.bits.exp<=uy.bits.exp) { if((ux.bits.exp=0x7ff00000)|| /* x not finite */ ((hp>=0x7ff00000)&& /* p is NaN */ (((hp-0x7ff00000)|lp)!=0))) - return nan_mix(x, p)/nan_mix(x, p); + return nan_mix_op(x, p, *)/nan_mix_op(x, p, *); if (hp<=0x7fdfffff) x = __ieee754_fmod(x,p+p); /* now x < 2p */ Modified: head/lib/msun/src/e_remainderf.c ============================================================================== --- head/lib/msun/src/e_remainderf.c Tue Jul 24 08:15:02 2018 (r336662) +++ head/lib/msun/src/e_remainderf.c Tue Jul 24 10:10:16 2018 (r336663) @@ -39,7 +39,7 @@ __ieee754_remainderf(float x, float p) if((hp==0)|| /* p = 0 */ (hx>=0x7f800000)|| /* x not finite */ ((hp>0x7f800000))) /* p is NaN */ - return nan_mix(x, p)/nan_mix(x, p); + return nan_mix_op(x, p, *)/nan_mix_op(x, p, *); if (hp<=0x7effffff) x = __ieee754_fmodf(x,p+p); /* now x < 2p */ Modified: head/lib/msun/src/math_private.h ============================================================================== --- head/lib/msun/src/math_private.h Tue Jul 24 08:15:02 2018 (r336662) +++ head/lib/msun/src/math_private.h Tue Jul 24 10:10:16 2018 (r336663) @@ -479,22 +479,29 @@ do { \ void _scan_nan(uint32_t *__words, int __num_words, const char *__s); /* - * Mix 1 or 2 NaNs. First add 0 to each arg. This normally just turns + * Mix 0, 1 or 2 NaNs. First add 0 to each arg. This normally just turns * signaling NaNs into quiet NaNs by setting a quiet bit. We do this * because we want to never return a signaling NaN, and also because we * don't want the quiet bit to affect the result. Then mix the converted - * args using addition. The result is typically the arg whose mantissa - * bits (considered as in integer) are largest. + * args using the specified operation. * - * Technical complications: the result in bits might depend on the precision - * and/or on compiler optimizations, especially when different register sets - * are used for different precisions. Try to make the result not depend on - * at least the precision by always doing the main mixing step in long double + * When one arg is NaN, the result is typically that arg quieted. When both + * args are NaNs, the result is typically the quietening of the arg whose + * mantissa is largest after quietening. When neither arg is NaN, the + * result may be NaN because it is indeterminate, or finite for subsequent + * construction of a NaN as the indeterminate 0.0L/0.0L. + * + * Technical complications: the result in bits after rounding to the final + * precision might depend on the runtime precision and/or on compiler + * optimizations, especially when different register sets are used for + * different precisions. Try to make the result not depend on at least the + * runtime precision by always doing the main mixing step in long double * precision. Try to reduce dependencies on optimizations by adding the * the 0's in different precisions (unless everything is in long double * precision). */ -#define nan_mix(x, y) (((x) + 0.0L) + ((y) + 0)) +#define nan_mix(x, y) (nan_mix_op((x), (y), +)) +#define nan_mix_op(x, y, op) (((x) + 0.0L) op ((y) + 0)) #ifdef _COMPLEX_H Modified: head/lib/msun/src/s_remquo.c ============================================================================== --- head/lib/msun/src/s_remquo.c Tue Jul 24 08:15:02 2018 (r336662) +++ head/lib/msun/src/s_remquo.c Tue Jul 24 10:10:16 2018 (r336663) @@ -44,7 +44,7 @@ remquo(double x, double y, int *quo) /* purge off exception values */ if((hy|ly)==0||(hx>=0x7ff00000)|| /* y=0,or x not finite */ ((hy|((ly|-ly)>>31))>0x7ff00000)) /* or y is NaN */ - return nan_mix(x, y)/nan_mix(x, y); + return nan_mix_op(x, y, *)/nan_mix_op(x, y, *); if(hx<=hy) { if((hx=0x7f800000||hy>0x7f800000) /* y=0,NaN;or x not finite */ - return nan_mix(x, y)/nan_mix(x, y); + return nan_mix_op(x, y, *)/nan_mix_op(x, y, *); if(hx Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC6181048CAB; Tue, 24 Jul 2018 11:35:23 +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 778C08B2C2; Tue, 24 Jul 2018 11:35:23 +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 548642C5C; Tue, 24 Jul 2018 11:35:23 +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 w6OBZNDJ077114; Tue, 24 Jul 2018 11:35:23 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6OBZNZg077113; Tue, 24 Jul 2018 11:35:23 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201807241135.w6OBZNZg077113@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 24 Jul 2018 11:35:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336664 - head/contrib/llvm/tools/lld/ELF X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/contrib/llvm/tools/lld/ELF X-SVN-Commit-Revision: 336664 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: Tue, 24 Jul 2018 11:35:24 -0000 Author: emaste Date: Tue Jul 24 11:35:22 2018 New Revision: 336664 URL: https://svnweb.freebsd.org/changeset/base/336664 Log: lld: fix addends with partial linking [ELF] Update addends in non-allocatable sections for REL targets when creating a relocatable output. LLVM PR: 37735 LLVM Differential Revision: https://reviews.llvm.org/D48929 PR: 225128 Obtained from: LLVM r336799 by Igor Kudrin Modified: head/contrib/llvm/tools/lld/ELF/InputSection.cpp Modified: head/contrib/llvm/tools/lld/ELF/InputSection.cpp ============================================================================== --- head/contrib/llvm/tools/lld/ELF/InputSection.cpp Tue Jul 24 10:10:16 2018 (r336663) +++ head/contrib/llvm/tools/lld/ELF/InputSection.cpp Tue Jul 24 11:35:22 2018 (r336664) @@ -686,6 +686,23 @@ void InputSection::relocateNonAlloc(uint8_t *Buf, Arra } } +// This is used when '-r' is given. +// For REL targets, InputSection::copyRelocations() may store artificial +// relocations aimed to update addends. They are handled in relocateAlloc() +// for allocatable sections, and this function does the same for +// non-allocatable sections, such as sections with debug information. +static void relocateNonAllocForRelocatable(InputSection *Sec, uint8_t *Buf) { + const unsigned Bits = Config->Is64 ? 64 : 32; + + for (const Relocation &Rel : Sec->Relocations) { + // InputSection::copyRelocations() adds only R_ABS relocations. + assert(Rel.Expr == R_ABS); + uint8_t *BufLoc = Buf + Rel.Offset + Sec->OutSecOff; + uint64_t TargetVA = SignExtend64(Rel.Sym->getVA(Rel.Addend), Bits); + Target->relocateOne(BufLoc, Rel.Type, TargetVA); + } +} + template void InputSectionBase::relocate(uint8_t *Buf, uint8_t *BufEnd) { if (Flags & SHF_ALLOC) { @@ -694,7 +711,9 @@ void InputSectionBase::relocate(uint8_t *Buf, uint8_t } auto *Sec = cast(this); - if (Sec->AreRelocsRela) + if (Config->Relocatable) + relocateNonAllocForRelocatable(Sec, Buf); + else if (Sec->AreRelocsRela) Sec->relocateNonAlloc(Buf, Sec->template relas()); else Sec->relocateNonAlloc(Buf, Sec->template rels()); From owner-svn-src-head@freebsd.org Tue Jul 24 11:50: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 9FBDA10490FA; Tue, 24 Jul 2018 11:50:06 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4810E8B8C8; Tue, 24 Jul 2018 11:50:06 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 260172DEE; Tue, 24 Jul 2018 11:50:06 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6OBo5M9082192; Tue, 24 Jul 2018 11:50:05 GMT (envelope-from bde@FreeBSD.org) Received: (from bde@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6OBo5D9082191; Tue, 24 Jul 2018 11:50:05 GMT (envelope-from bde@FreeBSD.org) Message-Id: <201807241150.w6OBo5D9082191@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bde set sender to bde@FreeBSD.org using -f From: Bruce Evans Date: Tue, 24 Jul 2018 11:50:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336665 - head/lib/msun/src X-SVN-Group: head X-SVN-Commit-Author: bde X-SVN-Commit-Paths: head/lib/msun/src X-SVN-Commit-Revision: 336665 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: Tue, 24 Jul 2018 11:50:06 -0000 Author: bde Date: Tue Jul 24 11:50:05 2018 New Revision: 336665 URL: https://svnweb.freebsd.org/changeset/base/336665 Log: In C remquol() and thus also in C remainderl(), don't clobber the sign bit of NaNs before possible returning a NaN. The remquo*() and remainder*() functions should now give bitwise identical results across arches and implementations, and bitwise consistent results (with lower precisions having truncated mantissas) across precisions. x86 already had consistency across amd64 and i386 and precisions by using the i387 consistently and normally not using the C versions. Inconsistencies for C reqmquol() were first detected on sparc64. Remove double second clearing of the sign bit and extra blank lines. Modified: head/lib/msun/src/s_remquol.c Modified: head/lib/msun/src/s_remquol.c ============================================================================== --- head/lib/msun/src/s_remquol.c Tue Jul 24 11:35:22 2018 (r336664) +++ head/lib/msun/src/s_remquol.c Tue Jul 24 11:50:05 2018 (r336665) @@ -79,7 +79,6 @@ remquol(long double x, long double y, int *quo) sxy = sx ^ uy.bits.sign; ux.bits.sign = 0; /* |x| */ uy.bits.sign = 0; /* |y| */ - x = ux.e; /* purge off exception values */ if((uy.bits.exp|uy.bits.manh|uy.bits.manl)==0 || /* y=0 */ @@ -126,7 +125,6 @@ remquol(long double x, long double y, int *quo) /* fix point fmod */ n = ix - iy; q = 0; - while(n--) { hz=hx-hy;lz=lx-ly; if(lx>MANL_SHIFT); lx = lx+lx;} @@ -154,9 +152,8 @@ remquol(long double x, long double y, int *quo) } else { ux.bits.exp = iy + BIAS; } - ux.bits.sign = 0; - x = ux.e; fixup: + x = ux.e; /* |x| */ y = fabsl(y); if (y < LDBL_MIN * 2) { if (x+x>y || (x+x==y && (q & 1))) { @@ -167,11 +164,9 @@ fixup: q++; x-=y; } - ux.e = x; ux.bits.sign ^= sx; x = ux.e; - q &= 0x7fffffff; *quo = (sxy ? -q : q); return x; From owner-svn-src-head@freebsd.org Tue Jul 24 14:55: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 D9C43104E170; Tue, 24 Jul 2018 14:55:48 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 876E772396; Tue, 24 Jul 2018 14:55:48 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 68A7A5181; Tue, 24 Jul 2018 14:55:48 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6OEtmIv081914; Tue, 24 Jul 2018 14:55:48 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6OEtmN3081913; Tue, 24 Jul 2018 14:55:48 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <201807241455.w6OEtmN3081913@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Tue, 24 Jul 2018 14:55:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336672 - in head/sys: modules/tcp modules/tcp/fastpath netinet/tcp_stacks X-SVN-Group: head X-SVN-Commit-Author: rrs X-SVN-Commit-Paths: in head/sys: modules/tcp modules/tcp/fastpath netinet/tcp_stacks X-SVN-Commit-Revision: 336672 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: Tue, 24 Jul 2018 14:55:49 -0000 Author: rrs Date: Tue Jul 24 14:55:47 2018 New Revision: 336672 URL: https://svnweb.freebsd.org/changeset/base/336672 Log: Delete the example tcp stack "fastpath" which was only put in has an example. Sponsored by: Netflix inc. Differential Revision: https://reviews.freebsd.org/D16420 Deleted: head/sys/modules/tcp/fastpath/ head/sys/netinet/tcp_stacks/fastpath.c Modified: head/sys/modules/tcp/Makefile Modified: head/sys/modules/tcp/Makefile ============================================================================== --- head/sys/modules/tcp/Makefile Tue Jul 24 13:31:50 2018 (r336671) +++ head/sys/modules/tcp/Makefile Tue Jul 24 14:55:47 2018 (r336672) @@ -6,12 +6,10 @@ SYSDIR?=${SRCTOP}/sys .include "${SYSDIR}/conf/kern.opts.mk" SUBDIR= \ - ${_tcp_fastpath} \ ${_tcp_rack} \ ${_tcpmd5} \ .if ${MK_EXTRA_TCP_STACKS} != "no" || defined(ALL_MODULES) -_tcp_fastpath= fastpath _tcp_rack= rack .endif From owner-svn-src-head@freebsd.org Tue Jul 24 16:31: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 CC3A8104FF1D; Tue, 24 Jul 2018 16:31:17 +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 A0ABF75959; Tue, 24 Jul 2018 16:31:17 +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 68107607D; Tue, 24 Jul 2018 16:31:17 +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 w6OGVHnI029879; Tue, 24 Jul 2018 16:31:17 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6OGVHUt029877; Tue, 24 Jul 2018 16:31:17 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201807241631.w6OGVHUt029877@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 24 Jul 2018 16:31:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336674 - in head: share/man/man9 sys/net X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head: share/man/man9 sys/net X-SVN-Commit-Revision: 336674 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: Tue, 24 Jul 2018 16:31:18 -0000 Author: andrew Date: Tue Jul 24 16:31:16 2018 New Revision: 336674 URL: https://svnweb.freebsd.org/changeset/base/336674 Log: As with DPCPU create VNET_DEFINE_STATIC for when a variable needs to be declaired static. This will allow us to change the definition on arm64 as it has the same issues described in r336349. Reviewed by: bz Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D16147 Modified: head/share/man/man9/vnet.9 head/sys/net/vnet.h Modified: head/share/man/man9/vnet.9 ============================================================================== --- head/share/man/man9/vnet.9 Tue Jul 24 15:42:23 2018 (r336673) +++ head/share/man/man9/vnet.9 Tue Jul 24 16:31:16 2018 (r336674) @@ -66,6 +66,10 @@ .Fa "type" "name" .Fc .\" +.Fo VNET_DEFINE_STATIC +.Fa "type" "name" +.Fc +.\" .Bd -literal #define V_name VNET(name) .Ed @@ -208,11 +212,15 @@ Variables are virtualized by using the .Fn VNET_DEFINE macro rather than writing them out as .Em type name . -One can still use static initialization or storage class specifiers, e.g., +One can still use static initialization, e.g., .Pp -.Dl Li static VNET_DEFINE(int, foo) = 1; -or -.Dl Li static VNET_DEFINE(SLIST_HEAD(, bar), bars); +.Dl Li VNET_DEFINE(int, foo) = 1; +.Pp +Variables declared with the static keyword can use the +.Fn VNET_DEFINE_STATIC +macro, e.g., +.Pp +.Dl Li VNET_DEFINE_STATIC(SLIST_HEAD(, bar), bars); .Pp Static initialization is not possible when the virtualized variable would need to be referenced, e.g., with Modified: head/sys/net/vnet.h ============================================================================== --- head/sys/net/vnet.h Tue Jul 24 15:42:23 2018 (r336673) +++ head/sys/net/vnet.h Tue Jul 24 16:31:16 2018 (r336674) @@ -93,6 +93,8 @@ struct vnet { #define VNET_PCPUSTAT_DEFINE(type, name) \ VNET_DEFINE(counter_u64_t, name[sizeof(type) / sizeof(uint64_t)]) +#define VNET_PCPUSTAT_DEFINE_STATIC(type, name) \ + VNET_DEFINE_STATIC(counter_u64_t, name[sizeof(type) / sizeof(uint64_t)]) #define VNET_PCPUSTAT_ALLOC(name, wait) \ COUNTER_ARRAY_ALLOC(VNET(name), \ @@ -268,7 +270,10 @@ extern struct sx vnet_sxlock; */ #define VNET_NAME(n) vnet_entry_##n #define VNET_DECLARE(t, n) extern t VNET_NAME(n) -#define VNET_DEFINE(t, n) t VNET_NAME(n) __section(VNET_SETNAME) __used +#define VNET_DEFINE(t, n) \ + t VNET_NAME(n) __section(VNET_SETNAME) __used +#define VNET_DEFINE_STATIC(t, n) \ + static t VNET_NAME(n) __section(VNET_SETNAME) __used #define _VNET_PTR(b, n) (__typeof(VNET_NAME(n))*) \ ((b) + (uintptr_t)&VNET_NAME(n)) @@ -400,7 +405,8 @@ do { \ */ #define VNET_NAME(n) n #define VNET_DECLARE(t, n) extern t n -#define VNET_DEFINE(t, n) t n +#define VNET_DEFINE(t, n) struct _hack; t n +#define VNET_DEFINE_STATIC(t, n) static t n #define _VNET_PTR(b, n) &VNET_NAME(n) /* From owner-svn-src-head@freebsd.org Tue Jul 24 16:34: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 A27D21050188; Tue, 24 Jul 2018 16:34:59 +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 5776775D81; Tue, 24 Jul 2018 16:34:59 +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 1CC716217; Tue, 24 Jul 2018 16:34:59 +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 w6OGYwtJ034227; Tue, 24 Jul 2018 16:34:58 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6OGYwY6034223; Tue, 24 Jul 2018 16:34:58 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201807241634.w6OGYwY6034223@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Tue, 24 Jul 2018 16:34:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336675 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 336675 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: Tue, 24 Jul 2018 16:34:59 -0000 Author: brd Date: Tue Jul 24 16:34:58 2018 New Revision: 336675 URL: https://svnweb.freebsd.org/changeset/base/336675 Log: Convert bsd.confs.mk to support DIRS. This paves the way for moving config files out of head/etc and into the directories with the src. Approved by: bapt (mentor) Differential Revision: https://reviews.freebsd.org/D16406 Modified: head/share/mk/bsd.confs.mk head/share/mk/bsd.files.mk head/share/mk/bsd.lib.mk Modified: head/share/mk/bsd.confs.mk ============================================================================== --- head/share/mk/bsd.confs.mk Tue Jul 24 16:31:16 2018 (r336674) +++ head/share/mk/bsd.confs.mk Tue Jul 24 16:34:58 2018 (r336675) @@ -1,25 +1,38 @@ # $FreeBSD$ .if !target(____) -.error bsd.conf.mk cannot be included directly. +. error bsd.conf.mk cannot be included directly. .endif +.if !target(____) +. if target(____) +. error bsd.dirs.mk must be included after bsd.confs.mk. +. endif + +____: + CONFGROUPS?= CONFS -.if !target(buildconfig) -.for group in ${CONFGROUPS} +. if !target(buildconfig) +. for group in ${CONFGROUPS} buildconfig: ${${group}} -.endfor -.endif +. endfor +. endif -.if !defined(_SKIP_BUILD) +. if !defined(_SKIP_BUILD) all: buildconfig -.endif +. endif -.if !target(installconfig) -.for group in ${CONFGROUPS} -.if defined(${group}) && !empty(${group}) +. if !target(installconfig) +. for group in ${CONFGROUPS} +. if defined(${group}) && !empty(${group}) +. if !target(afterinstallconfig) +afterinstallconfig: +. endif +installconfig: realinstallconfig afterinstallconfig +.ORDER: realinstallconfig afterinstallconfig + ${group}OWN?= ${SHAREOWN} ${group}GRP?= ${SHAREGRP} ${group}MODE?= ${CONFMODE} @@ -27,61 +40,100 @@ ${group}DIR?= ${CONFDIR} STAGE_SETS+= ${group:C,[/*],_,g} STAGE_DIR.${group:C,[/*],_,g}= ${STAGE_OBJTOP}${${group}DIR} -_${group}CONFS= -.for cnf in ${${group}} -.if defined(${group}OWN_${cnf:T}) || defined(${group}GRP_${cnf:T}) || \ - defined(${group}MODE_${cnf:T}) || defined(${group}DIR_${cnf:T}) || \ - defined(${group}NAME_${cnf:T}) || defined(${group}NAME) -${group}OWN_${cnf:T}?= ${${group}OWN} -${group}GRP_${cnf:T}?= ${${group}GRP} -${group}MODE_${cnf:T}?= ${${group}MODE} -${group}DIR_${cnf:T}?= ${${group}DIR} -.if defined(${group}NAME) -${group}NAME_${cnf:T}?= ${${group}NAME} -.else -${group}NAME_${cnf:T}?= ${cnf:T} -.endif +. if defined(NO_ROOT) +. if !defined(${group}TAGS) || ! ${${group}TAGS:Mpackage=*} +. if defined(${${group}PACKAGE}) +${group}TAGS+= package=${${group}PACKAGE:Uruntime} +. else +${group}TAGS+= package=${PACKAGE:Uruntime} +. endif +. endif +${group}TAGS+= config +${group}TAG_ARGS= -T ${${group}TAGS:[*]:S/ /,/g} +. endif + + +. if ${${group}DIR:S/^\///} == ${${group}DIR} +# ${group}DIR specifies a variable that specifies a path +DIRS+= ${${group}DIR} +_${group}DIR= ${${group}DIR} +. else +# ${group}DIR specifies a path +DIRS+= ${group}DIR +_${group}DIR= ${group}DIR +. endif + + +. for cnf in ${${group}} +${group}OWN_${cnf}?= ${${group}OWN} +${group}GRP_${cnf}?= ${${group}GRP} +${group}MODE_${cnf}?= ${${group}MODE} +${group}DIR_${cnf}?= ${${group}DIR} +. if defined(${group}NAME) +${group}NAME_${cnf}?= ${${group}NAME} +. else +${group}NAME_${cnf}?= ${cnf:T} +. endif + + +# Determine the directory for the current file. Default to the parent group +# DIR, then check to see how to pass that variable on below. +${group}DIR_${cnf}?= ${${group}DIR} +. if ${${group}DIR_${cnf}:S/^\///} == ${${group}DIR_${cnf}} +# DIR specifies a variable that specifies a path +_${group}DIR_${cnf}= ${${group}DIR_${cnf}} +. else +# DIR directly specifies a path +_${group}DIR_${cnf}= ${group}DIR_${cnf} +. endif +${group}PREFIX_${cnf}= ${DESTDIR}${${_${group}DIR_${cnf}}} + +# Append DIR to DIRS if not already in place -- DIRS is already filtered, so +# this is primarily to ease inspection. +. for d in ${DIRS} +_DIRS+= ${${d}} +. endfor +. if ${DIRS:M${_${group}DIR_${cnf}}} == "" +. if ${_DIRS:M${${_${group}DIR_${cnf}}}} == "" +DIRS+= ${_${group}DIR_${cnf}} +. else +_${group}DIR_${cnf}= ${group}DIR +. endif +. endif + +. if defined(${group}NAME) +${group}NAME_${cnf}?= ${${group}NAME} +. else +${group}NAME_${cnf}?= ${cnf:T} +. endif # defined(${group}NAME) + + STAGE_AS_SETS+= ${cnf:T} STAGE_AS_${cnf:T}= ${${group}NAME_${cnf:T}} # XXX {group}OWN,GRP,MODE STAGE_DIR.${cnf:T}= ${STAGE_OBJTOP}${${group}DIR_${cnf:T}} stage_as.${cnf:T}: ${cnf} -installconfig: _${group}INS_${cnf:T} +realinstallconfig: installdirs-${_${group}DIR_${cnf}} _${group}INS_${cnf:T} _${group}INS_${cnf:T}: ${cnf} - ${INSTALL} -C -o ${${group}OWN_${.ALLSRC:T}} \ - -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \ - ${.ALLSRC} \ - ${DESTDIR}${${group}DIR_${.ALLSRC:T}}/${${group}NAME_${.ALLSRC:T}} -.else -_${group}CONFS+= ${cnf} -.endif -.endfor -.if !empty(_${group}CONFS) -stage_files.${group}: ${_${group}CONFS} + ${INSTALL} ${${group}TAG_ARGS} -C -o ${${group}OWN_${cnf}} \ + -g ${${group}GRP_${cnf}} -m ${${group}MODE_${cnf}} \ + ${.ALLSRC} ${${group}PREFIX_${cnf}}/${${group}NAME_${cnf}} +. endfor # for cnf in ${${group}} -installconfig: _${group}INS -_${group}INS: ${_${group}CONFS} -.if defined(${group}NAME) - ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \ - ${.ALLSRC} ${DESTDIR}${${group}DIR}/${${group}NAME} -.else - ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \ - ${.ALLSRC} ${DESTDIR}${${group}DIR}/ -.endif -.endif -.endif # defined(${group}) && !empty(${group}) -.endfor +. endif # defined(${group}) && !empty(${group}) +. endfor .endif # !target(installconfig) .if ${MK_STAGING} != "no" -.if !empty(STAGE_SETS) +. if !empty(STAGE_SETS) buildconfig: stage_files -.if !empty(STAGE_AS_SETS) +. if !empty(STAGE_AS_SETS) buildconfig: stage_as +. endif +. endif .endif -.endif -.endif +.endif # !target(____) Modified: head/share/mk/bsd.files.mk ============================================================================== --- head/share/mk/bsd.files.mk Tue Jul 24 16:31:16 2018 (r336674) +++ head/share/mk/bsd.files.mk Tue Jul 24 16:34:58 2018 (r336675) @@ -121,4 +121,6 @@ buildfiles: stage_as .endif .endif +.include + .endif # !target(____) Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Tue Jul 24 16:31:16 2018 (r336674) +++ head/share/mk/bsd.lib.mk Tue Jul 24 16:34:58 2018 (r336675) @@ -432,9 +432,9 @@ _libinstall: .if !defined(LIBRARIES_ONLY) .include +.include .include .include -.include .endif LINKOWN?= ${LIBOWN} From owner-svn-src-head@freebsd.org Tue Jul 24 16:36: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 3C8EF1050236; Tue, 24 Jul 2018 16:36:02 +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 E0BB675FE8; Tue, 24 Jul 2018 16:36:01 +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 C1652621E; Tue, 24 Jul 2018 16:36:01 +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 w6OGa1CJ034380; Tue, 24 Jul 2018 16:36:01 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6OGZqEx034325; Tue, 24 Jul 2018 16:35:52 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201807241635.w6OGZqEx034325@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 24 Jul 2018 16:35:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336676 - in head/sys: contrib/ipfilter/netinet net netgraph netinet netinet/cc netinet6 netipsec netpfil/ipfw netpfil/ipfw/nptv6 netpfil/ipfw/pmod netpfil/pf X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys: contrib/ipfilter/netinet net netgraph netinet netinet/cc netinet6 netipsec netpfil/ipfw netpfil/ipfw/nptv6 netpfil/ipfw/pmod netpfil/pf X-SVN-Commit-Revision: 336676 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: Tue, 24 Jul 2018 16:36:02 -0000 Author: andrew Date: Tue Jul 24 16:35:52 2018 New Revision: 336676 URL: https://svnweb.freebsd.org/changeset/base/336676 Log: Use the new VNET_DEFINE_STATIC macro when we are defining static VNET variables. Reviewed by: bz Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D16147 Modified: head/sys/contrib/ipfilter/netinet/ip_rpcb_pxy.c head/sys/net/bpf.c head/sys/net/ieee8023ad_lacp.c head/sys/net/if.c head/sys/net/if_bridge.c head/sys/net/if_clone.c head/sys/net/if_disc.c head/sys/net/if_edsc.c head/sys/net/if_enc.c head/sys/net/if_epair.c head/sys/net/if_ethersubr.c head/sys/net/if_gif.c head/sys/net/if_gre.c head/sys/net/if_ipsec.c head/sys/net/if_lagg.c head/sys/net/if_llatbl.c head/sys/net/if_loop.c head/sys/net/if_me.c head/sys/net/if_vlan.c head/sys/net/netisr.c head/sys/net/route.c head/sys/net/rtsock.c head/sys/net/vnet.c head/sys/netgraph/ng_base.c head/sys/netgraph/ng_eiface.c head/sys/netgraph/ng_iface.c head/sys/netinet/cc/cc_cdg.c head/sys/netinet/cc/cc_chd.c head/sys/netinet/cc/cc_dctcp.c head/sys/netinet/cc/cc_hd.c head/sys/netinet/cc/cc_htcp.c head/sys/netinet/cc/cc_newreno.c head/sys/netinet/cc/cc_vegas.c head/sys/netinet/if_ether.c head/sys/netinet/igmp.c head/sys/netinet/in.c head/sys/netinet/in_gif.c head/sys/netinet/in_pcb.c head/sys/netinet/ip_carp.c head/sys/netinet/ip_divert.c head/sys/netinet/ip_gre.c head/sys/netinet/ip_icmp.c head/sys/netinet/ip_id.c head/sys/netinet/ip_input.c head/sys/netinet/ip_mroute.c head/sys/netinet/ip_options.c head/sys/netinet/ip_reass.c head/sys/netinet/tcp_fastopen.c head/sys/netinet/tcp_hostcache.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_syncache.c head/sys/netinet/tcp_timewait.c head/sys/netinet/udp_usrreq.c head/sys/netinet6/frag6.c head/sys/netinet6/icmp6.c head/sys/netinet6/in6_gif.c head/sys/netinet6/in6_rmx.c head/sys/netinet6/in6_src.c head/sys/netinet6/ip6_gre.c head/sys/netinet6/ip6_mroute.c head/sys/netinet6/mld6.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6_nbr.c head/sys/netinet6/nd6_rtr.c head/sys/netinet6/scope6.c head/sys/netinet6/send.c head/sys/netipsec/ipsec.c head/sys/netipsec/key.c head/sys/netipsec/keysock.c head/sys/netpfil/ipfw/ip_fw2.c head/sys/netpfil/ipfw/ip_fw_bpf.c head/sys/netpfil/ipfw/ip_fw_dynamic.c head/sys/netpfil/ipfw/ip_fw_pfil.c head/sys/netpfil/ipfw/ip_fw_sockopt.c head/sys/netpfil/ipfw/nptv6/nptv6.c head/sys/netpfil/ipfw/pmod/tcpmod.c head/sys/netpfil/pf/if_pflog.c head/sys/netpfil/pf/if_pfsync.c head/sys/netpfil/pf/pf.c head/sys/netpfil/pf/pf_if.c head/sys/netpfil/pf/pf_ioctl.c head/sys/netpfil/pf/pf_norm.c head/sys/netpfil/pf/pf_osfp.c head/sys/netpfil/pf/pf_table.c Modified: head/sys/contrib/ipfilter/netinet/ip_rpcb_pxy.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_rpcb_pxy.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/contrib/ipfilter/netinet/ip_rpcb_pxy.c Tue Jul 24 16:35:52 2018 (r336676) @@ -80,7 +80,7 @@ static void ipf_p_rpcb_fixlen __P((fr_info_t *, in */ static frentry_t rpcbfr; /* Skeleton rule for reference by entities this proxy creates. */ -static VNET_DEFINE(int, rpcbcnt); +VNET_DEFINE_STATIC(int, rpcbcnt); #define V_rpcbcnt VNET(rpcbcnt) /* Upper bound of allocated RPCB sessions. */ /* XXX rpcbcnt still requires locking. */ Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/net/bpf.c Tue Jul 24 16:35:52 2018 (r336676) @@ -213,7 +213,7 @@ SYSCTL_INT(_net_bpf, OID_AUTO, zerocopy_enable, CTLFLA static SYSCTL_NODE(_net_bpf, OID_AUTO, stats, CTLFLAG_MPSAFE | CTLFLAG_RW, bpf_stats_sysctl, "bpf statistics portal"); -static VNET_DEFINE(int, bpf_optimize_writers) = 0; +VNET_DEFINE_STATIC(int, bpf_optimize_writers) = 0; #define V_bpf_optimize_writers VNET(bpf_optimize_writers) SYSCTL_INT(_net_bpf, OID_AUTO, optimize_writers, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(bpf_optimize_writers), 0, Modified: head/sys/net/ieee8023ad_lacp.c ============================================================================== --- head/sys/net/ieee8023ad_lacp.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/net/ieee8023ad_lacp.c Tue Jul 24 16:35:52 2018 (r336676) @@ -194,13 +194,13 @@ static const char *lacp_format_portid(const struct lac static void lacp_dprintf(const struct lacp_port *, const char *, ...) __attribute__((__format__(__printf__, 2, 3))); -static VNET_DEFINE(int, lacp_debug); +VNET_DEFINE_STATIC(int, lacp_debug); #define V_lacp_debug VNET(lacp_debug) SYSCTL_NODE(_net_link_lagg, OID_AUTO, lacp, CTLFLAG_RD, 0, "ieee802.3ad"); SYSCTL_INT(_net_link_lagg_lacp, OID_AUTO, debug, CTLFLAG_RWTUN | CTLFLAG_VNET, &VNET_NAME(lacp_debug), 0, "Enable LACP debug logging (1=debug, 2=trace)"); -static VNET_DEFINE(int, lacp_default_strict_mode) = 1; +VNET_DEFINE_STATIC(int, lacp_default_strict_mode) = 1; SYSCTL_INT(_net_link_lagg_lacp, OID_AUTO, default_strict_mode, CTLFLAG_RWTUN | CTLFLAG_VNET, &VNET_NAME(lacp_default_strict_mode), 0, "LACP strict protocol compliance default"); Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/net/if.c Tue Jul 24 16:35:52 2018 (r336676) @@ -293,7 +293,7 @@ int ifqmaxlen = IFQ_MAXLEN; VNET_DEFINE(struct ifnethead, ifnet); /* depend on static init XXX */ VNET_DEFINE(struct ifgrouphead, ifg_head); -static VNET_DEFINE(int, if_indexlim) = 8; +VNET_DEFINE_STATIC(int, if_indexlim) = 8; /* Table of ifnet by index. */ VNET_DEFINE(struct ifnet **, ifindex_table); Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/net/if_bridge.c Tue Jul 24 16:35:52 2018 (r336676) @@ -229,7 +229,7 @@ struct bridge_softc { u_char sc_defaddr[6]; /* Default MAC address */ }; -static VNET_DEFINE(struct mtx, bridge_list_mtx); +VNET_DEFINE_STATIC(struct mtx, bridge_list_mtx); #define V_bridge_list_mtx VNET(bridge_list_mtx) static eventhandler_tag bridge_detach_cookie; @@ -354,59 +354,59 @@ SYSCTL_DECL(_net_link); static SYSCTL_NODE(_net_link, IFT_BRIDGE, bridge, CTLFLAG_RW, 0, "Bridge"); /* only pass IP[46] packets when pfil is enabled */ -static VNET_DEFINE(int, pfil_onlyip) = 1; +VNET_DEFINE_STATIC(int, pfil_onlyip) = 1; #define V_pfil_onlyip VNET(pfil_onlyip) SYSCTL_INT(_net_link_bridge, OID_AUTO, pfil_onlyip, CTLFLAG_RWTUN | CTLFLAG_VNET, &VNET_NAME(pfil_onlyip), 0, "Only pass IP packets when pfil is enabled"); /* run pfil hooks on the bridge interface */ -static VNET_DEFINE(int, pfil_bridge) = 1; +VNET_DEFINE_STATIC(int, pfil_bridge) = 1; #define V_pfil_bridge VNET(pfil_bridge) SYSCTL_INT(_net_link_bridge, OID_AUTO, pfil_bridge, CTLFLAG_RWTUN | CTLFLAG_VNET, &VNET_NAME(pfil_bridge), 0, "Packet filter on the bridge interface"); /* layer2 filter with ipfw */ -static VNET_DEFINE(int, pfil_ipfw); +VNET_DEFINE_STATIC(int, pfil_ipfw); #define V_pfil_ipfw VNET(pfil_ipfw) /* layer2 ARP filter with ipfw */ -static VNET_DEFINE(int, pfil_ipfw_arp); +VNET_DEFINE_STATIC(int, pfil_ipfw_arp); #define V_pfil_ipfw_arp VNET(pfil_ipfw_arp) SYSCTL_INT(_net_link_bridge, OID_AUTO, ipfw_arp, CTLFLAG_RWTUN | CTLFLAG_VNET, &VNET_NAME(pfil_ipfw_arp), 0, "Filter ARP packets through IPFW layer2"); /* run pfil hooks on the member interface */ -static VNET_DEFINE(int, pfil_member) = 1; +VNET_DEFINE_STATIC(int, pfil_member) = 1; #define V_pfil_member VNET(pfil_member) SYSCTL_INT(_net_link_bridge, OID_AUTO, pfil_member, CTLFLAG_RWTUN | CTLFLAG_VNET, &VNET_NAME(pfil_member), 0, "Packet filter on the member interface"); /* run pfil hooks on the physical interface for locally destined packets */ -static VNET_DEFINE(int, pfil_local_phys); +VNET_DEFINE_STATIC(int, pfil_local_phys); #define V_pfil_local_phys VNET(pfil_local_phys) SYSCTL_INT(_net_link_bridge, OID_AUTO, pfil_local_phys, CTLFLAG_RWTUN | CTLFLAG_VNET, &VNET_NAME(pfil_local_phys), 0, "Packet filter on the physical interface for locally destined packets"); /* log STP state changes */ -static VNET_DEFINE(int, log_stp); +VNET_DEFINE_STATIC(int, log_stp); #define V_log_stp VNET(log_stp) SYSCTL_INT(_net_link_bridge, OID_AUTO, log_stp, CTLFLAG_RWTUN | CTLFLAG_VNET, &VNET_NAME(log_stp), 0, "Log STP state changes"); /* share MAC with first bridge member */ -static VNET_DEFINE(int, bridge_inherit_mac); +VNET_DEFINE_STATIC(int, bridge_inherit_mac); #define V_bridge_inherit_mac VNET(bridge_inherit_mac) SYSCTL_INT(_net_link_bridge, OID_AUTO, inherit_mac, CTLFLAG_RWTUN | CTLFLAG_VNET, &VNET_NAME(bridge_inherit_mac), 0, "Inherit MAC address from the first bridge member"); -static VNET_DEFINE(int, allow_llz_overlap) = 0; +VNET_DEFINE_STATIC(int, allow_llz_overlap) = 0; #define V_allow_llz_overlap VNET(allow_llz_overlap) SYSCTL_INT(_net_link_bridge, OID_AUTO, allow_llz_overlap, CTLFLAG_RW | CTLFLAG_VNET, &VNET_NAME(allow_llz_overlap), 0, @@ -510,7 +510,7 @@ const struct bridge_control bridge_control_table[] = { }; const int bridge_control_table_size = nitems(bridge_control_table); -static VNET_DEFINE(LIST_HEAD(, bridge_softc), bridge_list); +VNET_DEFINE_STATIC(LIST_HEAD(, bridge_softc), bridge_list); #define V_bridge_list VNET(bridge_list) #define BRIDGE_LIST_LOCK_INIT(x) mtx_init(&V_bridge_list_mtx, \ "if_bridge list", NULL, MTX_DEF) @@ -518,7 +518,7 @@ static VNET_DEFINE(LIST_HEAD(, bridge_softc), bridge_l #define BRIDGE_LIST_LOCK(x) mtx_lock(&V_bridge_list_mtx) #define BRIDGE_LIST_UNLOCK(x) mtx_unlock(&V_bridge_list_mtx) -static VNET_DEFINE(struct if_clone *, bridge_cloner); +VNET_DEFINE_STATIC(struct if_clone *, bridge_cloner); #define V_bridge_cloner VNET(bridge_cloner) static const char bridge_name[] = "bridge"; Modified: head/sys/net/if_clone.c ============================================================================== --- head/sys/net/if_clone.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/net/if_clone.c Tue Jul 24 16:35:52 2018 (r336676) @@ -108,7 +108,7 @@ static int ifc_simple_destroy(struct if_clone *, s static struct mtx if_cloners_mtx; MTX_SYSINIT(if_cloners_lock, &if_cloners_mtx, "if_cloners lock", MTX_DEF); -static VNET_DEFINE(int, if_cloners_count); +VNET_DEFINE_STATIC(int, if_cloners_count); VNET_DEFINE(LIST_HEAD(, if_clone), if_cloners); #define V_if_cloners_count VNET(if_cloners_count) Modified: head/sys/net/if_disc.c ============================================================================== --- head/sys/net/if_disc.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/net/if_disc.c Tue Jul 24 16:35:52 2018 (r336676) @@ -76,7 +76,7 @@ static void disc_clone_destroy(struct ifnet *); static const char discname[] = "disc"; static MALLOC_DEFINE(M_DISC, discname, "Discard interface"); -static VNET_DEFINE(struct if_clone *, disc_cloner); +VNET_DEFINE_STATIC(struct if_clone *, disc_cloner); #define V_disc_cloner VNET(disc_cloner) static int Modified: head/sys/net/if_edsc.c ============================================================================== --- head/sys/net/if_edsc.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/net/if_edsc.c Tue Jul 24 16:35:52 2018 (r336676) @@ -72,7 +72,7 @@ struct edsc_softc { /* * Attach to the interface cloning framework. */ -static VNET_DEFINE(struct if_clone *, edsc_cloner); +VNET_DEFINE_STATIC(struct if_clone *, edsc_cloner); #define V_edsc_cloner VNET(edsc_cloner) static int edsc_clone_create(struct if_clone *, int, caddr_t); static void edsc_clone_destroy(struct ifnet *); Modified: head/sys/net/if_enc.c ============================================================================== --- head/sys/net/if_enc.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/net/if_enc.c Tue Jul 24 16:35:52 2018 (r336676) @@ -86,9 +86,9 @@ struct enchdr { struct enc_softc { struct ifnet *sc_ifp; }; -static VNET_DEFINE(struct enc_softc *, enc_sc); +VNET_DEFINE_STATIC(struct enc_softc *, enc_sc); #define V_enc_sc VNET(enc_sc) -static VNET_DEFINE(struct if_clone *, enc_cloner); +VNET_DEFINE_STATIC(struct if_clone *, enc_cloner); #define V_enc_cloner VNET(enc_cloner) static int enc_ioctl(struct ifnet *, u_long, caddr_t); @@ -111,10 +111,10 @@ static const char encname[] = "enc"; * some changes to the packet, e.g. address translation. If PFIL hook * consumes mbuf, nothing will be captured. */ -static VNET_DEFINE(int, filter_mask_in) = IPSEC_ENC_BEFORE; -static VNET_DEFINE(int, bpf_mask_in) = IPSEC_ENC_BEFORE; -static VNET_DEFINE(int, filter_mask_out) = IPSEC_ENC_BEFORE; -static VNET_DEFINE(int, bpf_mask_out) = IPSEC_ENC_BEFORE | IPSEC_ENC_AFTER; +VNET_DEFINE_STATIC(int, filter_mask_in) = IPSEC_ENC_BEFORE; +VNET_DEFINE_STATIC(int, bpf_mask_in) = IPSEC_ENC_BEFORE; +VNET_DEFINE_STATIC(int, filter_mask_out) = IPSEC_ENC_BEFORE; +VNET_DEFINE_STATIC(int, bpf_mask_out) = IPSEC_ENC_BEFORE | IPSEC_ENC_AFTER; #define V_filter_mask_in VNET(filter_mask_in) #define V_bpf_mask_in VNET(bpf_mask_in) #define V_filter_mask_out VNET(filter_mask_out) Modified: head/sys/net/if_epair.c ============================================================================== --- head/sys/net/if_epair.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/net/if_epair.c Tue Jul 24 16:35:52 2018 (r336676) @@ -180,7 +180,7 @@ STAILQ_HEAD(eid_list, epair_ifp_drain); static MALLOC_DEFINE(M_EPAIR, epairname, "Pair of virtual cross-over connected Ethernet-like interfaces"); -static VNET_DEFINE(struct if_clone *, epair_cloner); +VNET_DEFINE_STATIC(struct if_clone *, epair_cloner); #define V_epair_cloner VNET(epair_cloner) /* Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/net/if_ethersubr.c Tue Jul 24 16:35:52 2018 (r336676) @@ -1291,7 +1291,7 @@ static SYSCTL_NODE(_net_link, IFT_L2VLAN, vlan, CTLFLA static SYSCTL_NODE(_net_link_vlan, PF_LINK, link, CTLFLAG_RW, 0, "for consistency"); -static VNET_DEFINE(int, soft_pad); +VNET_DEFINE_STATIC(int, soft_pad); #define V_soft_pad VNET(soft_pad) SYSCTL_INT(_net_link_vlan, OID_AUTO, soft_pad, CTLFLAG_RW | CTLFLAG_VNET, &VNET_NAME(soft_pad), 0, Modified: head/sys/net/if_gif.c ============================================================================== --- head/sys/net/if_gif.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/net/if_gif.c Tue Jul 24 16:35:52 2018 (r336676) @@ -110,7 +110,7 @@ static int gif_transmit(struct ifnet *, struct mbuf *) static void gif_qflush(struct ifnet *); static int gif_clone_create(struct if_clone *, int, caddr_t); static void gif_clone_destroy(struct ifnet *); -static VNET_DEFINE(struct if_clone *, gif_cloner); +VNET_DEFINE_STATIC(struct if_clone *, gif_cloner); #define V_gif_cloner VNET(gif_cloner) SYSCTL_DECL(_net_link); @@ -127,7 +127,7 @@ static SYSCTL_NODE(_net_link, IFT_GIF, gif, CTLFLAG_RW */ #define MAX_GIF_NEST 1 #endif -static VNET_DEFINE(int, max_gif_nesting) = MAX_GIF_NEST; +VNET_DEFINE_STATIC(int, max_gif_nesting) = MAX_GIF_NEST; #define V_max_gif_nesting VNET(max_gif_nesting) SYSCTL_INT(_net_link_gif, OID_AUTO, max_nesting, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(max_gif_nesting), 0, "Max nested tunnels"); Modified: head/sys/net/if_gre.c ============================================================================== --- head/sys/net/if_gre.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/net/if_gre.c Tue Jul 24 16:35:52 2018 (r336676) @@ -94,7 +94,7 @@ SX_SYSINIT(gre_ioctl_sx, &gre_ioctl_sx, "gre_ioctl"); static int gre_clone_create(struct if_clone *, int, caddr_t); static void gre_clone_destroy(struct ifnet *); -static VNET_DEFINE(struct if_clone *, gre_cloner); +VNET_DEFINE_STATIC(struct if_clone *, gre_cloner); #define V_gre_cloner VNET(gre_cloner) static void gre_qflush(struct ifnet *); @@ -119,7 +119,7 @@ static SYSCTL_NODE(_net_link, IFT_TUNNEL, gre, CTLFLAG #define MAX_GRE_NEST 1 #endif -static VNET_DEFINE(int, max_gre_nesting) = MAX_GRE_NEST; +VNET_DEFINE_STATIC(int, max_gre_nesting) = MAX_GRE_NEST; #define V_max_gre_nesting VNET(max_gre_nesting) SYSCTL_INT(_net_link_gre, OID_AUTO, max_nesting, CTLFLAG_RW | CTLFLAG_VNET, &VNET_NAME(max_gre_nesting), 0, "Max nested tunnels"); Modified: head/sys/net/if_ipsec.c ============================================================================== --- head/sys/net/if_ipsec.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/net/if_ipsec.c Tue Jul 24 16:35:52 2018 (r336676) @@ -120,9 +120,9 @@ RM_SYSINIT(ipsec_sc_lock, &ipsec_sc_lock, "if_ipsec so #define IPSEC_SC_WLOCK_ASSERT() rm_assert(&ipsec_sc_lock, RA_WLOCKED) LIST_HEAD(ipsec_iflist, ipsec_softc); -static VNET_DEFINE(struct ipsec_iflist, ipsec_sc_list); -static VNET_DEFINE(struct ipsec_iflist *, ipsec_sc_htbl); -static VNET_DEFINE(u_long, ipsec_sc_hmask); +VNET_DEFINE_STATIC(struct ipsec_iflist, ipsec_sc_list); +VNET_DEFINE_STATIC(struct ipsec_iflist *, ipsec_sc_htbl); +VNET_DEFINE_STATIC(u_long, ipsec_sc_hmask); #define V_ipsec_sc_list VNET(ipsec_sc_list) #define V_ipsec_sc_htbl VNET(ipsec_sc_htbl) #define V_ipsec_sc_hmask VNET(ipsec_sc_hmask) @@ -162,7 +162,7 @@ static void ipsec_qflush(struct ifnet *); static int ipsec_clone_create(struct if_clone *, int, caddr_t); static void ipsec_clone_destroy(struct ifnet *); -static VNET_DEFINE(struct if_clone *, ipsec_cloner); +VNET_DEFINE_STATIC(struct if_clone *, ipsec_cloner); #define V_ipsec_cloner VNET(ipsec_cloner) static int Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/net/if_lagg.c Tue Jul 24 16:35:52 2018 (r336676) @@ -97,7 +97,7 @@ static struct { VNET_DEFINE(SLIST_HEAD(__trhead, lagg_softc), lagg_list); /* list of laggs */ #define V_lagg_list VNET(lagg_list) -static VNET_DEFINE(struct mtx, lagg_list_mtx); +VNET_DEFINE_STATIC(struct mtx, lagg_list_mtx); #define V_lagg_list_mtx VNET(lagg_list_mtx) #define LAGG_LIST_LOCK_INIT(x) mtx_init(&V_lagg_list_mtx, \ "if_lagg list", NULL, MTX_DEF) @@ -108,7 +108,7 @@ eventhandler_tag lagg_detach_cookie = NULL; static int lagg_clone_create(struct if_clone *, int, caddr_t); static void lagg_clone_destroy(struct ifnet *); -static VNET_DEFINE(struct if_clone *, lagg_cloner); +VNET_DEFINE_STATIC(struct if_clone *, lagg_cloner); #define V_lagg_cloner VNET(lagg_cloner) static const char laggname[] = "lagg"; @@ -249,21 +249,21 @@ SYSCTL_NODE(_net_link, OID_AUTO, lagg, CTLFLAG_RW, 0, "Link Aggregation"); /* Allow input on any failover links */ -static VNET_DEFINE(int, lagg_failover_rx_all); +VNET_DEFINE_STATIC(int, lagg_failover_rx_all); #define V_lagg_failover_rx_all VNET(lagg_failover_rx_all) SYSCTL_INT(_net_link_lagg, OID_AUTO, failover_rx_all, CTLFLAG_RW | CTLFLAG_VNET, &VNET_NAME(lagg_failover_rx_all), 0, "Accept input from any interface in a failover lagg"); /* Default value for using flowid */ -static VNET_DEFINE(int, def_use_flowid) = 0; +VNET_DEFINE_STATIC(int, def_use_flowid) = 0; #define V_def_use_flowid VNET(def_use_flowid) SYSCTL_INT(_net_link_lagg, OID_AUTO, default_use_flowid, CTLFLAG_RWTUN, &VNET_NAME(def_use_flowid), 0, "Default setting for using flow id for load sharing"); /* Default value for flowid shift */ -static VNET_DEFINE(int, def_flowid_shift) = 16; +VNET_DEFINE_STATIC(int, def_flowid_shift) = 16; #define V_def_flowid_shift VNET(def_flowid_shift) SYSCTL_INT(_net_link_lagg, OID_AUTO, default_flowid_shift, CTLFLAG_RWTUN, &VNET_NAME(def_flowid_shift), 0, Modified: head/sys/net/if_llatbl.c ============================================================================== --- head/sys/net/if_llatbl.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/net/if_llatbl.c Tue Jul 24 16:35:52 2018 (r336676) @@ -64,7 +64,7 @@ __FBSDID("$FreeBSD$"); MALLOC_DEFINE(M_LLTABLE, "lltable", "link level address tables"); -static VNET_DEFINE(SLIST_HEAD(, lltable), lltables) = +VNET_DEFINE_STATIC(SLIST_HEAD(, lltable), lltables) = SLIST_HEAD_INITIALIZER(lltables); #define V_lltables VNET(lltables) Modified: head/sys/net/if_loop.c ============================================================================== --- head/sys/net/if_loop.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/net/if_loop.c Tue Jul 24 16:35:52 2018 (r336676) @@ -99,7 +99,7 @@ static void lo_clone_destroy(struct ifnet *); VNET_DEFINE(struct ifnet *, loif); /* Used externally */ #ifdef VIMAGE -static VNET_DEFINE(struct if_clone *, lo_cloner); +VNET_DEFINE_STATIC(struct if_clone *, lo_cloner); #define V_lo_cloner VNET(lo_cloner) #endif Modified: head/sys/net/if_me.c ============================================================================== --- head/sys/net/if_me.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/net/if_me.c Tue Jul 24 16:35:52 2018 (r336676) @@ -94,7 +94,7 @@ CK_LIST_HEAD(me_list, me_softc); #ifndef ME_HASH_SIZE #define ME_HASH_SIZE (1 << 4) #endif -static VNET_DEFINE(struct me_list *, me_hashtbl) = NULL; +VNET_DEFINE_STATIC(struct me_list *, me_hashtbl) = NULL; #define V_me_hashtbl VNET(me_hashtbl) #define ME_HASH(src, dst) (V_me_hashtbl[\ me_hashval((src), (dst)) & (ME_HASH_SIZE - 1)]) @@ -104,7 +104,7 @@ SX_SYSINIT(me_ioctl_sx, &me_ioctl_sx, "me_ioctl"); static int me_clone_create(struct if_clone *, int, caddr_t); static void me_clone_destroy(struct ifnet *); -static VNET_DEFINE(struct if_clone *, me_cloner); +VNET_DEFINE_STATIC(struct if_clone *, me_cloner); #define V_me_cloner VNET(me_cloner) static void me_qflush(struct ifnet *); @@ -124,7 +124,7 @@ static SYSCTL_NODE(_net_link, IFT_TUNNEL, me, CTLFLAG_ #define MAX_ME_NEST 1 #endif -static VNET_DEFINE(int, max_me_nesting) = MAX_ME_NEST; +VNET_DEFINE_STATIC(int, max_me_nesting) = MAX_ME_NEST; #define V_max_me_nesting VNET(max_me_nesting) SYSCTL_INT(_net_link_me, OID_AUTO, max_nesting, CTLFLAG_RW | CTLFLAG_VNET, &VNET_NAME(max_me_nesting), 0, "Max nested tunnels"); Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/net/if_vlan.c Tue Jul 24 16:35:52 2018 (r336676) @@ -335,7 +335,7 @@ static void vlan_lladdr_fn(void *arg, int pending); static struct if_clone *vlan_cloner; #ifdef VIMAGE -static VNET_DEFINE(struct if_clone *, vlan_cloner); +VNET_DEFINE_STATIC(struct if_clone *, vlan_cloner); #define V_vlan_cloner VNET(vlan_cloner) #endif Modified: head/sys/net/netisr.c ============================================================================== --- head/sys/net/netisr.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/net/netisr.c Tue Jul 24 16:35:52 2018 (r336676) @@ -225,7 +225,7 @@ static struct netisr_proto netisr_proto[NETISR_MAXPROT * mechanism to stop netisr processing for vnet teardown. * Apart from that we expect a VNET to always be enabled. */ -static VNET_DEFINE(u_int, netisr_enable[NETISR_MAXPROT]); +VNET_DEFINE_STATIC(u_int, netisr_enable[NETISR_MAXPROT]); #define V_netisr_enable VNET(netisr_enable) #endif Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/net/route.c Tue Jul 24 16:35:52 2018 (r336676) @@ -137,7 +137,7 @@ VNET_DEFINE(int, rttrash); /* routes not in table but */ #define RNTORT(p) ((struct rtentry *)(p)) -static VNET_DEFINE(uma_zone_t, rtzone); /* Routing table UMA zone. */ +VNET_DEFINE_STATIC(uma_zone_t, rtzone); /* Routing table UMA zone. */ #define V_rtzone VNET(rtzone) static int rtrequest1_fib_change(struct rib_head *, struct rt_addrinfo *, Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/net/rtsock.c Tue Jul 24 16:35:52 2018 (r336676) @@ -140,7 +140,7 @@ typedef struct { int ip6_count; /* attached w/ AF_INET6 */ int any_count; /* total attached */ } route_cb_t; -static VNET_DEFINE(route_cb_t, route_cb); +VNET_DEFINE_STATIC(route_cb_t, route_cb); #define V_route_cb VNET(route_cb) struct mtx rtsock_mtx; Modified: head/sys/net/vnet.c ============================================================================== --- head/sys/net/vnet.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/net/vnet.c Tue Jul 24 16:35:52 2018 (r336676) @@ -178,7 +178,7 @@ static MALLOC_DEFINE(M_VNET_DATA, "vnet_data", "VNET d * Space to store virtualized global variables from loadable kernel modules, * and the free list to manage it. */ -static VNET_DEFINE(char, modspace[VNET_MODMIN]); +VNET_DEFINE_STATIC(char, modspace[VNET_MODMIN]); /* * Global lists of subsystem constructor and destructors for vnets. They are Modified: head/sys/netgraph/ng_base.c ============================================================================== --- head/sys/netgraph/ng_base.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/netgraph/ng_base.c Tue Jul 24 16:35:52 2018 (r336676) @@ -179,12 +179,12 @@ static struct rwlock ng_typelist_lock; /* Hash related definitions. */ LIST_HEAD(nodehash, ng_node); -static VNET_DEFINE(struct nodehash *, ng_ID_hash); -static VNET_DEFINE(u_long, ng_ID_hmask); -static VNET_DEFINE(u_long, ng_nodes); -static VNET_DEFINE(struct nodehash *, ng_name_hash); -static VNET_DEFINE(u_long, ng_name_hmask); -static VNET_DEFINE(u_long, ng_named_nodes); +VNET_DEFINE_STATIC(struct nodehash *, ng_ID_hash); +VNET_DEFINE_STATIC(u_long, ng_ID_hmask); +VNET_DEFINE_STATIC(u_long, ng_nodes); +VNET_DEFINE_STATIC(struct nodehash *, ng_name_hash); +VNET_DEFINE_STATIC(u_long, ng_name_hmask); +VNET_DEFINE_STATIC(u_long, ng_named_nodes); #define V_ng_ID_hash VNET(ng_ID_hash) #define V_ng_ID_hmask VNET(ng_ID_hmask) #define V_ng_nodes VNET(ng_nodes) @@ -377,7 +377,7 @@ ng_alloc_node(void) #define TRAP_ERROR() #endif -static VNET_DEFINE(ng_ID_t, nextID) = 1; +VNET_DEFINE_STATIC(ng_ID_t, nextID) = 1; #define V_nextID VNET(nextID) #ifdef INVARIANTS Modified: head/sys/netgraph/ng_eiface.c ============================================================================== --- head/sys/netgraph/ng_eiface.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/netgraph/ng_eiface.c Tue Jul 24 16:35:52 2018 (r336676) @@ -122,7 +122,7 @@ static struct ng_type typestruct = { }; NETGRAPH_INIT(eiface, &typestruct); -static VNET_DEFINE(struct unrhdr *, ng_eiface_unit); +VNET_DEFINE_STATIC(struct unrhdr *, ng_eiface_unit); #define V_ng_eiface_unit VNET(ng_eiface_unit) /************************************************************************ Modified: head/sys/netgraph/ng_iface.c ============================================================================== --- head/sys/netgraph/ng_iface.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/netgraph/ng_iface.c Tue Jul 24 16:35:52 2018 (r336676) @@ -199,7 +199,7 @@ static struct ng_type typestruct = { }; NETGRAPH_INIT(iface, &typestruct); -static VNET_DEFINE(struct unrhdr *, ng_iface_unit); +VNET_DEFINE_STATIC(struct unrhdr *, ng_iface_unit); #define V_ng_iface_unit VNET(ng_iface_unit) /************************************************************************ Modified: head/sys/netinet/cc/cc_cdg.c ============================================================================== --- head/sys/netinet/cc/cc_cdg.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/netinet/cc/cc_cdg.c Tue Jul 24 16:35:52 2018 (r336676) @@ -205,13 +205,13 @@ static MALLOC_DEFINE(M_CDG, "cdg data", static int ertt_id; -static VNET_DEFINE(uint32_t, cdg_alpha_inc); -static VNET_DEFINE(uint32_t, cdg_beta_delay); -static VNET_DEFINE(uint32_t, cdg_beta_loss); -static VNET_DEFINE(uint32_t, cdg_smoothing_factor); -static VNET_DEFINE(uint32_t, cdg_exp_backoff_scale); -static VNET_DEFINE(uint32_t, cdg_consec_cong); -static VNET_DEFINE(uint32_t, cdg_hold_backoff); +VNET_DEFINE_STATIC(uint32_t, cdg_alpha_inc); +VNET_DEFINE_STATIC(uint32_t, cdg_beta_delay); +VNET_DEFINE_STATIC(uint32_t, cdg_beta_loss); +VNET_DEFINE_STATIC(uint32_t, cdg_smoothing_factor); +VNET_DEFINE_STATIC(uint32_t, cdg_exp_backoff_scale); +VNET_DEFINE_STATIC(uint32_t, cdg_consec_cong); +VNET_DEFINE_STATIC(uint32_t, cdg_hold_backoff); #define V_cdg_alpha_inc VNET(cdg_alpha_inc) #define V_cdg_beta_delay VNET(cdg_beta_delay) #define V_cdg_beta_loss VNET(cdg_beta_loss) Modified: head/sys/netinet/cc/cc_chd.c ============================================================================== --- head/sys/netinet/cc/cc_chd.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/netinet/cc/cc_chd.c Tue Jul 24 16:35:52 2018 (r336676) @@ -117,11 +117,11 @@ struct chd { static int ertt_id; -static VNET_DEFINE(uint32_t, chd_qmin) = 5; -static VNET_DEFINE(uint32_t, chd_pmax) = 50; -static VNET_DEFINE(uint32_t, chd_loss_fair) = 1; -static VNET_DEFINE(uint32_t, chd_use_max) = 1; -static VNET_DEFINE(uint32_t, chd_qthresh) = 20; +VNET_DEFINE_STATIC(uint32_t, chd_qmin) = 5; +VNET_DEFINE_STATIC(uint32_t, chd_pmax) = 50; +VNET_DEFINE_STATIC(uint32_t, chd_loss_fair) = 1; +VNET_DEFINE_STATIC(uint32_t, chd_use_max) = 1; +VNET_DEFINE_STATIC(uint32_t, chd_qthresh) = 20; #define V_chd_qthresh VNET(chd_qthresh) #define V_chd_qmin VNET(chd_qmin) #define V_chd_pmax VNET(chd_pmax) Modified: head/sys/netinet/cc/cc_dctcp.c ============================================================================== --- head/sys/netinet/cc/cc_dctcp.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/netinet/cc/cc_dctcp.c Tue Jul 24 16:35:52 2018 (r336676) @@ -59,11 +59,11 @@ __FBSDID("$FreeBSD$"); #define CAST_PTR_INT(X) (*((int*)(X))) #define MAX_ALPHA_VALUE 1024 -static VNET_DEFINE(uint32_t, dctcp_alpha) = 0; +VNET_DEFINE_STATIC(uint32_t, dctcp_alpha) = 0; #define V_dctcp_alpha VNET(dctcp_alpha) -static VNET_DEFINE(uint32_t, dctcp_shift_g) = 4; +VNET_DEFINE_STATIC(uint32_t, dctcp_shift_g) = 4; #define V_dctcp_shift_g VNET(dctcp_shift_g) -static VNET_DEFINE(uint32_t, dctcp_slowstart) = 0; +VNET_DEFINE_STATIC(uint32_t, dctcp_slowstart) = 0; #define V_dctcp_slowstart VNET(dctcp_slowstart) struct dctcp { Modified: head/sys/netinet/cc/cc_hd.c ============================================================================== --- head/sys/netinet/cc/cc_hd.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/netinet/cc/cc_hd.c Tue Jul 24 16:35:52 2018 (r336676) @@ -89,9 +89,9 @@ static int hd_mod_init(void); static int ertt_id; -static VNET_DEFINE(uint32_t, hd_qthresh) = 20; -static VNET_DEFINE(uint32_t, hd_qmin) = 5; -static VNET_DEFINE(uint32_t, hd_pmax) = 5; +VNET_DEFINE_STATIC(uint32_t, hd_qthresh) = 20; +VNET_DEFINE_STATIC(uint32_t, hd_qmin) = 5; +VNET_DEFINE_STATIC(uint32_t, hd_pmax) = 5; #define V_hd_qthresh VNET(hd_qthresh) #define V_hd_qmin VNET(hd_qmin) #define V_hd_pmax VNET(hd_pmax) Modified: head/sys/netinet/cc/cc_htcp.c ============================================================================== --- head/sys/netinet/cc/cc_htcp.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/netinet/cc/cc_htcp.c Tue Jul 24 16:35:52 2018 (r336676) @@ -170,8 +170,8 @@ static int htcp_rtt_ref; static int htcp_max_diff = INT_MAX / ((1 << HTCP_ALPHA_INC_SHIFT) * 10); /* Per-netstack vars. */ -static VNET_DEFINE(u_int, htcp_adaptive_backoff) = 0; -static VNET_DEFINE(u_int, htcp_rtt_scaling) = 0; +VNET_DEFINE_STATIC(u_int, htcp_adaptive_backoff) = 0; +VNET_DEFINE_STATIC(u_int, htcp_rtt_scaling) = 0; #define V_htcp_adaptive_backoff VNET(htcp_adaptive_backoff) #define V_htcp_rtt_scaling VNET(htcp_rtt_scaling) Modified: head/sys/netinet/cc/cc_newreno.c ============================================================================== --- head/sys/netinet/cc/cc_newreno.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/netinet/cc/cc_newreno.c Tue Jul 24 16:35:52 2018 (r336676) @@ -88,8 +88,8 @@ static void newreno_cong_signal(struct cc_var *ccv, ui static void newreno_post_recovery(struct cc_var *ccv); static int newreno_ctl_output(struct cc_var *ccv, struct sockopt *sopt, void *buf); -static VNET_DEFINE(uint32_t, newreno_beta) = 50; -static VNET_DEFINE(uint32_t, newreno_beta_ecn) = 80; +VNET_DEFINE_STATIC(uint32_t, newreno_beta) = 50; +VNET_DEFINE_STATIC(uint32_t, newreno_beta_ecn) = 80; #define V_newreno_beta VNET(newreno_beta) #define V_newreno_beta_ecn VNET(newreno_beta_ecn) Modified: head/sys/netinet/cc/cc_vegas.c ============================================================================== --- head/sys/netinet/cc/cc_vegas.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/netinet/cc/cc_vegas.c Tue Jul 24 16:35:52 2018 (r336676) @@ -100,8 +100,8 @@ struct vegas { static int32_t ertt_id; -static VNET_DEFINE(uint32_t, vegas_alpha) = 1; -static VNET_DEFINE(uint32_t, vegas_beta) = 3; +VNET_DEFINE_STATIC(uint32_t, vegas_alpha) = 1; +VNET_DEFINE_STATIC(uint32_t, vegas_beta) = 3; #define V_vegas_alpha VNET(vegas_alpha) #define V_vegas_beta VNET(vegas_beta) Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/netinet/if_ether.c Tue Jul 24 16:35:52 2018 (r336676) @@ -94,13 +94,13 @@ static SYSCTL_NODE(_net_link_ether, PF_INET, inet, CTL static SYSCTL_NODE(_net_link_ether, PF_ARP, arp, CTLFLAG_RW, 0, ""); /* timer values */ -static VNET_DEFINE(int, arpt_keep) = (20*60); /* once resolved, good for 20 +VNET_DEFINE_STATIC(int, arpt_keep) = (20*60); /* once resolved, good for 20 * minutes */ -static VNET_DEFINE(int, arp_maxtries) = 5; -static VNET_DEFINE(int, arp_proxyall) = 0; -static VNET_DEFINE(int, arpt_down) = 20; /* keep incomplete entries for +VNET_DEFINE_STATIC(int, arp_maxtries) = 5; +VNET_DEFINE_STATIC(int, arp_proxyall) = 0; +VNET_DEFINE_STATIC(int, arpt_down) = 20; /* keep incomplete entries for * 20 seconds */ -static VNET_DEFINE(int, arpt_rexmit) = 1; /* retransmit arp entries, sec*/ +VNET_DEFINE_STATIC(int, arpt_rexmit) = 1; /* retransmit arp entries, sec*/ VNET_PCPUSTAT_DEFINE(struct arpstat, arpstat); /* ARP statistics, see if_arp.h */ VNET_PCPUSTAT_SYSINIT(arpstat); @@ -108,7 +108,7 @@ VNET_PCPUSTAT_SYSINIT(arpstat); VNET_PCPUSTAT_SYSUNINIT(arpstat); #endif /* VIMAGE */ -static VNET_DEFINE(int, arp_maxhold) = 1; +VNET_DEFINE_STATIC(int, arp_maxhold) = 1; #define V_arpt_keep VNET(arpt_keep) #define V_arpt_down VNET(arpt_down) Modified: head/sys/netinet/igmp.c ============================================================================== --- head/sys/netinet/igmp.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/netinet/igmp.c Tue Jul 24 16:35:52 2018 (r336676) @@ -217,11 +217,11 @@ static MALLOC_DEFINE(M_IGMP, "igmp", "igmp state"); * FUTURE: Stop using IFP_TO_IA/INADDR_ANY, and use source address selection * policy to control the address used by IGMP on the link. */ -static VNET_DEFINE(int, interface_timers_running); /* IGMPv3 general +VNET_DEFINE_STATIC(int, interface_timers_running); /* IGMPv3 general * query response */ -static VNET_DEFINE(int, state_change_timers_running); /* IGMPv3 state-change +VNET_DEFINE_STATIC(int, state_change_timers_running); /* IGMPv3 state-change * retransmit */ -static VNET_DEFINE(int, current_state_timers_running); /* IGMPv1/v2 host +VNET_DEFINE_STATIC(int, current_state_timers_running); /* IGMPv1/v2 host * report; IGMPv3 g/sg * query response */ @@ -229,25 +229,25 @@ static VNET_DEFINE(int, current_state_timers_running); #define V_state_change_timers_running VNET(state_change_timers_running) #define V_current_state_timers_running VNET(current_state_timers_running) -static VNET_DEFINE(LIST_HEAD(, igmp_ifsoftc), igi_head) = +VNET_DEFINE_STATIC(LIST_HEAD(, igmp_ifsoftc), igi_head) = LIST_HEAD_INITIALIZER(igi_head); -static VNET_DEFINE(struct igmpstat, igmpstat) = { +VNET_DEFINE_STATIC(struct igmpstat, igmpstat) = { .igps_version = IGPS_VERSION_3, .igps_len = sizeof(struct igmpstat), }; -static VNET_DEFINE(struct timeval, igmp_gsrdelay) = {10, 0}; +VNET_DEFINE_STATIC(struct timeval, igmp_gsrdelay) = {10, 0}; #define V_igi_head VNET(igi_head) #define V_igmpstat VNET(igmpstat) #define V_igmp_gsrdelay VNET(igmp_gsrdelay) -static VNET_DEFINE(int, igmp_recvifkludge) = 1; -static VNET_DEFINE(int, igmp_sendra) = 1; -static VNET_DEFINE(int, igmp_sendlocal) = 1; -static VNET_DEFINE(int, igmp_v1enable) = 1; -static VNET_DEFINE(int, igmp_v2enable) = 1; -static VNET_DEFINE(int, igmp_legacysupp); -static VNET_DEFINE(int, igmp_default_version) = IGMP_VERSION_3; +VNET_DEFINE_STATIC(int, igmp_recvifkludge) = 1; +VNET_DEFINE_STATIC(int, igmp_sendra) = 1; +VNET_DEFINE_STATIC(int, igmp_sendlocal) = 1; +VNET_DEFINE_STATIC(int, igmp_v1enable) = 1; +VNET_DEFINE_STATIC(int, igmp_v2enable) = 1; +VNET_DEFINE_STATIC(int, igmp_legacysupp); +VNET_DEFINE_STATIC(int, igmp_default_version) = IGMP_VERSION_3; #define V_igmp_recvifkludge VNET(igmp_recvifkludge) #define V_igmp_sendra VNET(igmp_sendra) Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/netinet/in.c Tue Jul 24 16:35:52 2018 (r336676) @@ -78,7 +78,7 @@ static int in_difaddr_ioctl(u_long, caddr_t, struct if static void in_socktrim(struct sockaddr_in *); static void in_purgemaddrs(struct ifnet *); -static VNET_DEFINE(int, nosameprefix); +VNET_DEFINE_STATIC(int, nosameprefix); #define V_nosameprefix VNET(nosameprefix) SYSCTL_INT(_net_inet_ip, OID_AUTO, no_same_prefix, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(nosameprefix), 0, Modified: head/sys/netinet/in_gif.c ============================================================================== --- head/sys/netinet/in_gif.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/netinet/in_gif.c Tue Jul 24 16:35:52 2018 (r336676) @@ -72,7 +72,7 @@ __FBSDID("$FreeBSD$"); #include #define GIF_TTL 30 -static VNET_DEFINE(int, ip_gif_ttl) = GIF_TTL; +VNET_DEFINE_STATIC(int, ip_gif_ttl) = GIF_TTL; #define V_ip_gif_ttl VNET(ip_gif_ttl) SYSCTL_INT(_net_inet_ip, IPCTL_GIF_TTL, gifttl, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip_gif_ttl), 0, "Default TTL value for encapsulated packets"); @@ -81,8 +81,8 @@ SYSCTL_INT(_net_inet_ip, IPCTL_GIF_TTL, gifttl, CTLFLA * We keep interfaces in a hash table using src+dst as key. * Interfaces with GIF_IGNORE_SOURCE flag are linked into plain list. */ -static VNET_DEFINE(struct gif_list *, ipv4_hashtbl) = NULL; -static VNET_DEFINE(struct gif_list, ipv4_list) = CK_LIST_HEAD_INITIALIZER(); +VNET_DEFINE_STATIC(struct gif_list *, ipv4_hashtbl) = NULL; +VNET_DEFINE_STATIC(struct gif_list, ipv4_list) = CK_LIST_HEAD_INITIALIZER(); #define V_ipv4_hashtbl VNET(ipv4_hashtbl) #define V_ipv4_list VNET(ipv4_list) Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/netinet/in_pcb.c Tue Jul 24 16:35:52 2018 (r336676) @@ -138,7 +138,7 @@ VNET_DEFINE(int, ipport_randomcps) = 10; /* user contr VNET_DEFINE(int, ipport_randomtime) = 45; /* user controlled via sysctl */ VNET_DEFINE(int, ipport_stoprandom); /* toggled by ipport_tick */ VNET_DEFINE(int, ipport_tcpallocs); -static VNET_DEFINE(int, ipport_tcplastcount); +VNET_DEFINE_STATIC(int, ipport_tcplastcount); #define V_ipport_tcplastcount VNET(ipport_tcplastcount) Modified: head/sys/netinet/ip_carp.c ============================================================================== --- head/sys/netinet/ip_carp.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/netinet/ip_carp.c Tue Jul 24 16:35:52 2018 (r336676) @@ -187,31 +187,31 @@ static int proto_reg[] = {-1, -1}; */ /* Accept incoming CARP packets. */ -static VNET_DEFINE(int, carp_allow) = 1; +VNET_DEFINE_STATIC(int, carp_allow) = 1; #define V_carp_allow VNET(carp_allow) /* Set DSCP in outgoing CARP packets. */ -static VNET_DEFINE(int, carp_dscp) = 56; +VNET_DEFINE_STATIC(int, carp_dscp) = 56; #define V_carp_dscp VNET(carp_dscp) /* Preempt slower nodes. */ -static VNET_DEFINE(int, carp_preempt) = 0; +VNET_DEFINE_STATIC(int, carp_preempt) = 0; #define V_carp_preempt VNET(carp_preempt) /* Log level. */ -static VNET_DEFINE(int, carp_log) = 1; +VNET_DEFINE_STATIC(int, carp_log) = 1; #define V_carp_log VNET(carp_log) /* Global advskew demotion. */ -static VNET_DEFINE(int, carp_demotion) = 0; +VNET_DEFINE_STATIC(int, carp_demotion) = 0; #define V_carp_demotion VNET(carp_demotion) /* Send error demotion factor. */ -static VNET_DEFINE(int, carp_senderr_adj) = CARP_MAXSKEW; +VNET_DEFINE_STATIC(int, carp_senderr_adj) = CARP_MAXSKEW; #define V_carp_senderr_adj VNET(carp_senderr_adj) /* Iface down demotion factor. */ -static VNET_DEFINE(int, carp_ifdown_adj) = CARP_MAXSKEW; +VNET_DEFINE_STATIC(int, carp_ifdown_adj) = CARP_MAXSKEW; #define V_carp_ifdown_adj VNET(carp_ifdown_adj) static int carp_allow_sysctl(SYSCTL_HANDLER_ARGS); Modified: head/sys/netinet/ip_divert.c ============================================================================== --- head/sys/netinet/ip_divert.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/netinet/ip_divert.c Tue Jul 24 16:35:52 2018 (r336676) @@ -111,8 +111,8 @@ __FBSDID("$FreeBSD$"); */ /* Internal variables. */ -static VNET_DEFINE(struct inpcbhead, divcb); -static VNET_DEFINE(struct inpcbinfo, divcbinfo); +VNET_DEFINE_STATIC(struct inpcbhead, divcb); +VNET_DEFINE_STATIC(struct inpcbinfo, divcbinfo); #define V_divcb VNET(divcb) #define V_divcbinfo VNET(divcbinfo) Modified: head/sys/netinet/ip_gre.c ============================================================================== --- head/sys/netinet/ip_gre.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/netinet/ip_gre.c Tue Jul 24 16:35:52 2018 (r336676) @@ -74,7 +74,7 @@ VNET_DEFINE(int, ip_gre_ttl) = GRE_TTL; SYSCTL_INT(_net_inet_ip, OID_AUTO, grettl, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip_gre_ttl), 0, "Default TTL value for encapsulated packets"); -static VNET_DEFINE(struct gre_list *, ipv4_hashtbl) = NULL; +VNET_DEFINE_STATIC(struct gre_list *, ipv4_hashtbl) = NULL; #define V_ipv4_hashtbl VNET(ipv4_hashtbl) #define GRE_HASH(src, dst) (V_ipv4_hashtbl[\ in_gre_hashval((src), (dst)) & (GRE_HASH_SIZE - 1)]) Modified: head/sys/netinet/ip_icmp.c ============================================================================== --- head/sys/netinet/ip_icmp.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/netinet/ip_icmp.c Tue Jul 24 16:35:52 2018 (r336676) @@ -82,13 +82,13 @@ __FBSDID("$FreeBSD$"); * routines to turnaround packets back to the originator, and * host table maintenance routines. */ -static VNET_DEFINE(int, icmplim) = 200; +VNET_DEFINE_STATIC(int, icmplim) = 200; #define V_icmplim VNET(icmplim) SYSCTL_INT(_net_inet_icmp, ICMPCTL_ICMPLIM, icmplim, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(icmplim), 0, "Maximum number of ICMP responses per second"); -static VNET_DEFINE(int, icmplim_output) = 1; +VNET_DEFINE_STATIC(int, icmplim_output) = 1; #define V_icmplim_output VNET(icmplim_output) SYSCTL_INT(_net_inet_icmp, OID_AUTO, icmplim_output, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(icmplim_output), 0, @@ -104,13 +104,13 @@ SYSCTL_VNET_PCPUSTAT(_net_inet_icmp, ICMPCTL_STATS, st VNET_PCPUSTAT_SYSUNINIT(icmpstat); #endif /* VIMAGE */ -static VNET_DEFINE(int, icmpmaskrepl) = 0; +VNET_DEFINE_STATIC(int, icmpmaskrepl) = 0; #define V_icmpmaskrepl VNET(icmpmaskrepl) SYSCTL_INT(_net_inet_icmp, ICMPCTL_MASKREPL, maskrepl, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(icmpmaskrepl), 0, "Reply to ICMP Address Mask Request packets"); -static VNET_DEFINE(u_int, icmpmaskfake) = 0; +VNET_DEFINE_STATIC(u_int, icmpmaskfake) = 0; #define V_icmpmaskfake VNET(icmpmaskfake) SYSCTL_UINT(_net_inet_icmp, OID_AUTO, maskfake, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(icmpmaskfake), 0, @@ -122,37 +122,37 @@ SYSCTL_INT(_net_inet_icmp, OID_AUTO, drop_redirect, CT &VNET_NAME(drop_redirect), 0, "Ignore ICMP redirects"); -static VNET_DEFINE(int, log_redirect) = 0; +VNET_DEFINE_STATIC(int, log_redirect) = 0; #define V_log_redirect VNET(log_redirect) SYSCTL_INT(_net_inet_icmp, OID_AUTO, log_redirect, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(log_redirect), 0, "Log ICMP redirects to the console"); -static VNET_DEFINE(char, reply_src[IFNAMSIZ]); +VNET_DEFINE_STATIC(char, reply_src[IFNAMSIZ]); #define V_reply_src VNET(reply_src) SYSCTL_STRING(_net_inet_icmp, OID_AUTO, reply_src, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(reply_src), IFNAMSIZ, "ICMP reply source for non-local packets"); -static VNET_DEFINE(int, icmp_rfi) = 0; +VNET_DEFINE_STATIC(int, icmp_rfi) = 0; #define V_icmp_rfi VNET(icmp_rfi) SYSCTL_INT(_net_inet_icmp, OID_AUTO, reply_from_interface, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(icmp_rfi), 0, "ICMP reply from incoming interface for non-local packets"); /* Router requirements RFC 1812 section 4.3.2.3 requires 576 - 28. */ -static VNET_DEFINE(int, icmp_quotelen) = 548; +VNET_DEFINE_STATIC(int, icmp_quotelen) = 8; #define V_icmp_quotelen VNET(icmp_quotelen) SYSCTL_INT(_net_inet_icmp, OID_AUTO, quotelen, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(icmp_quotelen), 0, "Number of bytes from original packet to quote in ICMP reply"); -static VNET_DEFINE(int, icmpbmcastecho) = 0; +VNET_DEFINE_STATIC(int, icmpbmcastecho) = 0; #define V_icmpbmcastecho VNET(icmpbmcastecho) SYSCTL_INT(_net_inet_icmp, OID_AUTO, bmcastecho, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(icmpbmcastecho), 0, "Reply to multicast ICMP Echo Request and Timestamp packets"); -static VNET_DEFINE(int, icmptstamprepl) = 1; +VNET_DEFINE_STATIC(int, icmptstamprepl) = 1; #define V_icmptstamprepl VNET(icmptstamprepl) SYSCTL_INT(_net_inet_icmp, OID_AUTO, tstamprepl, CTLFLAG_RW, &VNET_NAME(icmptstamprepl), 0, @@ -1001,7 +1001,7 @@ struct icmp_rate { const char *descr; struct counter_rate cr; }; -static VNET_DEFINE(struct icmp_rate, icmp_rates[BANDLIM_MAX]) = { +VNET_DEFINE_STATIC(struct icmp_rate, icmp_rates[BANDLIM_MAX]) = { { "icmp unreach response" }, { "icmp ping response" }, { "icmp tstamp response" }, Modified: head/sys/netinet/ip_id.c ============================================================================== --- head/sys/netinet/ip_id.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/netinet/ip_id.c Tue Jul 24 16:35:52 2018 (r336676) @@ -98,8 +98,8 @@ __FBSDID("$FreeBSD$"); * suggested by RFC6864. We use per-CPU counter for that, or if * user wants to, we can turn on random ID generation. */ -static VNET_DEFINE(int, ip_rfc6864) = 1; -static VNET_DEFINE(int, ip_do_randomid) = 0; +VNET_DEFINE_STATIC(int, ip_rfc6864) = 1; +VNET_DEFINE_STATIC(int, ip_do_randomid) = 0; #define V_ip_rfc6864 VNET(ip_rfc6864) #define V_ip_do_randomid VNET(ip_do_randomid) @@ -107,13 +107,13 @@ static VNET_DEFINE(int, ip_do_randomid) = 0; * Random ID state engine. */ static MALLOC_DEFINE(M_IPID, "ipid", "randomized ip id state"); -static VNET_DEFINE(uint16_t *, id_array); -static VNET_DEFINE(bitstr_t *, id_bits); -static VNET_DEFINE(int, array_ptr); -static VNET_DEFINE(int, array_size); -static VNET_DEFINE(int, random_id_collisions); -static VNET_DEFINE(int, random_id_total); -static VNET_DEFINE(struct mtx, ip_id_mtx); +VNET_DEFINE_STATIC(uint16_t *, id_array); +VNET_DEFINE_STATIC(bitstr_t *, id_bits); +VNET_DEFINE_STATIC(int, array_ptr); +VNET_DEFINE_STATIC(int, array_size); +VNET_DEFINE_STATIC(int, random_id_collisions); +VNET_DEFINE_STATIC(int, random_id_total); +VNET_DEFINE_STATIC(struct mtx, ip_id_mtx); #define V_id_array VNET(id_array) #define V_id_bits VNET(id_bits) #define V_array_ptr VNET(array_ptr) @@ -125,7 +125,7 @@ static VNET_DEFINE(struct mtx, ip_id_mtx); /* * Non-random ID state engine is simply a per-cpu counter. */ -static VNET_DEFINE(counter_u64_t, ip_id); +VNET_DEFINE_STATIC(counter_u64_t, ip_id); #define V_ip_id VNET(ip_id) static int sysctl_ip_randomid(SYSCTL_HANDLER_ARGS); Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/netinet/ip_input.c Tue Jul 24 16:35:52 2018 (r336676) @@ -109,7 +109,7 @@ SYSCTL_INT(_net_inet_ip, IPCTL_FORWARDING, forwarding, &VNET_NAME(ipforwarding), 0, "Enable IP forwarding between interfaces"); -static VNET_DEFINE(int, ipsendredirects) = 1; /* XXX */ +VNET_DEFINE_STATIC(int, ipsendredirects) = 1; /* XXX */ #define V_ipsendredirects VNET(ipsendredirects) SYSCTL_INT(_net_inet_ip, IPCTL_SENDREDIRECTS, redirect, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ipsendredirects), 0, @@ -128,7 +128,7 @@ SYSCTL_INT(_net_inet_ip, IPCTL_SENDREDIRECTS, redirect * to the loopback interface instead of the interface where the * packets for those addresses are received. */ -static VNET_DEFINE(int, ip_checkinterface); +VNET_DEFINE_STATIC(int, ip_checkinterface); #define V_ip_checkinterface VNET(ip_checkinterface) SYSCTL_INT(_net_inet_ip, OID_AUTO, check_interface, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(ip_checkinterface), 0, @@ -1347,7 +1347,7 @@ makedummy: * locking. This code remains in ip_input.c as ip_mroute.c is optionally * compiled. */ -static VNET_DEFINE(int, ip_rsvp_on); +VNET_DEFINE_STATIC(int, ip_rsvp_on); VNET_DEFINE(struct socket *, ip_rsvpd); #define V_ip_rsvp_on VNET(ip_rsvp_on) Modified: head/sys/netinet/ip_mroute.c ============================================================================== --- head/sys/netinet/ip_mroute.c Tue Jul 24 16:34:58 2018 (r336675) +++ head/sys/netinet/ip_mroute.c Tue Jul 24 16:35:52 2018 (r336676) @@ -125,7 +125,7 @@ __FBSDID("$FreeBSD$"); #define VIFI_INVALID ((vifi_t) -1) -static VNET_DEFINE(uint32_t, last_tv_sec); /* last time we processed this */ +VNET_DEFINE_STATIC(uint32_t, last_tv_sec); /* last time we processed this */ #define V_last_tv_sec VNET(last_tv_sec) static MALLOC_DEFINE(M_MRTABLE, "mroutetbl", "multicast forwarding cache"); @@ -149,14 +149,14 @@ static struct mtx mrouter_mtx; static int ip_mrouter_cnt; /* # of vnets with active mrouters */ static int ip_mrouter_unloading; /* Allow no more V_ip_mrouter sockets */ -static VNET_PCPUSTAT_DEFINE(struct mrtstat, mrtstat); +VNET_PCPUSTAT_DEFINE_STATIC(struct mrtstat, mrtstat); VNET_PCPUSTAT_SYSINIT(mrtstat); VNET_PCPUSTAT_SYSUNINIT(mrtstat); SYSCTL_VNET_PCPUSTAT(_net_inet_ip, OID_AUTO, mrtstat, struct mrtstat, mrtstat, "IPv4 Multicast Forwarding Statistics (struct mrtstat, " "netinet/ip_mroute.h)"); -static VNET_DEFINE(u_long, mfchash); +VNET_DEFINE_STATIC(u_long, mfchash); #define V_mfchash VNET(mfchash) #define MFCHASH(a, g) \ ((((a).s_addr >> 20) ^ ((a).s_addr >> 10) ^ (a).s_addr ^ \ @@ -164,9 +164,9 @@ static VNET_DEFINE(u_long, mfchash); #define MFCHASHSIZE 256 static u_long mfchashsize; /* Hash size */ -static VNET_DEFINE(u_char *, nexpire); /* 0..mfchashsize-1 */ +VNET_DEFINE_STATIC(u_char *, nexpire); /* 0..mfchashsize-1 */ #define V_nexpire VNET(nexpire) -static VNET_DEFINE(LIST_HEAD(mfchashhdr, mfc)*, mfchashtbl); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Tue Jul 24 16:45: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 4A6C61050654; Tue, 24 Jul 2018 16:45:02 +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 F0D137688B; Tue, 24 Jul 2018 16:45:01 +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 D1F3563B4; Tue, 24 Jul 2018 16:45:01 +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 w6OGj1P8039487; Tue, 24 Jul 2018 16:45:01 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6OGj1UK039486; Tue, 24 Jul 2018 16:45:01 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201807241645.w6OGj1UK039486@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 24 Jul 2018 16:45:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336677 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 336677 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: Tue, 24 Jul 2018 16:45:02 -0000 Author: andrew Date: Tue Jul 24 16:45:01 2018 New Revision: 336677 URL: https://svnweb.freebsd.org/changeset/base/336677 Log: icmp_quotelen was accidentially changes in r336676, undo this. Sponsored by: DARPA, AFRL Modified: head/sys/netinet/ip_icmp.c Modified: head/sys/netinet/ip_icmp.c ============================================================================== --- head/sys/netinet/ip_icmp.c Tue Jul 24 16:35:52 2018 (r336676) +++ head/sys/netinet/ip_icmp.c Tue Jul 24 16:45:01 2018 (r336677) @@ -140,7 +140,7 @@ SYSCTL_INT(_net_inet_icmp, OID_AUTO, reply_from_interf &VNET_NAME(icmp_rfi), 0, "ICMP reply from incoming interface for non-local packets"); /* Router requirements RFC 1812 section 4.3.2.3 requires 576 - 28. */ -VNET_DEFINE_STATIC(int, icmp_quotelen) = 8; +VNET_DEFINE_STATIC(int, icmp_quotelen) = 548; #define V_icmp_quotelen VNET(icmp_quotelen) SYSCTL_INT(_net_inet_icmp, OID_AUTO, quotelen, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(icmp_quotelen), 0, From owner-svn-src-head@freebsd.org Tue Jul 24 16:52: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 7EF7E1050A4E; Tue, 24 Jul 2018 16:52:53 +0000 (UTC) (envelope-from leitao@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2EF4776FF1; Tue, 24 Jul 2018 16:52:53 +0000 (UTC) (envelope-from leitao@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EA13D6551; Tue, 24 Jul 2018 16:52:52 +0000 (UTC) (envelope-from leitao@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6OGqq6d044519; Tue, 24 Jul 2018 16:52:52 GMT (envelope-from leitao@FreeBSD.org) Received: (from leitao@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6OGqqxo044518; Tue, 24 Jul 2018 16:52:52 GMT (envelope-from leitao@FreeBSD.org) Message-Id: <201807241652.w6OGqqxo044518@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: leitao set sender to leitao@FreeBSD.org using -f From: Breno Leitao Date: Tue, 24 Jul 2018 16:52:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336678 - in head/sys: conf powerpc/ofw X-SVN-Group: head X-SVN-Commit-Author: leitao X-SVN-Commit-Paths: in head/sys: conf powerpc/ofw X-SVN-Commit-Revision: 336678 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: Tue, 24 Jul 2018 16:52:53 -0000 Author: leitao Date: Tue Jul 24 16:52:52 2018 New Revision: 336678 URL: https://svnweb.freebsd.org/changeset/base/336678 Log: ofw: Load initrd file This is an OFW initrd module that would load the initrd from device tree parameters and give the to the md driver. With this patch, it is possible to pass a rootfs image through kexec in PowerNV mode (powerpc64). In order to user it, you should set the MD_ROOT_MEM option in your kernel configuration. Reviewed by: jhibbits Approved by: jhibbits (mentor) Differential Revision: https://reviews.freebsd.org/D15705 Added: head/sys/powerpc/ofw/ofw_initrd.c (contents, props changed) Modified: head/sys/conf/files.powerpc Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Tue Jul 24 16:45:01 2018 (r336677) +++ head/sys/conf/files.powerpc Tue Jul 24 16:52:52 2018 (r336678) @@ -163,6 +163,7 @@ powerpc/ofw/ofwcall32.S optional aim powerpc powerpc/ofw/ofwcall64.S optional aim powerpc64 powerpc/ofw/openpic_ofw.c standard powerpc/ofw/rtas.c optional aim +powerpc/ofw/ofw_initrd.c optional md_root_mem powerpc64 powerpc/powermac/ata_kauai.c optional powermac ata | powermac atamacio powerpc/powermac/ata_macio.c optional powermac ata | powermac atamacio powerpc/powermac/ata_dbdma.c optional powermac ata | powermac atamacio Added: head/sys/powerpc/ofw/ofw_initrd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/ofw/ofw_initrd.c Tue Jul 24 16:52:52 2018 (r336678) @@ -0,0 +1,159 @@ +/*- + * Copyright (C) 2018 Breno Leitao + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL TOOLS GMBH 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 "opt_md.h" + +#ifdef MD_ROOT_MEM +extern u_char *mfs_root; +extern uint32_t mfs_root_size; +#else +#warning "MD_ROOT_MEM should be set to use ofw initrd as a md device" +#endif + +/* bus entry points */ +static int ofw_initrd_probe(device_t dev); +static int ofw_initrd_attach(device_t dev); +static void ofw_initrd_identify(driver_t *driver, device_t parent); + +struct ofw_initrd_softc { + device_t sc_dev; + vm_paddr_t start; + vm_paddr_t end; +}; + +static int +ofw_initrd_probe(device_t dev) +{ + phandle_t chosen; + + /* limit this device to one unit */ + if (device_get_unit(dev) != 0) + return (ENXIO); + + chosen = OF_finddevice("/chosen"); + if (chosen <= 0) { + return (ENXIO); + } + + if (!OF_hasprop(chosen, "linux,initrd-start") || + !OF_hasprop(chosen, "linux,initrd-end")) + return (ENXIO); + + device_set_desc(dev, "OFW initrd memregion loader"); + return (BUS_PROBE_DEFAULT); +} + +static int +ofw_initrd_attach(device_t dev) +{ + struct ofw_initrd_softc *sc; + vm_paddr_t start, end; + phandle_t chosen; + pcell_t cell[2]; + ssize_t size; + + sc = device_get_softc(dev); + + chosen = OF_finddevice("/chosen"); + if (chosen <= 0) { + device_printf(dev, "/chosen not found\n"); + return (ENXIO); + } + + size = OF_getencprop(chosen, "linux,initrd-start", cell, sizeof(cell)); + if (size == 4) + start = cell[0]; + else if (size == 8) + start = (uint64_t)cell[0] << 32 | cell[1]; + else { + device_printf(dev, "Wrong linux,initrd-start size\n"); + return (ENXIO); + } + + size = OF_getencprop(chosen, "linux,initrd-end", cell, sizeof(cell)); + if (size == 4) + end = cell[0]; + else if (size == 8) + end = (uint64_t)cell[0] << 32 | cell[1]; + else{ + device_printf(dev, "Wrong linux,initrd-end size\n"); + return (ENXIO); + } + + if (end - start > 0) { + mfs_root = (u_char *) PHYS_TO_DMAP(start); + mfs_root_size = end - start; + + return (0); + } + + return (ENXIO); +} + +static void +ofw_initrd_identify(driver_t *driver, device_t parent) +{ + if (device_find_child(parent, "initrd", -1) != NULL) + return; + + if (BUS_ADD_CHILD(parent, 10, "initrd", -1) == NULL) + device_printf(parent, "add ofw_initrd child failed\n"); +} + +static device_method_t ofw_initrd_methods[] = { + DEVMETHOD(device_identify, ofw_initrd_identify), + DEVMETHOD(device_probe, ofw_initrd_probe), + DEVMETHOD(device_attach, ofw_initrd_attach), + DEVMETHOD_END +}; + +static driver_t ofw_initrd_driver = { + "ofw_initrd", + ofw_initrd_methods, + sizeof(struct ofw_initrd_softc) +}; + +static devclass_t ofw_initrd_devclass; + +DRIVER_MODULE(ofw_initrd, ofwbus, ofw_initrd_driver, ofw_initrd_devclass, + NULL, NULL); From owner-svn-src-head@freebsd.org Tue Jul 24 18:33: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 238711053024; Tue, 24 Jul 2018 18:33:27 +0000 (UTC) (envelope-from jhixson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CCD457AD7C; Tue, 24 Jul 2018 18:33:26 +0000 (UTC) (envelope-from jhixson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ADFC075F7; Tue, 24 Jul 2018 18:33:26 +0000 (UTC) (envelope-from jhixson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6OIXQon096368; Tue, 24 Jul 2018 18:33:26 GMT (envelope-from jhixson@FreeBSD.org) Received: (from jhixson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6OIXQ6m096366; Tue, 24 Jul 2018 18:33:26 GMT (envelope-from jhixson@FreeBSD.org) Message-Id: <201807241833.w6OIXQ6m096366@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhixson set sender to jhixson@FreeBSD.org using -f From: John Hixson Date: Tue, 24 Jul 2018 18:33:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336679 - in head: share/misc usr.bin/calendar/calendars X-SVN-Group: head X-SVN-Commit-Author: jhixson X-SVN-Commit-Paths: in head: share/misc usr.bin/calendar/calendars X-SVN-Commit-Revision: 336679 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: Tue, 24 Jul 2018 18:33:27 -0000 Author: jhixson (ports committer) Date: Tue Jul 24 18:33:26 2018 New Revision: 336679 URL: https://svnweb.freebsd.org/changeset/base/336679 Log: Add jhixson to committers-ports.dot and calendar.freebsd Approved by: miwi (mentor), kmoore (mentor), araujo (mentor) Differential Revision: https://reviews.freebsd.org/D16424 Modified: head/share/misc/committers-ports.dot head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Tue Jul 24 16:52:52 2018 (r336678) +++ head/share/misc/committers-ports.dot Tue Jul 24 18:33:26 2018 (r336679) @@ -133,6 +133,7 @@ jase [label="Jase Thew\njase@FreeBSD.org\n2012/05/30"] jbeich [label="Jan Beich\njbeich@FreeBSD.org\n2015/01/19"] jgh [label="Jason Helfman\njgh@FreeBSD.org\n2011/12/16"] jhale [label="Jason E. Hale\njhale@FreeBSD.org\n2012/09/10"] +jhixson [label="John Hixson\njhixson@FreeBSD.org\n2018/07/16"] jkim [label="Jung-uk Kim\njkim@FreeBSD.org\n2007/09/12"] jlaffaye [label="Julien Laffaye\njlaffaye@FreeBSD.org\n2011/06/06"] jmd [label="Johannes M. Dieterich\njmd@FreeBSD.org\n2017/01/09"] @@ -294,6 +295,7 @@ amdmi3 -> arrowd antoine -> dumbbell +araujo -> jhixson araujo -> lippe araujo -> pclin araujo -> pgollucci @@ -471,6 +473,8 @@ jrm -> jwb junovitch -> tz +kmoore -> jhixson + knu -> daichi knu -> maho knu -> nobutaka @@ -556,6 +560,7 @@ miwi -> dhn miwi -> farrokhi miwi -> fluffy miwi -> gahr +miwi -> jhixson miwi -> joneum miwi -> jsm miwi -> kmoore Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Tue Jul 24 16:52:52 2018 (r336678) +++ head/usr.bin/calendar/calendars/calendar.freebsd Tue Jul 24 18:33:26 2018 (r336679) @@ -402,6 +402,7 @@ 10/30 Olli Hauer born in Sindelfingen, Germany, 1968 10/31 Taras Korenko born in Cherkasy region, Ukraine, 1980 11/03 Ryan Stone born in Ottawa, Ontario, Canada, 1985 +11/04 John Hixson born in Burlingame, California, United States, 1974 11/05 M. Warner Losh born in Kansas City, Kansas, United States, 1966 11/06 Michael Zhilin born in Stary Oskol, USSR, 1985 11/08 Joseph R. Mingrone born in Charlottetown, Prince Edward Island, Canada, 1976 From owner-svn-src-head@freebsd.org Tue Jul 24 18:39: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 C2B171053185; Tue, 24 Jul 2018 18:39:47 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 76D197AFE0; Tue, 24 Jul 2018 18:39:47 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 57FE8763A; Tue, 24 Jul 2018 18:39:47 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6OIdlxi096726; Tue, 24 Jul 2018 18:39:47 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6OIdlAA096725; Tue, 24 Jul 2018 18:39:47 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201807241839.w6OIdlAA096725@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Tue, 24 Jul 2018 18:39:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336680 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: davidcs X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 336680 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: Tue, 24 Jul 2018 18:39:47 -0000 Author: davidcs Date: Tue Jul 24 18:39:46 2018 New Revision: 336680 URL: https://svnweb.freebsd.org/changeset/base/336680 Log: Update man page with support for 41000 Series adapters MFC after:5 days Modified: head/share/man/man4/qlnxe.4 Modified: head/share/man/man4/qlnxe.4 ============================================================================== --- head/share/man/man4/qlnxe.4 Tue Jul 24 18:33:26 2018 (r336679) +++ head/share/man/man4/qlnxe.4 Tue Jul 24 18:39:46 2018 (r336680) @@ -63,6 +63,8 @@ chipsets: .Bl -bullet -compact .It QLogic 45000 series +.It +QLogic 41000 series .El .Sh SUPPORT For support questions please contact your Cavium approved reseller or From owner-svn-src-head@freebsd.org Tue Jul 24 18:51: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 53CA61053485; Tue, 24 Jul 2018 18:51:39 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 09B337B6B2; Tue, 24 Jul 2018 18:51:39 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DF12D781D; Tue, 24 Jul 2018 18:51:38 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6OIpcaB005598; Tue, 24 Jul 2018 18:51:38 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6OIpcSJ005597; Tue, 24 Jul 2018 18:51:38 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201807241851.w6OIpcSJ005597@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 24 Jul 2018 18:51:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336681 - head/share/man/man9 X-SVN-Group: head X-SVN-Commit-Author: bz X-SVN-Commit-Paths: head/share/man/man9 X-SVN-Commit-Revision: 336681 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: Tue, 24 Jul 2018 18:51:39 -0000 Author: bz Date: Tue Jul 24 18:51:38 2018 New Revision: 336681 URL: https://svnweb.freebsd.org/changeset/base/336681 Log: Updated .Dd missed in r336674. Modified: head/share/man/man9/vnet.9 Modified: head/share/man/man9/vnet.9 ============================================================================== --- head/share/man/man9/vnet.9 Tue Jul 24 18:39:46 2018 (r336680) +++ head/share/man/man9/vnet.9 Tue Jul 24 18:51:38 2018 (r336681) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 16, 2018 +.Dd July 24, 2018 .Dt VNET 9 .Os .Sh NAME From owner-svn-src-head@freebsd.org Tue Jul 24 19:21: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 8BF391053DC3; Tue, 24 Jul 2018 19:21:12 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 410EE7C2E7; Tue, 24 Jul 2018 19:21:12 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 23BC37CCE; Tue, 24 Jul 2018 19:21:12 +0000 (UTC) (envelope-from rpokala@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6OJLCcL017383; Tue, 24 Jul 2018 19:21:12 GMT (envelope-from rpokala@FreeBSD.org) Received: (from rpokala@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6OJLBqE017382; Tue, 24 Jul 2018 19:21:11 GMT (envelope-from rpokala@FreeBSD.org) Message-Id: <201807241921.w6OJLBqE017382@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rpokala set sender to rpokala@FreeBSD.org using -f From: Ravi Pokala Date: Tue, 24 Jul 2018 19:21:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336682 - head/share/man/man4 X-SVN-Group: head X-SVN-Commit-Author: rpokala X-SVN-Commit-Paths: head/share/man/man4 X-SVN-Commit-Revision: 336682 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: Tue, 24 Jul 2018 19:21:12 -0000 Author: rpokala Date: Tue Jul 24 19:21:11 2018 New Revision: 336682 URL: https://svnweb.freebsd.org/changeset/base/336682 Log: Update .Dd in light of r336662. MFC after: 1 week X-MFC-With: r336662 Pointy-hat to: rpokala Modified: head/share/man/man4/jedec_dimm.4 head/share/man/man4/jedec_ts.4 Modified: head/share/man/man4/jedec_dimm.4 ============================================================================== --- head/share/man/man4/jedec_dimm.4 Tue Jul 24 18:51:38 2018 (r336681) +++ head/share/man/man4/jedec_dimm.4 Tue Jul 24 19:21:11 2018 (r336682) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 22, 2018 +.Dd July 24, 2018 .Dt JEDEC_DIMM 4 .Os .Sh NAME Modified: head/share/man/man4/jedec_ts.4 ============================================================================== --- head/share/man/man4/jedec_ts.4 Tue Jul 24 18:51:38 2018 (r336681) +++ head/share/man/man4/jedec_ts.4 Tue Jul 24 19:21:11 2018 (r336682) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 9, 2017 +.Dd July 24, 2018 .Dt JEDEC_TS 4 .Os .Sh NAME From owner-svn-src-head@freebsd.org Tue Jul 24 19:22: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 1DD3E1053EA0; Tue, 24 Jul 2018 19:22:54 +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 C7E077C55F; Tue, 24 Jul 2018 19:22:53 +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 A90EC7E2F; Tue, 24 Jul 2018 19:22:53 +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 w6OJMrO8021915; Tue, 24 Jul 2018 19:22:53 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6OJMqoH021911; Tue, 24 Jul 2018 19:22:52 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201807241922.w6OJMqoH021911@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 24 Jul 2018 19:22:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336683 - in head/sys: amd64/amd64 i386/i386 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: amd64/amd64 i386/i386 X-SVN-Commit-Revision: 336683 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: Tue, 24 Jul 2018 19:22:54 -0000 Author: kib Date: Tue Jul 24 19:22:52 2018 New Revision: 336683 URL: https://svnweb.freebsd.org/changeset/base/336683 Log: Extend ranges of the critical sections to ensure that context switch code never sees FPU pcb flags not consistent with the hardware state. This is uncovered by the eager FPU switch mode. Analyzed, reviewed and tested by: gleb Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/amd64/fpu.c head/sys/amd64/amd64/machdep.c head/sys/i386/i386/machdep.c head/sys/i386/i386/npx.c Modified: head/sys/amd64/amd64/fpu.c ============================================================================== --- head/sys/amd64/amd64/fpu.c Tue Jul 24 19:21:11 2018 (r336682) +++ head/sys/amd64/amd64/fpu.c Tue Jul 24 19:22:52 2018 (r336683) @@ -783,22 +783,22 @@ fpugetregs(struct thread *td) int max_ext_n, i, owned; pcb = td->td_pcb; + critical_enter(); if ((pcb->pcb_flags & PCB_USERFPUINITDONE) == 0) { bcopy(fpu_initialstate, get_pcb_user_save_pcb(pcb), cpu_max_ext_state_size); get_pcb_user_save_pcb(pcb)->sv_env.en_cw = pcb->pcb_initial_fpucw; fpuuserinited(td); + critical_exit(); return (_MC_FPOWNED_PCB); } - critical_enter(); if (td == PCPU_GET(fpcurthread) && PCB_USER_FPU(pcb)) { fpusave(get_pcb_user_save_pcb(pcb)); owned = _MC_FPOWNED_FPU; } else { owned = _MC_FPOWNED_PCB; } - critical_exit(); if (use_xsave) { /* * Handle partially saved state. @@ -818,6 +818,7 @@ fpugetregs(struct thread *td) *xstate_bv |= bit; } } + critical_exit(); return (owned); } @@ -826,6 +827,7 @@ fpuuserinited(struct thread *td) { struct pcb *pcb; + CRITICAL_ASSERT(td); pcb = td->td_pcb; if (PCB_USER_FPU(pcb)) set_pcb_flags(pcb, @@ -884,26 +886,25 @@ fpusetregs(struct thread *td, struct savefpu *addr, ch addr->sv_env.en_mxcsr &= cpu_mxcsr_mask; pcb = td->td_pcb; + error = 0; critical_enter(); if (td == PCPU_GET(fpcurthread) && PCB_USER_FPU(pcb)) { error = fpusetxstate(td, xfpustate, xfpustate_size); - if (error != 0) { - critical_exit(); - return (error); + if (error == 0) { + bcopy(addr, get_pcb_user_save_td(td), sizeof(*addr)); + fpurestore(get_pcb_user_save_td(td)); + set_pcb_flags(pcb, PCB_FPUINITDONE | + PCB_USERFPUINITDONE); } - bcopy(addr, get_pcb_user_save_td(td), sizeof(*addr)); - fpurestore(get_pcb_user_save_td(td)); - critical_exit(); - set_pcb_flags(pcb, PCB_FPUINITDONE | PCB_USERFPUINITDONE); } else { - critical_exit(); error = fpusetxstate(td, xfpustate, xfpustate_size); - if (error != 0) - return (error); - bcopy(addr, get_pcb_user_save_td(td), sizeof(*addr)); - fpuuserinited(td); + if (error == 0) { + bcopy(addr, get_pcb_user_save_td(td), sizeof(*addr)); + fpuuserinited(td); + } } - return (0); + critical_exit(); + return (error); } /* @@ -1077,6 +1078,7 @@ fpu_kern_enter(struct thread *td, struct fpu_kern_ctx ctx->flags = FPU_KERN_CTX_DUMMY | FPU_KERN_CTX_INUSE; return; } + critical_enter(); KASSERT(!PCB_USER_FPU(pcb) || pcb->pcb_save == get_pcb_user_save_pcb(pcb), ("mangled pcb_save")); ctx->flags = FPU_KERN_CTX_INUSE; @@ -1087,7 +1089,7 @@ fpu_kern_enter(struct thread *td, struct fpu_kern_ctx pcb->pcb_save = fpu_kern_ctx_savefpu(ctx); set_pcb_flags(pcb, PCB_KERNFPU); clear_pcb_flags(pcb, PCB_FPUINITDONE); - return; + critical_exit(); } int @@ -1105,7 +1107,6 @@ fpu_kern_leave(struct thread *td, struct fpu_kern_ctx clear_pcb_flags(pcb, PCB_FPUNOSAVE | PCB_FPUINITDONE); start_emulating(); - critical_exit(); } else { KASSERT((ctx->flags & FPU_KERN_CTX_INUSE) != 0, ("leaving not inuse ctx")); @@ -1119,7 +1120,6 @@ fpu_kern_leave(struct thread *td, struct fpu_kern_ctx critical_enter(); if (curthread == PCPU_GET(fpcurthread)) fpudrop(); - critical_exit(); pcb->pcb_save = ctx->prev; } @@ -1136,6 +1136,7 @@ fpu_kern_leave(struct thread *td, struct fpu_kern_ctx clear_pcb_flags(pcb, PCB_FPUINITDONE); KASSERT(!PCB_USER_FPU(pcb), ("unpaired fpu_kern_leave")); } + critical_exit(); return (0); } Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Tue Jul 24 19:21:11 2018 (r336682) +++ head/sys/amd64/amd64/machdep.c Tue Jul 24 19:22:52 2018 (r336683) @@ -2171,8 +2171,10 @@ int set_fpregs(struct thread *td, struct fpreg *fpregs) { + critical_enter(); set_fpregs_xmm(fpregs, get_pcb_user_save_td(td)); fpuuserinited(td); + critical_exit(); return (0); } Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Tue Jul 24 19:21:11 2018 (r336682) +++ head/sys/i386/i386/machdep.c Tue Jul 24 19:22:52 2018 (r336683) @@ -2874,6 +2874,7 @@ int set_fpregs(struct thread *td, struct fpreg *fpregs) { + critical_enter(); if (cpu_fxsr) npx_set_fpregs_xmm((struct save87 *)fpregs, &get_pcb_user_save_td(td)->sv_xmm); @@ -2881,6 +2882,7 @@ set_fpregs(struct thread *td, struct fpreg *fpregs) bcopy(fpregs, &get_pcb_user_save_td(td)->sv_87, sizeof(*fpregs)); npxuserinited(td); + critical_exit(); return (0); } Modified: head/sys/i386/i386/npx.c ============================================================================== --- head/sys/i386/i386/npx.c Tue Jul 24 19:21:11 2018 (r336682) +++ head/sys/i386/i386/npx.c Tue Jul 24 19:22:52 2018 (r336683) @@ -966,14 +966,15 @@ npxgetregs(struct thread *td) return (_MC_FPOWNED_NONE); pcb = td->td_pcb; + critical_enter(); if ((pcb->pcb_flags & PCB_NPXINITDONE) == 0) { bcopy(npx_initialstate, get_pcb_user_save_pcb(pcb), cpu_max_ext_state_size); SET_FPU_CW(get_pcb_user_save_pcb(pcb), pcb->pcb_initial_npxcw); npxuserinited(td); + critical_exit(); return (_MC_FPOWNED_PCB); } - critical_enter(); if (td == PCPU_GET(fpcurthread)) { fpusave(get_pcb_user_save_pcb(pcb)); if (!cpu_fxsr) @@ -987,7 +988,6 @@ npxgetregs(struct thread *td) } else { owned = _MC_FPOWNED_PCB; } - critical_exit(); if (use_xsave) { /* * Handle partially saved state. @@ -1010,6 +1010,7 @@ npxgetregs(struct thread *td) *xstate_bv |= bit; } } + critical_exit(); return (owned); } @@ -1018,6 +1019,7 @@ npxuserinited(struct thread *td) { struct pcb *pcb; + CRITICAL_ASSERT(td); pcb = td->td_pcb; if (PCB_USER_FPU(pcb)) pcb->pcb_flags |= PCB_NPXINITDONE; @@ -1075,28 +1077,26 @@ npxsetregs(struct thread *td, union savefpu *addr, cha if (cpu_fxsr) addr->sv_xmm.sv_env.en_mxcsr &= cpu_mxcsr_mask; pcb = td->td_pcb; + error = 0; critical_enter(); if (td == PCPU_GET(fpcurthread) && PCB_USER_FPU(pcb)) { error = npxsetxstate(td, xfpustate, xfpustate_size); - if (error != 0) { - critical_exit(); - return (error); + if (error == 0) { + if (!cpu_fxsr) + fnclex(); /* As in npxdrop(). */ + bcopy(addr, get_pcb_user_save_td(td), sizeof(*addr)); + fpurstor(get_pcb_user_save_td(td)); + pcb->pcb_flags |= PCB_NPXUSERINITDONE | PCB_NPXINITDONE; } - if (!cpu_fxsr) - fnclex(); /* As in npxdrop(). */ - bcopy(addr, get_pcb_user_save_td(td), sizeof(*addr)); - fpurstor(get_pcb_user_save_td(td)); - critical_exit(); - pcb->pcb_flags |= PCB_NPXUSERINITDONE | PCB_NPXINITDONE; } else { - critical_exit(); error = npxsetxstate(td, xfpustate, xfpustate_size); - if (error != 0) - return (error); - bcopy(addr, get_pcb_user_save_td(td), sizeof(*addr)); - npxuserinited(td); + if (error == 0) { + bcopy(addr, get_pcb_user_save_td(td), sizeof(*addr)); + npxuserinited(td); + } } - return (0); + critical_exit(); + return (error); } static void @@ -1364,6 +1364,7 @@ fpu_kern_enter(struct thread *td, struct fpu_kern_ctx return; } pcb = td->td_pcb; + critical_enter(); KASSERT(!PCB_USER_FPU(pcb) || pcb->pcb_save == get_pcb_user_save_pcb(pcb), ("mangled pcb_save")); ctx->flags = FPU_KERN_CTX_INUSE; @@ -1374,7 +1375,7 @@ fpu_kern_enter(struct thread *td, struct fpu_kern_ctx pcb->pcb_save = fpu_kern_ctx_savefpu(ctx); pcb->pcb_flags |= PCB_KERNNPX; pcb->pcb_flags &= ~PCB_NPXINITDONE; - return; + critical_exit(); } int @@ -1392,7 +1393,6 @@ fpu_kern_leave(struct thread *td, struct fpu_kern_ctx critical_enter(); if (curthread == PCPU_GET(fpcurthread)) npxdrop(); - critical_exit(); pcb->pcb_save = ctx->prev; if (pcb->pcb_save == get_pcb_user_save_pcb(pcb)) { if ((pcb->pcb_flags & PCB_NPXUSERINITDONE) != 0) @@ -1407,6 +1407,7 @@ fpu_kern_leave(struct thread *td, struct fpu_kern_ctx pcb->pcb_flags &= ~PCB_NPXINITDONE; KASSERT(!PCB_USER_FPU(pcb), ("unpaired fpu_kern_leave")); } + critical_exit(); return (0); } From owner-svn-src-head@freebsd.org Tue Jul 24 20:20: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 D311B105512D; Tue, 24 Jul 2018 20:20:18 +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 898017E371; Tue, 24 Jul 2018 20:20:18 +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 6661C1064A; Tue, 24 Jul 2018 20:20:18 +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 w6OKKIpa048935; Tue, 24 Jul 2018 20:20:18 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6OKKIkI048934; Tue, 24 Jul 2018 20:20:18 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201807242020.w6OKKIkI048934@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 24 Jul 2018 20:20:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336685 - head/usr.sbin X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/usr.sbin X-SVN-Commit-Revision: 336685 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: Tue, 24 Jul 2018 20:20:19 -0000 Author: markj Date: Tue Jul 24 20:20:17 2018 New Revision: 336685 URL: https://svnweb.freebsd.org/changeset/base/336685 Log: Build ofwdump on riscv. Sponsored by: The FreeBSD Foundation Added: head/usr.sbin/Makefile.riscv (contents, props changed) Added: head/usr.sbin/Makefile.riscv ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/Makefile.riscv Tue Jul 24 20:20:17 2018 (r336685) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +SUBDIR+= ofwdump From owner-svn-src-head@freebsd.org Tue Jul 24 21:02: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 646131056130; Tue, 24 Jul 2018 21:02:12 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 195DC800EB; Tue, 24 Jul 2018 21:02:12 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EE9AB10E34; Tue, 24 Jul 2018 21:02:11 +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 w6OL2B6x075009; Tue, 24 Jul 2018 21:02:11 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6OL2BOu075008; Tue, 24 Jul 2018 21:02:11 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201807242102.w6OL2BOu075008@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 24 Jul 2018 21:02:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336686 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 336686 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: Tue, 24 Jul 2018 21:02:12 -0000 Author: markj Date: Tue Jul 24 21:02:11 2018 New Revision: 336686 URL: https://svnweb.freebsd.org/changeset/base/336686 Log: Embed a simplebus_softc in struct soc_softc. This is required by the definition of the soc driver. Reviewed by: br Sponsored by: The FreeBSD Foundation Modified: head/sys/riscv/riscv/soc.c Modified: head/sys/riscv/riscv/soc.c ============================================================================== --- head/sys/riscv/riscv/soc.c Tue Jul 24 20:20:17 2018 (r336685) +++ head/sys/riscv/riscv/soc.c Tue Jul 24 21:02:11 2018 (r336686) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include struct soc_softc { + struct simplebus_softc simplebus_sc; device_t dev; }; From owner-svn-src-head@freebsd.org Tue Jul 24 21:10: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 4E750105644A; Tue, 24 Jul 2018 21:10:19 +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 0470E80616; Tue, 24 Jul 2018 21:10:19 +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 BF8CA10E64; Tue, 24 Jul 2018 21:10:18 +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 w6OLAIKK075646; Tue, 24 Jul 2018 21:10:18 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6OLAIYp075644; Tue, 24 Jul 2018 21:10:18 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201807242110.w6OLAIYp075644@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 24 Jul 2018 21:10:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336687 - head/sys/fs/msdosfs X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/fs/msdosfs X-SVN-Commit-Revision: 336687 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: Tue, 24 Jul 2018 21:10:19 -0000 Author: emaste Date: Tue Jul 24 21:10:17 2018 New Revision: 336687 URL: https://svnweb.freebsd.org/changeset/base/336687 Log: Revert msdosfs MAKEFS #ifdef changes from r319870 These changes are not needed for current msdosfs makefs WIP. Submitted by: Siva Mahadevan Sponsored by: The FreeBSD Foundation Modified: head/sys/fs/msdosfs/denode.h head/sys/fs/msdosfs/direntry.h head/sys/fs/msdosfs/fat.h Modified: head/sys/fs/msdosfs/denode.h ============================================================================== --- head/sys/fs/msdosfs/denode.h Tue Jul 24 21:02:11 2018 (r336686) +++ head/sys/fs/msdosfs/denode.h Tue Jul 24 21:10:17 2018 (r336687) @@ -211,7 +211,7 @@ struct denode { ((dep)->de_Attributes & ATTR_DIRECTORY) ? 0 : (dep)->de_FileSize), \ putushort((dp)->deHighClust, (dep)->de_StartCluster >> 16)) -#if defined(_KERNEL) || defined(MAKEFS) +#ifdef _KERNEL #define VTODE(vp) ((struct denode *)(vp)->v_data) #define DETOV(de) ((de)->de_vnode) @@ -281,6 +281,5 @@ int deupdat(struct denode *dep, int waitfor); int removede(struct denode *pdep, struct denode *dep); int detrunc(struct denode *dep, u_long length, int flags, struct ucred *cred); int doscheckpath( struct denode *source, struct denode *target); -#endif /* _KERNEL || MAKEFS */ +#endif /* _KERNEL */ #endif /* !_FS_MSDOSFS_DENODE_H_ */ - Modified: head/sys/fs/msdosfs/direntry.h ============================================================================== --- head/sys/fs/msdosfs/direntry.h Tue Jul 24 21:02:11 2018 (r336686) +++ head/sys/fs/msdosfs/direntry.h Tue Jul 24 21:10:17 2018 (r336687) @@ -135,7 +135,7 @@ struct winentry { #define DD_YEAR_MASK 0xFE00 /* year - 1980 */ #define DD_YEAR_SHIFT 9 -#if defined(_KERNEL) || defined(MAKEFS) +#ifdef _KERNEL struct mbnambuf { size_t nb_len; int nb_last_id; @@ -161,5 +161,5 @@ int win2unixfn(struct mbnambuf *nbp, struct winentry * uint8_t winChksum(uint8_t *name); int winSlotCnt(const u_char *un, size_t unlen, struct msdosfsmount *pmp); size_t winLenFixup(const u_char *un, size_t unlen); -#endif /* _KERNEL || MAKEFS */ +#endif /* _KERNEL */ #endif /* !_FS_MSDOSFS_DIRENTRY_H_ */ Modified: head/sys/fs/msdosfs/fat.h ============================================================================== --- head/sys/fs/msdosfs/fat.h Tue Jul 24 21:02:11 2018 (r336686) +++ head/sys/fs/msdosfs/fat.h Tue Jul 24 21:10:17 2018 (r336687) @@ -82,7 +82,7 @@ #define MSDOSFSEOF(pmp, cn) ((((cn) | ~(pmp)->pm_fatmask) & CLUST_EOFS) == CLUST_EOFS) -#if defined(_KERNEL) || defined(MAKEFS) +#ifdef _KERNEL /* * These are the values for the function argument to the function * fatentry(). @@ -105,5 +105,5 @@ int extendfile(struct denode *dep, u_long count, struc void fc_purge(struct denode *dep, u_int frcn); int markvoldirty(struct msdosfsmount *pmp, int dirty); -#endif /* _KERNEL || MAKEFS */ +#endif /* _KERNEL */ #endif /* !_FS_MSDOSFS_FAT_H_ */ From owner-svn-src-head@freebsd.org Tue Jul 24 21:32: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 F0A461056BBB; Tue, 24 Jul 2018 21:32:01 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-it0-x244.google.com (mail-it0-x244.google.com [IPv6:2607:f8b0:4001:c0b::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 8631E810D8; Tue, 24 Jul 2018 21:32:01 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: by mail-it0-x244.google.com with SMTP id s7-v6so5843186itb.4; Tue, 24 Jul 2018 14:32:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=6r6WJVKCSqX7oT7iemkYZnZnaLC5tE1aqToc7LiDnPI=; b=AB7T+2746drx+PYuWoQFJSBF8MQ34gntRmKQGlbBC/yULH2K18wcSn/rJwNVAFELZQ PhGYB5RFfu0NdoFlrtfKKAegUzJYh1Vrjx/C/QrMpHDF04D63LgHTU5losAHtE1z5uuL 5uy1SFoOmibwisTLzvAjitGjdUCD1s76TuUBp7wTMBDhpWDmyX4NIBEeQf6yzbXVkmR4 7bUN/QSfKaCI0/N9DhMDPoVy6VGPzN2/5BBczLgYqXISfQAzYfMkq7RKXShjPUl5VByC jeJuMcItfUXgzBQDeV1ZLMAJXAlco6UInEf8eLRDKFyByBPyD/6cyRMyPN9JOGMn1/3t m8WQ== 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=6r6WJVKCSqX7oT7iemkYZnZnaLC5tE1aqToc7LiDnPI=; b=Gyf3bWKZCzWnswjmMVpXJevETvdLLXtREpCpn/312l0OyNYCPDRIyqGgMQfLj+JqLe 45yorvb+4MoVS8aYhyoaO0Sh3sXfnRcAkDQlJ/kjLBxJ8s/P/1+/9+IMEAlI8GNsvjIJ W3elXe0ei2ohlWYwzlSXuwzMLbQ7556MDopUvqojAwO3E8lpPk3vH61LASyechD9BPTb l+wveUXinGmADPtWQ8Kzktx5PhrF5uSpyf35WRbru0SivFqyT7aRRPPJS3E0GWKSrNUb xUHuMtmiI1Lycid7MO6XVNytmXTE8ovnG4E1rzs1h5RQ4+i5Z2hMI71uPm+lMnXSp64V elNA== X-Gm-Message-State: AOUpUlEMRv8U8WmRhYz9GLLInM2cnwm145077fRQNZwRN4jIdBlg3oVV 0DMVdCKB8XF2iTxnJ4Q/zW6XHy8uYbpCi/EPeF59TP7w X-Google-Smtp-Source: AAOMgpdabfD3yXRjOpXP3Vv+2vA4P44193T2lGOT36zp9u3RFfUY0Z4/r/ScEmsFdphGMb52icFBghyyM6w1qzTzYK4= X-Received: by 2002:a02:9c33:: with SMTP id q48-v6mr16475837jak.103.1532467920839; Tue, 24 Jul 2018 14:32:00 -0700 (PDT) MIME-Version: 1.0 Sender: antoine.brodin.freebsd@gmail.com Received: by 2002:a02:a495:0:0:0:0:0 with HTTP; Tue, 24 Jul 2018 14:32:00 -0700 (PDT) In-Reply-To: <201807241634.w6OGYwY6034223@repo.freebsd.org> References: <201807241634.w6OGYwY6034223@repo.freebsd.org> From: Antoine Brodin Date: Tue, 24 Jul 2018 23:32:00 +0200 X-Google-Sender-Auth: SYMhwMUtx8n3mEPe-ap_RhFdFL4 Message-ID: Subject: Re: svn commit: r336675 - head/share/mk To: Brad Davis 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.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: Tue, 24 Jul 2018 21:32:02 -0000 On Tue, Jul 24, 2018 at 6:34 PM, Brad Davis wrote: > Author: brd > Date: Tue Jul 24 16:34:58 2018 > New Revision: 336675 > URL: https://svnweb.freebsd.org/changeset/base/336675 > > Log: > Convert bsd.confs.mk to support DIRS. > > This paves the way for moving config files out of head/etc and into the > directories with the src. > > Approved by: bapt (mentor) > Differential Revision: https://reviews.freebsd.org/D16406 > > Modified: > head/share/mk/bsd.confs.mk > head/share/mk/bsd.files.mk > head/share/mk/bsd.lib.mk This seems broken, with lots of ports I have this error: make[1]: "/usr/share/mk/bsd.files.mk" line 124: Could not find bsd.dirs.mk make[1]: Fatal errors encountered -- cannot continue Please fix or revert. Antoine (with hat: portmgr) From owner-svn-src-head@freebsd.org Tue Jul 24 21:55: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 2ACFA105740A; Tue, 24 Jul 2018 21:55:51 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (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 BA14A81C9C; Tue, 24 Jul 2018 21:55:50 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 5CA1D21CCA; Tue, 24 Jul 2018 17:55:50 -0400 (EDT) Received: from web6 ([10.202.2.216]) by compute5.internal (MEProxy); Tue, 24 Jul 2018 17:55:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=pGt4yj w3UU7oTRkoIz139NJOFbibNb3ABG8HGC7hN50=; b=p5v1LbCcdIT6Tx4LivAO0w HUBKGgZnmdIutNkWiKa4JHR/sWSW0OS2PZTeSlBHpM92DN33mln8wkGJIj3ydmgc /721M1EQVUKH3ifshHgK11WZA9h1S0HE4+I15b0IAGNdbIbLUj/eJi00iiecrarm rOUlTXxHlYaBc7G7eU/QYOXNVQOZNKvn+suyNSQ5JS8Pj+FqJyG1KdBGczo1MIko +cepeASSVmy4Yk1HBIgFbIqlswcT4Ixo/PJWpkLCSdzwN8sdBjpP3hHWuuldIh8U ZXAhVkEKM5eNzsio3JfLwZpOXQ69PpH82IqV8j8HR0NYGBggUODcQv+USAsB3zcw == X-ME-Proxy: X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id CAA274284; Tue, 24 Jul 2018 17:55:49 -0400 (EDT) Message-Id: <1532469349.1390236.1451746376.2315746E@webmail.messagingengine.com> From: Brad Davis To: Antoine Brodin Cc: "src-committers" , svn-src-all@freebsd.org, svn-src-head@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-0843ff3e Subject: Re: svn commit: r336675 - head/share/mk Date: Tue, 24 Jul 2018 15:55:49 -0600 In-Reply-To: References: <201807241634.w6OGYwY6034223@repo.freebsd.org> 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: Tue, 24 Jul 2018 21:55:51 -0000 On Tue, Jul 24, 2018, at 3:32 PM, Antoine Brodin wrote: > On Tue, Jul 24, 2018 at 6:34 PM, Brad Davis wrote: > > Author: brd > > Date: Tue Jul 24 16:34:58 2018 > > New Revision: 336675 > > URL: https://svnweb.freebsd.org/changeset/base/336675 > > > > Log: > > Convert bsd.confs.mk to support DIRS. > > > > This paves the way for moving config files out of head/etc and into the > > directories with the src. > > > > Approved by: bapt (mentor) > > Differential Revision: https://reviews.freebsd.org/D16406 > > > > Modified: > > head/share/mk/bsd.confs.mk > > head/share/mk/bsd.files.mk > > head/share/mk/bsd.lib.mk > > This seems broken, with lots of ports I have this error: > > make[1]: "/usr/share/mk/bsd.files.mk" line 124: Could not find bsd.dirs.mk > make[1]: Fatal errors encountered -- cannot continue Do you have /usr/share/mk/bsd.dirs.mk from r336640? Regards, Brad Davis From owner-svn-src-head@freebsd.org Tue Jul 24 22:01: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 D0A8A1057509; Tue, 24 Jul 2018 22:01:28 +0000 (UTC) (envelope-from brd@so14k.com) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (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 7D0278201E; Tue, 24 Jul 2018 22:01:28 +0000 (UTC) (envelope-from brd@so14k.com) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 0800920E7B; Tue, 24 Jul 2018 18:01:28 -0400 (EDT) Received: from web6 ([10.202.2.216]) by compute2.internal (MEProxy); Tue, 24 Jul 2018 18:01:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=so14k.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=sg/C5FvpRxUKq2RlteNTrKme1zR6O kQHHHSxwVs2V50=; b=Pc2N5s5HLeXbhYVWWLdk17HXhXv/Q2o6Zib5z5ZW9u9ID +48ZsZlSyivSAI7UFSX1sxg3+hFMbstlbH/SKDBS+TnslQAc6qJMfhnVtzMD1uLK FMJwXm8n4wgu886xCAQCN7KiT/B2Q8KNvLiPvH53cy0An4Q1qGNhKhHFY08lPrbf 6w39ks54A0RUNA4+HPg52m62aWB/PmnSB0wpUspQikMFgQMca3CkdLWWaZ41F6w+ KXDfY68uTxtp9YboohVMwb/mSdHf+qpB9jNrSLM/f32qVF4NLN3uj8EESuhPgWTa QYHbi1Z1cbZVbjHjUEzAUnul8gG2L81qVmNxS3f/A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=sg/C5F vpRxUKq2RlteNTrKme1zR6OkQHHHSxwVs2V50=; b=sHA3GHz7fj7a22Up4jE3jT tlO+d8COJ/Qh7n+AKofQzaL5Z1usg6awfyi3Ttk0ymDWOnBIh7c0VClPC8LU90iU LWBGamQXB5B3NSKGP5uXMFFTpF87NFkeqtBlXSbas1QpvRK1b/6zUvf24qV76Ded xEO6You+KYD8j349J4uSes5AjJA8XggnHGqCXmcILKrPqCKwkx8ZvpyU2NB44CdX 2+s/GzEcp7JDvntxEpPpqHyJn5hd1tv9645lWhm18pWsPj8XHnok62b2+on7D6lH mNL/Ub70JjBQOvUbZ3F2haOkCcbjb/yaGYdKL+1BPqlfHYkHI/CpQ7jh2aGGym9g == X-ME-Proxy: X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id 696304143; Tue, 24 Jul 2018 18:01:27 -0400 (EDT) Message-Id: <1532469687.1391917.1451749920.537E4F5B@webmail.messagingengine.com> From: Brad Davis To: Brad Davis , Antoine Brodin Cc: "src-committers" , svn-src-all@freebsd.org, svn-src-head@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-0843ff3e In-Reply-To: <1532469349.1390236.1451746376.2315746E@webmail.messagingengine.com> References: <201807241634.w6OGYwY6034223@repo.freebsd.org> <1532469349.1390236.1451746376.2315746E@webmail.messagingengine.com> Subject: Re: svn commit: r336675 - head/share/mk Date: Tue, 24 Jul 2018 16:01:27 -0600 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: Tue, 24 Jul 2018 22:01:29 -0000 On Tue, Jul 24, 2018, at 3:55 PM, Brad Davis wrote: > On Tue, Jul 24, 2018, at 3:32 PM, Antoine Brodin wrote: > > On Tue, Jul 24, 2018 at 6:34 PM, Brad Davis wrote: > > > Author: brd > > > Date: Tue Jul 24 16:34:58 2018 > > > New Revision: 336675 > > > URL: https://svnweb.freebsd.org/changeset/base/336675 > > > > > > Log: > > > Convert bsd.confs.mk to support DIRS. > > > > > > This paves the way for moving config files out of head/etc and into the > > > directories with the src. > > > > > > Approved by: bapt (mentor) > > > Differential Revision: https://reviews.freebsd.org/D16406 > > > > > > Modified: > > > head/share/mk/bsd.confs.mk > > > head/share/mk/bsd.files.mk > > > head/share/mk/bsd.lib.mk > > > > This seems broken, with lots of ports I have this error: > > > > make[1]: "/usr/share/mk/bsd.files.mk" line 124: Could not find bsd.dirs.mk > > make[1]: Fatal errors encountered -- cannot continue > > Do you have /usr/share/mk/bsd.dirs.mk from r336640? Opps, I see what the problem is. I'll whip up a review real quick. Regards, Brad Davis From owner-svn-src-head@freebsd.org Tue Jul 24 22:04: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 72B681057754; Tue, 24 Jul 2018 22:04:57 +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 2622E822B8; Tue, 24 Jul 2018 22:04:57 +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 06CA511831; Tue, 24 Jul 2018 22:04:57 +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 w6OM4ulX006264; Tue, 24 Jul 2018 22:04:56 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6OM4uxL006261; Tue, 24 Jul 2018 22:04:56 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201807242204.w6OM4uxL006261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 24 Jul 2018 22:04:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336688 - in head: lib/libc/powerpcspe/gen sys/powerpc/include X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: in head: lib/libc/powerpcspe/gen sys/powerpc/include X-SVN-Commit-Revision: 336688 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: Tue, 24 Jul 2018 22:04:57 -0000 Author: jhibbits Date: Tue Jul 24 22:04:56 2018 New Revision: 336688 URL: https://svnweb.freebsd.org/changeset/base/336688 Log: Fix floating point exception definitions for powerpcspe These were incorrectly implemented in the original port. Modified: head/lib/libc/powerpcspe/gen/fpgetmask.c head/lib/libc/powerpcspe/gen/fpsetmask.c head/sys/powerpc/include/ieeefp.h Modified: head/lib/libc/powerpcspe/gen/fpgetmask.c ============================================================================== --- head/lib/libc/powerpcspe/gen/fpgetmask.c Tue Jul 24 21:10:17 2018 (r336687) +++ head/lib/libc/powerpcspe/gen/fpgetmask.c Tue Jul 24 22:04:56 2018 (r336688) @@ -44,6 +44,6 @@ fpgetmask() uint32_t fpscr; __asm__ __volatile("mfspr %0, %1" : "=r"(fpscr) : "K"(SPR_SPEFSCR)); - return ((fp_except_t)((fpscr >> 3) & 0x1f)); + return ((fp_except_t)((fpscr >> 2) & 0x1f)); } #endif Modified: head/lib/libc/powerpcspe/gen/fpsetmask.c ============================================================================== --- head/lib/libc/powerpcspe/gen/fpsetmask.c Tue Jul 24 21:10:17 2018 (r336687) +++ head/lib/libc/powerpcspe/gen/fpsetmask.c Tue Jul 24 22:04:56 2018 (r336688) @@ -45,8 +45,8 @@ fpsetmask(fp_except_t mask) fp_rnd_t old; __asm__ __volatile("mfspr %0, %1" : "=r"(fpscr) : "K"(SPR_SPEFSCR)); - old = (fp_rnd_t)((fpscr >> 3) & 0x1f); - fpscr = (fpscr & 0xffffff07) | (mask << 3); + old = (fp_rnd_t)((fpscr >> 2) & 0x1f); + fpscr = (fpscr & 0xffffff83) | (mask << 2); __asm__ __volatile("mtspr %1,%0" :: "r"(fpscr), "K"(SPR_SPEFSCR)); return (old); } Modified: head/sys/powerpc/include/ieeefp.h ============================================================================== --- head/sys/powerpc/include/ieeefp.h Tue Jul 24 21:10:17 2018 (r336687) +++ head/sys/powerpc/include/ieeefp.h Tue Jul 24 22:04:56 2018 (r336688) @@ -11,11 +11,19 @@ /* Deprecated historical FPU control interface */ typedef int fp_except_t; +#ifdef __SPE__ +#define FP_X_OFL 0x01 /* overflow exception */ +#define FP_X_UFL 0x02 /* underflow exception */ +#define FP_X_DZ 0x04 /* divide-by-zero exception */ +#define FP_X_INV 0x08 /* invalid operation exception */ +#define FP_X_IMP 0x10 /* imprecise (loss of precision) */ +#else #define FP_X_IMP 0x01 /* imprecise (loss of precision) */ #define FP_X_DZ 0x02 /* divide-by-zero exception */ #define FP_X_UFL 0x04 /* underflow exception */ #define FP_X_OFL 0x08 /* overflow exception */ #define FP_X_INV 0x10 /* invalid operation exception */ +#endif typedef enum { FP_RN=0, /* round to nearest representable number */ From owner-svn-src-head@freebsd.org Tue Jul 24 22:05: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 3D9DC10577C0; Tue, 24 Jul 2018 22:05:56 +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 E8AA682419; Tue, 24 Jul 2018 22:05:55 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C9C7C11839; Tue, 24 Jul 2018 22:05:55 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6OM5t7Q006374; Tue, 24 Jul 2018 22:05:55 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6OM5tNV006373; Tue, 24 Jul 2018 22:05:55 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201807242205.w6OM5tNV006373@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Tue, 24 Jul 2018 22:05:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336689 - head/lib/libc/powerpcspe/gen X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/lib/libc/powerpcspe/gen X-SVN-Commit-Revision: 336689 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: Tue, 24 Jul 2018 22:05:56 -0000 Author: jhibbits Date: Tue Jul 24 22:05:55 2018 New Revision: 336689 URL: https://svnweb.freebsd.org/changeset/base/336689 Log: Fix register usage in fabs(3) for powerpcspe This still used the FPU register definition, which gcc converted to using %r1 (stack register). Fix to use %r3. Modified: head/lib/libc/powerpcspe/gen/fabs.S Modified: head/lib/libc/powerpcspe/gen/fabs.S ============================================================================== --- head/lib/libc/powerpcspe/gen/fabs.S Tue Jul 24 22:04:56 2018 (r336688) +++ head/lib/libc/powerpcspe/gen/fabs.S Tue Jul 24 22:05:55 2018 (r336689) @@ -31,7 +31,7 @@ __FBSDID("$FreeBSD$"); * double fabs(double) */ ENTRY(fabs) - efdabs %f1,%f1 + efdabs %r3,%r3 blr END(fabs) From owner-svn-src-head@freebsd.org Tue Jul 24 22:06: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 34F41105780B; Tue, 24 Jul 2018 22:06:34 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (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 D90CA8255D; Tue, 24 Jul 2018 22:06:33 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 3C0F921607; Tue, 24 Jul 2018 18:06:33 -0400 (EDT) Received: from web6 ([10.202.2.216]) by compute5.internal (MEProxy); Tue, 24 Jul 2018 18:06:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=vw/P0f UZ/ehkF1EnjWti9I9L6BSyX/BhkiWGP5VXm7c=; b=JJ4UD2a/XTqJY042C/Hhsk fyoeBoG7Y1KGRHAxZK4keKMomszvuN7YC4baLPWhDEggjRzJEmiEtODc5oBPVY/i zN45YALsZ/ibtIsqvPBnMjGcnil9IRejykWisDsJGyygjCInhcKR/cBg2bkIeTy/ y07pplZs87M2lucLRu3fCt3Kd394PpNMN35dw4TJV6BrCDiMFOc1RJi402e1YoWi DWIj+mySuhdVby8PRY9/LOtNXhD76porcaraCi98/agL0kW/5aPnLqQ6/d9xnu9n 4YEIkE50zKxHXXzMOr2FiFnemIJa9NShZ3qwy2Hw4kuHsqviATp+mfhbJ1XFFNMg == X-ME-Proxy: X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id CC9C94143; Tue, 24 Jul 2018 18:06:32 -0400 (EDT) Message-Id: <1532469992.1393536.1451757688.2B270E43@webmail.messagingengine.com> From: Brad Davis To: Antoine Brodin Cc: "src-committers" , svn-src-all@freebsd.org, svn-src-head@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-0843ff3e Subject: Re: svn commit: r336675 - head/share/mk Date: Tue, 24 Jul 2018 16:06:32 -0600 References: <201807241634.w6OGYwY6034223@repo.freebsd.org> <1532469349.1390236.1451746376.2315746E@webmail.messagingengine.com> In-Reply-To: <1532469349.1390236.1451746376.2315746E@webmail.messagingengine.com> 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: Tue, 24 Jul 2018 22:06:34 -0000 On Tue, Jul 24, 2018, at 3:55 PM, Brad Davis wrote: > On Tue, Jul 24, 2018, at 3:32 PM, Antoine Brodin wrote: > > On Tue, Jul 24, 2018 at 6:34 PM, Brad Davis wrote: > > > Author: brd > > > Date: Tue Jul 24 16:34:58 2018 > > > New Revision: 336675 > > > URL: https://svnweb.freebsd.org/changeset/base/336675 > > > > > > Log: > > > Convert bsd.confs.mk to support DIRS. > > > > > > This paves the way for moving config files out of head/etc and into the > > > directories with the src. > > > > > > Approved by: bapt (mentor) > > > Differential Revision: https://reviews.freebsd.org/D16406 > > > > > > Modified: > > > head/share/mk/bsd.confs.mk > > > head/share/mk/bsd.files.mk > > > head/share/mk/bsd.lib.mk > > > > This seems broken, with lots of ports I have this error: > > > > make[1]: "/usr/share/mk/bsd.files.mk" line 124: Could not find bsd.dirs.mk > > make[1]: Fatal errors encountered -- cannot continue > > Do you have /usr/share/mk/bsd.dirs.mk from r336640? I opened: https://reviews.freebsd.org/D16434 Regards, Brad Davis From owner-svn-src-head@freebsd.org Tue Jul 24 23:40: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 8D6AE1058F4A; Tue, 24 Jul 2018 23:40:28 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 40CB684E61; Tue, 24 Jul 2018 23:40:28 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 175F8126A1; Tue, 24 Jul 2018 23:40:28 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6ONeRj8053707; Tue, 24 Jul 2018 23:40:27 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6ONeRI1053706; Tue, 24 Jul 2018 23:40:27 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201807242340.w6ONeRI1053706@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Tue, 24 Jul 2018 23:40:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336690 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: marius X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 336690 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: Tue, 24 Jul 2018 23:40:28 -0000 Author: marius Date: Tue Jul 24 23:40:27 2018 New Revision: 336690 URL: https://svnweb.freebsd.org/changeset/base/336690 Log: Since r336611, n is only used for INET in iflib_parse_header(). Reported by: rpokala Modified: head/sys/net/iflib.c Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Tue Jul 24 22:05:55 2018 (r336689) +++ head/sys/net/iflib.c Tue Jul 24 23:40:27 2018 (r336690) @@ -2874,7 +2874,7 @@ iflib_parse_header(iflib_txq_t txq, if_pkt_info_t pi, { if_shared_ctx_t sctx = txq->ift_ctx->ifc_sctx; struct ether_vlan_header *eh; - struct mbuf *m, *n; + struct mbuf *m; m = *mp; if ((sctx->isc_flags & IFLIB_NEED_SCRATCH) && @@ -2910,6 +2910,7 @@ iflib_parse_header(iflib_txq_t txq, if_pkt_info_t pi, #ifdef INET case ETHERTYPE_IP: { + struct mbuf *n; struct ip *ip = NULL; struct tcphdr *th = NULL; int minthlen; From owner-svn-src-head@freebsd.org Wed Jul 25 00:06: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 B0E421059A02; Wed, 25 Jul 2018 00:06:19 +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 640D985D2C; Wed, 25 Jul 2018 00:06:19 +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 4531512B84; Wed, 25 Jul 2018 00:06:19 +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 w6P06JmA068781; Wed, 25 Jul 2018 00:06:19 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6P06JAs068780; Wed, 25 Jul 2018 00:06:19 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201807250006.w6P06JAs068780@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 25 Jul 2018 00:06:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336691 - head/lib/clang/include/llvm/Config X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/lib/clang/include/llvm/Config X-SVN-Commit-Revision: 336691 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: Wed, 25 Jul 2018 00:06:19 -0000 Author: emaste Date: Wed Jul 25 00:06:18 2018 New Revision: 336691 URL: https://svnweb.freebsd.org/changeset/base/336691 Log: llvm: remove __FreeBSD_version conditionals All supported FreeBSD build host versions have backtrace.h, so we can just eliminate that test. For futimes() we can test the compiler's built-in __FreeBSD__ major version rather than relying on including osreldate.h. This should reduce the frequency with which Clang gets rebuilt when building world. Reviewed by: dim Sponsored by: The FreeBSD Foundation Modified: head/lib/clang/include/llvm/Config/config.h Modified: head/lib/clang/include/llvm/Config/config.h ============================================================================== --- head/lib/clang/include/llvm/Config/config.h Tue Jul 24 23:40:27 2018 (r336690) +++ head/lib/clang/include/llvm/Config/config.h Wed Jul 25 00:06:18 2018 (r336691) @@ -2,9 +2,6 @@ #ifndef CONFIG_H #define CONFIG_H -/* Get __FreeBSD_version. */ -#include - /* Exported configuration */ #include "llvm/Config/llvm-config.h" @@ -17,12 +14,10 @@ /* Define to 1 to enable crash overrides, and to 0 otherwise. */ #define ENABLE_CRASH_OVERRIDES 1 -#if __FreeBSD_version >= 1000052 /* Define to 1 if you have the `backtrace' function. */ #define HAVE_BACKTRACE TRUE #define BACKTRACE_HEADER -#endif /* Define to 1 if you have the header file. */ /* #undef HAVE_CRASHREPORTERCLIENT_H */ @@ -81,7 +76,7 @@ /* #undef HAVE_FFI_H */ /* Define to 1 if you have the `futimens' function. */ -#if __FreeBSD_version >= 1100056 +#if __FreeBSD__ >= 11 #define HAVE_FUTIMENS 1 #endif From owner-svn-src-head@freebsd.org Wed Jul 25 00:18: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 012CB1059DBA; Wed, 25 Jul 2018 00:18: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 AAAF586484; Wed, 25 Jul 2018 00:18:21 +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 8D0F112D26; Wed, 25 Jul 2018 00:18:21 +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 w6P0ILVO074366; Wed, 25 Jul 2018 00:18:21 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6P0ILvv074365; Wed, 25 Jul 2018 00:18:21 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201807250018.w6P0ILvv074365@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 25 Jul 2018 00:18:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336692 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 336692 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: Wed, 25 Jul 2018 00:18:22 -0000 Author: emaste Date: Wed Jul 25 00:18:21 2018 New Revision: 336692 URL: https://svnweb.freebsd.org/changeset/base/336692 Log: sockopt.h: remove stale comment Some old compatibility bits were removed in r227503 but this comment was left behind. Reported by: br, via review D11962 Sponsored by: The FreeBSD Foundation Modified: head/sys/sys/sockopt.h Modified: head/sys/sys/sockopt.h ============================================================================== --- head/sys/sys/sockopt.h Wed Jul 25 00:06:18 2018 (r336691) +++ head/sys/sys/sockopt.h Wed Jul 25 00:18:21 2018 (r336692) @@ -62,7 +62,6 @@ int sosetopt(struct socket *so, struct sockopt *sopt); int sogetopt(struct socket *so, struct sockopt *sopt); int sooptcopyin(struct sockopt *sopt, void *buf, size_t len, size_t minlen); int sooptcopyout(struct sockopt *sopt, const void *buf, size_t len); -/* XXX; prepare mbuf for (__FreeBSD__ < 3) routines. */ int soopt_getm(struct sockopt *sopt, struct mbuf **mp); int soopt_mcopyin(struct sockopt *sopt, struct mbuf *m); int soopt_mcopyout(struct sockopt *sopt, struct mbuf *m); From owner-svn-src-head@freebsd.org Wed Jul 25 00:33: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 9F8DE103339D; Wed, 25 Jul 2018 00:33:10 +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 43ED286D5D; Wed, 25 Jul 2018 00:33:10 +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 2061F1306C; Wed, 25 Jul 2018 00:33:10 +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 w6P0XACb084510; Wed, 25 Jul 2018 00:33:10 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6P0X9d8084509; Wed, 25 Jul 2018 00:33:09 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201807250033.w6P0X9d8084509@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Wed, 25 Jul 2018 00:33:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336693 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 336693 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: Wed, 25 Jul 2018 00:33:10 -0000 Author: brd Date: Wed Jul 25 00:33:09 2018 New Revision: 336693 URL: https://svnweb.freebsd.org/changeset/base/336693 Log: Actually install bsd.dirs.mk Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D16434 Modified: head/share/mk/Makefile Modified: head/share/mk/Makefile ============================================================================== --- head/share/mk/Makefile Wed Jul 25 00:18:21 2018 (r336692) +++ head/share/mk/Makefile Wed Jul 25 00:33:09 2018 (r336693) @@ -23,6 +23,7 @@ FILES= \ bsd.cpu.mk \ bsd.crunchgen.mk \ bsd.dep.mk \ + bsd.dirs.mk \ bsd.doc.mk \ bsd.dtb.mk \ bsd.endian.mk \ From owner-svn-src-head@freebsd.org Wed Jul 25 00:34: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 816CB10334A1; Wed, 25 Jul 2018 00:34:59 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (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 3133986F13; Wed, 25 Jul 2018 00:34:59 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id C303C21CF0; Tue, 24 Jul 2018 20:34:58 -0400 (EDT) Received: from web6 ([10.202.2.216]) by compute5.internal (MEProxy); Tue, 24 Jul 2018 20:34:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=1kDp8n KBoTVQXbtgax9lkn956cL3DbiP4n58kpTFbQg=; b=A2fQcWFzoMFnB3pc3HlyzW oXqOcp5jxjaQqPRkQyi8Zwg5eubOuZaUMuWVK2gY6CCW3lp3LeU4nLcyPVxwLkOn rOkfuGFJj6mAmwnT8oN9ymh8FbCCxZrszz/hQmHXyZEtaei5GSILNvedfFm1257x awuxYnR0a7iwB0dHuSoBP4ViFwOKyzrhcUFDc2rEvAWMI1pgM2tkzu4cJZAwXlsn HA7L+QXEA5YRIQVzYyKYQPASKAMWrDDHlIyNKUiRazy/1yxlpPpL1SU2WcXyYCv0 i4WlvroA1nsn05wNqPbZSwwqtQ77w98ffdhPv0kxOSzFhH7bHXTlUDbt1ocBtUhQ == X-ME-Proxy: X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id 6E1B34143; Tue, 24 Jul 2018 20:34:58 -0400 (EDT) Message-Id: <1532478898.1438202.1451866440.092A47FA@webmail.messagingengine.com> From: Brad Davis To: Antoine Brodin Cc: "src-committers" , svn-src-all@freebsd.org, svn-src-head@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-0843ff3e In-Reply-To: <1532469992.1393536.1451757688.2B270E43@webmail.messagingengine.com> References: <201807241634.w6OGYwY6034223@repo.freebsd.org> <1532469349.1390236.1451746376.2315746E@webmail.messagingengine.com> <1532469992.1393536.1451757688.2B270E43@webmail.messagingengine.com> Date: Tue, 24 Jul 2018 18:34:58 -0600 Subject: Re: svn commit: r336675 - head/share/mk 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: Wed, 25 Jul 2018 00:34:59 -0000 On Tue, Jul 24, 2018, at 4:06 PM, Brad Davis wrote: > On Tue, Jul 24, 2018, at 3:55 PM, Brad Davis wrote: > > On Tue, Jul 24, 2018, at 3:32 PM, Antoine Brodin wrote: > > > On Tue, Jul 24, 2018 at 6:34 PM, Brad Davis wrote: > > > > Author: brd > > > > Date: Tue Jul 24 16:34:58 2018 > > > > New Revision: 336675 > > > > URL: https://svnweb.freebsd.org/changeset/base/336675 > > > > > > > > Log: > > > > Convert bsd.confs.mk to support DIRS. > > > > > > > > This paves the way for moving config files out of head/etc and into the > > > > directories with the src. > > > > > > > > Approved by: bapt (mentor) > > > > Differential Revision: https://reviews.freebsd.org/D16406 > > > > > > > > Modified: > > > > head/share/mk/bsd.confs.mk > > > > head/share/mk/bsd.files.mk > > > > head/share/mk/bsd.lib.mk > > > > > > This seems broken, with lots of ports I have this error: > > > > > > make[1]: "/usr/share/mk/bsd.files.mk" line 124: Could not find bsd.dirs.mk > > > make[1]: Fatal errors encountered -- cannot continue > > > > Do you have /usr/share/mk/bsd.dirs.mk from r336640? > > I opened: https://reviews.freebsd.org/D16434 Committed as r336693. Thanks for letting me know and sorry for the trouble. Regards, Brad Davis From owner-svn-src-head@freebsd.org Wed Jul 25 02: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 8D01B103B3C1; Wed, 25 Jul 2018 02:36:57 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 32D848AF27; Wed, 25 Jul 2018 02:36:57 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 04E2A143AB; Wed, 25 Jul 2018 02:36:57 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6P2aumN046737; Wed, 25 Jul 2018 02:36:56 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6P2au1l046734; Wed, 25 Jul 2018 02:36:56 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201807250236.w6P2au1l046734@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Wed, 25 Jul 2018 02:36:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336695 - in head/sys: dev/qlnx/qlnxe modules/qlnx modules/qlnx/qlnxe modules/qlnx/qlnxev X-SVN-Group: head X-SVN-Commit-Author: davidcs X-SVN-Commit-Paths: in head/sys: dev/qlnx/qlnxe modules/qlnx modules/qlnx/qlnxe modules/qlnx/qlnxev X-SVN-Commit-Revision: 336695 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: Wed, 25 Jul 2018 02:36:58 -0000 Author: davidcs Date: Wed Jul 25 02:36:55 2018 New Revision: 336695 URL: https://svnweb.freebsd.org/changeset/base/336695 Log: Remove support for QLNX_RCV_IN_TASKQ - i.e., Rx only in TaskQ. Added support for LLDP passthru Upgrade ECORE to version 8.33.5.0 Upgrade STORMFW to version 8.33.7.0 Added support for SRIOV MFC after:5 days Added: head/sys/dev/qlnx/qlnxe/ecore_iwarp.h (contents, props changed) head/sys/dev/qlnx/qlnxe/ecore_mng_tlv.c (contents, props changed) head/sys/dev/qlnx/qlnxe/ecore_rdma.h (contents, props changed) head/sys/dev/qlnx/qlnxe/ecore_rdma_api.h (contents, props changed) head/sys/dev/qlnx/qlnxe/ecore_sriov.c (contents, props changed) head/sys/dev/qlnx/qlnxe/ecore_tcp_ip.h (contents, props changed) head/sys/dev/qlnx/qlnxe/ecore_vf.c (contents, props changed) head/sys/modules/qlnx/qlnxev/ head/sys/modules/qlnx/qlnxev/Makefile (contents, props changed) Modified: head/sys/dev/qlnx/qlnxe/bcm_osal.h head/sys/dev/qlnx/qlnxe/common_hsi.h head/sys/dev/qlnx/qlnxe/ecore.h head/sys/dev/qlnx/qlnxe/ecore_chain.h head/sys/dev/qlnx/qlnxe/ecore_cxt.c head/sys/dev/qlnx/qlnxe/ecore_cxt.h head/sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c head/sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h head/sys/dev/qlnx/qlnxe/ecore_dbg_values.h head/sys/dev/qlnx/qlnxe/ecore_dcbx.c head/sys/dev/qlnx/qlnxe/ecore_dcbx.h head/sys/dev/qlnx/qlnxe/ecore_dcbx_api.h head/sys/dev/qlnx/qlnxe/ecore_dev.c head/sys/dev/qlnx/qlnxe/ecore_dev_api.h head/sys/dev/qlnx/qlnxe/ecore_fcoe.h head/sys/dev/qlnx/qlnxe/ecore_fcoe_api.h head/sys/dev/qlnx/qlnxe/ecore_hsi_common.h head/sys/dev/qlnx/qlnxe/ecore_hsi_debug_tools.h head/sys/dev/qlnx/qlnxe/ecore_hsi_eth.h head/sys/dev/qlnx/qlnxe/ecore_hsi_fcoe.h head/sys/dev/qlnx/qlnxe/ecore_hsi_init_func.h head/sys/dev/qlnx/qlnxe/ecore_hsi_init_tool.h head/sys/dev/qlnx/qlnxe/ecore_hsi_iscsi.h head/sys/dev/qlnx/qlnxe/ecore_hsi_iwarp.h head/sys/dev/qlnx/qlnxe/ecore_hsi_rdma.h head/sys/dev/qlnx/qlnxe/ecore_hsi_roce.h head/sys/dev/qlnx/qlnxe/ecore_hw.c head/sys/dev/qlnx/qlnxe/ecore_hw.h head/sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c head/sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h head/sys/dev/qlnx/qlnxe/ecore_init_ops.c head/sys/dev/qlnx/qlnxe/ecore_init_values.h head/sys/dev/qlnx/qlnxe/ecore_int.c head/sys/dev/qlnx/qlnxe/ecore_int.h head/sys/dev/qlnx/qlnxe/ecore_int_api.h head/sys/dev/qlnx/qlnxe/ecore_iov_api.h head/sys/dev/qlnx/qlnxe/ecore_iro.h head/sys/dev/qlnx/qlnxe/ecore_iro_values.h head/sys/dev/qlnx/qlnxe/ecore_iscsi.h head/sys/dev/qlnx/qlnxe/ecore_iscsi_api.h head/sys/dev/qlnx/qlnxe/ecore_l2.c head/sys/dev/qlnx/qlnxe/ecore_l2.h head/sys/dev/qlnx/qlnxe/ecore_l2_api.h head/sys/dev/qlnx/qlnxe/ecore_ll2.h head/sys/dev/qlnx/qlnxe/ecore_ll2_api.h head/sys/dev/qlnx/qlnxe/ecore_mcp.c head/sys/dev/qlnx/qlnxe/ecore_mcp.h head/sys/dev/qlnx/qlnxe/ecore_mcp_api.h head/sys/dev/qlnx/qlnxe/ecore_ooo.h head/sys/dev/qlnx/qlnxe/ecore_proto_if.h head/sys/dev/qlnx/qlnxe/ecore_roce.h head/sys/dev/qlnx/qlnxe/ecore_roce_api.h head/sys/dev/qlnx/qlnxe/ecore_rt_defs.h head/sys/dev/qlnx/qlnxe/ecore_sp_commands.c head/sys/dev/qlnx/qlnxe/ecore_sp_commands.h head/sys/dev/qlnx/qlnxe/ecore_spq.c head/sys/dev/qlnx/qlnxe/ecore_spq.h head/sys/dev/qlnx/qlnxe/ecore_sriov.h head/sys/dev/qlnx/qlnxe/ecore_utils.h head/sys/dev/qlnx/qlnxe/ecore_vf.h head/sys/dev/qlnx/qlnxe/ecore_vf_api.h head/sys/dev/qlnx/qlnxe/ecore_vfpf_if.h head/sys/dev/qlnx/qlnxe/eth_common.h head/sys/dev/qlnx/qlnxe/fcoe_common.h head/sys/dev/qlnx/qlnxe/iscsi_common.h head/sys/dev/qlnx/qlnxe/mcp_private.h head/sys/dev/qlnx/qlnxe/mcp_public.h head/sys/dev/qlnx/qlnxe/nvm_cfg.h head/sys/dev/qlnx/qlnxe/nvm_map.h head/sys/dev/qlnx/qlnxe/qlnx_def.h head/sys/dev/qlnx/qlnxe/qlnx_ioctl.c head/sys/dev/qlnx/qlnxe/qlnx_ioctl.h head/sys/dev/qlnx/qlnxe/qlnx_os.c head/sys/dev/qlnx/qlnxe/qlnx_os.h head/sys/dev/qlnx/qlnxe/qlnx_ver.h head/sys/dev/qlnx/qlnxe/rdma_common.h head/sys/dev/qlnx/qlnxe/reg_addr.h head/sys/dev/qlnx/qlnxe/roce_common.h head/sys/dev/qlnx/qlnxe/spad_layout.h head/sys/dev/qlnx/qlnxe/storage_common.h head/sys/dev/qlnx/qlnxe/tcp_common.h head/sys/modules/qlnx/Makefile head/sys/modules/qlnx/qlnxe/Makefile Modified: head/sys/dev/qlnx/qlnxe/bcm_osal.h ============================================================================== --- head/sys/dev/qlnx/qlnxe/bcm_osal.h Wed Jul 25 01:04:50 2018 (r336694) +++ head/sys/dev/qlnx/qlnxe/bcm_osal.h Wed Jul 25 02:36:55 2018 (r336695) @@ -34,7 +34,7 @@ #include "ecore_status.h" #include -#if __FreeBSD_version >= 1200000 +#if __FreeBSD_version >= 1200032 #include #else #if __FreeBSD_version >= 1100090 @@ -62,6 +62,7 @@ extern void qlnx_pci_write_config_word(void *ecore_dev extern void qlnx_pci_write_config_dword(void *ecore_dev, uint32_t pci_reg, uint32_t reg_value); extern int qlnx_pci_find_capability(void *ecore_dev, int cap); +extern int qlnx_pci_find_ext_capability(void *ecore_dev, int ext_cap); extern uint32_t qlnx_direct_reg_rd32(void *p_hwfn, uint32_t *reg_addr); extern void qlnx_direct_reg_wr32(void *p_hwfn, void *reg_addr, uint32_t value); @@ -72,6 +73,7 @@ extern void qlnx_reg_wr32(void *p_hwfn, uint32_t reg_a extern void qlnx_reg_wr16(void *p_hwfn, uint32_t reg_addr, uint16_t value); extern void qlnx_dbell_wr32(void *p_hwfn, uint32_t reg_addr, uint32_t value); +extern void qlnx_dbell_wr32_db(void *p_hwfn, void *reg_addr, uint32_t value); extern void *qlnx_dma_alloc_coherent(void *ecore_dev, bus_addr_t *phys, uint32_t size); @@ -89,6 +91,16 @@ extern void qlnx_get_protocol_stats(void *cdev, int pr extern void qlnx_sp_isr(void *arg); +extern void qlnx_osal_vf_fill_acquire_resc_req(void *p_hwfn, void *p_resc_req, + void *p_sw_info); +extern void qlnx_osal_iov_vf_cleanup(void *p_hwfn, uint8_t relative_vf_id); +extern int qlnx_iov_chk_ucast(void *p_hwfn, int vfid, void *params); +extern int qlnx_iov_update_vport(void *p_hwfn, uint8_t vfid, void *params, + uint16_t *tlvs); +extern int qlnx_pf_vf_msg(void *p_hwfn, uint16_t relative_vf_id); +extern void qlnx_vf_flr_update(void *p_hwfn); + +#define nothing do {} while(0) #ifdef ECORE_PACKAGE /* Memory Types */ @@ -130,7 +142,6 @@ rounddown_pow_of_two(unsigned long x) ((type)(val1) < (type)(val2) ? (type)(val1) : (val2)) #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0])) -#define nothing do {} while(0) #define BUILD_BUG_ON(cond) nothing #endif /* #ifndef QLNX_RDMA */ @@ -209,6 +220,7 @@ typedef struct osal_list_t #define DIRECT_REG_WR(p_hwfn, addr, value) qlnx_direct_reg_wr32(p_hwfn, addr, value) #define DIRECT_REG_WR64(p_hwfn, addr, value) \ qlnx_direct_reg_wr64(p_hwfn, addr, value) +#define DIRECT_REG_WR_DB(p_hwfn, addr, value) qlnx_dbell_wr32_db(p_hwfn, addr, value) #define DIRECT_REG_RD(p_hwfn, addr) qlnx_direct_reg_rd32(p_hwfn, addr) #define REG_RD(hwfn, addr) qlnx_reg_rd32(hwfn, addr) #define DOORBELL(hwfn, addr, value) \ @@ -238,7 +250,8 @@ typedef struct osal_list_t #define OSAL_DPC_ALLOC(hwfn) malloc(PAGE_SIZE, M_QLNXBUF, M_NOWAIT) #define OSAL_DPC_INIT(dpc, hwfn) nothing -#define OSAL_SCHEDULE_RECOVERY_HANDLER(x) nothing +extern void qlnx_schedule_recovery(void *p_hwfn); +#define OSAL_SCHEDULE_RECOVERY_HANDLER(x) do {qlnx_schedule_recovery(x);} while(0) #define OSAL_HW_ERROR_OCCURRED(hwfn, err_type) nothing #define OSAL_DPC_SYNC(hwfn) nothing @@ -371,7 +384,9 @@ do { \ #define OSAL_PCI_WRITE_CONFIG_DWORD(dev, reg, value) \ qlnx_pci_write_config_dword(dev, reg, value); -#define OSAL_PCI_FIND_CAPABILITY(dev, cap) qlnx_pci_find_capability(dev, cap); +#define OSAL_PCI_FIND_CAPABILITY(dev, cap) qlnx_pci_find_capability(dev, cap) +#define OSAL_PCI_FIND_EXT_CAPABILITY(dev, ext_cap) \ + qlnx_pci_find_ext_capability(dev, ext_cap) #define OSAL_MMIOWB(dev) qlnx_barrier(dev) #define OSAL_BARRIER(dev) qlnx_barrier(dev) @@ -390,8 +405,7 @@ do { \ #define OSAL_FIND_FIRST_ZERO_BIT(bitmap, length) \ find_first_zero_bit(bitmap, length) -#define OSAL_LINK_UPDATE(hwfn) qlnx_link_update(hwfn) -#define OSAL_VF_FLR_UPDATE(hwfn) +#define OSAL_LINK_UPDATE(hwfn, ptt) qlnx_link_update(hwfn) #define QLNX_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) #define QLNX_ROUNDUP(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) @@ -536,8 +550,36 @@ OSAL_CRC8(u8 * cdu_crc8_table, u8 * data_to_crc, int d #define OSAL_HW_INFO_CHANGE(p_hwfn, offset) #define OSAL_MFW_TLV_REQ(p_hwfn) -#define OSAL_VF_FILL_ACQUIRE_RESC_REQ(p_hwfn, req, vf_sw_info) {}; +#define OSAL_LLDP_RX_TLVS(p_hwfn, buffer, len) +#define OSAL_MFW_CMD_PREEMPT(p_hwfn) +#define OSAL_TRANSCEIVER_UPDATE(p_hwfn) +#define OSAL_MFW_FILL_TLV_DATA(p_hwfn, group, data) (0) + #define OSAL_VF_UPDATE_ACQUIRE_RESC_RESP(p_hwfn, res) (0) + +#define OSAL_VF_FILL_ACQUIRE_RESC_REQ(p_hwfn, req, vf_sw_info) \ + qlnx_osal_vf_fill_acquire_resc_req(p_hwfn, req, vf_sw_info) + +#define OSAL_IOV_PF_RESP_TYPE(p_hwfn, relative_vf_id, status) +#define OSAL_IOV_VF_CLEANUP(p_hwfn, relative_vf_id) \ + qlnx_osal_iov_vf_cleanup(p_hwfn, relative_vf_id) + +#define OSAL_IOV_VF_ACQUIRE(p_hwfn, relative_vf_id) ECORE_SUCCESS +#define OSAL_IOV_GET_OS_TYPE() VFPF_ACQUIRE_OS_FREEBSD +#define OSAL_IOV_PRE_START_VPORT(p_hwfn, relative_vf_id, params) ECORE_SUCCESS +#define OSAL_IOV_POST_START_VPORT(p_hwfn, relative_vf_id, vport_id, opaque_fid) +#define OSAL_PF_VALIDATE_MODIFY_TUNN_CONFIG(p_hwfn, x, y, z) ECORE_SUCCESS +#define OSAL_IOV_CHK_UCAST(p_hwfn, vfid, params) \ + qlnx_iov_chk_ucast(p_hwfn, vfid, params); +#define OSAL_PF_VF_MALICIOUS(p_hwfn, relative_vf_id) +#define OSAL_IOV_VF_MSG_TYPE(p_hwfn, relative_vf_id, type) +#define OSAL_IOV_VF_VPORT_UPDATE(p_hwfn, vfid, params, tlvs) \ + qlnx_iov_update_vport(p_hwfn, vfid, params, tlvs) +#define OSAL_PF_VF_MSG(p_hwfn, relative_vf_id) \ + qlnx_pf_vf_msg(p_hwfn, relative_vf_id) + +#define OSAL_VF_FLR_UPDATE(p_hwfn) qlnx_vf_flr_update(p_hwfn) +#define OSAL_IOV_VF_VPORT_STOP(p_hwfn, vf) #endif /* #ifdef ECORE_PACKAGE */ Modified: head/sys/dev/qlnx/qlnxe/common_hsi.h ============================================================================== --- head/sys/dev/qlnx/qlnxe/common_hsi.h Wed Jul 25 01:04:50 2018 (r336694) +++ head/sys/dev/qlnx/qlnxe/common_hsi.h Wed Jul 25 02:36:55 2018 (r336695) @@ -104,8 +104,8 @@ #define FW_MAJOR_VERSION 8 -#define FW_MINOR_VERSION 30 -#define FW_REVISION_VERSION 0 +#define FW_MINOR_VERSION 33 +#define FW_REVISION_VERSION 7 #define FW_ENGINEERING_VERSION 0 /***********************/ @@ -113,76 +113,69 @@ /***********************/ /* PCI functions */ -#define MAX_NUM_PORTS_BB (2) -#define MAX_NUM_PORTS_K2 (4) -#define MAX_NUM_PORTS_E5 (MAX_NUM_PORTS_K2) -#define MAX_NUM_PORTS (MAX_NUM_PORTS_E5) +#define MAX_NUM_PORTS_BB (2) +#define MAX_NUM_PORTS_K2 (4) +#define MAX_NUM_PORTS_E5 (4) +#define MAX_NUM_PORTS (MAX_NUM_PORTS_E5) -#define MAX_NUM_PFS_BB (8) -#define MAX_NUM_PFS_K2 (16) -#define MAX_NUM_PFS_E5 (MAX_NUM_PFS_K2) -#define MAX_NUM_PFS (MAX_NUM_PFS_E5) -#define MAX_NUM_OF_PFS_IN_CHIP (16) /* On both engines */ +#define MAX_NUM_PFS_BB (8) +#define MAX_NUM_PFS_K2 (16) +#define MAX_NUM_PFS_E5 (16) +#define MAX_NUM_PFS (MAX_NUM_PFS_E5) +#define MAX_NUM_OF_PFS_IN_CHIP (16) /* On both engines */ -#define MAX_NUM_VFS_BB (120) -#define MAX_NUM_VFS_K2 (192) -#define MAX_NUM_VFS_E4 (MAX_NUM_VFS_K2) -#define MAX_NUM_VFS_E5 (240) -#define COMMON_MAX_NUM_VFS (MAX_NUM_VFS_E5) +#define MAX_NUM_VFS_BB (120) +#define MAX_NUM_VFS_K2 (192) +#define MAX_NUM_VFS_E4 (MAX_NUM_VFS_K2) +#define MAX_NUM_VFS_E5 (240) +#define COMMON_MAX_NUM_VFS (MAX_NUM_VFS_E5) -#define MAX_NUM_FUNCTIONS_BB (MAX_NUM_PFS_BB + MAX_NUM_VFS_BB) -#define MAX_NUM_FUNCTIONS_K2 (MAX_NUM_PFS_K2 + MAX_NUM_VFS_K2) -#define MAX_NUM_FUNCTIONS (MAX_NUM_PFS + MAX_NUM_VFS_E4) +#define MAX_NUM_FUNCTIONS_BB (MAX_NUM_PFS_BB + MAX_NUM_VFS_BB) +#define MAX_NUM_FUNCTIONS_K2 (MAX_NUM_PFS_K2 + MAX_NUM_VFS_K2) +#define MAX_NUM_FUNCTIONS (MAX_NUM_PFS + MAX_NUM_VFS_E4) /* in both BB and K2, the VF number starts from 16. so for arrays containing all */ /* possible PFs and VFs - we need a constant for this size */ -#define MAX_FUNCTION_NUMBER_BB (MAX_NUM_PFS + MAX_NUM_VFS_BB) -#define MAX_FUNCTION_NUMBER_K2 (MAX_NUM_PFS + MAX_NUM_VFS_K2) -#define MAX_FUNCTION_NUMBER_E4 (MAX_NUM_PFS + MAX_NUM_VFS_E4) -#define MAX_FUNCTION_NUMBER_E5 (MAX_NUM_PFS + MAX_NUM_VFS_E5) -#define COMMON_MAX_FUNCTION_NUMBER (MAX_NUM_PFS + MAX_NUM_VFS_E5) +#define MAX_FUNCTION_NUMBER_BB (MAX_NUM_PFS + MAX_NUM_VFS_BB) +#define MAX_FUNCTION_NUMBER_K2 (MAX_NUM_PFS + MAX_NUM_VFS_K2) +#define MAX_FUNCTION_NUMBER_E4 (MAX_NUM_PFS + MAX_NUM_VFS_E4) +#define MAX_FUNCTION_NUMBER_E5 (MAX_NUM_PFS + MAX_NUM_VFS_E5) +#define COMMON_MAX_FUNCTION_NUMBER (MAX_NUM_PFS + MAX_NUM_VFS_E5) -#define MAX_NUM_VPORTS_K2 (208) -#define MAX_NUM_VPORTS_BB (160) -#define MAX_NUM_VPORTS_E4 (MAX_NUM_VPORTS_K2) -#define MAX_NUM_VPORTS_E5 (256) -#define COMMON_MAX_NUM_VPORTS (MAX_NUM_VPORTS_E5) +#define MAX_NUM_VPORTS_K2 (208) +#define MAX_NUM_VPORTS_BB (160) +#define MAX_NUM_VPORTS_E4 (MAX_NUM_VPORTS_K2) +#define MAX_NUM_VPORTS_E5 (256) +#define COMMON_MAX_NUM_VPORTS (MAX_NUM_VPORTS_E5) -#define MAX_NUM_L2_QUEUES_K2 (320) #define MAX_NUM_L2_QUEUES_BB (256) -#define MAX_NUM_L2_QUEUES (MAX_NUM_L2_QUEUES_K2) +#define MAX_NUM_L2_QUEUES_K2 (320) +#define MAX_NUM_L2_QUEUES_E5 (320) /* TODO_E5_VITALY - fix to 512 */ +#define MAX_NUM_L2_QUEUES (MAX_NUM_L2_QUEUES_E5) /* Traffic classes in network-facing blocks (PBF, BTB, NIG, BRB, PRS and QM) */ -#define NUM_PHYS_TCS_4PORT_K2 (4) -#define NUM_PHYS_TCS_4PORT_E5 (6) -#define NUM_OF_PHYS_TCS (8) -#define PURE_LB_TC NUM_OF_PHYS_TCS -#define NUM_TCS_4PORT_K2 (NUM_PHYS_TCS_4PORT_K2 + 1) -#define NUM_TCS_4PORT_E5 (NUM_PHYS_TCS_4PORT_E5 + 1) -#define NUM_OF_TCS (NUM_OF_PHYS_TCS + 1) +#define NUM_PHYS_TCS_4PORT_K2 4 +#define NUM_PHYS_TCS_4PORT_TX_E5 6 +#define NUM_PHYS_TCS_4PORT_RX_E5 4 +#define NUM_OF_PHYS_TCS 8 +#define PURE_LB_TC NUM_OF_PHYS_TCS +#define NUM_TCS_4PORT_K2 (NUM_PHYS_TCS_4PORT_K2 + 1) +#define NUM_TCS_4PORT_TX_E5 (NUM_PHYS_TCS_4PORT_TX_E5 + 1) +#define NUM_TCS_4PORT_RX_E5 (NUM_PHYS_TCS_4PORT_RX_E5 + 1) +#define NUM_OF_TCS (NUM_OF_PHYS_TCS + 1) -/* Num of possible traffic priority values */ -#define NUM_OF_PRIO (8) - /* CIDs */ #define NUM_OF_CONNECTION_TYPES_E4 (8) #define NUM_OF_CONNECTION_TYPES_E5 (16) -#define NUM_OF_TASK_TYPES (8) -#define NUM_OF_LCIDS (320) -#define NUM_OF_LTIDS (320) +#define NUM_OF_TASK_TYPES (8) +#define NUM_OF_LCIDS (320) +#define NUM_OF_LTIDS (320) -/* Clock values */ -#define MASTER_CLK_FREQ_E4 (375e6) -#define STORM_CLK_FREQ_E4 (1000e6) -#define CLK25M_CLK_FREQ_E4 (25e6) - -#define STORM_CLK_DUAL_CORE_FREQ_E5 (3000e6) - /* Global PXP windows (GTT) */ -#define NUM_OF_GTT 19 -#define GTT_DWORD_SIZE_BITS 10 -#define GTT_BYTE_SIZE_BITS (GTT_DWORD_SIZE_BITS + 2) -#define GTT_DWORD_SIZE (1 << GTT_DWORD_SIZE_BITS) +#define NUM_OF_GTT 19 +#define GTT_DWORD_SIZE_BITS 10 +#define GTT_BYTE_SIZE_BITS (GTT_DWORD_SIZE_BITS + 2) +#define GTT_DWORD_SIZE (1 << GTT_DWORD_SIZE_BITS) /* Tools Version */ #define TOOLS_VERSION 10 @@ -417,7 +410,7 @@ /* Number of Protocol Indices per Status Block */ #define PIS_PER_SB_E4 12 #define PIS_PER_SB_E5 8 -#define MAX_PIS_PER_SB OSAL_MAX_T(u8, PIS_PER_SB_E4, PIS_PER_SB_E5) +#define MAX_PIS_PER_SB OSAL_MAX_T(PIS_PER_SB_E4,PIS_PER_SB_E5) #define CAU_HC_STOPPED_STATE 3 /* fsm is stopped or not valid for this sb */ @@ -548,10 +541,6 @@ /* VF BAR */ #define PXP_VF_BAR0 0 -#define PXP_VF_BAR0_START_GRC 0x3E00 -#define PXP_VF_BAR0_GRC_LENGTH 0x200 -#define PXP_VF_BAR0_END_GRC (PXP_VF_BAR0_START_GRC + PXP_VF_BAR0_GRC_LENGTH - 1) - #define PXP_VF_BAR0_START_IGU 0 #define PXP_VF_BAR0_IGU_LENGTH 0x3000 #define PXP_VF_BAR0_END_IGU (PXP_VF_BAR0_START_IGU + PXP_VF_BAR0_IGU_LENGTH - 1) @@ -582,9 +571,17 @@ #define PXP_VF_BAR0_START_PSDM_ZONE_B 0x3c00 #define PXP_VF_BAR0_END_PSDM_ZONE_B (PXP_VF_BAR0_START_PSDM_ZONE_B + PXP_VF_BAR0_SDM_LENGTH_ZONE_B - 1) +#define PXP_VF_BAR0_START_GRC 0x3E00 +#define PXP_VF_BAR0_GRC_LENGTH 0x200 +#define PXP_VF_BAR0_END_GRC (PXP_VF_BAR0_START_GRC + PXP_VF_BAR0_GRC_LENGTH - 1) + #define PXP_VF_BAR0_START_SDM_ZONE_A 0x4000 #define PXP_VF_BAR0_END_SDM_ZONE_A 0x10000 +#define PXP_VF_BAR0_START_IGU2 0x10000 +#define PXP_VF_BAR0_IGU2_LENGTH 0xD000 +#define PXP_VF_BAR0_END_IGU2 (PXP_VF_BAR0_START_IGU2 + PXP_VF_BAR0_IGU2_LENGTH - 1) + #define PXP_VF_BAR0_GRC_WINDOW_LENGTH 32 #define PXP_ILT_PAGE_SIZE_NUM_BITS_MIN 12 @@ -593,15 +590,16 @@ // ILT Records #define PXP_NUM_ILT_RECORDS_BB 7600 #define PXP_NUM_ILT_RECORDS_K2 11000 -#define MAX_NUM_ILT_RECORDS OSAL_MAX_T(u16, PXP_NUM_ILT_RECORDS_BB,PXP_NUM_ILT_RECORDS_K2) +#define MAX_NUM_ILT_RECORDS OSAL_MAX_T(PXP_NUM_ILT_RECORDS_BB,PXP_NUM_ILT_RECORDS_K2) +#define PXP_NUM_ILT_RECORDS_E5 13664 + // Host Interface -#define PXP_QUEUES_ZONE_MAX_NUM 320 +#define PXP_QUEUES_ZONE_MAX_NUM_E4 320 +#define PXP_QUEUES_ZONE_MAX_NUM_E5 512 - - /*****************/ /* PRM CONSTANTS */ /*****************/ @@ -651,18 +649,6 @@ #define PRS_GFT_CAM_LINES_NO_MATCH 31 /* - * Async data KCQ CQE - */ -struct async_data -{ - __le32 cid /* Context ID of the connection */; - __le16 itid /* Task Id of the task (for error that happened on a a task) */; - u8 error_code /* error code - relevant only if the opcode indicates its an error */; - u8 fw_debug_param /* internal fw debug parameter */; -}; - - -/* * Interrupt coalescing TimeSet */ struct coalescing_timeset @@ -692,24 +678,30 @@ struct eth_rx_prod_data }; -struct regpair +struct tcp_ulp_connect_done_params { - __le32 lo /* low word for reg-pair */; - __le32 hi /* high word for reg-pair */; + __le16 mss; + u8 snd_wnd_scale; + u8 flags; +#define TCP_ULP_CONNECT_DONE_PARAMS_TS_EN_MASK 0x1 +#define TCP_ULP_CONNECT_DONE_PARAMS_TS_EN_SHIFT 0 +#define TCP_ULP_CONNECT_DONE_PARAMS_RESERVED_MASK 0x7F +#define TCP_ULP_CONNECT_DONE_PARAMS_RESERVED_SHIFT 1 }; -/* - * Event Ring VF-PF Channel data - */ -struct vf_pf_channel_eqe_data +struct iscsi_connect_done_results { - struct regpair msg_addr /* VF-PF message address */; + __le16 icid /* Context ID of the connection */; + __le16 conn_id /* Driver connection ID */; + struct tcp_ulp_connect_done_params params /* decided tcp params after connect done */; }; + struct iscsi_eqe_data { - __le32 cid /* Context ID of the connection */; - __le16 conn_id /* Task Id of the task (for error that happened on a a task) */; + __le16 icid /* Context ID of the connection */; + __le16 conn_id /* Driver connection ID */; + __le16 reserved; u8 error_code /* error code - relevant only if the opcode indicates its an error */; u8 error_pdu_opcode_reserved; #define ISCSI_EQE_DATA_ERROR_PDU_OPCODE_MASK 0x3F /* The processed PDUs opcode on which happened the error - updated for specific error codes, by defualt=0xFF */ @@ -720,80 +712,8 @@ struct iscsi_eqe_data #define ISCSI_EQE_DATA_RESERVED0_SHIFT 7 }; -/* - * RoCE Destroy Event Data - */ -struct rdma_eqe_destroy_qp -{ - __le32 cid /* Dedicated field RoCE destroy QP event */; - u8 reserved[4]; -}; /* - * RDMA Event Data Union - */ -union rdma_eqe_data -{ - struct regpair async_handle /* Host handle for the Async Completions */; - struct rdma_eqe_destroy_qp rdma_destroy_qp_data /* RoCE Destroy Event Data */; -}; - -/* - * Event Ring malicious VF data - */ -struct malicious_vf_eqe_data -{ - u8 vf_id /* Malicious VF ID */; - u8 err_id /* Malicious VF error */; - __le16 reserved[3]; -}; - -/* - * Event Ring initial cleanup data - */ -struct initial_cleanup_eqe_data -{ - u8 vf_id /* VF ID */; - u8 reserved[7]; -}; - -/* - * Event Data Union - */ -union event_ring_data -{ - u8 bytes[8] /* Byte Array */; - struct vf_pf_channel_eqe_data vf_pf_channel /* VF-PF Channel data */; - struct iscsi_eqe_data iscsi_info /* Dedicated fields to iscsi data */; - union rdma_eqe_data rdma_data /* Dedicated field for RDMA data */; - struct malicious_vf_eqe_data malicious_vf /* Malicious VF data */; - struct initial_cleanup_eqe_data vf_init_cleanup /* VF Initial Cleanup data */; -}; - - -/* - * Event Ring Entry - */ -struct event_ring_entry -{ - u8 protocol_id /* Event Protocol ID */; - u8 opcode /* Event Opcode */; - __le16 reserved0 /* Reserved */; - __le16 echo /* Echo value from ramrod data on the host */; - u8 fw_return_code /* FW return code for SP ramrods */; - u8 flags; -#define EVENT_RING_ENTRY_ASYNC_MASK 0x1 /* 0: synchronous EQE - a completion of SP message. 1: asynchronous EQE */ -#define EVENT_RING_ENTRY_ASYNC_SHIFT 0 -#define EVENT_RING_ENTRY_RESERVED1_MASK 0x7F -#define EVENT_RING_ENTRY_RESERVED1_SHIFT 1 - union event_ring_data data; -}; - - - - - -/* * Multi function mode */ enum mf_mode @@ -824,9 +744,34 @@ enum protocol_type }; +struct regpair +{ + __le32 lo /* low word for reg-pair */; + __le32 hi /* high word for reg-pair */; +}; +/* + * RoCE Destroy Event Data + */ +struct rdma_eqe_destroy_qp +{ + __le32 cid /* Dedicated field RoCE destroy QP event */; + u8 reserved[4]; +}; /* + * RDMA Event Data Union + */ +union rdma_eqe_data +{ + struct regpair async_handle /* Host handle for the Async Completions */; + struct rdma_eqe_destroy_qp rdma_destroy_qp_data /* RoCE Destroy Event Data */; +}; + + + + +/* * Ustorm Queue Zone */ struct ustorm_eth_queue_zone @@ -843,7 +788,6 @@ struct ustorm_queue_zone }; - /* * status block structure */ @@ -894,6 +838,17 @@ struct cau_sb_entry /* + * Igu cleanup bit values to distinguish between clean or producer consumer update. + */ +enum command_type_bit +{ + IGU_COMMAND_TYPE_NOP=0, + IGU_COMMAND_TYPE_SET=1, + MAX_COMMAND_TYPE_BIT +}; + + +/* * core doorbell data */ struct core_db_data @@ -1339,90 +1294,74 @@ struct pxp_vf_zone_a_permission */ struct rdif_task_context { - __le32 initialRefTag; - __le16 appTagValue; - __le16 appTagMask; + __le32 initial_ref_tag; + __le16 app_tag_value; + __le16 app_tag_mask; u8 flags0; -#define RDIF_TASK_CONTEXT_IGNOREAPPTAG_MASK 0x1 -#define RDIF_TASK_CONTEXT_IGNOREAPPTAG_SHIFT 0 -#define RDIF_TASK_CONTEXT_INITIALREFTAGVALID_MASK 0x1 -#define RDIF_TASK_CONTEXT_INITIALREFTAGVALID_SHIFT 1 -#define RDIF_TASK_CONTEXT_HOSTGUARDTYPE_MASK 0x1 /* 0 = IP checksum, 1 = CRC */ -#define RDIF_TASK_CONTEXT_HOSTGUARDTYPE_SHIFT 2 -#define RDIF_TASK_CONTEXT_SETERRORWITHEOP_MASK 0x1 -#define RDIF_TASK_CONTEXT_SETERRORWITHEOP_SHIFT 3 -#define RDIF_TASK_CONTEXT_PROTECTIONTYPE_MASK 0x3 /* 1/2/3 - Protection Type */ -#define RDIF_TASK_CONTEXT_PROTECTIONTYPE_SHIFT 4 -#define RDIF_TASK_CONTEXT_CRC_SEED_MASK 0x1 /* 0=0x0000, 1=0xffff */ -#define RDIF_TASK_CONTEXT_CRC_SEED_SHIFT 6 -#define RDIF_TASK_CONTEXT_KEEPREFTAGCONST_MASK 0x1 /* Keep reference tag constant */ -#define RDIF_TASK_CONTEXT_KEEPREFTAGCONST_SHIFT 7 - u8 partialDifData[7]; - __le16 partialCrcValue; - __le16 partialChecksumValue; - __le32 offsetInIO; +#define RDIF_TASK_CONTEXT_IGNORE_APP_TAG_MASK 0x1 +#define RDIF_TASK_CONTEXT_IGNORE_APP_TAG_SHIFT 0 +#define RDIF_TASK_CONTEXT_INITIAL_REF_TAG_VALID_MASK 0x1 +#define RDIF_TASK_CONTEXT_INITIAL_REF_TAG_VALID_SHIFT 1 +#define RDIF_TASK_CONTEXT_HOST_GUARD_TYPE_MASK 0x1 /* 0 = IP checksum, 1 = CRC */ +#define RDIF_TASK_CONTEXT_HOST_GUARD_TYPE_SHIFT 2 +#define RDIF_TASK_CONTEXT_SET_ERROR_WITH_EOP_MASK 0x1 +#define RDIF_TASK_CONTEXT_SET_ERROR_WITH_EOP_SHIFT 3 +#define RDIF_TASK_CONTEXT_PROTECTION_TYPE_MASK 0x3 /* 1/2/3 - Protection Type */ +#define RDIF_TASK_CONTEXT_PROTECTION_TYPE_SHIFT 4 +#define RDIF_TASK_CONTEXT_CRC_SEED_MASK 0x1 /* 0=0x0000, 1=0xffff */ +#define RDIF_TASK_CONTEXT_CRC_SEED_SHIFT 6 +#define RDIF_TASK_CONTEXT_KEEP_REF_TAG_CONST_MASK 0x1 /* Keep reference tag constant */ +#define RDIF_TASK_CONTEXT_KEEP_REF_TAG_CONST_SHIFT 7 + u8 partial_dif_data[7]; + __le16 partial_crc_value; + __le16 partial_checksum_value; + __le32 offset_in_io; __le16 flags1; -#define RDIF_TASK_CONTEXT_VALIDATEGUARD_MASK 0x1 -#define RDIF_TASK_CONTEXT_VALIDATEGUARD_SHIFT 0 -#define RDIF_TASK_CONTEXT_VALIDATEAPPTAG_MASK 0x1 -#define RDIF_TASK_CONTEXT_VALIDATEAPPTAG_SHIFT 1 -#define RDIF_TASK_CONTEXT_VALIDATEREFTAG_MASK 0x1 -#define RDIF_TASK_CONTEXT_VALIDATEREFTAG_SHIFT 2 -#define RDIF_TASK_CONTEXT_FORWARDGUARD_MASK 0x1 -#define RDIF_TASK_CONTEXT_FORWARDGUARD_SHIFT 3 -#define RDIF_TASK_CONTEXT_FORWARDAPPTAG_MASK 0x1 -#define RDIF_TASK_CONTEXT_FORWARDAPPTAG_SHIFT 4 -#define RDIF_TASK_CONTEXT_FORWARDREFTAG_MASK 0x1 -#define RDIF_TASK_CONTEXT_FORWARDREFTAG_SHIFT 5 -#define RDIF_TASK_CONTEXT_INTERVALSIZE_MASK 0x7 /* 0=512B, 1=1KB, 2=2KB, 3=4KB, 4=8KB */ -#define RDIF_TASK_CONTEXT_INTERVALSIZE_SHIFT 6 -#define RDIF_TASK_CONTEXT_HOSTINTERFACE_MASK 0x3 /* 0=None, 1=DIF, 2=DIX */ -#define RDIF_TASK_CONTEXT_HOSTINTERFACE_SHIFT 9 -#define RDIF_TASK_CONTEXT_DIFBEFOREDATA_MASK 0x1 /* DIF tag right at the beginning of DIF interval */ -#define RDIF_TASK_CONTEXT_DIFBEFOREDATA_SHIFT 11 -#define RDIF_TASK_CONTEXT_RESERVED0_MASK 0x1 -#define RDIF_TASK_CONTEXT_RESERVED0_SHIFT 12 -#define RDIF_TASK_CONTEXT_NETWORKINTERFACE_MASK 0x1 /* 0=None, 1=DIF */ -#define RDIF_TASK_CONTEXT_NETWORKINTERFACE_SHIFT 13 -#define RDIF_TASK_CONTEXT_FORWARDAPPTAGWITHMASK_MASK 0x1 /* Forward application tag with mask */ -#define RDIF_TASK_CONTEXT_FORWARDAPPTAGWITHMASK_SHIFT 14 -#define RDIF_TASK_CONTEXT_FORWARDREFTAGWITHMASK_MASK 0x1 /* Forward reference tag with mask */ -#define RDIF_TASK_CONTEXT_FORWARDREFTAGWITHMASK_SHIFT 15 +#define RDIF_TASK_CONTEXT_VALIDATE_GUARD_MASK 0x1 +#define RDIF_TASK_CONTEXT_VALIDATE_GUARD_SHIFT 0 +#define RDIF_TASK_CONTEXT_VALIDATE_APP_TAG_MASK 0x1 +#define RDIF_TASK_CONTEXT_VALIDATE_APP_TAG_SHIFT 1 +#define RDIF_TASK_CONTEXT_VALIDATE_REF_TAG_MASK 0x1 +#define RDIF_TASK_CONTEXT_VALIDATE_REF_TAG_SHIFT 2 +#define RDIF_TASK_CONTEXT_FORWARD_GUARD_MASK 0x1 +#define RDIF_TASK_CONTEXT_FORWARD_GUARD_SHIFT 3 +#define RDIF_TASK_CONTEXT_FORWARD_APP_TAG_MASK 0x1 +#define RDIF_TASK_CONTEXT_FORWARD_APP_TAG_SHIFT 4 +#define RDIF_TASK_CONTEXT_FORWARD_REF_TAG_MASK 0x1 +#define RDIF_TASK_CONTEXT_FORWARD_REF_TAG_SHIFT 5 +#define RDIF_TASK_CONTEXT_INTERVAL_SIZE_MASK 0x7 /* 0=512B, 1=1KB, 2=2KB, 3=4KB, 4=8KB */ +#define RDIF_TASK_CONTEXT_INTERVAL_SIZE_SHIFT 6 +#define RDIF_TASK_CONTEXT_HOST_INTERFACE_MASK 0x3 /* 0=None, 1=DIF, 2=DIX */ +#define RDIF_TASK_CONTEXT_HOST_INTERFACE_SHIFT 9 +#define RDIF_TASK_CONTEXT_DIF_BEFORE_DATA_MASK 0x1 /* DIF tag right at the beginning of DIF interval */ +#define RDIF_TASK_CONTEXT_DIF_BEFORE_DATA_SHIFT 11 +#define RDIF_TASK_CONTEXT_RESERVED0_MASK 0x1 +#define RDIF_TASK_CONTEXT_RESERVED0_SHIFT 12 +#define RDIF_TASK_CONTEXT_NETWORK_INTERFACE_MASK 0x1 /* 0=None, 1=DIF */ +#define RDIF_TASK_CONTEXT_NETWORK_INTERFACE_SHIFT 13 +#define RDIF_TASK_CONTEXT_FORWARD_APP_TAG_WITH_MASK_MASK 0x1 /* Forward application tag with mask */ +#define RDIF_TASK_CONTEXT_FORWARD_APP_TAG_WITH_MASK_SHIFT 14 +#define RDIF_TASK_CONTEXT_FORWARD_REF_TAG_WITH_MASK_MASK 0x1 /* Forward reference tag with mask */ +#define RDIF_TASK_CONTEXT_FORWARD_REF_TAG_WITH_MASK_SHIFT 15 __le16 state; -#define RDIF_TASK_CONTEXT_RECEIVEDDIFBYTESLEFT_MASK 0xF -#define RDIF_TASK_CONTEXT_RECEIVEDDIFBYTESLEFT_SHIFT 0 -#define RDIF_TASK_CONTEXT_TRANSMITEDDIFBYTESLEFT_MASK 0xF -#define RDIF_TASK_CONTEXT_TRANSMITEDDIFBYTESLEFT_SHIFT 4 -#define RDIF_TASK_CONTEXT_ERRORINIO_MASK 0x1 -#define RDIF_TASK_CONTEXT_ERRORINIO_SHIFT 8 -#define RDIF_TASK_CONTEXT_CHECKSUMOVERFLOW_MASK 0x1 -#define RDIF_TASK_CONTEXT_CHECKSUMOVERFLOW_SHIFT 9 -#define RDIF_TASK_CONTEXT_REFTAGMASK_MASK 0xF /* mask for refernce tag handling */ -#define RDIF_TASK_CONTEXT_REFTAGMASK_SHIFT 10 -#define RDIF_TASK_CONTEXT_RESERVED1_MASK 0x3 -#define RDIF_TASK_CONTEXT_RESERVED1_SHIFT 14 +#define RDIF_TASK_CONTEXT_RECEIVED_DIF_BYTES_LEFT_MASK 0xF +#define RDIF_TASK_CONTEXT_RECEIVED_DIF_BYTES_LEFT_SHIFT 0 +#define RDIF_TASK_CONTEXT_TRANSMITED_DIF_BYTES_LEFT_MASK 0xF +#define RDIF_TASK_CONTEXT_TRANSMITED_DIF_BYTES_LEFT_SHIFT 4 +#define RDIF_TASK_CONTEXT_ERROR_IN_IO_MASK 0x1 +#define RDIF_TASK_CONTEXT_ERROR_IN_IO_SHIFT 8 +#define RDIF_TASK_CONTEXT_CHECKSUM_OVERFLOW_MASK 0x1 +#define RDIF_TASK_CONTEXT_CHECKSUM_OVERFLOW_SHIFT 9 +#define RDIF_TASK_CONTEXT_REF_TAG_MASK_MASK 0xF /* mask for refernce tag handling */ +#define RDIF_TASK_CONTEXT_REF_TAG_MASK_SHIFT 10 +#define RDIF_TASK_CONTEXT_RESERVED1_MASK 0x3 +#define RDIF_TASK_CONTEXT_RESERVED1_SHIFT 14 __le32 reserved2; }; /* - * RSS hash type - */ -enum rss_hash_type -{ - RSS_HASH_TYPE_DEFAULT=0, - RSS_HASH_TYPE_IPV4=1, - RSS_HASH_TYPE_TCP_IPV4=2, - RSS_HASH_TYPE_IPV6=3, - RSS_HASH_TYPE_TCP_IPV6=4, - RSS_HASH_TYPE_UDP_IPV4=5, - RSS_HASH_TYPE_UDP_IPV6=6, - MAX_RSS_HASH_TYPE -}; - - -/* * status block structure */ struct status_block_e4 @@ -1469,85 +1408,85 @@ struct status_block_e5 */ struct tdif_task_context { - __le32 initialRefTag; - __le16 appTagValue; - __le16 appTagMask; - __le16 partialCrcValueB; - __le16 partialChecksumValueB; + __le32 initial_ref_tag; + __le16 app_tag_value; + __le16 app_tag_mask; + __le16 partial_crc_value_b; + __le16 partial_checksum_value_b; __le16 stateB; -#define TDIF_TASK_CONTEXT_RECEIVEDDIFBYTESLEFTB_MASK 0xF -#define TDIF_TASK_CONTEXT_RECEIVEDDIFBYTESLEFTB_SHIFT 0 -#define TDIF_TASK_CONTEXT_TRANSMITEDDIFBYTESLEFTB_MASK 0xF -#define TDIF_TASK_CONTEXT_TRANSMITEDDIFBYTESLEFTB_SHIFT 4 -#define TDIF_TASK_CONTEXT_ERRORINIOB_MASK 0x1 -#define TDIF_TASK_CONTEXT_ERRORINIOB_SHIFT 8 -#define TDIF_TASK_CONTEXT_CHECKSUMOVERFLOW_MASK 0x1 -#define TDIF_TASK_CONTEXT_CHECKSUMOVERFLOW_SHIFT 9 -#define TDIF_TASK_CONTEXT_RESERVED0_MASK 0x3F -#define TDIF_TASK_CONTEXT_RESERVED0_SHIFT 10 +#define TDIF_TASK_CONTEXT_RECEIVED_DIF_BYTES_LEFT_B_MASK 0xF +#define TDIF_TASK_CONTEXT_RECEIVED_DIF_BYTES_LEFT_B_SHIFT 0 +#define TDIF_TASK_CONTEXT_TRANSMITED_DIF_BYTES_LEFT_B_MASK 0xF +#define TDIF_TASK_CONTEXT_TRANSMITED_DIF_BYTES_LEFT_B_SHIFT 4 +#define TDIF_TASK_CONTEXT_ERROR_IN_IO_B_MASK 0x1 +#define TDIF_TASK_CONTEXT_ERROR_IN_IO_B_SHIFT 8 +#define TDIF_TASK_CONTEXT_CHECKSUM_VERFLOW_MASK 0x1 +#define TDIF_TASK_CONTEXT_CHECKSUM_VERFLOW_SHIFT 9 +#define TDIF_TASK_CONTEXT_RESERVED0_MASK 0x3F +#define TDIF_TASK_CONTEXT_RESERVED0_SHIFT 10 u8 reserved1; u8 flags0; -#define TDIF_TASK_CONTEXT_IGNOREAPPTAG_MASK 0x1 -#define TDIF_TASK_CONTEXT_IGNOREAPPTAG_SHIFT 0 -#define TDIF_TASK_CONTEXT_INITIALREFTAGVALID_MASK 0x1 -#define TDIF_TASK_CONTEXT_INITIALREFTAGVALID_SHIFT 1 -#define TDIF_TASK_CONTEXT_HOSTGUARDTYPE_MASK 0x1 /* 0 = IP checksum, 1 = CRC */ -#define TDIF_TASK_CONTEXT_HOSTGUARDTYPE_SHIFT 2 -#define TDIF_TASK_CONTEXT_SETERRORWITHEOP_MASK 0x1 -#define TDIF_TASK_CONTEXT_SETERRORWITHEOP_SHIFT 3 -#define TDIF_TASK_CONTEXT_PROTECTIONTYPE_MASK 0x3 /* 1/2/3 - Protection Type */ -#define TDIF_TASK_CONTEXT_PROTECTIONTYPE_SHIFT 4 -#define TDIF_TASK_CONTEXT_CRC_SEED_MASK 0x1 /* 0=0x0000, 1=0xffff */ -#define TDIF_TASK_CONTEXT_CRC_SEED_SHIFT 6 -#define TDIF_TASK_CONTEXT_RESERVED2_MASK 0x1 -#define TDIF_TASK_CONTEXT_RESERVED2_SHIFT 7 +#define TDIF_TASK_CONTEXT_IGNORE_APP_TAG_MASK 0x1 +#define TDIF_TASK_CONTEXT_IGNORE_APP_TAG_SHIFT 0 +#define TDIF_TASK_CONTEXT_INITIAL_REF_TAG_VALID_MASK 0x1 +#define TDIF_TASK_CONTEXT_INITIAL_REF_TAG_VALID_SHIFT 1 +#define TDIF_TASK_CONTEXT_HOST_GUARD_TYPE_MASK 0x1 /* 0 = IP checksum, 1 = CRC */ +#define TDIF_TASK_CONTEXT_HOST_GUARD_TYPE_SHIFT 2 +#define TDIF_TASK_CONTEXT_SET_ERROR_WITH_EOP_MASK 0x1 +#define TDIF_TASK_CONTEXT_SET_ERROR_WITH_EOP_SHIFT 3 +#define TDIF_TASK_CONTEXT_PROTECTION_TYPE_MASK 0x3 /* 1/2/3 - Protection Type */ +#define TDIF_TASK_CONTEXT_PROTECTION_TYPE_SHIFT 4 +#define TDIF_TASK_CONTEXT_CRC_SEED_MASK 0x1 /* 0=0x0000, 1=0xffff */ +#define TDIF_TASK_CONTEXT_CRC_SEED_SHIFT 6 +#define TDIF_TASK_CONTEXT_RESERVED2_MASK 0x1 +#define TDIF_TASK_CONTEXT_RESERVED2_SHIFT 7 __le32 flags1; -#define TDIF_TASK_CONTEXT_VALIDATEGUARD_MASK 0x1 -#define TDIF_TASK_CONTEXT_VALIDATEGUARD_SHIFT 0 -#define TDIF_TASK_CONTEXT_VALIDATEAPPTAG_MASK 0x1 -#define TDIF_TASK_CONTEXT_VALIDATEAPPTAG_SHIFT 1 -#define TDIF_TASK_CONTEXT_VALIDATEREFTAG_MASK 0x1 -#define TDIF_TASK_CONTEXT_VALIDATEREFTAG_SHIFT 2 -#define TDIF_TASK_CONTEXT_FORWARDGUARD_MASK 0x1 -#define TDIF_TASK_CONTEXT_FORWARDGUARD_SHIFT 3 -#define TDIF_TASK_CONTEXT_FORWARDAPPTAG_MASK 0x1 -#define TDIF_TASK_CONTEXT_FORWARDAPPTAG_SHIFT 4 -#define TDIF_TASK_CONTEXT_FORWARDREFTAG_MASK 0x1 -#define TDIF_TASK_CONTEXT_FORWARDREFTAG_SHIFT 5 -#define TDIF_TASK_CONTEXT_INTERVALSIZE_MASK 0x7 /* 0=512B, 1=1KB, 2=2KB, 3=4KB, 4=8KB */ -#define TDIF_TASK_CONTEXT_INTERVALSIZE_SHIFT 6 -#define TDIF_TASK_CONTEXT_HOSTINTERFACE_MASK 0x3 /* 0=None, 1=DIF, 2=DIX */ -#define TDIF_TASK_CONTEXT_HOSTINTERFACE_SHIFT 9 -#define TDIF_TASK_CONTEXT_DIFBEFOREDATA_MASK 0x1 /* DIF tag right at the beginning of DIF interval */ -#define TDIF_TASK_CONTEXT_DIFBEFOREDATA_SHIFT 11 -#define TDIF_TASK_CONTEXT_RESERVED3_MASK 0x1 /* reserved */ -#define TDIF_TASK_CONTEXT_RESERVED3_SHIFT 12 -#define TDIF_TASK_CONTEXT_NETWORKINTERFACE_MASK 0x1 /* 0=None, 1=DIF */ -#define TDIF_TASK_CONTEXT_NETWORKINTERFACE_SHIFT 13 -#define TDIF_TASK_CONTEXT_RECEIVEDDIFBYTESLEFTA_MASK 0xF -#define TDIF_TASK_CONTEXT_RECEIVEDDIFBYTESLEFTA_SHIFT 14 -#define TDIF_TASK_CONTEXT_TRANSMITEDDIFBYTESLEFTA_MASK 0xF -#define TDIF_TASK_CONTEXT_TRANSMITEDDIFBYTESLEFTA_SHIFT 18 -#define TDIF_TASK_CONTEXT_ERRORINIOA_MASK 0x1 -#define TDIF_TASK_CONTEXT_ERRORINIOA_SHIFT 22 -#define TDIF_TASK_CONTEXT_CHECKSUMOVERFLOWA_MASK 0x1 -#define TDIF_TASK_CONTEXT_CHECKSUMOVERFLOWA_SHIFT 23 -#define TDIF_TASK_CONTEXT_REFTAGMASK_MASK 0xF /* mask for refernce tag handling */ -#define TDIF_TASK_CONTEXT_REFTAGMASK_SHIFT 24 -#define TDIF_TASK_CONTEXT_FORWARDAPPTAGWITHMASK_MASK 0x1 /* Forward application tag with mask */ -#define TDIF_TASK_CONTEXT_FORWARDAPPTAGWITHMASK_SHIFT 28 -#define TDIF_TASK_CONTEXT_FORWARDREFTAGWITHMASK_MASK 0x1 /* Forward reference tag with mask */ -#define TDIF_TASK_CONTEXT_FORWARDREFTAGWITHMASK_SHIFT 29 -#define TDIF_TASK_CONTEXT_KEEPREFTAGCONST_MASK 0x1 /* Keep reference tag constant */ -#define TDIF_TASK_CONTEXT_KEEPREFTAGCONST_SHIFT 30 -#define TDIF_TASK_CONTEXT_RESERVED4_MASK 0x1 -#define TDIF_TASK_CONTEXT_RESERVED4_SHIFT 31 - __le32 offsetInIOB; - __le16 partialCrcValueA; - __le16 partialChecksumValueA; - __le32 offsetInIOA; - u8 partialDifDataA[8]; - u8 partialDifDataB[8]; +#define TDIF_TASK_CONTEXT_VALIDATE_GUARD_MASK 0x1 +#define TDIF_TASK_CONTEXT_VALIDATE_GUARD_SHIFT 0 +#define TDIF_TASK_CONTEXT_VALIDATE_APP_TAG_MASK 0x1 +#define TDIF_TASK_CONTEXT_VALIDATE_APP_TAG_SHIFT 1 +#define TDIF_TASK_CONTEXT_VALIDATE_REF_TAG_MASK 0x1 +#define TDIF_TASK_CONTEXT_VALIDATE_REF_TAG_SHIFT 2 +#define TDIF_TASK_CONTEXT_FORWARD_GUARD_MASK 0x1 +#define TDIF_TASK_CONTEXT_FORWARD_GUARD_SHIFT 3 +#define TDIF_TASK_CONTEXT_FORWARD_APP_TAG_MASK 0x1 +#define TDIF_TASK_CONTEXT_FORWARD_APP_TAG_SHIFT 4 +#define TDIF_TASK_CONTEXT_FORWARD_REF_TAG_MASK 0x1 +#define TDIF_TASK_CONTEXT_FORWARD_REF_TAG_SHIFT 5 +#define TDIF_TASK_CONTEXT_INTERVAL_SIZE_MASK 0x7 /* 0=512B, 1=1KB, 2=2KB, 3=4KB, 4=8KB */ +#define TDIF_TASK_CONTEXT_INTERVAL_SIZE_SHIFT 6 +#define TDIF_TASK_CONTEXT_HOST_INTERFACE_MASK 0x3 /* 0=None, 1=DIF, 2=DIX */ +#define TDIF_TASK_CONTEXT_HOST_INTERFACE_SHIFT 9 +#define TDIF_TASK_CONTEXT_DIF_BEFORE_DATA_MASK 0x1 /* DIF tag right at the beginning of DIF interval */ +#define TDIF_TASK_CONTEXT_DIF_BEFORE_DATA_SHIFT 11 +#define TDIF_TASK_CONTEXT_RESERVED3_MASK 0x1 /* reserved */ +#define TDIF_TASK_CONTEXT_RESERVED3_SHIFT 12 +#define TDIF_TASK_CONTEXT_NETWORK_INTERFACE_MASK 0x1 /* 0=None, 1=DIF */ +#define TDIF_TASK_CONTEXT_NETWORK_INTERFACE_SHIFT 13 +#define TDIF_TASK_CONTEXT_RECEIVED_DIF_BYTES_LEFT_A_MASK 0xF +#define TDIF_TASK_CONTEXT_RECEIVED_DIF_BYTES_LEFT_A_SHIFT 14 +#define TDIF_TASK_CONTEXT_TRANSMITED_DIF_BYTES_LEFT_A_MASK 0xF +#define TDIF_TASK_CONTEXT_TRANSMITED_DIF_BYTES_LEFT_A_SHIFT 18 +#define TDIF_TASK_CONTEXT_ERROR_IN_IO_A_MASK 0x1 +#define TDIF_TASK_CONTEXT_ERROR_IN_IO_A_SHIFT 22 +#define TDIF_TASK_CONTEXT_CHECKSUM_OVERFLOW_A_MASK 0x1 +#define TDIF_TASK_CONTEXT_CHECKSUM_OVERFLOW_A_SHIFT 23 +#define TDIF_TASK_CONTEXT_REF_TAG_MASK_MASK 0xF /* mask for refernce tag handling */ +#define TDIF_TASK_CONTEXT_REF_TAG_MASK_SHIFT 24 +#define TDIF_TASK_CONTEXT_FORWARD_APP_TAG_WITH_MASK_MASK 0x1 /* Forward application tag with mask */ +#define TDIF_TASK_CONTEXT_FORWARD_APP_TAG_WITH_MASK_SHIFT 28 +#define TDIF_TASK_CONTEXT_FORWARD_REF_TAG_WITH_MASK_MASK 0x1 /* Forward reference tag with mask */ +#define TDIF_TASK_CONTEXT_FORWARD_REF_TAG_WITH_MASK_SHIFT 29 +#define TDIF_TASK_CONTEXT_KEEP_REF_TAG_CONST_MASK 0x1 /* Keep reference tag constant */ +#define TDIF_TASK_CONTEXT_KEEP_REF_TAG_CONST_SHIFT 30 +#define TDIF_TASK_CONTEXT_RESERVED4_MASK 0x1 +#define TDIF_TASK_CONTEXT_RESERVED4_SHIFT 31 + __le32 offset_in_io_b; + __le16 partial_crc_value_a; + __le16 partial_checksum_value_a; + __le32 offset_in_io_a; + u8 partial_dif_data_a[8]; + u8 partial_dif_data_b[8]; }; @@ -1602,7 +1541,7 @@ struct timers_context /* - * Enum for next_protocol field of tunnel_parsing_flags + * Enum for next_protocol field of tunnel_parsing_flags / tunnelTypeDesc */ enum tunnel_next_protocol { Modified: head/sys/dev/qlnx/qlnxe/ecore.h ============================================================================== --- head/sys/dev/qlnx/qlnxe/ecore.h Wed Jul 25 01:04:50 2018 (r336694) +++ head/sys/dev/qlnx/qlnxe/ecore.h Wed Jul 25 02:36:55 2018 (r336695) @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 Cavium, Inc. + * Copyright (c) 2017-2018 Cavium, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,6 +31,7 @@ #ifndef __ECORE_H #define __ECORE_H +#include "ecore_status.h" #include "ecore_hsi_common.h" #include "ecore_hsi_debug_tools.h" #include "ecore_hsi_init_func.h" @@ -39,8 +40,8 @@ #include "mcp_public.h" #define ECORE_MAJOR_VERSION 8 -#define ECORE_MINOR_VERSION 30 -#define ECORE_REVISION_VERSION 0 +#define ECORE_MINOR_VERSION 33 +#define ECORE_REVISION_VERSION 5 #define ECORE_ENGINEERING_VERSION 0 #define ECORE_VERSION \ @@ -58,6 +59,7 @@ /* Constants */ #define ECORE_WID_SIZE (1024) +#define ECORE_MIN_WIDS (4) /* Configurable */ #define ECORE_PF_DEMS_SIZE (4) @@ -80,11 +82,14 @@ enum ecore_nvm_cmd { ECORE_PHY_RAW_WRITE = DRV_MSG_CODE_PHY_RAW_WRITE, ECORE_PHY_CORE_READ = DRV_MSG_CODE_PHY_CORE_READ, ECORE_PHY_CORE_WRITE = DRV_MSG_CODE_PHY_CORE_WRITE, + ECORE_ENCRYPT_PASSWORD = DRV_MSG_CODE_ENCRYPT_PASSWORD, ECORE_GET_MCP_NVM_RESP = 0xFFFFFF00 }; +#ifndef LINUX_REMOVE #if !defined(CONFIG_ECORE_L2) && !defined(CONFIG_ECORE_ROCE) && \ - !defined(CONFIG_ECORE_FCOE) && !defined(CONFIG_ECORE_ISCSI) + !defined(CONFIG_ECORE_FCOE) && !defined(CONFIG_ECORE_ISCSI) && \ + !defined(CONFIG_ECORE_IWARP) #define CONFIG_ECORE_L2 #define CONFIG_ECORE_SRIOV #define CONFIG_ECORE_ROCE @@ -93,8 +98,10 @@ enum ecore_nvm_cmd { #define CONFIG_ECORE_ISCSI #define CONFIG_ECORE_LL2 #endif +#endif /* helpers */ +#ifndef __EXTRACT__LINUX__IF__ #define MASK_FIELD(_name, _value) \ ((_value) &= (_name##_MASK)) @@ -115,9 +122,10 @@ do { \ #define SET_MFW_FIELD(name, field, value) \ do { \ - (name) &= ~((field ## _MASK) << (field ## _OFFSET)); \ + (name) &= ~(field ## _MASK); \ (name) |= (((value) << (field ## _OFFSET)) & (field ## _MASK)); \ } while (0) +#endif static OSAL_INLINE u32 DB_ADDR(u32 cid, u32 DEMS) { @@ -139,6 +147,7 @@ static OSAL_INLINE u32 DB_ADDR_VF(u32 cid, u32 DEMS) ((sizeof(type_name) + (u32)(1<<(p_hwfn->p_dev->cache_shift))-1) & \ ~((1<<(p_hwfn->p_dev->cache_shift))-1)) +#ifndef LINUX_REMOVE #ifndef U64_HI #define U64_HI(val) ((u32)(((u64)(val)) >> 32)) #endif @@ -146,7 +155,9 @@ static OSAL_INLINE u32 DB_ADDR_VF(u32 cid, u32 DEMS) #ifndef U64_LO #define U64_LO(val) ((u32)(((u64)(val)) & 0xffffffff)) #endif +#endif +#ifndef __EXTRACT__LINUX__IF__ #ifndef UEFI /* Debug print definitions */ #define DP_ERR(p_dev, fmt, ...) \ @@ -203,6 +214,7 @@ enum DP_LEVEL { #define ECORE_LOG_NOTICE_MASK (0x80000000) enum DP_MODULE { +#ifndef LINUX_REMOVE ECORE_MSG_DRV = 0x0001, ECORE_MSG_PROBE = 0x0002, ECORE_MSG_LINK = 0x0004, @@ -218,6 +230,7 @@ enum DP_MODULE { ECORE_MSG_PKTDATA = 0x1000, ECORE_MSG_HW = 0x2000, ECORE_MSG_WOL = 0x4000, +#endif ECORE_MSG_SPQ = 0x10000, ECORE_MSG_STATS = 0x20000, ECORE_MSG_DCB = 0x40000, @@ -232,6 +245,7 @@ enum DP_MODULE { ECORE_MSG_DEBUG = 0x8000000, /* to be added...up to 0x8000000 */ }; +#endif #define for_each_hwfn(p_dev, i) for (i = 0; i < p_dev->num_hwfns; i++) @@ -252,6 +266,7 @@ struct ecore_l2_info; struct ecore_igu_info; struct ecore_mcp_info; struct ecore_dcbx_info; +struct ecore_llh_info; struct ecore_rt_data { u32 *init_val; @@ -321,6 +336,15 @@ struct ecore_qm_iids { u32 tids; }; +/* The PCI relax ordering is either taken care by management FW or can be + * enable/disable by ecore client. + */ +enum ecore_pci_rlx_odr { + ECORE_DEFAULT_RLX_ODR, + ECORE_ENABLE_RLX_ODR, + ECORE_DISABLE_RLX_ODR +}; + #define MAX_PF_PER_PORT 8 /* HW / FW resources, output of features supported below, most information @@ -387,6 +411,7 @@ enum ecore_dev_cap { ECORE_DEV_CAP_IWARP }; +#ifndef __EXTRACT__LINUX__IF__ enum ecore_hw_err_type { ECORE_HW_ERR_FAN_FAIL, ECORE_HW_ERR_MFW_RESP_FAIL, @@ -395,6 +420,7 @@ enum ecore_hw_err_type { ECORE_HW_ERR_RAMROD_FAIL, ECORE_HW_ERR_FW_ASSERT, }; +#endif *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Wed Jul 25 03:24: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 DD596103C4DA; Wed, 25 Jul 2018 03:24: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 93B0E8C929; Wed, 25 Jul 2018 03:24:05 +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 74D7414C1E; Wed, 25 Jul 2018 03:24:05 +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 w6P3O50b073734; Wed, 25 Jul 2018 03:24:05 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6P3O5OS073733; Wed, 25 Jul 2018 03:24:05 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201807250324.w6P3O5OS073733@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 25 Jul 2018 03:24:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336697 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 336697 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: Wed, 25 Jul 2018 03:24:06 -0000 Author: eadler Date: Wed Jul 25 03:24:05 2018 New Revision: 336697 URL: https://svnweb.freebsd.org/changeset/base/336697 Log: bsd-family-tree: Announce NetBSD 8.0 Obtained from: https://www.netbsd.org/releases/formal-8/ Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Wed Jul 25 03:08:11 2018 (r336696) +++ head/share/misc/bsd-family-tree Wed Jul 25 03:24:05 2018 (r336697) @@ -372,11 +372,11 @@ FreeBSD 5.2 | | | | | | | | | | | | | | | | DragonFly 5.2.1 | | | | | | | - | | | | v | DragonFly 5.2.2 - | FreeBSD | | | | - | 11.2 | | | | - | v | | | | - | | | | | + | | | | | | DragonFly 5.2.2 + | FreeBSD | | NetBSD 8.0 | | + | 11.2 | | | | | + | v | | | | | + | | | v | | FreeBSD 12 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | v v v v v @@ -751,6 +751,7 @@ 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] +NetBSD 8.0 2018-08-17 [NBD] Bibliography ------------------------ From owner-svn-src-head@freebsd.org Wed Jul 25 03: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 8C307103C6DB; Wed, 25 Jul 2018 03:29: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 34A7C8CBD6; Wed, 25 Jul 2018 03:29:30 +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 109F014C39; Wed, 25 Jul 2018 03:29:30 +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 w6P3TTHF074021; Wed, 25 Jul 2018 03:29:29 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6P3TTWe074020; Wed, 25 Jul 2018 03:29:29 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201807250329.w6P3TTWe074020@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 25 Jul 2018 03:29:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336698 - head/share/misc X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/share/misc X-SVN-Commit-Revision: 336698 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: Wed, 25 Jul 2018 03:29:30 -0000 Author: eadler Date: Wed Jul 25 03:29:29 2018 New Revision: 336698 URL: https://svnweb.freebsd.org/changeset/base/336698 Log: bsd-family-tree: Announce NetBSD 8.0 Use the correct date... Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Wed Jul 25 03:24:05 2018 (r336697) +++ head/share/misc/bsd-family-tree Wed Jul 25 03:29:29 2018 (r336698) @@ -751,7 +751,7 @@ 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] -NetBSD 8.0 2018-08-17 [NBD] +NetBSD 8.0 2018-07-17 [NBD] Bibliography ------------------------ From owner-svn-src-head@freebsd.org Wed Jul 25 03:42: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 C71E1103CDFE; Wed, 25 Jul 2018 03:42:08 +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 7DA538D697; Wed, 25 Jul 2018 03:42:08 +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 5EC4114E7F; Wed, 25 Jul 2018 03:42:08 +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 w6P3g8vX084211; Wed, 25 Jul 2018 03:42:08 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6P3g8vu084209; Wed, 25 Jul 2018 03:42:08 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201807250342.w6P3g8vu084209@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 25 Jul 2018 03:42:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336700 - head/usr.bin/find X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/usr.bin/find X-SVN-Commit-Revision: 336700 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: Wed, 25 Jul 2018 03:42:09 -0000 Author: eadler Date: Wed Jul 25 03:42:07 2018 New Revision: 336700 URL: https://svnweb.freebsd.org/changeset/base/336700 Log: find(1): remove empty else condition reported by: brooks Modified: head/usr.bin/find/find.c head/usr.bin/find/misc.c Modified: head/usr.bin/find/find.c ============================================================================== --- head/usr.bin/find/find.c Wed Jul 25 03:30:01 2018 (r336699) +++ head/usr.bin/find/find.c Wed Jul 25 03:42:07 2018 (r336700) @@ -34,7 +34,6 @@ #if 0 static char sccsid[] = "@(#)find.c 8.5 (Berkeley) 8/5/94"; -#else #endif #include Modified: head/usr.bin/find/misc.c ============================================================================== --- head/usr.bin/find/misc.c Wed Jul 25 03:30:01 2018 (r336699) +++ head/usr.bin/find/misc.c Wed Jul 25 03:42:07 2018 (r336700) @@ -34,7 +34,6 @@ #if 0 static char sccsid[] = "@(#)misc.c 8.2 (Berkeley) 4/1/94"; -#else #endif #include From owner-svn-src-head@freebsd.org Wed Jul 25 13:27: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 7BAEE104B136; Wed, 25 Jul 2018 13:27:21 +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 31C9D7E028; Wed, 25 Jul 2018 13:27:21 +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 1452A1AC77; Wed, 25 Jul 2018 13:27:21 +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 w6PDRKm7080822; Wed, 25 Jul 2018 13:27:20 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6PDRKVs080820; Wed, 25 Jul 2018 13:27:20 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201807251327.w6PDRKVs080820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 25 Jul 2018 13:27:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336706 - in head/usr.sbin/makefs: . msdos X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/usr.sbin/makefs: . msdos X-SVN-Commit-Revision: 336706 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: Wed, 25 Jul 2018 13:27:21 -0000 Author: emaste Date: Wed Jul 25 13:27:20 2018 New Revision: 336706 URL: https://svnweb.freebsd.org/changeset/base/336706 Log: makefs: whitespace cleanup in msdos files Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/makefs/msdos.c head/usr.sbin/makefs/msdos/msdosfs_vfsops.c head/usr.sbin/makefs/msdos/msdosfs_vnops.c Modified: head/usr.sbin/makefs/msdos.c ============================================================================== --- head/usr.sbin/makefs/msdos.c Wed Jul 25 09:40:11 2018 (r336705) +++ head/usr.sbin/makefs/msdos.c Wed Jul 25 13:27:20 2018 (r336706) @@ -75,7 +75,7 @@ msdos_prep_opts(fsinfo_t *fsopts) { struct msdos_options_ex *msdos_opt = ecalloc(1, sizeof(*msdos_opt)); const option_t msdos_options[] = { -#define AOPT(_opt, _type, _name, _min, _desc) { \ +#define AOPT(_opt, _type, _name, _min, _desc) { \ .letter = _opt, \ .name = # _name, \ .type = _min == -1 ? OPT_STRPTR : \ @@ -91,7 +91,7 @@ msdos_prep_opts(fsinfo_t *fsopts) .desc = _desc, \ }, ALLOPTS -#undef AOPT +#undef AOPT { 'U', "utf8", &msdos_opt->utf8, OPT_BOOL, 0, 1, "Use UTF8 names" }, { .name = NULL } @@ -169,7 +169,7 @@ msdos_makefs(const char *image, const char *dir, fsnod fsopts->sectorsize = msdos_opt->options.bytes_per_sector; } else if (fsopts->sectorsize != msdos_opt->options.bytes_per_sector) { err(1, "inconsistent sectorsize -S %u" - "!= -o bytes_per_sector %u", + "!= -o bytes_per_sector %u", fsopts->sectorsize, msdos_opt->options.bytes_per_sector); } @@ -223,8 +223,8 @@ msdos_populate_dir(const char *path, struct denode *di assert(dir != NULL); assert(root != NULL); - assert(fsopts != NULL); - + assert(fsopts != NULL); + for (cur = root->next; cur != NULL; cur = cur->next) { if ((size_t)snprintf(pbuf, sizeof(pbuf), "%s/%s", path, cur->name) >= sizeof(pbuf)) { Modified: head/usr.sbin/makefs/msdos/msdosfs_vfsops.c ============================================================================== --- head/usr.sbin/makefs/msdos/msdosfs_vfsops.c Wed Jul 25 09:40:11 2018 (r336705) +++ head/usr.sbin/makefs/msdos/msdosfs_vfsops.c Wed Jul 25 13:27:20 2018 (r336706) @@ -108,7 +108,7 @@ msdosfs_mount(struct vnode *devvp, int flags) if (!(flags & MSDOSFSMNT_GEMDOSFS)) { if (bsp->bs50.bsBootSectSig0 != BOOTSIG0 || bsp->bs50.bsBootSectSig1 != BOOTSIG1) { - DPRINTF(("bootsig0 %d bootsig1 %d\n", + DPRINTF(("bootsig0 %d bootsig1 %d\n", bsp->bs50.bsBootSectSig0, bsp->bs50.bsBootSectSig1)); error = EINVAL; @@ -142,10 +142,10 @@ msdosfs_mount(struct vnode *devvp, int flags) pmp->pm_SecPerTrack, pmp->pm_Heads, pmp->pm_Media)); if (!(flags & MSDOSFSMNT_GEMDOSFS)) { /* XXX - We should probably check more values here */ - if (!pmp->pm_BytesPerSec || !SecPerClust - || pmp->pm_SecPerTrack > 63) { + if (!pmp->pm_BytesPerSec || !SecPerClust + || pmp->pm_SecPerTrack > 63) { DPRINTF(("bytespersec %d secperclust %d " - "secpertrack %d\n", + "secpertrack %d\n", pmp->pm_BytesPerSec, SecPerClust, pmp->pm_SecPerTrack)); error = EINVAL; @@ -317,7 +317,7 @@ msdosfs_mount(struct vnode *devvp, int flags) * must be a power of 2 */ if (pmp->pm_bpcluster ^ (1 << pmp->pm_cnshift)) { - DPRINTF(("bpcluster %lu cnshift %lu\n", + DPRINTF(("bpcluster %lu cnshift %lu\n", pmp->pm_bpcluster, pmp->pm_cnshift)); error = EINVAL; goto error_exit; Modified: head/usr.sbin/makefs/msdos/msdosfs_vnops.c ============================================================================== --- head/usr.sbin/makefs/msdos/msdosfs_vnops.c Wed Jul 25 09:40:11 2018 (r336705) +++ head/usr.sbin/makefs/msdos/msdosfs_vnops.c Wed Jul 25 13:27:20 2018 (r336706) @@ -101,7 +101,7 @@ msdosfs_times(struct msdosfsmount *pmp, struct denode struct timespec at; struct timespec mt; - if (stampst.st_ino) + if (stampst.st_ino) st = &stampst; #ifndef HAVE_NBTOOL_CONFIG_H @@ -133,7 +133,7 @@ msdosfs_times(struct msdosfsmount *pmp, struct denode * memory denode's will be in synch. */ static int -msdosfs_findslot(struct denode *dp, struct componentname *cnp) +msdosfs_findslot(struct denode *dp, struct componentname *cnp) { daddr_t bn; int error; @@ -494,7 +494,7 @@ msdosfs_wfile(const char *path, struct denode *dep, fs 0, &bp)) != 0) { DPRINTF(("bread %d\n", error)); goto out; - } + } cpsize = MIN((nsize - offs), blsize - on); memcpy((char *)bp->b_data + on, dat + offs, cpsize); bwrite(bp); From owner-svn-src-head@freebsd.org Wed Jul 25 14:05: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 DF281104BE5A; Wed, 25 Jul 2018 14:05:18 +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 7E9937F9E6; Wed, 25 Jul 2018 14:05:18 +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 5D6DA1B2D4; Wed, 25 Jul 2018 14:05:18 +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 w6PE5I7J001398; Wed, 25 Jul 2018 14:05:18 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6PE5Inf001397; Wed, 25 Jul 2018 14:05:18 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201807251405.w6PE5Inf001397@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Wed, 25 Jul 2018 14:05:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336707 - 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: 336707 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: Wed, 25 Jul 2018 14:05:19 -0000 Author: eadler Date: Wed Jul 25 14:05:17 2018 New Revision: 336707 URL: https://svnweb.freebsd.org/changeset/base/336707 Log: top(1): increase number of columns for memory The original intention was 4 columns but with a usable a result. In practice this was not the case. Increase the number of columns to 5 until humanize_number learns alternative ways of presenting the number. Requested by: many Ref D15801 Modified: head/usr.bin/top/machine.c head/usr.bin/top/utils.c Modified: head/usr.bin/top/machine.c ============================================================================== --- head/usr.bin/top/machine.c Wed Jul 25 13:27:20 2018 (r336706) +++ head/usr.bin/top/machine.c Wed Jul 25 14:05:17 2018 (r336707) @@ -388,7 +388,7 @@ format_header(const char *uname_field) sbuf_printf(header, "%*s", ps.jail ? TOP_JID_LEN : 0, ps.jail ? " JID" : ""); sbuf_printf(header, " %-*.*s ", namelength, namelength, uname_field); - sbuf_cat(header, "THR PRI NICE SIZE RES "); + sbuf_cat(header, "THR PRI NICE SIZE RES "); if (ps.swap) { sbuf_printf(header, "%*s ", TOP_SWAP_LEN - 1, "SWAP"); } @@ -1064,8 +1064,8 @@ format_next_process(struct handle * xhandle, char *(*g sbuf_printf(procbuf, "%3d ", pp->ki_pri.pri_level - PZERO); sbuf_printf(procbuf, "%4s", format_nice(pp)); - sbuf_printf(procbuf, "%6s ", format_k(PROCSIZE(pp))); - sbuf_printf(procbuf, "%5s ", format_k(pagetok(pp->ki_rssize))); + sbuf_printf(procbuf, "%7s ", format_k(PROCSIZE(pp))); + sbuf_printf(procbuf, "%6s ", format_k(pagetok(pp->ki_rssize))); if (ps.swap) { sbuf_printf(procbuf, "%*s ", TOP_SWAP_LEN - 1, Modified: head/usr.bin/top/utils.c ============================================================================== --- head/usr.bin/top/utils.c Wed Jul 25 13:27:20 2018 (r336706) +++ head/usr.bin/top/utils.c Wed Jul 25 14:05:17 2018 (r336707) @@ -297,7 +297,7 @@ format_k(int64_t amt) ret = retarray[index]; index = (index + 1) % NUM_STRINGS; - humanize_number(ret, 5, amt * 1024, "", HN_AUTOSCALE, HN_NOSPACE); + humanize_number(ret, 6, amt * 1024, "", HN_AUTOSCALE, HN_NOSPACE); return (ret); } From owner-svn-src-head@freebsd.org Wed Jul 25 15:44: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 C283F104E2AA; Wed, 25 Jul 2018 15:44:50 +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 7715083023; Wed, 25 Jul 2018 15:44:50 +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 583441C2C3; Wed, 25 Jul 2018 15:44:50 +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 w6PFiow0052886; Wed, 25 Jul 2018 15:44:50 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6PFio6W052885; Wed, 25 Jul 2018 15:44:50 GMT (envelope-from br@FreeBSD.org) Message-Id: <201807251544.w6PFio6W052885@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Wed, 25 Jul 2018 15:44:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336712 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: br X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 336712 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: Wed, 25 Jul 2018 15:44:50 -0000 Author: br Date: Wed Jul 25 15:44:49 2018 New Revision: 336712 URL: https://svnweb.freebsd.org/changeset/base/336712 Log: Remove unused string. Reported by: markj@ Sponsored by: DARPA, AFRL Modified: head/sys/riscv/riscv/swtch.S Modified: head/sys/riscv/riscv/swtch.S ============================================================================== --- head/sys/riscv/riscv/swtch.S Wed Jul 25 15:40:27 2018 (r336711) +++ head/sys/riscv/riscv/swtch.S Wed Jul 25 15:44:49 2018 (r336712) @@ -208,8 +208,6 @@ ENTRY(cpu_throw) #endif ret -.Lcpu_throw_panic_str: - .asciz "cpu_throw: %p\0" END(cpu_throw) /* From owner-svn-src-head@freebsd.org Wed Jul 25 15:58: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 C645D104E59D; Wed, 25 Jul 2018 15:58: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 79A1B83691; Wed, 25 Jul 2018 15:58: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 569C51C461; Wed, 25 Jul 2018 15:58: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 w6PFwFbQ057941; Wed, 25 Jul 2018 15:58:15 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6PFwFB8057940; Wed, 25 Jul 2018 15:58:15 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201807251558.w6PFwFB8057940@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 25 Jul 2018 15:58:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336714 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 336714 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: Wed, 25 Jul 2018 15:58:16 -0000 Author: markj Date: Wed Jul 25 15:58:14 2018 New Revision: 336714 URL: https://svnweb.freebsd.org/changeset/base/336714 Log: Simplify the arm64 implementation of pmap_mincore(). No functional change intended. Reviewed by: alc MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D16427 Modified: head/sys/arm64/arm64/pmap.c Modified: head/sys/arm64/arm64/pmap.c ============================================================================== --- head/sys/arm64/arm64/pmap.c Wed Jul 25 15:45:42 2018 (r336713) +++ head/sys/arm64/arm64/pmap.c Wed Jul 25 15:58:14 2018 (r336714) @@ -5074,76 +5074,45 @@ pmap_demote_l2(pmap_t pmap, pt_entry_t *l2, vm_offset_ int pmap_mincore(pmap_t pmap, vm_offset_t addr, vm_paddr_t *locked_pa) { - pd_entry_t *l1p, l1; - pd_entry_t *l2p, l2; - pt_entry_t *l3p, l3; - vm_paddr_t pa; + pt_entry_t *pte, tpte; + vm_paddr_t mask, pa; + int lvl, val; bool managed; - int val; PMAP_LOCK(pmap); retry: - pa = 0; val = 0; - managed = false; + pte = pmap_pte(pmap, addr, &lvl); + if (pte != NULL) { + tpte = pmap_load(pte); - l1p = pmap_l1(pmap, addr); - if (l1p == NULL) /* No l1 */ - goto done; + switch (lvl) { + case 3: + mask = L3_OFFSET; + break; + case 2: + mask = L2_OFFSET; + break; + case 1: + mask = L1_OFFSET; + break; + default: + panic("pmap_mincore: invalid level %d", lvl); + } - l1 = pmap_load(l1p); - if ((l1 & ATTR_DESCR_MASK) == L1_INVAL) - goto done; - - if ((l1 & ATTR_DESCR_MASK) == L1_BLOCK) { - pa = (l1 & ~ATTR_MASK) | (addr & L1_OFFSET); - managed = (l1 & ATTR_SW_MANAGED) == ATTR_SW_MANAGED; - val = MINCORE_SUPER | MINCORE_INCORE; - if (pmap_page_dirty(l1)) - val |= MINCORE_MODIFIED | MINCORE_MODIFIED_OTHER; - if ((l1 & ATTR_AF) == ATTR_AF) - val |= MINCORE_REFERENCED | MINCORE_REFERENCED_OTHER; - goto done; - } - - l2p = pmap_l1_to_l2(l1p, addr); - if (l2p == NULL) /* No l2 */ - goto done; - - l2 = pmap_load(l2p); - if ((l2 & ATTR_DESCR_MASK) == L2_INVAL) - goto done; - - if ((l2 & ATTR_DESCR_MASK) == L2_BLOCK) { - pa = (l2 & ~ATTR_MASK) | (addr & L2_OFFSET); - managed = (l2 & ATTR_SW_MANAGED) == ATTR_SW_MANAGED; - val = MINCORE_SUPER | MINCORE_INCORE; - if (pmap_page_dirty(l2)) - val |= MINCORE_MODIFIED | MINCORE_MODIFIED_OTHER; - if ((l2 & ATTR_AF) == ATTR_AF) - val |= MINCORE_REFERENCED | MINCORE_REFERENCED_OTHER; - goto done; - } - - l3p = pmap_l2_to_l3(l2p, addr); - if (l3p == NULL) /* No l3 */ - goto done; - - l3 = pmap_load(l2p); - if ((l3 & ATTR_DESCR_MASK) == L3_INVAL) - goto done; - - if ((l3 & ATTR_DESCR_MASK) == L3_PAGE) { - pa = (l3 & ~ATTR_MASK) | (addr & L3_OFFSET); - managed = (l3 & ATTR_SW_MANAGED) == ATTR_SW_MANAGED; val = MINCORE_INCORE; - if (pmap_page_dirty(l3)) + if (lvl != 3) + val |= MINCORE_SUPER; + if (pmap_page_dirty(tpte)) val |= MINCORE_MODIFIED | MINCORE_MODIFIED_OTHER; - if ((l3 & ATTR_AF) == ATTR_AF) + if ((tpte & ATTR_AF) == ATTR_AF) val |= MINCORE_REFERENCED | MINCORE_REFERENCED_OTHER; - } -done: + managed = (tpte & ATTR_SW_MANAGED) == ATTR_SW_MANAGED; + pa = (tpte & ~ATTR_MASK) | (addr & mask); + } else + managed = false; + if ((val & (MINCORE_MODIFIED_OTHER | MINCORE_REFERENCED_OTHER)) != (MINCORE_MODIFIED_OTHER | MINCORE_REFERENCED_OTHER) && managed) { /* Ensure that "PHYS_TO_VM_PAGE(pa)->object" doesn't change. */ From owner-svn-src-head@freebsd.org Wed Jul 25 16:07: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 2CF8E104E937; Wed, 25 Jul 2018 16:07:37 +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 CEB0083D11; Wed, 25 Jul 2018 16:07:36 +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 ACACB1C603; Wed, 25 Jul 2018 16:07:36 +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 w6PG7alF062878; Wed, 25 Jul 2018 16:07:36 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6PG7aBo062875; Wed, 25 Jul 2018 16:07:36 GMT (envelope-from br@FreeBSD.org) Message-Id: <201807251607.w6PG7aBo062875@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Wed, 25 Jul 2018 16:07:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336716 - in head: share/mk stand sys/conf X-SVN-Group: head X-SVN-Commit-Author: br X-SVN-Commit-Paths: in head: share/mk stand sys/conf X-SVN-Commit-Revision: 336716 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: Wed, 25 Jul 2018 16:07:37 -0000 Author: br Date: Wed Jul 25 16:07:35 2018 New Revision: 336716 URL: https://svnweb.freebsd.org/changeset/base/336716 Log: Disable 'C'-compressed ISA extension. It works excellent, but KDB disassembler and DTrace FBT provider for RISC-V do lack support for it. They currently handle 4-byte instructions only, while C-compressed ISA extension introduces 2-byte instructions freely mixing them together. So disable it for now. Reviewed by: markj@ Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D16436 Modified: head/share/mk/bsd.cpu.mk head/stand/defs.mk head/sys/conf/kern.mk Modified: head/share/mk/bsd.cpu.mk ============================================================================== --- head/share/mk/bsd.cpu.mk Wed Jul 25 16:00:48 2018 (r336715) +++ head/share/mk/bsd.cpu.mk Wed Jul 25 16:07:35 2018 (r336716) @@ -367,9 +367,9 @@ CFLAGS += -mcpu=8540 -Wa,-me500 -mspe=yes -mabi=spe -m .if ${MACHINE_CPUARCH} == "riscv" .if ${MACHINE_ARCH:Mriscv*sf} -CFLAGS += -march=rv64imac -mabi=lp64 +CFLAGS += -march=rv64ima -mabi=lp64 .else -CFLAGS += -march=rv64imafdc -mabi=lp64d +CFLAGS += -march=rv64imafd -mabi=lp64d .endif .endif Modified: head/stand/defs.mk ============================================================================== --- head/stand/defs.mk Wed Jul 25 16:00:48 2018 (r336715) +++ head/stand/defs.mk Wed Jul 25 16:07:35 2018 (r336716) @@ -103,7 +103,7 @@ CFLAGS+= -ffreestanding ${CFLAGS_NO_SIMD} .if ${MACHINE_CPUARCH} == "aarch64" CFLAGS+= -mgeneral-regs-only -fPIC .elif ${MACHINE_CPUARCH} == "riscv" -CFLAGS+= -march=rv64imac -mabi=lp64 +CFLAGS+= -march=rv64ima -mabi=lp64 .else CFLAGS+= -msoft-float .endif Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Wed Jul 25 16:00:48 2018 (r336715) +++ head/sys/conf/kern.mk Wed Jul 25 16:07:35 2018 (r336716) @@ -131,7 +131,7 @@ INLINE_LIMIT?= 8000 .endif .if ${MACHINE_CPUARCH} == "riscv" -CFLAGS.gcc+= -mcmodel=medany -march=rv64imafdc -mabi=lp64 +CFLAGS.gcc+= -mcmodel=medany -march=rv64imafd -mabi=lp64 INLINE_LIMIT?= 8000 .endif From owner-svn-src-head@freebsd.org Wed Jul 25 17:14: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 6D21210500A9; Wed, 25 Jul 2018 17:14:06 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 144DD85D1B; Wed, 25 Jul 2018 17:14:06 +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 CAFF81D184; Wed, 25 Jul 2018 17:14:05 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6PHE5gK098410; Wed, 25 Jul 2018 17:14:05 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6PHE57N098409; Wed, 25 Jul 2018 17:14:05 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201807251714.w6PHE57N098409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 25 Jul 2018 17:14:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336717 - head X-SVN-Group: head X-SVN-Commit-Author: dim X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 336717 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: Wed, 25 Jul 2018 17:14:06 -0000 Author: dim Date: Wed Jul 25 17:14:05 2018 New Revision: 336717 URL: https://svnweb.freebsd.org/changeset/base/336717 Log: Add a few forgotten files to ObsoleteFiles.inc: * libcasper.so.0, which started in /usr/lib, then moved to /lib, but was later replaced by libcasper.so.1 * 32-bit versions of static casper libraries * 32-bit versions of static stand libraries * 32-bit versions of static ifc(onfig) libraries Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Wed Jul 25 16:07:35 2018 (r336716) +++ head/ObsoleteFiles.inc Wed Jul 25 17:14:05 2018 (r336717) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20180725: Cleanup old libcasper.so.0 +OLD_LIBS+=lib/libcasper.so.0 # 20180722: indent(1) option renamed, test files follow OLD_FILES+=usr/bin/indent/tests/nsac.0 OLD_FILES+=usr/bin/indent/tests/nsac.0.pro @@ -588,8 +590,6 @@ OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt # 20171104: libcap_random should be in /lib not in /usr/lib OLD_LIBS+=usr/lib/libcap_random.so.0 # 20171104: Casper can work only as shared library -OLD_FILES+=usr/lib/libcasper.a -OLD_FILES+=usr/lib/libcasper_p.a OLD_FILES+=usr/lib/libcap_dns.a OLD_FILES+=usr/lib/libcap_dns_p.a OLD_FILES+=usr/lib/libcap_grp.a @@ -600,6 +600,20 @@ OLD_FILES+=usr/lib/libcap_random.a OLD_FILES+=usr/lib/libcap_random_p.a OLD_FILES+=usr/lib/libcap_sysctl.a OLD_FILES+=usr/lib/libcap_sysctl_p.a +OLD_FILES+=usr/lib/libcasper.a +OLD_FILES+=usr/lib/libcasper_p.a +OLD_FILES+=usr/lib32/libcap_dns.a +OLD_FILES+=usr/lib32/libcap_dns_p.a +OLD_FILES+=usr/lib32/libcap_grp.a +OLD_FILES+=usr/lib32/libcap_grp_p.a +OLD_FILES+=usr/lib32/libcap_pwd.a +OLD_FILES+=usr/lib32/libcap_pwd_p.a +OLD_FILES+=usr/lib32/libcap_random.a +OLD_FILES+=usr/lib32/libcap_random_p.a +OLD_FILES+=usr/lib32/libcap_sysctl.a +OLD_FILES+=usr/lib32/libcap_sysctl_p.a +OLD_FILES+=usr/lib32/libcasper.a +OLD_FILES+=usr/lib32/libcasper_p.a # 20171031: Removal of adding_user man page OLD_FILES+=usr/share/man/man7/adding_user.7.gz # 20171031: Disconnected libpathconv tests @@ -620,6 +634,8 @@ OLD_FILES+=usr/share/man/man9/mbp_sync.9.gz # 20171010: Remove libstand OLD_FILES+=usr/lib/libstand.a OLD_FILES+=usr/lib/libstand_p.a +OLD_FILES+=usr/lib32/libstand.a +OLD_FILES+=usr/lib32/libstand_p.a OLD_FILES+=usr/include/stand.h OLD_FILES+=usr/share/man/man3/libstand.3.gz # 20171003: remove RCMDS @@ -1372,6 +1388,10 @@ OLD_FILES+=usr/lib/libifc.a OLD_FILES+=usr/lib/libifc_p.a OLD_FILES+=usr/lib/libifconfig.a OLD_FILES+=usr/lib/libifconfig_p.a +OLD_FILES+=usr/lib32/libifc.a +OLD_FILES+=usr/lib32/libifc_p.a +OLD_FILES+=usr/lib32/libifconfig.a +OLD_FILES+=usr/lib32/libifconfig_p.a # 20170529: mount.conf(8) -> mount.conf(5) OLD_FILES+=usr/share/man/man8/mount.conf.8.gz # 20170525: remove misleading template From owner-svn-src-head@freebsd.org Wed Jul 25 17:20: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 7CA34105025B; Wed, 25 Jul 2018 17:20: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 32A1385EF2; Wed, 25 Jul 2018 17:20: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 10CF51D188; Wed, 25 Jul 2018 17:20: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 w6PHK67U098728; Wed, 25 Jul 2018 17:20:06 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6PHK6WI098727; Wed, 25 Jul 2018 17:20:06 GMT (envelope-from np@FreeBSD.org) Message-Id: <201807251720.w6PHK6WI098727@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 25 Jul 2018 17:20:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336718 - 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: 336718 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: Wed, 25 Jul 2018 17:20:07 -0000 Author: np Date: Wed Jul 25 17:20:06 2018 New Revision: 336718 URL: https://svnweb.freebsd.org/changeset/base/336718 Log: cxgbe(4): Validate only those parameters that are relevant to the type of rate limiter being programmed. Skip the ones that are not applicable. MFC after: 3 days Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_sched.c Modified: head/sys/dev/cxgbe/t4_sched.c ============================================================================== --- head/sys/dev/cxgbe/t4_sched.c Wed Jul 25 17:14:05 2018 (r336717) +++ head/sys/dev/cxgbe/t4_sched.c Wed Jul 25 17:20:06 2018 (r336718) @@ -76,6 +76,7 @@ set_sched_class_params(struct adapter *sc, struct t4_s int rc, top_speed, fw_level, fw_mode, fw_rateunit, fw_ratemode; struct port_info *pi; struct tx_cl_rl_params *tc; + bool check_pktsize = false; if (p->level == SCHED_CLASS_LEVEL_CL_RL) fw_level = FW_SCHED_PARAMS_LEVEL_CL_RL; @@ -86,28 +87,20 @@ set_sched_class_params(struct adapter *sc, struct t4_s else return (EINVAL); - if (p->mode == SCHED_CLASS_MODE_CLASS) - fw_mode = FW_SCHED_PARAMS_MODE_CLASS; - else if (p->mode == SCHED_CLASS_MODE_FLOW) - fw_mode = FW_SCHED_PARAMS_MODE_FLOW; - else - return (EINVAL); + if (p->level == SCHED_CLASS_LEVEL_CL_RL) { + if (p->mode == SCHED_CLASS_MODE_CLASS) + fw_mode = FW_SCHED_PARAMS_MODE_CLASS; + else if (p->mode == SCHED_CLASS_MODE_FLOW) { + check_pktsize = true; + fw_mode = FW_SCHED_PARAMS_MODE_FLOW; + } else + return (EINVAL); + } else + fw_mode = 0; - if (p->rateunit == SCHED_CLASS_RATEUNIT_BITS) - fw_rateunit = FW_SCHED_PARAMS_UNIT_BITRATE; - else if (p->rateunit == SCHED_CLASS_RATEUNIT_PKTS) - fw_rateunit = FW_SCHED_PARAMS_UNIT_PKTRATE; - else + /* Valid channel must always be provided. */ + if (p->channel < 0) return (EINVAL); - - if (p->ratemode == SCHED_CLASS_RATEMODE_REL) - fw_ratemode = FW_SCHED_PARAMS_RATE_REL; - else if (p->ratemode == SCHED_CLASS_RATEMODE_ABS) - fw_ratemode = FW_SCHED_PARAMS_RATE_ABS; - else - return (EINVAL); - - /* Vet our parameters ... */ if (!in_range(p->channel, 0, sc->chip_params->nchan - 1)) return (ERANGE); @@ -117,41 +110,81 @@ set_sched_class_params(struct adapter *sc, struct t4_s MPASS(pi->tx_chan == p->channel); top_speed = port_top_speed(pi) * 1000000; /* Gbps -> Kbps */ - if (!in_range(p->cl, 0, sc->chip_params->nsched_cls) || - !in_range(p->minrate, 0, top_speed) || - !in_range(p->maxrate, 0, top_speed) || - !in_range(p->weight, 0, 100)) - return (ERANGE); + if (p->level == SCHED_CLASS_LEVEL_CL_RL || + p->level == SCHED_CLASS_LEVEL_CH_RL) { + /* + * Valid rate (mode, unit and values) must be provided. + */ - /* - * Translate any unset parameters into the firmware's - * nomenclature and/or fail the call if the parameters - * are required ... - */ - if (p->rateunit < 0 || p->ratemode < 0 || p->channel < 0 || p->cl < 0) - return (EINVAL); + if (p->minrate < 0) + p->minrate = 0; + if (p->maxrate < 0) + return (EINVAL); - if (p->minrate < 0) - p->minrate = 0; - if (p->maxrate < 0) { - if (p->level == SCHED_CLASS_LEVEL_CL_RL || - p->level == SCHED_CLASS_LEVEL_CH_RL) + if (p->rateunit == SCHED_CLASS_RATEUNIT_BITS) { + fw_rateunit = FW_SCHED_PARAMS_UNIT_BITRATE; + /* ratemode could be relative (%) or absolute. */ + if (p->ratemode == SCHED_CLASS_RATEMODE_REL) { + fw_ratemode = FW_SCHED_PARAMS_RATE_REL; + /* maxrate is % of port bandwidth. */ + if (!in_range(p->minrate, 0, 100) || + !in_range(p->maxrate, 0, 100)) { + return (ERANGE); + } + } else if (p->ratemode == SCHED_CLASS_RATEMODE_ABS) { + fw_ratemode = FW_SCHED_PARAMS_RATE_ABS; + /* maxrate is absolute value in kbps. */ + if (!in_range(p->minrate, 0, top_speed) || + !in_range(p->maxrate, 0, top_speed)) { + return (ERANGE); + } + } else + return (EINVAL); + } else if (p->rateunit == SCHED_CLASS_RATEUNIT_PKTS) { + /* maxrate is the absolute value in pps. */ + check_pktsize = true; + fw_rateunit = FW_SCHED_PARAMS_UNIT_PKTRATE; + } else return (EINVAL); - else - p->maxrate = 0; + + if (p->level == SCHED_CLASS_LEVEL_CL_RL) { + /* + * Valid pkt-size must be provided. + */ + if (p->pktsize < 0) + return (EINVAL); + } + } else { + MPASS(p->level == SCHED_CLASS_LEVEL_CL_WRR); + + /* + * Valid weight must be provided. + */ + if (p->weight < 0) + return (EINVAL); + if (!in_range(p->weight, 1, 99)) + return (ERANGE); + + fw_rateunit = 0; + fw_ratemode = 0; } - if (p->weight < 0) { - if (p->level == SCHED_CLASS_LEVEL_CL_WRR) + + if (p->level == SCHED_CLASS_LEVEL_CL_RL || + p->level == SCHED_CLASS_LEVEL_CL_WRR) { + /* + * Valid scheduling class must be provided. + */ + if (p->cl < 0) return (EINVAL); - else - p->weight = 0; + if (!in_range(p->cl, 0, sc->chip_params->nsched_cls - 1)) + return (ERANGE); } - if (p->pktsize < 0) { - if (p->level == SCHED_CLASS_LEVEL_CL_RL || - p->level == SCHED_CLASS_LEVEL_CH_RL) + + if (check_pktsize) { + if (p->pktsize < 0) return (EINVAL); - else - p->pktsize = 0; + if (!in_range(p->pktsize, 64, pi->vi[0].ifp->if_mtu)) + return (ERANGE); } rc = begin_synchronized_op(sc, NULL, From owner-svn-src-head@freebsd.org Wed Jul 25 17:20: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 A9BA210502B2; Wed, 25 Jul 2018 17:20:55 +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 600718607D; Wed, 25 Jul 2018 17:20:55 +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 27B251D1A0; Wed, 25 Jul 2018 17:20:55 +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 w6PHKtUv098798; Wed, 25 Jul 2018 17:20:55 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6PHKtj0098797; Wed, 25 Jul 2018 17:20:55 GMT (envelope-from np@FreeBSD.org) Message-Id: <201807251720.w6PHKtj0098797@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 25 Jul 2018 17:20:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336719 - 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: 336719 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: Wed, 25 Jul 2018 17:20:55 -0000 Author: np Date: Wed Jul 25 17:20:54 2018 New Revision: 336719 URL: https://svnweb.freebsd.org/changeset/base/336719 Log: cxgbetool(8): Require and validate only those inputs that are applicable to the type of rate limiter being configured. For example, the class WRR scheduler doesn't need any kbps limits (it just needs the weights for each class), the channel scheduler doesn't need anything except the aggregate kbps to limit the channel to, and so on. MFC after: 3 days Sponsored by: Chelsio Communications Modified: head/usr.sbin/cxgbetool/cxgbetool.c Modified: head/usr.sbin/cxgbetool/cxgbetool.c ============================================================================== --- head/usr.sbin/cxgbetool/cxgbetool.c Wed Jul 25 17:20:06 2018 (r336718) +++ head/usr.sbin/cxgbetool/cxgbetool.c Wed Jul 25 17:20:54 2018 (r336719) @@ -2862,15 +2862,20 @@ sched_class(int argc, const char *argv[]) warnx("sched params \"level\" parameter missing"); errs++; } - if (op.u.params.mode < 0) { + if (op.u.params.mode < 0 && + op.u.params.level == SCHED_CLASS_LEVEL_CL_RL) { warnx("sched params \"mode\" parameter missing"); errs++; } - if (op.u.params.rateunit < 0) { + if (op.u.params.rateunit < 0 && + (op.u.params.level == SCHED_CLASS_LEVEL_CL_RL || + op.u.params.level == SCHED_CLASS_LEVEL_CH_RL)) { warnx("sched params \"rate-unit\" parameter missing"); errs++; } - if (op.u.params.ratemode < 0) { + if (op.u.params.ratemode < 0 && + (op.u.params.level == SCHED_CLASS_LEVEL_CL_RL || + op.u.params.level == SCHED_CLASS_LEVEL_CH_RL)) { warnx("sched params \"rate-mode\" parameter missing"); errs++; } @@ -2878,7 +2883,9 @@ sched_class(int argc, const char *argv[]) warnx("sched params \"channel\" missing"); errs++; } - if (op.u.params.cl < 0) { + if (op.u.params.cl < 0 && + (op.u.params.level == SCHED_CLASS_LEVEL_CL_RL || + op.u.params.level == SCHED_CLASS_LEVEL_CL_WRR)) { warnx("sched params \"class\" missing"); errs++; } @@ -2889,15 +2896,14 @@ sched_class(int argc, const char *argv[]) "rate-limit level"); errs++; } - if (op.u.params.weight < 0 && - op.u.params.level == SCHED_CLASS_LEVEL_CL_WRR) { - warnx("sched params \"weight\" missing for " - "weighted-round-robin level"); + if (op.u.params.level == SCHED_CLASS_LEVEL_CL_WRR && + (op.u.params.weight < 1 || op.u.params.weight > 99)) { + warnx("sched params \"weight\" missing or invalid " + "(not 1-99) for weighted-round-robin level"); errs++; } if (op.u.params.pktsize < 0 && - (op.u.params.level == SCHED_CLASS_LEVEL_CL_RL || - op.u.params.level == SCHED_CLASS_LEVEL_CH_RL)) { + op.u.params.level == SCHED_CLASS_LEVEL_CL_RL) { warnx("sched params \"pkt-size\" missing for " "rate-limit level"); errs++; From owner-svn-src-head@freebsd.org Wed Jul 25 17:45: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 B9DC910508DF; Wed, 25 Jul 2018 17:45:44 +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 6ED2986CC5; Wed, 25 Jul 2018 17:45:44 +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 4BA1B1D658; Wed, 25 Jul 2018 17:45:44 +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 w6PHjiGL014151; Wed, 25 Jul 2018 17:45:44 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6PHji1p014150; Wed, 25 Jul 2018 17:45:44 GMT (envelope-from np@FreeBSD.org) Message-Id: <201807251745.w6PHji1p014150@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 25 Jul 2018 17:45:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336720 - 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: 336720 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: Wed, 25 Jul 2018 17:45:44 -0000 Author: np Date: Wed Jul 25 17:45:43 2018 New Revision: 336720 URL: https://svnweb.freebsd.org/changeset/base/336720 Log: cxgbe(4): Remove useless code that crept in with r336718. MFC after: 3 days X-MFC With: 336718 Modified: head/sys/dev/cxgbe/t4_sched.c Modified: head/sys/dev/cxgbe/t4_sched.c ============================================================================== --- head/sys/dev/cxgbe/t4_sched.c Wed Jul 25 17:20:54 2018 (r336719) +++ head/sys/dev/cxgbe/t4_sched.c Wed Jul 25 17:45:43 2018 (r336720) @@ -146,14 +146,6 @@ set_sched_class_params(struct adapter *sc, struct t4_s fw_rateunit = FW_SCHED_PARAMS_UNIT_PKTRATE; } else return (EINVAL); - - if (p->level == SCHED_CLASS_LEVEL_CL_RL) { - /* - * Valid pkt-size must be provided. - */ - if (p->pktsize < 0) - return (EINVAL); - } } else { MPASS(p->level == SCHED_CLASS_LEVEL_CL_WRR); From owner-svn-src-head@freebsd.org Wed Jul 25 17:45: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 5E2471050913; Wed, 25 Jul 2018 17:45:57 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 13DF886DDF; Wed, 25 Jul 2018 17:45:57 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E8D6E1D659; Wed, 25 Jul 2018 17:45:56 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6PHjuxq014205; Wed, 25 Jul 2018 17:45:56 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6PHjuE9014204; Wed, 25 Jul 2018 17:45:56 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201807251745.w6PHjuE9014204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 25 Jul 2018 17:45:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336721 - head/release/arm X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/release/arm X-SVN-Commit-Revision: 336721 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: Wed, 25 Jul 2018 17:45:57 -0000 Author: manu Date: Wed Jul 25 17:45:56 2018 New Revision: 336721 URL: https://svnweb.freebsd.org/changeset/base/336721 Log: release: Add OL_DIR forgot in r336600 Reviewed by: gjb Differential Revision: https://reviews.freebsd.org/D16439 Modified: head/release/arm/RPI-B.conf head/release/arm/RPI2.conf Modified: head/release/arm/RPI-B.conf ============================================================================== --- head/release/arm/RPI-B.conf Wed Jul 25 17:45:43 2018 (r336720) +++ head/release/arm/RPI-B.conf Wed Jul 25 17:45:56 2018 (r336721) @@ -13,12 +13,13 @@ IMAGE_SIZE="3072M" KERNEL="RPI-B" MD_ARGS="-x 63 -y 255" NODOC=1 +UBOOT_DIR="/usr/local/share/u-boot/u-boot-rpi" +RPI_FIRMWARE_DIR="/usr/local/share/rpi-firmware" +OL_DIR=$"{RPI_FIRMWARE_DIR}/overlays" OVERLAYS="mmc.dtbo pi3-disable-bt.dtbo" PART_SCHEME="MBR" arm_install_uboot() { - UBOOT_DIR="/usr/local/share/u-boot/u-boot-rpi" - RPI_FIRMWARE_DIR="/usr/local/share/rpi-firmware" UBOOT_FILES="u-boot.bin" RPI_FIRMWARE_FILES="bootcode.bin config.txt \ fixup.dat fixup_cd.dat fixup_db.dat fixup_x.dat \ Modified: head/release/arm/RPI2.conf ============================================================================== --- head/release/arm/RPI2.conf Wed Jul 25 17:45:43 2018 (r336720) +++ head/release/arm/RPI2.conf Wed Jul 25 17:45:56 2018 (r336721) @@ -13,13 +13,14 @@ IMAGE_SIZE="3072M" KERNEL="GENERIC" MD_ARGS="-x 63 -y 255" NODOC=1 +UBOOT_DIR="/usr/local/share/u-boot/u-boot-rpi2" +RPI_FIRMWARE_DIR="/usr/local/share/rpi-firmware" +OL_DIR=$"{RPI_FIRMWARE_DIR}/overlays" OVERLAYS="mmc.dtbo" PART_SCHEME="MBR" export BOARDNAME="RPI2" arm_install_uboot() { - UBOOT_DIR="/usr/local/share/u-boot/u-boot-rpi2" - RPI_FIRMWARE_DIR="/usr/local/share/rpi-firmware" UBOOT_FILES="u-boot.bin" RPI_FIRMWARE_FILES="bootcode.bin config.txt \ fixup.dat fixup_cd.dat fixup_db.dat fixup_x.dat \ From owner-svn-src-head@freebsd.org Wed Jul 25 18:11: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 50A1210511B9; Wed, 25 Jul 2018 18:11:38 +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 05ADB884E8; Wed, 25 Jul 2018 18:11:38 +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 C3C161D9FF; Wed, 25 Jul 2018 18:11:37 +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 w6PIBbKw028001; Wed, 25 Jul 2018 18:11:37 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6PIBbkp028000; Wed, 25 Jul 2018 18:11:37 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201807251811.w6PIBbkp028000@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 25 Jul 2018 18:11:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336722 - head/sys/arm/arm X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: head/sys/arm/arm X-SVN-Commit-Revision: 336722 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: Wed, 25 Jul 2018 18:11:38 -0000 Author: jhb Date: Wed Jul 25 18:11:37 2018 New Revision: 336722 URL: https://svnweb.freebsd.org/changeset/base/336722 Log: Raise a proper SIGTRAP / TRAP_TRACE signal for a PT_STEP step on arm. Previously, a step by PT_STEP resulted in no signal being raised to the debugger so that a step was silently completed with the program continuing to execute after the step. Fix by raising a SIGTRAP signal with TRAP_TRACE as the signal code. To simplify the error handling cases (if ptrace_clear_single_step() fails, etc.) move the handling of PTRACE_BREAKPOINT into the gdb_trapper() function. If ptrace_clear_single_step() fails, gdb_trapper() won't claim the fault, and the default case of SIGILL / ILL_OPC will be used. Differential Revision: https://reviews.freebsd.org/D16100 Modified: head/sys/arm/arm/undefined.c Modified: head/sys/arm/arm/undefined.c ============================================================================== --- head/sys/arm/arm/undefined.c Wed Jul 25 17:45:56 2018 (r336721) +++ head/sys/arm/arm/undefined.c Wed Jul 25 18:11:37 2018 (r336722) @@ -144,6 +144,7 @@ gdb_trapper(u_int addr, u_int insn, struct trapframe * { struct thread *td; ksiginfo_t ksi; + int error; td = (curthread == NULL) ? &thread0 : curthread; @@ -162,6 +163,27 @@ gdb_trapper(u_int addr, u_int insn, struct trapframe * #endif #endif } + + if (code == FAULT_USER) { + /* TODO: No support for ptrace from Thumb-2 */ + if ((frame->tf_spsr & PSR_T) == 0 && + insn == PTRACE_BREAKPOINT) { + PROC_LOCK(td->td_proc); + _PHOLD(td->td_proc); + error = ptrace_clear_single_step(td); + _PRELE(td->td_proc); + PROC_UNLOCK(td->td_proc); + if (error == 0) { + ksiginfo_init_trap(&ksi); + ksi.ksi_signo = SIGTRAP; + ksi.ksi_code = TRAP_TRACE; + ksi.ksi_addr = (u_int32_t *)addr; + trapsignal(td, &ksi); + return (0); + } + } + } + return 1; } @@ -191,7 +213,6 @@ undefinedinstruction(struct trapframe *frame) int fault_code; int coprocessor; struct undefined_handler *uh; - int error; #ifdef VERBOSE_ARM32 int s; #endif @@ -304,26 +325,6 @@ undefinedinstruction(struct trapframe *frame) if (uh->uh_handler(fault_pc, fault_instruction, frame, fault_code) == 0) break; - - if (fault_code & FAULT_USER) { - /* TODO: No support for ptrace from Thumb-2 */ - if ((frame->tf_spsr & PSR_T) == 0 && - fault_instruction == PTRACE_BREAKPOINT) { - PROC_LOCK(td->td_proc); - _PHOLD(td->td_proc); - error = ptrace_clear_single_step(td); - _PRELE(td->td_proc); - PROC_UNLOCK(td->td_proc); - if (error != 0) { - ksiginfo_init_trap(&ksi); - ksi.ksi_signo = SIGILL; - ksi.ksi_code = ILL_ILLOPC; - ksi.ksi_addr = (u_int32_t *)(intptr_t) fault_pc; - trapsignal(td, &ksi); - } - return; - } - } if (uh == NULL && (fault_code & FAULT_USER)) { /* Fault has not been handled */ From owner-svn-src-head@freebsd.org Wed Jul 25 18:21: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 03C9B1051438; Wed, 25 Jul 2018 18:21:16 +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 AE8A588B10; Wed, 25 Jul 2018 18:21:15 +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 9056F1DBB2; Wed, 25 Jul 2018 18:21:15 +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 w6PILFKm033329; Wed, 25 Jul 2018 18:21:15 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6PILFHa033326; Wed, 25 Jul 2018 18:21:15 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201807251821.w6PILFHa033326@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 25 Jul 2018 18:21:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336723 - in head/share: man/man5 mk X-SVN-Group: head X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in head/share: man/man5 mk X-SVN-Commit-Revision: 336723 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: Wed, 25 Jul 2018 18:21:16 -0000 Author: jhb Date: Wed Jul 25 18:21:14 2018 New Revision: 336723 URL: https://svnweb.freebsd.org/changeset/base/336723 Log: Install base gdb in /usr/libexec for 32-bit arm by default. kgdb in ports now supports 32-bit arm kernels. sparc64 is now the only remaining architecture which ships base gdb in /usr/bin. Relnotes: yes Modified: head/share/man/man5/src.conf.5 head/share/mk/src.opts.mk Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Wed Jul 25 18:11:37 2018 (r336722) +++ head/share/man/man5/src.conf.5 Wed Jul 25 18:21:14 2018 (r336723) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd July 21, 2018 +.Dd July 25, 2018 .Dt SRC.CONF 5 .Os .Sh NAME @@ -741,7 +741,7 @@ into .Pa /usr/bin . .Pp This is a default setting on -arm/arm, arm/armv6, arm/armv7 and sparc64/sparc64. +sparc64/sparc64. .It Va WITH_GDB_LIBEXEC Set to install .Xr gdb 1 @@ -754,7 +754,7 @@ to be used as a fallback for if a newer version is not installed. .Pp 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, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64 and riscv/riscv64sf. +amd64/amd64, arm/arm, 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, powerpc/powerpcspe, riscv/riscv64 and riscv/riscv64sf. .It Va WITHOUT_GNUCXX Do not build the GNU C++ stack (g++, libstdc++). This is the default on platforms where clang is the system compiler. Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Wed Jul 25 18:11:37 2018 (r336722) +++ head/share/mk/src.opts.mk Wed Jul 25 18:21:14 2018 (r336723) @@ -321,9 +321,8 @@ __DEFAULT_NO_OPTIONS+=LLDB BROKEN_OPTIONS+=LLDB .endif # GDB in base is generally less functional than GDB in ports. Ports GDB -# does not yet contain kernel support for arm, and sparc64 kernel support -# has not been tested. -.if ${__T:Marm*} != "" || ${__T} == "sparc64" +# sparc64 kernel support has not been tested. +.if ${__T} == "sparc64" __DEFAULT_NO_OPTIONS+=GDB_LIBEXEC .else __DEFAULT_YES_OPTIONS+=GDB_LIBEXEC From owner-svn-src-head@freebsd.org Wed Jul 25 18:58: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 3BBFE1051F49; Wed, 25 Jul 2018 18:58:59 +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 D763B8A0F4; Wed, 25 Jul 2018 18:58:58 +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 A95DF1E1FB; Wed, 25 Jul 2018 18:58:58 +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 w6PIww74051182; Wed, 25 Jul 2018 18:58:58 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6PIwv8o051178; Wed, 25 Jul 2018 18:58:57 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201807251858.w6PIwv8o051178@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 25 Jul 2018 18:58:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336724 - in head/sys: conf dev/ipmi modules modules/ipmi powerpc/powernv X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: in head/sys: conf dev/ipmi modules modules/ipmi powerpc/powernv X-SVN-Commit-Revision: 336724 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: Wed, 25 Jul 2018 18:58:59 -0000 Author: jhibbits Date: Wed Jul 25 18:58:57 2018 New Revision: 336724 URL: https://svnweb.freebsd.org/changeset/base/336724 Log: Support building IPMI as a module on powerpc64 This still only supports IPMI via OPAL on powerpc64, but now it can be tested with a GENERIC kernel. Added: head/sys/dev/ipmi/ipmi_opal.c - copied, changed from r336723, head/sys/powerpc/powernv/opal_ipmi.c Deleted: head/sys/powerpc/powernv/opal_ipmi.c Modified: head/sys/conf/files.powerpc head/sys/modules/Makefile head/sys/modules/ipmi/Makefile Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Wed Jul 25 18:21:14 2018 (r336723) +++ head/sys/conf/files.powerpc Wed Jul 25 18:58:57 2018 (r336724) @@ -43,6 +43,7 @@ dev/iicbus/ds1775.c optional ds1775 powermac dev/iicbus/max6690.c optional max6690 powermac dev/iicbus/ofw_iicbus.c optional iicbus aim dev/ipmi/ipmi.c optional ipmi +dev/ipmi/ipmi_opal.c optional powernv ipmi dev/nand/nfc_fsl.c optional nand mpc85xx dev/nand/nfc_rb.c optional nand mpc85xx # Most ofw stuff below is brought in by conf/files for options FDT, but @@ -192,7 +193,6 @@ powerpc/powernv/opal_console.c optional powernv powerpc/powernv/opal_dev.c optional powernv powerpc/powernv/opal_i2c.c optional iicbus fdt powernv powerpc/powernv/opal_i2cm.c optional iicbus fdt powernv -powerpc/powernv/opal_ipmi.c optional powernv ipmi powerpc/powernv/opal_pci.c optional powernv pci powerpc/powernv/opal_sensor.c optional powernv powerpc/powernv/opalcall.S optional powernv Copied and modified: head/sys/dev/ipmi/ipmi_opal.c (from r336723, head/sys/powerpc/powernv/opal_ipmi.c) ============================================================================== --- head/sys/powerpc/powernv/opal_ipmi.c Wed Jul 25 18:21:14 2018 (r336723, copy source) +++ head/sys/dev/ipmi/ipmi_opal.c Wed Jul 25 18:58:57 2018 (r336724) @@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include "opal.h" +#include struct opal_ipmi_softc { struct ipmi_softc ipmi; Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Wed Jul 25 18:21:14 2018 (r336723) +++ head/sys/modules/Makefile Wed Jul 25 18:58:57 2018 (r336724) @@ -794,6 +794,7 @@ _wi= wi .if ${MACHINE_ARCH} == "powerpc64" _drm2= drm2 +_ipmi= ipmi .endif .if ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "powerpc" # Don't build powermac_nvram for powerpcspe, it's never supported. Modified: head/sys/modules/ipmi/Makefile ============================================================================== --- head/sys/modules/ipmi/Makefile Wed Jul 25 18:21:14 2018 (r336723) +++ head/sys/modules/ipmi/Makefile Wed Jul 25 18:58:57 2018 (r336724) @@ -7,9 +7,15 @@ SUBDIR+= ipmi_linux # XXX - ipmi_smbus and ipmi_ssif depend on smbus # XXX - ipmi_acpi depends on acpi KMOD= ipmi -SRCS= ipmi.c ipmi_kcs.c ipmi_smic.c ipmi_smbios.c ipmi_ssif.c +SRCS= ipmi.c +SRCS+= bus_if.h device_if.h +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "i386" +SRCS+= ipmi_kcs.c ipmi_smic.c ipmi_smbios.c ipmi_ssif.c SRCS+= ipmi_acpi.c ipmi_isa.c ipmi_pci.c ipmi_smbus.c SRCS+= opt_acpi.h -SRCS+= acpi_if.h bus_if.h device_if.h isa_if.h pci_if.h smbus_if.h +SRCS+= acpi_if.h isa_if.h pci_if.h smbus_if.h +.elif ${MACHINE_ARCH} == "powerpc64" +SRCS+= ipmi_opal.c +.endif .include From owner-svn-src-head@freebsd.org Wed Jul 25 19:31: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 1026A10527C1; Wed, 25 Jul 2018 19:31:33 +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 B9AD28B24A; Wed, 25 Jul 2018 19:31:32 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9B51E1E80B; Wed, 25 Jul 2018 19:31:32 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6PJVWP7068401; Wed, 25 Jul 2018 19:31:32 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6PJVWJq068400; Wed, 25 Jul 2018 19:31:32 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201807251931.w6PJVWJq068400@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 25 Jul 2018 19:31:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336725 - head/sys/modules/ipmi X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/sys/modules/ipmi X-SVN-Commit-Revision: 336725 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: Wed, 25 Jul 2018 19:31:33 -0000 Author: jhibbits Date: Wed Jul 25 19:31:32 2018 New Revision: 336725 URL: https://svnweb.freebsd.org/changeset/base/336725 Log: Only build ipmi_linux on x86 Somehow this wasn't triggered in my pre-commit build. Modified: head/sys/modules/ipmi/Makefile Modified: head/sys/modules/ipmi/Makefile ============================================================================== --- head/sys/modules/ipmi/Makefile Wed Jul 25 18:58:57 2018 (r336724) +++ head/sys/modules/ipmi/Makefile Wed Jul 25 19:31:32 2018 (r336725) @@ -1,7 +1,5 @@ # $FreeBSD$ -SUBDIR+= ipmi_linux - .PATH: ${SRCTOP}/sys/dev/ipmi # XXX - ipmi_smbus and ipmi_ssif depend on smbus @@ -14,6 +12,9 @@ SRCS+= ipmi_kcs.c ipmi_smic.c ipmi_smbios.c ipmi_ssif. SRCS+= ipmi_acpi.c ipmi_isa.c ipmi_pci.c ipmi_smbus.c SRCS+= opt_acpi.h SRCS+= acpi_if.h isa_if.h pci_if.h smbus_if.h + +SUBDIR+= ipmi_linux + .elif ${MACHINE_ARCH} == "powerpc64" SRCS+= ipmi_opal.c .endif From owner-svn-src-head@freebsd.org Wed Jul 25 22:46: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 1C0C51055EDA; Wed, 25 Jul 2018 22:46:38 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B914171246; Wed, 25 Jul 2018 22:46:37 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 80E38206FE; Wed, 25 Jul 2018 22:46:37 +0000 (UTC) (envelope-from pkelsey@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6PMkbBj070202; Wed, 25 Jul 2018 22:46:37 GMT (envelope-from pkelsey@FreeBSD.org) Received: (from pkelsey@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6PMkb9j070201; Wed, 25 Jul 2018 22:46:37 GMT (envelope-from pkelsey@FreeBSD.org) Message-Id: <201807252246.w6PMkb9j070201@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pkelsey set sender to pkelsey@FreeBSD.org using -f From: Patrick Kelsey Date: Wed, 25 Jul 2018 22:46:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336727 - in head/sys/net: . altq X-SVN-Group: head X-SVN-Commit-Author: pkelsey X-SVN-Commit-Paths: in head/sys/net: . altq X-SVN-Commit-Revision: 336727 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: Wed, 25 Jul 2018 22:46:38 -0000 Author: pkelsey Date: Wed Jul 25 22:46:36 2018 New Revision: 336727 URL: https://svnweb.freebsd.org/changeset/base/336727 Log: ALTQ support for iflib. Reviewed by: jmallett, mmacy Differential Revision: https://reviews.freebsd.org/D16433 Modified: head/sys/net/altq/if_altq.h head/sys/net/iflib.c Modified: head/sys/net/altq/if_altq.h ============================================================================== --- head/sys/net/altq/if_altq.h Wed Jul 25 21:52:49 2018 (r336726) +++ head/sys/net/altq/if_altq.h Wed Jul 25 22:46:36 2018 (r336727) @@ -143,7 +143,11 @@ struct tb_regulator { #define ALTRQ_PURGE 1 /* purge all packets */ #define ALTQ_IS_READY(ifq) ((ifq)->altq_flags & ALTQF_READY) +#ifdef ALTQ #define ALTQ_IS_ENABLED(ifq) ((ifq)->altq_flags & ALTQF_ENABLED) +#else +#define ALTQ_IS_ENABLED(ifq) 0 +#endif #define ALTQ_NEEDS_CLASSIFY(ifq) ((ifq)->altq_flags & ALTQF_CLASSIFY) #define ALTQ_IS_CNDTNING(ifq) ((ifq)->altq_flags & ALTQF_CNDTNING) Modified: head/sys/net/iflib.c ============================================================================== --- head/sys/net/iflib.c Wed Jul 25 21:52:49 2018 (r336726) +++ head/sys/net/iflib.c Wed Jul 25 22:46:36 2018 (r336727) @@ -739,6 +739,10 @@ static int iflib_msix_init(if_ctx_t ctx); static int iflib_legacy_setup(if_ctx_t ctx, driver_filter_t filter, void *filterarg, int *rid, const char *str); static void iflib_txq_check_drain(iflib_txq_t txq, int budget); static uint32_t iflib_txq_can_drain(struct ifmp_ring *); +#ifdef ALTQ +static void iflib_altq_if_start(if_t ifp); +static int iflib_altq_if_transmit(if_t ifp, struct mbuf *m); +#endif static int iflib_register(if_ctx_t); static void iflib_init_locked(if_ctx_t ctx); static void iflib_add_device_sysctl_pre(if_ctx_t ctx); @@ -3775,6 +3779,10 @@ _task_fn_tx(void *context) IFDI_TX_QUEUE_INTR_ENABLE(ctx, txq->ift_id); return; } +#ifdef ALTQ + if (ALTQ_IS_ENABLED(&ifp->if_snd)) + iflib_altq_if_start(ifp); +#endif if (txq->ift_db_pending) ifmp_ring_enqueue(txq->ift_br, (void **)&txq, 1, TX_BATCH_SIZE, abdicate); else if (!abdicate) @@ -3963,8 +3971,9 @@ iflib_if_transmit(if_t ifp, struct mbuf *m) } MPASS(m->m_nextpkt == NULL); + /* ALTQ-enabled interfaces always use queue 0. */ qidx = 0; - if ((NTXQSETS(ctx) > 1) && M_HASHTYPE_GET(m)) + if ((NTXQSETS(ctx) > 1) && M_HASHTYPE_GET(m) && !ALTQ_IS_ENABLED(&ifp->if_snd)) qidx = QIDX(ctx, m); /* * XXX calculate buf_ring based on flowid (divvy up bits?) @@ -4024,7 +4033,60 @@ iflib_if_transmit(if_t ifp, struct mbuf *m) return (err); } +#ifdef ALTQ +/* + * The overall approach to integrating iflib with ALTQ is to continue to use + * the iflib mp_ring machinery between the ALTQ queue(s) and the hardware + * ring. Technically, when using ALTQ, queueing to an intermediate mp_ring + * is redundant/unnecessary, but doing so minimizes the amount of + * ALTQ-specific code required in iflib. It is assumed that the overhead of + * redundantly queueing to an intermediate mp_ring is swamped by the + * performance limitations inherent in using ALTQ. + * + * When ALTQ support is compiled in, all iflib drivers will use a transmit + * routine, iflib_altq_if_transmit(), that checks if ALTQ is enabled for the + * given interface. If ALTQ is enabled for an interface, then all + * transmitted packets for that interface will be submitted to the ALTQ + * subsystem via IFQ_ENQUEUE(). We don't use the legacy if_transmit() + * implementation because it uses IFQ_HANDOFF(), which will duplicatively + * update stats that the iflib machinery handles, and which is sensitve to + * the disused IFF_DRV_OACTIVE flag. Additionally, iflib_altq_if_start() + * will be installed as the start routine for use by ALTQ facilities that + * need to trigger queue drains on a scheduled basis. + * + */ static void +iflib_altq_if_start(if_t ifp) +{ + struct ifaltq *ifq = &ifp->if_snd; + struct mbuf *m; + + IFQ_LOCK(ifq); + IFQ_DEQUEUE_NOLOCK(ifq, m); + while (m != NULL) { + iflib_if_transmit(ifp, m); + IFQ_DEQUEUE_NOLOCK(ifq, m); + } + IFQ_UNLOCK(ifq); +} + +static int +iflib_altq_if_transmit(if_t ifp, struct mbuf *m) +{ + int err; + + if (ALTQ_IS_ENABLED(&ifp->if_snd)) { + IFQ_ENQUEUE(&ifp->if_snd, m, err); + if (err == 0) + iflib_altq_if_start(ifp); + } else + err = iflib_if_transmit(ifp, m); + + return (err); +} +#endif /* ALTQ */ + +static void iflib_if_qflush(if_t ifp) { if_ctx_t ctx = if_getsoftc(ifp); @@ -4041,6 +4103,10 @@ iflib_if_qflush(if_t ifp) ctx->ifc_flags &= ~IFC_QFLUSH; STATE_UNLOCK(ctx); + /* + * When ALTQ is enabled, this will also take care of purging the + * ALTQ queue(s). + */ if_qflush(ifp); } @@ -5165,7 +5231,12 @@ iflib_register(if_ctx_t ctx) if_setdev(ifp, dev); if_setinitfn(ifp, iflib_if_init); if_setioctlfn(ifp, iflib_if_ioctl); +#ifdef ALTQ + if_setstartfn(ifp, iflib_altq_if_start); + if_settransmitfn(ifp, iflib_altq_if_transmit); +#else if_settransmitfn(ifp, iflib_if_transmit); +#endif if_setqflushfn(ifp, iflib_if_qflush); if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); From owner-svn-src-head@freebsd.org Thu Jul 26 00:16: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 870211057332; Thu, 26 Jul 2018 00:16:42 +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 3AEBA733BE; Thu, 26 Jul 2018 00:16:42 +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 17F202153F; Thu, 26 Jul 2018 00:16:42 +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 w6Q0Gf9c015579; Thu, 26 Jul 2018 00:16:41 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6Q0GfmM015575; Thu, 26 Jul 2018 00:16:41 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201807260016.w6Q0GfmM015575@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Thu, 26 Jul 2018 00:16:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336728 - in head: etc/mtree tests/sys tests/sys/auditpipe X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in head: etc/mtree tests/sys tests/sys/auditpipe X-SVN-Commit-Revision: 336728 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: Thu, 26 Jul 2018 00:16:42 -0000 Author: asomers Date: Thu Jul 26 00:16:41 2018 New Revision: 336728 URL: https://svnweb.freebsd.org/changeset/base/336728 Log: Introduce test program for auditpipe(4) Submitted by: aniketp MFC after: 2 weeks Sponsored by: Google, Inc. (GSoC 2018) Differential Revision: https://reviews.freebsd.org/D16395 Added: head/tests/sys/auditpipe/ head/tests/sys/auditpipe/Makefile (contents, props changed) head/tests/sys/auditpipe/auditpipe_test.c (contents, props changed) Modified: head/etc/mtree/BSD.tests.dist head/tests/sys/Makefile Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Wed Jul 25 22:46:36 2018 (r336727) +++ head/etc/mtree/BSD.tests.dist Thu Jul 26 00:16:41 2018 (r336728) @@ -432,6 +432,8 @@ .. audit .. + auditpipe + .. capsicum .. cddl Modified: head/tests/sys/Makefile ============================================================================== --- head/tests/sys/Makefile Wed Jul 25 22:46:36 2018 (r336727) +++ head/tests/sys/Makefile Thu Jul 26 00:16:41 2018 (r336728) @@ -7,6 +7,7 @@ TESTSDIR= ${TESTSBASE}/sys TESTS_SUBDIRS+= acl TESTS_SUBDIRS+= aio TESTS_SUBDIRS+= audit +TESTS_SUBDIRS+= auditpipe TESTS_SUBDIRS+= capsicum TESTS_SUBDIRS+= ${_cddl} TESTS_SUBDIRS+= fifo Added: head/tests/sys/auditpipe/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/auditpipe/Makefile Thu Jul 26 00:16:41 2018 (r336728) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/sys/auditpipe + +ATF_TESTS_C= auditpipe_test + +TEST_METADATA+= required_user="root" +WARNS?= 6 + +.include Added: head/tests/sys/auditpipe/auditpipe_test.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tests/sys/auditpipe/auditpipe_test.c Thu Jul 26 00:16:41 2018 (r336728) @@ -0,0 +1,185 @@ +/*- + * 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 + +static int filedesc; +static FILE *fileptr; + +ATF_TC(auditpipe_get_qlen); +ATF_TC_HEAD(auditpipe_get_qlen, tc) +{ + atf_tc_set_md_var(tc, "descr", "Verifies whether the auditpipe ioctl, " + "AUDITPIPE_GET_QLEN works properly"); +} + +ATF_TC_BODY(auditpipe_get_qlen, tc) +{ + int qlen = -1; + ATF_REQUIRE((filedesc = open("/dev/auditpipe", O_RDONLY)) != -1); + ATF_REQUIRE_EQ(0, ioctl(filedesc, AUDITPIPE_GET_QLEN, &qlen)); + ATF_REQUIRE(qlen != -1); + close(filedesc); +} + + +ATF_TC(auditpipe_get_qlimit); +ATF_TC_HEAD(auditpipe_get_qlimit, tc) +{ + atf_tc_set_md_var(tc, "descr", "Verifies whether the auditpipe ioctl, " + "AUDITPIPE_GET_QLIMIT works properly"); +} + +ATF_TC_BODY(auditpipe_get_qlimit, tc) +{ + int qlimit = -1; + ATF_REQUIRE((filedesc = open("/dev/auditpipe", O_RDONLY)) != -1); + ATF_REQUIRE_EQ(0, ioctl(filedesc, AUDITPIPE_GET_QLIMIT, &qlimit)); + ATF_REQUIRE(qlimit != -1); + close(filedesc); +} + + +ATF_TC_WITH_CLEANUP(auditpipe_set_qlimit); +ATF_TC_HEAD(auditpipe_set_qlimit, tc) +{ + atf_tc_set_md_var(tc, "descr", "Verifies whether the auditpipe ioctl, " + "AUDITPIPE_SET_QLIMIT works properly"); +} + +ATF_TC_BODY(auditpipe_set_qlimit, tc) +{ + int test_qlimit, curr_qlimit, recv_qlimit; + + ATF_REQUIRE((filedesc = open("/dev/auditpipe", O_RDONLY)) != -1); + /* Retreive the current QLIMIT value and store it in a file */ + ATF_REQUIRE_EQ(0, ioctl(filedesc, AUDITPIPE_GET_QLIMIT, &curr_qlimit)); + ATF_REQUIRE((fileptr = fopen("qlimit_store", "a")) != NULL); + ATF_REQUIRE_EQ(sizeof(curr_qlimit), + fprintf(fileptr, "%d\n", curr_qlimit)); + + /* + * Set QLIMIT different from the current system value to confirm + * proper functioning of AUDITPIPE_SET_QLIMIT ioctl. + */ + test_qlimit = curr_qlimit - 1; + ATF_REQUIRE_EQ(0, ioctl(filedesc, AUDITPIPE_SET_QLIMIT, &test_qlimit)); + /* Receive modified value and check whether QLIMIT was set correctly */ + ATF_REQUIRE_EQ(0, ioctl(filedesc, AUDITPIPE_GET_QLIMIT, &recv_qlimit)); + ATF_REQUIRE_EQ(test_qlimit, recv_qlimit); + + fclose(fileptr); + close(filedesc); +} + +ATF_TC_CLEANUP(auditpipe_set_qlimit, tc) +{ + if (atf_utils_file_exists("qlimit_store")) { + int fd, curr_qlim; + ATF_REQUIRE((fileptr = fopen("qlimit_store", "r")) != NULL); + ATF_REQUIRE(fscanf(fileptr, "%d", &curr_qlim)); + + ATF_REQUIRE((fd = open("/dev/auditpipe", O_RDONLY)) != -1); + /* Set QLIMIT's value as it was prior to test-case invocation */ + ATF_REQUIRE_EQ(0, ioctl(fd, AUDITPIPE_SET_QLIMIT, &curr_qlim)); + + close(fd); + fclose(fileptr); + } +} + + +ATF_TC(auditpipe_get_qlimit_min); +ATF_TC_HEAD(auditpipe_get_qlimit_min, tc) +{ + atf_tc_set_md_var(tc, "descr", "Verifies whether the auditpipe ioctl, " + "AUDITPIPE_GET_QLIMIT_MIN works properly"); +} + +ATF_TC_BODY(auditpipe_get_qlimit_min, tc) +{ + int qlim_min = -1; + ATF_REQUIRE((filedesc = open("/dev/auditpipe", O_RDONLY)) != -1); + ATF_REQUIRE_EQ(0, ioctl(filedesc, AUDITPIPE_GET_QLIMIT_MIN, &qlim_min)); + ATF_REQUIRE(qlim_min != -1); + close(filedesc); +} + + +ATF_TC(auditpipe_get_qlimit_max); +ATF_TC_HEAD(auditpipe_get_qlimit_max, tc) +{ + atf_tc_set_md_var(tc, "descr", "Verifies whether the auditpipe ioctl, " + "AUDITPIPE_GET_QLIMIT_MAX works properly"); +} + +ATF_TC_BODY(auditpipe_get_qlimit_max, tc) +{ + int qlim_max = -1; + ATF_REQUIRE((filedesc = open("/dev/auditpipe", O_RDONLY)) != -1); + ATF_REQUIRE_EQ(0, ioctl(filedesc, AUDITPIPE_GET_QLIMIT_MAX, &qlim_max)); + ATF_REQUIRE(qlim_max != -1); + close(filedesc); +} + + +ATF_TC(auditpipe_get_maxauditdata); +ATF_TC_HEAD(auditpipe_get_maxauditdata, tc) +{ + atf_tc_set_md_var(tc, "descr", "Verifies whether the auditpipe ioctl, " + "AUDITPIPE_GET_MAXAUDITDATA works properly"); +} + +ATF_TC_BODY(auditpipe_get_maxauditdata, tc) +{ + int audata = -1; + ATF_REQUIRE((filedesc = open("/dev/auditpipe", O_RDONLY)) != -1); + ATF_REQUIRE_EQ(0, ioctl(filedesc, AUDITPIPE_GET_MAXAUDITDATA, &audata)); + ATF_REQUIRE(audata != -1); + close(filedesc); +} + + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, auditpipe_get_qlen); + ATF_TP_ADD_TC(tp, auditpipe_get_qlimit); + ATF_TP_ADD_TC(tp, auditpipe_set_qlimit); + ATF_TP_ADD_TC(tp, auditpipe_get_qlimit_min); + ATF_TP_ADD_TC(tp, auditpipe_get_qlimit_max); + ATF_TP_ADD_TC(tp, auditpipe_get_maxauditdata); + + return (atf_no_error()); +} From owner-svn-src-head@freebsd.org Thu Jul 26 04:28: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 E94CF103AF7F; Thu, 26 Jul 2018 04:28:24 +0000 (UTC) (envelope-from rpokala@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 9824C7C28F; Thu, 26 Jul 2018 04:28:24 +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 0751322AC3; Thu, 26 Jul 2018 04:28:22 +0000 (UTC) (envelope-from rpokala@freebsd.org) User-Agent: Microsoft-MacOutlook/10.f.0.180709 Date: Wed, 25 Jul 2018 21:28:10 -0700 Subject: Re: svn commit: r336526 - head From: Ravi Pokala To: Ian Lepore , , , , Will Andrews Message-ID: <0178BAB4-FEFB-473B-9245-3F11ABDA8C09@freebsd.org> Thread-Topic: svn commit: r336526 - head References: <201807200044.w6K0i4QQ079894@repo.freebsd.org> <1532108303.1344.57.camel@freebsd.org> <67239C31-11DA-43E0-B282-5AE894C2B0CB@panasas.com> In-Reply-To: <67239C31-11DA-43E0-B282-5AE894C2B0CB@panasas.com> 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.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: Thu, 26 Jul 2018 04:28:25 -0000 -----Original Message----- From: Ravi Pokala Date: 2018-07-20, Friday at 10:53 To: Ian Lepore , , , , Will Andrews Subject: Re: svn commit: r336526 - head > -----Original Message----- > From: on behalf of Ian Lepore > Date: 2018-07-20, Friday at 10:38 > To: Ravi Pokala , , , > Subject: Re: svn commit: r336526 - head > >> On Fri, 2018-07-20 at 09:56 -0700, Ravi Pokala wrote: >>> Hi Ian, >>> >>> -----Original Message----- >>> From: on behalf of Ian Lepore >>> Date: 2018-07-19, Thursday at 17:44 >>> To: , , >>> Subject: svn commit: r336526 - head >>> >>>> >>>> Author: ian >>>> Date: Fri Jul 20 00:44:04 2018 >>>> New Revision: 336526 >>>> URL: https://svnweb.freebsd.org/changeset/base/336526 >>>> >>>> Log: >>>> Add ntpd to the list of users/groups to check before installing. >>>> >>>> Modified: >>>> head/Makefile.inc1 >>> When trying to installworld: >>> >>> ERROR: Required ntpd user is missing, see /usr/src/UPDATING. >>> >>> But there is no UPDATING entry about this. (Also, shouldn't it be ${SRCTOP}/UPDATING?) >>> >>> Thanks, >>> >>> Ravi (rpokala@) >> >> I wondered about that too, when I accidentally stumbled across the >> CHECK_UIDS thing and realized I should add ntpd to it. I searched in >> UPDATING for some of the other things in the CHECK_UIDS list to see >> what had been said about such changes in the past, even searching >> through old-old svn history, and found nothing. >> >> I finally settled on the thought that the reference to UPDATING was to >> the stuff at the bottom that never changes. In particular to the >> section around line 1595 that documents the instalkernel, reboot, >> mergemaster, installworld sequence. The mergemaster part should take >> care of the new userid, I guess. >> >> -- Ian > > Interesting. I was attempting the install via the `beinstall.sh' script. CCing will@, since he wrote it. > > Thanks, > > Ravi (rpokala@) After some discussion on IRC, I created this patch to fix `beinstall.sh'. https://people.freebsd.org/~rpokala/beinstall.patch However, I'm a bit afraid of testing it, until someone who actually knows `etcupdate' and `mergemaster' can confirm that it won't blow up my box. :-) Can anyone take a look and assuage my fears? Thanks, Ravi (rpokala@) From owner-svn-src-head@freebsd.org Thu Jul 26 05:08: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 62B7C103DEB2; Thu, 26 Jul 2018 05:08:59 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 15C687DA64; Thu, 26 Jul 2018 05:08:59 +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 EB32524781; Thu, 26 Jul 2018 05:08:58 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6Q58wAc064502; Thu, 26 Jul 2018 05:08:58 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6Q58w8c064501; Thu, 26 Jul 2018 05:08:58 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807260508.w6Q58w8c064501@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 26 Jul 2018 05:08:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336733 - head/stand/efi/loader X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/efi/loader X-SVN-Commit-Revision: 336733 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: Thu, 26 Jul 2018 05:08:59 -0000 Author: imp Date: Thu Jul 26 05:08:58 2018 New Revision: 336733 URL: https://svnweb.freebsd.org/changeset/base/336733 Log: Ignore Device Paths in the Boot Info that don't have Media path nodes. These show up in default entries on SuperMicro motherboards and elsewhere. Before, we couldn't find a block device associated with the device path and return BAD_CHOICE which was an instant failure. However, a VendHw node isn't specifc, so when we don't find a media path, return NOT_SPECIFIC so that the rest of the algorithms work. Sponsored by: Netflix. Modified: head/stand/efi/loader/main.c Modified: head/stand/efi/loader/main.c ============================================================================== --- head/stand/efi/loader/main.c Thu Jul 26 04:12:31 2018 (r336732) +++ head/stand/efi/loader/main.c Thu Jul 26 05:08:58 2018 (r336733) @@ -355,9 +355,14 @@ match_boot_info(EFI_LOADED_IMAGE *img __unused, char * /* * If there's only one item in the list, then nothing was - * specified. + * specified. Or if the last path doesn't have a media + * path in it. Those show up as various VenHw() nodes + * which are basically opaque to us. Don't count those + * as something specifc. */ if (last_dp == first_dp) + return NOT_SPECIFIC; + if (efi_devpath_to_media_path(last_dp) == NULL) return NOT_SPECIFIC; /* From owner-svn-src-head@freebsd.org Thu Jul 26 06:42: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 044B2104438E; Thu, 26 Jul 2018 06:42:10 +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 AEC77810FC; Thu, 26 Jul 2018 06:42:09 +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 8FEA62581A; Thu, 26 Jul 2018 06:42:09 +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 w6Q6g9m1013514; Thu, 26 Jul 2018 06:42:09 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6Q6g91q013513; Thu, 26 Jul 2018 06:42:09 GMT (envelope-from np@FreeBSD.org) Message-Id: <201807260642.w6Q6g91q013513@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 26 Jul 2018 06:42:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336734 - 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: 336734 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: Thu, 26 Jul 2018 06:42:10 -0000 Author: np Date: Thu Jul 26 06:42:09 2018 New Revision: 336734 URL: https://svnweb.freebsd.org/changeset/base/336734 Log: cxgbe(4): Better defaults for all cl-rl rate limiters. Start in "class" instead of "flow" mode. This eliminates the need to specify an MTU, which is not available that early anyway. It also allows the user to manually configure ch-rl rate limiting after attach. This used to fail because ch-rl isn't supported if cl-rl "flow" mode is configured. Set all traffic classes to 1Gbps during initialization. The goal is to start off with _any_ valid configuration and 1Gbps works even for gigabit cards. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_sched.c Modified: head/sys/dev/cxgbe/t4_sched.c ============================================================================== --- head/sys/dev/cxgbe/t4_sched.c Thu Jul 26 05:08:58 2018 (r336733) +++ head/sys/dev/cxgbe/t4_sched.c Thu Jul 26 06:42:09 2018 (r336734) @@ -356,24 +356,6 @@ t4_init_tx_sched(struct adapter *sc) const int n = sc->chip_params->nsched_cls; struct port_info *pi; struct tx_cl_rl_params *tc; - static const uint32_t init_kbps[] = { - 100 * 1000, - 200 * 1000, - 400 * 1000, - 500 * 1000, - 800 * 1000, - 1000 * 1000, - 1200 * 1000, - 1500 * 1000, - 1800 * 1000, - 2000 * 1000, - 2500 * 1000, - 3000 * 1000, - 3500 * 1000, - 4000 * 1000, - 5000 * 1000, - 10000 * 1000 - }; mtx_init(&sc->tc_lock, "tx_sched lock", NULL, MTX_DEF); TASK_INIT(&sc->tc_task, 0, update_tx_sched, sc); @@ -386,9 +368,8 @@ t4_init_tx_sched(struct adapter *sc) tc->refcount = 0; tc->ratemode = FW_SCHED_PARAMS_RATE_ABS; tc->rateunit = FW_SCHED_PARAMS_UNIT_BITRATE; - tc->mode = FW_SCHED_PARAMS_MODE_FLOW; - tc->maxrate = init_kbps[min(j, nitems(init_kbps) - 1)]; - tc->pktsize = ETHERMTU; /* XXX */ + tc->mode = FW_SCHED_PARAMS_MODE_CLASS; + tc->maxrate = 1000 * 1000; /* 1 Gbps. Arbitrary */ if (t4_sched_params_cl_rl_kbps(sc, pi->tx_chan, j, tc->mode, tc->maxrate, tc->pktsize, 1) == 0) From owner-svn-src-head@freebsd.org Thu Jul 26 07:29: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 9299E10452F0; Thu, 26 Jul 2018 07:29:45 +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 46FDB8299B; Thu, 26 Jul 2018 07:29:45 +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 27F6225EC1; Thu, 26 Jul 2018 07:29:45 +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 w6Q7TinB035773; Thu, 26 Jul 2018 07:29:44 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6Q7TiYH035772; Thu, 26 Jul 2018 07:29:44 GMT (envelope-from np@FreeBSD.org) Message-Id: <201807260729.w6Q7TiYH035772@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 26 Jul 2018 07:29:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336735 - 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: 336735 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: Thu, 26 Jul 2018 07:29:45 -0000 Author: np Date: Thu Jul 26 07:29:44 2018 New Revision: 336735 URL: https://svnweb.freebsd.org/changeset/base/336735 Log: cxgbe(4): Consider rateunit before ratemode when displaying information about a traffic class. This matches the order in which the firmware evaluates unit and mode internally. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Thu Jul 26 06:42:09 2018 (r336734) +++ head/sys/dev/cxgbe/t4_main.c Thu Jul 26 07:29:44 2018 (r336735) @@ -8612,34 +8612,35 @@ sysctl_tc_params(SYSCTL_HANDLER_ARGS) tc = sc->port[port_id]->sched_params->cl_rl[i]; mtx_unlock(&sc->tc_lock); - if (tc.flags & TX_CLRL_ERROR) { - sbuf_printf(sb, "error"); - goto done; - } - - if (tc.ratemode == SCHED_CLASS_RATEMODE_REL) { - /* XXX: top speed or actual link speed? */ - gbps = port_top_speed(sc->port[port_id]); - sbuf_printf(sb, " %u%% of %uGbps", tc.maxrate, gbps); - } else if (tc.ratemode == SCHED_CLASS_RATEMODE_ABS) { - switch (tc.rateunit) { - case SCHED_CLASS_RATEUNIT_BITS: + switch (tc.rateunit) { + case SCHED_CLASS_RATEUNIT_BITS: + switch (tc.ratemode) { + case SCHED_CLASS_RATEMODE_REL: + /* XXX: top speed or actual link speed? */ + gbps = port_top_speed(sc->port[port_id]); + sbuf_printf(sb, "%u%% of %uGbps", tc.maxrate, gbps); + break; + case SCHED_CLASS_RATEMODE_ABS: mbps = tc.maxrate / 1000; gbps = tc.maxrate / 1000000; if (tc.maxrate == gbps * 1000000) - sbuf_printf(sb, " %uGbps", gbps); + sbuf_printf(sb, "%uGbps", gbps); else if (tc.maxrate == mbps * 1000) - sbuf_printf(sb, " %uMbps", mbps); + sbuf_printf(sb, "%uMbps", mbps); else - sbuf_printf(sb, " %uKbps", tc.maxrate); + sbuf_printf(sb, "%uKbps", tc.maxrate); break; - case SCHED_CLASS_RATEUNIT_PKTS: - sbuf_printf(sb, " %upps", tc.maxrate); - break; default: rc = ENXIO; goto done; } + break; + case SCHED_CLASS_RATEUNIT_PKTS: + sbuf_printf(sb, "%upps", tc.maxrate); + break; + default: + rc = ENXIO; + goto done; } switch (tc.mode) { From owner-svn-src-head@freebsd.org Thu Jul 26 13:33: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 A1022104F501; Thu, 26 Jul 2018 13:33:12 +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 577028F125; Thu, 26 Jul 2018 13:33:12 +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 38A381B07; Thu, 26 Jul 2018 13:33:12 +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 w6QDXCxG025261; Thu, 26 Jul 2018 13:33:12 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6QDXACS025254; Thu, 26 Jul 2018 13:33:10 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201807261333.w6QDXACS025254@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 26 Jul 2018 13:33:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336736 - in head/usr.sbin/makefs: . ffs msdos X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/usr.sbin/makefs: . ffs msdos X-SVN-Commit-Revision: 336736 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: Thu, 26 Jul 2018 13:33:12 -0000 Author: emaste Date: Thu Jul 26 13:33:10 2018 New Revision: 336736 URL: https://svnweb.freebsd.org/changeset/base/336736 Log: makefs: use FreeBSD brelse function signature Although the ffs (and later msdosfs) implementation in makefs is independent of the one in kernel, it makes sense to keep differences to a minimum in order to ease comparison and porting changes across. Submitted by: Siva Mahadevan Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/makefs/ffs.c head/usr.sbin/makefs/ffs/buf.c head/usr.sbin/makefs/ffs/buf.h head/usr.sbin/makefs/ffs/ffs_alloc.c head/usr.sbin/makefs/ffs/ffs_balloc.c head/usr.sbin/makefs/msdos/msdosfs_denode.c head/usr.sbin/makefs/msdos/msdosfs_vfsops.c head/usr.sbin/makefs/msdos/msdosfs_vnops.c Modified: head/usr.sbin/makefs/ffs.c ============================================================================== --- head/usr.sbin/makefs/ffs.c Thu Jul 26 07:29:44 2018 (r336735) +++ head/usr.sbin/makefs/ffs.c Thu Jul 26 13:33:10 2018 (r336736) @@ -980,7 +980,7 @@ ffs_write_file(union dinode *din, uint32_t ino, void * errno = bwrite(bp); if (errno != 0) goto bad_ffs_write_file; - brelse(bp, 0); + brelse(bp); if (!isfile) p += chunk; } Modified: head/usr.sbin/makefs/ffs/buf.c ============================================================================== --- head/usr.sbin/makefs/ffs/buf.c Thu Jul 26 07:29:44 2018 (r336735) +++ head/usr.sbin/makefs/ffs/buf.c Thu Jul 26 13:33:10 2018 (r336736) @@ -93,7 +93,7 @@ bread(struct vnode *vp, daddr_t blkno, int size, struc } void -brelse(struct buf *bp, int u1 __unused) +brelse(struct buf *bp) { assert (bp != NULL); Modified: head/usr.sbin/makefs/ffs/buf.h ============================================================================== --- head/usr.sbin/makefs/ffs/buf.h Thu Jul 26 07:29:44 2018 (r336735) +++ head/usr.sbin/makefs/ffs/buf.h Thu Jul 26 13:33:10 2018 (r336736) @@ -67,7 +67,7 @@ struct buf { void bcleanup(void); int bread(struct vnode *, daddr_t, int, struct ucred *, struct buf **); -void brelse(struct buf *, int); +void brelse(struct buf *); int bwrite(struct buf *); struct buf * getblk(struct vnode *, daddr_t, int, int, int, int); Modified: head/usr.sbin/makefs/ffs/ffs_alloc.c ============================================================================== --- head/usr.sbin/makefs/ffs/ffs_alloc.c Thu Jul 26 07:29:44 2018 (r336735) +++ head/usr.sbin/makefs/ffs/ffs_alloc.c Thu Jul 26 13:33:10 2018 (r336736) @@ -305,13 +305,13 @@ ffs_alloccg(struct inode *ip, int cg, daddr_t bpref, i error = bread(ip->i_devvp, fsbtodb(fs, cgtod(fs, cg)), (int)fs->fs_cgsize, NULL, &bp); if (error) { - brelse(bp, 0); + brelse(bp); return (0); } cgp = (struct cg *)bp->b_data; if (!cg_chkmagic_swap(cgp, needswap) || (cgp->cg_cs.cs_nbfree == 0 && size == fs->fs_bsize)) { - brelse(bp, 0); + brelse(bp); return (0); } if (size == fs->fs_bsize) { @@ -334,7 +334,7 @@ ffs_alloccg(struct inode *ip, int cg, daddr_t bpref, i * allocated, and hacked up */ if (cgp->cg_cs.cs_nbfree == 0) { - brelse(bp, 0); + brelse(bp); return (0); } bno = ffs_alloccgblk(ip, bp, bpref); @@ -449,12 +449,12 @@ ffs_blkfree(struct inode *ip, daddr_t bno, long size) error = bread(ip->i_devvp, fsbtodb(fs, cgtod(fs, cg)), (int)fs->fs_cgsize, NULL, &bp); if (error) { - brelse(bp, 0); + brelse(bp); return; } cgp = (struct cg *)bp->b_data; if (!cg_chkmagic_swap(cgp, needswap)) { - brelse(bp, 0); + brelse(bp); return; } cgbno = dtogd(fs, bno); Modified: head/usr.sbin/makefs/ffs/ffs_balloc.c ============================================================================== --- head/usr.sbin/makefs/ffs/ffs_balloc.c Thu Jul 26 07:29:44 2018 (r336735) +++ head/usr.sbin/makefs/ffs/ffs_balloc.c Thu Jul 26 13:33:10 2018 (r336736) @@ -138,7 +138,7 @@ ffs_balloc_ufs1(struct inode *ip, off_t offset, int bu error = bread(ip->i_devvp, lbn, fs->fs_bsize, NULL, bpp); if (error) { - brelse(*bpp, 0); + brelse(*bpp); return (error); } } @@ -164,7 +164,7 @@ ffs_balloc_ufs1(struct inode *ip, off_t offset, int bu error = bread(ip->i_devvp, lbn, osize, NULL, bpp); if (error) { - brelse(*bpp, 0); + brelse(*bpp); return (error); } } @@ -250,7 +250,7 @@ ffs_balloc_ufs1(struct inode *ip, off_t offset, int bu error = bread(ip->i_devvp, indirs[i].in_lbn, fs->fs_bsize, NULL, &bp); if (error) { - brelse(bp, 0); + brelse(bp); return error; } bap = (int32_t *)bp->b_data; @@ -259,14 +259,14 @@ ffs_balloc_ufs1(struct inode *ip, off_t offset, int bu break; i++; if (nb != 0) { - brelse(bp, 0); + brelse(bp); continue; } if (pref == 0) pref = ffs_blkpref_ufs1(ip, lbn, 0, (int32_t *)0); error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, &newb); if (error) { - brelse(bp, 0); + brelse(bp); return error; } nb = newb; @@ -280,7 +280,7 @@ ffs_balloc_ufs1(struct inode *ip, off_t offset, int bu */ if ((error = bwrite(nbp)) != 0) { - brelse(bp, 0); + brelse(bp); return error; } bap[indirs[i - 1].in_off] = ufs_rw32(nb, needswap); @@ -296,7 +296,7 @@ ffs_balloc_ufs1(struct inode *ip, off_t offset, int bu pref = ffs_blkpref_ufs1(ip, lbn, indirs[num].in_off, &bap[0]); error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, &newb); if (error) { - brelse(bp, 0); + brelse(bp); return error; } nb = newb; @@ -316,11 +316,11 @@ ffs_balloc_ufs1(struct inode *ip, off_t offset, int bu bwrite(bp); return (0); } - brelse(bp, 0); + brelse(bp); if (bpp != NULL) { error = bread(ip->i_devvp, lbn, (int)fs->fs_bsize, NULL, &nbp); if (error) { - brelse(nbp, 0); + brelse(nbp); return error; } *bpp = nbp; @@ -389,7 +389,7 @@ ffs_balloc_ufs2(struct inode *ip, off_t offset, int bu error = bread(ip->i_devvp, lbn, fs->fs_bsize, NULL, bpp); if (error) { - brelse(*bpp, 0); + brelse(*bpp); return (error); } } @@ -415,7 +415,7 @@ ffs_balloc_ufs2(struct inode *ip, off_t offset, int bu error = bread(ip->i_devvp, lbn, osize, NULL, bpp); if (error) { - brelse(*bpp, 0); + brelse(*bpp); return (error); } } @@ -501,7 +501,7 @@ ffs_balloc_ufs2(struct inode *ip, off_t offset, int bu error = bread(ip->i_devvp, indirs[i].in_lbn, fs->fs_bsize, NULL, &bp); if (error) { - brelse(bp, 0); + brelse(bp); return error; } bap = (int64_t *)bp->b_data; @@ -510,14 +510,14 @@ ffs_balloc_ufs2(struct inode *ip, off_t offset, int bu break; i++; if (nb != 0) { - brelse(bp, 0); + brelse(bp); continue; } if (pref == 0) pref = ffs_blkpref_ufs2(ip, lbn, 0, (int64_t *)0); error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, &newb); if (error) { - brelse(bp, 0); + brelse(bp); return error; } nb = newb; @@ -531,7 +531,7 @@ ffs_balloc_ufs2(struct inode *ip, off_t offset, int bu */ if ((error = bwrite(nbp)) != 0) { - brelse(bp, 0); + brelse(bp); return error; } bap[indirs[i - 1].in_off] = ufs_rw64(nb, needswap); @@ -547,7 +547,7 @@ ffs_balloc_ufs2(struct inode *ip, off_t offset, int bu pref = ffs_blkpref_ufs2(ip, lbn, indirs[num].in_off, &bap[0]); error = ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, &newb); if (error) { - brelse(bp, 0); + brelse(bp); return error; } nb = newb; @@ -567,11 +567,11 @@ ffs_balloc_ufs2(struct inode *ip, off_t offset, int bu bwrite(bp); return (0); } - brelse(bp, 0); + brelse(bp); if (bpp != NULL) { error = bread(ip->i_devvp, lbn, (int)fs->fs_bsize, NULL, &nbp); if (error) { - brelse(nbp, 0); + brelse(nbp); return error; } *bpp = nbp; Modified: head/usr.sbin/makefs/msdos/msdosfs_denode.c ============================================================================== --- head/usr.sbin/makefs/msdos/msdosfs_denode.c Thu Jul 26 07:29:44 2018 (r336735) +++ head/usr.sbin/makefs/msdos/msdosfs_denode.c Thu Jul 26 13:33:10 2018 (r336736) @@ -160,7 +160,7 @@ deget(struct msdosfsmount *pmp, u_long dirclust, u_lon return (error); } DE_INTERNALIZE(ldep, direntptr); - brelse(bp, 0); + brelse(bp); } /* Modified: head/usr.sbin/makefs/msdos/msdosfs_vfsops.c ============================================================================== --- head/usr.sbin/makefs/msdos/msdosfs_vfsops.c Thu Jul 26 07:29:44 2018 (r336735) +++ head/usr.sbin/makefs/msdos/msdosfs_vfsops.c Thu Jul 26 13:33:10 2018 (r336736) @@ -326,7 +326,7 @@ msdosfs_mount(struct vnode *devvp, int flags) /* * Release the bootsector buffer. */ - brelse(bp, BC_AGE); + brelse(bp); bp = NULL; /* @@ -353,7 +353,7 @@ msdosfs_mount(struct vnode *devvp, int flags) pmp->pm_nxtfree = getulong(fp->fsinxtfree); else pmp->pm_fsinfo = 0; - brelse(bp, 0); + brelse(bp); bp = NULL; } Modified: head/usr.sbin/makefs/msdos/msdosfs_vnops.c ============================================================================== --- head/usr.sbin/makefs/msdos/msdosfs_vnops.c Thu Jul 26 07:29:44 2018 (r336735) +++ head/usr.sbin/makefs/msdos/msdosfs_vnops.c Thu Jul 26 13:33:10 2018 (r336736) @@ -230,7 +230,7 @@ msdosfs_findslot(struct denode *dp, struct componentna slotoffset = diroff; } if (dep->deName[0] == SLOT_EMPTY) { - brelse(bp, 0); + brelse(bp); goto notfound; } } else { @@ -291,7 +291,7 @@ msdosfs_findslot(struct denode *dp, struct componentna * Release the buffer holding the directory cluster just * searched. */ - brelse(bp, 0); + brelse(bp); } /* for (frcn = 0; ; frcn++) */ notfound: From owner-svn-src-head@freebsd.org Thu Jul 26 13:53: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 5BE29104FE11; Thu, 26 Jul 2018 13:53:23 +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 08D10900F8; Thu, 26 Jul 2018 13:53:23 +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 DE14E1E5C; Thu, 26 Jul 2018 13:53:22 +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 w6QDrMkN036172; Thu, 26 Jul 2018 13:53:22 GMT (envelope-from daichi@FreeBSD.org) Received: (from daichi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6QDrMRI036171; Thu, 26 Jul 2018 13:53:22 GMT (envelope-from daichi@FreeBSD.org) Message-Id: <201807261353.w6QDrMRI036171@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: daichi set sender to daichi@FreeBSD.org using -f From: Daichi GOTO Date: Thu, 26 Jul 2018 13:53:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336737 - 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: 336737 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: Thu, 26 Jul 2018 13:53:23 -0000 Author: daichi Date: Thu Jul 26 13:53:22 2018 New Revision: 336737 URL: https://svnweb.freebsd.org/changeset/base/336737 Log: top(1): forgot in r336160 Approved by: gnn (mentor) Differential Revision: https://reviews.freebsd.org/D16452 Modified: head/usr.bin/top/utils.h Modified: head/usr.bin/top/utils.h ============================================================================== --- head/usr.bin/top/utils.h Thu Jul 26 13:33:10 2018 (r336736) +++ head/usr.bin/top/utils.h Thu Jul 26 13:53:22 2018 (r336737) @@ -22,5 +22,4 @@ const char *format_time(long); char *format_k(int64_t); int string_index(const char *string, const char * const *array); int find_pid(pid_t pid); -int utf8strvisx(char *, const char *, size_t); From owner-svn-src-head@freebsd.org Thu Jul 26 13:58: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 B3351104FFA3; Thu, 26 Jul 2018 13:58:32 +0000 (UTC) (envelope-from prvs=738e045eb=roger.pau@citrix.com) Received: from SMTP.EU.CITRIX.COM (smtp.eu.citrix.com [185.25.65.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.citrix.com", Issuer "DigiCert SHA2 Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E8946904F0; Thu, 26 Jul 2018 13:58:31 +0000 (UTC) (envelope-from prvs=738e045eb=roger.pau@citrix.com) X-IronPort-AV: E=Sophos;i="5.51,405,1526342400"; d="scan'208";a="76746280" Date: Thu, 26 Jul 2018 15:58:06 +0200 From: Roger Pau =?utf-8?B?TW9ubsOp?= To: Ian Lepore CC: , , Subject: Re: svn commit: r336526 - head Message-ID: <20180726135806.foqjgb555vhwhqun@mac.bytemobile.com> References: <201807200044.w6K0i4QQ079894@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <201807200044.w6K0i4QQ079894@repo.freebsd.org> User-Agent: NeoMutt/20180716 X-ClientProxiedBy: AMSPEX02CAS02.citrite.net (10.69.22.113) To AMSPEX02CL02.citrite.net (10.69.22.126) 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: Thu, 26 Jul 2018 13:58:32 -0000 On Fri, Jul 20, 2018 at 12:44:04AM +0000, Ian Lepore wrote: > Author: ian > Date: Fri Jul 20 00:44:04 2018 > New Revision: 336526 > URL: https://svnweb.freebsd.org/changeset/base/336526 > > Log: > Add ntpd to the list of users/groups to check before installing. The Xen CI loop is getting this when trying to create dist media for HEAD FreeBSD (`make -C release ftp`): + LC_ALL=C + export LC_ALL + PATH=/usr/lib/ccache:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin:/usr/lib/git-core + http_proxy=http://cache:3128/ + export http_proxy + https_proxy=http://cache:3128/ + export https_proxy + exec + cd /home/osstest/build.125515.build-amd64-freebsd + rm -f build-ok-stamp + cd freebsd + export 'MAKEOBJDIRPREFIX=/home/osstest/build.125515.build-amd64-freebsd/obj' + export 'TARGET=amd64' + make -C release ftp -DWITHOUT_AUTO_OBJ + tee ../release-ftp-log mkdir -p dist cd /usr/home/osstest/build.125515.build-amd64-freebsd/freebsd/release/.. && make TARGET_ARCH=amd64 TARGET=amd64 distributeworld DISTDIR=/usr/home/osstest/build.125515.build-amd64-freebsd/freebsd/release/dist make[2]: "/usr/home/osstest/build.125515.build-amd64-freebsd/obj/usr/home/osstest/build.125515.build-amd64-freebsd/freebsd/amd64.amd64/toolchain-metadata.mk" line 1: Using cached toolchain metadata from build at on Mon Jul 23 10:29:23 UTC 2018 ERROR: Required ntpd user is missing, see /usr/src/UPDATING. *** Error code 1 Stop. make[2]: stopped in /usr/home/osstest/build.125515.build-amd64-freebsd/freebsd *** Error code 1 Stop. make[1]: stopped in /usr/home/osstest/build.125515.build-amd64-freebsd/freebsd *** Error code 1 Stop. make: stopped in /usr/home/osstest/build.125515.build-amd64-freebsd/freebsd/release The full build log can be found at: http://logs.test-lab.xenproject.org/osstest/logs/125569/build-amd64-freebsd/7.ts-freebsd-build.log Note that it's ~100MB. Thanks, Roger. From owner-svn-src-head@freebsd.org Thu Jul 26 14:15: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 9994010508F3; Thu, 26 Jul 2018 14:15:05 +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 4E23C911C2; Thu, 26 Jul 2018 14:15:05 +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 2F1E6218E; Thu, 26 Jul 2018 14:15:05 +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 w6QEF5R9046501; Thu, 26 Jul 2018 14:15:05 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6QEF5rQ046500; Thu, 26 Jul 2018 14:15:05 GMT (envelope-from br@FreeBSD.org) Message-Id: <201807261415.w6QEF5rQ046500@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Thu, 26 Jul 2018 14:15:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336738 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: br X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 336738 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: Thu, 26 Jul 2018 14:15:05 -0000 Author: br Date: Thu Jul 26 14:15:04 2018 New Revision: 336738 URL: https://svnweb.freebsd.org/changeset/base/336738 Log: Disable OFED for RISC-V: it does not build. Sponsored by: DARPA, AFRL Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Thu Jul 26 13:53:22 2018 (r336737) +++ head/share/mk/src.opts.mk Thu Jul 26 14:15:04 2018 (r336738) @@ -300,6 +300,9 @@ __DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_IS_C .if ${__T} == "aarch64" || ${__T:Mriscv*} != "" BROKEN_OPTIONS+=BINUTILS BINUTILS_BOOTSTRAP GCC GCC_BOOTSTRAP GDB .endif +.if ${__T:Mriscv*} != "" +BROKEN_OPTIONS+=OFED +.endif .if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "i386" || \ ${__T:Mriscv*} != "" || ${__TT} == "mips" __DEFAULT_YES_OPTIONS+=LLVM_LIBUNWIND From owner-svn-src-head@freebsd.org Thu Jul 26 14:22: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 AF7161050BFD; Thu, 26 Jul 2018 14:22:35 +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 317649185E; Thu, 26 Jul 2018 14:22:35 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w6QEMWeW046071; Thu, 26 Jul 2018 07:22:32 -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 w6QEMUwH046070; Thu, 26 Jul 2018 07:22:30 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201807261422.w6QEMUwH046070@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r336737 - head/usr.bin/top In-Reply-To: <201807261353.w6QDrMRI036171@repo.freebsd.org> To: Daichi GOTO Date: Thu, 26 Jul 2018 07:22:30 -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.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: Thu, 26 Jul 2018 14:22:35 -0000 > Author: daichi > Date: Thu Jul 26 13:53:22 2018 > New Revision: 336737 > URL: https://svnweb.freebsd.org/changeset/base/336737 > > Log: > top(1): forgot in r336160 It is helpful to say what was forgot in the commit message as when you are reading a svn log output you do not have the diff to show you what it was that has been forgot. Better message would of been: Remove utf8strvisx prototype, forgotten in r336160 Thanks, Rod > > Approved by: gnn (mentor) > Differential Revision: https://reviews.freebsd.org/D16452 > > Modified: > head/usr.bin/top/utils.h > > Modified: head/usr.bin/top/utils.h > ============================================================================== > --- head/usr.bin/top/utils.h Thu Jul 26 13:33:10 2018 (r336736) > +++ head/usr.bin/top/utils.h Thu Jul 26 13:53:22 2018 (r336737) > @@ -22,5 +22,4 @@ const char *format_time(long); > char *format_k(int64_t); > int string_index(const char *string, const char * const *array); > int find_pid(pid_t pid); > -int utf8strvisx(char *, const char *, size_t); > > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Thu Jul 26 14:31: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 2C86B1050F71 for ; Thu, 26 Jul 2018 14:31:57 +0000 (UTC) (envelope-from will@firepipe.net) Received: from mail-qt0-x235.google.com (mail-qt0-x235.google.com [IPv6:2607:f8b0:400d:c0d::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 C3D3991F0A for ; Thu, 26 Jul 2018 14:31:56 +0000 (UTC) (envelope-from will@firepipe.net) Received: by mail-qt0-x235.google.com with SMTP id f18-v6so1727195qtp.10 for ; Thu, 26 Jul 2018 07:31:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=firepipe-net.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=KdwY8eSUW16PVBPonqhDmJZ8mHCiTAQ3r03b2NINhA8=; b=at8eq0NjujersHV0kz6AkRaKGK/OySSWFcYTy9E7kXY9NSOwKhFV7cBbD6yuNqNaIz sBwCxWedq9YY/9nJQwBcBTBnkVbUW7cTQFHU/cOLj/v4L+4Szd7vqwsDtm92IBr4y2cG iVOLQAIXqlaHGs2Lu01n+n0DQ8UnX+sSVqZYrYssHo8ye47I5iooBiGOmHBfSsWFepCb 2LgeN8R8WchJ1oTtY4WlTQylsDTZMQxXsLnwVkSA4WZ45fImO2Fu9d+cvKHQRDixDlF7 XCa6ahO4zzPSuQ1Il5S/cOlF6oJ85SY7QCBRwbF7ZlnOkcdKHbHbjLMNTBvU5KL3DJ6B j+KQ== 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=KdwY8eSUW16PVBPonqhDmJZ8mHCiTAQ3r03b2NINhA8=; b=B+gwcMlLCS3ya4YO+q4ZzwT9k9OpG1gUzOMH8mpFFFNGI9E/4lY5uwdIs/2S/SyZQy BHCiwa1Jn2lVHrDIWtnOCS9TE8GsdDoYiSRRFGfedjjuFXBBW1Qp5y8/W5Jr1+C5eQE/ qNH42PbzGeCM4d1ABHsUn0vuwos0781lq8ix0eOkymt+wlkJXshmY9IS16+ZFB/HDcWl tUgEhuLOyYH4l/CPzZ+rMA50RzuZmZSJ2mXCwHp18kssfPBvluLeeVTtsQmFc0+8Xmr7 ryFH+yLs+nP7qoV9myZ5CTomijlUP0EL7axg9N+Th51cHXU0z08MjYsixwKmG2etjl1S TIuQ== X-Gm-Message-State: AOUpUlHd6BHIPC66HiJSiorikyUDLx0WHf3/AMDRcZ/KM23Pfq5HrsOL BMyYOCLQNAeNOU9nsH4FVc5kvW2wnURHQhqZKvOqeQ== X-Google-Smtp-Source: AAOMgpdP2biv2KLKIYpagsmEl4lYANLOWxBAwNApWH5dK5LqJt86/d/VkW+nSgfzLcUA2cxqlujfDUZPQ9MvSCRm7+o= X-Received: by 2002:ac8:2c9c:: with SMTP id 28-v6mr2058791qtw.420.1532615515897; Thu, 26 Jul 2018 07:31:55 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:aed:3809:0:0:0:0:0 with HTTP; Thu, 26 Jul 2018 07:31:55 -0700 (PDT) In-Reply-To: <0178BAB4-FEFB-473B-9245-3F11ABDA8C09@freebsd.org> References: <201807200044.w6K0i4QQ079894@repo.freebsd.org> <1532108303.1344.57.camel@freebsd.org> <67239C31-11DA-43E0-B282-5AE894C2B0CB@panasas.com> <0178BAB4-FEFB-473B-9245-3F11ABDA8C09@freebsd.org> From: Will Andrews Date: Thu, 26 Jul 2018 09:31:55 -0500 Message-ID: Subject: Re: svn commit: r336526 - head To: Ravi Pokala Cc: Ian Lepore , "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.27 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: Thu, 26 Jul 2018 14:31:57 -0000 Hi Ravi, I don't think you have to worry. These commands are confined to the temporary mount point used for the BE during the install phase, so they won't affect your running system (which is sort of the point of using beinstall instead of doing it the "traditional" way). I haven't had a chance yet to test it, but I would expect it works fine. Very minor nit: I'd distinguish the "pre" phase from the post in the error message. Thanks for looking into this. --Will. On Wed, Jul 25, 2018 at 11:28 PM, Ravi Pokala wrote: > -----Original Message----- > From: Ravi Pokala > Date: 2018-07-20, Friday at 10:53 > To: Ian Lepore , , < > svn-src-all@freebsd.org>, , Will Andrews > > Subject: Re: svn commit: r336526 - head > > > -----Original Message----- > > From: on behalf of Ian Lepore < > ian@freebsd.org> > > Date: 2018-07-20, Friday at 10:38 > > To: Ravi Pokala , , < > svn-src-all@freebsd.org>, > > Subject: Re: svn commit: r336526 - head > > > >> On Fri, 2018-07-20 at 09:56 -0700, Ravi Pokala wrote: > >>> Hi Ian, > >>> > >>> -----Original Message----- > >>> From: on behalf of Ian Lepore > >>> Date: 2018-07-19, Thursday at 17:44 > >>> To: , , > >>> Subject: svn commit: r336526 - head > >>> > >>>> > >>>> Author: ian > >>>> Date: Fri Jul 20 00:44:04 2018 > >>>> New Revision: 336526 > >>>> URL: https://svnweb.freebsd.org/changeset/base/336526 > >>>> > >>>> Log: > >>>> Add ntpd to the list of users/groups to check before installing. > >>>> > >>>> Modified: > >>>> head/Makefile.inc1 > >>> When trying to installworld: > >>> > >>> ERROR: Required ntpd user is missing, see /usr/src/UPDATING. > >>> > >>> But there is no UPDATING entry about this. (Also, shouldn't it be > ${SRCTOP}/UPDATING?) > >>> > >>> Thanks, > >>> > >>> Ravi (rpokala@) > >> > >> I wondered about that too, when I accidentally stumbled across the > >> CHECK_UIDS thing and realized I should add ntpd to it. I searched in > >> UPDATING for some of the other things in the CHECK_UIDS list to see > >> what had been said about such changes in the past, even searching > >> through old-old svn history, and found nothing. > >> > >> I finally settled on the thought that the reference to UPDATING was to > >> the stuff at the bottom that never changes. In particular to the > >> section around line 1595 that documents the instalkernel, reboot, > >> mergemaster, installworld sequence. The mergemaster part should take > >> care of the new userid, I guess. > >> > >> -- Ian > > > > Interesting. I was attempting the install via the `beinstall.sh' script. > CCing will@, since he wrote it. > > > > Thanks, > > > > Ravi (rpokala@) > > After some discussion on IRC, I created this patch to fix `beinstall.sh'. > > https://people.freebsd.org/~rpokala/beinstall.patch > > However, I'm a bit afraid of testing it, until someone who actually knows > `etcupdate' and `mergemaster' can confirm that it won't blow up my box. :-) > > Can anyone take a look and assuage my fears? > > Thanks, > > Ravi (rpokala@) > > > From owner-svn-src-head@freebsd.org Thu Jul 26 14:42: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 F2B9310514A4; Thu, 26 Jul 2018 14:42:20 +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 AA1349274B; Thu, 26 Jul 2018 14:42:20 +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 8CDD8265B; Thu, 26 Jul 2018 14:42:20 +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 w6QEgKjS061042; Thu, 26 Jul 2018 14:42:20 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6QEgKWU061041; Thu, 26 Jul 2018 14:42:20 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201807261442.w6QEgKWU061041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Thu, 26 Jul 2018 14:42:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336739 - head/lib/libc/powerpcspe/gen X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/lib/libc/powerpcspe/gen X-SVN-Commit-Revision: 336739 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: Thu, 26 Jul 2018 14:42:21 -0000 Author: jhibbits Date: Thu Jul 26 14:42:20 2018 New Revision: 336739 URL: https://svnweb.freebsd.org/changeset/base/336739 Log: Fix fabs(3) for powerpcspe, this time for real SPE ABI uses the soft-float ABI, which splits doubles into two words. As such, fabs(3) cannot work on a double directly. It's too costly to convert the argument pair into a single double to use efdabs, so clear the top bit of the high word, which is the sign bit. Modified: head/lib/libc/powerpcspe/gen/fabs.S Modified: head/lib/libc/powerpcspe/gen/fabs.S ============================================================================== --- head/lib/libc/powerpcspe/gen/fabs.S Thu Jul 26 14:15:04 2018 (r336738) +++ head/lib/libc/powerpcspe/gen/fabs.S Thu Jul 26 14:42:20 2018 (r336739) @@ -31,7 +31,8 @@ __FBSDID("$FreeBSD$"); * double fabs(double) */ ENTRY(fabs) - efdabs %r3,%r3 + /* arg is split in two words, clear sign bit only, in r3. */ + clrlwi %r3,%r3,1 blr END(fabs) From owner-svn-src-head@freebsd.org Thu Jul 26 14:49: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 707381051785 for ; Thu, 26 Jul 2018 14:49:22 +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 F202292C24 for ; Thu, 26 Jul 2018 14:49:21 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: 0fb0869e-90e3-11e8-904b-1d2e466b3c59 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 0fb0869e-90e3-11e8-904b-1d2e466b3c59; Thu, 26 Jul 2018 14:49:13 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w6QEnCn5021117; Thu, 26 Jul 2018 08:49:12 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1532616552.61594.23.camel@freebsd.org> Subject: Re: svn commit: r336526 - head From: Ian Lepore To: Roger Pau =?ISO-8859-1?Q?Monn=E9?= Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Thu, 26 Jul 2018 08:49:12 -0600 In-Reply-To: <20180726135806.foqjgb555vhwhqun@mac.bytemobile.com> References: <201807200044.w6K0i4QQ079894@repo.freebsd.org> <20180726135806.foqjgb555vhwhqun@mac.bytemobile.com> 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.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: Thu, 26 Jul 2018 14:49:22 -0000 On Thu, 2018-07-26 at 15:58 +0200, Roger Pau Monné wrote: > On Fri, Jul 20, 2018 at 12:44:04AM +0000, Ian Lepore wrote: > > > > Author: ian > > Date: Fri Jul 20 00:44:04 2018 > > New Revision: 336526 > > URL: https://svnweb.freebsd.org/changeset/base/336526 > > > > Log: > >   Add ntpd to the list of users/groups to check before installing. > The Xen CI loop is getting this when trying to create dist media > for HEAD FreeBSD (`make -C release ftp`): > > + LC_ALL=C > + export LC_ALL > + > PATH=/usr/lib/ccache:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/u > sr/local/bin:/root/bin:/usr/lib/git-core > + http_proxy=http://cache:3128/ > + export http_proxy > + https_proxy=http://cache:3128/ > + export https_proxy > + exec > + cd /home/osstest/build.125515.build-amd64-freebsd > + rm -f build-ok-stamp > + cd freebsd > + export 'MAKEOBJDIRPREFIX=/home/osstest/build.125515.build-amd64- > freebsd/obj' > + export 'TARGET=amd64' > + make -C release ftp -DWITHOUT_AUTO_OBJ > + tee ../release-ftp-log > mkdir -p dist > cd /usr/home/osstest/build.125515.build-amd64- > freebsd/freebsd/release/.. && make TARGET_ARCH=amd64 TARGET=amd64 > distributeworld DISTDIR=/usr/home/osstest/build.125515.build-amd64- > freebsd/freebsd/release/dist > make[2]: "/usr/home/osstest/build.125515.build-amd64- > freebsd/obj/usr/home/osstest/build.125515.build-amd64- > freebsd/freebsd/amd64.amd64/toolchain-metadata.mk" line 1: Using > cached toolchain metadata from build at  on Mon Jul 23 10:29:23 UTC > 2018 > ERROR: Required ntpd user is missing, see /usr/src/UPDATING. > *** Error code 1 > > Stop. > make[2]: stopped in /usr/home/osstest/build.125515.build-amd64- > freebsd/freebsd > *** Error code 1 > > Stop. > make[1]: stopped in /usr/home/osstest/build.125515.build-amd64- > freebsd/freebsd > *** Error code 1 > > Stop. > make: stopped in /usr/home/osstest/build.125515.build-amd64- > freebsd/freebsd/release > > The full build log can be found at: > > http://logs.test-lab.xenproject.org/osstest/logs/125569/build-amd64-f > reebsd/7.ts-freebsd-build.log > > Note that it's ~100MB. > > Thanks, Roger. > If the script is creating a new distribution image from scratch, it should be using -DDB_FROM_SRC on all distrib* and install* make targets, to avoid using (and verifying against) the passwd database on the build system. -- Ian From owner-svn-src-head@freebsd.org Thu Jul 26 14:54: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 6F04D1051B9F; Thu, 26 Jul 2018 14:54:35 +0000 (UTC) (envelope-from prvs=738e045eb=roger.pau@citrix.com) Received: from SMTP.EU.CITRIX.COM (smtp.eu.citrix.com [185.25.65.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.citrix.com", Issuer "DigiCert SHA2 Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 86CCF93361; Thu, 26 Jul 2018 14:54:34 +0000 (UTC) (envelope-from prvs=738e045eb=roger.pau@citrix.com) X-IronPort-AV: E=Sophos;i="5.51,405,1526342400"; d="scan'208";a="76750558" Date: Thu, 26 Jul 2018 16:54:12 +0200 From: Roger Pau =?utf-8?B?TW9ubsOp?= To: Ian Lepore CC: , , Subject: Re: svn commit: r336526 - head Message-ID: <20180726145412.zp4zjznpwmhbaj65@mac.bytemobile.com> References: <201807200044.w6K0i4QQ079894@repo.freebsd.org> <20180726135806.foqjgb555vhwhqun@mac.bytemobile.com> <1532616552.61594.23.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: <1532616552.61594.23.camel@freebsd.org> User-Agent: NeoMutt/20180716 X-ClientProxiedBy: AMSPEX02CAS02.citrite.net (10.69.22.113) To AMSPEX02CL02.citrite.net (10.69.22.126) 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: Thu, 26 Jul 2018 14:54:35 -0000 On Thu, Jul 26, 2018 at 08:49:12AM -0600, Ian Lepore wrote: > On Thu, 2018-07-26 at 15:58 +0200, Roger Pau Monné wrote: > > On Fri, Jul 20, 2018 at 12:44:04AM +0000, Ian Lepore wrote: > > > > > > Author: ian > > > Date: Fri Jul 20 00:44:04 2018 > > > New Revision: 336526 > > > URL: https://svnweb.freebsd.org/changeset/base/336526 > > > > > > Log: > > >   Add ntpd to the list of users/groups to check before installing. > > The Xen CI loop is getting this when trying to create dist media > > for HEAD FreeBSD (`make -C release ftp`): > > > > + LC_ALL=C > > + export LC_ALL > > + > > PATH=/usr/lib/ccache:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/u > > sr/local/bin:/root/bin:/usr/lib/git-core > > + http_proxy=http://cache:3128/ > > + export http_proxy > > + https_proxy=http://cache:3128/ > > + export https_proxy > > + exec > > + cd /home/osstest/build.125515.build-amd64-freebsd > > + rm -f build-ok-stamp > > + cd freebsd > > + export 'MAKEOBJDIRPREFIX=/home/osstest/build.125515.build-amd64- > > freebsd/obj' > > + export 'TARGET=amd64' > > + make -C release ftp -DWITHOUT_AUTO_OBJ > > + tee ../release-ftp-log > > mkdir -p dist > > cd /usr/home/osstest/build.125515.build-amd64- > > freebsd/freebsd/release/.. && make TARGET_ARCH=amd64 TARGET=amd64 > > distributeworld DISTDIR=/usr/home/osstest/build.125515.build-amd64- > > freebsd/freebsd/release/dist > > make[2]: "/usr/home/osstest/build.125515.build-amd64- > > freebsd/obj/usr/home/osstest/build.125515.build-amd64- > > freebsd/freebsd/amd64.amd64/toolchain-metadata.mk" line 1: Using > > cached toolchain metadata from build at  on Mon Jul 23 10:29:23 UTC > > 2018 > > ERROR: Required ntpd user is missing, see /usr/src/UPDATING. > > *** Error code 1 > > > > Stop. > > make[2]: stopped in /usr/home/osstest/build.125515.build-amd64- > > freebsd/freebsd > > *** Error code 1 > > > > Stop. > > make[1]: stopped in /usr/home/osstest/build.125515.build-amd64- > > freebsd/freebsd > > *** Error code 1 > > > > Stop. > > make: stopped in /usr/home/osstest/build.125515.build-amd64- > > freebsd/freebsd/release > > > > The full build log can be found at: > > > > http://logs.test-lab.xenproject.org/osstest/logs/125569/build-amd64-f > > reebsd/7.ts-freebsd-build.log > > > > Note that it's ~100MB. > > > > Thanks, Roger. > > > > If the script is creating a new distribution image from scratch, it > should be using -DDB_FROM_SRC on all distrib* and install* make > targets, to avoid using (and verifying against) the passwd database on > the build system. Shouldn't then that be set by default for the ftp release target? The sole purpose of that target is to create the sets that go to the servers AFAICT. Or maybe it's the distributeworld target the one missing the DB_FROM_SRC? Roger. From owner-svn-src-head@freebsd.org Thu Jul 26 15:05: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 CB6AE1051F8D for ; Thu, 26 Jul 2018 15:05:32 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (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 57E2693989 for ; Thu, 26 Jul 2018 15:05:32 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: 4fa5b29f-90e5-11e8-93fa-f3ebd9db2b94 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.ore.mailhop.org (Halon) with ESMTPSA id 4fa5b29f-90e5-11e8-93fa-f3ebd9db2b94; Thu, 26 Jul 2018 15:05:20 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w6QF5J9T021387; Thu, 26 Jul 2018 09:05:19 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1532617518.61594.31.camel@freebsd.org> Subject: Re: svn commit: r336526 - head From: Ian Lepore To: Roger Pau =?ISO-8859-1?Q?Monn=E9?= Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Thu, 26 Jul 2018 09:05:18 -0600 In-Reply-To: <20180726145412.zp4zjznpwmhbaj65@mac.bytemobile.com> References: <201807200044.w6K0i4QQ079894@repo.freebsd.org> <20180726135806.foqjgb555vhwhqun@mac.bytemobile.com> <1532616552.61594.23.camel@freebsd.org> <20180726145412.zp4zjznpwmhbaj65@mac.bytemobile.com> 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.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: Thu, 26 Jul 2018 15:05:33 -0000 On Thu, 2018-07-26 at 16:54 +0200, Roger Pau Monné wrote: > On Thu, Jul 26, 2018 at 08:49:12AM -0600, Ian Lepore wrote: > > > > On Thu, 2018-07-26 at 15:58 +0200, Roger Pau Monné wrote: > > > > > > On Fri, Jul 20, 2018 at 12:44:04AM +0000, Ian Lepore wrote: > > > > > > > > > > > > Author: ian > > > > Date: Fri Jul 20 00:44:04 2018 > > > > New Revision: 336526 > > > > URL: https://svnweb.freebsd.org/changeset/base/336526 > > > > > > > > Log: > > > >   Add ntpd to the list of users/groups to check before > > > > installing. > > > The Xen CI loop is getting this when trying to create dist media > > > for HEAD FreeBSD (`make -C release ftp`): > > > > > > + LC_ALL=C > > > + export LC_ALL > > > + > > > PATH=/usr/lib/ccache:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbi > > > n:/u > > > sr/local/bin:/root/bin:/usr/lib/git-core > > > + http_proxy=http://cache:3128/ > > > + export http_proxy > > > + https_proxy=http://cache:3128/ > > > + export https_proxy > > > + exec > > > + cd /home/osstest/build.125515.build-amd64-freebsd > > > + rm -f build-ok-stamp > > > + cd freebsd > > > + export 'MAKEOBJDIRPREFIX=/home/osstest/build.125515.build- > > > amd64- > > > freebsd/obj' > > > + export 'TARGET=amd64' > > > + make -C release ftp -DWITHOUT_AUTO_OBJ > > > + tee ../release-ftp-log > > > mkdir -p dist > > > cd /usr/home/osstest/build.125515.build-amd64- > > > freebsd/freebsd/release/.. && make TARGET_ARCH=amd64 TARGET=amd64 > > > distributeworld DISTDIR=/usr/home/osstest/build.125515.build- > > > amd64- > > > freebsd/freebsd/release/dist > > > make[2]: "/usr/home/osstest/build.125515.build-amd64- > > > freebsd/obj/usr/home/osstest/build.125515.build-amd64- > > > freebsd/freebsd/amd64.amd64/toolchain-metadata.mk" line 1: Using > > > cached toolchain metadata from build at  on Mon Jul 23 10:29:23 > > > UTC > > > 2018 > > > ERROR: Required ntpd user is missing, see /usr/src/UPDATING. > > > *** Error code 1 > > > > > > Stop. > > > make[2]: stopped in /usr/home/osstest/build.125515.build-amd64- > > > freebsd/freebsd > > > *** Error code 1 > > > > > > Stop. > > > make[1]: stopped in /usr/home/osstest/build.125515.build-amd64- > > > freebsd/freebsd > > > *** Error code 1 > > > > > > Stop. > > > make: stopped in /usr/home/osstest/build.125515.build-amd64- > > > freebsd/freebsd/release > > > > > > The full build log can be found at: > > > > > > http://logs.test-lab.xenproject.org/osstest/logs/125569/build-amd > > > 64-f > > > reebsd/7.ts-freebsd-build.log > > > > > > Note that it's ~100MB. > > > > > > Thanks, Roger. > > > > > If the script is creating a new distribution image from scratch, it > > should be using -DDB_FROM_SRC on all distrib* and install* make > > targets, to avoid using (and verifying against) the passwd database > > on > > the build system. > Shouldn't then that be set by default for the ftp release target? > The sole purpose of that target is to create the sets that go to the > servers AFAICT. > > Or maybe it's the distributeworld target the one missing the > DB_FROM_SRC? > > Roger. > I don't know anything about the release scripts or how they work. I started down the path of trying to make the build system automatically set DB_FROM_SRC if DESTDIR is anything other than "/", but I realized that's wrong too... I occasionally mount an sdcard from some embedded system on my build machine and update it from a crossbuild using DESTDIR=/mnt, and in a case like that, using the passwd database from the system being updated is the right thing to do and DB_FROM_SRC isn't right (although it would work most of the time for most people). Right now there's no way to even properly use the passwd data from the target system, and when I tried to do that, I ran into other bugs. The only options now are to use the running system even when it's not what's being installed (clearly wrong) or use DB_FROM_SRC to bypass the checks, but also bypass using the passwd data from the target system (but it works okay as long as none of the names/uids < 1024 have been changed on the target system/image). -- Ian From owner-svn-src-head@freebsd.org Thu Jul 26 15:44: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 2D89E1052FDE; Thu, 26 Jul 2018 15:44:22 +0000 (UTC) (envelope-from daichigoto@icloud.com) Received: from mr22p34im-asmtp001.me.com (mr22p34im-asmtp001.me.com [17.111.211.48]) (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 C46D895496; Thu, 26 Jul 2018 15:44:21 +0000 (UTC) (envelope-from daichigoto@icloud.com) Received: from process-dkim-sign-daemon.mr22p34im-asmtp001.me.com by mr22p34im-asmtp001.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) id <0PCH00500A12TO00@mr22p34im-asmtp001.me.com>; Thu, 26 Jul 2018 14:44:15 +0000 (GMT) Received: from icloud.com ([127.0.0.1]) by mr22p34im-asmtp001.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) with ESMTPSA id <0PCH0072UA88UZ00@mr22p34im-asmtp001.me.com>; Thu, 26 Jul 2018 14:44:14 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-07-26_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1011 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1807260154 Content-type: text/plain; charset=utf-8 MIME-version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: svn commit: r336737 - head/usr.bin/top From: =?utf-8?B?5b6M6Jek5aSn5Zyw?= In-reply-to: <201807261422.w6QEMUwH046070@pdx.rh.CN85.dnsmgr.net> Date: Thu, 26 Jul 2018 23:44:12 +0900 Cc: Daichi GOTO , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-transfer-encoding: quoted-printable Message-id: <32C0FF83-9BE2-4950-9FFD-1FA10463C535@icloud.com> References: <201807261422.w6QEMUwH046070@pdx.rh.CN85.dnsmgr.net> To: rgrimes@freebsd.org X-Mailer: Apple Mail (2.3445.9.1) 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: Thu, 26 Jul 2018 15:44:22 -0000 I see. thank you for the advice! > 2018/07/26 23:22=E3=80=81Rodney W. Grimes = =E3=81=AE=E3=83=A1=E3=83=BC=E3=83=AB: >=20 >> Author: daichi >> Date: Thu Jul 26 13:53:22 2018 >> New Revision: 336737 >> URL: https://svnweb.freebsd.org/changeset/base/336737 >>=20 >> Log: >> top(1): forgot in r336160 >=20 > It is helpful to say what was forgot in the commit message as when > you are reading a svn log output you do not have the diff to show > you what it was that has been forgot. >=20 > Better message would of been: > Remove utf8strvisx prototype, forgotten in r336160 >=20 >=20 > Thanks, > Rod >>=20 >> Approved by: gnn (mentor) >> Differential Revision: https://reviews.freebsd.org/D16452 >>=20 >> Modified: >> head/usr.bin/top/utils.h >>=20 >> Modified: head/usr.bin/top/utils.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/usr.bin/top/utils.h Thu Jul 26 13:33:10 2018 = (r336736) >> +++ head/usr.bin/top/utils.h Thu Jul 26 13:53:22 2018 = (r336737) >> @@ -22,5 +22,4 @@ const char *format_time(long); >> char *format_k(int64_t); >> int string_index(const char *string, const char * const *array); >> int find_pid(pid_t pid); >> -int utf8strvisx(char *, const char *, size_t); >>=20 >>=20 >>=20 >=20 > --=20 > Rod Grimes = rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Thu Jul 26 16:08: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 9063A105367D; Thu, 26 Jul 2018 16:08:27 +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 4417E96004; Thu, 26 Jul 2018 16:08:27 +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 207543400; Thu, 26 Jul 2018 16:08:27 +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 w6QG8QQh003341; Thu, 26 Jul 2018 16:08:26 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6QG8QAa003340; Thu, 26 Jul 2018 16:08:26 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201807261608.w6QG8QAa003340@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 26 Jul 2018 16:08:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336740 - head/sys/riscv/riscv X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/sys/riscv/riscv X-SVN-Commit-Revision: 336740 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: Thu, 26 Jul 2018 16:08:27 -0000 Author: markj Date: Thu Jul 26 16:08:26 2018 New Revision: 336740 URL: https://svnweb.freebsd.org/changeset/base/336740 Log: Implement pmap_mincore() for riscv. Reviewed by: alc, br Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D16444 Modified: head/sys/riscv/riscv/pmap.c Modified: head/sys/riscv/riscv/pmap.c ============================================================================== --- head/sys/riscv/riscv/pmap.c Thu Jul 26 14:42:20 2018 (r336739) +++ head/sys/riscv/riscv/pmap.c Thu Jul 26 16:08:26 2018 (r336740) @@ -389,6 +389,13 @@ pmap_l3_valid_cacheable(pt_entry_t l3) #define PTE_SYNC(pte) cpu_dcache_wb_range((vm_offset_t)pte, sizeof(*pte)) +static inline int +pmap_page_accessed(pt_entry_t pte) +{ + + return (pte & PTE_A); +} + /* Checks if the page is dirty. */ static inline int pmap_page_dirty(pt_entry_t pte) @@ -3176,8 +3183,47 @@ pmap_page_set_memattr(vm_page_t m, vm_memattr_t ma) int pmap_mincore(pmap_t pmap, vm_offset_t addr, vm_paddr_t *locked_pa) { + pt_entry_t *l2, *l3, tpte; + vm_paddr_t pa; + int val; + bool managed; - panic("RISCVTODO: pmap_mincore"); + PMAP_LOCK(pmap); +retry: + managed = false; + val = 0; + + l2 = pmap_l2(pmap, addr); + if (l2 != NULL && ((tpte = pmap_load(l2)) & PTE_V) != 0) { + if ((tpte & (PTE_R | PTE_W | PTE_X)) != 0) { + pa = PTE_TO_PHYS(tpte) | (addr & L2_OFFSET); + val = MINCORE_INCORE | MINCORE_SUPER; + } else { + l3 = pmap_l2_to_l3(l2, addr); + tpte = pmap_load(l3); + if ((tpte & PTE_V) == 0) + goto done; + pa = PTE_TO_PHYS(tpte) | (addr & L3_OFFSET); + val = MINCORE_INCORE; + } + + if (pmap_page_dirty(tpte)) + val |= MINCORE_MODIFIED | MINCORE_MODIFIED_OTHER; + if (pmap_page_accessed(tpte)) + val |= MINCORE_REFERENCED | MINCORE_REFERENCED_OTHER; + managed = (tpte & PTE_SW_MANAGED) == PTE_SW_MANAGED; + } + +done: + if ((val & (MINCORE_MODIFIED_OTHER | MINCORE_REFERENCED_OTHER)) != + (MINCORE_MODIFIED_OTHER | MINCORE_REFERENCED_OTHER) && managed) { + /* Ensure that "PHYS_TO_VM_PAGE(pa)->object" doesn't change. */ + if (vm_page_pa_tryrelock(pmap, pa, locked_pa)) + goto retry; + } else + PA_UNLOCK_COND(*locked_pa); + PMAP_UNLOCK(pmap); + return (val); } void From owner-svn-src-head@freebsd.org Thu Jul 26 16:15: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 A238110539BF; Thu, 26 Jul 2018 16:15:59 +0000 (UTC) (envelope-from prvs=738e045eb=roger.pau@citrix.com) Received: from SMTP.EU.CITRIX.COM (smtp.ctxuk.citrix.com [185.25.65.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.citrix.com", Issuer "DigiCert SHA2 Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D5A2A96781; Thu, 26 Jul 2018 16:15:58 +0000 (UTC) (envelope-from prvs=738e045eb=roger.pau@citrix.com) X-IronPort-AV: E=Sophos;i="5.51,405,1526342400"; d="scan'208";a="76756251" Date: Thu, 26 Jul 2018 18:15:46 +0200 From: Roger Pau =?utf-8?B?TW9ubsOp?= To: Ian Lepore CC: , , Subject: Re: svn commit: r336526 - head Message-ID: <20180726161546.kts5tjbow7wfzhyk@mac.bytemobile.com> References: <201807200044.w6K0i4QQ079894@repo.freebsd.org> <20180726135806.foqjgb555vhwhqun@mac.bytemobile.com> <1532616552.61594.23.camel@freebsd.org> <20180726145412.zp4zjznpwmhbaj65@mac.bytemobile.com> <1532617518.61594.31.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: <1532617518.61594.31.camel@freebsd.org> User-Agent: NeoMutt/20180716 X-ClientProxiedBy: AMSPEX02CAS02.citrite.net (10.69.22.113) To AMSPEX02CL02.citrite.net (10.69.22.126) 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: Thu, 26 Jul 2018 16:16:00 -0000 On Thu, Jul 26, 2018 at 09:05:18AM -0600, Ian Lepore wrote: > On Thu, 2018-07-26 at 16:54 +0200, Roger Pau Monné wrote: > > On Thu, Jul 26, 2018 at 08:49:12AM -0600, Ian Lepore wrote: > > > > > > On Thu, 2018-07-26 at 15:58 +0200, Roger Pau Monné wrote: > > > > > > > > On Fri, Jul 20, 2018 at 12:44:04AM +0000, Ian Lepore wrote: > > > > > > > > > > > > > > > Author: ian > > > > > Date: Fri Jul 20 00:44:04 2018 > > > > > New Revision: 336526 > > > > > URL: https://svnweb.freebsd.org/changeset/base/336526 > > > > > > > > > > Log: > > > > >   Add ntpd to the list of users/groups to check before > > > > > installing. > > > > The Xen CI loop is getting this when trying to create dist media > > > > for HEAD FreeBSD (`make -C release ftp`): > > > > > > > > + LC_ALL=C > > > > + export LC_ALL > > > > + > > > > PATH=/usr/lib/ccache:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbi > > > > n:/u > > > > sr/local/bin:/root/bin:/usr/lib/git-core > > > > + http_proxy=http://cache:3128/ > > > > + export http_proxy > > > > + https_proxy=http://cache:3128/ > > > > + export https_proxy > > > > + exec > > > > + cd /home/osstest/build.125515.build-amd64-freebsd > > > > + rm -f build-ok-stamp > > > > + cd freebsd > > > > + export 'MAKEOBJDIRPREFIX=/home/osstest/build.125515.build- > > > > amd64- > > > > freebsd/obj' > > > > + export 'TARGET=amd64' > > > > + make -C release ftp -DWITHOUT_AUTO_OBJ > > > > + tee ../release-ftp-log > > > > mkdir -p dist > > > > cd /usr/home/osstest/build.125515.build-amd64- > > > > freebsd/freebsd/release/.. && make TARGET_ARCH=amd64 TARGET=amd64 > > > > distributeworld DISTDIR=/usr/home/osstest/build.125515.build- > > > > amd64- > > > > freebsd/freebsd/release/dist > > > > make[2]: "/usr/home/osstest/build.125515.build-amd64- > > > > freebsd/obj/usr/home/osstest/build.125515.build-amd64- > > > > freebsd/freebsd/amd64.amd64/toolchain-metadata.mk" line 1: Using > > > > cached toolchain metadata from build at  on Mon Jul 23 10:29:23 > > > > UTC > > > > 2018 > > > > ERROR: Required ntpd user is missing, see /usr/src/UPDATING. > > > > *** Error code 1 > > > > > > > > Stop. > > > > make[2]: stopped in /usr/home/osstest/build.125515.build-amd64- > > > > freebsd/freebsd > > > > *** Error code 1 > > > > > > > > Stop. > > > > make[1]: stopped in /usr/home/osstest/build.125515.build-amd64- > > > > freebsd/freebsd > > > > *** Error code 1 > > > > > > > > Stop. > > > > make: stopped in /usr/home/osstest/build.125515.build-amd64- > > > > freebsd/freebsd/release > > > > > > > > The full build log can be found at: > > > > > > > > http://logs.test-lab.xenproject.org/osstest/logs/125569/build-amd > > > > 64-f > > > > reebsd/7.ts-freebsd-build.log > > > > > > > > Note that it's ~100MB. > > > > > > > > Thanks, Roger. > > > > > > > If the script is creating a new distribution image from scratch, it > > > should be using -DDB_FROM_SRC on all distrib* and install* make > > > targets, to avoid using (and verifying against) the passwd database > > > on > > > the build system. > > Shouldn't then that be set by default for the ftp release target? > > The sole purpose of that target is to create the sets that go to the > > servers AFAICT. > > > > Or maybe it's the distributeworld target the one missing the > > DB_FROM_SRC? > > > > Roger. > > > > I don't know anything about the release scripts or how they work. > > I started down the path of trying to make the build system > automatically set DB_FROM_SRC if DESTDIR is anything other than "/", > but I realized that's wrong too... I occasionally mount an sdcard from > some embedded system on my build machine and update it from a > crossbuild using DESTDIR=/mnt, and in a case like that, using the > passwd database from the system being updated is the right thing to do > and DB_FROM_SRC isn't right (although it would work most of the time > for most people). > > Right now there's no way to even properly use the passwd data from the > target system, and when I tried to do that, I ran into other bugs. The > only options now are to use the running system even when it's not > what's being installed (clearly wrong) or use DB_FROM_SRC to bypass the > checks, but also bypass using the passwd data from the target system > (but it works okay as long as none of the names/uids < 1024 have been > changed on the target system/image). But when executing something like the distributeworld target there's nothing to check. You cannot check against the current DB, and there's no destination DB since you are just generating install sets. Hence I think that at least for distributeworld and maybe other targets DB_FROM_SRC should be set by default in order to restore previous behavior. Thanks, Roger. From owner-svn-src-head@freebsd.org Thu Jul 26 16:45: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 80099105486A; Thu, 26 Jul 2018 16:45:26 +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 2A21997778; Thu, 26 Jul 2018 16:45:26 +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 07C6B3F14; Thu, 26 Jul 2018 16:45:26 +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 w6QGjPmi023687; Thu, 26 Jul 2018 16:45:25 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6QGjPK9023685; Thu, 26 Jul 2018 16:45:25 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201807261645.w6QGjPK9023685@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Thu, 26 Jul 2018 16:45:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336742 - in head: etc sbin/dump X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: in head: etc sbin/dump X-SVN-Commit-Revision: 336742 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: Thu, 26 Jul 2018 16:45:26 -0000 Author: brd Date: Thu Jul 26 16:45:25 2018 New Revision: 336742 URL: https://svnweb.freebsd.org/changeset/base/336742 Log: Move dumpdates creation to CONFS= Approved by: bapt (mentor) Differential Revision: https://reviews.freebsd.org/D16435 Modified: head/etc/Makefile head/sbin/dump/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Thu Jul 26 16:08:34 2018 (r336741) +++ head/etc/Makefile Thu Jul 26 16:45:25 2018 (r336742) @@ -296,8 +296,6 @@ distribution: ${INSTALL_SYMLINK} mail/aliases ${DESTDIR}/etc/aliases; \ fi .endif - ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \ - ${DESTDIR}/etc/dumpdates .if ${MK_LOCATE} != "no" ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \ ${DESTDIR}/var/db/locate.database Modified: head/sbin/dump/Makefile ============================================================================== --- head/sbin/dump/Makefile Thu Jul 26 16:08:34 2018 (r336741) +++ head/sbin/dump/Makefile Thu Jul 26 16:45:25 2018 (r336742) @@ -15,6 +15,10 @@ PACKAGE=runtime PROG= dump +CONFS= /dev/null +CONFSGRP= operator +CONFSMODE= 664 +CONFSNAME_/dev/null= dumpdates LINKS= ${BINDIR}/dump ${BINDIR}/rdump CFLAGS+=-DRDUMP SRCS= itime.c main.c optr.c dumprmt.c tape.c traverse.c unctime.c cache.c From owner-svn-src-head@freebsd.org Thu Jul 26 16:51: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 F27FB1054BA2; Thu, 26 Jul 2018 16:51:26 +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 0AE2997DB5; Thu, 26 Jul 2018 16:51:25 +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 DDEBC3F5E; Thu, 26 Jul 2018 16:51:24 +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 w6QGpOFC025150; Thu, 26 Jul 2018 16:51:24 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6QGpO82025148; Thu, 26 Jul 2018 16:51:24 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201807261651.w6QGpO82025148@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Thu, 26 Jul 2018 16:51:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336743 - in head: etc usr.sbin/apmd X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: in head: etc usr.sbin/apmd X-SVN-Commit-Revision: 336743 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: Thu, 26 Jul 2018 16:51:27 -0000 Author: brd Date: Thu Jul 26 16:51:23 2018 New Revision: 336743 URL: https://svnweb.freebsd.org/changeset/base/336743 Log: Move apmd.conf to CONFS in usr.sbin/apmd which simplifies this nicely. Approved by: bapt (mentor) Differential Revision: https://reviews.freebsd.org/D16431 Added: head/usr.sbin/apmd/apmd.conf - copied unchanged from r336742, head/etc/apmd.conf Deleted: head/etc/apmd.conf Modified: head/etc/Makefile head/usr.sbin/apmd/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Thu Jul 26 16:45:25 2018 (r336742) +++ head/etc/Makefile Thu Jul 26 16:51:23 2018 (r336743) @@ -76,12 +76,6 @@ BSM_ETC_DIR= ${DESTDIR}/etc/security BIN1+= amd.map .endif -.if ${MACHINE} == "i386" -.if ${MK_APM} != "no" -BIN1+= apmd.conf -.endif -.endif - .if ${MK_AUTOFS} != "no" BIN1+= auto_master .endif Modified: head/usr.sbin/apmd/Makefile ============================================================================== --- head/usr.sbin/apmd/Makefile Thu Jul 26 16:45:25 2018 (r336742) +++ head/usr.sbin/apmd/Makefile Thu Jul 26 16:51:23 2018 (r336743) @@ -1,5 +1,6 @@ # $FreeBSD$ +CONFS= apmd.conf PROG= apmd MAN= apmd.8 MANSUBDIR= /i386 Copied: head/usr.sbin/apmd/apmd.conf (from r336742, head/etc/apmd.conf) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/apmd/apmd.conf Thu Jul 26 16:51:23 2018 (r336743, copy of r336742, head/etc/apmd.conf) @@ -0,0 +1,55 @@ +# apmd Configuration File +# +# $FreeBSD$ +# + +apm_event SUSPENDREQ { + exec "/etc/rc.suspend apm suspend"; +} + +apm_event USERSUSPENDREQ { + exec "sync && sync && sync"; + exec "sleep 1"; + exec "apm -z"; +} + +apm_event NORMRESUME { + exec "/etc/rc.resume apm suspend"; +} + +apm_event STANDBYRESUME { + exec "/etc/rc.resume apm standby"; +} + +# resume event configuration for serial mouse users by +# reinitializing a moused(8) connected to a serial port. +# +#apm_event NORMRESUME { +# exec "kill -HUP `cat /var/run/moused.pid`"; +#} + +# suspend request event configuration for ATA HDD users: +# execute standby instead of suspend. +# +#apm_event SUSPENDREQ { +# reject; +# exec "sync && sync && sync"; +# exec "sleep 1"; +# exec "apm -Z"; +#} + +# Sample entries for battery state monitoring +#apm_battery 5% discharging { +# exec "logger -p user.emerg battery status critical!"; +# exec "echo T250L8CE-GE-C >/dev/speaker"; +#} +#apm_battery 1% discharging { +# exec "logger -p user.emerg battery low - emergency suspend"; +# exec "echo T250L16B+BA+AG+GF+FED+DC+CC >/dev/speaker"; +# exec "apm -z"; +#} +#apm_battery 99% charging { +# exec "logger -p user.notice battery fully charged"; +#} + +# apmd Configuration ends here From owner-svn-src-head@freebsd.org Thu Jul 26 17: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 CDB8E1055051; Thu, 26 Jul 2018 17:05: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 83A7770564; Thu, 26 Jul 2018 17:05:34 +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 6623142A5; Thu, 26 Jul 2018 17:05:34 +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 w6QH5Yke034824; Thu, 26 Jul 2018 17:05:34 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6QH5Y1D034822; Thu, 26 Jul 2018 17:05:34 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201807261705.w6QH5Y1D034822@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Thu, 26 Jul 2018 17:05:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336744 - in head: sbin/pfctl/tests/files share/mk X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: in head: sbin/pfctl/tests/files share/mk X-SVN-Commit-Revision: 336744 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: Thu, 26 Jul 2018 17:05:35 -0000 Author: brd Date: Thu Jul 26 17:05:33 2018 New Revision: 336744 URL: https://svnweb.freebsd.org/changeset/base/336744 Log: Convert bsd.files.mk to support DIRS and simplify by only having one install target. Also update the pfctl tests Makefile to work with this change. Approved by: bapt (mentor) Differential Revision: https://reviews.freebsd.org/D16430 Modified: head/sbin/pfctl/tests/files/Makefile head/share/mk/bsd.files.mk Modified: head/sbin/pfctl/tests/files/Makefile ============================================================================== --- head/sbin/pfctl/tests/files/Makefile Thu Jul 26 16:51:23 2018 (r336743) +++ head/sbin/pfctl/tests/files/Makefile Thu Jul 26 17:05:33 2018 (r336744) @@ -4,9 +4,7 @@ TESTSDIR= ${TESTSBASE}/sbin/pfctl/files BINDIR= ${TESTSDIR} # We use ${.CURDIR} as workaround so that the glob patterns work. -FILES= ${.CURDIR}/pf????.in -FILES+= ${.CURDIR}/pf????.include -FILES+= ${.CURDIR}/pf????.ok +FILES!= echo ${.CURDIR}/pf????.in ${.CURDIR}/pf????.include ${.CURDIR}/pf????.ok FILES+= ${.CURDIR}/pfctl_test_descr.sh .include Modified: head/share/mk/bsd.files.mk ============================================================================== --- head/share/mk/bsd.files.mk Thu Jul 26 16:51:23 2018 (r336743) +++ head/share/mk/bsd.files.mk Thu Jul 26 17:05:33 2018 (r336744) @@ -5,6 +5,10 @@ .endif .if !target(____) +.if target(____) +.error bsd.dirs.mk must be included after bsd.files.mk. +.endif + ____: FILESGROUPS?= FILES @@ -31,7 +35,7 @@ ${group}OWN= ${SHAREOWN} ${group}GRP= ${SHAREGRP} .endif ${group}MODE?= ${SHAREMODE} -${group}DIR?= ${BINDIR} +${group}DIR?= BINDIR STAGE_SETS+= ${group:C,[/*],_,g} STAGE_DIR.${group:C,[/*],_,g}= ${STAGE_OBJTOP}${${group}DIR} @@ -43,71 +47,72 @@ ${group}TAG_ARGS= -T ${${group}TAGS:[*]:S/ /,/g} .endif -_${group}FILES= -.for file in ${${group}} -.if defined(${group}OWN_${file:T}) || defined(${group}GRP_${file:T}) || \ - defined(${group}MODE_${file:T}) || defined(${group}DIR_${file:T}) || \ - defined(${group}NAME_${file:T}) || defined(${group}NAME) -${group}OWN_${file:T}?= ${${group}OWN} -${group}GRP_${file:T}?= ${${group}GRP} -.if ${MK_INSTALL_AS_USER} == "yes" -${group}OWN_${file:T}= ${SHAREOWN} -${group}GRP_${file:T}= ${SHAREGRP} -.endif -${group}MODE_${file:T}?= ${${group}MODE} -${group}DIR_${file:T}?= ${${group}DIR} -.if defined(${group}NAME) -${group}NAME_${file:T}?= ${${group}NAME} +.if ${${group}DIR:S/^\///} == ${${group}DIR} +# ${group}DIR specifies a variable that specifies a path +DIRS+= ${${group}DIR} +_${group}DIR= ${${group}DIR} .else -${group}NAME_${file:T}?= ${file:T} +# ${group}DIR specifies a path +DIRS+= ${group}DIR +_${group}DIR= ${group}DIR .endif -STAGE_AS_SETS+= ${file:T} -STAGE_AS_${file:T}= ${${group}NAME_${file:T}} -# XXX {group}OWN,GRP,MODE -STAGE_DIR.${file:T}= ${STAGE_OBJTOP}${${group}DIR_${file:T}} -stage_as.${file:T}: ${file} -installfiles-${group}: installdirs-${group} _${group}INS_${file:T} -_${group}INS_${file:T}: ${file} - ${INSTALL} ${${group}TAG_ARGS} -o ${${group}OWN_${.ALLSRC:T}} \ - -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \ - ${.ALLSRC} \ - ${DESTDIR}${${group}DIR_${.ALLSRC:T}}/${${group}NAME_${.ALLSRC:T}} -.else -_${group}FILES+= ${file} -.endif -.endfor +.for file in ${${group}} +${group}OWN_${file}?= ${${group}OWN} +${group}GRP_${file}?= ${${group}GRP} +.if ${MK_INSTALL_AS_USER} == "yes" +${group}OWN_${file}= ${SHAREOWN} +${group}GRP_${file}= ${SHAREGRP} +.endif # ${MK_INSTALL_AS_USER} == "yes" +${group}MODE_${file}?= ${${group}MODE} -installdirs-${group}: - @${ECHO} installing dirs ${group}DIR ${${group}DIR} -.for dir in ${${group}DIR} -.if defined(NO_ROOT) - ${INSTALL} ${${group}TAG_ARGS} -d ${DESTDIR}${dir} +# Determine the directory for the current file. Default to the parent group +# DIR, then check to see how to pass that variable on below. +${group}DIR_${file}?= ${${group}DIR} +.if ${${group}DIR_${file}:S/^\///} == ${${group}DIR_${file}} +# DIR specifies a variable that specifies a path +_${group}DIR_${file}= ${${group}DIR_${file}} .else - ${INSTALL} ${${group}TAG_ARGS} -d -o ${DIROWN} -g ${DIRGRP} \ - -m ${DIRMODE} ${DESTDIR}${dir} +# DIR directly specifies a path +_${group}DIR_${file}= ${group}DIR_${file} .endif -.endfor +${group}PREFIX_${file}= ${DESTDIR}${${_${group}DIR_${file}}} - -.if !empty(_${group}FILES) -stage_files.${group}: ${_${group}FILES} - -installfiles-${group}: installdirs-${group} _${group}INS -_${group}INS: ${_${group}FILES} -.if defined(${group}NAME) - ${INSTALL} ${${group}TAG_ARGS} -o ${${group}OWN} -g ${${group}GRP} \ - -m ${${group}MODE} ${.ALLSRC} \ - ${DESTDIR}${${group}DIR}/${${group}NAME} +# Append DIR to DIRS if not already in place -- DIRS is already filtered, so +# this is primarily to ease inspection. +.for d in ${DIRS} +_DIRS+= ${${d}} +.endfor +.if ${DIRS:M${_${group}DIR_${file}}} == "" +.if ${_DIRS:M${${_${group}DIR_${file}}}} == "" +DIRS+= ${_${group}DIR_${file}} .else - ${INSTALL} ${${group}TAG_ARGS} -o ${${group}OWN} -g ${${group}GRP} \ - -m ${${group}MODE} ${.ALLSRC} ${DESTDIR}${${group}DIR}/ +_${group}DIR_${file}= ${group}DIR .endif .endif +.if defined(${group}NAME) +${group}NAME_${file}?= ${${group}NAME} +.else +${group}NAME_${file}?= ${file:T} +.endif # defined(${group}NAME) +STAGE_AS_SETS+= ${file} +STAGE_AS_${file}= ${${group}NAME_${file}} +# XXX {group}OWN,GRP,MODE +STAGE_DIR.${file}= ${STAGE_OBJTOP}${${group}DIR_${file}} +stage_as.${file}: ${file} + +installfiles-${group}: _${group}INS1_${file} +_${group}INS1_${file}: installdirs-${_${group}DIR_${file}} _${group}INS_${file} +_${group}INS_${file}: ${file} + ${INSTALL} ${${group}TAG_ARGS} -o ${${group}OWN_${file}} \ + -g ${${group}GRP_${file}} -m ${${group}MODE_${file}} \ + ${.ALLSRC} ${${group}PREFIX_${file}}/${${group}NAME_${file}} +.endfor # file in ${${group}} + .endif # defined(${group}) && !empty(${group}) -.endfor +.endfor # .for group in ${FILESGROUPS} realinstall: installfiles .ORDER: beforeinstall installfiles From owner-svn-src-head@freebsd.org Thu Jul 26 17:09: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 43227105512E for ; Thu, 26 Jul 2018 17:09:42 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) (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 B2C3A7076B for ; Thu, 26 Jul 2018 17:09:41 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-wr1-x443.google.com with SMTP id v14-v6so2445521wro.5 for ; Thu, 26 Jul 2018 10:09:41 -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=EbjN3wxPYwSvfQ/nKCYnssb0pHNG2NufvHGsEhrZI2U=; b=JpjfRRcmcqGi+9JaXsKEUumYXf8ktoR2UDQGQw/mMIVXnDJAT3oiLS7wY3nwREq1QD UjvZFikT52SovfIcCKFEooXVjoFeDAZ2PP2PnhZWQk5Uml/IuwSJYufRQ5bXnvPaVOTA b6nr11JKRAWcPacr+QnKbcRqqvJketw1hbjjHORFR64ySR9wxLOQubc+phB9zI3B8N+1 bOkJzEmAGvQdTlO8icsjgHyaq1GKgA0GsOO6CrUiaBCmDIeptP0Cy/cFo6y8Jms1NSDJ 207Ptk6e9o06XxhWokqckc+MmZpwPfAh8qQgt2gBPzsFoQDWjL8WD0njHgqf0t0uv7sG Meuw== 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=EbjN3wxPYwSvfQ/nKCYnssb0pHNG2NufvHGsEhrZI2U=; b=P4pOnxWOyR+5xXqNZuXr3rf7RpZ00RJRhcww33dkyic7CPT0xDVbqbChPfNLTF+3un mRMboSURJyyg5AMOs4OB9n+GCEElCMG+nrTYQNXIMY2+Lar8HekywNYYhO5/oKa2rEA6 s/Xiy6T/PUNwFrrnSU0DwWXqjk1rHeE9rmKqhNDVKMlgVe4ex7JTIGLVKosw3nmhcq6b 7bYGH/cS7PO6fO/vH09SwRmLL2hAd02S2kibGHoTETghZZZPh9Sb42knACu4en8rdA8v CUEeuzggoq41oX9bp/sHNmextnEOaNoQyu17P183Puw3HUHOl3MOpKgNKzS0gV6jknx9 siEg== X-Gm-Message-State: AOUpUlGhOJkxOsaFHVK127iipDeqPzRWDrlxomVfblLmz7X/JWiSoYaI cU1jNSFzDjt2GeJNG88o3adnnA== X-Google-Smtp-Source: AAOMgpcXt5hBz4C7FzSXWL2Fuy1VeukRXVqKbuZo/hIylRWbnX5cdV6SHPxfdNghFwPIlwYV+PsjPQ== X-Received: by 2002:adf:b786:: with SMTP id s6-v6mr2168071wre.247.1532624980575; Thu, 26 Jul 2018 10:09:40 -0700 (PDT) Received: from mutt-hbsd ([185.220.102.8]) by smtp.gmail.com with ESMTPSA id r18-v6sm1316523wmh.28.2018.07.26.10.09.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jul 2018 10:09:39 -0700 (PDT) Date: Thu, 26 Jul 2018 13:09:00 -0400 From: Shawn Webb To: Brad Davis Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336744 - in head: sbin/pfctl/tests/files share/mk Message-ID: <20180726170900.twg3qeh34wmaerul@mutt-hbsd> References: <201807261705.w6QH5Y1D034822@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="t767piocp6ckdx67" Content-Disposition: inline In-Reply-To: <201807261705.w6QH5Y1D034822@repo.freebsd.org> 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/20180622 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: Thu, 26 Jul 2018 17:09:42 -0000 --t767piocp6ckdx67 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 26, 2018 at 05:05:34PM +0000, Brad Davis wrote: > Author: brd > Date: Thu Jul 26 17:05:33 2018 > New Revision: 336744 > URL: https://svnweb.freebsd.org/changeset/base/336744 >=20 > Log: > Convert bsd.files.mk to support DIRS and simplify by only having one in= stall > target. > =20 > Also update the pfctl tests Makefile to work with this change. > =20 > Approved by: bapt (mentor) > Differential Revision: https://reviews.freebsd.org/D16430 >=20 > Modified: > head/sbin/pfctl/tests/files/Makefile > head/share/mk/bsd.files.mk >=20 > Modified: head/sbin/pfctl/tests/files/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/sbin/pfctl/tests/files/Makefile Thu Jul 26 16:51:23 2018 (r33674= 3) > +++ head/sbin/pfctl/tests/files/Makefile Thu Jul 26 17:05:33 2018 (r33674= 4) > @@ -4,9 +4,7 @@ TESTSDIR=3D ${TESTSBASE}/sbin/pfctl/files > BINDIR=3D ${TESTSDIR} > =20 > # We use ${.CURDIR} as workaround so that the glob patterns work. > -FILES=3D ${.CURDIR}/pf????.in > -FILES+=3D ${.CURDIR}/pf????.include > -FILES+=3D ${.CURDIR}/pf????.ok > +FILES!=3D echo ${.CURDIR}/pf????.in ${.CURDIR}/pf????.include ${.CURDIR= }/pf????.ok Should this use ${ECHO} instead of echo? Thanks, --=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 --t767piocp6ckdx67 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAltaACsACgkQaoRlj1JF bu7+tw/9H0Ij3KoYc2jiRLZNZaMnixhkhYbVOP8I0/u7kWjIzxIECfcivHtdxo68 XojO+kdeKfjC+yjOmsZGUdOa8ZGmSRIVRbTYKTx4dyn06/9GJJVhiyhOlLsI8ra5 QggjQZ0dL0WYyhr4FdG6ys242gFDp4VAFaOpfzN/vzZCENIZ1DmUIjx7B+Cf8MIS OHPqGkz3KRkAIaQ2tKPQsCrcPaOpSzO1JbTfX21uH258sGLQ7hYRAVSKzIFXNKOk jGuh1ILJKTBk5gG4y73IqLVuj0YU/0GAYFq6I7ZZdDm9/IJ2mLNBfNizaLYrt0s9 jqLUjKoxhRXlX8eFEI7HpuUS3dZ8QANibyMeI6VPsFvVIydI7ihFyz/DIFin4Pwi g8OCbrT6yrftgGNPL1U8mKaQ8m/c4jA4AzPobWHskkw667s3CI2oAVCKw3/VXRpW ZpBxmrHYaGeyMTjvgAc50J6/689H1LE3kQemMvOw1rKP78ND9Qq/q62zXKL52qsO x5ntE3EoAJfIQvIOH1BJ/BDd156sUxLbqW/VBTjJik3E18Hypj+4BgThuT41ukRt VV4ETOS8nTQZpQnJZBCdL8+09CjhVq8aYbLuetn+NP5xn5y6bTn8gm68PxPNyHwA dscBlxDuot87kOuZ1tyCqyoVbBxzEhU6b2eSrfnAU5wc92jp5zo= =dCHd -----END PGP SIGNATURE----- --t767piocp6ckdx67-- From owner-svn-src-head@freebsd.org Thu Jul 26 17:11: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 A748710552F6; Thu, 26 Jul 2018 17:11:15 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) (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 48AD770985; Thu, 26 Jul 2018 17:11:15 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 5C33E32F; Thu, 26 Jul 2018 13:11:06 -0400 (EDT) Received: from web4 ([10.202.2.214]) by compute5.internal (MEProxy); Thu, 26 Jul 2018 13:11:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=8UsyGK j6eEFjERDo/cfdCG4IUTbhwkDh8FUNhnIdAnY=; b=Kr6FydO0c4wBj2IaOHOJ0D u52qntgbepQ/TGqrV0mrmbRytvF331EkOAbIKWH1y76GZ7X8V1Evz+XB3eu4EyPO HEIbNPyxRFELPRcovDXE+TVMP6Y19RhdJSLfqCmgIa5RWXczmIulIoOMsnwpTEIy J2YkNdEw2AfJRgxETVNzG7CSfGhnuIXOvYXS6BYZUffkBJL7qM0hgObBVHIytJr/ ihaAZbM9tsMia8/lxJFwf2clMeh9nutd4iPylkjPeQd1FxzRN2UooIfr/Plo+cfW oV8uOimvCcU2ik81lQK+1X7a0ZXhfX0da6x+9N4NVtCp8KHhYoCcVdbjca0ZfCfw == X-ME-Proxy: X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id AA529BA4CF; Thu, 26 Jul 2018 13:11:05 -0400 (EDT) Message-Id: <1532625065.2234037.1453936096.39AD7179@webmail.messagingengine.com> From: Brad Davis To: Shawn Webb Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-0843ff3e Date: Thu, 26 Jul 2018 11:11:05 -0600 In-Reply-To: <20180726170900.twg3qeh34wmaerul@mutt-hbsd> References: <201807261705.w6QH5Y1D034822@repo.freebsd.org> <20180726170900.twg3qeh34wmaerul@mutt-hbsd> Subject: Re: svn commit: r336744 - in head: sbin/pfctl/tests/files share/mk 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: Thu, 26 Jul 2018 17:11:15 -0000 On Thu, Jul 26, 2018, at 11:09 AM, Shawn Webb wrote: > On Thu, Jul 26, 2018 at 05:05:34PM +0000, Brad Davis wrote: > > Author: brd > > Date: Thu Jul 26 17:05:33 2018 > > New Revision: 336744 > > URL: https://svnweb.freebsd.org/changeset/base/336744 > > > > Log: > > Convert bsd.files.mk to support DIRS and simplify by only having one install > > target. > > > > Also update the pfctl tests Makefile to work with this change. > > > > Approved by: bapt (mentor) > > Differential Revision: https://reviews.freebsd.org/D16430 > > > > Modified: > > head/sbin/pfctl/tests/files/Makefile > > head/share/mk/bsd.files.mk > > > > Modified: head/sbin/pfctl/tests/files/Makefile > > ============================================================================== > > --- head/sbin/pfctl/tests/files/Makefile Thu Jul 26 16:51:23 2018 (r336743) > > +++ head/sbin/pfctl/tests/files/Makefile Thu Jul 26 17:05:33 2018 (r336744) > > @@ -4,9 +4,7 @@ TESTSDIR= ${TESTSBASE}/sbin/pfctl/files > > BINDIR= ${TESTSDIR} > > > > # We use ${.CURDIR} as workaround so that the glob patterns work. > > -FILES= ${.CURDIR}/pf????.in > > -FILES+= ${.CURDIR}/pf????.include > > -FILES+= ${.CURDIR}/pf????.ok > > +FILES!= echo ${.CURDIR}/pf????.in ${.CURDIR}/pf????.include ${.CURDIR}/pf????.ok > > Should this use ${ECHO} instead of echo? No, that wouldn't work at all with the !=. Regards, Brad Davis From owner-svn-src-head@freebsd.org Thu Jul 26 17:15: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 99F5C105541F for ; Thu, 26 Jul 2018 17:15:53 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) (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 0081C70E59 for ; Thu, 26 Jul 2018 17:15:52 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-wr1-x444.google.com with SMTP id h9-v6so2466067wro.3 for ; Thu, 26 Jul 2018 10:15:52 -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=IwWEA/dj8ziqPAv+0+m++CSkX98rMZaJaB4azMkwg40=; b=bTP/npLQiP8TJgmT8wB8X+vmw+ev+o/8kRnZOQXT78lYcRswtn4pmfd3LiQqOt7k7J HnQZBHvv6XGV8ZrzVlZ0HywW8jvqzxSn7eguqlSm7pV3WYgrlElTYFW58Zmu7Ot/7dET dbPyA23cgR9mxuYVIHWHwzBak6+KsQv8LDPLK4EI6Edqe+wCiK6aByzEpZL0rT07a/VV yDw6ZNF74A/zmz72Bjnh7lW7kBjJqIZQe2WsDP+VEeuplPPUM98UB1me6u8rU33Vt+cQ +BEVNs8vFSfj43POFQvPEfrkbLgklWv8SQqmVOa9uCes1RFtSNkhzgu0/iYbswuqrbxy ul2Q== 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=IwWEA/dj8ziqPAv+0+m++CSkX98rMZaJaB4azMkwg40=; b=oycqWBLVQiUfz+EZNKsB/5/oYOtalaqKpi0GyU/dAtE4TV/f5M6rmyQzZLh0cvwQZw TZpBIAMzR+Z3gWFcRaNg876x729KTDXP9mnbTfJ2pYsiMP5iv7il2mxIWwsfNsVVxVzc kKjm/VahDYabSQDYCFXZXtIAkJSvDdWWCmC/OLsgCYDCDy8gDGgrsw+gZV69cSx9syxY lR3YwH/CVN9dr1226FLWtVwZNgevdLwPfyXHvpL6/LqGH08r8bhaIf6OS2T6jqyJOuN7 UYJvbNsC0yXl0yqfxGWjl41in5blW6mmq7RTx0+EhiJwAKLUlveOsC4YXpwCeHgLqids JkVQ== X-Gm-Message-State: AOUpUlFPSVGU/eR0IIJtKcmXdmDWOQjrjjLPOeZFXvHOZhyowBUGR6lv 1VZFpAbVcd+Niq6G8Lehk7Az06jf7JPEJQ== X-Google-Smtp-Source: AAOMgpcj5S+BYEUlQa2mtaDjwgpqvDAoSi1Y21h/qMGHZ3MtUAwHy2YAzsbeokgNoFbDR6zukqJjVQ== X-Received: by 2002:a5d:4643:: with SMTP id j3-v6mr2218351wrs.52.1532625351861; Thu, 26 Jul 2018 10:15:51 -0700 (PDT) Received: from mutt-hbsd ([185.220.102.8]) by smtp.gmail.com with ESMTPSA id v5-v6sm3583969wrp.87.2018.07.26.10.15.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Jul 2018 10:15:51 -0700 (PDT) Date: Thu, 26 Jul 2018 13:15:11 -0400 From: Shawn Webb To: Brad Davis Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336744 - in head: sbin/pfctl/tests/files share/mk Message-ID: <20180726171511.fysn3u5la2l2t3ht@mutt-hbsd> References: <201807261705.w6QH5Y1D034822@repo.freebsd.org> <20180726170900.twg3qeh34wmaerul@mutt-hbsd> <1532625065.2234037.1453936096.39AD7179@webmail.messagingengine.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="nlttwvream3k6wiz" Content-Disposition: inline In-Reply-To: <1532625065.2234037.1453936096.39AD7179@webmail.messagingengine.com> 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/20180622 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: Thu, 26 Jul 2018 17:15:53 -0000 --nlttwvream3k6wiz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 26, 2018 at 11:11:05AM -0600, Brad Davis wrote: > On Thu, Jul 26, 2018, at 11:09 AM, Shawn Webb wrote: > > On Thu, Jul 26, 2018 at 05:05:34PM +0000, Brad Davis wrote: > > > Author: brd > > > Date: Thu Jul 26 17:05:33 2018 > > > New Revision: 336744 > > > URL: https://svnweb.freebsd.org/changeset/base/336744 > > >=20 > > > Log: > > > Convert bsd.files.mk to support DIRS and simplify by only having on= e install > > > target. > > > =20 > > > Also update the pfctl tests Makefile to work with this change. > > > =20 > > > Approved by: bapt (mentor) > > > Differential Revision: https://reviews.freebsd.org/D16430 > > >=20 > > > Modified: > > > head/sbin/pfctl/tests/files/Makefile > > > head/share/mk/bsd.files.mk > > >=20 > > > Modified: head/sbin/pfctl/tests/files/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/sbin/pfctl/tests/files/Makefile Thu Jul 26 16:51:23 2018 (r3= 36743) > > > +++ head/sbin/pfctl/tests/files/Makefile Thu Jul 26 17:05:33 2018 (r3= 36744) > > > @@ -4,9 +4,7 @@ TESTSDIR=3D ${TESTSBASE}/sbin/pfctl/files > > > BINDIR=3D ${TESTSDIR} > > > =20 > > > # We use ${.CURDIR} as workaround so that the glob patterns work. > > > -FILES=3D ${.CURDIR}/pf????.in > > > -FILES+=3D ${.CURDIR}/pf????.include > > > -FILES+=3D ${.CURDIR}/pf????.ok > > > +FILES!=3D echo ${.CURDIR}/pf????.in ${.CURDIR}/pf????.include ${.CU= RDIR}/pf????.ok > >=20 > > Should this use ${ECHO} instead of echo? >=20 > No, that wouldn't work at all with the !=3D. I thought that might be the case, but I just wanted to make sure. Thanks for the clarification. --=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 --nlttwvream3k6wiz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAltaAZ8ACgkQaoRlj1JF bu5PFg//emYQVZjVR+Kd4f7b/EkIh8yqGHCo/qM3jqwxOGMPjBcyeQFcTqj8CCKR RumK8ZQfcxgWuDiGe4C2sroYgiAQaW1bdN9eXwH6qBC5ju7UI4gHTti48p41q0ik nO26ifpeONyE8CxwryxJh036HIBkNZwInm5fRLGoo29Qe0J76PUSzmtb8Lzrovyg r/9pLeDF56qg268y0HmkHuPFLKI9sNOx2wJYUvjNF36UE3E+zWTqxGO6EhKmwF7U ZRJmXEhSclSylLuQpQIhKuoOJlrDPHlnQvsOaSLDj/DIN/iXehBXweYO7/O9TWli r1AKFU45rZi4oR9jXUeicBFRNhPUd2UZ7fR7j5mN8qBvb41vNMBI6KeS5F9cWz9L lw7wOhje0k001LiNwI7h64PaEXOFibaAfntLstAG3wfuQ02/U5iTN2+burQ3//6V AUmInsuR0xiNgATfP3sdZ9iRHE/Ji3LYuXh20/AWN4VAgWVyB0wdPvltwxQvEwDI AdOmAzRviw0jJ2YF9myOPf86tcbhOXBe/JM+Ol7/o0DZq3sI90M0gAjfYG8LVsll 0NHyFNprKjeE2BdO9ahn/6QUC7fF1mff1NVTcy8YvOFtpqZgV14Kf1aYMP57s1bP VVmJy3il8EU6X8svtnw/nRzrFezGJ+oUeK1XgZUW6EQYCJ1Cq5s= =5Ms6 -----END PGP SIGNATURE----- --nlttwvream3k6wiz-- From owner-svn-src-head@freebsd.org Thu Jul 26 17:41: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 2C3161055A8A; Thu, 26 Jul 2018 17:41:53 +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 B80DE71BD1; Thu, 26 Jul 2018 17:41:52 +0000 (UTC) (envelope-from brooks@spindle.one-eyed-alien.net) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id 394F35A9F16; Thu, 26 Jul 2018 17:41:46 +0000 (UTC) Date: Thu, 26 Jul 2018 17:41:46 +0000 From: Brooks Davis To: Roger Pau Monn?? Cc: Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336526 - head Message-ID: <20180726174146.GA63738@spindle.one-eyed-alien.net> References: <201807200044.w6K0i4QQ079894@repo.freebsd.org> <20180726135806.foqjgb555vhwhqun@mac.bytemobile.com> <1532616552.61594.23.camel@freebsd.org> <20180726145412.zp4zjznpwmhbaj65@mac.bytemobile.com> <1532617518.61594.31.camel@freebsd.org> <20180726161546.kts5tjbow7wfzhyk@mac.bytemobile.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vkogqOf2sHV7VnPd" Content-Disposition: inline In-Reply-To: <20180726161546.kts5tjbow7wfzhyk@mac.bytemobile.com> User-Agent: Mutt/1.9.4 (2018-02-28) 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: Thu, 26 Jul 2018 17:41:53 -0000 --vkogqOf2sHV7VnPd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 26, 2018 at 06:15:46PM +0200, Roger Pau Monn?? wrote: > On Thu, Jul 26, 2018 at 09:05:18AM -0600, Ian Lepore wrote: > > On Thu, 2018-07-26 at 16:54 +0200, Roger Pau Monn? wrote: > > > On Thu, Jul 26, 2018 at 08:49:12AM -0600, Ian Lepore wrote: > > > >=20 > > > > On Thu, 2018-07-26 at 15:58 +0200, Roger Pau Monn? wrote: > > > > >=20 > > > > > On Fri, Jul 20, 2018 at 12:44:04AM +0000, Ian Lepore wrote: > > > > > >=20 > > > > > >=20 > > > > > > Author: ian > > > > > > Date: Fri Jul 20 00:44:04 2018 > > > > > > New Revision: 336526 > > > > > > URL: https://svnweb.freebsd.org/changeset/base/336526 > > > > > >=20 > > > > > > Log: > > > > > > ? Add ntpd to the list of users/groups to check before > > > > > > installing. > > > > > The Xen CI loop is getting this when trying to create dist media > > > > > for HEAD FreeBSD (`make -C release ftp`): > > > > >=20 > > > > > + LC_ALL=3DC > > > > > + export LC_ALL > > > > > + > > > > > PATH=3D/usr/lib/ccache:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/s= bi > > > > > n:/u > > > > > sr/local/bin:/root/bin:/usr/lib/git-core > > > > > + http_proxy=3Dhttp://cache:3128/ > > > > > + export http_proxy > > > > > + https_proxy=3Dhttp://cache:3128/ > > > > > + export https_proxy > > > > > + exec > > > > > + cd /home/osstest/build.125515.build-amd64-freebsd > > > > > + rm -f build-ok-stamp > > > > > + cd freebsd > > > > > + export 'MAKEOBJDIRPREFIX=3D/home/osstest/build.125515.build- > > > > > amd64- > > > > > freebsd/obj' > > > > > + export 'TARGET=3Damd64' > > > > > + make -C release ftp -DWITHOUT_AUTO_OBJ > > > > > + tee ../release-ftp-log > > > > > mkdir -p dist > > > > > cd /usr/home/osstest/build.125515.build-amd64- > > > > > freebsd/freebsd/release/.. && make TARGET_ARCH=3Damd64 TARGET=3Da= md64 > > > > > distributeworld DISTDIR=3D/usr/home/osstest/build.125515.build- > > > > > amd64- > > > > > freebsd/freebsd/release/dist > > > > > make[2]: "/usr/home/osstest/build.125515.build-amd64- > > > > > freebsd/obj/usr/home/osstest/build.125515.build-amd64- > > > > > freebsd/freebsd/amd64.amd64/toolchain-metadata.mk" line 1: Using > > > > > cached toolchain metadata from build at??on Mon Jul 23 10:29:23 > > > > > UTC > > > > > 2018 > > > > > ERROR: Required ntpd user is missing, see /usr/src/UPDATING. > > > > > *** Error code 1 > > > > >=20 > > > > > Stop. > > > > > make[2]: stopped in /usr/home/osstest/build.125515.build-amd64- > > > > > freebsd/freebsd > > > > > *** Error code 1 > > > > >=20 > > > > > Stop. > > > > > make[1]: stopped in /usr/home/osstest/build.125515.build-amd64- > > > > > freebsd/freebsd > > > > > *** Error code 1 > > > > >=20 > > > > > Stop. > > > > > make: stopped in /usr/home/osstest/build.125515.build-amd64- > > > > > freebsd/freebsd/release > > > > >=20 > > > > > The full build log can be found at: > > > > >=20 > > > > > http://logs.test-lab.xenproject.org/osstest/logs/125569/build-amd > > > > > 64-f > > > > > reebsd/7.ts-freebsd-build.log > > > > >=20 > > > > > Note that it's ~100MB. > > > > >=20 > > > > > Thanks, Roger. > > > > >=20 > > > > If the script is creating a new distribution image from scratch, it > > > > should be using -DDB_FROM_SRC on all distrib* and install* make > > > > targets, to avoid using (and verifying against) the passwd database > > > > on > > > > the build system. > > > Shouldn't then that be set by default for the ftp release target? > > > The sole purpose of that target is to create the sets that go to the > > > servers AFAICT. > > >=20 > > > Or maybe it's the distributeworld target the one missing the > > > DB_FROM_SRC? > > >=20 > > > Roger. > > >=20 > >=20 > > I don't know anything about the release scripts or how they work. > >=20 > > I started down the path of trying to make the build system > > automatically set DB_FROM_SRC if DESTDIR is anything other than "/", > > but I realized that's wrong too... I occasionally mount an sdcard from > > some embedded system on my build machine and update it from a > > crossbuild using DESTDIR=3D/mnt, and in a case like that, using the > > passwd database from the system being updated is the right thing to do > > and DB_FROM_SRC isn't right (although it would work most of the time > > for most people). > >=20 > > Right now there's no way to even properly use the passwd data from the > > target system, and when I tried to do that, I ran into other bugs. The > > only options now are to use the running system even when it's not > > what's being installed (clearly wrong) or use DB_FROM_SRC to bypass the > > checks, but also bypass using the passwd data from the target system > > (but it works okay as long as none of the names/uids < 1024 have been > > changed on the target system/image). >=20 > But when executing something like the distributeworld target there's > nothing to check. You cannot check against the current DB, and there's > no destination DB since you are just generating install sets. Hence I > think that at least for distributeworld and maybe other targets > DB_FROM_SRC should be set by default in order to restore previous > behavior. DB_FROM_SRC isn't default solely to support environments where uids/gids don't match those in our password/group files. Unfortunately the FreeBSD cluster has such a setup. Otherwise we'd probably have just told people to a) don't do that and b) if you must, modify your source tree appropriately. It's certainly the case that we should always use DB_FROM_SRC if release builds. I think you might be right about distributeworld, but we might need to check how that interacts with etcupdate/mergemaster. -- Brooks --vkogqOf2sHV7VnPd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJbWgfZAAoJEKzQXbSebgfAJCQIAKT23no29dEdxeEwnC0+RDgG r7RRUOroPmIBj5KXu470MZgqLAaMcqZe0j089JDJ2LTgoXi0qqmEeHz+v7jI7l0+ MqEbo8s5fp2bdmf+ZHC0ZBFDE+qJvN8/vjuRJY1v132SCnYVhKc7+aHT/2rhH6DU s+jRGe4qQtK++66APRnlWO41jiM/i2ZPpitmCrNZtzOLaHiOVlP9mFfBEpiZdpV7 V2nnnYse+odqtCTIAd866ERk5ukPXw9cKLABLhxvyudFmVt+5PFFWw1tyV9G/4gI hLv3A4Iw3xSAf+YJe5FCe9thyN5xw6bIoHNiQqNzc5tQnUJrdepEHV5FhuLLnNo= =Je4s -----END PGP SIGNATURE----- --vkogqOf2sHV7VnPd-- From owner-svn-src-head@freebsd.org Thu Jul 26 17:52: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 438D41055DCD; Thu, 26 Jul 2018 17:52:58 +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 E0F7772112; Thu, 26 Jul 2018 17:52:57 +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 BC5EC4A8B; Thu, 26 Jul 2018 17:52:57 +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 w6QHqvKc060036; Thu, 26 Jul 2018 17:52:57 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6QHqve5060035; Thu, 26 Jul 2018 17:52:57 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201807261752.w6QHqve5060035@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 26 Jul 2018 17:52:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336745 - head/sys/sys X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/sys/sys X-SVN-Commit-Revision: 336745 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: Thu, 26 Jul 2018 17:52:58 -0000 Author: emaste Date: Thu Jul 26 17:52:57 2018 New Revision: 336745 URL: https://svnweb.freebsd.org/changeset/base/336745 Log: elf_common: update ARM ABI flag names In the V5 ABI the flags are EF_ARM_ABI_FLOAT_HARD and EF_ARM_ABI_FLOAT_SOFT. The flags have the same values as the legacy GCC flags EF_ARM_VFP_FLOAT and EF_ARM_SOFT_FLOAT respectively. The legacy names are kept for compatibility. Reported by: Peter Smith (Linaro) Reviewed by: imp Sponsored by: The FreeBSD Foundation Modified: head/sys/sys/elf_common.h Modified: head/sys/sys/elf_common.h ============================================================================== --- head/sys/sys/elf_common.h Thu Jul 26 17:05:33 2018 (r336744) +++ head/sys/sys/elf_common.h Thu Jul 26 17:52:57 2018 (r336745) @@ -334,8 +334,10 @@ typedef struct { #define EF_ARM_ALIGN8 0x00000040 #define EF_ARM_NEW_ABI 0x00000080 #define EF_ARM_OLD_ABI 0x00000100 -#define EF_ARM_SOFT_FLOAT 0x00000200 -#define EF_ARM_VFP_FLOAT 0x00000400 +#define EF_ARM_ABI_FLOAT_SOFT 0x00000200 +#define EF_ARM_SOFT_FLOAT EF_ARM_ABI_FLOAT_SOFT /* Pre-V5 ABI name */ +#define EF_ARM_ABI_FLOAT_HARD 0x00000400 +#define EF_ARM_VFP_FLOAT EF_ARM_ABI_FLOAT_HARD /* Pre-V5 ABI name */ #define EF_ARM_MAVERICK_FLOAT 0x00000800 #define EF_MIPS_NOREORDER 0x00000001 From owner-svn-src-head@freebsd.org Thu Jul 26 18:29: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 0611810569F4; Thu, 26 Jul 2018 18:29:13 +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 98F7773418; Thu, 26 Jul 2018 18:29:12 +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 41A9310AFD2; Thu, 26 Jul 2018 14:29:11 -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> <65b19cc4-eaf0-13ed-43e6-9f04a1f7f196@FreeBSD.org> <49BF6569-96A9-4104-BDE6-8BB94C0D9626@yahoo.com> <9251BE92-A8CE-45E3-B4BF-706E7219321A@yahoo.com> Cc: Dimitry Andric , Bryan Drewery , svn-src-head@freebsd.org, FreeBSD Current From: John Baldwin Message-ID: Date: Thu, 26 Jul 2018 11:29:10 -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: <9251BE92-A8CE-45E3-B4BF-706E7219321A@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); Thu, 26 Jul 2018 14:29:11 -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: Thu, 26 Jul 2018 18:29:13 -0000 On 7/16/18 11:27 PM, Mark Millard wrote: > On 2018-Jul-1, at 6:34 AM, Mark Millard wrote: > >> My brain finally engaged for showing exactly what files are included >> for the gcc builds: the .meta files include that information explicitly >> (along with other files that are opened during the operation). >> >> amd64 is as I reported, just one header file from gcc: float.h . >> >> powerpc64 builds Lex/Lexer.cpp without defining __ALTIVEC__ and so >> is not including . Building without __ALTIVEC__ might >> be an error itself but would be a workaround for the altivec.h >> file name aliasing vs. search-path problem. >> >> . . . > > Going in a different direction, what of the unchanged Makefile.inc1 > code block: > > .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. > CD2CFLAGS+= -isystem ${XDDESTDIR}/usr/include -L${XDDESTDIR}/usr/lib > # GCC requires -B to find /usr/lib/crti.o when using a cross-compiler > # combined with --sysroot. > CD2CFLAGS+= -B${XDDESTDIR}/usr/lib > # Force using libc++ for external GCC. > .if defined(X_COMPILER_TYPE) && \ > ${X_COMPILER_TYPE} == gcc && ${X_COMPILER_VERSION} >= 40800 > CD2CXXFLAGS+= -isystem ${XDDESTDIR}/usr/include/c++/v1 -std=c++11 \ > -nostdinc++ > .endif > .endif > > Why is that pair of -isystem uses that gives the old search order > okay? Or was the block just missed? (Similarly for other options > listed above.) Just missed. They should probably also be removed. > Note: Locally I've reverted the -r335782 changes in order for my use > of devel/*-gcc as cross compilers to work where they used to (hopefully: > still building), restoring the historical search order for the > directories for now. I finally got the approval 2 days ago to remove float.h from amd64-gcc so you shouldn't need this reverted anymore once the OFED thing is straightened out. -- John Baldwin From owner-svn-src-head@freebsd.org Thu Jul 26 18:34: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 577C11056D8D; Thu, 26 Jul 2018 18:34:40 +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 0C7AF739AF; Thu, 26 Jul 2018 18:34:40 +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 E19AF514B; Thu, 26 Jul 2018 18:34:39 +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 w6QIYdUc080745; Thu, 26 Jul 2018 18:34:39 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6QIYc9i080738; Thu, 26 Jul 2018 18:34:38 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201807261834.w6QIYc9i080738@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 26 Jul 2018 18:34:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336746 - in head/lib: libc/gen libutil X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/lib: libc/gen libutil X-SVN-Commit-Revision: 336746 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: Thu, 26 Jul 2018 18:34:40 -0000 Author: ian Date: Thu Jul 26 18:34:38 2018 New Revision: 336746 URL: https://svnweb.freebsd.org/changeset/base/336746 Log: Make pw_scan(3) more compatible with getpwent(3) et. al. when processing data from /etc/passwd rather than /etc/master.passwd. The libc getpwent(3) and related functions automatically read master.passwd when run by root, or passwd when run by a non-root user. When run by non- root, getpwent() copes with the missing data by setting the corresponding fields in the passwd struct to known values (zeroes for numbers, or a pointer to an empty string for literals). When libutil's pw_scan(3) was used to parse a line without the root-accessible data, it was leaving garbage in the corresponding fields. These changes rename the static pw_init() function used by getpwent() and friends to __pw_initpwd(), and move it into pw_scan.c so that common init code can be shared between libc and libutil. pw_scan(3) now calls __pw_initpwd() before __pw_scan(), just like the getpwent() family does, so that reading an arbitrary passwd file in either format and parsing it with pw_scan(3) returns the same results as getpwent(3) would. This also adds a new pw_initpwd(3) function to libutil, so that code which creates passwd structs from scratch in some manner that doesn't involve pw_scan() can initialize the struct to the values expected by lots of existing code, which doesn't expect to encounter NULL pointers or garbage values in some fields. Modified: head/lib/libc/gen/Symbol.map head/lib/libc/gen/getpwent.c head/lib/libc/gen/pw_scan.c head/lib/libc/gen/pw_scan.h head/lib/libutil/libutil.h head/lib/libutil/pw_util.3 head/lib/libutil/pw_util.c Modified: head/lib/libc/gen/Symbol.map ============================================================================== --- head/lib/libc/gen/Symbol.map Thu Jul 26 17:52:57 2018 (r336745) +++ head/lib/libc/gen/Symbol.map Thu Jul 26 18:34:38 2018 (r336746) @@ -510,6 +510,7 @@ FBSDprivate_1.0 { __opendir2; __pause; _pause; + __pw_initpwd; /* Used by (at least) libutil */ __pw_scan; /* Used by (at least) libutil */ __raise; _raise; Modified: head/lib/libc/gen/getpwent.c ============================================================================== --- head/lib/libc/gen/getpwent.c Thu Jul 26 17:52:57 2018 (r336745) +++ head/lib/libc/gen/getpwent.c Thu Jul 26 18:34:38 2018 (r336746) @@ -96,8 +96,6 @@ int __pw_match_entry(const char *, size_t, enum nss_lo const char *, uid_t); int __pw_parse_entry(char *, size_t, struct passwd *, int, int *errnop); -static void pwd_init(struct passwd *); - union key { const char *name; uid_t uid; @@ -527,7 +525,7 @@ getpwent_r(struct passwd *pwd, char *buffer, size_t bu }; int rv, ret_errno; - pwd_init(pwd); + __pw_initpwd(pwd); ret_errno = 0; *result = NULL; rv = _nsdispatch(result, dtab, NSDB_PASSWD, "getpwent_r", defaultsrc, @@ -566,7 +564,7 @@ getpwnam_r(const char *name, struct passwd *pwd, char }; int rv, ret_errno; - pwd_init(pwd); + __pw_initpwd(pwd); ret_errno = 0; *result = NULL; rv = _nsdispatch(result, dtab, NSDB_PASSWD, "getpwnam_r", defaultsrc, @@ -605,7 +603,7 @@ getpwuid_r(uid_t uid, struct passwd *pwd, char *buffer }; int rv, ret_errno; - pwd_init(pwd); + __pw_initpwd(pwd); ret_errno = 0; *result = NULL; rv = _nsdispatch(result, dtab, NSDB_PASSWD, "getpwuid_r", defaultsrc, @@ -617,23 +615,6 @@ getpwuid_r(uid_t uid, struct passwd *pwd, char *buffer } -static void -pwd_init(struct passwd *pwd) -{ - static char nul[] = ""; - - memset(pwd, 0, sizeof(*pwd)); - pwd->pw_uid = (uid_t)-1; /* Considered least likely to lead to */ - pwd->pw_gid = (gid_t)-1; /* a security issue. */ - pwd->pw_name = nul; - pwd->pw_passwd = nul; - pwd->pw_class = nul; - pwd->pw_gecos = nul; - pwd->pw_dir = nul; - pwd->pw_shell = nul; -} - - static struct passwd pwd; static char *pwd_storage; static size_t pwd_storage_size; @@ -1614,7 +1595,7 @@ compat_redispatch(struct compat_state *st, enum nss_lo for (i = 0; i < (int)(nitems(dtab) - 1); i++) dtab[i].mdata = (void *)lookup_how; more: - pwd_init(pwd); + __pw_initpwd(pwd); switch (lookup_how) { case nss_lt_all: rv = _nsdispatch(&discard, dtab, NSDB_PASSWD_COMPAT, Modified: head/lib/libc/gen/pw_scan.c ============================================================================== --- head/lib/libc/gen/pw_scan.c Thu Jul 26 17:52:57 2018 (r336745) +++ head/lib/libc/gen/pw_scan.c Thu Jul 26 18:34:38 2018 (r336746) @@ -65,6 +65,22 @@ __FBSDID("$FreeBSD$"); */ static int pw_big_ids_warning = 0; +void +__pw_initpwd(struct passwd *pwd) +{ + static char nul[] = ""; + + memset(pwd, 0, sizeof(*pwd)); + pwd->pw_uid = (uid_t)-1; /* Considered least likely to lead to */ + pwd->pw_gid = (gid_t)-1; /* a security issue. */ + pwd->pw_name = nul; + pwd->pw_passwd = nul; + pwd->pw_class = nul; + pwd->pw_gecos = nul; + pwd->pw_dir = nul; + pwd->pw_shell = nul; +} + int __pw_scan(char *bp, struct passwd *pw, int flags) { Modified: head/lib/libc/gen/pw_scan.h ============================================================================== --- head/lib/libc/gen/pw_scan.h Thu Jul 26 17:52:57 2018 (r336745) +++ head/lib/libc/gen/pw_scan.h Thu Jul 26 18:34:38 2018 (r336746) @@ -35,4 +35,5 @@ #define _PWSCAN_MASTER 0x01 #define _PWSCAN_WARN 0x02 +extern void __pw_initpwd(struct passwd *); extern int __pw_scan(char *, struct passwd *, int); Modified: head/lib/libutil/libutil.h ============================================================================== --- head/lib/libutil/libutil.h Thu Jul 26 17:52:57 2018 (r336745) +++ head/lib/libutil/libutil.h Thu Jul 26 18:34:38 2018 (r336746) @@ -155,6 +155,7 @@ int pw_edit(int _notsetuid); int pw_equal(const struct passwd *_pw1, const struct passwd *_pw2); void pw_fini(void); int pw_init(const char *_dir, const char *_master); +void pw_initpwd(struct passwd *_pw); char *pw_make(const struct passwd *_pw); char *pw_make_v7(const struct passwd *_pw); int pw_mkdb(const char *_user); Modified: head/lib/libutil/pw_util.3 ============================================================================== --- head/lib/libutil/pw_util.3 Thu Jul 26 17:52:57 2018 (r336745) +++ head/lib/libutil/pw_util.3 Thu Jul 26 18:34:38 2018 (r336746) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 02, 2015 +.Dd July 26, 2018 .Dt PW_UTIL 3 .Os .Sh NAME @@ -59,6 +59,8 @@ .Fn pw_fini "void" .Ft int .Fn pw_init "const char *dir" const char *master" +.Ft void +.Fn pw_initpwd "struct passwd *pw" .Ft "char *" .Fn pw_make "const struct passwd *pw" .Ft "char *" @@ -179,7 +181,7 @@ if any. .Pp The .Fn pw_init -initialize the static variable representing the path a password file. +initializes the static variable representing the path to a password file. .Fa dir is the directory where the password file is located. If set to @@ -192,6 +194,18 @@ If set to .Dv NULL? it will default to .Pa master.passwd +.Pp +The +.Fn pw_initpwd +function initializes the +.Vt passwd +struct to canonical values. +The entire structure is zeroed, then +.Va pw_uid +and +.Va pw_gid +are set to -1, and all string pointers are set to point at +an internally-defined zero-length string. .Pp The .Fn pw_make Modified: head/lib/libutil/pw_util.c ============================================================================== --- head/lib/libutil/pw_util.c Thu Jul 26 17:52:57 2018 (r336745) +++ head/lib/libutil/pw_util.c Thu Jul 26 18:34:38 2018 (r336746) @@ -652,8 +652,16 @@ pw_dup(const struct passwd *pw) #include "pw_scan.h" /* - * Wrapper around an internal libc function + * Wrapper around some internal libc functions. */ + +void +pw_initpwd(struct passwd *pw) +{ + + __pw_initpwd(pw); +} + struct passwd * pw_scan(const char *line, int flags) { @@ -662,6 +670,7 @@ pw_scan(const char *line, int flags) if ((bp = strdup(line)) == NULL) return (NULL); + __pw_initpwd(&pw); if (!__pw_scan(bp, &pw, flags)) { free(bp); return (NULL); From owner-svn-src-head@freebsd.org Thu Jul 26 19:42: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 D6CF1105819F; Thu, 26 Jul 2018 19:42:24 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 87BA375DA8; Thu, 26 Jul 2018 19:42:24 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 693C65C97; Thu, 26 Jul 2018 19:42:24 +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 w6QJgOkg016955; Thu, 26 Jul 2018 19:42:24 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6QJgOTA016953; Thu, 26 Jul 2018 19:42:24 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201807261942.w6QJgOTA016953@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 26 Jul 2018 19:42:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336750 - head/release/arm X-SVN-Group: head X-SVN-Commit-Author: gjb X-SVN-Commit-Paths: head/release/arm X-SVN-Commit-Revision: 336750 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: Thu, 26 Jul 2018 19:42:25 -0000 Author: gjb Date: Thu Jul 26 19:42:23 2018 New Revision: 336750 URL: https://svnweb.freebsd.org/changeset/base/336750 Log: Fix OL_DIR definition following r336721. Sponsored by: The FreeBSD Foundation Modified: head/release/arm/RPI-B.conf head/release/arm/RPI2.conf Modified: head/release/arm/RPI-B.conf ============================================================================== --- head/release/arm/RPI-B.conf Thu Jul 26 19:00:30 2018 (r336749) +++ head/release/arm/RPI-B.conf Thu Jul 26 19:42:23 2018 (r336750) @@ -15,7 +15,7 @@ MD_ARGS="-x 63 -y 255" NODOC=1 UBOOT_DIR="/usr/local/share/u-boot/u-boot-rpi" RPI_FIRMWARE_DIR="/usr/local/share/rpi-firmware" -OL_DIR=$"{RPI_FIRMWARE_DIR}/overlays" +OL_DIR="${RPI_FIRMWARE_DIR}/overlays" OVERLAYS="mmc.dtbo pi3-disable-bt.dtbo" PART_SCHEME="MBR" Modified: head/release/arm/RPI2.conf ============================================================================== --- head/release/arm/RPI2.conf Thu Jul 26 19:00:30 2018 (r336749) +++ head/release/arm/RPI2.conf Thu Jul 26 19:42:23 2018 (r336750) @@ -15,7 +15,7 @@ MD_ARGS="-x 63 -y 255" NODOC=1 UBOOT_DIR="/usr/local/share/u-boot/u-boot-rpi2" RPI_FIRMWARE_DIR="/usr/local/share/rpi-firmware" -OL_DIR=$"{RPI_FIRMWARE_DIR}/overlays" +OL_DIR="${RPI_FIRMWARE_DIR}/overlays" OVERLAYS="mmc.dtbo" PART_SCHEME="MBR" export BOARDNAME="RPI2" From owner-svn-src-head@freebsd.org Thu Jul 26 20:03: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 57A9B1058759; Thu, 26 Jul 2018 20:03:12 +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 E2CA6767E0; Thu, 26 Jul 2018 20:03:11 +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 A3AE86009; Thu, 26 Jul 2018 20:03:11 +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 w6QK3BX2026935; Thu, 26 Jul 2018 20:03:11 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6QK3B7E026934; Thu, 26 Jul 2018 20:03:11 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201807262003.w6QK3B7E026934@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 26 Jul 2018 20:03:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336751 - head/usr.sbin/pw X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/usr.sbin/pw X-SVN-Commit-Revision: 336751 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: Thu, 26 Jul 2018 20:03:12 -0000 Author: ian Date: Thu Jul 26 20:03:11 2018 New Revision: 336751 URL: https://svnweb.freebsd.org/changeset/base/336751 Log: Re-apply r336625 which was reverted with r336638, now that the underlying pw_scan(3) has been fixed in a way that doesn't perturb other callers of it or the getpwnam(3) family. Make pw(8) showuser work the same with or without -R for non-root users. Without -R, pw(8) uses getpwnam(3), which will open master.passwd for the root user or passwd for non-root users. With -R pw(8) was always opening /master.passwd, which would fail for a non-root user, then falsely claim the userid you're trying to show doesn't exist. Now for a non-root user it opens /passwd, and populates the fields in the returned struct passwd which aren't present in that file with well-known canonical values, which duplicates the behavior of getpwnam(3). The net effect is that the showuser output is identical whether using -R or not. Modified: head/usr.sbin/pw/pw_vpw.c Modified: head/usr.sbin/pw/pw_vpw.c ============================================================================== --- head/usr.sbin/pw/pw_vpw.c Thu Jul 26 19:42:23 2018 (r336750) +++ head/usr.sbin/pw/pw_vpw.c Thu Jul 26 20:03:11 2018 (r336751) @@ -39,10 +39,13 @@ static const char rcsid[] = #include #include #include +#include #include "pwupd.h" static FILE * pwd_fp = NULL; +static int pwd_scanflag; +static const char *pwd_filename; void vendpwent(void) @@ -71,7 +74,18 @@ vnextpwent(char const *nam, uid_t uid, int doclose) line = NULL; linecap = 0; - if (pwd_fp != NULL || (pwd_fp = fopen(getpwpath(_MASTERPASSWD), "r")) != NULL) { + if (pwd_fp == NULL) { + if (geteuid() == 0) { + pwd_filename = _MASTERPASSWD; + pwd_scanflag = PWSCAN_MASTER; + } else { + pwd_filename = _PASSWD; + pwd_scanflag = 0; + } + pwd_fp = fopen(getpwpath(pwd_filename), "r"); + } + + if (pwd_fp != NULL) { while ((linelen = getline(&line, &linecap, pwd_fp)) > 0) { /* Skip comments and empty lines */ if (*line == '\n' || *line == '#') @@ -79,10 +93,10 @@ vnextpwent(char const *nam, uid_t uid, int doclose) /* trim latest \n */ if (line[linelen - 1 ] == '\n') line[linelen - 1] = '\0'; - pw = pw_scan(line, PWSCAN_MASTER); + pw = pw_scan(line, pwd_scanflag); if (pw == NULL) errx(EXIT_FAILURE, "Invalid user entry in '%s':" - " '%s'", getpwpath(_MASTERPASSWD), line); + " '%s'", getpwpath(pwd_filename), line); if (uid != (uid_t)-1) { if (uid == pw->pw_uid) break; @@ -98,6 +112,18 @@ vnextpwent(char const *nam, uid_t uid, int doclose) vendpwent(); } free(line); + + /* + * If we read the non-master passwd, some fields may not have been + * populated. Clean them up so that the output looks the same as that + * generated using getpwnam() which also inits them to these values. + */ + if (!(pw->pw_fields & _PWF_CLASS)) + pw->pw_class = ""; + if (!(pw->pw_fields & _PWF_CHANGE)) + pw->pw_change = 0; + if (!(pw->pw_fields & _PWF_EXPIRE)) + pw->pw_expire = 0; return (pw); } From owner-svn-src-head@freebsd.org Thu Jul 26 22:55: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 C414F105B246; Thu, 26 Jul 2018 22:55:52 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6B3787B30B; Thu, 26 Jul 2018 22:55:52 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 464727B31; Thu, 26 Jul 2018 22:55:52 +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 w6QMtqbk013656; Thu, 26 Jul 2018 22:55:52 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6QMtqak013655; Thu, 26 Jul 2018 22:55:52 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807262255.w6QMtqak013655@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 26 Jul 2018 22:55:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336752 - head/sys/cam X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/cam X-SVN-Commit-Revision: 336752 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: Thu, 26 Jul 2018 22:55:52 -0000 Author: imp Date: Thu Jul 26 22:55:51 2018 New Revision: 336752 URL: https://svnweb.freebsd.org/changeset/base/336752 Log: For the dynamic I/O scheduler, make the TRIM stuff also count against read bias so we do reads in preference to TRIMs. This helps a lot when many trims are delivered at once from the upper layers as they tend to delay READs due to priority inversion in the code today. The non iosched case will be fixed when the trim comibing changes needed for nvme come in later this year. Sponsored by: Netflix Modified: head/sys/cam/cam_iosched.c Modified: head/sys/cam/cam_iosched.c ============================================================================== --- head/sys/cam/cam_iosched.c Thu Jul 26 20:03:11 2018 (r336751) +++ head/sys/cam/cam_iosched.c Thu Jul 26 22:55:51 2018 (r336752) @@ -1307,7 +1307,23 @@ cam_iosched_get_trim(struct cam_iosched_softc *isc) if (!cam_iosched_has_more_trim(isc)) return NULL; - +#ifdef CAM_IOSCHED_DYNAMIC + if (do_dynamic_iosched) { + /* + * If pending read, prefer that based on current read bias + * setting. + */ + if (bioq_first(&isc->bio_queue) && isc->current_read_bias) { + isc->current_read_bias--; + /* We're not limiting TRIMS, per se, just doing reads first */ + return NULL; + } + /* + * We're going to do a trim, so reset the bias. + */ + isc->current_read_bias = isc->read_bias; + } +#endif return cam_iosched_next_trim(isc); } From owner-svn-src-head@freebsd.org Fri Jul 27 01:20: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 16857105D1EC; Fri, 27 Jul 2018 01:20:35 +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 BEBB67EA0A; Fri, 27 Jul 2018 01:20:34 +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 9FF2811193; Fri, 27 Jul 2018 01:20:34 +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 w6R1KY5p085020; Fri, 27 Jul 2018 01:20:34 GMT (envelope-from daichi@FreeBSD.org) Received: (from daichi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6R1KYmu085019; Fri, 27 Jul 2018 01:20:34 GMT (envelope-from daichi@FreeBSD.org) Message-Id: <201807270120.w6R1KYmu085019@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: daichi set sender to daichi@FreeBSD.org using -f From: Daichi GOTO Date: Fri, 27 Jul 2018 01:20:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336753 - 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: 336753 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: Fri, 27 Jul 2018 01:20:35 -0000 Author: daichi Date: Fri Jul 27 01:20:34 2018 New Revision: 336753 URL: https://svnweb.freebsd.org/changeset/base/336753 Log: top(1): fixed the empty output problem in non-interactive mode (-n, -b) regressed in r336028 PR: 229842 Reported by: Ali Abdallah Reviewed by: eadler, cy Approved by: gnn (mentor) Differential Revision: https://reviews.freebsd.org/D16455 Modified: head/usr.bin/top/screen.c Modified: head/usr.bin/top/screen.c ============================================================================== --- head/usr.bin/top/screen.c Thu Jul 26 22:55:51 2018 (r336752) +++ head/usr.bin/top/screen.c Fri Jul 27 01:20:34 2018 (r336753) @@ -54,6 +54,8 @@ static struct termios old_settings; static struct termios new_settings; static char is_a_terminal = false; +#define NON_INTERACTIVE_MODE_VIRTUAL_SCREEN_WIDTH 1024 + void init_termcap(bool interactive) { @@ -68,6 +70,7 @@ init_termcap(bool interactive) if (!interactive) { /* pretend we have a dumb terminal */ + screen_width = NON_INTERACTIVE_MODE_VIRTUAL_SCREEN_WIDTH; smart_terminal = false; return; } From owner-svn-src-head@freebsd.org Fri Jul 27 05:21: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 106581060FFB; Fri, 27 Jul 2018 05:21: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 BAEB384F59; Fri, 27 Jul 2018 05:21:20 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9C859139C4; Fri, 27 Jul 2018 05:21:20 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6R5LKSh010566; Fri, 27 Jul 2018 05:21:20 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6R5LKQW010565; Fri, 27 Jul 2018 05:21:20 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201807270521.w6R5LKQW010565@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 27 Jul 2018 05:21:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336754 - in head/usr.bin/diff: . tests X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: in head/usr.bin/diff: . tests X-SVN-Commit-Revision: 336754 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: Fri, 27 Jul 2018 05:21:21 -0000 Author: delphij Date: Fri Jul 27 05:21:20 2018 New Revision: 336754 URL: https://svnweb.freebsd.org/changeset/base/336754 Log: Improve --strip-trailing-cr handling: - Advance ctold for f1 and ctnew for f2 - ungetc() if the character is unexpected - Don't break early when we hit the combination on one side PR: 230049 Reported by: maskray Reviewed by: bapt, maskray MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D16451 Modified: head/usr.bin/diff/diffreg.c head/usr.bin/diff/tests/diff_test.sh Modified: head/usr.bin/diff/diffreg.c ============================================================================== --- head/usr.bin/diff/diffreg.c Fri Jul 27 01:20:34 2018 (r336753) +++ head/usr.bin/diff/diffreg.c Fri Jul 27 05:21:20 2018 (r336754) @@ -720,19 +720,22 @@ check(FILE *f1, FILE *f2, int flags) } ctold++; ctnew++; - if (flags & D_STRIPCR) { + if (flags & D_STRIPCR && (c == '\r' || d == '\r')) { if (c == '\r') { if ((c = getc(f1)) == '\n') { - ctnew++; - break; + ctold++; + } else { + ungetc(c, f1); } } if (d == '\r') { if ((d = getc(f2)) == '\n') { - ctold++; - break; + ctnew++; + } else { + ungetc(d, f2); } } + break; } if ((flags & D_FOLDBLANKS) && isspace(c) && isspace(d)) { Modified: head/usr.bin/diff/tests/diff_test.sh ============================================================================== --- head/usr.bin/diff/tests/diff_test.sh Fri Jul 27 01:20:34 2018 (r336753) +++ head/usr.bin/diff/tests/diff_test.sh Fri Jul 27 05:21:20 2018 (r336754) @@ -8,6 +8,7 @@ atf_test_case ifdef atf_test_case group_format atf_test_case side_by_side atf_test_case brief_format +atf_test_case b230049 simple_body() { @@ -52,6 +53,15 @@ unified_body() diff -u9999 -L input_c1.in -L input_c2.in "$(atf_get_srcdir)/input_c1.in" "$(atf_get_srcdir)/input_c2.in" } +b230049_body() +{ + printf 'a\nb\r\nc\n' > b230049_a.in + printf 'a\r\nb\r\nc\r\n' > b230049_b.in + atf_check -o empty -s eq:0 \ + diff -up --strip-trailing-cr -L b230049_a.in -L b230049_b.in \ + b230049_a.in b230049_b.in +} + header_body() { export TZ=UTC @@ -150,4 +160,5 @@ atf_init_test_cases() atf_add_test_case group_format atf_add_test_case side_by_side atf_add_test_case brief_format + atf_add_test_case b230049 } From owner-svn-src-head@freebsd.org Fri Jul 27 07:05: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 453851062CA1; Fri, 27 Jul 2018 07:05:51 +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 E6DD588C19; Fri, 27 Jul 2018 07:05:50 +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 BFF5114AAA; Fri, 27 Jul 2018 07:05:50 +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 w6R75ovE064165; Fri, 27 Jul 2018 07:05:50 GMT (envelope-from daichi@FreeBSD.org) Received: (from daichi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6R75oRd064164; Fri, 27 Jul 2018 07:05:50 GMT (envelope-from daichi@FreeBSD.org) Message-Id: <201807270705.w6R75oRd064164@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: daichi set sender to daichi@FreeBSD.org using -f From: Daichi GOTO Date: Fri, 27 Jul 2018 07:05:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336756 - 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: 336756 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: Fri, 27 Jul 2018 07:05:51 -0000 Author: daichi Date: Fri Jul 27 07:05:50 2018 New Revision: 336756 URL: https://svnweb.freebsd.org/changeset/base/336756 Log: top(1): fix a buffer overflow copying states to display while they were incremented - fix an AddressSanitizer error Submitted by: devnexen@gmail.com Reviewed by: eadler Approved by: gnn (mentor) Differential Revision: https://reviews.freebsd.org/D16183 Modified: head/usr.bin/top/display.c Modified: head/usr.bin/top/display.c ============================================================================== --- head/usr.bin/top/display.c Fri Jul 27 05:40:03 2018 (r336755) +++ head/usr.bin/top/display.c Fri Jul 27 07:05:50 2018 (r336756) @@ -420,6 +420,7 @@ i_cpustates(int *states) int value; const char * const *names; const char *thisname; + int *hstates = states; int cpu; for (cpu = 0; cpu < num_cpus; cpu++) { @@ -453,6 +454,7 @@ for (cpu = 0; cpu < num_cpus; cpu++) { } /* copy over values into "last" array */ + states = hstates; memcpy(lcpustates, states, num_cpustates * sizeof(int) * num_cpus); } @@ -462,6 +464,7 @@ u_cpustates(int *states) int value; const char * const *names; const char *thisname; + int *hstates = states; int *lp; int *colp; int cpu; @@ -504,6 +507,8 @@ for (cpu = 0; cpu < num_cpus; cpu++) { colp++; } } + + states = hstates; } void From owner-svn-src-head@freebsd.org Fri Jul 27 10:40: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 9883E1045F39; Fri, 27 Jul 2018 10:40:50 +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 4A4348E9DD; Fri, 27 Jul 2018 10:40:50 +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 2C38B16C3D; Fri, 27 Jul 2018 10:40:50 +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 w6RAeoL9071957; Fri, 27 Jul 2018 10:40:50 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RAemk9071948; Fri, 27 Jul 2018 10:40:48 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201807271040.w6RAemk9071948@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Fri, 27 Jul 2018 10:40:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336757 - in head: share/man/man4 share/man/man7 share/misc sys/dev/firewire sys/dev/hwpmc sys/dev/sk sys/dev/sound/pci sys/dev/sound/pcm sys/fs/nfsclient X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: in head: share/man/man4 share/man/man7 share/misc sys/dev/firewire sys/dev/hwpmc sys/dev/sk sys/dev/sound/pci sys/dev/sound/pcm sys/fs/nfsclient X-SVN-Commit-Revision: 336757 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: Fri, 27 Jul 2018 10:40:50 -0000 Author: eadler Date: Fri Jul 27 10:40:48 2018 New Revision: 336757 URL: https://svnweb.freebsd.org/changeset/base/336757 Log: Use https over http for FreeBSD pages Modified: head/share/man/man4/firewire.4 head/share/man/man7/tests.7 head/share/misc/bsd-family-tree head/sys/dev/firewire/00README head/sys/dev/hwpmc/pmc_events.h head/sys/dev/sk/if_sk.c head/sys/dev/sound/pci/maestro3.c head/sys/dev/sound/pcm/dsp.c head/sys/fs/nfsclient/nfs_clstate.c Modified: head/share/man/man4/firewire.4 ============================================================================== --- head/share/man/man4/firewire.4 Fri Jul 27 07:05:50 2018 (r336756) +++ head/share/man/man4/firewire.4 Fri Jul 27 10:40:48 2018 (r336757) @@ -87,7 +87,7 @@ Debugging over the firewire interace is possible with .Xr dcons 4 driver. Please see -.Pa http://wiki.freebsd.org/DebugWithDcons +.Pa https://wiki.freebsd.org/DebugWithDcons for details on how to setup debugging with firewire. .Sh FILES .Bl -tag -width "Pa /dev/fwmem0.0" -compact Modified: head/share/man/man7/tests.7 ============================================================================== --- head/share/man/man7/tests.7 Fri Jul 27 07:05:50 2018 (r336756) +++ head/share/man/man7/tests.7 Fri Jul 27 10:40:48 2018 (r336757) @@ -198,7 +198,7 @@ problem report. For more details please refer to: .Bl -bullet -offset indent -compact .It -.Lk http://lists.freebsd.org/ "FreeBSD Mailing Lists" +.Lk https://lists.freebsd.org/ "FreeBSD Mailing Lists" .It .Lk https://www.freebsd.org/support.html "Problem Reporting" .El Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Fri Jul 27 07:05:50 2018 (r336756) +++ head/share/misc/bsd-family-tree Fri Jul 27 10:40:48 2018 (r336757) @@ -814,6 +814,6 @@ Steven M. Schultz for providing 2.8BSD, 2.10BSD, 2.11B -- Copyright (c) 1997-2012 Wolfram Schneider -URL: http://svnweb.freebsd.org/base/head/share/misc/bsd-family-tree +URL: https://svnweb.freebsd.org/base/head/share/misc/bsd-family-tree $FreeBSD$ Modified: head/sys/dev/firewire/00README ============================================================================== --- head/sys/dev/firewire/00README Fri Jul 27 07:05:50 2018 (r336756) +++ head/sys/dev/firewire/00README Fri Jul 27 10:40:48 2018 (r336757) @@ -9,7 +9,7 @@ IEEE 1394 support for FreeBSD-5.X and 4.X. modified by Hidetoshi Shimokawa . Please note this driver is still under development. You can find latest snapshots under: - http://people.freebsd.org/~simokawa/ + https://people.freebsd.org/~simokawa/ named firewire-2002XXXX.tar.gz The driver consists of 6 parts: Modified: head/sys/dev/hwpmc/pmc_events.h ============================================================================== --- head/sys/dev/hwpmc/pmc_events.h Fri Jul 27 07:05:50 2018 (r336756) +++ head/sys/dev/hwpmc/pmc_events.h Fri Jul 27 10:40:48 2018 (r336757) @@ -36,7 +36,7 @@ * the source tree at src/share/doc/papers/hwpmc/hwpmc.ms * as well as on-line at: * - * http://wiki.freebsd.org/PmcTools/PmcHardwareHowTo + * https://wiki.freebsd.org/PmcTools/PmcHardwareHowTo * * Please refer to those resources before you attempt to modify * this file or the hwpmc driver/subsystem. Modified: head/sys/dev/sk/if_sk.c ============================================================================== --- head/sys/dev/sk/if_sk.c Fri Jul 27 07:05:50 2018 (r336756) +++ head/sys/dev/sk/if_sk.c Fri Jul 27 10:40:48 2018 (r336757) @@ -64,7 +64,7 @@ __FBSDID("$FreeBSD$"); * XMAC II datasheet online. I have put my copy at people.freebsd.org as a * convenience to others until Vitesse corrects this problem: * - * http://people.freebsd.org/~wpaul/SysKonnect/xmacii_datasheet_rev_c_9-29.pdf + * https://people.freebsd.org/~wpaul/SysKonnect/xmacii_datasheet_rev_c_9-29.pdf * * Written by Bill Paul * Department of Electrical Engineering Modified: head/sys/dev/sound/pci/maestro3.c ============================================================================== --- head/sys/dev/sound/pci/maestro3.c Fri Jul 27 07:05:50 2018 (r336756) +++ head/sys/dev/sound/pci/maestro3.c Fri Jul 27 10:40:48 2018 (r336757) @@ -45,7 +45,7 @@ * , http://www.zabbo.net/maestro3 * * Cameron Grant created the pcm framework used here nearly verbatim. - * , http://people.freebsd.org/~cg/template.c + * , https://people.freebsd.org/~cg/template.c * * Taku YAMAMOTO for his Maestro-1/2 FreeBSD driver and sanity reference. * Modified: head/sys/dev/sound/pcm/dsp.c ============================================================================== --- head/sys/dev/sound/pcm/dsp.c Fri Jul 27 07:05:50 2018 (r336756) +++ head/sys/dev/sound/pcm/dsp.c Fri Jul 27 10:40:48 2018 (r336757) @@ -2222,7 +2222,7 @@ dsp_mmap_single(struct cdev *i_dev, vm_ooffset_t *offs * Unfortunately, we have to give up this one due to linux_mmap * changes. * - * http://lists.freebsd.org/pipermail/freebsd-emulation/2007-June/003698.html + * https://lists.freebsd.org/pipermail/freebsd-emulation/2007-June/003698.html * */ #ifdef SV_ABI_LINUX Modified: head/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clstate.c Fri Jul 27 07:05:50 2018 (r336756) +++ head/sys/fs/nfsclient/nfs_clstate.c Fri Jul 27 10:40:48 2018 (r336757) @@ -1890,8 +1890,7 @@ nfscl_umount(struct nfsmount *nmp, NFSPROC_T *p) * mutex for NFSLOCKCLSTATE(), so it is "m" for the following * explanation, courtesy of Alan Cox. * What follows is a snippet from Alan Cox's email at: - * http://docs.FreeBSD.org/cgi/ - * mid.cgi?BANLkTikR3d65zPHo9==08ZfJ2vmqZucEvw + * https://docs.FreeBSD.org/cgi/mid.cgi?BANLkTikR3d65zPHo9==08ZfJ2vmqZucEvw * * 1. Set MNTK_UNMOUNTF * 2. Acquire a standard FreeBSD mutex "m". From owner-svn-src-head@freebsd.org Fri Jul 27 10:44: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 822C31046150; Fri, 27 Jul 2018 10:44:40 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 328608ED90; Fri, 27 Jul 2018 10:44:40 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0D22B16DB3; Fri, 27 Jul 2018 10:44:40 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6RAid18077140; Fri, 27 Jul 2018 10:44:39 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RAic41077134; Fri, 27 Jul 2018 10:44:38 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201807271044.w6RAic41077134@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Fri, 27 Jul 2018 10:44:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336758 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 336758 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: Fri, 27 Jul 2018 10:44:40 -0000 Author: eadler Date: Fri Jul 27 10:44:38 2018 New Revision: 336758 URL: https://svnweb.freebsd.org/changeset/base/336758 Log: Feex a cuple of small typos Modified: head/share/mk/atf.test.mk head/share/mk/bsd.own.mk head/share/mk/bsd.sys.mk head/share/mk/bsd.test.mk head/share/mk/meta.sys.mk head/share/mk/plain.test.mk head/share/mk/tap.test.mk Modified: head/share/mk/atf.test.mk ============================================================================== --- head/share/mk/atf.test.mk Fri Jul 27 10:40:48 2018 (r336757) +++ head/share/mk/atf.test.mk Fri Jul 27 10:44:38 2018 (r336758) @@ -16,7 +16,7 @@ # require the ATF libraries. # # Test programs registered in this manner are set to be installed into TESTSDIR -# (which should be overriden by the Makefile) and are not required to provide a +# (which should be overridden by the Makefile) and are not required to provide a # manpage. ATF_TESTS_C?= ATF_TESTS_CXX?= Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Fri Jul 27 10:40:48 2018 (r336757) +++ head/share/mk/bsd.own.mk Fri Jul 27 10:44:38 2018 (r336758) @@ -267,7 +267,7 @@ XZ_CMD?= xz PKG_CMD?= pkg # Pointer to the top directory into which tests are installed. Should not be -# overriden by Makefiles, but the user may choose to set this in src.conf(5). +# overridden by Makefiles, but the user may choose to set this in src.conf(5). TESTSBASE?= /usr/tests DEPENDFILE?= .depend Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Fri Jul 27 10:40:48 2018 (r336757) +++ head/share/mk/bsd.sys.mk Fri Jul 27 10:44:38 2018 (r336758) @@ -221,7 +221,7 @@ CFLAGS+= ${SSP_CFLAGS} DEBUG_FILES_CFLAGS?= -g # Allow user-specified additional warning flags, plus compiler and file -# specific flag overrides, unless we've overriden this... +# specific flag overrides, unless we've overridden this... .if ${MK_WARNS} != "no" CFLAGS+= ${CWARNFLAGS:M*} ${CWARNFLAGS.${COMPILER_TYPE}} CFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} Modified: head/share/mk/bsd.test.mk ============================================================================== --- head/share/mk/bsd.test.mk Fri Jul 27 10:40:48 2018 (r336757) +++ head/share/mk/bsd.test.mk Fri Jul 27 10:44:38 2018 (r336758) @@ -42,7 +42,7 @@ TESTS_ENV?= # Force all tests in a separate distribution file. # # We want this to be the case even when the distribution name is already -# overriden. For example: we want the tests for programs in the 'games' +# overridden. For example: we want the tests for programs in the 'games' # distribution to end up in the 'tests' distribution; the test programs # themselves have all the necessary logic to detect that the games are not # installed and thus won't cause false negatives. Modified: head/share/mk/meta.sys.mk ============================================================================== --- head/share/mk/meta.sys.mk Fri Jul 27 10:40:48 2018 (r336757) +++ head/share/mk/meta.sys.mk Fri Jul 27 10:44:38 2018 (r336758) @@ -23,7 +23,7 @@ .-include "local.meta.sys.mk" -# absoulte path to what we are reading. +# absolute path to what we are reading. _PARSEDIR = ${.PARSEDIR:tA} .if !defined(SYS_MK_DIR) Modified: head/share/mk/plain.test.mk ============================================================================== --- head/share/mk/plain.test.mk Fri Jul 27 10:40:48 2018 (r336757) +++ head/share/mk/plain.test.mk Fri Jul 27 10:44:38 2018 (r336758) @@ -16,7 +16,7 @@ # PROGS, PROGS_CXX and SCRIPTS, respectively. # # Test programs registered in this manner are set to be installed into TESTSDIR -# (which should be overriden by the Makefile) and are not required to provide a +# (which should be overridden by the Makefile) and are not required to provide a # manpage. PLAIN_TESTS_C?= PLAIN_TESTS_CXX?= Modified: head/share/mk/tap.test.mk ============================================================================== --- head/share/mk/tap.test.mk Fri Jul 27 10:40:48 2018 (r336757) +++ head/share/mk/tap.test.mk Fri Jul 27 10:44:38 2018 (r336758) @@ -18,7 +18,7 @@ # PROGS, PROGS_CXX and SCRIPTS, respectively. # # Test programs registered in this manner are set to be installed into TESTSDIR -# (which should be overriden by the Makefile) and are not required to provide a +# (which should be overridden by the Makefile) and are not required to provide a # manpage. TAP_TESTS_C?= TAP_TESTS_CXX?= From owner-svn-src-head@freebsd.org Fri Jul 27 11:35: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 7B7CA104784A; Fri, 27 Jul 2018 11:35:59 +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 28CD470873; Fri, 27 Jul 2018 11:35:59 +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 F19111759E; Fri, 27 Jul 2018 11:35:58 +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 w6RBZwnW003117; Fri, 27 Jul 2018 11:35:58 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RBZwFU003116; Fri, 27 Jul 2018 11:35:58 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201807271135.w6RBZwFU003116@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 27 Jul 2018 11:35:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336759 - head/stand/lua X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: head/stand/lua X-SVN-Commit-Revision: 336759 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: Fri, 27 Jul 2018 11:35:59 -0000 Author: kevans Date: Fri Jul 27 11:35:58 2018 New Revision: 336759 URL: https://svnweb.freebsd.org/changeset/base/336759 Log: lualoader: "nextboot_file" should be spelled "nextboot_conf" See: /boot/defaults/loader.conf Reported by: gtetlow (inadvertently) Modified: head/stand/lua/config.lua Modified: head/stand/lua/config.lua ============================================================================== --- head/stand/lua/config.lua Fri Jul 27 10:44:38 2018 (r336758) +++ head/stand/lua/config.lua Fri Jul 27 11:35:58 2018 (r336759) @@ -317,7 +317,7 @@ local function readFile(name, silent) end local function checkNextboot() - local nextboot_file = loader.getenv("nextboot_file") + local nextboot_file = loader.getenv("nextboot_conf") if nextboot_file == nil then return end From owner-svn-src-head@freebsd.org Fri Jul 27 13:11: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 9CBD2104A2B4; Fri, 27 Jul 2018 13:11:06 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 53CF973CF1; Fri, 27 Jul 2018 13:11:06 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 34F9E18517; Fri, 27 Jul 2018 13:11:06 +0000 (UTC) (envelope-from luporl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6RDB6IC050946; Fri, 27 Jul 2018 13:11:06 GMT (envelope-from luporl@FreeBSD.org) Received: (from luporl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RDB6L9050945; Fri, 27 Jul 2018 13:11:06 GMT (envelope-from luporl@FreeBSD.org) Message-Id: <201807271311.w6RDB6L9050945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: luporl set sender to luporl@FreeBSD.org using -f From: Leandro Lupori Date: Fri, 27 Jul 2018 13:11:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336760 - head/sys/dev/ahci X-SVN-Group: head X-SVN-Commit-Author: luporl X-SVN-Commit-Paths: head/sys/dev/ahci X-SVN-Commit-Revision: 336760 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: Fri, 27 Jul 2018 13:11:06 -0000 Author: luporl Date: Fri Jul 27 13:11:05 2018 New Revision: 336760 URL: https://svnweb.freebsd.org/changeset/base/336760 Log: Fixed endianess issue in AHCI driver There were some bits that were being set in cmd_flags (a field of AHCI's command list structure) after cmd_flags was converted to little endian. On a big endian host, such as PowerPC, this would set the wrong bits. This was preventing AHCI driver from working on these hosts. Reviewed by: jhibbits Approved by: jhibbits (mentor) Modified: head/sys/dev/ahci/ahci.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Fri Jul 27 11:35:58 2018 (r336759) +++ head/sys/dev/ahci/ahci.c Fri Jul 27 13:11:05 2018 (r336760) @@ -1523,6 +1523,7 @@ ahci_execute_transaction(struct ahci_slot *slot) int fis_size, i, softreset; uint8_t *fis = ch->dma.rfis + 0x40; uint8_t val; + uint16_t cmd_flags; /* Get a piece of the workspace for this request */ ctp = (struct ahci_cmd_tab *) @@ -1536,12 +1537,12 @@ ahci_execute_transaction(struct ahci_slot *slot) /* Setup the command list entry */ clp = (struct ahci_cmd_list *) (ch->dma.work + AHCI_CL_OFFSET + (AHCI_CL_SIZE * slot->slot)); - clp->cmd_flags = htole16( + cmd_flags = (ccb->ccb_h.flags & CAM_DIR_OUT ? AHCI_CMD_WRITE : 0) | (ccb->ccb_h.func_code == XPT_SCSI_IO ? (AHCI_CMD_ATAPI | AHCI_CMD_PREFETCH) : 0) | (fis_size / sizeof(u_int32_t)) | - (port << 12)); + (port << 12); clp->prd_length = htole16(slot->dma.nsegs); /* Special handling for Soft Reset command. */ if ((ccb->ccb_h.func_code == XPT_ATA_IO) && @@ -1552,7 +1553,7 @@ ahci_execute_transaction(struct ahci_slot *slot) ahci_stop(ch); ahci_clo(ch); ahci_start(ch, 0); - clp->cmd_flags |= AHCI_CMD_RESET | AHCI_CMD_CLR_BUSY; + cmd_flags |= AHCI_CMD_RESET | AHCI_CMD_CLR_BUSY; } else { softreset = 2; /* Prepare FIS receive area for check. */ @@ -1562,6 +1563,7 @@ ahci_execute_transaction(struct ahci_slot *slot) } else softreset = 0; clp->bytecount = 0; + clp->cmd_flags = htole16(cmd_flags); clp->cmd_table_phys = htole64(ch->dma.work_bus + AHCI_CT_OFFSET + (AHCI_CT_SIZE * slot->slot)); bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, From owner-svn-src-head@freebsd.org Fri Jul 27 13:49: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 C2296104B470; Fri, 27 Jul 2018 13:49: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 779DF7525A; Fri, 27 Jul 2018 13:49:18 +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 5464B18A48; Fri, 27 Jul 2018 13:49:18 +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 w6RDnIrp070442; Fri, 27 Jul 2018 13:49:18 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RDnHoX070437; Fri, 27 Jul 2018 13:49:17 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201807271349.w6RDnHoX070437@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Fri, 27 Jul 2018 13:49:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336761 - in head: lib/libc/sys sys/kern tests/sys/kqueue/libkqueue X-SVN-Group: head X-SVN-Commit-Author: dab X-SVN-Commit-Paths: in head: lib/libc/sys sys/kern tests/sys/kqueue/libkqueue X-SVN-Commit-Revision: 336761 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: Fri, 27 Jul 2018 13:49:19 -0000 Author: dab Date: Fri Jul 27 13:49:17 2018 New Revision: 336761 URL: https://svnweb.freebsd.org/changeset/base/336761 Log: Allow a EVFILT_TIMER kevent to be updated. If a timer is updated (re-added) with a different time period (specified in the .data field of the kevent), the new time period has no effect; the timer will not expire until the original time has elapsed. This violates the documented behavior as the kqueue(2) man page says (in part) "Re-adding an existing event will modify the parameters of the original event, and not result in a duplicate entry." This modification, adapted from a patch submitted by cem@ to PR214987, fixes the kqueue system to allow updating a timer entry. The kevent timer behavior is changed to: * When a timer is re-added, update the timer parameters to and re-start the timer using the new parameters. * Allow updating both active and already expired timers. * When the timer has already expired, dequeue any undelivered events and clear the count of expirations. All of these changes address the original PR and also bring the FreeBSD and macOS kevent timer behaviors into agreement. A few other changes were made along the way: * Update the kqueue(2) man page to reflect the new timer behavior. * Fix man page style issues in kqueue(2) diagnosed by igor. * Update the timer libkqueue system test to test for the updated timer behavior. * Fix the (test) libkqueue common.h file so that it includes config.h which defines various HAVE_* feature defines, before the #if tests for such variables in common.h. This enables the use of the actual err(3) family of functions. * Fix the usages of the err(3) functions in the tests for incorrect type of variables. Those were formerly undiagnosed due to the disablement of the err(3) functions (see previous bullet point). PR: 214987 Reported by: Brian Wellington Reviewed by: kib MFC after: 1 week Relnotes: yes Sponsored by: Dell EMC Differential Revision: https://reviews.freebsd.org/D15778 Modified: head/lib/libc/sys/kqueue.2 head/sys/kern/kern_event.c head/tests/sys/kqueue/libkqueue/common.h head/tests/sys/kqueue/libkqueue/main.c head/tests/sys/kqueue/libkqueue/timer.c Modified: head/lib/libc/sys/kqueue.2 ============================================================================== --- head/lib/libc/sys/kqueue.2 Fri Jul 27 13:11:05 2018 (r336760) +++ head/lib/libc/sys/kqueue.2 Fri Jul 27 13:49:17 2018 (r336761) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 22, 2017 +.Dd July 27, 2018 .Dt KQUEUE 2 .Os .Sh NAME @@ -154,7 +154,7 @@ struct kevent { u_int fflags; /* filter flag value */ int64_t data; /* filter data value */ void *udata; /* opaque user data identifier */ - uint64_t ext[4]; /* extentions */ + uint64_t ext[4]; /* extensions */ }; .Ed .Pp @@ -355,8 +355,8 @@ Events for this filter are not registered with .Fn kevent directly but are registered via the .Va aio_sigevent -member of an asychronous I/O request when it is scheduled via an asychronous I/O -system call such as +member of an asynchronous I/O request when it is scheduled via an +asynchronous I/O system call such as .Fn aio_read . The filter returns under the same conditions as .Fn aio_error . @@ -501,7 +501,7 @@ been marked as .Dv SIG_IGN , except for the .Dv SIGCHLD -signal, which, if ignored, won't be recorded by the filter. +signal, which, if ignored, will not be recorded by the filter. Event notification happens after normal signal delivery processing. .Va data @@ -558,6 +558,13 @@ On return, .Va fflags contains the events which triggered the filter. .Pp +If an existing timer is re-added, the existing timer will be +effectively canceled (throwing away any undelivered record of previous +timer expiration) and re-started using the new parameters contained in +.Va data +and +.Va fflags . +.Pp There is a system wide limit on the number of timers which is controlled by the .Va kern.kq_calloutmax @@ -604,9 +611,9 @@ contains the users defined flags in the lower 24 bits. .Sh CANCELLATION BEHAVIOUR If .Fa nevents -is non-zero, i.e. the function is potentially blocking, the call +is non-zero, i.e., the function is potentially blocking, the call is a cancellation point. -Otherwise, i.e. if +Otherwise, i.e., if .Fa nevents is zero, the call is not cancellable. Cancellation can only occur before any changes are made to the kqueue, @@ -782,7 +789,7 @@ The value is limited to 24 hours; longer timeouts will be silently reinterpreted as 24 hours. .Pp -In versions older than +In versions older than .Fx 12.0 , .In sys/event.h failed to parse without including Modified: head/sys/kern/kern_event.c ============================================================================== --- head/sys/kern/kern_event.c Fri Jul 27 13:11:05 2018 (r336760) +++ head/sys/kern/kern_event.c Fri Jul 27 13:49:17 2018 (r336761) @@ -162,6 +162,10 @@ static int filt_fileattach(struct knote *kn); static void filt_timerexpire(void *knx); static int filt_timerattach(struct knote *kn); static void filt_timerdetach(struct knote *kn); +static void filt_timerstart(struct knote *kn, sbintime_t to); +static void filt_timertouch(struct knote *kn, struct kevent *kev, + u_long type); +static int filt_timervalidate(struct knote *kn, sbintime_t *to); static int filt_timer(struct knote *kn, long hint); static int filt_userattach(struct knote *kn); static void filt_userdetach(struct knote *kn); @@ -190,6 +194,7 @@ static struct filterops timer_filtops = { .f_attach = filt_timerattach, .f_detach = filt_timerdetach, .f_event = filt_timer, + .f_touch = filt_timertouch, }; static struct filterops user_filtops = { .f_attach = filt_userattach, @@ -699,30 +704,45 @@ filt_timerexpire(void *knx) * data contains amount of time to sleep */ static int -filt_timerattach(struct knote *kn) +filt_timervalidate(struct knote *kn, sbintime_t *to) { - struct kq_timer_cb_data *kc; struct bintime bt; - sbintime_t to, sbt; - unsigned int ncallouts; + sbintime_t sbt; if (kn->kn_sdata < 0) return (EINVAL); if (kn->kn_sdata == 0 && (kn->kn_flags & EV_ONESHOT) == 0) kn->kn_sdata = 1; - /* Only precision unit are supported in flags so far */ + /* + * The only fflags values supported are the timer unit + * (precision) and the absolute time indicator. + */ if ((kn->kn_sfflags & ~(NOTE_TIMER_PRECMASK | NOTE_ABSTIME)) != 0) return (EINVAL); - to = timer2sbintime(kn->kn_sdata, kn->kn_sfflags); + *to = timer2sbintime(kn->kn_sdata, kn->kn_sfflags); if ((kn->kn_sfflags & NOTE_ABSTIME) != 0) { getboottimebin(&bt); sbt = bttosbt(bt); - to -= sbt; + *to -= sbt; } - if (to < 0) + if (*to < 0) return (EINVAL); + return (0); +} +static int +filt_timerattach(struct knote *kn) +{ + struct kq_timer_cb_data *kc; + sbintime_t to; + unsigned int ncallouts; + int error; + + error = filt_timervalidate(kn, &to); + if (error != 0) + return (error); + do { ncallouts = kq_ncallouts; if (ncallouts >= kq_calloutmax) @@ -734,6 +754,17 @@ filt_timerattach(struct knote *kn) kn->kn_status &= ~KN_DETACHED; /* knlist_add clears it */ kn->kn_ptr.p_v = kc = malloc(sizeof(*kc), M_KQUEUE, M_WAITOK); callout_init(&kc->c, 1); + filt_timerstart(kn, to); + + return (0); +} + +static void +filt_timerstart(struct knote *kn, sbintime_t to) +{ + struct kq_timer_cb_data *kc; + + kc = kn->kn_ptr.p_v; if ((kn->kn_sfflags & NOTE_ABSTIME) != 0) { kc->next = to; kc->to = 0; @@ -743,8 +774,6 @@ filt_timerattach(struct knote *kn) } callout_reset_sbt_on(&kc->c, kc->next, 0, filt_timerexpire, kn, PCPU_GET(cpuid), C_ABSOLUTE); - - return (0); } static void @@ -759,6 +788,73 @@ filt_timerdetach(struct knote *kn) old = atomic_fetchadd_int(&kq_ncallouts, -1); KASSERT(old > 0, ("Number of callouts cannot become negative")); kn->kn_status |= KN_DETACHED; /* knlist_remove sets it */ +} + +static void +filt_timertouch(struct knote *kn, struct kevent *kev, u_long type) +{ + struct kq_timer_cb_data *kc; + struct kqueue *kq; + sbintime_t to; + int error; + + switch (type) { + case EVENT_REGISTER: + /* Handle re-added timers that update data/fflags */ + if (kev->flags & EV_ADD) { + kc = kn->kn_ptr.p_v; + + /* Drain any existing callout. */ + callout_drain(&kc->c); + + /* Throw away any existing undelivered record + * of the timer expiration. This is done under + * the presumption that if a process is + * re-adding this timer with new parameters, + * it is no longer interested in what may have + * happened under the old parameters. If it is + * interested, it can wait for the expiration, + * delete the old timer definition, and then + * add the new one. + * + * This has to be done while the kq is locked: + * - if enqueued, dequeue + * - make it no longer active + * - clear the count of expiration events + */ + kq = kn->kn_kq; + KQ_LOCK(kq); + if (kn->kn_status & KN_QUEUED) + knote_dequeue(kn); + + kn->kn_status &= ~KN_ACTIVE; + kn->kn_data = 0; + KQ_UNLOCK(kq); + + /* Reschedule timer based on new data/fflags */ + kn->kn_sfflags = kev->fflags; + kn->kn_sdata = kev->data; + error = filt_timervalidate(kn, &to); + if (error != 0) { + kn->kn_flags |= EV_ERROR; + kn->kn_data = error; + } else + filt_timerstart(kn, to); + } + break; + + case EVENT_PROCESS: + *kev = kn->kn_kevent; + if (kn->kn_flags & EV_CLEAR) { + kn->kn_data = 0; + kn->kn_fflags = 0; + } + break; + + default: + panic("filt_timertouch() - invalid type (%ld)", type); + break; + } } static int Modified: head/tests/sys/kqueue/libkqueue/common.h ============================================================================== --- head/tests/sys/kqueue/libkqueue/common.h Fri Jul 27 13:11:05 2018 (r336760) +++ head/tests/sys/kqueue/libkqueue/common.h Fri Jul 27 13:49:17 2018 (r336761) @@ -19,6 +19,7 @@ #ifndef _COMMON_H #define _COMMON_H +#include "config.h" /* Needed for HAVE_* defines */ #if HAVE_ERR_H # include @@ -39,8 +40,6 @@ #include -#include "config.h" - extern char *cur_test_id; int vnode_fd; @@ -72,6 +71,7 @@ kevent_add(int kqfd, struct kevent *kev, /* Checks if any events are pending, which is an error. */ extern void test_no_kevents(void); +extern void test_no_kevents_quietly(void); extern void test_begin(const char *); extern void success(void); Modified: head/tests/sys/kqueue/libkqueue/main.c ============================================================================== --- head/tests/sys/kqueue/libkqueue/main.c Fri Jul 27 13:11:05 2018 (r336760) +++ head/tests/sys/kqueue/libkqueue/main.c Fri Jul 27 13:49:17 2018 (r336761) @@ -52,6 +52,25 @@ test_no_kevents(void) } } +/* Checks if any events are pending, which is an error. Do not print + * out anything unless events are found. +*/ +void +test_no_kevents_quietly(void) +{ + int nfds; + struct timespec timeo; + struct kevent kev; + + memset(&timeo, 0, sizeof(timeo)); + nfds = kevent(kqfd, NULL, 0, &kev, 1, &timeo); + if (nfds != 0) { + puts("\nUnexpected event:"); + puts(kevent_to_str(&kev)); + errx(1, "%d event(s) pending, but none expected:", nfds); + } +} + /* Retrieve a single kevent */ struct kevent * kevent_get(int kqfd) Modified: head/tests/sys/kqueue/libkqueue/timer.c ============================================================================== --- head/tests/sys/kqueue/libkqueue/timer.c Fri Jul 27 13:11:05 2018 (r336760) +++ head/tests/sys/kqueue/libkqueue/timer.c Fri Jul 27 13:49:17 2018 (r336761) @@ -19,9 +19,59 @@ #include "common.h" #include +#define MILLION 1000000 +#define THOUSAND 1000 +#define SEC_TO_MS(t) ((t) * THOUSAND) /* Convert seconds to milliseconds. */ +#define SEC_TO_US(t) ((t) * MILLION) /* Convert seconds to microseconds. */ +#define MS_TO_US(t) ((t) * THOUSAND) /* Convert milliseconds to microseconds. */ +#define US_TO_NS(t) ((t) * THOUSAND) /* Convert microseconds to nanoseconds. */ + int kqfd; +/* Get the current time with microsecond precision. Used for + * sub-second timing to make some timer tests run faster. + */ +static long +now(void) +{ + + struct timeval tv; + + gettimeofday(&tv, NULL); + return SEC_TO_US(tv.tv_sec) + tv.tv_usec; +} + +/* Sleep for a given number of milliseconds. The timeout is assumed to + * be less than 1 second. + */ void +mssleep(int t) +{ + + struct timespec stime = { + .tv_sec = 0, + .tv_nsec = US_TO_NS(MS_TO_US(t)), + }; + + nanosleep(&stime, NULL); +} + +/* Sleep for a given number of microseconds. The timeout is assumed to + * be less than 1 second. + */ +void +ussleep(int t) +{ + + struct timespec stime = { + .tv_sec = 0, + .tv_nsec = US_TO_NS(t), + }; + + nanosleep(&stime, NULL); +} + +void test_kevent_timer_add(void) { const char *test_id = "kevent(EVFILT_TIMER, EV_ADD)"; @@ -189,7 +239,7 @@ test_abstime(void) kev.fflags = 0; kevent_cmp(&kev, kevent_get(kqfd)); if (time(NULL) < when + timeout) - err(1, "too early %jd %jd", time(), when + timeout); + err(1, "too early %jd %jd", time(NULL), when + timeout); /* Check if the event occurs again */ sleep(3); @@ -198,16 +248,283 @@ test_abstime(void) success(); } +static void +test_update(void) +{ + const char *test_id = "kevent(EVFILT_TIMER (UPDATE), EV_ADD | EV_ONESHOT)"; + struct kevent kev; + long elapsed; + long start; + + test_begin(test_id); + + test_no_kevents(); + + /* First set the timer to 1 second */ + EV_SET(&kev, vnode_fd, EVFILT_TIMER, EV_ADD | EV_ONESHOT, + NOTE_USECONDS, SEC_TO_US(1), (void *)1); + start = now(); + if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0) + err(1, "%s", test_id); + + /* Now reduce the timer to 1 ms */ + EV_SET(&kev, vnode_fd, EVFILT_TIMER, EV_ADD | EV_ONESHOT, + NOTE_USECONDS, MS_TO_US(1), (void *)2); + if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0) + err(1, "%s", test_id); + + /* Wait for the event */ + kev.flags |= EV_CLEAR; + kev.fflags &= ~NOTE_USECONDS; + kev.data = 1; + kevent_cmp(&kev, kevent_get(kqfd)); + elapsed = now() - start; + + /* Check that the timer expired after at least 1 ms, but less than + * 1 second. This check is to make sure that the original 1 second + * timeout was not used. + */ + printf("timer expired after %ld us\n", elapsed); + if (elapsed < MS_TO_US(1)) + errx(1, "early timer expiration: %ld us", elapsed); + if (elapsed > SEC_TO_US(1)) + errx(1, "late timer expiration: %ld us", elapsed); + + success(); +} + +static void +test_update_equal(void) +{ + const char *test_id = "kevent(EVFILT_TIMER (UPDATE=), EV_ADD | EV_ONESHOT)"; + struct kevent kev; + long elapsed; + long start; + + test_begin(test_id); + + test_no_kevents(); + + /* First set the timer to 1 ms */ + EV_SET(&kev, vnode_fd, EVFILT_TIMER, EV_ADD | EV_ONESHOT, + NOTE_USECONDS, MS_TO_US(1), NULL); + if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0) + err(1, "%s", test_id); + + /* Sleep for a significant fraction of the timeout. */ + ussleep(600); + + /* Now re-add the timer with the same parameters */ + start = now(); + if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0) + err(1, "%s", test_id); + + /* Wait for the event */ + kev.flags |= EV_CLEAR; + kev.fflags &= ~NOTE_USECONDS; + kev.data = 1; + kevent_cmp(&kev, kevent_get(kqfd)); + elapsed = now() - start; + + /* Check that the timer expired after at least 1 ms. This check is + * to make sure that the timer re-started and that the event is + * not from the original add of the timer. + */ + printf("timer expired after %ld us\n", elapsed); + if (elapsed < MS_TO_US(1)) + errx(1, "early timer expiration: %ld us", elapsed); + + success(); +} + +static void +test_update_expired(void) +{ + const char *test_id = "kevent(EVFILT_TIMER (UPDATE EXP), EV_ADD | EV_ONESHOT)"; + struct kevent kev; + long elapsed; + long start; + + test_begin(test_id); + + test_no_kevents(); + + /* Set the timer to 1ms */ + EV_SET(&kev, vnode_fd, EVFILT_TIMER, EV_ADD | EV_ONESHOT, + NOTE_USECONDS, MS_TO_US(1), NULL); + if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0) + err(1, "%s", test_id); + + /* Wait for 2 ms to give the timer plenty of time to expire. */ + mssleep(2); + + /* Now re-add the timer */ + start = now(); + if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0) + err(1, "%s", test_id); + + /* Wait for the event */ + kev.flags |= EV_CLEAR; + kev.fflags &= ~NOTE_USECONDS; + kev.data = 1; + kevent_cmp(&kev, kevent_get(kqfd)); + elapsed = now() - start; + + /* Check that the timer expired after at least 1 ms. This check + * is to make sure that the timer re-started and that the event is + * not from the original add (and expiration) of the timer. + */ + printf("timer expired after %ld us\n", elapsed); + if (elapsed < MS_TO_US(1)) + errx(1, "early timer expiration: %ld us", elapsed); + + /* Make sure the re-added timer does not fire. In other words, + * test that the event received above was the only event from the + * add and re-add of the timer. + */ + mssleep(2); + test_no_kevents(); + + success(); +} + +static void +test_update_periodic(void) +{ + const char *test_id = "kevent(EVFILT_TIMER (UPDATE), periodic)"; + struct kevent kev; + long elapsed; + long start; + long stop; + + test_begin(test_id); + + test_no_kevents(); + + EV_SET(&kev, vnode_fd, EVFILT_TIMER, EV_ADD, 0, SEC_TO_MS(1), NULL); + if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0) + err(1, "%s", test_id); + + /* Retrieve the event */ + kev.flags = EV_ADD | EV_CLEAR; + kev.data = 1; + kevent_cmp(&kev, kevent_get(kqfd)); + + /* Check if the event occurs again */ + sleep(1); + kevent_cmp(&kev, kevent_get(kqfd)); + + /* Re-add with new timeout. */ + EV_SET(&kev, vnode_fd, EVFILT_TIMER, EV_ADD, 0, SEC_TO_MS(2), NULL); + start = now(); + if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0) + err(1, "%s", test_id); + + /* Retrieve the event */ + kev.flags = EV_ADD | EV_CLEAR; + kev.data = 1; + kevent_cmp(&kev, kevent_get(kqfd)); + + stop = now(); + elapsed = stop - start; + + /* Check that the timer expired after at least 2 ms. + */ + printf("timer expired after %ld us\n", elapsed); + if (elapsed < MS_TO_US(2)) + errx(1, "early timer expiration: %ld us", elapsed); + + /* Delete the event */ + kev.flags = EV_DELETE; + if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0) + err(1, "%s", test_id); + + success(); +} + +static void +test_update_timing(void) +{ +#define MIN_SLEEP 500 +#define MAX_SLEEP 1500 + const char *test_id = "kevent(EVFILT_TIMER (UPDATE TIMING), EV_ADD | EV_ONESHOT)"; + struct kevent kev; + int iteration; + int sleeptime; + long elapsed; + long start; + long stop; + + test_begin(test_id); + + test_no_kevents(); + + /* Re-try the update tests with a variety of delays between the + * original timer activation and the update of the timer. The goal + * is to show that in all cases the only timer event that is + * received is from the update and not the original timer add. + */ + for (sleeptime = MIN_SLEEP, iteration = 1; + sleeptime < MAX_SLEEP; + ++sleeptime, ++iteration) { + + /* First set the timer to 1 ms */ + EV_SET(&kev, vnode_fd, EVFILT_TIMER, EV_ADD | EV_ONESHOT, + NOTE_USECONDS, MS_TO_US(1), NULL); + if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0) + err(1, "%s", test_id); + + /* Delay; the delay ranges from less than to greater than the + * timer period. + */ + ussleep(sleeptime); + + /* Now re-add the timer with the same parameters */ + start = now(); + if (kevent(kqfd, &kev, 1, NULL, 0, NULL) < 0) + err(1, "%s", test_id); + + /* Wait for the event */ + kev.flags |= EV_CLEAR; + kev.fflags &= ~NOTE_USECONDS; + kev.data = 1; + kevent_cmp(&kev, kevent_get(kqfd)); + stop = now(); + elapsed = stop - start; + + /* Check that the timer expired after at least 1 ms. This + * check is to make sure that the timer re-started and that + * the event is not from the original add of the timer. + */ + if (elapsed < MS_TO_US(1)) + errx(1, "early timer expiration: %ld us", elapsed); + + /* Make sure the re-added timer does not fire. In other words, + * test that the event received above was the only event from + * the add and re-add of the timer. + */ + mssleep(2); + test_no_kevents_quietly(); + } + + success(); +} + void test_evfilt_timer() { kqfd = kqueue(); - test_kevent_timer_add(); - test_kevent_timer_del(); - test_kevent_timer_get(); - test_oneshot(); - test_periodic(); - test_abstime(); - disable_and_enable(); + test_kevent_timer_add(); + test_kevent_timer_del(); + test_kevent_timer_get(); + test_oneshot(); + test_periodic(); + test_abstime(); + test_update(); + test_update_equal(); + test_update_expired(); + test_update_timing(); + test_update_periodic(); + disable_and_enable(); close(kqfd); } From owner-svn-src-head@freebsd.org Fri Jul 27 15:03: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 C5C7A104DCB2; Fri, 27 Jul 2018 15:03:12 +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 384BF790CE; Fri, 27 Jul 2018 15:03:12 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id w6RF344g007817 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 27 Jul 2018 18:03:07 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w6RF344g007817 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w6RF34wE007816; Fri, 27 Jul 2018 18:03:04 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 27 Jul 2018 18:03:04 +0300 From: Konstantin Belousov To: Ian Lepore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336746 - in head/lib: libc/gen libutil Message-ID: <20180727150304.GA2489@kib.kiev.ua> References: <201807261834.w6QIYc9i080738@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201807261834.w6QIYc9i080738@repo.freebsd.org> User-Agent: Mutt/1.10.1 (2018-07-13) 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.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: Fri, 27 Jul 2018 15:03:13 -0000 On Thu, Jul 26, 2018 at 06:34:38PM +0000, Ian Lepore wrote: > Author: ian > Date: Thu Jul 26 18:34:38 2018 > New Revision: 336746 > URL: https://svnweb.freebsd.org/changeset/base/336746 > > Log: > Make pw_scan(3) more compatible with getpwent(3) et. al. when processing > data from /etc/passwd rather than /etc/master.passwd. > > The libc getpwent(3) and related functions automatically read master.passwd > when run by root, or passwd when run by a non-root user. When run by non- > root, getpwent() copes with the missing data by setting the corresponding > fields in the passwd struct to known values (zeroes for numbers, or a > pointer to an empty string for literals). When libutil's pw_scan(3) was > used to parse a line without the root-accessible data, it was leaving > garbage in the corresponding fields. > > These changes rename the static pw_init() function used by getpwent() and > friends to __pw_initpwd(), and move it into pw_scan.c so that common init > code can be shared between libc and libutil. pw_scan(3) now calls > __pw_initpwd() before __pw_scan(), just like the getpwent() family does, so > that reading an arbitrary passwd file in either format and parsing it with > pw_scan(3) returns the same results as getpwent(3) would. > > This also adds a new pw_initpwd(3) function to libutil, so that code which > creates passwd structs from scratch in some manner that doesn't involve > pw_scan() can initialize the struct to the values expected by lots of > existing code, which doesn't expect to encounter NULL pointers or garbage > values in some fields. > If my reading is right, you just made libutil depend on the internal libc interfaces. Formal consequence is that libutil.so version must be bumped each time the used interface is changed (and it is allowed to change). I think that your change actually requires the bump of libutil.so.N version already. Also, libutil.so.N should be moved from the libutil pkgbase package to the clibs package, I am not sure about this. At the higher level, I very much dislike this change. FBSDprivate_1.0 namespace is for symbols providing the internal interfaces for the C runtime implementation in the FreeBSD. This is mostly a knot of inter-dependencies between rtld, libc and libthr. libutil arguably should not participate. If you want for libc to provide a functionality outside the C runtime, please make the sustainable interface, which ABI can be maintained, and export the symbols in the normal namespace, with the usual stability guarantees. From owner-svn-src-head@freebsd.org Fri Jul 27 15:17: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 361E2104E277; Fri, 27 Jul 2018 15:17:25 +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 E07A97991D; Fri, 27 Jul 2018 15:17: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 BD552198A5; Fri, 27 Jul 2018 15:17:24 +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 w6RFHOJo016121; Fri, 27 Jul 2018 15:17:24 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RFHOB0016120; Fri, 27 Jul 2018 15:17:24 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201807271517.w6RFHOB0016120@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 27 Jul 2018 15:17:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336762 - head/usr.sbin/pw X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: head/usr.sbin/pw X-SVN-Commit-Revision: 336762 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: Fri, 27 Jul 2018 15:17:25 -0000 Author: ian Date: Fri Jul 27 15:17:24 2018 New Revision: 336762 URL: https://svnweb.freebsd.org/changeset/base/336762 Log: Remove some code that's no longer needed because it's now part of pw_scan(3). It was also leading to segfaults; pw can be NULL when control reaches these lines now, because of the way my previous change restructured the loops. Reported by: lwhsu@ Modified: head/usr.sbin/pw/pw_vpw.c Modified: head/usr.sbin/pw/pw_vpw.c ============================================================================== --- head/usr.sbin/pw/pw_vpw.c Fri Jul 27 13:49:17 2018 (r336761) +++ head/usr.sbin/pw/pw_vpw.c Fri Jul 27 15:17:24 2018 (r336762) @@ -113,18 +113,6 @@ vnextpwent(char const *nam, uid_t uid, int doclose) } free(line); - /* - * If we read the non-master passwd, some fields may not have been - * populated. Clean them up so that the output looks the same as that - * generated using getpwnam() which also inits them to these values. - */ - if (!(pw->pw_fields & _PWF_CLASS)) - pw->pw_class = ""; - if (!(pw->pw_fields & _PWF_CHANGE)) - pw->pw_change = 0; - if (!(pw->pw_fields & _PWF_EXPIRE)) - pw->pw_expire = 0; - return (pw); } From owner-svn-src-head@freebsd.org Fri Jul 27 15:31: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 6D6C7104E8B0; Fri, 27 Jul 2018 15:31:21 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 237207A1EE; Fri, 27 Jul 2018 15:31: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 0641019B6F; Fri, 27 Jul 2018 15:31: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 w6RFVKYv021506; Fri, 27 Jul 2018 15:31:20 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RFVK57021504; Fri, 27 Jul 2018 15:31:20 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201807271531.w6RFVK57021504@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 27 Jul 2018 15:31:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336763 - in head/sys: amd64/amd64 x86/x86 X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: amd64/amd64 x86/x86 X-SVN-Commit-Revision: 336763 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: Fri, 27 Jul 2018 15:31:21 -0000 Author: kib Date: Fri Jul 27 15:31:20 2018 New Revision: 336763 URL: https://svnweb.freebsd.org/changeset/base/336763 Log: On amd64, enable workarounds for several Ryzen erratas as described in the AMD document 55449 'Revision Guide for AMD Family 17h Models 00h-0Fh Processors' rev 1.12. The errata numbers are mentioned near each action. It seems that newer BIOSes already include required chicken bits settings, so the magic MSR updates are only needed when BIOS cannot be updated. On the other hand, MWAIT avoidance seems to be important. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/amd64/initcpu.c head/sys/x86/x86/cpu_machdep.c Modified: head/sys/amd64/amd64/initcpu.c ============================================================================== --- head/sys/amd64/amd64/initcpu.c Fri Jul 27 15:17:24 2018 (r336762) +++ head/sys/amd64/amd64/initcpu.c Fri Jul 27 15:31:20 2018 (r336763) @@ -130,6 +130,30 @@ init_amd(void) } } + /* Ryzen erratas. */ + if (CPUID_TO_FAMILY(cpu_id) == 0x17 && CPUID_TO_MODEL(cpu_id) == 0x1 && + (cpu_feature2 & CPUID2_HV) == 0) { + /* 1021 */ + msr = rdmsr(0xc0011029); + msr |= 0x2000; + wrmsr(0xc0011029, msr); + + /* 1033 */ + msr = rdmsr(0xc0011020); + msr |= 0x10; + wrmsr(0xc0011020, msr); + + /* 1049 */ + msr = rdmsr(0xc0011028); + msr |= 0x10; + wrmsr(0xc0011028, msr); + + /* 1095 */ + msr = rdmsr(0xc0011020); + msr |= 0x200000000000000; + wrmsr(0xc0011020, msr); + } + /* * Work around a problem on Ryzen that is triggered by executing * code near the top of user memory, in our case the signal Modified: head/sys/x86/x86/cpu_machdep.c ============================================================================== --- head/sys/x86/x86/cpu_machdep.c Fri Jul 27 15:17:24 2018 (r336762) +++ head/sys/x86/x86/cpu_machdep.c Fri Jul 27 15:31:20 2018 (r336763) @@ -709,6 +709,13 @@ cpu_idle_tun(void *unused __unused) if (TUNABLE_STR_FETCH("machdep.idle", tunvar, sizeof(tunvar))) cpu_idle_selector(tunvar); + else if (cpu_vendor_id == CPU_VENDOR_AMD && + CPUID_TO_FAMILY(cpu_id) == 0x17 && CPUID_TO_MODEL(cpu_id) == 0x1) { + /* Ryzen erratas 1057, 1109. */ + cpu_idle_selector("hlt"); + idle_mwait = 0; + } + if (cpu_vendor_id == CPU_VENDOR_INTEL && cpu_id == 0x506c9) { /* * Apollo Lake errata APL31 (public errata APL30). From owner-svn-src-head@freebsd.org Fri Jul 27 15:35: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 6F40B104E99C for ; Fri, 27 Jul 2018 15:35:50 +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 E76457A578 for ; Fri, 27 Jul 2018 15:35:49 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: b82a7eea-91b2-11e8-904b-1d2e466b3c59 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 b82a7eea-91b2-11e8-904b-1d2e466b3c59; Fri, 27 Jul 2018 15:35:42 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w6RFZfQK023737; Fri, 27 Jul 2018 09:35:41 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1532705741.61594.53.camel@freebsd.org> Subject: Re: svn commit: r336746 - in head/lib: libc/gen libutil From: Ian Lepore To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Fri, 27 Jul 2018 09:35:41 -0600 In-Reply-To: <20180727150304.GA2489@kib.kiev.ua> References: <201807261834.w6QIYc9i080738@repo.freebsd.org> <20180727150304.GA2489@kib.kiev.ua> 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.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: Fri, 27 Jul 2018 15:35:50 -0000 On Fri, 2018-07-27 at 18:03 +0300, Konstantin Belousov wrote: > On Thu, Jul 26, 2018 at 06:34:38PM +0000, Ian Lepore wrote: > > > > Author: ian > > Date: Thu Jul 26 18:34:38 2018 > > New Revision: 336746 > > URL: https://svnweb.freebsd.org/changeset/base/336746 > > > > Log: > >   Make pw_scan(3) more compatible with getpwent(3) et. al. when processing > >   data from /etc/passwd rather than /etc/master.passwd. > >    > >   The libc getpwent(3) and related functions automatically read master.passwd > >   when run by root, or passwd when run by a non-root user.  When run by non- > >   root, getpwent() copes with the missing data by setting the corresponding > >   fields in the passwd struct to known values (zeroes for numbers, or a > >   pointer to an empty string for literals).  When libutil's pw_scan(3) was > >   used to parse a line without the root-accessible data, it was leaving > >   garbage in the corresponding fields. > >    > >   These changes rename the static pw_init() function used by getpwent() and > >   friends to __pw_initpwd(), and move it into pw_scan.c so that common init > >   code can be shared between libc and libutil.  pw_scan(3) now calls > >   __pw_initpwd() before __pw_scan(), just like the getpwent() family does, so > >   that reading an arbitrary passwd file in either format and parsing it with > >   pw_scan(3) returns the same results as getpwent(3) would. > >    > >   This also adds a new pw_initpwd(3) function to libutil, so that code which > >   creates passwd structs from scratch in some manner that doesn't involve > >   pw_scan() can initialize the struct to the values expected by lots of > >   existing code, which doesn't expect to encounter NULL pointers or garbage > >   values in some fields. > > > If my reading is right, you just made libutil depend on the internal > libc interfaces. Formal consequence is that libutil.so version must > be bumped each time the used interface is changed (and it is allowed > to change). I think that your change actually requires the bump of > libutil.so.N version already. > > Also, libutil.so.N should be moved from the libutil pkgbase package to > the clibs package, I am not sure about this. > > At the higher level, I very much dislike this change. FBSDprivate_1.0 > namespace is for symbols providing the internal interfaces for the > C runtime implementation in the FreeBSD. This is mostly a knot of > inter-dependencies between rtld, libc and libthr. libutil arguably > should not participate. > > If you want for libc to provide a functionality outside the C runtime, > please make the sustainable interface, which ABI can be maintained, and > export the symbols in the normal namespace, with the usual stability > guarantees. There was already a function, __pw_scan(), in file pw_scan.c, which was called from both libutil and libc implementations. I added a new function __pw_initpwd() into the pw_scan.c file. That function is called from all the same places that __pw_scan() is called from. So as near as I can tell, I haven't changed the structure of anything or created any new linkages between the libraries that didn't exist already. I will admit I don't understand the FBSDprivate_1.0 stuff at all, and there appears to be no documentation or guidance on how to work with it. Since __pw_scan was in the private list, and I was adding a new function that is like it in every way, I reasoned that the new function should be in the list too. It's actually not clear to me that either of the functions should be in that list, but like I said... no published info about it that I could find. I also noticed that chpass(1) and pwd_mkdb(8)_both directly compile in their own copy of the pw_scan.c source using .PATH in their makefiles. I wonder if doing that as the way of sharing the code between libc and libutil would be a better thing to do? (And presumably that would remove the need to have entries in the FBSDprivate_1.0 list?) -- Ian From owner-svn-src-head@freebsd.org Fri Jul 27 15:44: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 D4B55104EBE3; Fri, 27 Jul 2018 15:44:08 +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 602567AA09; Fri, 27 Jul 2018 15:44:08 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id w6RFi0jc017064 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 27 Jul 2018 18:44:03 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w6RFi0jc017064 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w6RFhxDP017053; Fri, 27 Jul 2018 18:43:59 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 27 Jul 2018 18:43:59 +0300 From: Konstantin Belousov To: Ian Lepore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336746 - in head/lib: libc/gen libutil Message-ID: <20180727154359.GB2489@kib.kiev.ua> References: <201807261834.w6QIYc9i080738@repo.freebsd.org> <20180727150304.GA2489@kib.kiev.ua> <1532705741.61594.53.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1532705741.61594.53.camel@freebsd.org> User-Agent: Mutt/1.10.1 (2018-07-13) 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.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: Fri, 27 Jul 2018 15:44:09 -0000 On Fri, Jul 27, 2018 at 09:35:41AM -0600, Ian Lepore wrote: > On Fri, 2018-07-27 at 18:03 +0300, Konstantin Belousov wrote: > > On Thu, Jul 26, 2018 at 06:34:38PM +0000, Ian Lepore wrote: > > > > > > Author: ian > > > Date: Thu Jul 26 18:34:38 2018 > > > New Revision: 336746 > > > URL: https://svnweb.freebsd.org/changeset/base/336746 > > > > > > Log: > > > š Make pw_scan(3) more compatible with getpwent(3) et. al. when processing > > > š data from /etc/passwd rather than /etc/master.passwd. > > > šš > > > š The libc getpwent(3) and related functions automatically read master.passwd > > > š when run by root, or passwd when run by a non-root user.ššWhen run by non- > > > š root, getpwent() copes with the missing data by setting the corresponding > > > š fields in the passwd struct to known values (zeroes for numbers, or a > > > š pointer to an empty string for literals).ššWhen libutil's pw_scan(3) was > > > š used to parse a line without the root-accessible data, it was leaving > > > š garbage in the corresponding fields. > > > šš > > > š These changes rename the static pw_init() function used by getpwent() and > > > š friends to __pw_initpwd(), and move it into pw_scan.c so that common init > > > š code can be shared between libc and libutil.ššpw_scan(3) now calls > > > š __pw_initpwd() before __pw_scan(), just like the getpwent() family does, so > > > š that reading an arbitrary passwd file in either format and parsing it with > > > š pw_scan(3) returns the same results as getpwent(3) would. > > > šš > > > š This also adds a new pw_initpwd(3) function to libutil, so that code which > > > š creates passwd structs from scratch in some manner that doesn't involve > > > š pw_scan() can initialize the struct to the values expected by lots of > > > š existing code, which doesn't expect to encounter NULL pointers or garbage > > > š values in some fields. > > > > > If my reading is right, you just made libutil depend on the internal > > libc interfaces. Formal consequence is that libutil.so version must > > be bumped each time the used interface is changed (and it is allowed > > to change). I think that your change actually requires the bump of > > libutil.so.N version already. > > > > Also, libutil.so.N should be moved from the libutil pkgbase package to > > the clibs package, I am not sure about this. > > > > At the higher level, I very much dislike this change. FBSDprivate_1.0 > > namespace is for symbols providing the internal interfaces for the > > C runtime implementation in the FreeBSD. This is mostly a knot of > > inter-dependencies between rtld, libc and libthr. libutil arguably > > should not participate. > > > > If you want for libc to provide a functionality outside the C runtime, > > please make the sustainable interface, which ABI can be maintained, and > > export the symbols in the normal namespace, with the usual stability > > guarantees. > > There was already a function, __pw_scan(), in file pw_scan.c, which was > called from both libutil and libc implementations. I added a new > function __pw_initpwd() into the pw_scan.c file. That function is > called from all the same places that __pw_scan() is called from. So as > near as I can tell, I haven't changed the structure of anything or > created any new linkages between the libraries that didn't exist > already. > > I will admit I don't understand thešFBSDprivate_1.0 stuff at all, and > there appears to be no documentation or guidance on how to work with > it. Since __pw_scan was in the private list, and I was adding a new > function that is like it in every way, I reasoned that the new function > should be in the list too. It's actually not clear to me that either of > the functions should be in that list, but like I said... no published > info about it that I could find. > > I also noticed that chpass(1) and pwd_mkdb(8)_both directly compile in > their own copy of the pw_scan.c source using .PATH in their makefiles. > I wonder if doing that as the way of sharing the code between libc and > libutil would be a better thing to do? (And presumably that would > remove the need to have entries in the FBSDprivate_1.0 list?) I suspect that the better way is to export the used functions in the FBSD_1.5 namespace. Might be use the opportunity to rename them, in particular, remove the leading double underscore. Might be, reconsider the interfaces to make them more generic. Do the consumers depend on the specific layout of some structure ? From owner-svn-src-head@freebsd.org Fri Jul 27 15:46: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 CA0B9104ECC3; Fri, 27 Jul 2018 15:46:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7CBCA7ABD8; Fri, 27 Jul 2018 15:46:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5E7D519D56; Fri, 27 Jul 2018 15:46:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6RFkZrX031413; Fri, 27 Jul 2018 15:46:35 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RFkYoA031410; Fri, 27 Jul 2018 15:46:34 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201807271546.w6RFkYoA031410@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 27 Jul 2018 15:46:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336764 - in head/sys: amd64/amd64 i386/i386 vm X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in head/sys: amd64/amd64 i386/i386 vm X-SVN-Commit-Revision: 336764 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: Fri, 27 Jul 2018 15:46:36 -0000 Author: markj Date: Fri Jul 27 15:46:34 2018 New Revision: 336764 URL: https://svnweb.freebsd.org/changeset/base/336764 Log: Fix handling of KVA in kmem_bootstrap_free(). Do not use vm_map_remove() to release KVA back to the system. Because kernel map entries do not have an associated VM object, with r336030 the vm_map_remove() call will not update the kernel page tables. Avoid relying on the vm_map layer and instead update the pmap and release KVA to the kernel arena directly in kmem_bootstrap_free(). Because the pmap updates will generally result in superpage demotions, modify pmap_init() to insert PTPs shadowed by superpage mappings into the kernel pmap's radix tree. While here, port r329171 to i386. Reported by: alc Reviewed by: alc, kib X-MFC with: r336505 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D16426 Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/pmap.c head/sys/vm/vm_kern.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Fri Jul 27 15:31:20 2018 (r336763) +++ head/sys/amd64/amd64/pmap.c Fri Jul 27 15:46:34 2018 (r336764) @@ -372,6 +372,8 @@ static u_int64_t DMPDphys; /* phys addr of direct mapp static u_int64_t DMPDPphys; /* phys addr of direct mapped level 3 */ static int ndmpdpphys; /* number of DMPDPphys pages */ +static vm_paddr_t KERNend; /* phys addr of end of bootstrap data */ + /* * pmap_mapdev support pre initialization (i.e. console) */ @@ -998,8 +1000,9 @@ create_pagetables(vm_paddr_t *firstaddr) /* Map from zero to end of allocations under 2M pages */ /* This replaces some of the KPTphys entries above */ for (i = 0; (i << PDRSHIFT) < *firstaddr; i++) + /* Preset PG_M and PG_A because demotion expects it. */ pd_p[i] = (i << PDRSHIFT) | X86_PG_V | PG_PS | pg_g | - bootaddr_rwx(i << PDRSHIFT); + X86_PG_M | X86_PG_A | bootaddr_rwx(i << PDRSHIFT); /* * Because we map the physical blocks in 2M pages, adjust firstaddr @@ -1091,6 +1094,8 @@ pmap_bootstrap(vm_paddr_t *firstaddr) pt_entry_t *pte; int i; + KERNend = *firstaddr; + if (!pti) pg_g = X86_PG_G; @@ -1323,6 +1328,7 @@ pmap_init(void) * Initialize the vm page array entries for the kernel pmap's * page table pages. */ + PMAP_LOCK(kernel_pmap); for (i = 0; i < nkpt; i++) { mpte = PHYS_TO_VM_PAGE(KPTphys + (i << PAGE_SHIFT)); KASSERT(mpte >= vm_page_array && @@ -1331,7 +1337,11 @@ pmap_init(void) mpte->pindex = pmap_pde_pindex(KERNBASE) + i; mpte->phys_addr = KPTphys + (i << PAGE_SHIFT); mpte->wire_count = 1; + if (i << PDRSHIFT < KERNend && + pmap_insert_pt_page(kernel_pmap, mpte)) + panic("pmap_init: pmap_insert_pt_page failed"); } + PMAP_UNLOCK(kernel_pmap); vm_wire_add(nkpt); /* Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Fri Jul 27 15:31:20 2018 (r336763) +++ head/sys/i386/i386/pmap.c Fri Jul 27 15:46:34 2018 (r336764) @@ -931,6 +931,7 @@ pmap_init(void) * Initialize the vm page array entries for the kernel pmap's * page table pages. */ + PMAP_LOCK(kernel_pmap); for (i = 0; i < NKPT; i++) { mpte = PHYS_TO_VM_PAGE(KPTphys + ptoa(i)); KASSERT(mpte >= vm_page_array && @@ -938,7 +939,14 @@ pmap_init(void) ("pmap_init: page table page is out of range")); mpte->pindex = i + KPTDI; mpte->phys_addr = KPTphys + ptoa(i); + mpte->wire_count = 1; + if (pseflag != 0 && + KERNBASE <= i << PDRSHIFT && i << PDRSHIFT < KERNend && + pmap_insert_pt_page(kernel_pmap, mpte)) + panic("pmap_init: pmap_insert_pt_page failed"); } + PMAP_UNLOCK(kernel_pmap); + vm_wire_add(NKPT); /* * Initialize the address space (zone) for the pv entries. Set a Modified: head/sys/vm/vm_kern.c ============================================================================== --- head/sys/vm/vm_kern.c Fri Jul 27 15:31:20 2018 (r336763) +++ head/sys/vm/vm_kern.c Fri Jul 27 15:46:34 2018 (r336764) @@ -700,16 +700,15 @@ kmem_bootstrap_free(vm_offset_t start, vm_size_t size) { #if defined(__i386__) || defined(__amd64__) struct vm_domain *vmd; - vm_offset_t end; + vm_offset_t end, va; vm_paddr_t pa; vm_page_t m; end = trunc_page(start + size); start = round_page(start); - (void)vm_map_remove(kernel_map, start, end); - for (; start < end; start += PAGE_SIZE) { - pa = pmap_kextract(start); + for (va = start; va < end; va += PAGE_SIZE) { + pa = pmap_kextract(va); m = PHYS_TO_VM_PAGE(pa); vmd = vm_pagequeue_domain(m); @@ -717,6 +716,8 @@ kmem_bootstrap_free(vm_offset_t start, vm_size_t size) vm_phys_free_pages(m, 0); vm_domain_free_unlock(vmd); } + pmap_remove(kernel_pmap, start, end); + (void)vmem_add(kernel_arena, start, end - start, M_WAITOK); #endif } From owner-svn-src-head@freebsd.org Fri Jul 27 16:07: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 886CE104F7FE for ; Fri, 27 Jul 2018 16:07:22 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (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 125187BC2D for ; Fri, 27 Jul 2018 16:07:21 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: 1edfa327-91b7-11e8-93fa-f3ebd9db2b94 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.ore.mailhop.org (Halon) with ESMTPSA id 1edfa327-91b7-11e8-93fa-f3ebd9db2b94; Fri, 27 Jul 2018 16:07:12 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w6RG7BuC023810; Fri, 27 Jul 2018 10:07:11 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1532707631.61594.66.camel@freebsd.org> Subject: Re: svn commit: r336746 - in head/lib: libc/gen libutil From: Ian Lepore To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Fri, 27 Jul 2018 10:07:11 -0600 In-Reply-To: <20180727154359.GB2489@kib.kiev.ua> References: <201807261834.w6QIYc9i080738@repo.freebsd.org> <20180727150304.GA2489@kib.kiev.ua> <1532705741.61594.53.camel@freebsd.org> <20180727154359.GB2489@kib.kiev.ua> 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.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: Fri, 27 Jul 2018 16:07:22 -0000 On Fri, 2018-07-27 at 18:43 +0300, Konstantin Belousov wrote: > On Fri, Jul 27, 2018 at 09:35:41AM -0600, Ian Lepore wrote: > > > > On Fri, 2018-07-27 at 18:03 +0300, Konstantin Belousov wrote: > > > > > > On Thu, Jul 26, 2018 at 06:34:38PM +0000, Ian Lepore wrote: > > > > > > > > > > > > Author: ian > > > > Date: Thu Jul 26 18:34:38 2018 > > > > New Revision: 336746 > > > > URL: https://svnweb.freebsd.org/changeset/base/336746 > > > > > > > > Log: > > > >   Make pw_scan(3) more compatible with getpwent(3) et. al. when > > > > processing > > > >   data from /etc/passwd rather than /etc/master.passwd. > > > >    > > > >   The libc getpwent(3) and related functions automatically read > > > > master.passwd > > > >   when run by root, or passwd when run by a non-root > > > > user.  When run by non- > > > >   root, getpwent() copes with the missing data by setting the > > > > corresponding > > > >   fields in the passwd struct to known values (zeroes for > > > > numbers, or a > > > >   pointer to an empty string for literals).  When libutil's > > > > pw_scan(3) was > > > >   used to parse a line without the root-accessible data, it was > > > > leaving > > > >   garbage in the corresponding fields. > > > >    > > > >   These changes rename the static pw_init() function used by > > > > getpwent() and > > > >   friends to __pw_initpwd(), and move it into pw_scan.c so that > > > > common init > > > >   code can be shared between libc and libutil.  pw_scan(3) now > > > > calls > > > >   __pw_initpwd() before __pw_scan(), just like the getpwent() > > > > family does, so > > > >   that reading an arbitrary passwd file in either format and > > > > parsing it with > > > >   pw_scan(3) returns the same results as getpwent(3) would. > > > >    > > > >   This also adds a new pw_initpwd(3) function to libutil, so > > > > that code which > > > >   creates passwd structs from scratch in some manner that > > > > doesn't involve > > > >   pw_scan() can initialize the struct to the values expected by > > > > lots of > > > >   existing code, which doesn't expect to encounter NULL > > > > pointers or garbage > > > >   values in some fields. > > > > > > > If my reading is right, you just made libutil depend on the > > > internal > > > libc interfaces. Formal consequence is that libutil.so version > > > must > > > be bumped each time the used interface is changed (and it is > > > allowed > > > to change). I think that your change actually requires the bump > > > of > > > libutil.so.N version already. > > > > > > Also, libutil.so.N should be moved from the libutil pkgbase > > > package to > > > the clibs package, I am not sure about this. > > > > > > At the higher level, I very much dislike this change. > > > FBSDprivate_1.0 > > > namespace is for symbols providing the internal interfaces for > > > the > > > C runtime implementation in the FreeBSD. This is mostly a knot of > > > inter-dependencies between rtld, libc and libthr. libutil > > > arguably > > > should not participate. > > > > > > If you want for libc to provide a functionality outside the C > > > runtime, > > > please make the sustainable interface, which ABI can be > > > maintained, and > > > export the symbols in the normal namespace, with the usual > > > stability > > > guarantees. > > There was already a function, __pw_scan(), in file pw_scan.c, which > > was > > called from both libutil and libc implementations. I added a new > > function __pw_initpwd() into the pw_scan.c file. That function is > > called from all the same places that __pw_scan() is called from. So > > as > > near as I can tell, I haven't changed the structure of anything or > > created any new linkages between the libraries that didn't exist > > already. > > > > I will admit I don't understand the FBSDprivate_1.0 stuff at all, > > and > > there appears to be no documentation or guidance on how to work > > with > > it. Since __pw_scan was in the private list, and I was adding a new > > function that is like it in every way, I reasoned that the new > > function > > should be in the list too. It's actually not clear to me that > > either of > > the functions should be in that list, but like I said... no > > published > > info about it that I could find. > > > > I also noticed that chpass(1) and pwd_mkdb(8)_both directly compile > > in > > their own copy of the pw_scan.c source using .PATH in their > > makefiles. > > I wonder if doing that as the way of sharing the code between libc > > and > > libutil would be a better thing to do? (And presumably that would > > remove the need to have entries in the FBSDprivate_1.0 list?) > I suspect that the better way is to export the used functions > in the FBSD_1.5 namespace.  Might be use the opportunity to rename > them, in particular, remove the leading double underscore.  Might > be, reconsider the interfaces to make them more generic. > > Do the consumers depend on the specific layout of some structure ? I believe pw_scan() was originally a static function in libc used by getpwent() and related functions. When libutil grew some pw utilties, it looks like the static pw_scan was renamed to __pw_scan and added to the private list, so that it could be shared with libutil (and so I copied that process with pw_init(), but I had to rename it to pw_initpwd because libutil already has a pw_init()). I'm not sure how to make the functions more generic, pw_scan() parses a line of text in passwd(5) format, optionally warns about errors, and fills in a struct passwd with what it finds. pw_initpwd() inits a struct passwd to (well-)known default values. But libutil pw_scan() allocates the struct and requires the caller to free it, and the internal __pw_scan() fills in a struct passed in to it and returns an int, so there's no way to re-unify the functions under a single name. It would be strange to me to have one or two of the pw_xxxx() family of functions in libc and the rest of them in libutil. Libutil seems like a fine place for password/group file utilities that go beyond the posix functions. It's just an implementation detail that we'd prefer to share the source code for a small bit of common functionality around parsing lines of passwd file data. -- Ian From owner-svn-src-head@freebsd.org Fri Jul 27 16:13: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 A07F2104FC09; Fri, 27 Jul 2018 16:13:07 +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 56EE57C3E2; Fri, 27 Jul 2018 16:13:07 +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 37EC61A226; Fri, 27 Jul 2018 16:13:07 +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 w6RGD7x3047219; Fri, 27 Jul 2018 16:13:07 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RGD7gZ047218; Fri, 27 Jul 2018 16:13:07 GMT (envelope-from br@FreeBSD.org) Message-Id: <201807271613.w6RGD7gZ047218@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Fri, 27 Jul 2018 16:13:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336766 - head/sys/riscv/include X-SVN-Group: head X-SVN-Commit-Author: br X-SVN-Commit-Paths: head/sys/riscv/include X-SVN-Commit-Revision: 336766 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: Fri, 27 Jul 2018 16:13:07 -0000 Author: br Date: Fri Jul 27 16:13:06 2018 New Revision: 336766 URL: https://svnweb.freebsd.org/changeset/base/336766 Log: Use SPP (Supervisor Previous Privilege) bit in the sstatus register to determine if trap is from userspace. Otherwise if we jump to kernel address from userspace, then TRAPF_USERMODE failed to detect usermode and then do_ast triggers a panic "ast in kernel mode". Reviewed by: markj@ Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D16469 Modified: head/sys/riscv/include/cpu.h Modified: head/sys/riscv/include/cpu.h ============================================================================== --- head/sys/riscv/include/cpu.h Fri Jul 27 15:49:12 2018 (r336765) +++ head/sys/riscv/include/cpu.h Fri Jul 27 16:13:06 2018 (r336766) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2015-2016 Ruslan Bukin + * Copyright (c) 2015-2018 Ruslan Bukin * All rights reserved. * * Portions of this software were developed by SRI International and the @@ -41,7 +41,7 @@ #include #define TRAPF_PC(tfp) ((tfp)->tf_ra) -#define TRAPF_USERMODE(tfp) (((tfp)->tf_sepc & (1ul << 63)) == 0) +#define TRAPF_USERMODE(tfp) (((tfp)->tf_sstatus & SSTATUS_SPP) == 0) #define cpu_getstack(td) ((td)->td_frame->tf_sp) #define cpu_setstack(td, sp) ((td)->td_frame->tf_sp = (sp)) From owner-svn-src-head@freebsd.org Fri Jul 27 16:44: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 17B7E10506A1; Fri, 27 Jul 2018 16:44:47 +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 711867D22D; Fri, 27 Jul 2018 16:44:46 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id w6RGichx030741 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 27 Jul 2018 19:44:41 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w6RGichx030741 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w6RGibPM030740; Fri, 27 Jul 2018 19:44:37 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 27 Jul 2018 19:44:37 +0300 From: Konstantin Belousov To: Ian Lepore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336746 - in head/lib: libc/gen libutil Message-ID: <20180727164437.GC2489@kib.kiev.ua> References: <201807261834.w6QIYc9i080738@repo.freebsd.org> <20180727150304.GA2489@kib.kiev.ua> <1532705741.61594.53.camel@freebsd.org> <20180727154359.GB2489@kib.kiev.ua> <1532707631.61594.66.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1532707631.61594.66.camel@freebsd.org> User-Agent: Mutt/1.10.1 (2018-07-13) 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.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: Fri, 27 Jul 2018 16:44:47 -0000 On Fri, Jul 27, 2018 at 10:07:11AM -0600, Ian Lepore wrote: > I believe pw_scan() was originally a static function in libc used by > getpwent() and related functions. When libutil grew some pw utilties, > it looks like the static pw_scan was renamed to __pw_scan and added to > the private list, so that it could be shared with libutil (and so I > copied that process with pw_init(), but I had to rename it to > pw_initpwd because libutil already has a pw_init()). > > I'm not sure how to make the functions more generic, pw_scan() parses a > line of text in passwd(5) format, optionally warns about errors, and > fills in a struct passwd with what it finds. pw_initpwd() inits a > struct passwd to (well-)known default values. But libutil pw_scan() > allocates the struct and requires the caller to free it, and the > internal __pw_scan() fills in a struct passed in to it and returns an > int, so there's no way to re-unify the functions under a single name. I did not asked to make it more generic. I mean, if the function is exported, its interface should be useful enough for generic consumers. If the current interface is fine, so be it, but see below. > > It would be strange to me to have one or two of the pw_xxxx() family of > functions in libc and the rest of them in libutil. Libutil seems like a > fine place for password/group file utilities that go beyond the posix > functions. It's just an implementation detail that we'd prefer to share > the source code for a small bit of common functionality around parsing > lines of passwd file data. Would it be a solution to stop exporting these functions at all, and just sompile them twice, once in libc, and second time in libutil ? libutil would add a source file from libc into it SRCS. From owner-svn-src-head@freebsd.org Fri Jul 27 18:18: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 9C72A1052AF9; Fri, 27 Jul 2018 18:18:21 +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 40D2080AF5; Fri, 27 Jul 2018 18:18:21 +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 1C4671B5BE; Fri, 27 Jul 2018 18:18:21 +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 w6RIIKik008687; Fri, 27 Jul 2018 18:18:20 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RIIKaA008684; Fri, 27 Jul 2018 18:18:20 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807271818.w6RIIKaA008684@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 27 Jul 2018 18:18:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336768 - head/usr.sbin/efibootmgr X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/usr.sbin/efibootmgr X-SVN-Commit-Revision: 336768 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: Fri, 27 Jul 2018 18:18:21 -0000 Author: imp Date: Fri Jul 27 18:18:20 2018 New Revision: 336768 URL: https://svnweb.freebsd.org/changeset/base/336768 Log: Add -b bootnum to allow creation of a specific boot number (rather than the auotmatic selection). This is important in some scripting environments. Also, remove bogus checks for bootnum != 0. 0 is a valid bootnum. Sponsored by: Netflix Modified: head/usr.sbin/efibootmgr/efibootmgr.8 head/usr.sbin/efibootmgr/efibootmgr.c Modified: head/usr.sbin/efibootmgr/efibootmgr.8 ============================================================================== --- head/usr.sbin/efibootmgr/efibootmgr.8 Fri Jul 27 17:39:36 2018 (r336767) +++ head/usr.sbin/efibootmgr/efibootmgr.8 Fri Jul 27 18:18:20 2018 (r336768) @@ -36,7 +36,7 @@ .Op Fl T .Op Fl o Ar bootorder .Op Fl verbose -.Op Fl c -k Ar kernel -l Ar loader [-L Ar label] [--dry-run] +.Op Fl c -k Ar kernel -l Ar loader [-L Ar label] [--dry-run] [-b Bootvar] .Sh "DESCRIPTION" .Nm manipulates how UEFI Boot Managers boot the system. @@ -70,6 +70,9 @@ Create a new Boot Variable The path to and name of the loader. .It Fl k -kernel Ar kernel The path to and name of the kernel. +.It Fl b Bootvar +When creating an entry, use Bootvar as the index. +Fail if it already exists. .It Fl L -label Ar label An optional description for the entry. .It Fl D -dry-run Modified: head/usr.sbin/efibootmgr/efibootmgr.c ============================================================================== --- head/usr.sbin/efibootmgr/efibootmgr.c Fri Jul 27 17:39:36 2018 (r336767) +++ head/usr.sbin/efibootmgr/efibootmgr.c Fri Jul 27 18:18:20 2018 (r336768) @@ -82,6 +82,7 @@ typedef struct _bmgr_opts { bool delete_bootnext; bool del_timeout; bool dry_run; + bool has_bootnum; bool once; int cp_src; bool set_active; @@ -170,7 +171,7 @@ set_bootvar(const char *name, uint8_t *data, size_t si #define USAGE \ " [-aAnNB Bootvar] [-t timeout] [-T] [-o bootorder] [-O] [--verbose] [--help] \n\ - [-c -l loader [-k kernel ] [-L label] [--dry-run]]" + [-c -l loader [-k kernel ] [-L label] [--dry-run] [-b Bootvar]]" #define CREATE_USAGE \ " efibootmgr -c -l loader [-k kernel] [-L label] [--dry-run]" @@ -201,6 +202,10 @@ parse_args(int argc, char *argv[]) opts.set_active = true; opts.bootnum = strtoul(optarg, NULL, 16); break; + case 'b': + opts.has_bootnum = true; + opts.bootnum = strtoul(optarg, NULL, 16); + break; case 'B': opts.delete = true; opts.bootnum = strtoul(optarg, NULL, 16); @@ -266,12 +271,7 @@ parse_args(int argc, char *argv[]) errx(1, "%s",CREATE_USAGE); return; } - if (opts.set_bootnext && !(opts.bootnum)) - errx(1, "%s", BOOTNEXT_USAGE); - if ((opts.set_active || opts.set_inactive) && !(opts.bootnum)) - errx(1, "%s", ACTIVE_USAGE); - if (opts.order && !(opts.order)) errx(1, "%s", ORDER_USAGE); } @@ -557,7 +557,23 @@ make_next_boot_var_name(void) return name; } +static char * +make_boot_var_name(uint16_t bootnum) +{ + struct entry *v; + char *name; + LIST_FOREACH(v, &efivars, entries) { + if (v->idx == bootnum) + return NULL; + } + + asprintf(&name, "%s%04X", "Boot", bootnum); + if (name == NULL) + err(1, "asprintf"); + return name; +} + static size_t create_loadopt(uint8_t *buf, size_t bufmax, uint32_t attributes, efidp dp, size_t dp_size, const char *description, const uint8_t *optional_data, size_t optional_data_size) @@ -605,7 +621,8 @@ create_loadopt(uint8_t *buf, size_t bufmax, uint32_t a static int -make_boot_var(const char *label, const char *loader, const char *kernel, const char *env, bool dry_run) +make_boot_var(const char *label, const char *loader, const char *kernel, const char *env, bool dry_run, + int bootnum) { struct entry *new_ent; uint32_t load_attrs = 0; @@ -617,7 +634,10 @@ make_boot_var(const char *label, const char *loader, c assert(label != NULL); - bootvar = make_next_boot_var_name(); + if (bootnum == -1) + bootvar = make_next_boot_var_name(); + else + bootvar = make_boot_var_name((uint16_t)bootnum); if (bootvar == NULL) err(1, "bootvar creation"); if (loader == NULL) @@ -894,7 +914,8 @@ main(int argc, char *argv[]) * side effect, adds to boot order, but not yet active. */ make_boot_var(opts.label ? opts.label : "", - opts.loader, opts.kernel, opts.env, opts.dry_run); + opts.loader, opts.kernel, opts.env, opts.dry_run, + opts.has_bootnum ? opts.bootnum : -1); else if (opts.set_active || opts.set_inactive ) handle_activity(opts.bootnum, opts.set_active); else if (opts.order != NULL) From owner-svn-src-head@freebsd.org Fri Jul 27 18:28: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 40B6B105306A; Fri, 27 Jul 2018 18:28:24 +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 E63C08159A; Fri, 27 Jul 2018 18:28:23 +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 C75C91B783; Fri, 27 Jul 2018 18:28:23 +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 w6RISNEv014464; Fri, 27 Jul 2018 18:28:23 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RISMGJ014459; Fri, 27 Jul 2018 18:28:22 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807271828.w6RISMGJ014459@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 27 Jul 2018 18:28:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336770 - in head/sys: arm/at91 arm/conf arm/include conf dev/nand dev/usb/controller dts/arm modules/dtb/atmel modules/usb modules/usb/at91dci X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys: arm/at91 arm/conf arm/include conf dev/nand dev/usb/controller dts/arm modules/dtb/atmel modules/usb modules/usb/at91dci X-SVN-Commit-Revision: 336770 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: Fri, 27 Jul 2018 18:28:24 -0000 Author: imp Date: Fri Jul 27 18:28:22 2018 New Revision: 336770 URL: https://svnweb.freebsd.org/changeset/base/336770 Log: Remove Atmel AT91RM9200 and AT91SAM9 support. The last known robust version of this code base was FreeBSD 8.2. There are no users of this on current, and all users of it have abandoned this platform or are in legacy mode with a prior version of FreeBSD. All known users on arm@ approved this removal, and there were no objections. Differential Revision: https://reviews.freebsd.org/D16312 Deleted: head/sys/arm/at91/at91.c head/sys/arm/at91/at91_aic.c head/sys/arm/at91/at91_aicreg.h head/sys/arm/at91/at91_cfata.c head/sys/arm/at91/at91_common.c head/sys/arm/at91/at91_gpio.h head/sys/arm/at91/at91_machdep.c head/sys/arm/at91/at91_mci.c head/sys/arm/at91/at91_mcireg.h head/sys/arm/at91/at91_ohci.c head/sys/arm/at91/at91_ohci_fdt.c head/sys/arm/at91/at91_pdcreg.h head/sys/arm/at91/at91_pinctrl.c head/sys/arm/at91/at91_pio.c head/sys/arm/at91/at91_pio_sam9g20.h head/sys/arm/at91/at91_pio_sam9g45.h head/sys/arm/at91/at91_pioreg.h head/sys/arm/at91/at91_piovar.h head/sys/arm/at91/at91_pit.c head/sys/arm/at91/at91_pitreg.h head/sys/arm/at91/at91_pmc.c head/sys/arm/at91/at91_pmcreg.h head/sys/arm/at91/at91_pmcvar.h head/sys/arm/at91/at91_reset.S head/sys/arm/at91/at91_rst.c head/sys/arm/at91/at91_rstreg.h head/sys/arm/at91/at91_rtc.c head/sys/arm/at91/at91_rtcreg.h head/sys/arm/at91/at91_sdramc.c head/sys/arm/at91/at91_shdwc.c head/sys/arm/at91/at91_smc.c head/sys/arm/at91/at91_smc.h head/sys/arm/at91/at91_spi.c head/sys/arm/at91/at91_spireg.h head/sys/arm/at91/at91_ssc.c head/sys/arm/at91/at91_sscreg.h head/sys/arm/at91/at91_st.c head/sys/arm/at91/at91_streg.h head/sys/arm/at91/at91_tcb.c head/sys/arm/at91/at91_twi.c head/sys/arm/at91/at91_twiio.h head/sys/arm/at91/at91_twireg.h head/sys/arm/at91/at91_usartreg.h head/sys/arm/at91/at91_wdt.c head/sys/arm/at91/at91_wdtreg.h head/sys/arm/at91/at91board.h head/sys/arm/at91/at91reg.h head/sys/arm/at91/at91rm9200.c head/sys/arm/at91/at91rm9200_devices.c head/sys/arm/at91/at91rm9200var.h head/sys/arm/at91/at91rm92reg.h head/sys/arm/at91/at91sam9260.c head/sys/arm/at91/at91sam9260reg.h head/sys/arm/at91/at91sam9g20.c head/sys/arm/at91/at91sam9g20reg.h head/sys/arm/at91/at91sam9g45.c head/sys/arm/at91/at91sam9g45reg.h head/sys/arm/at91/at91sam9x5.c head/sys/arm/at91/at91sam9x5reg.h head/sys/arm/at91/at91soc.c head/sys/arm/at91/at91soc.h head/sys/arm/at91/at91var.h head/sys/arm/at91/board_bwct.c head/sys/arm/at91/board_eb9200.c head/sys/arm/at91/board_ethernut5.c head/sys/arm/at91/board_hl200.c head/sys/arm/at91/board_hl201.c head/sys/arm/at91/board_kb920x.c head/sys/arm/at91/board_qila9g20.c head/sys/arm/at91/board_sam9260ek.c head/sys/arm/at91/board_sam9g20ek.c head/sys/arm/at91/board_sam9x25ek.c head/sys/arm/at91/board_sn9g45.c head/sys/arm/at91/board_tsc4370.c head/sys/arm/at91/files.at91 head/sys/arm/at91/if_ate.c head/sys/arm/at91/if_atereg.h head/sys/arm/at91/if_macb.c head/sys/arm/at91/if_macbreg.h head/sys/arm/at91/if_macbvar.h head/sys/arm/at91/std.at91 head/sys/arm/at91/std.at91sam9 head/sys/arm/at91/std.at91sam9g45 head/sys/arm/at91/std.atmel head/sys/arm/at91/std.bwct head/sys/arm/at91/std.eb9200 head/sys/arm/at91/std.ethernut5 head/sys/arm/at91/std.hl200 head/sys/arm/at91/std.hl201 head/sys/arm/at91/std.kb920x head/sys/arm/at91/std.qila9g20 head/sys/arm/at91/std.sam9260ek head/sys/arm/at91/std.sam9g20ek head/sys/arm/at91/std.sam9x25ek head/sys/arm/at91/std.sn9g45 head/sys/arm/at91/std.tsc4370 head/sys/arm/at91/uart_bus_at91usart.c head/sys/arm/at91/uart_cpu_at91usart.c head/sys/arm/at91/uart_dev_at91usart.c head/sys/arm/conf/ATMEL head/sys/arm/conf/SAM9G20EK head/sys/arm/include/at91_gpio.h head/sys/dev/nand/nfc_at91.c head/sys/dev/nand/nfc_at91.h head/sys/dev/usb/controller/at91dci.c head/sys/dev/usb/controller/at91dci.h head/sys/dev/usb/controller/at91dci_atmelarm.c head/sys/dev/usb/controller/at91dci_fdt.c head/sys/dev/usb/controller/atmegadci_atmelarm.c head/sys/dev/usb/controller/musb_otg_atmelarm.c head/sys/dev/usb/controller/uss820dci_atmelarm.c head/sys/dts/arm/hl201.dts head/sys/dts/arm/sam9260ek.dts head/sys/modules/dtb/atmel/Makefile head/sys/modules/usb/at91dci/Makefile Modified: head/sys/arm/conf/NOTES head/sys/conf/files head/sys/conf/options.arm head/sys/dev/usb/controller/usb_controller.c head/sys/modules/usb/Makefile Modified: head/sys/arm/conf/NOTES ============================================================================== --- head/sys/arm/conf/NOTES Fri Jul 27 18:26:38 2018 (r336769) +++ head/sys/arm/conf/NOTES Fri Jul 27 18:28:22 2018 (r336770) @@ -8,7 +8,6 @@ cpu CPU_FA526 cpu CPU_XSCALE_81342 cpu CPU_XSCALE_PXA2X0 -files "../at91/files.at91" files "../cavium/cns11xx/files.econa" files "../mv/files.mv" files "../mv/discovery/files.db78xxx" @@ -31,17 +30,6 @@ options SOC_MV_KIRKWOOD options SOC_MV_ORION options ARM_MANY_BOARD -device at91_board_bwct -device at91_board_ethernut5 -device at91_board_hl200 -device at91_board_hl201 -device at91_board_kb920x -device at91_board_qila9g20 -device at91_board_sam9260ek -device at91_board_sam9g20ek -device at91_board_sam9x25ek -device at91_board_tsc4370 -device at91rm9200 device nand # IIC Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri Jul 27 18:26:38 2018 (r336769) +++ head/sys/conf/files Fri Jul 27 18:28:22 2018 (r336770) @@ -3237,10 +3237,7 @@ dev/ubsec/ubsec.c optional ubsec # # USB controller drivers # -dev/usb/controller/at91dci.c optional at91dci -dev/usb/controller/at91dci_atmelarm.c optional at91dci at91rm9200 dev/usb/controller/musb_otg.c optional musb -dev/usb/controller/musb_otg_atmelarm.c optional musb at91rm9200 dev/usb/controller/dwc_otg.c optional dwcotg dev/usb/controller/dwc_otg_fdt.c optional dwcotg fdt dev/usb/controller/ehci.c optional ehci @@ -3255,7 +3252,6 @@ dev/usb/controller/xhci_pci.c optional xhci pci dev/usb/controller/saf1761_otg.c optional saf1761otg dev/usb/controller/saf1761_otg_fdt.c optional saf1761otg fdt dev/usb/controller/uss820dci.c optional uss820dci -dev/usb/controller/uss820dci_atmelarm.c optional uss820dci at91rm9200 dev/usb/controller/usb_controller.c optional usb # # USB storage drivers Modified: head/sys/conf/options.arm ============================================================================== --- head/sys/conf/options.arm Fri Jul 27 18:26:38 2018 (r336769) +++ head/sys/conf/options.arm Fri Jul 27 18:28:22 2018 (r336770) @@ -70,13 +70,7 @@ XSCALE_CACHE_READ_WRITE_ALLOCATE opt_global.h XSACLE_DISABLE_CCNT opt_timer.h VERBOSE_INIT_ARM opt_global.h VM_MAXUSER_ADDRESS opt_global.h -AT91_ATE_USE_RMII opt_at91.h -AT91_MACB_USE_RMII opt_at91.h -AT91_MCI_ALLOW_OVERCLOCK opt_at91.h -AT91_MCI_HAS_4WIRE opt_at91.h -AT91_MCI_SLOT_B opt_at91.h GFB_DEBUG opt_gfb.h GFB_NO_FONT_LOADING opt_gfb.h GFB_NO_MODE_CHANGE opt_gfb.h -AT91C_MAIN_CLOCK opt_at91.h VFP opt_global.h Modified: head/sys/dev/usb/controller/usb_controller.c ============================================================================== --- head/sys/dev/usb/controller/usb_controller.c Fri Jul 27 18:26:38 2018 (r336769) +++ head/sys/dev/usb/controller/usb_controller.c Fri Jul 27 18:28:22 2018 (r336770) @@ -131,7 +131,6 @@ DRIVER_MODULE(usbus, ehci, usb_driver, usb_devclass, 0 DRIVER_MODULE(usbus, xhci, usb_driver, usb_devclass, 0, 0); /* Device Only Drivers */ -DRIVER_MODULE(usbus, at91_udp, usb_driver, usb_devclass, 0, 0); DRIVER_MODULE(usbus, musbotg, usb_driver, usb_devclass, 0, 0); DRIVER_MODULE(usbus, uss820dci, usb_driver, usb_devclass, 0, 0); DRIVER_MODULE(usbus, octusb, usb_driver, usb_devclass, 0, 0); Modified: head/sys/modules/usb/Makefile ============================================================================== --- head/sys/modules/usb/Makefile Fri Jul 27 18:26:38 2018 (r336769) +++ head/sys/modules/usb/Makefile Fri Jul 27 18:28:22 2018 (r336770) @@ -44,7 +44,7 @@ MAKE+=" DEBUG_FLAGS+=-DUSB_REQ_DEBUG" # MK_SOURCELESS_UCODE option (see below). SUBDIR = usb -SUBDIR += ${_dwc_otg} ehci ${_musb} ohci uhci xhci ${_uss820dci} ${_at91dci} \ +SUBDIR += ${_dwc_otg} ehci ${_musb} ohci uhci xhci ${_uss820dci} \ ${_atmegadci} ${_avr32dci} ${_rsu} ${_rsufw} ${_saf1761otg} SUBDIR += ${_rum} ${_run} ${_runfw} ${_uath} upgt usie ural ${_zyd} ${_urtw} SUBDIR += atp cfumass uhid uhid_snes ukbd ums udbp ufm uep wmt wsp ugold uled @@ -84,7 +84,6 @@ _urtw= urtw .endif .if ${MACHINE_CPUARCH} == "arm" -_at91dci= at91dci _atmegadci= atmegadci _dwc_otg= dwc_otg _musb= musb From owner-svn-src-head@freebsd.org Fri Jul 27 18:30: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 2455D105316C; Fri, 27 Jul 2018 18:30: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 CF87A8173E; Fri, 27 Jul 2018 18:30:01 +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 B06391B78A; Fri, 27 Jul 2018 18:30:01 +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 w6RIU1E0014795; Fri, 27 Jul 2018 18:30:01 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RIU1Af014794; Fri, 27 Jul 2018 18:30:01 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807271830.w6RIU1Af014794@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 27 Jul 2018 18:30:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336771 - in head/sys/arm: cavium/cns11xx conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/arm: cavium/cns11xx conf X-SVN-Commit-Revision: 336771 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: Fri, 27 Jul 2018 18:30:02 -0000 Author: imp Date: Fri Jul 27 18:30:01 2018 New Revision: 336771 URL: https://svnweb.freebsd.org/changeset/base/336771 Log: Remove Cavium/Econa CNS11xx support. This port hasn't been updated since it was committed, apart from housekeeping. There's no known users, and the known hardware for this port is too thin to run FreeBSD/arm these days well. This also removes the last armv4 port. We've had no reports of armv4 systems working since FreeBSD 8. All the kernel support for armv4 has not been removed since it's too intertwined with armv5 support (which remains in the tree). RelNotes: Yes No objection from: arm@ Deleted: head/sys/arm/cavium/cns11xx/cfi_bus_econa.c head/sys/arm/cavium/cns11xx/econa.c head/sys/arm/cavium/cns11xx/econa_machdep.c head/sys/arm/cavium/cns11xx/econa_reg.h head/sys/arm/cavium/cns11xx/econa_var.h head/sys/arm/cavium/cns11xx/ehci_ebus.c head/sys/arm/cavium/cns11xx/files.econa head/sys/arm/cavium/cns11xx/if_ece.c head/sys/arm/cavium/cns11xx/if_ecereg.h head/sys/arm/cavium/cns11xx/if_ecevar.h head/sys/arm/cavium/cns11xx/ohci_ec.c head/sys/arm/cavium/cns11xx/std.econa head/sys/arm/cavium/cns11xx/timer.c head/sys/arm/cavium/cns11xx/uart_bus_ec.c head/sys/arm/cavium/cns11xx/uart_cpu_ec.c head/sys/arm/conf/CNS11XXNAS Modified: head/sys/arm/conf/NOTES Modified: head/sys/arm/conf/NOTES ============================================================================== --- head/sys/arm/conf/NOTES Fri Jul 27 18:28:22 2018 (r336770) +++ head/sys/arm/conf/NOTES Fri Jul 27 18:30:01 2018 (r336771) @@ -8,7 +8,6 @@ cpu CPU_FA526 cpu CPU_XSCALE_81342 cpu CPU_XSCALE_PXA2X0 -files "../cavium/cns11xx/files.econa" files "../mv/files.mv" files "../mv/discovery/files.db78xxx" files "../mv/kirkwood/files.kirkwood" From owner-svn-src-head@freebsd.org Fri Jul 27 18:31: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 45BEE10532A5; Fri, 27 Jul 2018 18:31:32 +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 F085D81C6C; Fri, 27 Jul 2018 18:31:31 +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 D2E2F1B7CF; Fri, 27 Jul 2018 18:31:31 +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 w6RIVVsx018190; Fri, 27 Jul 2018 18:31:31 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RIVVxW018188; Fri, 27 Jul 2018 18:31:31 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807271831.w6RIVVxW018188@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 27 Jul 2018 18:31:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336772 - in head/sys/arm: conf ralink X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/arm: conf ralink X-SVN-Commit-Revision: 336772 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: Fri, 27 Jul 2018 18:31:32 -0000 Author: imp Date: Fri Jul 27 18:31:30 2018 New Revision: 336772 URL: https://svnweb.freebsd.org/changeset/base/336772 Log: Make ralink compile again. Add std.ralink to define common things across all ralink configs. Add cpu, machine and options INTRNG to this file. Remove RT1310.hints file reference: that file isn't in our tree. Added: head/sys/arm/ralink/std.ralink (contents, props changed) Modified: head/sys/arm/conf/RT1310 head/sys/arm/ralink/rt1310_intc.c Modified: head/sys/arm/conf/RT1310 ============================================================================== --- head/sys/arm/conf/RT1310 Fri Jul 27 18:30:01 2018 (r336771) +++ head/sys/arm/conf/RT1310 Fri Jul 27 18:31:30 2018 (r336772) @@ -8,7 +8,7 @@ ident RT1310 include "std.arm" -hints "RT1310.hints" +include "../ralink/std.ralink" # Flattened Device Tree options FDT Modified: head/sys/arm/ralink/rt1310_intc.c ============================================================================== --- head/sys/arm/ralink/rt1310_intc.c Fri Jul 27 18:30:01 2018 (r336771) +++ head/sys/arm/ralink/rt1310_intc.c Fri Jul 27 18:31:30 2018 (r336772) @@ -140,7 +140,7 @@ rt1310_intc_probe(device_t dev) if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (!ofw_bus_is_compatible(dev, "rt,pic")) + if (!ofw_bus_is_compatible_strict(dev, "rt,pic")) return (ENXIO); #ifdef INTRNG Added: head/sys/arm/ralink/std.ralink ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/ralink/std.ralink Fri Jul 27 18:31:30 2018 (r336772) @@ -0,0 +1,5 @@ +# $FreeBSD$ +files "../ralink/files.ralink" +cpu CPU_ARM9 +machine arm +options INTRNG From owner-svn-src-head@freebsd.org Fri Jul 27 18:33: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 342CA10534D2; Fri, 27 Jul 2018 18:33:13 +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 C604081EF1; Fri, 27 Jul 2018 18:33: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 A13D31B917; Fri, 27 Jul 2018 18:33:12 +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 w6RIXCZ5019995; Fri, 27 Jul 2018 18:33:12 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RIX9DD019980; Fri, 27 Jul 2018 18:33:09 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807271833.w6RIX9DD019980@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 27 Jul 2018 18:33:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336773 - in head: lib/libc/arm/string lib/libpmc share/man/man4/man4.arm share/mk sys/arm/arm sys/arm/conf sys/arm/include sys/arm/xscale sys/arm/xscale/i8134x sys/arm/xscale/pxa sys/c... X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: lib/libc/arm/string lib/libpmc share/man/man4/man4.arm share/mk sys/arm/arm sys/arm/conf sys/arm/include sys/arm/xscale sys/arm/xscale/i8134x sys/arm/xscale/pxa sys/conf sys/dev/hwpmc sys/sys X-SVN-Commit-Revision: 336773 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: Fri, 27 Jul 2018 18:33:13 -0000 Author: imp Date: Fri Jul 27 18:33:09 2018 New Revision: 336773 URL: https://svnweb.freebsd.org/changeset/base/336773 Log: Remove xscale support The OLD XSCALE stuff hasn't been useful in a while. The original committer (cognet@) was the only one that had boards for it. He's blessed this removal. Newer XSCALE (GUMSTIX) is for hardware that's quite old. After discussion on arm@, it was clear there was no support for keeping it. Differential Review: https://reviews.freebsd.org/D16313 Deleted: head/lib/libc/arm/string/memcpy_xscale.S head/lib/libpmc/pmc.xscale.3 head/share/man/man4/man4.arm/npe.4 head/sys/arm/arm/bcopyinout_xscale.S head/sys/arm/arm/cpufunc_asm_xscale.S head/sys/arm/arm/cpufunc_asm_xscale_c3.S head/sys/arm/conf/CRB head/sys/arm/conf/GUMSTIX head/sys/arm/conf/GUMSTIX-QEMU head/sys/arm/conf/GUMSTIX.hints head/sys/arm/xscale/i8134x/crb_machdep.c head/sys/arm/xscale/i8134x/files.crb head/sys/arm/xscale/i8134x/files.i81342 head/sys/arm/xscale/i8134x/i80321_timer.c head/sys/arm/xscale/i8134x/i80321_wdog.c head/sys/arm/xscale/i8134x/i80321reg.h head/sys/arm/xscale/i8134x/i80321var.h head/sys/arm/xscale/i8134x/i81342.c head/sys/arm/xscale/i8134x/i81342_mcu.c head/sys/arm/xscale/i8134x/i81342_pci.c head/sys/arm/xscale/i8134x/i81342_space.c head/sys/arm/xscale/i8134x/i81342reg.h head/sys/arm/xscale/i8134x/i81342var.h head/sys/arm/xscale/i8134x/iq81342_7seg.c head/sys/arm/xscale/i8134x/iq81342reg.h head/sys/arm/xscale/i8134x/iq81342var.h head/sys/arm/xscale/i8134x/obio.c head/sys/arm/xscale/i8134x/obiovar.h head/sys/arm/xscale/i8134x/std.crb head/sys/arm/xscale/i8134x/std.i81342 head/sys/arm/xscale/i8134x/uart_bus_i81342.c head/sys/arm/xscale/i8134x/uart_cpu_i81342.c head/sys/arm/xscale/pxa/files.pxa head/sys/arm/xscale/pxa/if_smc_smi.c head/sys/arm/xscale/pxa/pxa_gpio.c head/sys/arm/xscale/pxa/pxa_icu.c head/sys/arm/xscale/pxa/pxa_machdep.c head/sys/arm/xscale/pxa/pxa_obio.c head/sys/arm/xscale/pxa/pxa_smi.c head/sys/arm/xscale/pxa/pxa_space.c head/sys/arm/xscale/pxa/pxa_timer.c head/sys/arm/xscale/pxa/pxareg.h head/sys/arm/xscale/pxa/pxavar.h head/sys/arm/xscale/pxa/std.pxa head/sys/arm/xscale/pxa/uart_bus_pxa.c head/sys/arm/xscale/pxa/uart_cpu_pxa.c head/sys/arm/xscale/std.xscale head/sys/dev/hwpmc/hwpmc_xscale.h Modified: head/lib/libc/arm/string/memcpy.S head/lib/libpmc/Makefile head/lib/libpmc/libpmc.c head/lib/libpmc/pmc.3 head/share/man/man4/man4.arm/Makefile head/share/mk/bsd.cpu.mk head/sys/arm/arm/bcopyinout.S head/sys/arm/arm/cpufunc.c head/sys/arm/arm/dump_machdep.c head/sys/arm/arm/elf_trampoline.c head/sys/arm/arm/exception.S head/sys/arm/arm/identcpu-v4.c head/sys/arm/arm/pmap-v4.c head/sys/arm/arm/trap-v4.c head/sys/arm/arm/vm_machdep.c head/sys/arm/conf/NOTES head/sys/arm/include/armreg.h head/sys/arm/include/cpu-v4.h head/sys/arm/include/cpufunc.h head/sys/arm/include/intr.h head/sys/arm/include/md_var.h head/sys/arm/include/pmap-v4.h head/sys/arm/include/pmc_mdep.h head/sys/arm/include/pte-v4.h head/sys/conf/Makefile.arm head/sys/conf/files.arm head/sys/conf/options.arm head/sys/dev/hwpmc/pmc_events.h head/sys/sys/pmc.h Modified: head/lib/libc/arm/string/memcpy.S ============================================================================== --- head/lib/libc/arm/string/memcpy.S Fri Jul 27 18:31:30 2018 (r336772) +++ head/lib/libc/arm/string/memcpy.S Fri Jul 27 18:33:09 2018 (r336773) @@ -2,8 +2,4 @@ #include __FBSDID("$FreeBSD$"); -#if !defined(_ARM_ARCH_5E) || defined(_STANDALONE) #include "memcpy_arm.S" -#else -#include "memcpy_xscale.S" -#endif Modified: head/lib/libpmc/Makefile ============================================================================== --- head/lib/libpmc/Makefile Fri Jul 27 18:31:30 2018 (r336772) +++ head/lib/libpmc/Makefile Fri Jul 27 18:33:09 2018 (r336773) @@ -75,7 +75,6 @@ MAN+= pmc.tsc.3 MAN+= pmc.ucf.3 MAN+= pmc.westmere.3 MAN+= pmc.westmereuc.3 -MAN+= pmc.xscale.3 MLINKS+= \ pmc_allocate.3 pmc_release.3 \ Modified: head/lib/libpmc/libpmc.c ============================================================================== --- head/lib/libpmc/libpmc.c Fri Jul 27 18:31:30 2018 (r336772) +++ head/lib/libpmc/libpmc.c Fri Jul 27 18:33:09 2018 (r336773) @@ -59,10 +59,6 @@ static int tsc_allocate_pmc(enum pmc_event _pe, char * struct pmc_op_pmcallocate *_pmc_config); #endif #if defined(__arm__) -#if defined(__XSCALE__) -static int xscale_allocate_pmc(enum pmc_event _pe, char *_ctrspec, - struct pmc_op_pmcallocate *_pmc_config); -#endif static int armv7_allocate_pmc(enum pmc_event _pe, char *_ctrspec, struct pmc_op_pmcallocate *_pmc_config); #endif @@ -140,7 +136,6 @@ struct pmc_class_descr { PMC_CLASSDEP_TABLE(iaf, IAF); PMC_CLASSDEP_TABLE(k8, K8); -PMC_CLASSDEP_TABLE(xscale, XSCALE); PMC_CLASSDEP_TABLE(armv7, ARMV7); PMC_CLASSDEP_TABLE(armv8, ARMV8); PMC_CLASSDEP_TABLE(mips24k, MIPS24K); @@ -186,7 +181,6 @@ static const struct pmc_event_descr cortex_a57_event_t } PMC_MDEP_TABLE(k8, K8, PMC_CLASS_SOFT, PMC_CLASS_TSC); -PMC_MDEP_TABLE(xscale, XSCALE, PMC_CLASS_SOFT, PMC_CLASS_XSCALE); PMC_MDEP_TABLE(cortex_a8, ARMV7, PMC_CLASS_SOFT, PMC_CLASS_ARMV7); PMC_MDEP_TABLE(cortex_a9, ARMV7, PMC_CLASS_SOFT, PMC_CLASS_ARMV7); PMC_MDEP_TABLE(cortex_a53, ARMV8, PMC_CLASS_SOFT, PMC_CLASS_ARMV8); @@ -224,9 +218,6 @@ PMC_CLASS_TABLE_DESC(k8, K8, k8, k8); PMC_CLASS_TABLE_DESC(tsc, TSC, tsc, tsc); #endif #if defined(__arm__) -#if defined(__XSCALE__) -PMC_CLASS_TABLE_DESC(xscale, XSCALE, xscale, xscale); -#endif PMC_CLASS_TABLE_DESC(cortex_a8, ARMV7, cortex_a8, armv7); PMC_CLASS_TABLE_DESC(cortex_a9, ARMV7, cortex_a9, armv7); #endif @@ -757,29 +748,7 @@ soft_allocate_pmc(enum pmc_event pe, char *ctrspec, } #if defined(__arm__) -#if defined(__XSCALE__) -static struct pmc_event_alias xscale_aliases[] = { - EV_ALIAS("branches", "BRANCH_RETIRED"), - EV_ALIAS("branch-mispredicts", "BRANCH_MISPRED"), - EV_ALIAS("dc-misses", "DC_MISS"), - EV_ALIAS("ic-misses", "IC_MISS"), - EV_ALIAS("instructions", "INSTR_RETIRED"), - EV_ALIAS(NULL, NULL) -}; -static int -xscale_allocate_pmc(enum pmc_event pe, char *ctrspec __unused, - struct pmc_op_pmcallocate *pmc_config __unused) -{ - switch (pe) { - default: - break; - } - - return (0); -} -#endif - static struct pmc_event_alias cortex_a8_aliases[] = { EV_ALIAS("dc-misses", "L1_DCACHE_REFILL"), EV_ALIAS("ic-misses", "L1_ICACHE_REFILL"), @@ -1237,10 +1206,6 @@ pmc_event_names_of_class(enum pmc_class cl, const char ev = k8_event_table; count = PMC_EVENT_TABLE_SIZE(k8); break; - case PMC_CLASS_XSCALE: - ev = xscale_event_table; - count = PMC_EVENT_TABLE_SIZE(xscale); - break; case PMC_CLASS_ARMV7: switch (cpu_info.pm_cputype) { default: @@ -1482,12 +1447,6 @@ pmc_init(void) PMC_MDEP_INIT(generic); break; #if defined(__arm__) -#if defined(__XSCALE__) - case PMC_CPU_INTEL_XSCALE: - PMC_MDEP_INIT(xscale); - pmc_class_table[n] = &xscale_class_table_descr; - break; -#endif case PMC_CPU_ARMV7_CORTEX_A8: PMC_MDEP_INIT(cortex_a8); pmc_class_table[n] = &cortex_a8_class_table_descr; @@ -1616,9 +1575,6 @@ _pmc_name_of_event(enum pmc_event pe, enum pmc_cputype if (pe >= PMC_EV_K8_FIRST && pe <= PMC_EV_K8_LAST) { ev = k8_event_table; evfence = k8_event_table + PMC_EVENT_TABLE_SIZE(k8); - } else if (pe >= PMC_EV_XSCALE_FIRST && pe <= PMC_EV_XSCALE_LAST) { - ev = xscale_event_table; - evfence = xscale_event_table + PMC_EVENT_TABLE_SIZE(xscale); } else if (pe >= PMC_EV_ARMV7_FIRST && pe <= PMC_EV_ARMV7_LAST) { switch (cpu) { case PMC_CPU_ARMV7_CORTEX_A8: Modified: head/lib/libpmc/pmc.3 ============================================================================== --- head/lib/libpmc/pmc.3 Fri Jul 27 18:31:30 2018 (r336772) +++ head/lib/libpmc/pmc.3 Fri Jul 27 18:33:09 2018 (r336773) @@ -545,7 +545,6 @@ API is .Xr pmc.tsc 3 , .Xr pmc.westmere 3 , .Xr pmc.westmereuc 3 , -.Xr pmc.xscale 3 , .Xr pmc_allocate 3 , .Xr pmc_attach 3 , .Xr pmc_capabilities 3 , Modified: head/share/man/man4/man4.arm/Makefile ============================================================================== --- head/share/man/man4/man4.arm/Makefile Fri Jul 27 18:31:30 2018 (r336772) +++ head/share/man/man4/man4.arm/Makefile Fri Jul 27 18:33:09 2018 (r336773) @@ -16,7 +16,6 @@ MAN= \ imx6_snvs.4 \ imx_wdog.4 \ mge.4 \ - npe.4 \ ti_adc.4 MLINKS= cgem.4 if_cgem.4 Modified: head/share/mk/bsd.cpu.mk ============================================================================== --- head/share/mk/bsd.cpu.mk Fri Jul 27 18:31:30 2018 (r336772) +++ head/share/mk/bsd.cpu.mk Fri Jul 27 18:33:09 2018 (r336773) @@ -104,11 +104,7 @@ _CPUCFLAGS = -march=${CPUTYPE} . elif ${MACHINE_CPUARCH} == "amd64" _CPUCFLAGS = -march=${CPUTYPE} . elif ${MACHINE_CPUARCH} == "arm" -. if ${CPUTYPE} == "xscale" -#XXX: gcc doesn't seem to like -mcpu=xscale, and dies while rebuilding itself -#_CPUCFLAGS = -mcpu=xscale -_CPUCFLAGS = -march=armv5te -D__XSCALE__ -. elif ${CPUTYPE:M*soft*} != "" +. if ${CPUTYPE:M*soft*} != "" _CPUCFLAGS = -mfloat-abi=softfp . elif ${CPUTYPE} == "cortexa" _CPUCFLAGS = -march=armv7 -mfpu=vfp Modified: head/sys/arm/arm/bcopyinout.S ============================================================================== --- head/sys/arm/arm/bcopyinout.S Fri Jul 27 18:31:30 2018 (r336772) +++ head/sys/arm/arm/bcopyinout.S Fri Jul 27 18:33:09 2018 (r336773) @@ -47,9 +47,6 @@ .word _C_LABEL(_min_memcpy_size) __FBSDID("$FreeBSD$"); -#ifdef _ARM_ARCH_5E -#include -#else .text .align 2 @@ -559,7 +556,6 @@ ENTRY(copyout) RET END(copyout) -#endif /* * int badaddr_read_1(const uint8_t *src, uint8_t *dest) Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Fri Jul 27 18:31:30 2018 (r336772) +++ head/sys/arm/arm/cpufunc.c Fri Jul 27 18:33:09 2018 (r336773) @@ -61,10 +61,6 @@ __FBSDID("$FreeBSD$"); #include -#if defined(CPU_XSCALE_81342) -#include -#endif - /* PRIMARY CACHE VARIABLES */ int arm_picache_size; int arm_picache_line_size; @@ -254,109 +250,6 @@ struct cpu_functions pj4bv7_cpufuncs = { }; #endif /* CPU_MV_PJ4B */ -#if defined(CPU_XSCALE_PXA2X0) - -struct cpu_functions xscale_cpufuncs = { - /* CPU functions */ - - xscale_cpwait, /* cpwait */ - - /* MMU functions */ - - xscale_control, /* control */ - xscale_setttb, /* setttb */ - - /* TLB functions */ - - armv4_tlb_flushID, /* tlb_flushID */ - xscale_tlb_flushID_SE, /* tlb_flushID_SE */ - armv4_tlb_flushD, /* tlb_flushD */ - armv4_tlb_flushD_SE, /* tlb_flushD_SE */ - - /* Cache operations */ - - xscale_cache_syncI_rng, /* icache_sync_range */ - - xscale_cache_purgeD, /* dcache_wbinv_all */ - xscale_cache_purgeD_rng, /* dcache_wbinv_range */ - xscale_cache_flushD_rng, /* dcache_inv_range */ - xscale_cache_cleanD_rng, /* dcache_wb_range */ - - xscale_cache_flushID, /* idcache_inv_all */ - xscale_cache_purgeID, /* idcache_wbinv_all */ - xscale_cache_purgeID_rng, /* idcache_wbinv_range */ - cpufunc_nullop, /* l2cache_wbinv_all */ - (void *)cpufunc_nullop, /* l2cache_wbinv_range */ - (void *)cpufunc_nullop, /* l2cache_inv_range */ - (void *)cpufunc_nullop, /* l2cache_wb_range */ - (void *)cpufunc_nullop, /* l2cache_drain_writebuf */ - - /* Other functions */ - - armv4_drain_writebuf, /* drain_writebuf */ - - xscale_cpu_sleep, /* sleep */ - - /* Soft functions */ - - xscale_context_switch, /* context_switch */ - - xscale_setup /* cpu setup */ -}; -#endif -/* CPU_XSCALE_PXA2X0 */ - -#ifdef CPU_XSCALE_81342 -struct cpu_functions xscalec3_cpufuncs = { - /* CPU functions */ - - xscale_cpwait, /* cpwait */ - - /* MMU functions */ - - xscale_control, /* control */ - xscalec3_setttb, /* setttb */ - - /* TLB functions */ - - armv4_tlb_flushID, /* tlb_flushID */ - xscale_tlb_flushID_SE, /* tlb_flushID_SE */ - armv4_tlb_flushD, /* tlb_flushD */ - armv4_tlb_flushD_SE, /* tlb_flushD_SE */ - - /* Cache operations */ - - xscalec3_cache_syncI_rng, /* icache_sync_range */ - - xscalec3_cache_purgeD, /* dcache_wbinv_all */ - xscalec3_cache_purgeD_rng, /* dcache_wbinv_range */ - xscale_cache_flushD_rng, /* dcache_inv_range */ - xscalec3_cache_cleanD_rng, /* dcache_wb_range */ - - xscale_cache_flushID, /* idcache_inv_all */ - xscalec3_cache_purgeID, /* idcache_wbinv_all */ - xscalec3_cache_purgeID_rng, /* idcache_wbinv_range */ - xscalec3_l2cache_purge, /* l2cache_wbinv_all */ - xscalec3_l2cache_purge_rng, /* l2cache_wbinv_range */ - xscalec3_l2cache_flush_rng, /* l2cache_inv_range */ - xscalec3_l2cache_clean_rng, /* l2cache_wb_range */ - (void *)cpufunc_nullop, /* l2cache_drain_writebuf */ - - /* Other functions */ - - armv4_drain_writebuf, /* drain_writebuf */ - - xscale_cpu_sleep, /* sleep */ - - /* Soft functions */ - - xscalec3_context_switch, /* context_switch */ - - xscale_setup /* cpu setup */ -}; -#endif /* CPU_XSCALE_81342 */ - - #if defined(CPU_FA526) struct cpu_functions fa526_cpufuncs = { /* CPU functions */ @@ -462,9 +355,7 @@ u_int cpu_reset_needs_v4_MMU_disable; /* flag used in #if defined(CPU_ARM9) || \ defined (CPU_ARM9E) || \ defined(CPU_ARM1176) || \ - defined(CPU_XSCALE_PXA2X0) || \ defined(CPU_FA526) || defined(CPU_MV_PJ4B) || \ - defined(CPU_XSCALE_81342) || \ defined(CPU_CORTEXA) || defined(CPU_KRAIT) /* Global cache line sizes, use 32 as default */ @@ -589,7 +480,7 @@ get_cachetype_cp15(void) arm_dcache_align_mask = arm_dcache_align - 1; } } -#endif /* ARM9 || XSCALE */ +#endif /* ARM9 */ /* * Cannot panic here as we may not have a console yet ... @@ -697,29 +588,6 @@ set_cpufuncs(void) } #endif /* CPU_FA526 */ -#if defined(CPU_XSCALE_81342) - if (cputype == CPU_ID_81342) { - cpufuncs = xscalec3_cpufuncs; - cpu_reset_needs_v4_MMU_disable = 1; /* XScale needs it */ - get_cachetype_cp15(); - pmap_pte_init_xscale(); - goto out; - } -#endif /* CPU_XSCALE_81342 */ -#ifdef CPU_XSCALE_PXA2X0 - /* ignore core revision to test PXA2xx CPUs */ - if ((cputype & ~CPU_ID_XSCALE_COREREV_MASK) == CPU_ID_PXA250 || - (cputype & ~CPU_ID_XSCALE_COREREV_MASK) == CPU_ID_PXA27X || - (cputype & ~CPU_ID_XSCALE_COREREV_MASK) == CPU_ID_PXA210) { - - cpufuncs = xscale_cpufuncs; - cpu_reset_needs_v4_MMU_disable = 1; /* XScale needs it */ - get_cachetype_cp15(); - pmap_pte_init_xscale(); - - goto out; - } -#endif /* CPU_XSCALE_PXA2X0 */ /* * Bzzzz. And the answer was ... */ @@ -932,71 +800,3 @@ fa526_setup(void) cpu_control(0xffffffff, cpuctrl); } #endif /* CPU_FA526 */ - -#if defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_81342) -void -xscale_setup(void) -{ - uint32_t auxctl; - int cpuctrl, cpuctrlmask; - - /* - * The XScale Write Buffer is always enabled. Our option - * is to enable/disable coalescing. Note that bits 6:3 - * must always be enabled. - */ - - cpuctrl = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_32BP_ENABLE - | CPU_CONTROL_32BD_ENABLE | CPU_CONTROL_SYST_ENABLE - | CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE - | CPU_CONTROL_WBUF_ENABLE | CPU_CONTROL_LABT_ENABLE - | CPU_CONTROL_BPRD_ENABLE; - cpuctrlmask = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_32BP_ENABLE - | CPU_CONTROL_32BD_ENABLE | CPU_CONTROL_SYST_ENABLE - | CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE - | CPU_CONTROL_WBUF_ENABLE | CPU_CONTROL_ROM_ENABLE - | CPU_CONTROL_BEND_ENABLE | CPU_CONTROL_AFLT_ENABLE - | CPU_CONTROL_LABT_ENABLE | CPU_CONTROL_BPRD_ENABLE - | CPU_CONTROL_CPCLK | CPU_CONTROL_VECRELOC | \ - CPU_CONTROL_L2_ENABLE; - -#ifndef ARM32_DISABLE_ALIGNMENT_FAULTS - cpuctrl |= CPU_CONTROL_AFLT_ENABLE; -#endif - -#ifdef __ARMEB__ - cpuctrl |= CPU_CONTROL_BEND_ENABLE; -#endif - - if (vector_page == ARM_VECTORS_HIGH) - cpuctrl |= CPU_CONTROL_VECRELOC; -#ifdef CPU_XSCALE_CORE3 - cpuctrl |= CPU_CONTROL_L2_ENABLE; -#endif - - /* Clear out the cache */ - cpu_idcache_wbinv_all(); - - /* - * Set the control register. Note that bits 6:3 must always - * be set to 1. - */ -/* cpu_control(cpuctrlmask, cpuctrl);*/ - cpu_control(0xffffffff, cpuctrl); - - /* Make sure write coalescing is turned on */ - __asm __volatile("mrc p15, 0, %0, c1, c0, 1" - : "=r" (auxctl)); -#ifdef XSCALE_NO_COALESCE_WRITES - auxctl |= XSCALE_AUXCTL_K; -#else - auxctl &= ~XSCALE_AUXCTL_K; -#endif -#ifdef CPU_XSCALE_CORE3 - auxctl |= XSCALE_AUXCTL_LLR; - auxctl |= XSCALE_AUXCTL_MD_MASK; -#endif - __asm __volatile("mcr p15, 0, %0, c1, c0, 1" - : : "r" (auxctl)); -} -#endif /* CPU_XSCALE_PXA2X0 */ Modified: head/sys/arm/arm/dump_machdep.c ============================================================================== --- head/sys/arm/arm/dump_machdep.c Fri Jul 27 18:31:30 2018 (r336772) +++ head/sys/arm/arm/dump_machdep.c Fri Jul 27 18:33:09 2018 (r336773) @@ -63,9 +63,6 @@ dumpsys_wbinv_all(void) * part of stopping. */ dcache_wbinv_poc_all(); -#ifdef __XSCALE__ - xscale_cache_clean_minidata(); -#endif } void Modified: head/sys/arm/arm/elf_trampoline.c ============================================================================== --- head/sys/arm/arm/elf_trampoline.c Fri Jul 27 18:31:30 2018 (r336772) +++ head/sys/arm/arm/elf_trampoline.c Fri Jul 27 18:33:09 2018 (r336773) @@ -70,16 +70,6 @@ extern void fa526_idcache_wbinv_all(void); #elif defined(CPU_ARM9E) #define cpu_idcache_wbinv_all armv5_ec_idcache_wbinv_all extern void armv5_ec_idcache_wbinv_all(void); -#elif defined(CPU_XSCALE_PXA2X0) -#define cpu_idcache_wbinv_all xscale_cache_purgeID -extern void xscale_cache_purgeID(void); -#elif defined(CPU_XSCALE_81342) -#define cpu_idcache_wbinv_all xscalec3_cache_purgeID -extern void xscalec3_cache_purgeID(void); -#endif -#ifdef CPU_XSCALE_81342 -#define cpu_l2cache_wbinv_all xscalec3_l2cache_purge -extern void xscalec3_l2cache_purge(void); #elif defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_DISCOVERY) #define cpu_l2cache_wbinv_all sheeva_l2cache_wbinv_all extern void sheeva_l2cache_wbinv_all(void); Modified: head/sys/arm/arm/exception.S ============================================================================== --- head/sys/arm/arm/exception.S Fri Jul 27 18:31:30 2018 (r336772) +++ head/sys/arm/arm/exception.S Fri Jul 27 18:33:09 2018 (r336773) @@ -321,10 +321,6 @@ END(exception_exit) * on exit (without transitioning back through the abort mode stack). */ ASENTRY_NP(prefetch_abort_entry) -#ifdef __XSCALE__ - nop /* Make absolutely sure any pending */ - nop /* imprecise aborts have occurred. */ -#endif sub lr, lr, #4 /* Adjust the lr. Transition to scv32 */ PUSHFRAMEINSVC /* mode stack, build trapframe there. */ adr lr, exception_exit /* Return from handler via standard */ @@ -341,10 +337,6 @@ END(prefetch_abort_entry) * on exit (without transitioning back through the abort mode stack). */ ASENTRY_NP(data_abort_entry) -#ifdef __XSCALE__ - nop /* Make absolutely sure any pending */ - nop /* imprecise aborts have occurred. */ -#endif sub lr, lr, #8 /* Adjust the lr. Transition to scv32 */ PUSHFRAMEINSVC /* mode stack, build trapframe there. */ adr lr, exception_exit /* Exception exit routine */ Modified: head/sys/arm/arm/identcpu-v4.c ============================================================================== --- head/sys/arm/arm/identcpu-v4.c Fri Jul 27 18:31:30 2018 (r336772) +++ head/sys/arm/arm/identcpu-v4.c Fri Jul 27 18:33:09 2018 (r336773) @@ -65,60 +65,6 @@ static const char * const generic_steppings[16] = { "rev 12", "rev 13", "rev 14", "rev 15", }; -static const char * const xscale_steppings[16] = { - "step A-0", "step A-1", "step B-0", "step C-0", - "step D-0", "rev 5", "rev 6", "rev 7", - "rev 8", "rev 9", "rev 10", "rev 11", - "rev 12", "rev 13", "rev 14", "rev 15", -}; - -static const char * const i80219_steppings[16] = { - "step A-0", "rev 1", "rev 2", "rev 3", - "rev 4", "rev 5", "rev 6", "rev 7", - "rev 8", "rev 9", "rev 10", "rev 11", - "rev 12", "rev 13", "rev 14", "rev 15", -}; - -static const char * const i80321_steppings[16] = { - "step A-0", "step B-0", "rev 2", "rev 3", - "rev 4", "rev 5", "rev 6", "rev 7", - "rev 8", "rev 9", "rev 10", "rev 11", - "rev 12", "rev 13", "rev 14", "rev 15", -}; - -static const char * const i81342_steppings[16] = { - "step A-0", "rev 1", "rev 2", "rev 3", - "rev 4", "rev 5", "rev 6", "rev 7", - "rev 8", "rev 9", "rev 10", "rev 11", - "rev 12", "rev 13", "rev 14", "rev 15", -}; - -/* Steppings for PXA2[15]0 */ -static const char * const pxa2x0_steppings[16] = { - "step A-0", "step A-1", "step B-0", "step B-1", - "step B-2", "step C-0", "rev 6", "rev 7", - "rev 8", "rev 9", "rev 10", "rev 11", - "rev 12", "rev 13", "rev 14", "rev 15", -}; - -/* Steppings for PXA255/26x. - * rev 5: PXA26x B0, rev 6: PXA255 A0 - */ -static const char * const pxa255_steppings[16] = { - "rev 0", "rev 1", "rev 2", "step A-0", - "rev 4", "step B-0", "step A-0", "rev 7", - "rev 8", "rev 9", "rev 10", "rev 11", - "rev 12", "rev 13", "rev 14", "rev 15", -}; - -/* Stepping for PXA27x */ -static const char * const pxa27x_steppings[16] = { - "step A-0", "step A-1", "step B-0", "step B-1", - "step C-0", "rev 5", "rev 6", "rev 7", - "rev 8", "rev 9", "rev 10", "rev 11", - "rev 12", "rev 13", "rev 14", "rev 15", -}; - struct cpuidtab { u_int32_t cpuid; enum cpu_class cpu_class; @@ -158,41 +104,6 @@ const struct cpuidtab cpuids[] = { { CPU_ID_ARM1026EJS, CPU_CLASS_ARM10EJ, "ARM1026EJ-S", generic_steppings }, - { CPU_ID_80200, CPU_CLASS_XSCALE, "i80200", - xscale_steppings }, - - { CPU_ID_80321_400, CPU_CLASS_XSCALE, "i80321 400MHz", - i80321_steppings }, - { CPU_ID_80321_600, CPU_CLASS_XSCALE, "i80321 600MHz", - i80321_steppings }, - { CPU_ID_80321_400_B0, CPU_CLASS_XSCALE, "i80321 400MHz", - i80321_steppings }, - { CPU_ID_80321_600_B0, CPU_CLASS_XSCALE, "i80321 600MHz", - i80321_steppings }, - - { CPU_ID_81342, CPU_CLASS_XSCALE, "i81342", - i81342_steppings }, - - { CPU_ID_80219_400, CPU_CLASS_XSCALE, "i80219 400MHz", - i80219_steppings }, - { CPU_ID_80219_600, CPU_CLASS_XSCALE, "i80219 600MHz", - i80219_steppings }, - - { CPU_ID_PXA27X, CPU_CLASS_XSCALE, "PXA27x", - pxa27x_steppings }, - { CPU_ID_PXA250A, CPU_CLASS_XSCALE, "PXA250", - pxa2x0_steppings }, - { CPU_ID_PXA210A, CPU_CLASS_XSCALE, "PXA210", - pxa2x0_steppings }, - { CPU_ID_PXA250B, CPU_CLASS_XSCALE, "PXA250", - pxa2x0_steppings }, - { CPU_ID_PXA210B, CPU_CLASS_XSCALE, "PXA210", - pxa2x0_steppings }, - { CPU_ID_PXA250C, CPU_CLASS_XSCALE, "PXA255", - pxa255_steppings }, - { CPU_ID_PXA210C, CPU_CLASS_XSCALE, "PXA210", - pxa2x0_steppings }, - { CPU_ID_MV88FR131, CPU_CLASS_MARVELL, "Feroceon 88FR131", generic_steppings }, @@ -214,7 +125,6 @@ const struct cpu_classtab cpu_classes[] = { { "ARM9EJ-S", "CPU_ARM9E" }, /* CPU_CLASS_ARM9EJS */ { "ARM10E", "CPU_ARM10" }, /* CPU_CLASS_ARM10E */ { "ARM10EJ", "CPU_ARM10" }, /* CPU_CLASS_ARM10EJ */ - { "XScale", "CPU_XSCALE_..." }, /* CPU_CLASS_XSCALE */ { "Marvell", "CPU_MARVELL" }, /* CPU_CLASS_MARVELL */ }; @@ -313,13 +223,9 @@ identify_arm_cpu(void) case CPU_CLASS_ARM9EJS: case CPU_CLASS_ARM10E: case CPU_CLASS_ARM10EJ: - case CPU_CLASS_XSCALE: case CPU_CLASS_MARVELL: print_enadis(ctrl & CPU_CONTROL_DC_ENABLE, "DC"); print_enadis(ctrl & CPU_CONTROL_IC_ENABLE, "IC"); -#ifdef CPU_XSCALE_81342 - print_enadis(ctrl & CPU_CONTROL_L2_ENABLE, "L2"); -#endif #if defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_DISCOVERY) i = sheeva_control_ext(0, 0); print_enadis(i & MV_WA_ENABLE, "WA"); Modified: head/sys/arm/arm/pmap-v4.c ============================================================================== --- head/sys/arm/arm/pmap-v4.c Fri Jul 27 18:31:30 2018 (r336772) +++ head/sys/arm/arm/pmap-v4.c Fri Jul 27 18:33:09 2018 (r336773) @@ -406,10 +406,6 @@ static struct rwlock pvh_global_lock; void pmap_copy_page_offs_generic(vm_paddr_t a_phys, vm_offset_t a_offs, vm_paddr_t b_phys, vm_offset_t b_offs, int cnt); -#if ARM_MMU_XSCALE == 1 -void pmap_copy_page_offs_xscale(vm_paddr_t a_phys, vm_offset_t a_offs, - vm_paddr_t b_phys, vm_offset_t b_offs, int cnt); -#endif /* * This list exists for the benefit of pmap_map_chunk(). It keeps track @@ -501,177 +497,7 @@ pmap_pte_init_generic(void) #endif /* ARM_MMU_GENERIC != 0 */ -#if ARM_MMU_XSCALE == 1 -#if (ARM_NMMUS > 1) || defined (CPU_XSCALE_CORE3) -static u_int xscale_use_minidata; -#endif - -void -pmap_pte_init_xscale(void) -{ - uint32_t auxctl; - int write_through = 0; - - pte_l1_s_cache_mode = L1_S_B|L1_S_C|L1_S_XSCALE_P; - pte_l1_s_cache_mask = L1_S_CACHE_MASK_xscale; - - pte_l2_l_cache_mode = L2_B|L2_C; - pte_l2_l_cache_mask = L2_L_CACHE_MASK_xscale; - - pte_l2_s_cache_mode = L2_B|L2_C; - pte_l2_s_cache_mask = L2_S_CACHE_MASK_xscale; - - pte_l1_s_cache_mode_pt = L1_S_C; - pte_l2_l_cache_mode_pt = L2_C; - pte_l2_s_cache_mode_pt = L2_C; -#ifdef XSCALE_CACHE_READ_WRITE_ALLOCATE - /* - * The XScale core has an enhanced mode where writes that - * miss the cache cause a cache line to be allocated. This - * is significantly faster than the traditional, write-through - * behavior of this case. - */ - pte_l1_s_cache_mode |= L1_S_XSCALE_TEX(TEX_XSCALE_X); - pte_l2_l_cache_mode |= L2_XSCALE_L_TEX(TEX_XSCALE_X); - pte_l2_s_cache_mode |= L2_XSCALE_T_TEX(TEX_XSCALE_X); -#endif /* XSCALE_CACHE_READ_WRITE_ALLOCATE */ -#ifdef XSCALE_CACHE_WRITE_THROUGH - /* - * Some versions of the XScale core have various bugs in - * their cache units, the work-around for which is to run - * the cache in write-through mode. Unfortunately, this - * has a major (negative) impact on performance. So, we - * go ahead and run fast-and-loose, in the hopes that we - * don't line up the planets in a way that will trip the - * bugs. - * - * However, we give you the option to be slow-but-correct. - */ - write_through = 1; -#elif defined(XSCALE_CACHE_WRITE_BACK) - /* force write back cache mode */ - write_through = 0; -#elif defined(CPU_XSCALE_PXA2X0) - /* - * Intel PXA2[15]0 processors are known to have a bug in - * write-back cache on revision 4 and earlier (stepping - * A[01] and B[012]). Fixed for C0 and later. - */ - { - uint32_t id, type; - - id = cpu_ident(); - type = id & ~(CPU_ID_XSCALE_COREREV_MASK|CPU_ID_REVISION_MASK); - - if (type == CPU_ID_PXA250 || type == CPU_ID_PXA210) { - if ((id & CPU_ID_REVISION_MASK) < 5) { - /* write through for stepping A0-1 and B0-2 */ - write_through = 1; - } - } - } -#endif /* XSCALE_CACHE_WRITE_THROUGH */ - - if (write_through) { - pte_l1_s_cache_mode = L1_S_C; - pte_l2_l_cache_mode = L2_C; - pte_l2_s_cache_mode = L2_C; - } - -#if (ARM_NMMUS > 1) - xscale_use_minidata = 1; -#endif - - pte_l2_s_prot_u = L2_S_PROT_U_xscale; - pte_l2_s_prot_w = L2_S_PROT_W_xscale; - pte_l2_s_prot_mask = L2_S_PROT_MASK_xscale; - - pte_l1_s_proto = L1_S_PROTO_xscale; - pte_l1_c_proto = L1_C_PROTO_xscale; - pte_l2_s_proto = L2_S_PROTO_xscale; - -#ifdef CPU_XSCALE_CORE3 - pmap_copy_page_func = pmap_copy_page_generic; - pmap_copy_page_offs_func = pmap_copy_page_offs_generic; - pmap_zero_page_func = pmap_zero_page_generic; - xscale_use_minidata = 0; - /* Make sure it is L2-cachable */ - pte_l1_s_cache_mode |= L1_S_XSCALE_TEX(TEX_XSCALE_T); - pte_l1_s_cache_mode_pt = pte_l1_s_cache_mode &~ L1_S_XSCALE_P; - pte_l2_l_cache_mode |= L2_XSCALE_L_TEX(TEX_XSCALE_T) ; - pte_l2_l_cache_mode_pt = pte_l1_s_cache_mode; - pte_l2_s_cache_mode |= L2_XSCALE_T_TEX(TEX_XSCALE_T); - pte_l2_s_cache_mode_pt = pte_l2_s_cache_mode; - -#else - pmap_copy_page_func = pmap_copy_page_xscale; - pmap_copy_page_offs_func = pmap_copy_page_offs_xscale; - pmap_zero_page_func = pmap_zero_page_xscale; -#endif - - /* - * Disable ECC protection of page table access, for now. - */ - __asm __volatile("mrc p15, 0, %0, c1, c0, 1" : "=r" (auxctl)); - auxctl &= ~XSCALE_AUXCTL_P; - __asm __volatile("mcr p15, 0, %0, c1, c0, 1" : : "r" (auxctl)); -} - /* - * xscale_setup_minidata: - * - * Set up the mini-data cache clean area. We require the - * caller to allocate the right amount of physically and - * virtually contiguous space. - */ -extern vm_offset_t xscale_minidata_clean_addr; -extern vm_size_t xscale_minidata_clean_size; /* already initialized */ -void -xscale_setup_minidata(vm_offset_t l1pt, vm_offset_t va, vm_paddr_t pa) -{ - pd_entry_t *pde = (pd_entry_t *) l1pt; - pt_entry_t *pte; - vm_size_t size; - uint32_t auxctl; - - xscale_minidata_clean_addr = va; - - /* Round it to page size. */ - size = (xscale_minidata_clean_size + L2_S_OFFSET) & L2_S_FRAME; - - for (; size != 0; - va += L2_S_SIZE, pa += L2_S_SIZE, size -= L2_S_SIZE) { - pte = (pt_entry_t *) kernel_pt_lookup( - pde[L1_IDX(va)] & L1_C_ADDR_MASK); - if (pte == NULL) - panic("xscale_setup_minidata: can't find L2 table for " - "VA 0x%08x", (u_int32_t) va); - pte[l2pte_index(va)] = - L2_S_PROTO | pa | L2_S_PROT(PTE_KERNEL, VM_PROT_READ) | - L2_C | L2_XSCALE_T_TEX(TEX_XSCALE_X); - } - - /* - * Configure the mini-data cache for write-back with - * read/write-allocate. - * - * NOTE: In order to reconfigure the mini-data cache, we must - * make sure it contains no valid data! In order to do that, - * we must issue a global data cache invalidate command! - * - * WE ASSUME WE ARE RUNNING UN-CACHED WHEN THIS ROUTINE IS CALLED! - * THIS IS VERY IMPORTANT! - */ - - /* Invalidate data and mini-data. */ - __asm __volatile("mcr p15, 0, %0, c7, c6, 0" : : "r" (0)); - __asm __volatile("mrc p15, 0, %0, c1, c0, 1" : "=r" (auxctl)); - auxctl = (auxctl & ~XSCALE_AUXCTL_MD_MASK) | XSCALE_AUXCTL_MD_WB_RWA; - __asm __volatile("mcr p15, 0, %0, c1, c0, 1" : : "r" (auxctl)); -} -#endif - -/* * Allocate an L1 translation table for the specified pmap. * This is called at pmap creation time. */ @@ -3955,7 +3781,7 @@ pmap_remove(pmap_t pm, vm_offset_t sva, vm_offset_t ev * StrongARM accesses to non-cached pages are non-burst making writing * _any_ bulk data very slow. */ -#if ARM_MMU_GENERIC != 0 || defined(CPU_XSCALE_CORE3) +#if ARM_MMU_GENERIC != 0 void pmap_zero_page_generic(vm_paddr_t phys, int off, int size) { @@ -3984,78 +3810,7 @@ pmap_zero_page_generic(vm_paddr_t phys, int off, int s } #endif /* ARM_MMU_GENERIC != 0 */ -#if ARM_MMU_XSCALE == 1 -void -pmap_zero_page_xscale(vm_paddr_t phys, int off, int size) -{ - - if (_arm_bzero && size >= _min_bzero_size && - _arm_bzero((void *)(phys + off), size, IS_PHYSICAL) == 0) - return; - - mtx_lock(&cmtx); - /* - * Hook in the page, zero it, and purge the cache for that - * zeroed page. Invalidate the TLB as needed. - */ - *cdst_pte = L2_S_PROTO | phys | - L2_S_PROT(PTE_KERNEL, VM_PROT_WRITE) | - L2_C | L2_XSCALE_T_TEX(TEX_XSCALE_X); /* mini-data */ - PTE_SYNC(cdst_pte); - cpu_tlb_flushD_SE(cdstp); - cpu_cpwait(); - if (off || size != PAGE_SIZE) - bzero((void *)(cdstp + off), size); - else - bzero_page(cdstp); - mtx_unlock(&cmtx); - xscale_cache_clean_minidata(); -} - /* - * Change the PTEs for the specified kernel mappings such that they - * will use the mini data cache instead of the main data cache. - */ -void -pmap_use_minicache(vm_offset_t va, vm_size_t size) -{ - struct l2_bucket *l2b; - pt_entry_t *ptep, *sptep, pte; - vm_offset_t next_bucket, eva; - -#if (ARM_NMMUS > 1) || defined(CPU_XSCALE_CORE3) - if (xscale_use_minidata == 0) - return; -#endif - - eva = va + size; - - while (va < eva) { - next_bucket = L2_NEXT_BUCKET(va); - if (next_bucket > eva) - next_bucket = eva; - - l2b = pmap_get_l2_bucket(kernel_pmap, va); - - sptep = ptep = &l2b->l2b_kva[l2pte_index(va)]; - - while (va < next_bucket) { - pte = *ptep; - if (!l2pte_minidata(pte)) { - cpu_dcache_wbinv_range(va, PAGE_SIZE); - cpu_tlb_flushD_SE(va); - *ptep = pte & ~L2_B; - } - ptep++; - va += PAGE_SIZE; - } - PTE_SYNC_RANGE(sptep, (u_int)(ptep - sptep)); - } - cpu_cpwait(); -} -#endif /* ARM_MMU_XSCALE == 1 */ - -/* * pmap_zero_page zeros the specified hardware page by mapping * the page into KVM and using bzero to clear its contents. */ @@ -4185,7 +3940,7 @@ pmap_clean_page(struct pv_entry *pv, boolean_t is_src) * hook points. The same comment regarding cachability as in * pmap_zero_page also applies here. */ -#if ARM_MMU_GENERIC != 0 || defined (CPU_XSCALE_CORE3) +#if ARM_MMU_GENERIC != 0 void pmap_copy_page_generic(vm_paddr_t src, vm_paddr_t dst) { @@ -4251,72 +4006,6 @@ pmap_copy_page_offs_generic(vm_paddr_t a_phys, vm_offs cpu_l2cache_wbinv_range(cdstp + b_offs, cnt); } #endif /* ARM_MMU_GENERIC != 0 */ - -#if ARM_MMU_XSCALE == 1 -void -pmap_copy_page_xscale(vm_paddr_t src, vm_paddr_t dst) -{ -#if 0 - /* XXX: Only needed for pmap_clean_page(), which is commented out. */ - struct vm_page *src_pg = PHYS_TO_VM_PAGE(src); -#endif - - /* - * Clean the source page. Hold the source page's lock for - * the duration of the copy so that no other mappings can - * be created while we have a potentially aliased mapping. - */ -#if 0 - /* - * XXX: Not needed while we call cpu_dcache_wbinv_all() in - * pmap_copy_page(). - */ - (void) pmap_clean_page(TAILQ_FIRST(&src_pg->md.pv_list), TRUE); -#endif - /* - * Map the pages into the page hook points, copy them, and purge - * the cache for the appropriate page. Invalidate the TLB - * as required. - */ - mtx_lock(&cmtx); - *csrc_pte = L2_S_PROTO | src | - L2_S_PROT(PTE_KERNEL, VM_PROT_READ) | - L2_C | L2_XSCALE_T_TEX(TEX_XSCALE_X); /* mini-data */ - PTE_SYNC(csrc_pte); - *cdst_pte = L2_S_PROTO | dst | - L2_S_PROT(PTE_KERNEL, VM_PROT_WRITE) | - L2_C | L2_XSCALE_T_TEX(TEX_XSCALE_X); /* mini-data */ - PTE_SYNC(cdst_pte); - cpu_tlb_flushD_SE(csrcp); - cpu_tlb_flushD_SE(cdstp); - cpu_cpwait(); - bcopy_page(csrcp, cdstp); - mtx_unlock(&cmtx); - xscale_cache_clean_minidata(); -} - -void -pmap_copy_page_offs_xscale(vm_paddr_t a_phys, vm_offset_t a_offs, - vm_paddr_t b_phys, vm_offset_t b_offs, int cnt) -{ - - mtx_lock(&cmtx); - *csrc_pte = L2_S_PROTO | a_phys | - L2_S_PROT(PTE_KERNEL, VM_PROT_READ) | - L2_C | L2_XSCALE_T_TEX(TEX_XSCALE_X); - PTE_SYNC(csrc_pte); - *cdst_pte = L2_S_PROTO | b_phys | - L2_S_PROT(PTE_KERNEL, VM_PROT_WRITE) | - L2_C | L2_XSCALE_T_TEX(TEX_XSCALE_X); - PTE_SYNC(cdst_pte); - cpu_tlb_flushD_SE(csrcp); - cpu_tlb_flushD_SE(cdstp); - cpu_cpwait(); - bcopy((char *)csrcp + a_offs, (char *)cdstp + b_offs, cnt); - mtx_unlock(&cmtx); - xscale_cache_clean_minidata(); -} -#endif /* ARM_MMU_XSCALE == 1 */ void pmap_copy_page(vm_page_t src, vm_page_t dst) Modified: head/sys/arm/arm/trap-v4.c ============================================================================== --- head/sys/arm/arm/trap-v4.c Fri Jul 27 18:31:30 2018 (r336772) +++ head/sys/arm/arm/trap-v4.c Fri Jul 27 18:33:09 2018 (r336773) @@ -514,13 +514,6 @@ dab_align(struct trapframe *tf, u_int fsr, u_int far, * If pcb_onfault is set, flag the fault and return to the handler. * If the fault occurred in user mode, give the process a SIGBUS. * - * Note: On XScale, FAULT_BUSERR_0, FAULT_BUSERR_1, and FAULT_BUSERR_2 - * can be flagged as imprecise in the FSR. This causes a real headache - * since some of the machine state is lost. In this case, tf->tf_pc - * may not actually point to the offending instruction. In fact, if - * we've taken a double abort fault, it generally points somewhere near - * the top of "data_abort_entry" in exception.S. - * * In all other cases, these data aborts are considered fatal. */ static int @@ -528,52 +521,6 @@ dab_buserr(struct trapframe *tf, u_int fsr, u_int far, struct ksig *ksig) { struct pcb *pcb = td->td_pcb; - -#ifdef __XSCALE__ - if ((fsr & FAULT_IMPRECISE) != 0 && - (tf->tf_spsr & PSR_MODE) == PSR_ABT32_MODE) { - /* - * Oops, an imprecise, double abort fault. We've lost the - * r14_abt/spsr_abt values corresponding to the original - * abort, and the spsr saved in the trapframe indicates - * ABT mode. - */ - tf->tf_spsr &= ~PSR_MODE; - - /* - * We use a simple heuristic to determine if the double abort *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Fri Jul 27 18:34: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 9EEB9105355E; Fri, 27 Jul 2018 18:34:21 +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 54B9582063; Fri, 27 Jul 2018 18:34:21 +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 351001B918; Fri, 27 Jul 2018 18:34:21 +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 w6RIYLK7020095; Fri, 27 Jul 2018 18:34:21 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RIYKfO020092; Fri, 27 Jul 2018 18:34:20 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807271834.w6RIYKfO020092@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 27 Jul 2018 18:34:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336774 - in head/sys: amd64/include i386/include vm X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys: amd64/include i386/include vm X-SVN-Commit-Revision: 336774 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: Fri, 27 Jul 2018 18:34:22 -0000 Author: imp Date: Fri Jul 27 18:34:20 2018 New Revision: 336774 URL: https://svnweb.freebsd.org/changeset/base/336774 Log: Rename VM_FREELIST_ISADMA to VM_FREELIST_LOWMEM. There's no differene between VM_FREELIST_ISADMA and VM_FREELIST_LOWMEM except for the default boundary (16MB on x86 and 256MB on MIPS, but they are otherwise the same). We don't need both for any system we support (there were some really old ARC systems that did have ISA/EISA bus, but we never ran on them and they are too old to ever grow support for). Differential Review: https://reviews.freebsd.org/D16290 Modified: head/sys/amd64/include/vmparam.h head/sys/i386/include/vmparam.h head/sys/vm/vm_phys.c Modified: head/sys/amd64/include/vmparam.h ============================================================================== --- head/sys/amd64/include/vmparam.h Fri Jul 27 18:33:09 2018 (r336773) +++ head/sys/amd64/include/vmparam.h Fri Jul 27 18:34:20 2018 (r336774) @@ -110,7 +110,9 @@ #define VM_NFREELIST 3 #define VM_FREELIST_DEFAULT 0 #define VM_FREELIST_DMA32 1 -#define VM_FREELIST_ISADMA 2 +#define VM_FREELIST_LOWMEM 2 + +#define VM_LOWMEM_BOUNDARY (16 << 20) /* 16MB ISA DMA limit */ /* * Create the DMA32 free list only if the number of physical pages above Modified: head/sys/i386/include/vmparam.h ============================================================================== --- head/sys/i386/include/vmparam.h Fri Jul 27 18:33:09 2018 (r336773) +++ head/sys/i386/include/vmparam.h Fri Jul 27 18:34:20 2018 (r336774) @@ -97,12 +97,14 @@ /* * Create two free page lists: VM_FREELIST_DEFAULT is for physical * pages that are above the largest physical address that is - * accessible by ISA DMA and VM_FREELIST_ISADMA is for physical pages + * accessible by ISA DMA and VM_FREELIST_LOWMEM is for physical pages * that are below that address. */ #define VM_NFREELIST 2 #define VM_FREELIST_DEFAULT 0 -#define VM_FREELIST_ISADMA 1 +#define VM_FREELIST_LOWMEM 1 + +#define VM_LOWMEM_BOUNDARY (16 << 20) /* 16MB ISA DMA limit */ /* * The largest allocation size is 2MB under PAE and 4MB otherwise. Modified: head/sys/vm/vm_phys.c ============================================================================== --- head/sys/vm/vm_phys.c Fri Jul 27 18:33:09 2018 (r336773) +++ head/sys/vm/vm_phys.c Fri Jul 27 18:34:20 2018 (r336774) @@ -115,9 +115,6 @@ static int __read_mostly vm_freelist_to_flind[VM_NFREE CTASSERT(VM_FREELIST_DEFAULT == 0); -#ifdef VM_FREELIST_ISADMA -#define VM_ISADMA_BOUNDARY 16777216 -#endif #ifdef VM_FREELIST_DMA32 #define VM_DMA32_BOUNDARY ((vm_paddr_t)1 << 32) #endif @@ -126,9 +123,6 @@ CTASSERT(VM_FREELIST_DEFAULT == 0); * Enforce the assumptions made by vm_phys_add_seg() and vm_phys_init() about * the ordering of the free list boundaries. */ -#if defined(VM_ISADMA_BOUNDARY) && defined(VM_LOWMEM_BOUNDARY) -CTASSERT(VM_ISADMA_BOUNDARY < VM_LOWMEM_BOUNDARY); -#endif #if defined(VM_LOWMEM_BOUNDARY) && defined(VM_DMA32_BOUNDARY) CTASSERT(VM_LOWMEM_BOUNDARY < VM_DMA32_BOUNDARY); #endif @@ -442,12 +436,6 @@ vm_phys_add_seg(vm_paddr_t start, vm_paddr_t end) * list boundaries. */ paddr = start; -#ifdef VM_FREELIST_ISADMA - if (paddr < VM_ISADMA_BOUNDARY && end > VM_ISADMA_BOUNDARY) { - vm_phys_create_seg(paddr, VM_ISADMA_BOUNDARY); - paddr = VM_ISADMA_BOUNDARY; - } -#endif #ifdef VM_FREELIST_LOWMEM if (paddr < VM_LOWMEM_BOUNDARY && end > VM_LOWMEM_BOUNDARY) { vm_phys_create_seg(paddr, VM_LOWMEM_BOUNDARY); @@ -486,11 +474,6 @@ vm_phys_init(void) npages = 0; for (segind = vm_phys_nsegs - 1; segind >= 0; segind--) { seg = &vm_phys_segs[segind]; -#ifdef VM_FREELIST_ISADMA - if (seg->end <= VM_ISADMA_BOUNDARY) - vm_freelist_to_flind[VM_FREELIST_ISADMA] = 1; - else -#endif #ifdef VM_FREELIST_LOWMEM if (seg->end <= VM_LOWMEM_BOUNDARY) vm_freelist_to_flind[VM_FREELIST_LOWMEM] = 1; @@ -540,13 +523,6 @@ vm_phys_init(void) npages += atop(seg->end - seg->start); #else seg->first_page = PHYS_TO_VM_PAGE(seg->start); -#endif -#ifdef VM_FREELIST_ISADMA - if (seg->end <= VM_ISADMA_BOUNDARY) { - flind = vm_freelist_to_flind[VM_FREELIST_ISADMA]; - KASSERT(flind >= 0, - ("vm_phys_init: ISADMA flind < 0")); - } else #endif #ifdef VM_FREELIST_LOWMEM if (seg->end <= VM_LOWMEM_BOUNDARY) { From owner-svn-src-head@freebsd.org Fri Jul 27 18:39: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 DAC861053785; Fri, 27 Jul 2018 18:39:46 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f41.google.com (mail-it0-f41.google.com [209.85.214.41]) (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 50B5A82548; Fri, 27 Jul 2018 18:39:46 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f41.google.com with SMTP id p81-v6so8683358itp.1; Fri, 27 Jul 2018 11:39:46 -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=h6DL+x89sgbe3rqqntbJQRmlpzzwfFsvmYOoNnq1GnI=; b=cqdCvuZJO2y7ybjkEgTyVcXcUiAwr6w2KI0z9Rt2MDNarbEyC4USJImXedjRB58tAF 2shLbJGexNulQsjWyV1YIi7n1qE0dtK383LRaXj5dl1S/AcxeWk20e9Xvd1buR6uBOYY cKYLPHHX2zQT+M7qWKqVA/03+ySiVv4wx0SeoMzKza0BJtiuBIeV8jyAziAQV7/TzDL0 mZc+KO5uiApBrWMbHY/z1gD3Fp41kc6TqC3j6E2RtN6Ij9ZFZKPDkrNdKTqYNTh6QwoG cLbq3VbTP/rE/M/yHhuNvkTUUgt/UhoSWOsod8CMAeoY2J5UV/GtMvKK0X8QPsn99ZW5 6C3g== X-Gm-Message-State: AOUpUlETUGs6zF7qaE+x4KhRg2UAvH5pQIu86CjjJ97ehQkOyORgdlr8 VBObTjzGPAWrHA7CbHIMvzpIBZhH X-Google-Smtp-Source: AAOMgpfnd/aUdZjTOuApVOu8KKM+1O5pQGXfsrxUhzovXgEkc06bqDgHeIdhS5ZaNUjmGKzPuuAnKw== X-Received: by 2002:a02:1103:: with SMTP id 3-v6mr6890819jaf.144.1532714919921; Fri, 27 Jul 2018 11:08:39 -0700 (PDT) Received: from mail-io0-f180.google.com (mail-io0-f180.google.com. [209.85.223.180]) by smtp.gmail.com with ESMTPSA id f24-v6sm1433611ioc.52.2018.07.27.11.08.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Jul 2018 11:08:39 -0700 (PDT) Received: by mail-io0-f180.google.com with SMTP id g11-v6so4843434ioq.9; Fri, 27 Jul 2018 11:08:39 -0700 (PDT) X-Received: by 2002:a6b:4e04:: with SMTP id c4-v6mr6004074iob.19.1532714919367; Fri, 27 Jul 2018 11:08:39 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 2002:a02:7e0a:0:0:0:0:0 with HTTP; Fri, 27 Jul 2018 11:08:38 -0700 (PDT) In-Reply-To: <201807271040.w6RAemk9071948@repo.freebsd.org> References: <201807271040.w6RAemk9071948@repo.freebsd.org> From: Conrad Meyer Date: Fri, 27 Jul 2018 11:08:38 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r336757 - in head: share/man/man4 share/man/man7 share/misc sys/dev/firewire sys/dev/hwpmc sys/dev/sk sys/dev/sound/pci sys/dev/sound/pcm sys/fs/nfsclient To: Eitan Adler 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.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: Fri, 27 Jul 2018 18:39:47 -0000 This may intersect badly with our current policy of not shipping any CAs in base. Best, Conrad On Fri, Jul 27, 2018 at 3:40 AM, Eitan Adler wrote: > Author: eadler > Date: Fri Jul 27 10:40:48 2018 > New Revision: 336757 > URL: https://svnweb.freebsd.org/changeset/base/336757 > > Log: > Use https over http for FreeBSD pages > > Modified: > head/share/man/man4/firewire.4 > head/share/man/man7/tests.7 > head/share/misc/bsd-family-tree > head/sys/dev/firewire/00README > head/sys/dev/hwpmc/pmc_events.h > head/sys/dev/sk/if_sk.c > head/sys/dev/sound/pci/maestro3.c > head/sys/dev/sound/pcm/dsp.c > head/sys/fs/nfsclient/nfs_clstate.c > > Modified: head/share/man/man4/firewire.4 > ============================================================================== > --- head/share/man/man4/firewire.4 Fri Jul 27 07:05:50 2018 (r336756) > +++ head/share/man/man4/firewire.4 Fri Jul 27 10:40:48 2018 (r336757) > @@ -87,7 +87,7 @@ Debugging over the firewire interace is possible with > .Xr dcons 4 > driver. > Please see > -.Pa http://wiki.freebsd.org/DebugWithDcons > +.Pa https://wiki.freebsd.org/DebugWithDcons > for details on how to setup debugging with firewire. > .Sh FILES > .Bl -tag -width "Pa /dev/fwmem0.0" -compact > > Modified: head/share/man/man7/tests.7 > ============================================================================== > --- head/share/man/man7/tests.7 Fri Jul 27 07:05:50 2018 (r336756) > +++ head/share/man/man7/tests.7 Fri Jul 27 10:40:48 2018 (r336757) > @@ -198,7 +198,7 @@ problem report. > For more details please refer to: > .Bl -bullet -offset indent -compact > .It > -.Lk http://lists.freebsd.org/ "FreeBSD Mailing Lists" > +.Lk https://lists.freebsd.org/ "FreeBSD Mailing Lists" > .It > .Lk https://www.freebsd.org/support.html "Problem Reporting" > .El > > Modified: head/share/misc/bsd-family-tree > ============================================================================== > --- head/share/misc/bsd-family-tree Fri Jul 27 07:05:50 2018 (r336756) > +++ head/share/misc/bsd-family-tree Fri Jul 27 10:40:48 2018 (r336757) > @@ -814,6 +814,6 @@ Steven M. Schultz for providing 2.8BSD, 2.10BSD, 2.11B > > -- > Copyright (c) 1997-2012 Wolfram Schneider > -URL: http://svnweb.freebsd.org/base/head/share/misc/bsd-family-tree > +URL: https://svnweb.freebsd.org/base/head/share/misc/bsd-family-tree > > $FreeBSD$ > > Modified: head/sys/dev/firewire/00README > ============================================================================== > --- head/sys/dev/firewire/00README Fri Jul 27 07:05:50 2018 (r336756) > +++ head/sys/dev/firewire/00README Fri Jul 27 10:40:48 2018 (r336757) > @@ -9,7 +9,7 @@ IEEE 1394 support for FreeBSD-5.X and 4.X. > modified by Hidetoshi Shimokawa . > Please note this driver is still under development. > You can find latest snapshots under: > - http://people.freebsd.org/~simokawa/ > + https://people.freebsd.org/~simokawa/ > named firewire-2002XXXX.tar.gz > > The driver consists of 6 parts: > > Modified: head/sys/dev/hwpmc/pmc_events.h > ============================================================================== > --- head/sys/dev/hwpmc/pmc_events.h Fri Jul 27 07:05:50 2018 (r336756) > +++ head/sys/dev/hwpmc/pmc_events.h Fri Jul 27 10:40:48 2018 (r336757) > @@ -36,7 +36,7 @@ > * the source tree at src/share/doc/papers/hwpmc/hwpmc.ms > * as well as on-line at: > * > - * http://wiki.freebsd.org/PmcTools/PmcHardwareHowTo > + * https://wiki.freebsd.org/PmcTools/PmcHardwareHowTo > * > * Please refer to those resources before you attempt to modify > * this file or the hwpmc driver/subsystem. > > Modified: head/sys/dev/sk/if_sk.c > ============================================================================== > --- head/sys/dev/sk/if_sk.c Fri Jul 27 07:05:50 2018 (r336756) > +++ head/sys/dev/sk/if_sk.c Fri Jul 27 10:40:48 2018 (r336757) > @@ -64,7 +64,7 @@ __FBSDID("$FreeBSD$"); > * XMAC II datasheet online. I have put my copy at people.freebsd.org as a > * convenience to others until Vitesse corrects this problem: > * > - * http://people.freebsd.org/~wpaul/SysKonnect/xmacii_datasheet_rev_c_9-29.pdf > + * https://people.freebsd.org/~wpaul/SysKonnect/xmacii_datasheet_rev_c_9-29.pdf > * > * Written by Bill Paul > * Department of Electrical Engineering > > Modified: head/sys/dev/sound/pci/maestro3.c > ============================================================================== > --- head/sys/dev/sound/pci/maestro3.c Fri Jul 27 07:05:50 2018 (r336756) > +++ head/sys/dev/sound/pci/maestro3.c Fri Jul 27 10:40:48 2018 (r336757) > @@ -45,7 +45,7 @@ > * , http://www.zabbo.net/maestro3 > * > * Cameron Grant created the pcm framework used here nearly verbatim. > - * , http://people.freebsd.org/~cg/template.c > + * , https://people.freebsd.org/~cg/template.c > * > * Taku YAMAMOTO for his Maestro-1/2 FreeBSD driver and sanity reference. > * > > Modified: head/sys/dev/sound/pcm/dsp.c > ============================================================================== > --- head/sys/dev/sound/pcm/dsp.c Fri Jul 27 07:05:50 2018 (r336756) > +++ head/sys/dev/sound/pcm/dsp.c Fri Jul 27 10:40:48 2018 (r336757) > @@ -2222,7 +2222,7 @@ dsp_mmap_single(struct cdev *i_dev, vm_ooffset_t *offs > * Unfortunately, we have to give up this one due to linux_mmap > * changes. > * > - * http://lists.freebsd.org/pipermail/freebsd-emulation/2007-June/003698.html > + * https://lists.freebsd.org/pipermail/freebsd-emulation/2007-June/003698.html > * > */ > #ifdef SV_ABI_LINUX > > Modified: head/sys/fs/nfsclient/nfs_clstate.c > ============================================================================== > --- head/sys/fs/nfsclient/nfs_clstate.c Fri Jul 27 07:05:50 2018 (r336756) > +++ head/sys/fs/nfsclient/nfs_clstate.c Fri Jul 27 10:40:48 2018 (r336757) > @@ -1890,8 +1890,7 @@ nfscl_umount(struct nfsmount *nmp, NFSPROC_T *p) > * mutex for NFSLOCKCLSTATE(), so it is "m" for the following > * explanation, courtesy of Alan Cox. > * What follows is a snippet from Alan Cox's email at: > - * http://docs.FreeBSD.org/cgi/ > - * mid.cgi?BANLkTikR3d65zPHo9==08ZfJ2vmqZucEvw > + * https://docs.FreeBSD.org/cgi/mid.cgi?BANLkTikR3d65zPHo9==08ZfJ2vmqZucEvw > * > * 1. Set MNTK_UNMOUNTF > * 2. Acquire a standard FreeBSD mutex "m". > From owner-svn-src-head@freebsd.org Fri Jul 27 18:57: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 782AC1053CCC for ; Fri, 27 Jul 2018 18:57:58 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (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 0167B82EF3 for ; Fri, 27 Jul 2018 18:57:57 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: f8442ad9-91ce-11e8-93fa-f3ebd9db2b94 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.ore.mailhop.org (Halon) with ESMTPSA id f8442ad9-91ce-11e8-93fa-f3ebd9db2b94; Fri, 27 Jul 2018 18:57:55 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w6RIvsZd024615; Fri, 27 Jul 2018 12:57:54 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1532717874.61594.79.camel@freebsd.org> Subject: Re: svn commit: r336746 - in head/lib: libc/gen libutil From: Ian Lepore To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Fri, 27 Jul 2018 12:57:54 -0600 In-Reply-To: <20180727164437.GC2489@kib.kiev.ua> References: <201807261834.w6QIYc9i080738@repo.freebsd.org> <20180727150304.GA2489@kib.kiev.ua> <1532705741.61594.53.camel@freebsd.org> <20180727154359.GB2489@kib.kiev.ua> <1532707631.61594.66.camel@freebsd.org> <20180727164437.GC2489@kib.kiev.ua> 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.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: Fri, 27 Jul 2018 18:57:58 -0000 On Fri, 2018-07-27 at 19:44 +0300, Konstantin Belousov wrote: > On Fri, Jul 27, 2018 at 10:07:11AM -0600, Ian Lepore wrote: > > > > I believe pw_scan() was originally a static function in libc used by > > getpwent() and related functions. When libutil grew some pw utilties, > > it looks like the static pw_scan was renamed to __pw_scan and added to > > the private list, so that it could be shared with libutil (and so I > > copied that process with pw_init(), but I had to rename it to > > pw_initpwd because libutil already has a pw_init()). > > > > I'm not sure how to make the functions more generic, pw_scan() parses a > > line of text in passwd(5) format, optionally warns about errors, and > > fills in a struct passwd with what it finds. pw_initpwd() inits a > > struct passwd to (well-)known default values. But libutil pw_scan() > > allocates the struct and requires the caller to free it, and the > > internal __pw_scan() fills in a struct passed in to it and returns an > > int, so there's no way to re-unify the functions under a single name. > I did not asked to make it more generic.  I mean, if the function is > exported, its interface should be useful enough for generic consumers. > If the current interface is fine, so be it, but see below. > > > > > > > It would be strange to me to have one or two of the pw_xxxx() family of > > functions in libc and the rest of them in libutil. Libutil seems like a > > fine place for password/group file utilities that go beyond the posix > > functions. It's just an implementation detail that we'd prefer to share > > the source code for a small bit of common functionality around parsing > > lines of passwd file data. > Would it be a solution to stop exporting these functions at all, and > just sompile them twice, once in libc, and second time in libutil ? > libutil would add a source file from libc into it SRCS. Yes, this is exactly what I think we should do after your description of how FBSDprivate_1.0 exists specifically to solve some interactions between rtld, libc, and libthr. This is what I meant when I said in one of the earlier emails: > I also noticed that chpass(1) and pwd_mkdb(8)_both directly compile in > their own copy of the pw_scan.c source using .PATH in their makefiles. > I wonder if doing that as the way of sharing the code between libc and > libutil would be a better thing to do? (And presumably that would > remove the need to have entries in the FBSDprivate_1.0 list?) So if we do that, are there any special considerations about removing the __pw_scan entry (and now __pw_initpwd as well) from the private list? Or can they just be deleted without needing to do anything else? Does anything need to be done to make the __pw_scan symbol not directly visible for linking to resolve external references? -- Ian From owner-svn-src-head@freebsd.org Fri Jul 27 19:12: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 DEEBD1054119; Fri, 27 Jul 2018 19:12:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 951E983791; Fri, 27 Jul 2018 19:12:03 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5C9B51BF5F; Fri, 27 Jul 2018 19:12:03 +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 w6RJC3Rq038449; Fri, 27 Jul 2018 19:12:03 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RJC3d4038437; Fri, 27 Jul 2018 19:12:03 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807271912.w6RJC3d4038437@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 27 Jul 2018 19:12:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336775 - in head/sys/arm: at91 cavium lpc xscale X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head/sys/arm: at91 cavium lpc xscale X-SVN-Commit-Revision: 336775 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: Fri, 27 Jul 2018 19:12:04 -0000 Author: imp Date: Fri Jul 27 19:12:02 2018 New Revision: 336775 URL: https://svnweb.freebsd.org/changeset/base/336775 Log: Remove now-empty directories. git-svn doesn't remove them unless you give it special flags, which I forgot. Pointy Hat to: imp Deleted: head/sys/arm/at91/ head/sys/arm/cavium/ head/sys/arm/lpc/ head/sys/arm/xscale/ From owner-svn-src-head@freebsd.org Fri Jul 27 19:12: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 A11791054143; Fri, 27 Jul 2018 19:12:30 +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 11510838EA; Fri, 27 Jul 2018 19:12:29 +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 w6RJCKJh052386; Fri, 27 Jul 2018 12:12:20 -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 w6RJCJbs052385; Fri, 27 Jul 2018 12:12:19 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201807271912.w6RJCJbs052385@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r336757 - in head: share/man/man4 share/man/man7 share/misc sys/dev/firewire sys/dev/hwpmc sys/dev/sk sys/dev/sound/pci sys/dev/sound/pcm sys/fs/nfsclient In-Reply-To: To: cem@freebsd.org Date: Fri, 27 Jul 2018 12:12:19 -0700 (PDT) CC: Eitan Adler , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-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: Fri, 27 Jul 2018 19:12:31 -0000 > This may intersect badly with our current policy of not shipping any > CAs in base. I objected to the conversion of http -> https in base when it started. I saw no good reason for it, and for the very reason you site, https is totally useless in base until you have installed CA's. Fetch is in base and works fine with http:, now falls over if you cut and paste any of these until you manually convert them back to http: > > Best, > Conrad > > On Fri, Jul 27, 2018 at 3:40 AM, Eitan Adler wrote: > > Author: eadler > > Date: Fri Jul 27 10:40:48 2018 > > New Revision: 336757 > > URL: https://svnweb.freebsd.org/changeset/base/336757 > > > > Log: > > Use https over http for FreeBSD pages > > > > Modified: > > head/share/man/man4/firewire.4 > > head/share/man/man7/tests.7 > > head/share/misc/bsd-family-tree > > head/sys/dev/firewire/00README > > head/sys/dev/hwpmc/pmc_events.h > > head/sys/dev/sk/if_sk.c > > head/sys/dev/sound/pci/maestro3.c > > head/sys/dev/sound/pcm/dsp.c > > head/sys/fs/nfsclient/nfs_clstate.c > > > > Modified: head/share/man/man4/firewire.4 > > ============================================================================== > > --- head/share/man/man4/firewire.4 Fri Jul 27 07:05:50 2018 (r336756) > > +++ head/share/man/man4/firewire.4 Fri Jul 27 10:40:48 2018 (r336757) > > @@ -87,7 +87,7 @@ Debugging over the firewire interace is possible with > > .Xr dcons 4 > > driver. > > Please see > > -.Pa http://wiki.freebsd.org/DebugWithDcons > > +.Pa https://wiki.freebsd.org/DebugWithDcons > > for details on how to setup debugging with firewire. > > .Sh FILES > > .Bl -tag -width "Pa /dev/fwmem0.0" -compact > > > > Modified: head/share/man/man7/tests.7 > > ============================================================================== > > --- head/share/man/man7/tests.7 Fri Jul 27 07:05:50 2018 (r336756) > > +++ head/share/man/man7/tests.7 Fri Jul 27 10:40:48 2018 (r336757) > > @@ -198,7 +198,7 @@ problem report. > > For more details please refer to: > > .Bl -bullet -offset indent -compact > > .It > > -.Lk http://lists.freebsd.org/ "FreeBSD Mailing Lists" > > +.Lk https://lists.freebsd.org/ "FreeBSD Mailing Lists" > > .It > > .Lk https://www.freebsd.org/support.html "Problem Reporting" > > .El > > > > Modified: head/share/misc/bsd-family-tree > > ============================================================================== > > --- head/share/misc/bsd-family-tree Fri Jul 27 07:05:50 2018 (r336756) > > +++ head/share/misc/bsd-family-tree Fri Jul 27 10:40:48 2018 (r336757) > > @@ -814,6 +814,6 @@ Steven M. Schultz for providing 2.8BSD, 2.10BSD, 2.11B > > > > -- > > Copyright (c) 1997-2012 Wolfram Schneider > > -URL: http://svnweb.freebsd.org/base/head/share/misc/bsd-family-tree > > +URL: https://svnweb.freebsd.org/base/head/share/misc/bsd-family-tree > > > > $FreeBSD$ > > > > Modified: head/sys/dev/firewire/00README > > ============================================================================== > > --- head/sys/dev/firewire/00README Fri Jul 27 07:05:50 2018 (r336756) > > +++ head/sys/dev/firewire/00README Fri Jul 27 10:40:48 2018 (r336757) > > @@ -9,7 +9,7 @@ IEEE 1394 support for FreeBSD-5.X and 4.X. > > modified by Hidetoshi Shimokawa . > > Please note this driver is still under development. > > You can find latest snapshots under: > > - http://people.freebsd.org/~simokawa/ > > + https://people.freebsd.org/~simokawa/ > > named firewire-2002XXXX.tar.gz > > > > The driver consists of 6 parts: > > > > Modified: head/sys/dev/hwpmc/pmc_events.h > > ============================================================================== > > --- head/sys/dev/hwpmc/pmc_events.h Fri Jul 27 07:05:50 2018 (r336756) > > +++ head/sys/dev/hwpmc/pmc_events.h Fri Jul 27 10:40:48 2018 (r336757) > > @@ -36,7 +36,7 @@ > > * the source tree at src/share/doc/papers/hwpmc/hwpmc.ms > > * as well as on-line at: > > * > > - * http://wiki.freebsd.org/PmcTools/PmcHardwareHowTo > > + * https://wiki.freebsd.org/PmcTools/PmcHardwareHowTo > > * > > * Please refer to those resources before you attempt to modify > > * this file or the hwpmc driver/subsystem. > > > > Modified: head/sys/dev/sk/if_sk.c > > ============================================================================== > > --- head/sys/dev/sk/if_sk.c Fri Jul 27 07:05:50 2018 (r336756) > > +++ head/sys/dev/sk/if_sk.c Fri Jul 27 10:40:48 2018 (r336757) > > @@ -64,7 +64,7 @@ __FBSDID("$FreeBSD$"); > > * XMAC II datasheet online. I have put my copy at people.freebsd.org as a > > * convenience to others until Vitesse corrects this problem: > > * > > - * http://people.freebsd.org/~wpaul/SysKonnect/xmacii_datasheet_rev_c_9-29.pdf > > + * https://people.freebsd.org/~wpaul/SysKonnect/xmacii_datasheet_rev_c_9-29.pdf > > * > > * Written by Bill Paul > > * Department of Electrical Engineering > > > > Modified: head/sys/dev/sound/pci/maestro3.c > > ============================================================================== > > --- head/sys/dev/sound/pci/maestro3.c Fri Jul 27 07:05:50 2018 (r336756) > > +++ head/sys/dev/sound/pci/maestro3.c Fri Jul 27 10:40:48 2018 (r336757) > > @@ -45,7 +45,7 @@ > > * , http://www.zabbo.net/maestro3 > > * > > * Cameron Grant created the pcm framework used here nearly verbatim. > > - * , http://people.freebsd.org/~cg/template.c > > + * , https://people.freebsd.org/~cg/template.c > > * > > * Taku YAMAMOTO for his Maestro-1/2 FreeBSD driver and sanity reference. > > * > > > > Modified: head/sys/dev/sound/pcm/dsp.c > > ============================================================================== > > --- head/sys/dev/sound/pcm/dsp.c Fri Jul 27 07:05:50 2018 (r336756) > > +++ head/sys/dev/sound/pcm/dsp.c Fri Jul 27 10:40:48 2018 (r336757) > > @@ -2222,7 +2222,7 @@ dsp_mmap_single(struct cdev *i_dev, vm_ooffset_t *offs > > * Unfortunately, we have to give up this one due to linux_mmap > > * changes. > > * > > - * http://lists.freebsd.org/pipermail/freebsd-emulation/2007-June/003698.html > > + * https://lists.freebsd.org/pipermail/freebsd-emulation/2007-June/003698.html > > * > > */ > > #ifdef SV_ABI_LINUX > > > > Modified: head/sys/fs/nfsclient/nfs_clstate.c > > ============================================================================== > > --- head/sys/fs/nfsclient/nfs_clstate.c Fri Jul 27 07:05:50 2018 (r336756) > > +++ head/sys/fs/nfsclient/nfs_clstate.c Fri Jul 27 10:40:48 2018 (r336757) > > @@ -1890,8 +1890,7 @@ nfscl_umount(struct nfsmount *nmp, NFSPROC_T *p) > > * mutex for NFSLOCKCLSTATE(), so it is "m" for the following > > * explanation, courtesy of Alan Cox. > > * What follows is a snippet from Alan Cox's email at: > > - * http://docs.FreeBSD.org/cgi/ > > - * mid.cgi?BANLkTikR3d65zPHo9==08ZfJ2vmqZucEvw > > + * https://docs.FreeBSD.org/cgi/mid.cgi?BANLkTikR3d65zPHo9==08ZfJ2vmqZucEvw > > * > > * 1. Set MNTK_UNMOUNTF > > * 2. Acquire a standard FreeBSD mutex "m". > > > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Fri Jul 27 19:25: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 019BE105475A; Fri, 27 Jul 2018 19:25:11 +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 A08DD84047; Fri, 27 Jul 2018 19:25: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 783AF1C10B; Fri, 27 Jul 2018 19:25: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 w6RJPASZ046102; Fri, 27 Jul 2018 19:25:10 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RJPA4Q046101; Fri, 27 Jul 2018 19:25:10 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807271925.w6RJPA4Q046101@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 27 Jul 2018 19:25:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336776 - head/release/arm X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/release/arm X-SVN-Commit-Revision: 336776 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: Fri, 27 Jul 2018 19:25:11 -0000 Author: imp Date: Fri Jul 27 19:25:09 2018 New Revision: 336776 URL: https://svnweb.freebsd.org/changeset/base/336776 Log: Remove the hopelessly confused GUMSTIX.conf config This config never worked. At no time did u-boot match the kenrel match the userland. As all the GUMSTIX gear we support is quite old and/or not working, remove it. The duovero stuff might work, but nobody has the hardware for it and GUMSTIX hasn't sold it in years. Deleted: head/release/arm/GUMSTIX.conf From owner-svn-src-head@freebsd.org Fri Jul 27 19:38: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 C70181054AF9; Fri, 27 Jul 2018 19:38:52 +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 1963184782; Fri, 27 Jul 2018 19:38:51 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id w6RJci1O072128 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 27 Jul 2018 22:38:47 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w6RJci1O072128 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w6RJcica072127; Fri, 27 Jul 2018 22:38:44 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 27 Jul 2018 22:38:44 +0300 From: Konstantin Belousov To: Ian Lepore Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336746 - in head/lib: libc/gen libutil Message-ID: <20180727193844.GD2489@kib.kiev.ua> References: <201807261834.w6QIYc9i080738@repo.freebsd.org> <20180727150304.GA2489@kib.kiev.ua> <1532705741.61594.53.camel@freebsd.org> <20180727154359.GB2489@kib.kiev.ua> <1532707631.61594.66.camel@freebsd.org> <20180727164437.GC2489@kib.kiev.ua> <1532717874.61594.79.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1532717874.61594.79.camel@freebsd.org> User-Agent: Mutt/1.10.1 (2018-07-13) 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.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: Fri, 27 Jul 2018 19:38:53 -0000 On Fri, Jul 27, 2018 at 12:57:54PM -0600, Ian Lepore wrote: > Yes, this is exactly what I think we should do after your description > of howšFBSDprivate_1.0 exists specifically to solve some interactions > between rtld, libc, and libthr. Great. > > This is what I meant when I said in one of the earlier emails: > > > I also noticed that chpass(1) and pwd_mkdb(8)_both directly compile in > > their own copy of the pw_scan.c source using .PATH in their makefiles. > > I wonder if doing that as the way of sharing the code between libc and > > libutil would be a better thing to do? (And presumably that would > > remove the need to have entries in the FBSDprivate_1.0 list?) > > So if we do that, are there any special considerations about removing > the __pw_scan entry (and now __pw_initpwd as well) from the private > list? Or can they just be deleted without needing to do anything else? > Does anything need to be done to make the __pw_scan symbol not directly > visible for linking to resolve external references? Remove them. FBSDprivate_1.0 is private and is guaranteed to be ABI-unstable. There is nothing to do to prevent linking against these symbols. If somebody decides to check if she inadvertently did that, it is enough to see if the FBSDprivate_1.0 namespace is referenced by the linked object, e.g. by 'readelf -V object' and see versions needed. From owner-svn-src-head@freebsd.org Fri Jul 27 19:47: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 CB1C91054DE3; Fri, 27 Jul 2018 19:47:43 +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 8153584CE7; Fri, 27 Jul 2018 19:47:43 +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 63D4A1C44D; Fri, 27 Jul 2018 19:47:43 +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 w6RJlhY7056608; Fri, 27 Jul 2018 19:47:43 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RJlgYt056605; Fri, 27 Jul 2018 19:47:42 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201807271947.w6RJlgYt056605@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 27 Jul 2018 19:47:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336779 - in head/lib: libc/gen libutil X-SVN-Group: head X-SVN-Commit-Author: ian X-SVN-Commit-Paths: in head/lib: libc/gen libutil X-SVN-Commit-Revision: 336779 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: Fri, 27 Jul 2018 19:47:44 -0000 Author: ian Date: Fri Jul 27 19:47:42 2018 New Revision: 336779 URL: https://svnweb.freebsd.org/changeset/base/336779 Log: Stop exporting __pw_scan and __pw_initpwd as freebsd-private libc functions for use in libutil, and instead compile the small amount of common code directly into libutil with a .PATH reachover. Discussed with: kib@ Modified: head/lib/libc/gen/Symbol.map head/lib/libutil/Makefile Modified: head/lib/libc/gen/Symbol.map ============================================================================== --- head/lib/libc/gen/Symbol.map Fri Jul 27 19:31:58 2018 (r336778) +++ head/lib/libc/gen/Symbol.map Fri Jul 27 19:47:42 2018 (r336779) @@ -510,8 +510,6 @@ FBSDprivate_1.0 { __opendir2; __pause; _pause; - __pw_initpwd; /* Used by (at least) libutil */ - __pw_scan; /* Used by (at least) libutil */ __raise; _raise; __sleep; Modified: head/lib/libutil/Makefile ============================================================================== --- head/lib/libutil/Makefile Fri Jul 27 19:31:58 2018 (r336778) +++ head/lib/libutil/Makefile Fri Jul 27 19:47:42 2018 (r336779) @@ -6,6 +6,8 @@ SHLIBDIR?= /lib .include +.PATH: ${SRCTOP}/lib/libc/gen # for pw_scan.c + LIB= util SHLIB_MAJOR= 9 @@ -15,8 +17,8 @@ SRCS= _secure_path.c auth.c expand_number.c flopen.c f kinfo_getvmobject.c kld.c \ login_auth.c login_cap.c \ login_class.c login_crypt.c login_ok.c login_times.c login_tty.c \ - pidfile.c property.c pty.c pw_util.c quotafile.c realhostname.c \ - stub.c trimdomain.c uucplock.c + pidfile.c property.c pty.c pw_scan.c pw_util.c quotafile.c \ + realhostname.c stub.c trimdomain.c uucplock.c INCS= libutil.h login_cap.h CFLAGS+= -DNO__SCCSID From owner-svn-src-head@freebsd.org Fri Jul 27 20:07: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 2FD86105538E; Fri, 27 Jul 2018 20:07:41 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CEC19857D7; Fri, 27 Jul 2018 20:07:40 +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 A53EB1C770; Fri, 27 Jul 2018 20:07:40 +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 w6RK7eBm066543; Fri, 27 Jul 2018 20:07:40 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RK7eO1066542; Fri, 27 Jul 2018 20:07:40 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807272007.w6RK7eO1066542@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 27 Jul 2018 20:07:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336780 - head/share/man/man4/man4.arm X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/man/man4/man4.arm X-SVN-Commit-Revision: 336780 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: Fri, 27 Jul 2018 20:07:41 -0000 Author: imp Date: Fri Jul 27 20:07:40 2018 New Revision: 336780 URL: https://svnweb.freebsd.org/changeset/base/336780 Log: Forgot to delete the link as well for npe. Modified: head/share/man/man4/man4.arm/Makefile Modified: head/share/man/man4/man4.arm/Makefile ============================================================================== --- head/share/man/man4/man4.arm/Makefile Fri Jul 27 19:47:42 2018 (r336779) +++ head/share/man/man4/man4.arm/Makefile Fri Jul 27 20:07:40 2018 (r336780) @@ -21,7 +21,6 @@ MAN= \ MLINKS= cgem.4 if_cgem.4 MLINKS+= imx_wdog.4 imxwdt.4 MLINKS+= mge.4 if_mge.4 -MLINKS+=npe.4 if_npe.4 MANSUBDIR=/arm From owner-svn-src-head@freebsd.org Fri Jul 27 20:14: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 5A1CE105559C; Fri, 27 Jul 2018 20:14:59 +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 EF84185C2F; Fri, 27 Jul 2018 20:14:58 +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 D0EF21C901; Fri, 27 Jul 2018 20:14:58 +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 w6RKEwdY071680; Fri, 27 Jul 2018 20:14:58 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RKEwAp071679; Fri, 27 Jul 2018 20:14:58 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201807272014.w6RKEwAp071679@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Fri, 27 Jul 2018 20:14:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336781 - head/tests/sys/kqueue/libkqueue X-SVN-Group: head X-SVN-Commit-Author: dab X-SVN-Commit-Paths: head/tests/sys/kqueue/libkqueue X-SVN-Commit-Revision: 336781 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: Fri, 27 Jul 2018 20:14:59 -0000 Author: dab Date: Fri Jul 27 20:14:58 2018 New Revision: 336781 URL: https://svnweb.freebsd.org/changeset/base/336781 Log: Fix compilation error on some arches after r336761. A cast for printing an intmax_t was needed in a kqueue test for some arches. MFC after: 1 week X-MFC-with: r336761 Sponsored by: Dell EMC Modified: head/tests/sys/kqueue/libkqueue/timer.c Modified: head/tests/sys/kqueue/libkqueue/timer.c ============================================================================== --- head/tests/sys/kqueue/libkqueue/timer.c Fri Jul 27 20:07:40 2018 (r336780) +++ head/tests/sys/kqueue/libkqueue/timer.c Fri Jul 27 20:14:58 2018 (r336781) @@ -239,7 +239,7 @@ test_abstime(void) kev.fflags = 0; kevent_cmp(&kev, kevent_get(kqfd)); if (time(NULL) < when + timeout) - err(1, "too early %jd %jd", time(NULL), when + timeout); + err(1, "too early %jd %jd", time(NULL), (intmax_t)(when + timeout)); /* Check if the event occurs again */ sleep(3); From owner-svn-src-head@freebsd.org Fri Jul 27 20:34: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 A497A1055DD7; Fri, 27 Jul 2018 20:34:16 +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 5B4B886814; Fri, 27 Jul 2018 20:34:16 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3C5531CC49; Fri, 27 Jul 2018 20:34:16 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6RKYGZF082034; Fri, 27 Jul 2018 20:34:16 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RKYGAq082033; Fri, 27 Jul 2018 20:34:16 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201807272034.w6RKYGAq082033@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 27 Jul 2018 20:34:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336782 - head/lib/libproc/tests X-SVN-Group: head X-SVN-Commit-Author: markj X-SVN-Commit-Paths: head/lib/libproc/tests X-SVN-Commit-Revision: 336782 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: Fri, 27 Jul 2018 20:34:16 -0000 Author: markj Date: Fri Jul 27 20:34:15 2018 New Revision: 336782 URL: https://svnweb.freebsd.org/changeset/base/336782 Log: Detach from the child process before completing the test. Otherwise the child will receive SIGTRAP if the parent exits first. Modified: head/lib/libproc/tests/proc_test.c Modified: head/lib/libproc/tests/proc_test.c ============================================================================== --- head/lib/libproc/tests/proc_test.c Fri Jul 27 20:14:58 2018 (r336781) +++ head/lib/libproc/tests/proc_test.c Fri Jul 27 20:34:15 2018 (r336782) @@ -183,7 +183,7 @@ ATF_TC_BODY(map_alias_name2map, tc) ATF_CHECK_EQ_MSG(proc_continue(phdl), 0, "failed to resume execution"); - proc_free(phdl); + proc_detach(phdl, 0); } ATF_TC(map_prefix_name2map); @@ -212,7 +212,7 @@ ATF_TC_BODY(map_prefix_name2map, tc) ATF_CHECK_EQ_MSG(proc_continue(phdl), 0, "failed to resume execution"); - proc_free(phdl); + proc_detach(phdl, 0); } ATF_TC(map_alias_name2sym); @@ -251,7 +251,7 @@ ATF_TC_BODY(map_alias_name2sym, tc) ATF_CHECK_EQ_MSG(proc_continue(phdl), 0, "failed to resume execution"); - proc_free(phdl); + proc_detach(phdl, 0); } ATF_TC(symbol_lookup); @@ -291,7 +291,7 @@ ATF_TC_BODY(symbol_lookup, tc) ATF_CHECK_EQ_MSG(proc_continue(phdl), 0, "failed to resume execution"); - proc_free(phdl); + proc_detach(phdl, 0); } ATF_TC(symbol_lookup_fail); @@ -328,7 +328,7 @@ ATF_TC_BODY(symbol_lookup_fail, tc) ATF_CHECK_EQ_MSG(proc_continue(phdl), 0, "failed to resume execution"); - proc_free(phdl); + proc_detach(phdl, 0); } ATF_TC(signal_forward); @@ -369,7 +369,7 @@ ATF_TC_BODY(signal_forward, tc) ATF_REQUIRE(WIFEXITED(status)); ATF_REQUIRE_EQ(WEXITSTATUS(status), 0); - proc_free(phdl); + proc_detach(phdl, 0); } ATF_TC(symbol_sort_local); @@ -400,6 +400,8 @@ ATF_TC_BODY(symbol_sort_local, tc) ATF_REQUIRE_MSG(strcmp(symname, "baz") == 0, "unexpected symbol name '%s'", symname); ATF_REQUIRE(GELF_ST_BIND(bar_sym.st_info) == STB_GLOBAL); + + proc_detach(phdl, 0); } ATF_TC(symbol_sort_prefix); @@ -428,6 +430,8 @@ ATF_TC_BODY(symbol_sort_prefix, tc) ATF_REQUIRE_MSG(strcmp(symname, "qux") == 0, "unexpected symbol name '%s'", symname); + + proc_detach(phdl, 0); } ATF_TC(symbol_sort_underscore); @@ -457,6 +461,8 @@ ATF_TC_BODY(symbol_sort_underscore, tc) ATF_REQUIRE_MSG(strcmp(symname, "foo") == 0, "unexpected symbol name '%s'", symname); + + proc_detach(phdl, 0); } ATF_TP_ADD_TCS(tp) From owner-svn-src-head@freebsd.org Fri Jul 27 20: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 8A4B210561AF for ; Fri, 27 Jul 2018 20:39:50 +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 07ED486C89 for ; Fri, 27 Jul 2018 20:39:49 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: 32cbc4af-91dd-11e8-904b-1d2e466b3c59 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 32cbc4af-91dd-11e8-904b-1d2e466b3c59; Fri, 27 Jul 2018 20:39:46 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w6RKdjT0024784; Fri, 27 Jul 2018 14:39:45 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1532723985.61594.88.camel@freebsd.org> Subject: Re: svn commit: r336781 - head/tests/sys/kqueue/libkqueue From: Ian Lepore To: David Bright , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Fri, 27 Jul 2018 14:39:45 -0600 In-Reply-To: <201807272014.w6RKEwAp071679@repo.freebsd.org> References: <201807272014.w6RKEwAp071679@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.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: Fri, 27 Jul 2018 20:39:50 -0000 On Fri, 2018-07-27 at 20:14 +0000, David Bright wrote: > Author: dab > Date: Fri Jul 27 20:14:58 2018 > New Revision: 336781 > URL: https://svnweb.freebsd.org/changeset/base/336781 > > Log: >   Fix compilation error on some arches after r336761. >    >   A cast for printing an intmax_t was needed in a kqueue test for > some >   arches. >    >   MFC after: 1 week >   X-MFC-with: r336761 >   Sponsored by: Dell EMC > > Modified: >   head/tests/sys/kqueue/libkqueue/timer.c > > Modified: head/tests/sys/kqueue/libkqueue/timer.c > ===================================================================== > ========= > --- head/tests/sys/kqueue/libkqueue/timer.c Fri Jul 27 > 20:07:40 2018 (r336780) > +++ head/tests/sys/kqueue/libkqueue/timer.c Fri Jul 27 > 20:14:58 2018 (r336781) > @@ -239,7 +239,7 @@ test_abstime(void) >      kev.fflags = 0; >      kevent_cmp(&kev, kevent_get(kqfd)); >      if (time(NULL) < when + timeout) > - err(1, "too early %jd %jd", time(NULL), when + timeout); > +     err(1, "too early %jd %jd", time(NULL), (intmax_t)(when > + timeout)); >   You also need to cast the return value from time(NULL), it's a time_t as well. Unrelated: time(NULL) is used twice; if control takes the true branch of the if, then the process gets preempted before doing the second time(NULL) call, enough time could elapse that the printed results will be pretty confusing because it will be after when+timeout by then. -- Ian >      /* Check if the event occurs again */ >      sleep(3); > From owner-svn-src-head@freebsd.org Fri Jul 27 21:25: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 4A6361057540; Fri, 27 Jul 2018 21:25: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 F275389546; Fri, 27 Jul 2018 21:25:01 +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 CF6DB1D465; Fri, 27 Jul 2018 21:25:01 +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 w6RLP1CR008456; Fri, 27 Jul 2018 21:25:01 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RLP1p7008453; Fri, 27 Jul 2018 21:25:01 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807272125.w6RLP1p7008453@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 27 Jul 2018 21:25:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336783 - in head: lib/libc/arm/string lib/libpmc share/man/man4/man4.arm share/mk sys/arm/arm sys/arm/conf sys/arm/include sys/arm/xscale sys/arm/xscale/i8134x sys/arm/xscale/pxa sys/c... X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: lib/libc/arm/string lib/libpmc share/man/man4/man4.arm share/mk sys/arm/arm sys/arm/conf sys/arm/include sys/arm/xscale sys/arm/xscale/i8134x sys/arm/xscale/pxa sys/conf sys/dev/hwpmc sys/sys X-SVN-Commit-Revision: 336783 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: Fri, 27 Jul 2018 21:25:02 -0000 Author: imp Date: Fri Jul 27 21:25:01 2018 New Revision: 336783 URL: https://svnweb.freebsd.org/changeset/base/336783 Log: Revert r336773: it removed too much. r336773 removed all things xscale. However, some things xscale are really armv5. Revert that entirely. A more modest removal will follow. Noticed by: andrew@ Added: head/lib/libc/arm/string/memcpy_xscale.S (contents, props changed) head/lib/libpmc/pmc.xscale.3 (contents, props changed) head/share/man/man4/man4.arm/npe.4 (contents, props changed) head/sys/arm/arm/bcopyinout_xscale.S (contents, props changed) head/sys/arm/arm/cpufunc_asm_xscale.S (contents, props changed) head/sys/arm/arm/cpufunc_asm_xscale_c3.S (contents, props changed) head/sys/arm/conf/CRB (contents, props changed) head/sys/arm/conf/GUMSTIX (contents, props changed) head/sys/arm/conf/GUMSTIX-QEMU (contents, props changed) head/sys/arm/conf/GUMSTIX.hints (contents, props changed) head/sys/arm/xscale/ head/sys/arm/xscale/i8134x/ head/sys/arm/xscale/i8134x/crb_machdep.c (contents, props changed) head/sys/arm/xscale/i8134x/files.crb (contents, props changed) head/sys/arm/xscale/i8134x/files.i81342 (contents, props changed) head/sys/arm/xscale/i8134x/i80321_timer.c (contents, props changed) head/sys/arm/xscale/i8134x/i80321_wdog.c (contents, props changed) head/sys/arm/xscale/i8134x/i80321reg.h (contents, props changed) head/sys/arm/xscale/i8134x/i80321var.h (contents, props changed) head/sys/arm/xscale/i8134x/i81342.c (contents, props changed) head/sys/arm/xscale/i8134x/i81342_mcu.c (contents, props changed) head/sys/arm/xscale/i8134x/i81342_pci.c (contents, props changed) head/sys/arm/xscale/i8134x/i81342_space.c (contents, props changed) head/sys/arm/xscale/i8134x/i81342reg.h (contents, props changed) head/sys/arm/xscale/i8134x/i81342var.h (contents, props changed) head/sys/arm/xscale/i8134x/iq81342_7seg.c (contents, props changed) head/sys/arm/xscale/i8134x/iq81342reg.h (contents, props changed) head/sys/arm/xscale/i8134x/iq81342var.h (contents, props changed) head/sys/arm/xscale/i8134x/obio.c (contents, props changed) head/sys/arm/xscale/i8134x/obiovar.h (contents, props changed) head/sys/arm/xscale/i8134x/std.crb (contents, props changed) head/sys/arm/xscale/i8134x/std.i81342 (contents, props changed) head/sys/arm/xscale/i8134x/uart_bus_i81342.c (contents, props changed) head/sys/arm/xscale/i8134x/uart_cpu_i81342.c (contents, props changed) head/sys/arm/xscale/pxa/ head/sys/arm/xscale/pxa/files.pxa (contents, props changed) head/sys/arm/xscale/pxa/if_smc_smi.c (contents, props changed) head/sys/arm/xscale/pxa/pxa_gpio.c (contents, props changed) head/sys/arm/xscale/pxa/pxa_icu.c (contents, props changed) head/sys/arm/xscale/pxa/pxa_machdep.c (contents, props changed) head/sys/arm/xscale/pxa/pxa_obio.c (contents, props changed) head/sys/arm/xscale/pxa/pxa_smi.c (contents, props changed) head/sys/arm/xscale/pxa/pxa_space.c (contents, props changed) head/sys/arm/xscale/pxa/pxa_timer.c (contents, props changed) head/sys/arm/xscale/pxa/pxareg.h (contents, props changed) head/sys/arm/xscale/pxa/pxavar.h (contents, props changed) head/sys/arm/xscale/pxa/std.pxa (contents, props changed) head/sys/arm/xscale/pxa/uart_bus_pxa.c (contents, props changed) head/sys/arm/xscale/pxa/uart_cpu_pxa.c (contents, props changed) head/sys/arm/xscale/std.xscale (contents, props changed) head/sys/dev/hwpmc/hwpmc_xscale.h (contents, props changed) Modified: head/lib/libc/arm/string/memcpy.S head/lib/libpmc/Makefile head/lib/libpmc/libpmc.c head/lib/libpmc/pmc.3 head/share/man/man4/man4.arm/Makefile head/share/mk/bsd.cpu.mk head/sys/arm/arm/bcopyinout.S head/sys/arm/arm/cpufunc.c head/sys/arm/arm/dump_machdep.c head/sys/arm/arm/elf_trampoline.c head/sys/arm/arm/exception.S head/sys/arm/arm/identcpu-v4.c head/sys/arm/arm/pmap-v4.c head/sys/arm/arm/trap-v4.c head/sys/arm/arm/vm_machdep.c head/sys/arm/conf/NOTES head/sys/arm/include/armreg.h head/sys/arm/include/cpu-v4.h head/sys/arm/include/cpufunc.h head/sys/arm/include/intr.h head/sys/arm/include/md_var.h head/sys/arm/include/pmap-v4.h head/sys/arm/include/pmc_mdep.h head/sys/arm/include/pte-v4.h head/sys/conf/Makefile.arm head/sys/conf/files.arm head/sys/conf/options.arm head/sys/dev/hwpmc/pmc_events.h head/sys/sys/pmc.h Modified: head/lib/libc/arm/string/memcpy.S ============================================================================== --- head/lib/libc/arm/string/memcpy.S Fri Jul 27 20:34:15 2018 (r336782) +++ head/lib/libc/arm/string/memcpy.S Fri Jul 27 21:25:01 2018 (r336783) @@ -2,4 +2,8 @@ #include __FBSDID("$FreeBSD$"); +#if !defined(_ARM_ARCH_5E) || defined(_STANDALONE) #include "memcpy_arm.S" +#else +#include "memcpy_xscale.S" +#endif Added: head/lib/libc/arm/string/memcpy_xscale.S ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/arm/string/memcpy_xscale.S Fri Jul 27 21:25:01 2018 (r336783) @@ -0,0 +1,1788 @@ +/* $NetBSD: memcpy_xscale.S,v 1.1 2003/10/14 07:51:45 scw Exp $ */ + +/* + * Copyright 2003 Wasabi Systems, Inc. + * All rights reserved. + * + * Written by Steve C. Woodford for Wasabi Systems, 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. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed for the NetBSD Project by + * Wasabi Systems, Inc. + * 4. The name of Wasabi Systems, Inc. may not be used to endorse + * or promote products derived from this software without specific prior + * written permission. + * + * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``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 WASABI SYSTEMS, INC + * 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$"); + +.syntax unified + +/* LINTSTUB: Func: void *memcpy(void *dst, const void *src, size_t len) */ +ENTRY(memcpy) + pld [r1] + cmp r2, #0x0c + ble .Lmemcpy_short /* <= 12 bytes */ + mov r3, r0 /* We must not clobber r0 */ + + /* Word-align the destination buffer */ + ands ip, r3, #0x03 /* Already word aligned? */ + beq .Lmemcpy_wordaligned /* Yup */ + cmp ip, #0x02 + ldrb ip, [r1], #0x01 + sub r2, r2, #0x01 + strb ip, [r3], #0x01 + ldrble ip, [r1], #0x01 + suble r2, r2, #0x01 + strble ip, [r3], #0x01 + ldrblt ip, [r1], #0x01 + sublt r2, r2, #0x01 + strblt ip, [r3], #0x01 + + /* Destination buffer is now word aligned */ +.Lmemcpy_wordaligned: + ands ip, r1, #0x03 /* Is src also word-aligned? */ + bne .Lmemcpy_bad_align /* Nope. Things just got bad */ + + /* Quad-align the destination buffer */ + tst r3, #0x07 /* Already quad aligned? */ + ldrne ip, [r1], #0x04 + stmfd sp!, {r4-r9} /* Free up some registers */ + subne r2, r2, #0x04 + strne ip, [r3], #0x04 + + /* Destination buffer quad aligned, source is at least word aligned */ + subs r2, r2, #0x80 + blt .Lmemcpy_w_lessthan128 + + /* Copy 128 bytes at a time */ +.Lmemcpy_w_loop128: + ldr r4, [r1], #0x04 /* LD:00-03 */ + ldr r5, [r1], #0x04 /* LD:04-07 */ + pld [r1, #0x18] /* Prefetch 0x20 */ + ldr r6, [r1], #0x04 /* LD:08-0b */ + ldr r7, [r1], #0x04 /* LD:0c-0f */ + ldr r8, [r1], #0x04 /* LD:10-13 */ + ldr r9, [r1], #0x04 /* LD:14-17 */ + strd r4, [r3], #0x08 /* ST:00-07 */ + ldr r4, [r1], #0x04 /* LD:18-1b */ + ldr r5, [r1], #0x04 /* LD:1c-1f */ + strd r6, [r3], #0x08 /* ST:08-0f */ + ldr r6, [r1], #0x04 /* LD:20-23 */ + ldr r7, [r1], #0x04 /* LD:24-27 */ + pld [r1, #0x18] /* Prefetch 0x40 */ + strd r8, [r3], #0x08 /* ST:10-17 */ + ldr r8, [r1], #0x04 /* LD:28-2b */ + ldr r9, [r1], #0x04 /* LD:2c-2f */ + strd r4, [r3], #0x08 /* ST:18-1f */ + ldr r4, [r1], #0x04 /* LD:30-33 */ + ldr r5, [r1], #0x04 /* LD:34-37 */ + strd r6, [r3], #0x08 /* ST:20-27 */ + ldr r6, [r1], #0x04 /* LD:38-3b */ + ldr r7, [r1], #0x04 /* LD:3c-3f */ + strd r8, [r3], #0x08 /* ST:28-2f */ + ldr r8, [r1], #0x04 /* LD:40-43 */ + ldr r9, [r1], #0x04 /* LD:44-47 */ + pld [r1, #0x18] /* Prefetch 0x60 */ + strd r4, [r3], #0x08 /* ST:30-37 */ + ldr r4, [r1], #0x04 /* LD:48-4b */ + ldr r5, [r1], #0x04 /* LD:4c-4f */ + strd r6, [r3], #0x08 /* ST:38-3f */ + ldr r6, [r1], #0x04 /* LD:50-53 */ + ldr r7, [r1], #0x04 /* LD:54-57 */ + strd r8, [r3], #0x08 /* ST:40-47 */ + ldr r8, [r1], #0x04 /* LD:58-5b */ + ldr r9, [r1], #0x04 /* LD:5c-5f */ + strd r4, [r3], #0x08 /* ST:48-4f */ + ldr r4, [r1], #0x04 /* LD:60-63 */ + ldr r5, [r1], #0x04 /* LD:64-67 */ + pld [r1, #0x18] /* Prefetch 0x80 */ + strd r6, [r3], #0x08 /* ST:50-57 */ + ldr r6, [r1], #0x04 /* LD:68-6b */ + ldr r7, [r1], #0x04 /* LD:6c-6f */ + strd r8, [r3], #0x08 /* ST:58-5f */ + ldr r8, [r1], #0x04 /* LD:70-73 */ + ldr r9, [r1], #0x04 /* LD:74-77 */ + strd r4, [r3], #0x08 /* ST:60-67 */ + ldr r4, [r1], #0x04 /* LD:78-7b */ + ldr r5, [r1], #0x04 /* LD:7c-7f */ + strd r6, [r3], #0x08 /* ST:68-6f */ + strd r8, [r3], #0x08 /* ST:70-77 */ + subs r2, r2, #0x80 + strd r4, [r3], #0x08 /* ST:78-7f */ + bge .Lmemcpy_w_loop128 + +.Lmemcpy_w_lessthan128: + adds r2, r2, #0x80 /* Adjust for extra sub */ + ldmfdeq sp!, {r4-r9} + bxeq lr /* Return now if done */ + subs r2, r2, #0x20 + blt .Lmemcpy_w_lessthan32 + + /* Copy 32 bytes at a time */ +.Lmemcpy_w_loop32: + ldr r4, [r1], #0x04 + ldr r5, [r1], #0x04 + pld [r1, #0x18] + ldr r6, [r1], #0x04 + ldr r7, [r1], #0x04 + ldr r8, [r1], #0x04 + ldr r9, [r1], #0x04 + strd r4, [r3], #0x08 + ldr r4, [r1], #0x04 + ldr r5, [r1], #0x04 + strd r6, [r3], #0x08 + strd r8, [r3], #0x08 + subs r2, r2, #0x20 + strd r4, [r3], #0x08 + bge .Lmemcpy_w_loop32 + +.Lmemcpy_w_lessthan32: + adds r2, r2, #0x20 /* Adjust for extra sub */ + ldmfdeq sp!, {r4-r9} + bxeq lr /* Return now if done */ + + and r4, r2, #0x18 + rsbs r4, r4, #0x18 + addne pc, pc, r4, lsl #1 + nop + + /* At least 24 bytes remaining */ + ldr r4, [r1], #0x04 + ldr r5, [r1], #0x04 + sub r2, r2, #0x08 + strd r4, [r3], #0x08 + + /* At least 16 bytes remaining */ + ldr r4, [r1], #0x04 + ldr r5, [r1], #0x04 + sub r2, r2, #0x08 + strd r4, [r3], #0x08 + + /* At least 8 bytes remaining */ + ldr r4, [r1], #0x04 + ldr r5, [r1], #0x04 + subs r2, r2, #0x08 + strd r4, [r3], #0x08 + + /* Less than 8 bytes remaining */ + ldmfd sp!, {r4-r9} + bxeq lr /* Return now if done */ + subs r2, r2, #0x04 + ldrge ip, [r1], #0x04 + strge ip, [r3], #0x04 + bxeq lr /* Return now if done */ + addlt r2, r2, #0x04 + ldrb ip, [r1], #0x01 + cmp r2, #0x02 + ldrbge r2, [r1], #0x01 + strb ip, [r3], #0x01 + ldrbgt ip, [r1] + strbge r2, [r3], #0x01 + strbgt ip, [r3] + bx lr + + +/* + * At this point, it has not been possible to word align both buffers. + * The destination buffer is word aligned, but the source buffer is not. + */ +.Lmemcpy_bad_align: + stmfd sp!, {r4-r7} + bic r1, r1, #0x03 + cmp ip, #2 + ldr ip, [r1], #0x04 + bgt .Lmemcpy_bad3 + beq .Lmemcpy_bad2 + b .Lmemcpy_bad1 + +.Lmemcpy_bad1_loop16: +#ifdef __ARMEB__ + mov r4, ip, lsl #8 +#else + mov r4, ip, lsr #8 +#endif + ldr r5, [r1], #0x04 + pld [r1, #0x018] + ldr r6, [r1], #0x04 + ldr r7, [r1], #0x04 + ldr ip, [r1], #0x04 +#ifdef __ARMEB__ + orr r4, r4, r5, lsr #24 + mov r5, r5, lsl #8 + orr r5, r5, r6, lsr #24 + mov r6, r6, lsl #8 + orr r6, r6, r7, lsr #24 + mov r7, r7, lsl #8 + orr r7, r7, ip, lsr #24 +#else + orr r4, r4, r5, lsl #24 + mov r5, r5, lsr #8 + orr r5, r5, r6, lsl #24 + mov r6, r6, lsr #8 + orr r6, r6, r7, lsl #24 + mov r7, r7, lsr #8 + orr r7, r7, ip, lsl #24 +#endif + str r4, [r3], #0x04 + str r5, [r3], #0x04 + str r6, [r3], #0x04 + str r7, [r3], #0x04 +.Lmemcpy_bad1: + subs r2, r2, #0x10 + bge .Lmemcpy_bad1_loop16 + + adds r2, r2, #0x10 + ldmfdeq sp!, {r4-r7} + bxeq lr /* Return now if done */ + subs r2, r2, #0x04 + sublt r1, r1, #0x03 + blt .Lmemcpy_bad_done + +.Lmemcpy_bad1_loop4: +#ifdef __ARMEB__ + mov r4, ip, lsl #8 +#else + mov r4, ip, lsr #8 +#endif + ldr ip, [r1], #0x04 + subs r2, r2, #0x04 +#ifdef __ARMEB__ + orr r4, r4, ip, lsr #24 +#else + orr r4, r4, ip, lsl #24 +#endif + str r4, [r3], #0x04 + bge .Lmemcpy_bad1_loop4 + sub r1, r1, #0x03 + b .Lmemcpy_bad_done + +.Lmemcpy_bad2_loop16: +#ifdef __ARMEB__ + mov r4, ip, lsl #16 +#else + mov r4, ip, lsr #16 +#endif + ldr r5, [r1], #0x04 + pld [r1, #0x018] + ldr r6, [r1], #0x04 + ldr r7, [r1], #0x04 + ldr ip, [r1], #0x04 +#ifdef __ARMEB__ + orr r4, r4, r5, lsr #16 + mov r5, r5, lsl #16 + orr r5, r5, r6, lsr #16 + mov r6, r6, lsl #16 + orr r6, r6, r7, lsr #16 + mov r7, r7, lsl #16 + orr r7, r7, ip, lsr #16 +#else + orr r4, r4, r5, lsl #16 + mov r5, r5, lsr #16 + orr r5, r5, r6, lsl #16 + mov r6, r6, lsr #16 + orr r6, r6, r7, lsl #16 + mov r7, r7, lsr #16 + orr r7, r7, ip, lsl #16 +#endif + str r4, [r3], #0x04 + str r5, [r3], #0x04 + str r6, [r3], #0x04 + str r7, [r3], #0x04 +.Lmemcpy_bad2: + subs r2, r2, #0x10 + bge .Lmemcpy_bad2_loop16 + + adds r2, r2, #0x10 + ldmfdeq sp!, {r4-r7} + bxeq lr /* Return now if done */ + subs r2, r2, #0x04 + sublt r1, r1, #0x02 + blt .Lmemcpy_bad_done + +.Lmemcpy_bad2_loop4: +#ifdef __ARMEB__ + mov r4, ip, lsl #16 +#else + mov r4, ip, lsr #16 +#endif + ldr ip, [r1], #0x04 + subs r2, r2, #0x04 +#ifdef __ARMEB__ + orr r4, r4, ip, lsr #16 +#else + orr r4, r4, ip, lsl #16 +#endif + str r4, [r3], #0x04 + bge .Lmemcpy_bad2_loop4 + sub r1, r1, #0x02 + b .Lmemcpy_bad_done + +.Lmemcpy_bad3_loop16: +#ifdef __ARMEB__ + mov r4, ip, lsl #24 +#else + mov r4, ip, lsr #24 +#endif + ldr r5, [r1], #0x04 + pld [r1, #0x018] + ldr r6, [r1], #0x04 + ldr r7, [r1], #0x04 + ldr ip, [r1], #0x04 +#ifdef __ARMEB__ + orr r4, r4, r5, lsr #8 + mov r5, r5, lsl #24 + orr r5, r5, r6, lsr #8 + mov r6, r6, lsl #24 + orr r6, r6, r7, lsr #8 + mov r7, r7, lsl #24 + orr r7, r7, ip, lsr #8 +#else + orr r4, r4, r5, lsl #8 + mov r5, r5, lsr #24 + orr r5, r5, r6, lsl #8 + mov r6, r6, lsr #24 + orr r6, r6, r7, lsl #8 + mov r7, r7, lsr #24 + orr r7, r7, ip, lsl #8 +#endif + str r4, [r3], #0x04 + str r5, [r3], #0x04 + str r6, [r3], #0x04 + str r7, [r3], #0x04 +.Lmemcpy_bad3: + subs r2, r2, #0x10 + bge .Lmemcpy_bad3_loop16 + + adds r2, r2, #0x10 + ldmfdeq sp!, {r4-r7} + bxeq lr /* Return now if done */ + subs r2, r2, #0x04 + sublt r1, r1, #0x01 + blt .Lmemcpy_bad_done + +.Lmemcpy_bad3_loop4: +#ifdef __ARMEB__ + mov r4, ip, lsl #24 +#else + mov r4, ip, lsr #24 +#endif + ldr ip, [r1], #0x04 + subs r2, r2, #0x04 +#ifdef __ARMEB__ + orr r4, r4, ip, lsr #8 +#else + orr r4, r4, ip, lsl #8 +#endif + str r4, [r3], #0x04 + bge .Lmemcpy_bad3_loop4 + sub r1, r1, #0x01 + +.Lmemcpy_bad_done: + ldmfd sp!, {r4-r7} + adds r2, r2, #0x04 + bxeq lr + ldrb ip, [r1], #0x01 + cmp r2, #0x02 + ldrbge r2, [r1], #0x01 + strb ip, [r3], #0x01 + ldrbgt ip, [r1] + strbge r2, [r3], #0x01 + strbgt ip, [r3] + bx lr + + +/* + * Handle short copies (less than 16 bytes), possibly misaligned. + * Some of these are *very* common, thanks to the network stack, + * and so are handled specially. + */ +.Lmemcpy_short: +#ifndef _STANDALONE + add pc, pc, r2, lsl #2 + nop + bx lr /* 0x00 */ + b .Lmemcpy_bytewise /* 0x01 */ + b .Lmemcpy_bytewise /* 0x02 */ + b .Lmemcpy_bytewise /* 0x03 */ + b .Lmemcpy_4 /* 0x04 */ + b .Lmemcpy_bytewise /* 0x05 */ + b .Lmemcpy_6 /* 0x06 */ + b .Lmemcpy_bytewise /* 0x07 */ + b .Lmemcpy_8 /* 0x08 */ + b .Lmemcpy_bytewise /* 0x09 */ + b .Lmemcpy_bytewise /* 0x0a */ + b .Lmemcpy_bytewise /* 0x0b */ + b .Lmemcpy_c /* 0x0c */ +#endif +.Lmemcpy_bytewise: + mov r3, r0 /* We must not clobber r0 */ + ldrb ip, [r1], #0x01 +1: subs r2, r2, #0x01 + strb ip, [r3], #0x01 + ldrbne ip, [r1], #0x01 + bne 1b + bx lr + +#ifndef _STANDALONE +/****************************************************************************** + * Special case for 4 byte copies + */ +#define LMEMCPY_4_LOG2 6 /* 64 bytes */ +#define LMEMCPY_4_PAD .align LMEMCPY_4_LOG2 + LMEMCPY_4_PAD +.Lmemcpy_4: + and r2, r1, #0x03 + orr r2, r2, r0, lsl #2 + ands r2, r2, #0x0f + sub r3, pc, #0x14 + addne pc, r3, r2, lsl #LMEMCPY_4_LOG2 + +/* + * 0000: dst is 32-bit aligned, src is 32-bit aligned + */ + ldr r2, [r1] + str r2, [r0] + bx lr + LMEMCPY_4_PAD + +/* + * 0001: dst is 32-bit aligned, src is 8-bit aligned + */ + ldr r3, [r1, #-1] /* BE:r3 = x012 LE:r3 = 210x */ + ldr r2, [r1, #3] /* BE:r2 = 3xxx LE:r2 = xxx3 */ +#ifdef __ARMEB__ + mov r3, r3, lsl #8 /* r3 = 012. */ + orr r3, r3, r2, lsr #24 /* r3 = 0123 */ +#else + mov r3, r3, lsr #8 /* r3 = .210 */ + orr r3, r3, r2, lsl #24 /* r3 = 3210 */ +#endif + str r3, [r0] + bx lr + LMEMCPY_4_PAD + +/* + * 0010: dst is 32-bit aligned, src is 16-bit aligned + */ +#ifdef __ARMEB__ + ldrh r3, [r1] + ldrh r2, [r1, #0x02] +#else + ldrh r3, [r1, #0x02] + ldrh r2, [r1] +#endif + orr r3, r2, r3, lsl #16 + str r3, [r0] + bx lr + LMEMCPY_4_PAD + +/* + * 0011: dst is 32-bit aligned, src is 8-bit aligned + */ + ldr r3, [r1, #-3] /* BE:r3 = xxx0 LE:r3 = 0xxx */ + ldr r2, [r1, #1] /* BE:r2 = 123x LE:r2 = x321 */ +#ifdef __ARMEB__ + mov r3, r3, lsl #24 /* r3 = 0... */ + orr r3, r3, r2, lsr #8 /* r3 = 0123 */ +#else + mov r3, r3, lsr #24 /* r3 = ...0 */ + orr r3, r3, r2, lsl #8 /* r3 = 3210 */ +#endif + str r3, [r0] + bx lr + LMEMCPY_4_PAD + +/* + * 0100: dst is 8-bit aligned, src is 32-bit aligned + */ + ldr r2, [r1] +#ifdef __ARMEB__ + strb r2, [r0, #0x03] + mov r3, r2, lsr #8 + mov r1, r2, lsr #24 + strb r1, [r0] +#else + strb r2, [r0] + mov r3, r2, lsr #8 + mov r1, r2, lsr #24 + strb r1, [r0, #0x03] +#endif + strh r3, [r0, #0x01] + bx lr + LMEMCPY_4_PAD + +/* + * 0101: dst is 8-bit aligned, src is 8-bit aligned + */ + ldrb r2, [r1] + ldrh r3, [r1, #0x01] + ldrb r1, [r1, #0x03] + strb r2, [r0] + strh r3, [r0, #0x01] + strb r1, [r0, #0x03] + bx lr + LMEMCPY_4_PAD + +/* + * 0110: dst is 8-bit aligned, src is 16-bit aligned + */ + ldrh r2, [r1] /* BE:r2 = ..01 LE:r2 = ..10 */ + ldrh r3, [r1, #0x02] /* LE:r3 = ..23 LE:r3 = ..32 */ +#ifdef __ARMEB__ + mov r1, r2, lsr #8 /* r1 = ...0 */ + strb r1, [r0] + mov r2, r2, lsl #8 /* r2 = .01. */ + orr r2, r2, r3, lsr #8 /* r2 = .012 */ +#else + strb r2, [r0] + mov r2, r2, lsr #8 /* r2 = ...1 */ + orr r2, r2, r3, lsl #8 /* r2 = .321 */ + mov r3, r3, lsr #8 /* r3 = ...3 */ +#endif + strh r2, [r0, #0x01] + strb r3, [r0, #0x03] + bx lr + LMEMCPY_4_PAD + +/* + * 0111: dst is 8-bit aligned, src is 8-bit aligned + */ + ldrb r2, [r1] + ldrh r3, [r1, #0x01] + ldrb r1, [r1, #0x03] + strb r2, [r0] + strh r3, [r0, #0x01] + strb r1, [r0, #0x03] + bx lr + LMEMCPY_4_PAD + +/* + * 1000: dst is 16-bit aligned, src is 32-bit aligned + */ + ldr r2, [r1] +#ifdef __ARMEB__ + strh r2, [r0, #0x02] + mov r3, r2, lsr #16 + strh r3, [r0] +#else + strh r2, [r0] + mov r3, r2, lsr #16 + strh r3, [r0, #0x02] +#endif + bx lr + LMEMCPY_4_PAD + +/* + * 1001: dst is 16-bit aligned, src is 8-bit aligned + */ + ldr r2, [r1, #-1] /* BE:r2 = x012 LE:r2 = 210x */ + ldr r3, [r1, #3] /* BE:r3 = 3xxx LE:r3 = xxx3 */ + mov r1, r2, lsr #8 /* BE:r1 = .x01 LE:r1 = .210 */ + strh r1, [r0] +#ifdef __ARMEB__ + mov r2, r2, lsl #8 /* r2 = 012. */ + orr r2, r2, r3, lsr #24 /* r2 = 0123 */ +#else + mov r2, r2, lsr #24 /* r2 = ...2 */ + orr r2, r2, r3, lsl #8 /* r2 = xx32 */ +#endif + strh r2, [r0, #0x02] + bx lr + LMEMCPY_4_PAD + +/* + * 1010: dst is 16-bit aligned, src is 16-bit aligned + */ + ldrh r2, [r1] + ldrh r3, [r1, #0x02] + strh r2, [r0] + strh r3, [r0, #0x02] + bx lr + LMEMCPY_4_PAD + +/* + * 1011: dst is 16-bit aligned, src is 8-bit aligned + */ + ldr r3, [r1, #1] /* BE:r3 = 123x LE:r3 = x321 */ + ldr r2, [r1, #-3] /* BE:r2 = xxx0 LE:r2 = 0xxx */ + mov r1, r3, lsr #8 /* BE:r1 = .123 LE:r1 = .x32 */ + strh r1, [r0, #0x02] +#ifdef __ARMEB__ + mov r3, r3, lsr #24 /* r3 = ...1 */ + orr r3, r3, r2, lsl #8 /* r3 = xx01 */ +#else + mov r3, r3, lsl #8 /* r3 = 321. */ + orr r3, r3, r2, lsr #24 /* r3 = 3210 */ +#endif + strh r3, [r0] + bx lr + LMEMCPY_4_PAD + +/* + * 1100: dst is 8-bit aligned, src is 32-bit aligned + */ + ldr r2, [r1] /* BE:r2 = 0123 LE:r2 = 3210 */ +#ifdef __ARMEB__ + strb r2, [r0, #0x03] + mov r3, r2, lsr #8 + mov r1, r2, lsr #24 + strh r3, [r0, #0x01] + strb r1, [r0] +#else + strb r2, [r0] + mov r3, r2, lsr #8 + mov r1, r2, lsr #24 + strh r3, [r0, #0x01] + strb r1, [r0, #0x03] +#endif + bx lr + LMEMCPY_4_PAD + +/* + * 1101: dst is 8-bit aligned, src is 8-bit aligned + */ + ldrb r2, [r1] + ldrh r3, [r1, #0x01] + ldrb r1, [r1, #0x03] + strb r2, [r0] + strh r3, [r0, #0x01] + strb r1, [r0, #0x03] + bx lr + LMEMCPY_4_PAD + +/* + * 1110: dst is 8-bit aligned, src is 16-bit aligned + */ +#ifdef __ARMEB__ + ldrh r3, [r1, #0x02] /* BE:r3 = ..23 LE:r3 = ..32 */ + ldrh r2, [r1] /* BE:r2 = ..01 LE:r2 = ..10 */ + strb r3, [r0, #0x03] + mov r3, r3, lsr #8 /* r3 = ...2 */ + orr r3, r3, r2, lsl #8 /* r3 = ..12 */ + strh r3, [r0, #0x01] + mov r2, r2, lsr #8 /* r2 = ...0 */ + strb r2, [r0] +#else + ldrh r2, [r1] /* BE:r2 = ..01 LE:r2 = ..10 */ + ldrh r3, [r1, #0x02] /* BE:r3 = ..23 LE:r3 = ..32 */ + strb r2, [r0] + mov r2, r2, lsr #8 /* r2 = ...1 */ + orr r2, r2, r3, lsl #8 /* r2 = .321 */ + strh r2, [r0, #0x01] + mov r3, r3, lsr #8 /* r3 = ...3 */ + strb r3, [r0, #0x03] +#endif + bx lr + LMEMCPY_4_PAD + +/* + * 1111: dst is 8-bit aligned, src is 8-bit aligned + */ + ldrb r2, [r1] + ldrh r3, [r1, #0x01] + ldrb r1, [r1, #0x03] + strb r2, [r0] + strh r3, [r0, #0x01] + strb r1, [r0, #0x03] + bx lr + LMEMCPY_4_PAD + + +/****************************************************************************** + * Special case for 6 byte copies + */ +#define LMEMCPY_6_LOG2 6 /* 64 bytes */ +#define LMEMCPY_6_PAD .align LMEMCPY_6_LOG2 + LMEMCPY_6_PAD +.Lmemcpy_6: + and r2, r1, #0x03 + orr r2, r2, r0, lsl #2 + ands r2, r2, #0x0f + sub r3, pc, #0x14 + addne pc, r3, r2, lsl #LMEMCPY_6_LOG2 + +/* + * 0000: dst is 32-bit aligned, src is 32-bit aligned + */ + ldr r2, [r1] + ldrh r3, [r1, #0x04] + str r2, [r0] + strh r3, [r0, #0x04] + bx lr + LMEMCPY_6_PAD + +/* + * 0001: dst is 32-bit aligned, src is 8-bit aligned + */ + ldr r2, [r1, #-1] /* BE:r2 = x012 LE:r2 = 210x */ + ldr r3, [r1, #0x03] /* BE:r3 = 345x LE:r3 = x543 */ +#ifdef __ARMEB__ + mov r2, r2, lsl #8 /* r2 = 012. */ + orr r2, r2, r3, lsr #24 /* r2 = 0123 */ +#else + mov r2, r2, lsr #8 /* r2 = .210 */ + orr r2, r2, r3, lsl #24 /* r2 = 3210 */ +#endif + mov r3, r3, lsr #8 /* BE:r3 = .345 LE:r3 = .x54 */ + str r2, [r0] + strh r3, [r0, #0x04] + bx lr + LMEMCPY_6_PAD + +/* + * 0010: dst is 32-bit aligned, src is 16-bit aligned + */ + ldr r3, [r1, #0x02] /* BE:r3 = 2345 LE:r3 = 5432 */ + ldrh r2, [r1] /* BE:r2 = ..01 LE:r2 = ..10 */ +#ifdef __ARMEB__ + mov r1, r3, lsr #16 /* r1 = ..23 */ + orr r1, r1, r2, lsl #16 /* r1 = 0123 */ + str r1, [r0] + strh r3, [r0, #0x04] +#else + mov r1, r3, lsr #16 /* r1 = ..54 */ + orr r2, r2, r3, lsl #16 /* r2 = 3210 */ + str r2, [r0] + strh r1, [r0, #0x04] +#endif + bx lr + LMEMCPY_6_PAD + +/* + * 0011: dst is 32-bit aligned, src is 8-bit aligned + */ + ldr r2, [r1, #-3] /* BE:r2 = xxx0 LE:r2 = 0xxx */ + ldr r3, [r1, #1] /* BE:r3 = 1234 LE:r3 = 4321 */ + ldr r1, [r1, #5] /* BE:r1 = 5xxx LE:r3 = xxx5 */ +#ifdef __ARMEB__ + mov r2, r2, lsl #24 /* r2 = 0... */ + orr r2, r2, r3, lsr #8 /* r2 = 0123 */ + mov r3, r3, lsl #8 /* r3 = 234. */ + orr r1, r3, r1, lsr #24 /* r1 = 2345 */ +#else + mov r2, r2, lsr #24 /* r2 = ...0 */ + orr r2, r2, r3, lsl #8 /* r2 = 3210 */ + mov r1, r1, lsl #8 /* r1 = xx5. */ + orr r1, r1, r3, lsr #24 /* r1 = xx54 */ +#endif + str r2, [r0] + strh r1, [r0, #0x04] + bx lr + LMEMCPY_6_PAD + +/* + * 0100: dst is 8-bit aligned, src is 32-bit aligned + */ + ldr r3, [r1] /* BE:r3 = 0123 LE:r3 = 3210 */ + ldrh r2, [r1, #0x04] /* BE:r2 = ..45 LE:r2 = ..54 */ + mov r1, r3, lsr #8 /* BE:r1 = .012 LE:r1 = .321 */ + strh r1, [r0, #0x01] +#ifdef __ARMEB__ + mov r1, r3, lsr #24 /* r1 = ...0 */ + strb r1, [r0] + mov r3, r3, lsl #8 /* r3 = 123. */ + orr r3, r3, r2, lsr #8 /* r3 = 1234 */ +#else + strb r3, [r0] + mov r3, r3, lsr #24 /* r3 = ...3 */ + orr r3, r3, r2, lsl #8 /* r3 = .543 */ + mov r2, r2, lsr #8 /* r2 = ...5 */ +#endif + strh r3, [r0, #0x03] + strb r2, [r0, #0x05] + bx lr + LMEMCPY_6_PAD + +/* + * 0101: dst is 8-bit aligned, src is 8-bit aligned + */ + ldrb r2, [r1] + ldrh r3, [r1, #0x01] + ldrh ip, [r1, #0x03] + ldrb r1, [r1, #0x05] + strb r2, [r0] + strh r3, [r0, #0x01] + strh ip, [r0, #0x03] + strb r1, [r0, #0x05] + bx lr + LMEMCPY_6_PAD + +/* + * 0110: dst is 8-bit aligned, src is 16-bit aligned + */ + ldrh r2, [r1] /* BE:r2 = ..01 LE:r2 = ..10 */ + ldr r1, [r1, #0x02] /* BE:r1 = 2345 LE:r1 = 5432 */ +#ifdef __ARMEB__ + mov r3, r2, lsr #8 /* r3 = ...0 */ + strb r3, [r0] + strb r1, [r0, #0x05] + mov r3, r1, lsr #8 /* r3 = .234 */ + strh r3, [r0, #0x03] + mov r3, r2, lsl #8 /* r3 = .01. */ + orr r3, r3, r1, lsr #24 /* r3 = .012 */ + strh r3, [r0, #0x01] +#else + strb r2, [r0] + mov r3, r1, lsr #24 + strb r3, [r0, #0x05] + mov r3, r1, lsr #8 /* r3 = .543 */ + strh r3, [r0, #0x03] + mov r3, r2, lsr #8 /* r3 = ...1 */ + orr r3, r3, r1, lsl #8 /* r3 = 4321 */ + strh r3, [r0, #0x01] +#endif + bx lr + LMEMCPY_6_PAD + +/* + * 0111: dst is 8-bit aligned, src is 8-bit aligned + */ + ldrb r2, [r1] + ldrh r3, [r1, #0x01] + ldrh ip, [r1, #0x03] + ldrb r1, [r1, #0x05] + strb r2, [r0] + strh r3, [r0, #0x01] + strh ip, [r0, #0x03] + strb r1, [r0, #0x05] + bx lr + LMEMCPY_6_PAD + +/* + * 1000: dst is 16-bit aligned, src is 32-bit aligned + */ +#ifdef __ARMEB__ + ldr r2, [r1] /* r2 = 0123 */ + ldrh r3, [r1, #0x04] /* r3 = ..45 */ + mov r1, r2, lsr #16 /* r1 = ..01 */ + orr r3, r3, r2, lsl#16 /* r3 = 2345 */ + strh r1, [r0] + str r3, [r0, #0x02] +#else + ldrh r2, [r1, #0x04] /* r2 = ..54 */ + ldr r3, [r1] /* r3 = 3210 */ + mov r2, r2, lsl #16 /* r2 = 54.. */ + orr r2, r2, r3, lsr #16 /* r2 = 5432 */ + strh r3, [r0] + str r2, [r0, #0x02] +#endif + bx lr + LMEMCPY_6_PAD + +/* + * 1001: dst is 16-bit aligned, src is 8-bit aligned + */ + ldr r3, [r1, #-1] /* BE:r3 = x012 LE:r3 = 210x */ + ldr r2, [r1, #3] /* BE:r2 = 345x LE:r2 = x543 */ + mov r1, r3, lsr #8 /* BE:r1 = .x01 LE:r1 = .210 */ +#ifdef __ARMEB__ + mov r2, r2, lsr #8 /* r2 = .345 */ + orr r2, r2, r3, lsl #24 /* r2 = 2345 */ +#else + mov r2, r2, lsl #8 /* r2 = 543. */ + orr r2, r2, r3, lsr #24 /* r2 = 5432 */ +#endif + strh r1, [r0] + str r2, [r0, #0x02] + bx lr + LMEMCPY_6_PAD + +/* + * 1010: dst is 16-bit aligned, src is 16-bit aligned + */ + ldrh r2, [r1] + ldr r3, [r1, #0x02] + strh r2, [r0] + str r3, [r0, #0x02] + bx lr + LMEMCPY_6_PAD + +/* + * 1011: dst is 16-bit aligned, src is 8-bit aligned + */ + ldrb r3, [r1] /* r3 = ...0 */ + ldr r2, [r1, #0x01] /* BE:r2 = 1234 LE:r2 = 4321 */ + ldrb r1, [r1, #0x05] /* r1 = ...5 */ +#ifdef __ARMEB__ + mov r3, r3, lsl #8 /* r3 = ..0. */ + orr r3, r3, r2, lsr #24 /* r3 = ..01 */ + orr r1, r1, r2, lsl #8 /* r1 = 2345 */ +#else + orr r3, r3, r2, lsl #8 /* r3 = 3210 */ + mov r1, r1, lsl #24 /* r1 = 5... */ + orr r1, r1, r2, lsr #8 /* r1 = 5432 */ +#endif + strh r3, [r0] + str r1, [r0, #0x02] + bx lr + LMEMCPY_6_PAD + +/* + * 1100: dst is 8-bit aligned, src is 32-bit aligned + */ + ldr r2, [r1] /* BE:r2 = 0123 LE:r2 = 3210 */ + ldrh r1, [r1, #0x04] /* BE:r1 = ..45 LE:r1 = ..54 */ +#ifdef __ARMEB__ + mov r3, r2, lsr #24 /* r3 = ...0 */ + strb r3, [r0] + mov r2, r2, lsl #8 /* r2 = 123. */ + orr r2, r2, r1, lsr #8 /* r2 = 1234 */ +#else + strb r2, [r0] + mov r2, r2, lsr #8 /* r2 = .321 */ + orr r2, r2, r1, lsl #24 /* r2 = 4321 */ + mov r1, r1, lsr #8 /* r1 = ...5 */ +#endif + str r2, [r0, #0x01] + strb r1, [r0, #0x05] + bx lr + LMEMCPY_6_PAD + +/* + * 1101: dst is 8-bit aligned, src is 8-bit aligned + */ + ldrb r2, [r1] + ldrh r3, [r1, #0x01] + ldrh ip, [r1, #0x03] + ldrb r1, [r1, #0x05] + strb r2, [r0] + strh r3, [r0, #0x01] + strh ip, [r0, #0x03] + strb r1, [r0, #0x05] + bx lr + LMEMCPY_6_PAD + +/* + * 1110: dst is 8-bit aligned, src is 16-bit aligned + */ + ldrh r2, [r1] /* BE:r2 = ..01 LE:r2 = ..10 */ + ldr r1, [r1, #0x02] /* BE:r1 = 2345 LE:r1 = 5432 */ +#ifdef __ARMEB__ + mov r3, r2, lsr #8 /* r3 = ...0 */ + strb r3, [r0] + mov r2, r2, lsl #24 /* r2 = 1... */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Fri Jul 27 21:25: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 C9C791057567; Fri, 27 Jul 2018 21:25:09 +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 2734E895F1; Fri, 27 Jul 2018 21:25:09 +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 9188E1D466; Fri, 27 Jul 2018 21:25:08 +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 w6RLP8gW008511; Fri, 27 Jul 2018 21:25:08 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RLP7Sw008509; Fri, 27 Jul 2018 21:25:07 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807272125.w6RLP7Sw008509@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 27 Jul 2018 21:25:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336784 - in head: share/man/man4/man4.arm sys/arm/conf sys/arm/xscale sys/arm/xscale/i8134x sys/arm/xscale/pxa sys/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: share/man/man4/man4.arm sys/arm/conf sys/arm/xscale sys/arm/xscale/i8134x sys/arm/xscale/pxa sys/conf X-SVN-Commit-Revision: 336784 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: Fri, 27 Jul 2018 21:25:10 -0000 Author: imp Date: Fri Jul 27 21:25:07 2018 New Revision: 336784 URL: https://svnweb.freebsd.org/changeset/base/336784 Log: Remove xscale support. As discussed in arm@. This is a scaled back version of the prior commit because xscale is overlaoded in places to mean armv5 or similar. The OLD XSCALE stuff hasn't been useful in a while. The original committer (cognet@) was the only one that had boards for it. He's blessed this removal. Newer XSCALE (GUMSTIX) is for hardware that's quite old. After discussion on arm@, it was clear there was no support for keeping it. Noticed by: andrew@ Deleted: head/share/man/man4/man4.arm/npe.4 head/sys/arm/conf/CRB head/sys/arm/conf/GUMSTIX head/sys/arm/conf/GUMSTIX-QEMU head/sys/arm/conf/GUMSTIX.hints head/sys/arm/xscale/i8134x/crb_machdep.c head/sys/arm/xscale/i8134x/files.crb head/sys/arm/xscale/i8134x/files.i81342 head/sys/arm/xscale/i8134x/i80321_timer.c head/sys/arm/xscale/i8134x/i80321_wdog.c head/sys/arm/xscale/i8134x/i80321reg.h head/sys/arm/xscale/i8134x/i80321var.h head/sys/arm/xscale/i8134x/i81342.c head/sys/arm/xscale/i8134x/i81342_mcu.c head/sys/arm/xscale/i8134x/i81342_pci.c head/sys/arm/xscale/i8134x/i81342_space.c head/sys/arm/xscale/i8134x/i81342reg.h head/sys/arm/xscale/i8134x/i81342var.h head/sys/arm/xscale/i8134x/iq81342_7seg.c head/sys/arm/xscale/i8134x/iq81342reg.h head/sys/arm/xscale/i8134x/iq81342var.h head/sys/arm/xscale/i8134x/obio.c head/sys/arm/xscale/i8134x/obiovar.h head/sys/arm/xscale/i8134x/std.crb head/sys/arm/xscale/i8134x/std.i81342 head/sys/arm/xscale/i8134x/uart_bus_i81342.c head/sys/arm/xscale/i8134x/uart_cpu_i81342.c head/sys/arm/xscale/pxa/files.pxa head/sys/arm/xscale/pxa/if_smc_smi.c head/sys/arm/xscale/pxa/pxa_gpio.c head/sys/arm/xscale/pxa/pxa_icu.c head/sys/arm/xscale/pxa/pxa_machdep.c head/sys/arm/xscale/pxa/pxa_obio.c head/sys/arm/xscale/pxa/pxa_smi.c head/sys/arm/xscale/pxa/pxa_space.c head/sys/arm/xscale/pxa/pxa_timer.c head/sys/arm/xscale/pxa/pxareg.h head/sys/arm/xscale/pxa/pxavar.h head/sys/arm/xscale/pxa/std.pxa head/sys/arm/xscale/pxa/uart_bus_pxa.c head/sys/arm/xscale/pxa/uart_cpu_pxa.c head/sys/arm/xscale/std.xscale Modified: head/sys/arm/conf/NOTES head/sys/conf/options.arm Modified: head/sys/arm/conf/NOTES ============================================================================== --- head/sys/arm/conf/NOTES Fri Jul 27 21:25:01 2018 (r336783) +++ head/sys/arm/conf/NOTES Fri Jul 27 21:25:07 2018 (r336784) @@ -5,17 +5,12 @@ machine arm cpu CPU_ARM9 cpu CPU_ARM9E cpu CPU_FA526 -cpu CPU_XSCALE_81342 -cpu CPU_XSCALE_PXA2X0 files "../mv/files.mv" files "../mv/discovery/files.db78xxx" files "../mv/kirkwood/files.kirkwood" files "../mv/orion/files.db88f5xxx" files "../mv/orion/files.ts7800" -files "../xscale/i8134x/files.crb" -files "../xscale/i8134x/files.i81342" -files "../xscale/pxa/files.pxa" options PHYSADDR=0x00000000 Modified: head/sys/conf/options.arm ============================================================================== --- head/sys/conf/options.arm Fri Jul 27 21:25:01 2018 (r336783) +++ head/sys/conf/options.arm Fri Jul 27 21:25:07 2018 (r336784) @@ -16,8 +16,6 @@ CPU_CORTEXA opt_global.h CPU_KRAIT opt_global.h CPU_FA526 opt_global.h CPU_MV_PJ4B opt_global.h -CPU_XSCALE_81342 opt_global.h -CPU_XSCALE_PXA2X0 opt_global.h SMP_ON_UP opt_global.h # Runtime detection of MP extensions DEV_GIC opt_global.h DEV_PMU opt_global.h From owner-svn-src-head@freebsd.org Fri Jul 27 21:26: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 50124105764D; Fri, 27 Jul 2018 21:26:33 +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 067BD897F6; Fri, 27 Jul 2018 21:26:33 +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 DD5381D467; Fri, 27 Jul 2018 21:26:32 +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 w6RLQWkn008608; Fri, 27 Jul 2018 21:26:32 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RLQWgM008607; Fri, 27 Jul 2018 21:26:32 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807272126.w6RLQWgM008607@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 27 Jul 2018 21:26:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336785 - head/sys/arm/conf X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/arm/conf X-SVN-Commit-Revision: 336785 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: Fri, 27 Jul 2018 21:26:33 -0000 Author: imp Date: Fri Jul 27 21:26:32 2018 New Revision: 336785 URL: https://svnweb.freebsd.org/changeset/base/336785 Log: This builds now, so aadd it back to Universe. Modified: head/sys/arm/conf/RT1310 Modified: head/sys/arm/conf/RT1310 ============================================================================== --- head/sys/arm/conf/RT1310 Fri Jul 27 21:25:07 2018 (r336784) +++ head/sys/arm/conf/RT1310 Fri Jul 27 21:26:32 2018 (r336785) @@ -3,8 +3,6 @@ # # $FreeBSD$ # -# TODO: This fails to build under universe, irnore it until it's fixed -#NO_UNIVERSE ident RT1310 include "std.arm" From owner-svn-src-head@freebsd.org Fri Jul 27 21:26: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 B47DA10576A2; Fri, 27 Jul 2018 21:26:56 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-it0-x22d.google.com (mail-it0-x22d.google.com [IPv6:2607:f8b0:4001:c0b::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 7535A8995E; Fri, 27 Jul 2018 21:26:56 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: by mail-it0-x22d.google.com with SMTP id 16-v6so9481121itl.5; Fri, 27 Jul 2018 14:26:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=O+D3e8xLpWsm68sj1/vseRlW2VBrkuc8s0dKvjLlfJA=; b=r2Pjx50HjFoFBtNQHYvw2RMYBivxTuWL0DgsnmikpMOiwzdfzu3VK8FPCyiUdrcO9A vW58EvBSm0beb3Hwzj60ikk8qIuxeqOg3IDKkarQQY/H3Eysx9fASBIxOWVPProjE8II zUGLRHZW9tIQHAwbRT3fGyTWbRHU/KcOSgnFVRR3K1n7QJ2tZXeWBJHiWru3Sf5CQl+S FKPYZjGZe1bOsIpDCew2gRDixoul2kEQukYqJ6moFWm1OFvmAZE5+S8lIn4tyPvqG3FP rLOU10iN2vkqtNEj9QvLcvZ07a2jkdjzrSNnFdrUz0cFWBJ9c3gwG+ewOp0QHb+5FsMd g5Fg== 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=O+D3e8xLpWsm68sj1/vseRlW2VBrkuc8s0dKvjLlfJA=; b=gMvr3juDVzejTc116dNO/nQlxBTjLsGCvS9qcsHxxqhKGGgDisjUtCWHt9w20TLnLE 7eI2NLYsbCRW4TXRhmZ3CEM6eXWM6Uc8wwL4+3BfJrVcHLUONIxsoixMRlwI//fDwp4d 1uR0JCDfRwCGxTb3Pbajeci3zavAYYNvp8VOu/op/zbxhU1khJ6AvUQZR+c4kRk1SvgF l0gsKAsOHfZDyD/rT3zL5yeKCzC53jcDZui3kNyzxWB6FbbT0n94tqTkGxVeRHFJPcx9 IBKoHnTSnCzQ/khGRGqAYZDUIFQKZx+VgZXJhc229QkvN6Rfks1IwYWtcjed0nYKO3IT aQFw== X-Gm-Message-State: AOUpUlHVK3GK6arjOHAGgCKOlYI0rEPNvKWKKOtkXOrlkJSeIYRIjJW5 fKTvQ/0g/751ih4BW5Zql/r7fRQ/FSnMvtkULABz6A== X-Google-Smtp-Source: AAOMgpe0p1RVMmJHmrq24rvOdVVgdPRCGYkSeQYqRVC+EhdsDQX2Lez9swZGal6ZWmgjyElc0utckwr8Equwj2yamBs= X-Received: by 2002:a02:9c33:: with SMTP id q48-v6mr7486797jak.103.1532726815632; Fri, 27 Jul 2018 14:26:55 -0700 (PDT) MIME-Version: 1.0 Sender: antoine.brodin.freebsd@gmail.com Received: by 2002:a02:a495:0:0:0:0:0 with HTTP; Fri, 27 Jul 2018 14:26:55 -0700 (PDT) In-Reply-To: <201807261645.w6QGjPK9023685@repo.freebsd.org> References: <201807261645.w6QGjPK9023685@repo.freebsd.org> From: Antoine Brodin Date: Fri, 27 Jul 2018 23:26:55 +0200 X-Google-Sender-Auth: 0shl3vKsHZ2m9Vs_bpf6mxt81Xs Message-ID: Subject: Re: svn commit: r336742 - in head: etc sbin/dump To: Brad Davis 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.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: Fri, 27 Jul 2018 21:26:56 -0000 On Thu, Jul 26, 2018 at 6:45 PM, Brad Davis wrote: > Author: brd > Date: Thu Jul 26 16:45:25 2018 > New Revision: 336742 > URL: https://svnweb.freebsd.org/changeset/base/336742 > > Log: > Move dumpdates creation to CONFS= > > Approved by: bapt (mentor) > Differential Revision: https://reviews.freebsd.org/D16435 Hi, This commit seems to prevent successful installation of FreeBSD. Cheers, Antoine > > Modified: > head/etc/Makefile > head/sbin/dump/Makefile > > Modified: head/etc/Makefile > ============================================================================== > --- head/etc/Makefile Thu Jul 26 16:08:34 2018 (r336741) > +++ head/etc/Makefile Thu Jul 26 16:45:25 2018 (r336742) > @@ -296,8 +296,6 @@ distribution: > ${INSTALL_SYMLINK} mail/aliases ${DESTDIR}/etc/aliases; \ > fi > .endif > - ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \ > - ${DESTDIR}/etc/dumpdates > .if ${MK_LOCATE} != "no" > ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \ > ${DESTDIR}/var/db/locate.database > > Modified: head/sbin/dump/Makefile > ============================================================================== > --- head/sbin/dump/Makefile Thu Jul 26 16:08:34 2018 (r336741) > +++ head/sbin/dump/Makefile Thu Jul 26 16:45:25 2018 (r336742) > @@ -15,6 +15,10 @@ > > PACKAGE=runtime > PROG= dump > +CONFS= /dev/null > +CONFSGRP= operator > +CONFSMODE= 664 > +CONFSNAME_/dev/null= dumpdates > LINKS= ${BINDIR}/dump ${BINDIR}/rdump > CFLAGS+=-DRDUMP > SRCS= itime.c main.c optr.c dumprmt.c tape.c traverse.c unctime.c cache.c > From owner-svn-src-head@freebsd.org Fri Jul 27 21:30: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 3EC321057863; Fri, 27 Jul 2018 21:30:30 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (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 E41A389B91; Fri, 27 Jul 2018 21:30:29 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 2B5C721E95; Fri, 27 Jul 2018 17:30:29 -0400 (EDT) Received: from web6 ([10.202.2.216]) by compute5.internal (MEProxy); Fri, 27 Jul 2018 17:30:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=G7ZpCc BJy0KXENm5mzsOQa1FCFfmX3ZqajXBkfe2n8I=; b=ns8RXeQhLaNlupuoO+DRtP JSEbtUCBWaxRywcYSp8alR1BQqRuO2pG/Vgsk/fbfAuZc0WVuis5MgbHrg7Rm4UU 582xOi8F8wWSpFQZ3Tcc0Ozkr9nQLJHrXVWTEDxf/6hVwKBMIkb2Gndrvuy+8C/i 8Fx8xrrzxxU8JBLKxwoL4YGgd5yJJtSwJRXxGFzjijYb0WXODFFV970Zncq/UykR JsMpf/E76dViCMygtlsimYhoV8OZ9+Ubz9peLrc8yXbwbQA9bMwBDj0+pnCFRw+/ /01I0Yk1HGawJ0oxFwzji734Fyihxd1CNrnpErOuVeLTEMu2AwESBJANyG3x9SAw == X-ME-Proxy: X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id 8271441D5; Fri, 27 Jul 2018 17:30:28 -0400 (EDT) Message-Id: <1532727028.3848756.1455324760.21A047CC@webmail.messagingengine.com> From: Brad Davis To: Antoine Brodin Cc: "src-committers" , svn-src-all@freebsd.org, svn-src-head@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-0843ff3e References: <201807261645.w6QGjPK9023685@repo.freebsd.org> Subject: Re: svn commit: r336742 - in head: etc sbin/dump Date: Fri, 27 Jul 2018 15:30:28 -0600 In-Reply-To: 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: Fri, 27 Jul 2018 21:30:30 -0000 On Fri, Jul 27, 2018, at 3:26 PM, Antoine Brodin wrote: > On Thu, Jul 26, 2018 at 6:45 PM, Brad Davis wrote: > > Author: brd > > Date: Thu Jul 26 16:45:25 2018 > > New Revision: 336742 > > URL: https://svnweb.freebsd.org/changeset/base/336742 > > > > Log: > > Move dumpdates creation to CONFS= > > > > Approved by: bapt (mentor) > > Differential Revision: https://reviews.freebsd.org/D16435 > > Hi, > > This commit seems to prevent successful installation of FreeBSD. It only seems to prevent upgrades, so my build a release VM test is not enough.. I am working on it right now. Regards, Brad Davis From owner-svn-src-head@freebsd.org Fri Jul 27 21:36: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 4FA331057B06; Fri, 27 Jul 2018 21:36:30 +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 00D8B8A008; Fri, 27 Jul 2018 21:36:30 +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 C9A581D60C; Fri, 27 Jul 2018 21:36:29 +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 w6RLaTGd014031; Fri, 27 Jul 2018 21:36:29 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RLaTP3014030; Fri, 27 Jul 2018 21:36:29 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807272136.w6RLaTP3014030@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 27 Jul 2018 21:36:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336786 - in head: . sys/arm/xscale X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: . sys/arm/xscale X-SVN-Commit-Revision: 336786 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: Fri, 27 Jul 2018 21:36:30 -0000 Author: imp Date: Fri Jul 27 21:36:29 2018 New Revision: 336786 URL: https://svnweb.freebsd.org/changeset/base/336786 Log: Re-remove these empty directories Deleted: head/sys/arm/xscale/ Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Fri Jul 27 21:26:32 2018 (r336785) +++ head/UPDATING Fri Jul 27 21:36:29 2018 (r336786) @@ -1,4 +1,4 @@ -Updating Information for FreeBSD current users. + Updating Information for FreeBSD current users. This file is maintained and copyrighted by M. Warner Losh . See end of file for further details. For commonly done items, please see the From owner-svn-src-head@freebsd.org Fri Jul 27 21:40: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 473761057BBA; Fri, 27 Jul 2018 21:40:06 +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 F227F8A1AF; Fri, 27 Jul 2018 21:40:05 +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 D08BA1D611; Fri, 27 Jul 2018 21:40:05 +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 w6RLe5d4014245; Fri, 27 Jul 2018 21:40:05 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RLe5MD014244; Fri, 27 Jul 2018 21:40:05 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807272140.w6RLe5MD014244@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 27 Jul 2018 21:40:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336787 - head X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 336787 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: Fri, 27 Jul 2018 21:40:06 -0000 Author: imp Date: Fri Jul 27 21:40:05 2018 New Revision: 336787 URL: https://svnweb.freebsd.org/changeset/base/336787 Log: Note ARM Atmel, Cavlium and XScale removal. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Fri Jul 27 21:36:29 2018 (r336786) +++ head/UPDATING Fri Jul 27 21:40:05 2018 (r336787) @@ -31,6 +31,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20180727: + Atmel AT91RM9200 and AT91SAM9, Cavium CNS 11xx and XScale + support has been removed from the tree. These ports were + obsolete and/or known to be broken for many years. + 20180723: loader.efi has been augmented to participate more fully in the UEFI boot manager protocol. loader.efi will now look at the From owner-svn-src-head@freebsd.org Fri Jul 27 21:50: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 1E6D51058316; Fri, 27 Jul 2018 21:50:11 +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 C32A68AE11; Fri, 27 Jul 2018 21:50: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 9B26C1D7A2; Fri, 27 Jul 2018 21:50: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 w6RLoAEJ019123; Fri, 27 Jul 2018 21:50:10 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RLoAEG019122; Fri, 27 Jul 2018 21:50:10 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807272150.w6RLoAEG019122@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 27 Jul 2018 21:50:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336788 - head/tools/boot X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/tools/boot X-SVN-Commit-Revision: 336788 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: Fri, 27 Jul 2018 21:50:11 -0000 Author: imp Date: Fri Jul 27 21:50:10 2018 New Revision: 336788 URL: https://svnweb.freebsd.org/changeset/base/336788 Log: also set multicons for tests Modified: head/tools/boot/rootgen.sh Modified: head/tools/boot/rootgen.sh ============================================================================== --- head/tools/boot/rootgen.sh Fri Jul 27 21:40:05 2018 (r336787) +++ head/tools/boot/rootgen.sh Fri Jul 27 21:50:10 2018 (r336788) @@ -799,7 +799,8 @@ echo -h -D -S115200 > ${DESTDIR}/boot.config cat > ${DESTDIR}/boot/loader.conf < Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A53C1058548; Fri, 27 Jul 2018 22:00:01 +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 32FA28B3CC; Fri, 27 Jul 2018 22:00:01 +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 108511D935; Fri, 27 Jul 2018 22:00:01 +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 w6RM00FG024247; Fri, 27 Jul 2018 22:00:00 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RM00n3024246; Fri, 27 Jul 2018 22:00:00 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807272200.w6RM00n3024246@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 27 Jul 2018 22:00:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336789 - head/stand/efi/loader X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/efi/loader X-SVN-Commit-Revision: 336789 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: Fri, 27 Jul 2018 22:00:01 -0000 Author: imp Date: Fri Jul 27 22:00:00 2018 New Revision: 336789 URL: https://svnweb.freebsd.org/changeset/base/336789 Log: stand debug Modified: head/stand/efi/loader/main.c Modified: head/stand/efi/loader/main.c ============================================================================== --- head/stand/efi/loader/main.c Fri Jul 27 21:50:10 2018 (r336788) +++ head/stand/efi/loader/main.c Fri Jul 27 22:00:00 2018 (r336789) @@ -312,6 +312,7 @@ match_boot_info(EFI_LOADED_IMAGE *img __unused, char * char *kernel = NULL; FILEPATH_DEVICE_PATH *fp; struct stat st; + CHAR16 *text; /* * FreeBSD encodes it's boot loading path into the boot loader @@ -349,6 +350,11 @@ match_boot_info(EFI_LOADED_IMAGE *img __unused, char * if ((char *)edp > ep) return NOT_SPECIFIC; while (dp < edp) { + text = efi_devpath_name(dp); + if (text != NULL) { + printf(" BootInfo Path: %S\n", text); + efi_free_devpath_name(text); + } last_dp = dp; dp = (EFI_DEVICE_PATH *)((char *)dp + efi_devpath_length(dp)); } @@ -359,22 +365,31 @@ match_boot_info(EFI_LOADED_IMAGE *img __unused, char * * path in it. Those show up as various VenHw() nodes * which are basically opaque to us. Don't count those * as something specifc. + * path in it... */ - if (last_dp == first_dp) + if (last_dp == first_dp) { + printf("Ignoring BootXXX: Only one DP found\n"); return NOT_SPECIFIC; - if (efi_devpath_to_media_path(last_dp) == NULL) + } + if (efi_devpath_to_media_path(path) == NULL) { + printf("Ignoring BootXXXX: No Media Path\n"); return NOT_SPECIFIC; + } /* * OK. At this point we either have a good path or a bad one. * Let's check. */ pp = efiblk_get_pdinfo_by_device_path(last_dp); - if (pp == NULL) + if (pp == NULL) { + printf("Ignoring BootXXXX: Device Path not found\n"); return BAD_CHOICE; + } set_currdev_pdinfo(pp); - if (!sanity_check_currdev()) + if (!sanity_check_currdev()){ + printf("Ignoring BootXXX: sanity check failed\n"); return BAD_CHOICE; + } /* * OK. We've found a device that matches, next we need to check the last @@ -386,20 +401,30 @@ match_boot_info(EFI_LOADED_IMAGE *img __unused, char * */ dp = efi_devpath_last_node(last_dp); if (DevicePathType(dp) != MEDIA_DEVICE_PATH || - DevicePathSubType(dp) != MEDIA_FILEPATH_DP) + DevicePathSubType(dp) != MEDIA_FILEPATH_DP) { + printf("Using BootXXXX for root partition\n"); return (BOOT_INFO_OK); /* use currdir, default kernel */ + } fp = (FILEPATH_DEVICE_PATH *)dp; ucs2_to_utf8(fp->PathName, &kernel); - if (kernel == NULL) + if (kernel == NULL) { + printf("Not using BootXXX: can't decode kernel\n"); return (BAD_CHOICE); + } if (*kernel == '\\' || isupper(*kernel)) fix_dosisms(kernel); if (stat(kernel, &st) != 0) { free(kernel); + printf("Not using BootXXX: can't find %s\n", kernel); return (BAD_CHOICE); } setenv("kernel", kernel, 1); free(kernel); + text = efi_devpath_name(last_dp); + if (text) { + printf("Using BootXXX %S + %s\n", text, kernel); + efi_free_devpath_name(text); + } return (BOOT_INFO_OK); } @@ -499,13 +524,22 @@ find_currdev(EFI_LOADED_IMAGE *img, bool do_bootmgr, b if (sanity_check_currdev()) return (0); if (dp->pd_parent != NULL) { + pdinfo_t *espdp = dp; dp = dp->pd_parent; STAILQ_FOREACH(pp, &dp->pd_part, pd_link) { + /* Already tried the ESP */ + if (espdp == pp) + continue; /* * Roll up the ZFS special case * for those partitions that have * zpools on them. */ + text = efi_devpath_name(pp->pd_devpath); + if (text != NULL) { + printf("Trying: %S\n", text); + efi_free_devpath_name(text); + } if (try_as_currdev(dp, pp)) return (0); } @@ -798,6 +832,8 @@ main(int argc, CHAR16 *argv[]) } } } + printf("howto %#x console set to %s\n", howto, getenv("console")); + /* * howto is set now how we want to export the flags to the kernel, so * set the env based on it. From owner-svn-src-head@freebsd.org Fri Jul 27 22:07: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 484751058773; Fri, 27 Jul 2018 22:07:50 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (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 D55778B901; Fri, 27 Jul 2018 22:07:49 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 624B320E24; Fri, 27 Jul 2018 18:07:49 -0400 (EDT) Received: from web6 ([10.202.2.216]) by compute5.internal (MEProxy); Fri, 27 Jul 2018 18:07:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=wEwkMR Cy1khtQGI/G6FzlE2EKVHEo61Bgb8HAOemquw=; b=t9oCIPoE7pdysAKcmI3kz2 9/pjbD0pkaSbr98FlTVl+F/2ELG/74EIvpbyHqcgMYxZi1RnfNl6DSRuj5fOVMGM N6rDM6kTCOS2OazKFHYEK12KkCx6I007LbeStLStEMhc/zFxJlSNrUP5rypQCH4G W0lllQ6hWPmcz8+L/aKwSHDq3FXbzqK7fFKDSvfIAcro3UipFlXCTT2Q95H0EtVp gjWodQIWWzhGQk0ejNCC9tDHXW7AUE1F3mfdnoussGZ7XBMiLLpWzYQEEyMPGc0b 4BG56ooVdCzIlAOrZ9A8mzS9c5qIIqIBDgwLFsyYTKMe/g4r/8nzQmFmLiQ/jtXw == X-ME-Proxy: X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id 0F1894143; Fri, 27 Jul 2018 18:07:49 -0400 (EDT) Message-Id: <1532729268.3864047.1455350752.3416D858@webmail.messagingengine.com> From: Brad Davis To: Brad Davis , Antoine Brodin Cc: "src-committers" , svn-src-all@freebsd.org, svn-src-head@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-0843ff3e Subject: Re: svn commit: r336742 - in head: etc sbin/dump References: <201807261645.w6QGjPK9023685@repo.freebsd.org> <1532727028.3848756.1455324760.21A047CC@webmail.messagingengine.com> In-Reply-To: <1532727028.3848756.1455324760.21A047CC@webmail.messagingengine.com> Date: Fri, 27 Jul 2018 16:07:48 -0600 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: Fri, 27 Jul 2018 22:07:50 -0000 On Fri, Jul 27, 2018, at 3:30 PM, Brad Davis wrote: > On Fri, Jul 27, 2018, at 3:26 PM, Antoine Brodin wrote: > > On Thu, Jul 26, 2018 at 6:45 PM, Brad Davis wrote: > > > Author: brd > > > Date: Thu Jul 26 16:45:25 2018 > > > New Revision: 336742 > > > URL: https://svnweb.freebsd.org/changeset/base/336742 > > > > > > Log: > > > Move dumpdates creation to CONFS= > > > > > > Approved by: bapt (mentor) > > > Differential Revision: https://reviews.freebsd.org/D16435 > > > > Hi, > > > > This commit seems to prevent successful installation of FreeBSD. > > It only seems to prevent upgrades, so my build a release VM test is not > enough.. I am working on it right now. I found the issue and I opened up the following review for one of my mentors to approve and have prodded them: https://reviews.freebsd.org/D16476 install(1) should be fixed, but this gets around the issue quickly so people can move on. Regards, Brad Davis From owner-svn-src-head@freebsd.org Fri Jul 27 22:19: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 ECD1C1058B28; Fri, 27 Jul 2018 22:19:50 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6837D8BFA7; Fri, 27 Jul 2018 22:19:50 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from thor.intern.walstatt.dynvpn.de ([77.14.11.81]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LlXnX-1gIW6N1iOF-00bGEZ; Sat, 28 Jul 2018 00:19:40 +0200 Date: Sat, 28 Jul 2018 00:19:04 +0200 From: "O. Hartmann" To: Warner Losh Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336789 - head/stand/efi/loader Message-ID: <20180728001931.628748bb@thor.intern.walstatt.dynvpn.de> In-Reply-To: <201807272200.w6RM00n3024246@repo.freebsd.org> References: <201807272200.w6RM00n3024246@repo.freebsd.org> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:v51BTiu4L4/Ciz2+x2BXq1nfzM8V4dtw2/E1GvG2vHYAuk9fD4y XGh1Vh+II/Rz0cs6KI4gSe9oQM8BeuAUPRAY7rM8G290tDZICdxHNjsG/0SBkNHbgU6wRKe 6PP8GdUUgZHe8Em3Y8siM0IYLxKqQg4UpBs4L3ACdciQsC2UvJXj6O/DH+eaGUVfOS+3gb0 rVR3dkdEu+ZQsrNN24zOQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:tSxwvktfN9Y=:F1fqSORcG00m5/Geay3X41 s1nIMKU3Ie+Er2CRs5iX7/jbrtpjI70UJ4fqeb4nR3ejAJyzf/Kl2PWl3PTVALWJ6QcjH5spI y5sWU7e8ClyBmD+hTdtb5qBTewbIvm/iG5r+dsEPA2xDxPoiIOpbPTDLUoAD5RidpYuUy1jI2 60skto8Hg2jNIPGR8VCgynBKuR+MgeaMkB/21DIM05kTarhCGH934exlnEyRK2rzNhpC98FK7 kbGh8I2/tqhqFkFYZP4dxTzL+ZlMHHFDUZl+DMlaujPCM8vUTUipFle3pGElDUTD7Z86JHcpj Qlgh/RBiJznpSfVps3n/gF9uPuH4PGArAlBMt03lGoESDclJuljvegUUVskCLzUZrgbg/L2Yr D1tDsmowzbDLFNd4Go7DPF8W7u8uRAckTink0FiI0lZqnHAvLZ5n1BX15Xwr/5T6a/qaTXcmN RisHsumcMTUg4toUg7/1m6V7eVY2Df4CqAw9ajg2rKiO4/d6GUVMA+TK+H2aZbEXlm9QXp8C6 5SvTjMjxBzI41Q+Tqr/oA0duacMDCOJclhtJ6QoV7ucJY7XrTpS9NrcepozzdhZlkI2/X4C/w CnoJZNlQZFyno2Za5xF70ciq1phYNPcx9yxniDKxUC+7512/UeFNMC43fDHK7ycSJ+kl+pKFm D7SG333gJPxdDzAd02SmPDwmU7++wBCIhsAvFroVwgpyCOfF/KqwnrNY2tBGuhrqOlwrGw/SJ KdrVLyuIOfPnKnTKwpxffoubbX/4iB2CQdQNKxg7TgdFUHTRqsmDgjcqhN4WImjA/IvAlCNKW O7g+Jh9 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: Fri, 27 Jul 2018 22:19:51 -0000 LS0tLS1CRUdJTiBQR1AgU0lHTkVEIE1FU1NBR0UtLS0tLQ0KSGFzaDogU0hBNTEyDQoNCkFtIEZy aSwgMjcgSnVsIDIwMTggMjI6MDA6MDAgKzAwMDAgKFVUQykNCldhcm5lciBMb3NoIDxpbXBARnJl ZUJTRC5vcmc+IHNjaHJpZWI6DQoNCj4gQXV0aG9yOiBpbXANCj4gRGF0ZTogRnJpIEp1bCAyNyAy MjowMDowMCAyMDE4DQo+IE5ldyBSZXZpc2lvbjogMzM2Nzg5DQo+IFVSTDogaHR0cHM6Ly9zdm53 ZWIuZnJlZWJzZC5vcmcvY2hhbmdlc2V0L2Jhc2UvMzM2Nzg5DQo+IA0KPiBMb2c6DQo+ICAgc3Rh bmQgZGVidWcNCj4gDQo+IE1vZGlmaWVkOg0KPiAgIGhlYWQvc3RhbmQvZWZpL2xvYWRlci9tYWlu LmMNCj4gDQo+IE1vZGlmaWVkOiBoZWFkL3N0YW5kL2VmaS9sb2FkZXIvbWFpbi5jDQo+ID09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PQ0KPiAtLS0gaGVhZC9zdGFuZC9lZmkvbG9hZGVyL21haW4uYwlGcmkg SnVsIDI3IDIxOjUwOjEwIDIwMTgJKHIzMzY3ODgpDQo+ICsrKyBoZWFkL3N0YW5kL2VmaS9sb2Fk ZXIvbWFpbi5jCUZyaSBKdWwgMjcgMjI6MDA6MDAgMjAxOAkocjMzNjc4OSkNCj4gQEAgLTMxMiw2 ICszMTIsNyBAQCBtYXRjaF9ib290X2luZm8oRUZJX0xPQURFRF9JTUFHRSAqaW1nIF9fdW51c2Vk LCBjaGFyICoNCj4gIAljaGFyICprZXJuZWwgPSBOVUxMOw0KPiAgCUZJTEVQQVRIX0RFVklDRV9Q QVRIICAqZnA7DQo+ICAJc3RydWN0IHN0YXQgc3Q7DQo+ICsJQ0hBUjE2ICp0ZXh0Ow0KPiAgDQo+ ICAJLyoNCj4gIAkgKiBGcmVlQlNEIGVuY29kZXMgaXQncyBib290IGxvYWRpbmcgcGF0aCBpbnRv IHRoZSBib290IGxvYWRlcg0KPiBAQCAtMzQ5LDYgKzM1MCwxMSBAQCBtYXRjaF9ib290X2luZm8o RUZJX0xPQURFRF9JTUFHRSAqaW1nIF9fdW51c2VkLCBjaGFyICoNCj4gIAlpZiAoKGNoYXIgKill ZHAgPiBlcCkNCj4gIAkJcmV0dXJuIE5PVF9TUEVDSUZJQzsNCj4gIAl3aGlsZSAoZHAgPCBlZHAp IHsNCj4gKwkJdGV4dCA9IGVmaV9kZXZwYXRoX25hbWUoZHApOw0KPiArCQlpZiAodGV4dCAhPSBO VUxMKSB7DQo+ICsJCQlwcmludGYoIiAgIEJvb3RJbmZvIFBhdGg6ICVTXG4iLCB0ZXh0KTsNCj4g KwkJCWVmaV9mcmVlX2RldnBhdGhfbmFtZSh0ZXh0KTsNCj4gKwkJfQ0KPiAgCQlsYXN0X2RwID0g ZHA7DQo+ICAJCWRwID0gKEVGSV9ERVZJQ0VfUEFUSCAqKSgoY2hhciAqKWRwICsgZWZpX2RldnBh dGhfbGVuZ3RoKGRwKSk7DQo+ICAJfQ0KPiBAQCAtMzU5LDIyICszNjUsMzEgQEAgbWF0Y2hfYm9v dF9pbmZvKEVGSV9MT0FERURfSU1BR0UgKmltZyBfX3VudXNlZCwgY2hhciAqDQo+ICAJICogcGF0 aCBpbiBpdC4gVGhvc2Ugc2hvdyB1cCBhcyB2YXJpb3VzIFZlbkh3KCkgbm9kZXMNCj4gIAkgKiB3 aGljaCBhcmUgYmFzaWNhbGx5IG9wYXF1ZSB0byB1cy4gRG9uJ3QgY291bnQgdGhvc2UNCj4gIAkg KiBhcyBzb21ldGhpbmcgc3BlY2lmYy4NCj4gKwkgKiBwYXRoIGluIGl0Li4uDQo+ICAJICovDQo+ IC0JaWYgKGxhc3RfZHAgPT0gZmlyc3RfZHApDQo+ICsJaWYgKGxhc3RfZHAgPT0gZmlyc3RfZHAp IHsNCj4gKwkJcHJpbnRmKCJJZ25vcmluZyBCb290WFhYOiBPbmx5IG9uZSBEUCBmb3VuZFxuIik7 DQo+ICAJCXJldHVybiBOT1RfU1BFQ0lGSUM7DQo+IC0JaWYgKGVmaV9kZXZwYXRoX3RvX21lZGlh X3BhdGgobGFzdF9kcCkgPT0gTlVMTCkNCj4gKwl9DQo+ICsJaWYgKGVmaV9kZXZwYXRoX3RvX21l ZGlhX3BhdGgocGF0aCkgPT0gTlVMTCkgew0KPiArCQlwcmludGYoIklnbm9yaW5nIEJvb3RYWFhY OiBObyBNZWRpYSBQYXRoXG4iKTsNCj4gIAkJcmV0dXJuIE5PVF9TUEVDSUZJQzsNCj4gKwl9DQo+ ICANCj4gIAkvKg0KPiAgCSAqIE9LLiBBdCB0aGlzIHBvaW50IHdlIGVpdGhlciBoYXZlIGEgZ29v ZCBwYXRoIG9yIGEgYmFkIG9uZS4NCj4gIAkgKiBMZXQncyBjaGVjay4NCj4gIAkgKi8NCj4gIAlw cCA9IGVmaWJsa19nZXRfcGRpbmZvX2J5X2RldmljZV9wYXRoKGxhc3RfZHApOw0KPiAtCWlmIChw cCA9PSBOVUxMKQ0KPiArCWlmIChwcCA9PSBOVUxMKSB7DQo+ICsJCXByaW50ZigiSWdub3Jpbmcg Qm9vdFhYWFg6IERldmljZSBQYXRoIG5vdCBmb3VuZFxuIik7DQo+ICAJCXJldHVybiBCQURfQ0hP SUNFOw0KPiArCX0NCj4gIAlzZXRfY3VycmRldl9wZGluZm8ocHApOw0KPiAtCWlmICghc2FuaXR5 X2NoZWNrX2N1cnJkZXYoKSkNCj4gKwlpZiAoIXNhbml0eV9jaGVja19jdXJyZGV2KCkpew0KPiAr CQlwcmludGYoIklnbm9yaW5nIEJvb3RYWFg6IHNhbml0eSBjaGVjayBmYWlsZWRcbiIpOw0KPiAg CQlyZXR1cm4gQkFEX0NIT0lDRTsNCj4gKwl9DQo+ICANCj4gIAkvKg0KPiAgCSAqIE9LLiBXZSd2 ZSBmb3VuZCBhIGRldmljZSB0aGF0IG1hdGNoZXMsIG5leHQgd2UgbmVlZCB0byBjaGVjayB0aGUg bGFzdA0KPiBAQCAtMzg2LDIwICs0MDEsMzAgQEAgbWF0Y2hfYm9vdF9pbmZvKEVGSV9MT0FERURf SU1BR0UgKmltZyBfX3VudXNlZCwgY2hhciAqDQo+ICAJICovDQo+ICAJZHAgPSBlZmlfZGV2cGF0 aF9sYXN0X25vZGUobGFzdF9kcCk7DQo+ICAJaWYgKERldmljZVBhdGhUeXBlKGRwKSAhPSAgTUVE SUFfREVWSUNFX1BBVEggfHwNCj4gLQkgICAgRGV2aWNlUGF0aFN1YlR5cGUoZHApICE9IE1FRElB X0ZJTEVQQVRIX0RQKQ0KPiArCSAgICBEZXZpY2VQYXRoU3ViVHlwZShkcCkgIT0gTUVESUFfRklM RVBBVEhfRFApIHsNCj4gKwkJcHJpbnRmKCJVc2luZyBCb290WFhYWCBmb3Igcm9vdCBwYXJ0aXRp b25cbiIpOw0KPiAgCQlyZXR1cm4gKEJPT1RfSU5GT19PSyk7CQkvKiB1c2UgY3VycmRpciwgZGVm YXVsdCBrZXJuZWwgKi8NCj4gKwl9DQo+ICAJZnAgPSAoRklMRVBBVEhfREVWSUNFX1BBVEggKilk cDsNCj4gIAl1Y3MyX3RvX3V0ZjgoZnAtPlBhdGhOYW1lLCAma2VybmVsKTsNCj4gLQlpZiAoa2Vy bmVsID09IE5VTEwpDQo+ICsJaWYgKGtlcm5lbCA9PSBOVUxMKSB7DQo+ICsJCXByaW50ZigiTm90 IHVzaW5nIEJvb3RYWFg6IGNhbid0IGRlY29kZSBrZXJuZWxcbiIpOw0KPiAgCQlyZXR1cm4gKEJB RF9DSE9JQ0UpOw0KPiArCX0NCj4gIAlpZiAoKmtlcm5lbCA9PSAnXFwnIHx8IGlzdXBwZXIoKmtl cm5lbCkpDQo+ICAJCWZpeF9kb3Npc21zKGtlcm5lbCk7DQo+ICAJaWYgKHN0YXQoa2VybmVsLCAm c3QpICE9IDApIHsNCj4gIAkJZnJlZShrZXJuZWwpOw0KPiArCQlwcmludGYoIk5vdCB1c2luZyBC b290WFhYOiBjYW4ndCBmaW5kICVzXG4iLCBrZXJuZWwpOw0KPiAgCQlyZXR1cm4gKEJBRF9DSE9J Q0UpOw0KPiAgCX0NCj4gIAlzZXRlbnYoImtlcm5lbCIsIGtlcm5lbCwgMSk7DQo+ICAJZnJlZShr ZXJuZWwpOw0KPiArCXRleHQgPSBlZmlfZGV2cGF0aF9uYW1lKGxhc3RfZHApOw0KPiArCWlmICh0 ZXh0KSB7DQo+ICsJCXByaW50ZigiVXNpbmcgQm9vdFhYWCAlUyArICVzXG4iLCB0ZXh0LCBrZXJu ZWwpOw0KPiArCQllZmlfZnJlZV9kZXZwYXRoX25hbWUodGV4dCk7DQo+ICsJfQ0KPiAgDQo+ICAJ cmV0dXJuIChCT09UX0lORk9fT0spOw0KPiAgfQ0KPiBAQCAtNDk5LDEzICs1MjQsMjIgQEAgZmlu ZF9jdXJyZGV2KEVGSV9MT0FERURfSU1BR0UgKmltZywgYm9vbCBkb19ib290bWdyLCBiDQo+ICAJ CWlmIChzYW5pdHlfY2hlY2tfY3VycmRldigpKQ0KPiAgCQkJcmV0dXJuICgwKTsNCj4gIAkJaWYg KGRwLT5wZF9wYXJlbnQgIT0gTlVMTCkgew0KPiArCQkJcGRpbmZvX3QgKmVzcGRwID0gZHA7DQo+ ICAJCQlkcCA9IGRwLT5wZF9wYXJlbnQ7DQo+ICAJCQlTVEFJTFFfRk9SRUFDSChwcCwgJmRwLT5w ZF9wYXJ0LCBwZF9saW5rKSB7DQo+ICsJCQkJLyogQWxyZWFkeSB0cmllZCB0aGUgRVNQICovDQo+ ICsJCQkJaWYgKGVzcGRwID09IHBwKQ0KPiArCQkJCQljb250aW51ZTsNCj4gIAkJCQkvKg0KPiAg CQkJCSAqIFJvbGwgdXAgdGhlIFpGUyBzcGVjaWFsIGNhc2UNCj4gIAkJCQkgKiBmb3IgdGhvc2Ug cGFydGl0aW9ucyB0aGF0IGhhdmUNCj4gIAkJCQkgKiB6cG9vbHMgb24gdGhlbS4NCj4gIAkJCQkg Ki8NCj4gKwkJCQl0ZXh0ID0gZWZpX2RldnBhdGhfbmFtZShwcC0+cGRfZGV2cGF0aCk7DQo+ICsJ CQkJaWYgKHRleHQgIT0gTlVMTCkgew0KPiArCQkJCQlwcmludGYoIlRyeWluZzogJVNcbiIsIHRl eHQpOw0KPiArCQkJCQllZmlfZnJlZV9kZXZwYXRoX25hbWUodGV4dCk7DQo+ICsJCQkJfQ0KPiAg CQkJCWlmICh0cnlfYXNfY3VycmRldihkcCwgcHApKQ0KPiAgCQkJCQlyZXR1cm4gKDApOw0KPiAg CQkJfQ0KPiBAQCAtNzk4LDYgKzgzMiw4IEBAIG1haW4oaW50IGFyZ2MsIENIQVIxNiAqYXJndltd KQ0KPiAgCQkJfQ0KPiAgCQl9DQo+ICAJfQ0KPiArCXByaW50ZigiaG93dG8gJSN4IGNvbnNvbGUg c2V0IHRvICVzXG4iLCBob3d0bywgZ2V0ZW52KCJjb25zb2xlIikpOw0KPiArDQo+ICAJLyoNCj4g IAkgKiBob3d0byBpcyBzZXQgbm93IGhvdyB3ZSB3YW50IHRvIGV4cG9ydCB0aGUgZmxhZ3MgdG8g dGhlIGtlcm5lbCwgc28NCj4gIAkgKiBzZXQgdGhlIGVudiBiYXNlZCBvbiBpdC4NCj4gX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18NCj4gc3ZuLXNyYy1oZWFk QGZyZWVic2Qub3JnIG1haWxpbmcgbGlzdA0KPiBodHRwczovL2xpc3RzLmZyZWVic2Qub3JnL21h aWxtYW4vbGlzdGluZm8vc3ZuLXNyYy1oZWFkDQo+IFRvIHVuc3Vic2NyaWJlLCBzZW5kIGFueSBt YWlsIHRvICJzdm4tc3JjLWhlYWQtdW5zdWJzY3JpYmVAZnJlZWJzZC5vcmciDQoNCg0KSXQgc2Vl bXMgdGhpcyBwYXRjaCBicm9rZSBidWlsZHdvcmxkIGZvciBtZToNCg0KIA0KWy4uLl0NCi91c3Iv c3JjL3N0YW5kL2VmaS9sb2FkZXIvbWFpbi5jOjM3NDozMjogZXJyb3I6IHVzZSBvZiB1bmRlY2xh cmVkIGlkZW50aWZpZXIgJ3BhdGgnDQogICAgICAgIGlmIChlZmlfZGV2cGF0aF90b19tZWRpYV9w YXRoKHBhdGgpID09IE5VTEwpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgXg0KLSAtLS0gYWxsX3N1YmRpcl9yZXNjdWUgLS0tDQpgcm0ubycgaXMgdXAgdG8gZGF0ZS4N Ci0gLS0tIHJtZGlyX21ha2UgLS0tDQooY2QgL3Vzci9zcmMvcmVzY3VlL3Jlc2N1ZS8uLi8uLi9i aW4vcm1kaXIgJiYgIG1ha2UgLURSRVNDVUUgQ1JVTkNIX0NGTEFHUz0tRFJFU0NVRQ0KTUtfQVVU T19PQko9eWVzIERJUlBSRlg9cmVzY3VlL3Jlc2N1ZS9ybWRpci8gZGVwZW5kICYmIG1ha2UgLURS RVNDVUUNCkNSVU5DSF9DRkxBR1M9LURSRVNDVUUgTUtfQVVUT19PQko9eWVzIERJUlBSRlg9cmVz Y3VlL3Jlc2N1ZS9ybWRpci8gcm1kaXIubykgLS0tDQphbGxfc3ViZGlyX3N0YW5kIC0tLSAxIGVy cm9yIGdlbmVyYXRlZC4NClsuLi5dDQoNCg0KS2luZCByZWdhcmRzLA0KDQpvaA0KDQoNCi0gLS0g DQpPLiBIYXJ0bWFubg0KDQpJY2ggd2lkZXJzcHJlY2hlIGRlciBOdXR6dW5nIG9kZXIgw5xiZXJt aXR0bHVuZyBtZWluZXIgRGF0ZW4gZsO8cg0KV2VyYmV6d2Vja2Ugb2RlciBmw7xyIGRpZSBNYXJr dC0gb2RlciBNZWludW5nc2ZvcnNjaHVuZyAowqcgMjggQWJzLiA0IEJEU0cpLg0KLS0tLS1CRUdJ TiBQR1AgU0lHTkFUVVJFLS0tLS0NCg0KaUxVRUFSTUtBQjBXSVFRWlZaTXpBdHdDMlQvODZUclM1 MjhmeUZoWWxBVUNXMXVhZEFBS0NSRFM1MjhmeUZoWQ0KbElWU0FmMGVwcWVrOXVaWlZCdWdmU1VU b3A0L09OSFludnUvbjdiVWtZVzhuZW9mWndDWThGWEovUld3Q1dyTA0KWFlGWU5nY3ZobE5rUTV4 TW94UHdURG93V25PQUFmOUdVK2c5dFpGUFplSktMQm82WXorOVRDcnBETjk2VzhhSA0KaUg4ZjJM U3FJSGpGTWhDUzkzdWJSRUpPa1ZxRGg1WUV5VktCY0ExTWxrVUJ3TnE5aEVZRg0KPWs1WWwNCi0t LS0tRU5EIFBHUCBTSUdOQVRVUkUtLS0tLQ0K From owner-svn-src-head@freebsd.org Fri Jul 27 22:22: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 2E3C21058DCC; Fri, 27 Jul 2018 22:22:59 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8E1D08C431; Fri, 27 Jul 2018 22:22:58 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from thor.intern.walstatt.dynvpn.de ([77.14.11.81]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MaE4a-1fPRKS42QK-00Jslf; Sat, 28 Jul 2018 00:22:57 +0200 Date: Sat, 28 Jul 2018 00:22:28 +0200 From: "O. Hartmann" To: Warner Losh Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336789 - head/stand/efi/loader Message-ID: <20180728002255.01f3e19f@thor.intern.walstatt.dynvpn.de> In-Reply-To: <201807272200.w6RM00n3024246@repo.freebsd.org> References: <201807272200.w6RM00n3024246@repo.freebsd.org> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:qgzFg2AQ9TTIJR1+XKDk3b74fv3IcM5v6VYMCdTSZBOeZ4UCpm2 s0opmzZpR1P83h0eKUcxmqlAqYMYL5ir6blwk4TA2sPeHmFil85cFh02w0hdqfBoGgaNGHu C80oexwD17KnRphNSOg+BN/dsp1CMDEi6F7D60r8kai2y3Uw5ZB47EJr5lv0arDb+D+uPak nOHbXcoLlwj8S3GX2FEUw== X-UI-Out-Filterresults: notjunk:1;V01:K0:67VeG2Z902w=:/OPJYajDOiLv0S+01XpYJG hzWTWeN61HiHVmkkOHdxvt6Rc3e1MZ3F1CXxjwR3ahws3G1IbkHqYZFE2br9r2jBccf+ykEV0 t7/G1PNKCqzZtFEBraivqOkt6ujzmN7DpAehFAbSEYkBDPKVkcm3JJiuXvTAj30wZyHm95e7M PfHTxNPm77fxbMTEU6gs0KH2ubgkf6CQRe8+MgKngSqwVgg3Hzt1QywhX+BbJH8EWFlfrq21x gCLBVcLiU3NH1DZezaZFUiyTDS4d27opqYLkaLOztxLzFzc2efOZmOK3dBh47d5WvcuXyXYi8 Du6qJVMxQ82MtsyvLqQXIM+w1t2YAseRUWdAYKfNRQkP0ixI9bUY/q/lqNzQH2XVgEiv1894U bSrn+dgGxIf2e61qCdStdq1GUTCA+nuWaaH9S+am0QurkY8Leme4kX6KDUC9wTe6PJ8iAAbTm +NtcKeUypcym6O3RY+s86GjC5qdf3JEIOTHLaJsjlc8VnAgdALRKOaKE1A7sPTKO2KwX2xS1a ouPTGWb7ya4cedkNVwGdpP0FgRngWjtRXTrwmhb8HQAQ8YahcVYqiZX4WKYTpjSVrvWlaaTzc UaIDU+PlxcUTv8Vi1HcZQTROHFJg32ml7uWq3kX462U+yu/48ORIsvemfWFHGNjUjRP0Q3A8m hYKfhaK07Rje8xs8IICqlu4VXeOQW2uVxXSUwPquPlBP/sBvH2p8S1efFJ0u0KxAXGsLSaAJC 3dRilOx1Q3jkRj1c9ADREvqX48iB0ErSc0C+Dz/ZwQPlc1V9nqdM+iY5QvKbc4CnopR6soCRQ a9ldPW9 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: Fri, 27 Jul 2018 22:22:59 -0000 LS0tLS1CRUdJTiBQR1AgU0lHTkVEIE1FU1NBR0UtLS0tLQ0KSGFzaDogU0hBNTEyDQoNCkFtIEZy aSwgMjcgSnVsIDIwMTggMjI6MDA6MDAgKzAwMDAgKFVUQykNCldhcm5lciBMb3NoIDxpbXBARnJl ZUJTRC5vcmc+IHNjaHJpZWI6DQoNCj4gQXV0aG9yOiBpbXANCj4gRGF0ZTogRnJpIEp1bCAyNyAy MjowMDowMCAyMDE4DQo+IE5ldyBSZXZpc2lvbjogMzM2Nzg5DQo+IFVSTDogaHR0cHM6Ly9zdm53 ZWIuZnJlZWJzZC5vcmcvY2hhbmdlc2V0L2Jhc2UvMzM2Nzg5DQo+IA0KPiBMb2c6DQo+ICAgc3Rh bmQgZGVidWcNCj4gDQo+IE1vZGlmaWVkOg0KPiAgIGhlYWQvc3RhbmQvZWZpL2xvYWRlci9tYWlu LmMNCj4gDQo+IE1vZGlmaWVkOiBoZWFkL3N0YW5kL2VmaS9sb2FkZXIvbWFpbi5jDQo+ID09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PQ0KPiAtLS0gaGVhZC9zdGFuZC9lZmkvbG9hZGVyL21haW4uYwlGcmkg SnVsIDI3IDIxOjUwOjEwIDIwMTgJKHIzMzY3ODgpDQo+ICsrKyBoZWFkL3N0YW5kL2VmaS9sb2Fk ZXIvbWFpbi5jCUZyaSBKdWwgMjcgMjI6MDA6MDAgMjAxOAkocjMzNjc4OSkNCj4gQEAgLTMxMiw2 ICszMTIsNyBAQCBtYXRjaF9ib290X2luZm8oRUZJX0xPQURFRF9JTUFHRSAqaW1nIF9fdW51c2Vk LCBjaGFyICoNCj4gIAljaGFyICprZXJuZWwgPSBOVUxMOw0KPiAgCUZJTEVQQVRIX0RFVklDRV9Q QVRIICAqZnA7DQo+ICAJc3RydWN0IHN0YXQgc3Q7DQo+ICsJQ0hBUjE2ICp0ZXh0Ow0KPiAgDQo+ ICAJLyoNCj4gIAkgKiBGcmVlQlNEIGVuY29kZXMgaXQncyBib290IGxvYWRpbmcgcGF0aCBpbnRv IHRoZSBib290IGxvYWRlcg0KPiBAQCAtMzQ5LDYgKzM1MCwxMSBAQCBtYXRjaF9ib290X2luZm8o RUZJX0xPQURFRF9JTUFHRSAqaW1nIF9fdW51c2VkLCBjaGFyICoNCj4gIAlpZiAoKGNoYXIgKill ZHAgPiBlcCkNCj4gIAkJcmV0dXJuIE5PVF9TUEVDSUZJQzsNCj4gIAl3aGlsZSAoZHAgPCBlZHAp IHsNCj4gKwkJdGV4dCA9IGVmaV9kZXZwYXRoX25hbWUoZHApOw0KPiArCQlpZiAodGV4dCAhPSBO VUxMKSB7DQo+ICsJCQlwcmludGYoIiAgIEJvb3RJbmZvIFBhdGg6ICVTXG4iLCB0ZXh0KTsNCj4g KwkJCWVmaV9mcmVlX2RldnBhdGhfbmFtZSh0ZXh0KTsNCj4gKwkJfQ0KPiAgCQlsYXN0X2RwID0g ZHA7DQo+ICAJCWRwID0gKEVGSV9ERVZJQ0VfUEFUSCAqKSgoY2hhciAqKWRwICsgZWZpX2RldnBh dGhfbGVuZ3RoKGRwKSk7DQo+ICAJfQ0KPiBAQCAtMzU5LDIyICszNjUsMzEgQEAgbWF0Y2hfYm9v dF9pbmZvKEVGSV9MT0FERURfSU1BR0UgKmltZyBfX3VudXNlZCwgY2hhciAqDQo+ICAJICogcGF0 aCBpbiBpdC4gVGhvc2Ugc2hvdyB1cCBhcyB2YXJpb3VzIFZlbkh3KCkgbm9kZXMNCj4gIAkgKiB3 aGljaCBhcmUgYmFzaWNhbGx5IG9wYXF1ZSB0byB1cy4gRG9uJ3QgY291bnQgdGhvc2UNCj4gIAkg KiBhcyBzb21ldGhpbmcgc3BlY2lmYy4NCj4gKwkgKiBwYXRoIGluIGl0Li4uDQo+ICAJICovDQo+ IC0JaWYgKGxhc3RfZHAgPT0gZmlyc3RfZHApDQo+ICsJaWYgKGxhc3RfZHAgPT0gZmlyc3RfZHAp IHsNCj4gKwkJcHJpbnRmKCJJZ25vcmluZyBCb290WFhYOiBPbmx5IG9uZSBEUCBmb3VuZFxuIik7 DQo+ICAJCXJldHVybiBOT1RfU1BFQ0lGSUM7DQo+IC0JaWYgKGVmaV9kZXZwYXRoX3RvX21lZGlh X3BhdGgobGFzdF9kcCkgPT0gTlVMTCkNCj4gKwl9DQo+ICsJaWYgKGVmaV9kZXZwYXRoX3RvX21l ZGlhX3BhdGgocGF0aCkgPT0gTlVMTCkgew0KPiArCQlwcmludGYoIklnbm9yaW5nIEJvb3RYWFhY OiBObyBNZWRpYSBQYXRoXG4iKTsNCj4gIAkJcmV0dXJuIE5PVF9TUEVDSUZJQzsNCj4gKwl9DQo+ ICANCj4gIAkvKg0KPiAgCSAqIE9LLiBBdCB0aGlzIHBvaW50IHdlIGVpdGhlciBoYXZlIGEgZ29v ZCBwYXRoIG9yIGEgYmFkIG9uZS4NCj4gIAkgKiBMZXQncyBjaGVjay4NCj4gIAkgKi8NCj4gIAlw cCA9IGVmaWJsa19nZXRfcGRpbmZvX2J5X2RldmljZV9wYXRoKGxhc3RfZHApOw0KPiAtCWlmIChw cCA9PSBOVUxMKQ0KPiArCWlmIChwcCA9PSBOVUxMKSB7DQo+ICsJCXByaW50ZigiSWdub3Jpbmcg Qm9vdFhYWFg6IERldmljZSBQYXRoIG5vdCBmb3VuZFxuIik7DQo+ICAJCXJldHVybiBCQURfQ0hP SUNFOw0KPiArCX0NCj4gIAlzZXRfY3VycmRldl9wZGluZm8ocHApOw0KPiAtCWlmICghc2FuaXR5 X2NoZWNrX2N1cnJkZXYoKSkNCj4gKwlpZiAoIXNhbml0eV9jaGVja19jdXJyZGV2KCkpew0KPiAr CQlwcmludGYoIklnbm9yaW5nIEJvb3RYWFg6IHNhbml0eSBjaGVjayBmYWlsZWRcbiIpOw0KPiAg CQlyZXR1cm4gQkFEX0NIT0lDRTsNCj4gKwl9DQo+ICANCj4gIAkvKg0KPiAgCSAqIE9LLiBXZSd2 ZSBmb3VuZCBhIGRldmljZSB0aGF0IG1hdGNoZXMsIG5leHQgd2UgbmVlZCB0byBjaGVjayB0aGUg bGFzdA0KPiBAQCAtMzg2LDIwICs0MDEsMzAgQEAgbWF0Y2hfYm9vdF9pbmZvKEVGSV9MT0FERURf SU1BR0UgKmltZyBfX3VudXNlZCwgY2hhciAqDQo+ICAJICovDQo+ICAJZHAgPSBlZmlfZGV2cGF0 aF9sYXN0X25vZGUobGFzdF9kcCk7DQo+ICAJaWYgKERldmljZVBhdGhUeXBlKGRwKSAhPSAgTUVE SUFfREVWSUNFX1BBVEggfHwNCj4gLQkgICAgRGV2aWNlUGF0aFN1YlR5cGUoZHApICE9IE1FRElB X0ZJTEVQQVRIX0RQKQ0KPiArCSAgICBEZXZpY2VQYXRoU3ViVHlwZShkcCkgIT0gTUVESUFfRklM RVBBVEhfRFApIHsNCj4gKwkJcHJpbnRmKCJVc2luZyBCb290WFhYWCBmb3Igcm9vdCBwYXJ0aXRp b25cbiIpOw0KPiAgCQlyZXR1cm4gKEJPT1RfSU5GT19PSyk7CQkvKiB1c2UgY3VycmRpciwgZGVm YXVsdCBrZXJuZWwgKi8NCj4gKwl9DQo+ICAJZnAgPSAoRklMRVBBVEhfREVWSUNFX1BBVEggKilk cDsNCj4gIAl1Y3MyX3RvX3V0ZjgoZnAtPlBhdGhOYW1lLCAma2VybmVsKTsNCj4gLQlpZiAoa2Vy bmVsID09IE5VTEwpDQo+ICsJaWYgKGtlcm5lbCA9PSBOVUxMKSB7DQo+ICsJCXByaW50ZigiTm90 IHVzaW5nIEJvb3RYWFg6IGNhbid0IGRlY29kZSBrZXJuZWxcbiIpOw0KPiAgCQlyZXR1cm4gKEJB RF9DSE9JQ0UpOw0KPiArCX0NCj4gIAlpZiAoKmtlcm5lbCA9PSAnXFwnIHx8IGlzdXBwZXIoKmtl cm5lbCkpDQo+ICAJCWZpeF9kb3Npc21zKGtlcm5lbCk7DQo+ICAJaWYgKHN0YXQoa2VybmVsLCAm c3QpICE9IDApIHsNCj4gIAkJZnJlZShrZXJuZWwpOw0KPiArCQlwcmludGYoIk5vdCB1c2luZyBC b290WFhYOiBjYW4ndCBmaW5kICVzXG4iLCBrZXJuZWwpOw0KPiAgCQlyZXR1cm4gKEJBRF9DSE9J Q0UpOw0KPiAgCX0NCj4gIAlzZXRlbnYoImtlcm5lbCIsIGtlcm5lbCwgMSk7DQo+ICAJZnJlZShr ZXJuZWwpOw0KPiArCXRleHQgPSBlZmlfZGV2cGF0aF9uYW1lKGxhc3RfZHApOw0KPiArCWlmICh0 ZXh0KSB7DQo+ICsJCXByaW50ZigiVXNpbmcgQm9vdFhYWCAlUyArICVzXG4iLCB0ZXh0LCBrZXJu ZWwpOw0KPiArCQllZmlfZnJlZV9kZXZwYXRoX25hbWUodGV4dCk7DQo+ICsJfQ0KPiAgDQo+ICAJ cmV0dXJuIChCT09UX0lORk9fT0spOw0KPiAgfQ0KPiBAQCAtNDk5LDEzICs1MjQsMjIgQEAgZmlu ZF9jdXJyZGV2KEVGSV9MT0FERURfSU1BR0UgKmltZywgYm9vbCBkb19ib290bWdyLCBiDQo+ICAJ CWlmIChzYW5pdHlfY2hlY2tfY3VycmRldigpKQ0KPiAgCQkJcmV0dXJuICgwKTsNCj4gIAkJaWYg KGRwLT5wZF9wYXJlbnQgIT0gTlVMTCkgew0KPiArCQkJcGRpbmZvX3QgKmVzcGRwID0gZHA7DQo+ ICAJCQlkcCA9IGRwLT5wZF9wYXJlbnQ7DQo+ICAJCQlTVEFJTFFfRk9SRUFDSChwcCwgJmRwLT5w ZF9wYXJ0LCBwZF9saW5rKSB7DQo+ICsJCQkJLyogQWxyZWFkeSB0cmllZCB0aGUgRVNQICovDQo+ ICsJCQkJaWYgKGVzcGRwID09IHBwKQ0KPiArCQkJCQljb250aW51ZTsNCj4gIAkJCQkvKg0KPiAg CQkJCSAqIFJvbGwgdXAgdGhlIFpGUyBzcGVjaWFsIGNhc2UNCj4gIAkJCQkgKiBmb3IgdGhvc2Ug cGFydGl0aW9ucyB0aGF0IGhhdmUNCj4gIAkJCQkgKiB6cG9vbHMgb24gdGhlbS4NCj4gIAkJCQkg Ki8NCj4gKwkJCQl0ZXh0ID0gZWZpX2RldnBhdGhfbmFtZShwcC0+cGRfZGV2cGF0aCk7DQo+ICsJ CQkJaWYgKHRleHQgIT0gTlVMTCkgew0KPiArCQkJCQlwcmludGYoIlRyeWluZzogJVNcbiIsIHRl eHQpOw0KPiArCQkJCQllZmlfZnJlZV9kZXZwYXRoX25hbWUodGV4dCk7DQo+ICsJCQkJfQ0KPiAg CQkJCWlmICh0cnlfYXNfY3VycmRldihkcCwgcHApKQ0KPiAgCQkJCQlyZXR1cm4gKDApOw0KPiAg CQkJfQ0KPiBAQCAtNzk4LDYgKzgzMiw4IEBAIG1haW4oaW50IGFyZ2MsIENIQVIxNiAqYXJndltd KQ0KPiAgCQkJfQ0KPiAgCQl9DQo+ICAJfQ0KPiArCXByaW50ZigiaG93dG8gJSN4IGNvbnNvbGUg c2V0IHRvICVzXG4iLCBob3d0bywgZ2V0ZW52KCJjb25zb2xlIikpOw0KPiArDQo+ICAJLyoNCj4g IAkgKiBob3d0byBpcyBzZXQgbm93IGhvdyB3ZSB3YW50IHRvIGV4cG9ydCB0aGUgZmxhZ3MgdG8g dGhlIGtlcm5lbCwgc28NCj4gIAkgKiBzZXQgdGhlIGVudiBiYXNlZCBvbiBpdC4NCj4gX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18NCj4gc3ZuLXNyYy1oZWFk QGZyZWVic2Qub3JnIG1haWxpbmcgbGlzdA0KPiBodHRwczovL2xpc3RzLmZyZWVic2Qub3JnL21h aWxtYW4vbGlzdGluZm8vc3ZuLXNyYy1oZWFkDQo+IFRvIHVuc3Vic2NyaWJlLCBzZW5kIGFueSBt YWlsIHRvICJzdm4tc3JjLWhlYWQtdW5zdWJzY3JpYmVAZnJlZWJzZC5vcmciDQoNCkkgc2VlIGlu Y29uc2lzdGVudCB1c2FnZSBvZiBCb290WFhYWCBhbmQgQm9vdFhYWCBpbiB0aGUgcHJpbnRmIG1l c3NhZ2VzLiBJIGd1ZXNzIHRoaXMgaXMNCm1lYW50IHRvIGJlIEJvb3RYWFhYPw0KDQpSZWdhcmRz LA0KT2xpdmVyDQoNCi0gLS0gDQpPLiBIYXJ0bWFubg0KDQpJY2ggd2lkZXJzcHJlY2hlIGRlciBO dXR6dW5nIG9kZXIgw5xiZXJtaXR0bHVuZyBtZWluZXIgRGF0ZW4gZsO8cg0KV2VyYmV6d2Vja2Ug b2RlciBmw7xyIGRpZSBNYXJrdC0gb2RlciBNZWludW5nc2ZvcnNjaHVuZyAowqcgMjggQWJzLiA0 IEJEU0cpLg0KLS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0NCg0KaUxVRUFSTUtBQjBXSVFR WlZaTXpBdHdDMlQvODZUclM1MjhmeUZoWWxBVUNXMXViUHdBS0NSRFM1MjhmeUZoWQ0KbEVnekFn Q2p5WTlwaFdnclRKSE05QXBvRmNyb0F5SzNZRlFjSjJaU2pRMTd1eHhPY1hZUzBwL2NmZFFHbndt VA0KemRPVkNING5kUHM1MFVwZisrOVUrWXZhaXAwWkFmNHljeDY0Nk1RMjdEVEd3NC84YXdXMTRp ZHlHMjZjS0M2Rw0KQkUyeGRINmQ3V3VEcWwvNUNMSncwaDE1SWd0VkZ4OEFDaUgreUY4RTFNNDNO dUt3alQyVQ0KPW0xN1MNCi0tLS0tRU5EIFBHUCBTSUdOQVRVUkUtLS0tLQ0K From owner-svn-src-head@freebsd.org Fri Jul 27 22:29: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 DE5591058F53; Fri, 27 Jul 2018 22:29:16 +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 8C12C8C66A; Fri, 27 Jul 2018 22:29: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 607E91DDF6; Fri, 27 Jul 2018 22:29:16 +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 w6RMTGHO039625; Fri, 27 Jul 2018 22:29:16 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RMTGUH039624; Fri, 27 Jul 2018 22:29:16 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807272229.w6RMTGUH039624@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 27 Jul 2018 22:29:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336790 - head/stand/efi/loader X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/efi/loader X-SVN-Commit-Revision: 336790 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: Fri, 27 Jul 2018 22:29:17 -0000 Author: imp Date: Fri Jul 27 22:29:15 2018 New Revision: 336790 URL: https://svnweb.freebsd.org/changeset/base/336790 Log: Add some additional debug to loader.efi Add some verbose debugging information to the loader's new choices. I'll remove these / put them behind a DEBUG define at a later time. This is to give additional information if there's any dangling edge cases not contemplated by the code. r336789 had most of this change, but had the wrong commit message. This refines it slightly. Modified: head/stand/efi/loader/main.c Modified: head/stand/efi/loader/main.c ============================================================================== --- head/stand/efi/loader/main.c Fri Jul 27 22:00:00 2018 (r336789) +++ head/stand/efi/loader/main.c Fri Jul 27 22:29:15 2018 (r336790) @@ -832,7 +832,6 @@ main(int argc, CHAR16 *argv[]) } } } - printf("howto %#x console set to %s\n", howto, getenv("console")); /* * howto is set now how we want to export the flags to the kernel, so @@ -869,6 +868,8 @@ main(int argc, CHAR16 *argv[]) ST->Hdr.Revision & 0xffff); printf(" EFI Firmware: %S (rev %d.%02d)\n", ST->FirmwareVendor, ST->FirmwareRevision >> 16, ST->FirmwareRevision & 0xffff); + printf(" Console: %s (%#x)\n", getenv("console"), howto); + /* Determine the devpath of our image so we can prefer it. */ From owner-svn-src-head@freebsd.org Fri Jul 27 22:29: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 CACA11058F77; Fri, 27 Jul 2018 22:29:22 +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 675538C6C0; Fri, 27 Jul 2018 22:29:21 +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 A802C1DDF7; Fri, 27 Jul 2018 22:29: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 w6RMTKJi039679; Fri, 27 Jul 2018 22:29:20 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RMTKUW039678; Fri, 27 Jul 2018 22:29:20 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807272229.w6RMTKUW039678@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 27 Jul 2018 22:29:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336791 - head/stand/efi/loader X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/efi/loader X-SVN-Commit-Revision: 336791 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: Fri, 27 Jul 2018 22:29:23 -0000 Author: imp Date: Fri Jul 27 22:29:20 2018 New Revision: 336791 URL: https://svnweb.freebsd.org/changeset/base/336791 Log: In the BootXXXX message, use the actual boot variable. Fix stupid compile issue that crept in when I moved patches between trees. Modified: head/stand/efi/loader/main.c Modified: head/stand/efi/loader/main.c ============================================================================== --- head/stand/efi/loader/main.c Fri Jul 27 22:29:15 2018 (r336790) +++ head/stand/efi/loader/main.c Fri Jul 27 22:29:20 2018 (r336791) @@ -368,11 +368,11 @@ match_boot_info(EFI_LOADED_IMAGE *img __unused, char * * path in it... */ if (last_dp == first_dp) { - printf("Ignoring BootXXX: Only one DP found\n"); + printf("Ignoring Boot%04x: Only one DP found\n", boot_current); return NOT_SPECIFIC; } - if (efi_devpath_to_media_path(path) == NULL) { - printf("Ignoring BootXXXX: No Media Path\n"); + if (efi_devpath_to_media_path(last_dp) == NULL) { + printf("Ignoring Boot%04x: No Media Path\n", boot_current); return NOT_SPECIFIC; } @@ -382,12 +382,12 @@ match_boot_info(EFI_LOADED_IMAGE *img __unused, char * */ pp = efiblk_get_pdinfo_by_device_path(last_dp); if (pp == NULL) { - printf("Ignoring BootXXXX: Device Path not found\n"); + printf("Ignoring Boot%04x: Device Path not found\n", boot_current); return BAD_CHOICE; } set_currdev_pdinfo(pp); if (!sanity_check_currdev()){ - printf("Ignoring BootXXX: sanity check failed\n"); + printf("Ignoring Boot%04x: sanity check failed\n", boot_current); return BAD_CHOICE; } @@ -402,27 +402,29 @@ match_boot_info(EFI_LOADED_IMAGE *img __unused, char * dp = efi_devpath_last_node(last_dp); if (DevicePathType(dp) != MEDIA_DEVICE_PATH || DevicePathSubType(dp) != MEDIA_FILEPATH_DP) { - printf("Using BootXXXX for root partition\n"); + printf("Using Boot%04x for root partition\n", boot_current); return (BOOT_INFO_OK); /* use currdir, default kernel */ } fp = (FILEPATH_DEVICE_PATH *)dp; ucs2_to_utf8(fp->PathName, &kernel); if (kernel == NULL) { - printf("Not using BootXXX: can't decode kernel\n"); + printf("Not using Boot%04x: can't decode kernel\n", boot_current); return (BAD_CHOICE); } if (*kernel == '\\' || isupper(*kernel)) fix_dosisms(kernel); if (stat(kernel, &st) != 0) { free(kernel); - printf("Not using BootXXX: can't find %s\n", kernel); + printf("Not using Boot%04x: can't find %s\n", boot_current, + kernel); return (BAD_CHOICE); } setenv("kernel", kernel, 1); free(kernel); text = efi_devpath_name(last_dp); if (text) { - printf("Using BootXXX %S + %s\n", text, kernel); + printf("Using Boot$04x %S + %s\n", boot_current, text, + kernel); efi_free_devpath_name(text); } From owner-svn-src-head@freebsd.org Fri Jul 27 22:30: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 721751059023 for ; Fri, 27 Jul 2018 22:30:36 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x231.google.com (mail-it0-x231.google.com [IPv6:2607:f8b0:4001:c0b::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F30148C91A for ; Fri, 27 Jul 2018 22:30:35 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x231.google.com with SMTP id q20-v6so9485523ith.0 for ; Fri, 27 Jul 2018 15:30:35 -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=OomFQGoeiVJTkRJko2NWmmiIPjUCpuW1My8aFiCv+4s=; b=O4UgsTU/LG6aAgBrNYQRFs1StlAb3/FLvP1+e0/Q7BnNkm27qwfqJOIPgPoYX+EZhi IXlQoMo8mezsm8Tf/GSD7p3UTupfQnnFanvU682OIfYRgga0Y8iv4u3i71xsewMSi32c shFwOBzsC5Lv70WCBecqpw2uyJQgV7Odfe65RPvD/n7N+8in8wA+HKWtkORPtcHLe/9P CAznH3hF7sMnn/oCkCwg087di8tVkr0BqZL71xtaM91qGPpHBN3kwaQy/UdzHSmYWJK0 Lh2LdGPQVpZhm2ZqdiVMyWER31N4S0zNmXtgNom9glRnz+oaum1w5OAweXtazlMBKBT3 fJfg== 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=OomFQGoeiVJTkRJko2NWmmiIPjUCpuW1My8aFiCv+4s=; b=O61T8C9c4Hl+ZxugFtw9Fs35OlbDToW4VZAswn263qAGBAF/dLFpjUZ9qDHy4yho00 l+hCwssCcKH0mnnS05Cp2BxmWB2a62a4Dac2sNcCbiU7BOSTZYzHh32Q566HAeF6PynC okAId3NUx/Kyr+2gguRVbdS09JVcvffxDZmFqT0aqTHUQKSIirr+VNdBsjPDUMaBAVYI eY1o3YWI5V+HqIzd8M8lulFOY6jAlEqPzXlpsfEIDy4eMBdqZ2qmoYHIGFM4HJHJZ5D2 tSUUw26WuBoTRSCMQ2dPeF35RrXAuoTxAEua9ovaI4UIy4PdMfmZxBihWpHypwd2B1Vx US8A== X-Gm-Message-State: AOUpUlEDoqZ3JrZXid7PqHkrAHeP33/UhvyvtZIMGfz27AgfKx7Doul/ dEpBwOhmqheAtKVcfHpb4RKI7mNdOZb0z70iMLTCsw== X-Google-Smtp-Source: AAOMgpdjCxQ5SLmHuBJg1x7Aw1qQLJ91nVFo6rmeFYRLaHx/mLvWcaXx9SHnv4XVD0Kf04lvVsPggBviUl22TBkcwOk= X-Received: by 2002:a02:3344:: with SMTP id k4-v6mr8167958jak.45.1532730635238; Fri, 27 Jul 2018 15:30:35 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:4485:0:0:0:0:0 with HTTP; Fri, 27 Jul 2018 15:30:34 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: <20180728002255.01f3e19f@thor.intern.walstatt.dynvpn.de> References: <201807272200.w6RM00n3024246@repo.freebsd.org> <20180728002255.01f3e19f@thor.intern.walstatt.dynvpn.de> From: Warner Losh Date: Fri, 27 Jul 2018 16:30:34 -0600 X-Google-Sender-Auth: wyiKtBI-5dFVdGzJ5gBUVnvn5e4 Message-ID: Subject: Re: svn commit: r336789 - head/stand/efi/loader To: "O. Hartmann" 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.27 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: Fri, 27 Jul 2018 22:30:36 -0000 On Fri, Jul 27, 2018 at 4:22 PM, O. Hartmann wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > Am Fri, 27 Jul 2018 22:00:00 +0000 (UTC) > Warner Losh schrieb: > > > Author: imp > > Date: Fri Jul 27 22:00:00 2018 > > New Revision: 336789 > > URL: https://svnweb.freebsd.org/changeset/base/336789 > > > > Log: > > stand debug > > > > Modified: > > head/stand/efi/loader/main.c > > > > Modified: head/stand/efi/loader/main.c > > ============================================================ > ================== > > --- head/stand/efi/loader/main.c Fri Jul 27 21:50:10 2018 > (r336788) > > +++ head/stand/efi/loader/main.c Fri Jul 27 22:00:00 2018 > (r336789) > > @@ -312,6 +312,7 @@ match_boot_info(EFI_LOADED_IMAGE *img __unused, > char * > > char *kernel = NULL; > > FILEPATH_DEVICE_PATH *fp; > > struct stat st; > > + CHAR16 *text; > > > > /* > > * FreeBSD encodes it's boot loading path into the boot loader > > @@ -349,6 +350,11 @@ match_boot_info(EFI_LOADED_IMAGE *img __unused, > char * > > if ((char *)edp > ep) > > return NOT_SPECIFIC; > > while (dp < edp) { > > + text = efi_devpath_name(dp); > > + if (text != NULL) { > > + printf(" BootInfo Path: %S\n", text); > > + efi_free_devpath_name(text); > > + } > > last_dp = dp; > > dp = (EFI_DEVICE_PATH *)((char *)dp + > efi_devpath_length(dp)); > > } > > @@ -359,22 +365,31 @@ match_boot_info(EFI_LOADED_IMAGE *img __unused, > char * > > * path in it. Those show up as various VenHw() nodes > > * which are basically opaque to us. Don't count those > > * as something specifc. > > + * path in it... > > */ > > - if (last_dp == first_dp) > > + if (last_dp == first_dp) { > > + printf("Ignoring BootXXX: Only one DP found\n"); > > return NOT_SPECIFIC; > > - if (efi_devpath_to_media_path(last_dp) == NULL) > > + } > > + if (efi_devpath_to_media_path(path) == NULL) { > > + printf("Ignoring BootXXXX: No Media Path\n"); > > return NOT_SPECIFIC; > > + } > > > > /* > > * OK. At this point we either have a good path or a bad one. > > * Let's check. > > */ > > pp = efiblk_get_pdinfo_by_device_path(last_dp); > > - if (pp == NULL) > > + if (pp == NULL) { > > + printf("Ignoring BootXXXX: Device Path not found\n"); > > return BAD_CHOICE; > > + } > > set_currdev_pdinfo(pp); > > - if (!sanity_check_currdev()) > > + if (!sanity_check_currdev()){ > > + printf("Ignoring BootXXX: sanity check failed\n"); > > return BAD_CHOICE; > > + } > > > > /* > > * OK. We've found a device that matches, next we need to check > the last > > @@ -386,20 +401,30 @@ match_boot_info(EFI_LOADED_IMAGE *img __unused, > char * > > */ > > dp = efi_devpath_last_node(last_dp); > > if (DevicePathType(dp) != MEDIA_DEVICE_PATH || > > - DevicePathSubType(dp) != MEDIA_FILEPATH_DP) > > + DevicePathSubType(dp) != MEDIA_FILEPATH_DP) { > > + printf("Using BootXXXX for root partition\n"); > > return (BOOT_INFO_OK); /* use currdir, default > kernel */ > > + } > > fp = (FILEPATH_DEVICE_PATH *)dp; > > ucs2_to_utf8(fp->PathName, &kernel); > > - if (kernel == NULL) > > + if (kernel == NULL) { > > + printf("Not using BootXXX: can't decode kernel\n"); > > return (BAD_CHOICE); > > + } > > if (*kernel == '\\' || isupper(*kernel)) > > fix_dosisms(kernel); > > if (stat(kernel, &st) != 0) { > > free(kernel); > > + printf("Not using BootXXX: can't find %s\n", kernel); > > return (BAD_CHOICE); > > } > > setenv("kernel", kernel, 1); > > free(kernel); > > + text = efi_devpath_name(last_dp); > > + if (text) { > > + printf("Using BootXXX %S + %s\n", text, kernel); > > + efi_free_devpath_name(text); > > + } > > > > return (BOOT_INFO_OK); > > } > > @@ -499,13 +524,22 @@ find_currdev(EFI_LOADED_IMAGE *img, bool > do_bootmgr, b > > if (sanity_check_currdev()) > > return (0); > > if (dp->pd_parent != NULL) { > > + pdinfo_t *espdp = dp; > > dp = dp->pd_parent; > > STAILQ_FOREACH(pp, &dp->pd_part, pd_link) { > > + /* Already tried the ESP */ > > + if (espdp == pp) > > + continue; > > /* > > * Roll up the ZFS special case > > * for those partitions that have > > * zpools on them. > > */ > > + text = efi_devpath_name(pp->pd_devpath); > > + if (text != NULL) { > > + printf("Trying: %S\n", text); > > + efi_free_devpath_name(text); > > + } > > if (try_as_currdev(dp, pp)) > > return (0); > > } > > @@ -798,6 +832,8 @@ main(int argc, CHAR16 *argv[]) > > } > > } > > } > > + printf("howto %#x console set to %s\n", howto, getenv("console")); > > + > > /* > > * howto is set now how we want to export the flags to the kernel, > so > > * set the env based on it. > > _______________________________________________ > > 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" > > I see inconsistent usage of BootXXXX and BootXXX in the printf messages. I > guess this is > meant to be BootXXXX? > I fixed it by substituting the right XXXX since we may need that in some booting scenarios. r336791 has that fix. Warner From owner-svn-src-head@freebsd.org Fri Jul 27 22:31: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 8E93810590B8; Fri, 27 Jul 2018 22:31: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 4512F8CB3A; Fri, 27 Jul 2018 22:31: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 263FF1DE51; Fri, 27 Jul 2018 22:31: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 w6RMVcFD041345; Fri, 27 Jul 2018 22:31:38 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RMVc8d041344; Fri, 27 Jul 2018 22:31:38 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807272231.w6RMVc8d041344@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 27 Jul 2018 22:31:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336792 - head/stand/efi/loader X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/efi/loader X-SVN-Commit-Revision: 336792 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: Fri, 27 Jul 2018 22:31:39 -0000 Author: imp Date: Fri Jul 27 22:31:38 2018 New Revision: 336792 URL: https://svnweb.freebsd.org/changeset/base/336792 Log: Style nits noted by rpokala Modified: head/stand/efi/loader/main.c Modified: head/stand/efi/loader/main.c ============================================================================== --- head/stand/efi/loader/main.c Fri Jul 27 22:29:20 2018 (r336791) +++ head/stand/efi/loader/main.c Fri Jul 27 22:31:38 2018 (r336792) @@ -365,7 +365,6 @@ match_boot_info(EFI_LOADED_IMAGE *img __unused, char * * path in it. Those show up as various VenHw() nodes * which are basically opaque to us. Don't count those * as something specifc. - * path in it... */ if (last_dp == first_dp) { printf("Ignoring Boot%04x: Only one DP found\n", boot_current); @@ -386,7 +385,7 @@ match_boot_info(EFI_LOADED_IMAGE *img __unused, char * return BAD_CHOICE; } set_currdev_pdinfo(pp); - if (!sanity_check_currdev()){ + if (!sanity_check_currdev()) { printf("Ignoring Boot%04x: sanity check failed\n", boot_current); return BAD_CHOICE; } From owner-svn-src-head@freebsd.org Fri Jul 27 22:35: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 51005105929D; Fri, 27 Jul 2018 22:35:08 +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 ED6A08CE84; Fri, 27 Jul 2018 22:35:07 +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 C012F1DF9C; Fri, 27 Jul 2018 22:35:07 +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 w6RMZ7Ef044670; Fri, 27 Jul 2018 22:35:07 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RMZ71p044669; Fri, 27 Jul 2018 22:35:07 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807272235.w6RMZ71p044669@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 27 Jul 2018 22:35:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336793 - head/stand/efi/loader X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/efi/loader X-SVN-Commit-Revision: 336793 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: Fri, 27 Jul 2018 22:35:08 -0000 Author: imp Date: Fri Jul 27 22:35:07 2018 New Revision: 336793 URL: https://svnweb.freebsd.org/changeset/base/336793 Log: Use % for printf, not a dollar sign Modified: head/stand/efi/loader/main.c Modified: head/stand/efi/loader/main.c ============================================================================== --- head/stand/efi/loader/main.c Fri Jul 27 22:31:38 2018 (r336792) +++ head/stand/efi/loader/main.c Fri Jul 27 22:35:07 2018 (r336793) @@ -422,7 +422,7 @@ match_boot_info(EFI_LOADED_IMAGE *img __unused, char * free(kernel); text = efi_devpath_name(last_dp); if (text) { - printf("Using Boot$04x %S + %s\n", boot_current, text, + printf("Using Boot%04x %S + %s\n", boot_current, text, kernel); efi_free_devpath_name(text); } From owner-svn-src-head@freebsd.org Fri Jul 27 22:46: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 C30E01059537; Fri, 27 Jul 2018 22:46:43 +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 671278D319; Fri, 27 Jul 2018 22:46:43 +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 429BA1E13B; Fri, 27 Jul 2018 22:46:43 +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 w6RMkh4I049842; Fri, 27 Jul 2018 22:46:43 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RMkhX7049841; Fri, 27 Jul 2018 22:46:43 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201807272246.w6RMkhX7049841@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Fri, 27 Jul 2018 22:46:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336794 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 336794 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: Fri, 27 Jul 2018 22:46:43 -0000 Author: brd Date: Fri Jul 27 22:46:42 2018 New Revision: 336794 URL: https://svnweb.freebsd.org/changeset/base/336794 Log: Avoid a install(1) crash by not using -C when the source is /dev/null Approved by: allanjude (mentor) Differential Revision: https://reviews.freebsd.org/D16476 Modified: head/share/mk/bsd.confs.mk Modified: head/share/mk/bsd.confs.mk ============================================================================== --- head/share/mk/bsd.confs.mk Fri Jul 27 22:35:07 2018 (r336793) +++ head/share/mk/bsd.confs.mk Fri Jul 27 22:46:42 2018 (r336794) @@ -107,6 +107,12 @@ ${group}NAME_${cnf}?= ${${group}NAME} ${group}NAME_${cnf}?= ${cnf:T} . endif # defined(${group}NAME) +# Work around a bug with install(1) -C and /dev/null +. if ${cnf} == "/dev/null" +INSTALL_COPY= +. else +INSTALL_COPY= -C +. endif STAGE_AS_SETS+= ${cnf:T} STAGE_AS_${cnf:T}= ${${group}NAME_${cnf:T}} @@ -116,7 +122,7 @@ stage_as.${cnf:T}: ${cnf} realinstallconfig: installdirs-${_${group}DIR_${cnf}} _${group}INS_${cnf:T} _${group}INS_${cnf:T}: ${cnf} - ${INSTALL} ${${group}TAG_ARGS} -C -o ${${group}OWN_${cnf}} \ + ${INSTALL} ${${group}TAG_ARGS} ${INSTALL_COPY} -o ${${group}OWN_${cnf}} \ -g ${${group}GRP_${cnf}} -m ${${group}MODE_${cnf}} \ ${.ALLSRC} ${${group}PREFIX_${cnf}}/${${group}NAME_${cnf}} . endfor # for cnf in ${${group}} From owner-svn-src-head@freebsd.org Fri Jul 27 22:47: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 E90171059578; Fri, 27 Jul 2018 22:47:26 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (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 9929D8D44C; Fri, 27 Jul 2018 22:47:26 +0000 (UTC) (envelope-from brd@FreeBSD.org) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 1119321B10; Fri, 27 Jul 2018 18:47:26 -0400 (EDT) Received: from web5 ([10.202.2.215]) by compute5.internal (MEProxy); Fri, 27 Jul 2018 18:47:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=Qt70/1 crY1FT9GkGTWNZwjYE/2p03TSDFYnxJEr2uPk=; b=OptjXXzjBfxAugY/BQAbEt eDQuNVls+nFAyRNdndaYbsr4wh25C7gOq09Ymm5OPeZZowkyyQ6y1BQuwHJgti4c SZoR45ayxjgi/0H4U/bG89FDjwyRoPXeyyApab+HlhngtfxEwebVick59QvWsPCU v6iqkJfQMGCixTakcKyMDHqajgxL4Qs7+a+/iCIukn8QAgPy0kzA0kTzT162AURq P8bPf8fH07avdy6UUT1VhFMaQk1J7nv1gAsNVUJlVaECwuiryRw/H9olT5TDHpPa zJhUaaxbL9hLE55BWFHb3USSzH/iI+h/M+ONlSn8Hq7+GUseG9LMlgVVwiyzHPxQ == X-ME-Proxy: X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id 9D2C69E0D5; Fri, 27 Jul 2018 18:47:25 -0400 (EDT) Message-Id: <1532731645.922317.1455376712.3E12A198@webmail.messagingengine.com> From: Brad Davis To: Antoine Brodin Cc: "src-committers" , svn-src-all@freebsd.org, svn-src-head@freebsd.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-0843ff3e Date: Fri, 27 Jul 2018 16:47:25 -0600 References: <201807261645.w6QGjPK9023685@repo.freebsd.org> <1532727028.3848756.1455324760.21A047CC@webmail.messagingengine.com> <1532729268.3864047.1455350752.3416D858@webmail.messagingengine.com> In-Reply-To: <1532729268.3864047.1455350752.3416D858@webmail.messagingengine.com> Subject: Re: svn commit: r336742 - in head: etc sbin/dump 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: Fri, 27 Jul 2018 22:47:27 -0000 On Fri, Jul 27, 2018, at 4:07 PM, Brad Davis wrote: > On Fri, Jul 27, 2018, at 3:30 PM, Brad Davis wrote: > > On Fri, Jul 27, 2018, at 3:26 PM, Antoine Brodin wrote: > > > On Thu, Jul 26, 2018 at 6:45 PM, Brad Davis wrote: > > > > Author: brd > > > > Date: Thu Jul 26 16:45:25 2018 > > > > New Revision: 336742 > > > > URL: https://svnweb.freebsd.org/changeset/base/336742 > > > > > > > > Log: > > > > Move dumpdates creation to CONFS= > > > > > > > > Approved by: bapt (mentor) > > > > Differential Revision: https://reviews.freebsd.org/D16435 > > > > > > Hi, > > > > > > This commit seems to prevent successful installation of FreeBSD. > > > > It only seems to prevent upgrades, so my build a release VM test is not > > enough.. I am working on it right now. > > I found the issue and I opened up the following review for one of my > mentors to approve and have prodded them: > > https://reviews.freebsd.org/D16476 > > install(1) should be fixed, but this gets around the issue quickly so > people can move on. Committed in r336794. Regards, Brad Davis From owner-svn-src-head@freebsd.org Fri Jul 27 23:10: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 62C7F1059E0D; Fri, 27 Jul 2018 23:10:29 +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 0F1648E237; Fri, 27 Jul 2018 23:10:29 +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 E18DB1E47B; Fri, 27 Jul 2018 23:10:28 +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 w6RNASuM060575; Fri, 27 Jul 2018 23:10:28 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RNASXs060574; Fri, 27 Jul 2018 23:10:28 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201807272310.w6RNASXs060574@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Fri, 27 Jul 2018 23:10:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336795 - 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: 336795 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: Fri, 27 Jul 2018 23:10:29 -0000 Author: rmacklem Date: Fri Jul 27 23:10:28 2018 New Revision: 336795 URL: https://svnweb.freebsd.org/changeset/base/336795 Log: Add support for IPv6 addresses to the pNFS "-p" option. This patch adds code to handle IPv6 addresses returned by getaddrinfo() for the host entries in the "-p" command line argument. If the IPv6 address is a link local address, only use it if it is the only address for the host. This is done since there is no way to know if the NFSv4.1 pNFS client is in the same scope zone as the MDS. inet_ntop() is used for the IPv6 address translation, since the client will have no use for the scope zone suffix and inet_ntop() does not put this in the address string. Discussed with: bu7cher@yandex.ru Modified: head/usr.sbin/nfsd/nfsd.c Modified: head/usr.sbin/nfsd/nfsd.c ============================================================================== --- head/usr.sbin/nfsd/nfsd.c Fri Jul 27 22:46:42 2018 (r336794) +++ head/usr.sbin/nfsd/nfsd.c Fri Jul 27 23:10:28 2018 (r336795) @@ -1179,14 +1179,16 @@ backup_stable(__unused int signo) static void parse_dsserver(const char *optionarg, struct nfsd_nfsd_args *nfsdargp) { - char *ad, *cp, *cp2, *dsaddr, *dshost, *dspath, *dsvol, nfsprt[9]; - char *mdspath, *mdsp; + char *cp, *cp2, *dsaddr, *dshost, *dspath, *dsvol, nfsprt[9]; + char *mdspath, *mdsp, ip6[INET6_ADDRSTRLEN]; + const char *ad; int ecode; u_int adsiz, dsaddrcnt, dshostcnt, dspathcnt, hostsiz, pathsiz; u_int mdspathcnt; size_t dsaddrsiz, dshostsiz, dspathsiz, nfsprtsiz, mdspathsiz; - struct addrinfo hints, *ai_tcp; + struct addrinfo hints, *ai_tcp, *res; struct sockaddr_in sin; + struct sockaddr_in6 sin6; cp = strdup(optionarg); if (cp == NULL) @@ -1275,22 +1277,55 @@ parse_dsserver(const char *optionarg, struct nfsd_nfsd /* Get the fully qualified domain name and IP address. */ memset(&hints, 0, sizeof(hints)); - hints.ai_flags = AI_CANONNAME; - hints.ai_family = AF_INET; + hints.ai_flags = AI_CANONNAME | AI_ADDRCONFIG; + hints.ai_family = PF_UNSPEC; hints.ai_socktype = SOCK_STREAM; hints.ai_protocol = IPPROTO_TCP; ecode = getaddrinfo(cp, NULL, &hints, &ai_tcp); if (ecode != 0) err(1, "getaddrinfo pnfs: %s %s", cp, gai_strerror(ecode)); - if (ai_tcp->ai_addr->sa_family != AF_INET || - ai_tcp->ai_addrlen < sizeof(sin)) - err(1, "getaddrinfo() returned non-INET address"); - /* Mips cares about sockaddr_in alignment, so copy the addr. */ - memcpy(&sin, ai_tcp->ai_addr, sizeof(sin)); + ad = NULL; + for (res = ai_tcp; res != NULL; res = res->ai_next) { + if (res->ai_addr->sa_family == AF_INET) { + if (res->ai_addrlen < sizeof(sin)) + err(1, "getaddrinfo() returned " + "undersized IPv4 address"); + /* + * Mips cares about sockaddr_in alignment, + * so copy the address. + */ + memcpy(&sin, res->ai_addr, sizeof(sin)); + ad = inet_ntoa(sin.sin_addr); + break; + } else if (res->ai_family == AF_INET6) { + if (res->ai_addrlen < sizeof(sin6)) + err(1, "getaddrinfo() returned " + "undersized IPv6 address"); + /* + * Mips cares about sockaddr_in6 alignment, + * so copy the address. + */ + memcpy(&sin6, res->ai_addr, sizeof(sin6)); + ad = inet_ntop(AF_INET6, &sin6.sin6_addr, ip6, + sizeof(ip6)); + /* + * XXX + * Since a link local address will only + * work if the client and DS are in the + * same scope zone, only use it if it is + * the only address. + */ + if (ad != NULL && + !IN6_IS_ADDR_LINKLOCAL(&sin6.sin6_addr)) + break; + } + } + if (ad == NULL) + err(1, "No IP address for %s", cp); + /* Append this address to dsaddr. */ - ad = inet_ntoa(sin.sin_addr); adsiz = strlen(ad); if (dsaddrcnt + adsiz + nfsprtsiz + 1 > dsaddrsiz) { dsaddrsiz *= 2; From owner-svn-src-head@freebsd.org Fri Jul 27 23:28: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 A11D8105A281; Fri, 27 Jul 2018 23:28:36 +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 56A098EA86; Fri, 27 Jul 2018 23:28:36 +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 322331E7B1; Fri, 27 Jul 2018 23:28:36 +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 w6RNSZsf070845; Fri, 27 Jul 2018 23:28:35 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RNSZ3c070844; Fri, 27 Jul 2018 23:28:35 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807272328.w6RNSZ3c070844@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 27 Jul 2018 23:28:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336796 - head/share/man/man4/man4.arm X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/share/man/man4/man4.arm X-SVN-Commit-Revision: 336796 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: Fri, 27 Jul 2018 23:28:36 -0000 Author: imp Date: Fri Jul 27 23:28:35 2018 New Revision: 336796 URL: https://svnweb.freebsd.org/changeset/base/336796 Log: Remove npe.4. It was removed as part of the xscale removal. Modified: head/share/man/man4/man4.arm/Makefile Modified: head/share/man/man4/man4.arm/Makefile ============================================================================== --- head/share/man/man4/man4.arm/Makefile Fri Jul 27 23:10:28 2018 (r336795) +++ head/share/man/man4/man4.arm/Makefile Fri Jul 27 23:28:35 2018 (r336796) @@ -16,7 +16,6 @@ MAN= \ imx6_snvs.4 \ imx_wdog.4 \ mge.4 \ - npe.4 \ ti_adc.4 MLINKS= cgem.4 if_cgem.4 From owner-svn-src-head@freebsd.org Fri Jul 27 23:38: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 CF0BC105A6F9; Fri, 27 Jul 2018 23:38:32 +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 7C7E08F308; Fri, 27 Jul 2018 23:38:32 +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 507181E949; Fri, 27 Jul 2018 23:38:32 +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 w6RNcWC4075990; Fri, 27 Jul 2018 23:38:32 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6RNcWR8075989; Fri, 27 Jul 2018 23:38:32 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201807272338.w6RNcWR8075989@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Fri, 27 Jul 2018 23:38:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336798 - 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: 336798 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: Fri, 27 Jul 2018 23:38:33 -0000 Author: rmacklem Date: Fri Jul 27 23:38:31 2018 New Revision: 336798 URL: https://svnweb.freebsd.org/changeset/base/336798 Log: Update nfsd.8 for support of IPv6 addresses for hosts in the "-p" option. r336795 adds support for handling of IPv6 addresses returned by getaddrinfo(3) for DS hostnames. This updates the man page for this change. This is a content change. Modified: head/usr.sbin/nfsd/nfsd.8 Modified: head/usr.sbin/nfsd/nfsd.8 ============================================================================== --- head/usr.sbin/nfsd/nfsd.8 Fri Jul 27 23:34:10 2018 (r336797) +++ head/usr.sbin/nfsd/nfsd.8 Fri Jul 27 23:38:31 2018 (r336798) @@ -28,7 +28,7 @@ .\" @(#)nfsd.8 8.4 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd June 30, 2018 +.Dd July 27, 2018 .Dt NFSD 8 .Os .Sh NAME @@ -117,15 +117,10 @@ The .Ar pnfs_setup string is a set of fields separated by ',' characters: .Bl -tag -width Ds -Each of these fields specifies one Data Server. +Each of these fields specifies one DS. It consists of a server hostname, followed by a ':' and the directory path where the DS's data storage file system is mounted on this MDS server. -At this time, only IPv4 addresses are supported by the interface to the kernel, -so the -.Dq server hostname -must resolve to an IPv4 address and support mounts on that address. -This needs to be extended to support IPv6 addresses in the near future. This can optionally be followed by a '#' and the mds_path, which is the directory path for an exported file system on this MDS. If this is specified, it means that this DS is to be used to store data @@ -161,6 +156,18 @@ data files for and nfsv4-data1 will be used to store data files for .Dq /export2 . .El +.sp +When using IPv6 addresses for DSs +be wary of using link local addresses. +The IPv6 address for the DS is sent to the client and there is no scope +zone in it. +As such, a link local address may not work for a pNFS client to DS +TCP connection. +When parsed, +.Nm +will only use a link local address if it is the only address returned by +.Xr getaddrinfo 3 +for the DS hostname. .It Fl m Ar mirror_level This option is only meaningful when used with the .Fl p From owner-svn-src-head@freebsd.org Fri Jul 27 23:54: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 D48E5105AAAE; Fri, 27 Jul 2018 23:54:22 +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 3B5548FA35; Fri, 27 Jul 2018 23:54:21 +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 w6RNsH26053295; Fri, 27 Jul 2018 16:54:17 -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 w6RNsHox053294; Fri, 27 Jul 2018 16:54:17 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201807272354.w6RNsHox053294@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r336789 - head/stand/efi/loader In-Reply-To: <201807272200.w6RM00n3024246@repo.freebsd.org> To: Warner Losh Date: Fri, 27 Jul 2018 16:54:17 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-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: Fri, 27 Jul 2018 23:54:23 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: imp > Date: Fri Jul 27 22:00:00 2018 > New Revision: 336789 > URL: https://svnweb.freebsd.org/changeset/base/336789 > > Log: > stand debug Thats a bit brief for a commit message... > Modified: > head/stand/efi/loader/main.c > > Modified: head/stand/efi/loader/main.c > ============================================================================== > --- head/stand/efi/loader/main.c Fri Jul 27 21:50:10 2018 (r336788) > +++ head/stand/efi/loader/main.c Fri Jul 27 22:00:00 2018 (r336789) > @@ -312,6 +312,7 @@ match_boot_info(EFI_LOADED_IMAGE *img __unused, char * > char *kernel = NULL; > FILEPATH_DEVICE_PATH *fp; > struct stat st; > + CHAR16 *text; > > /* > * FreeBSD encodes it's boot loading path into the boot loader > @@ -349,6 +350,11 @@ match_boot_info(EFI_LOADED_IMAGE *img __unused, char * > if ((char *)edp > ep) > return NOT_SPECIFIC; > while (dp < edp) { > + text = efi_devpath_name(dp); > + if (text != NULL) { > + printf(" BootInfo Path: %S\n", text); > + efi_free_devpath_name(text); > + } > last_dp = dp; > dp = (EFI_DEVICE_PATH *)((char *)dp + efi_devpath_length(dp)); > } > @@ -359,22 +365,31 @@ match_boot_info(EFI_LOADED_IMAGE *img __unused, char * > * path in it. Those show up as various VenHw() nodes > * which are basically opaque to us. Don't count those > * as something specifc. > + * path in it... > */ > - if (last_dp == first_dp) > + if (last_dp == first_dp) { > + printf("Ignoring BootXXX: Only one DP found\n"); > return NOT_SPECIFIC; > - if (efi_devpath_to_media_path(last_dp) == NULL) > + } > + if (efi_devpath_to_media_path(path) == NULL) { > + printf("Ignoring BootXXXX: No Media Path\n"); > return NOT_SPECIFIC; > + } > > /* > * OK. At this point we either have a good path or a bad one. > * Let's check. > */ > pp = efiblk_get_pdinfo_by_device_path(last_dp); > - if (pp == NULL) > + if (pp == NULL) { > + printf("Ignoring BootXXXX: Device Path not found\n"); > return BAD_CHOICE; > + } > set_currdev_pdinfo(pp); > - if (!sanity_check_currdev()) > + if (!sanity_check_currdev()){ > + printf("Ignoring BootXXX: sanity check failed\n"); > return BAD_CHOICE; > + } > > /* > * OK. We've found a device that matches, next we need to check the last > @@ -386,20 +401,30 @@ match_boot_info(EFI_LOADED_IMAGE *img __unused, char * > */ > dp = efi_devpath_last_node(last_dp); > if (DevicePathType(dp) != MEDIA_DEVICE_PATH || > - DevicePathSubType(dp) != MEDIA_FILEPATH_DP) > + DevicePathSubType(dp) != MEDIA_FILEPATH_DP) { > + printf("Using BootXXXX for root partition\n"); > return (BOOT_INFO_OK); /* use currdir, default kernel */ > + } > fp = (FILEPATH_DEVICE_PATH *)dp; > ucs2_to_utf8(fp->PathName, &kernel); > - if (kernel == NULL) > + if (kernel == NULL) { > + printf("Not using BootXXX: can't decode kernel\n"); > return (BAD_CHOICE); > + } > if (*kernel == '\\' || isupper(*kernel)) > fix_dosisms(kernel); > if (stat(kernel, &st) != 0) { > free(kernel); > + printf("Not using BootXXX: can't find %s\n", kernel); > return (BAD_CHOICE); > } > setenv("kernel", kernel, 1); > free(kernel); > + text = efi_devpath_name(last_dp); > + if (text) { > + printf("Using BootXXX %S + %s\n", text, kernel); > + efi_free_devpath_name(text); > + } > > return (BOOT_INFO_OK); > } > @@ -499,13 +524,22 @@ find_currdev(EFI_LOADED_IMAGE *img, bool do_bootmgr, b > if (sanity_check_currdev()) > return (0); > if (dp->pd_parent != NULL) { > + pdinfo_t *espdp = dp; > dp = dp->pd_parent; > STAILQ_FOREACH(pp, &dp->pd_part, pd_link) { > + /* Already tried the ESP */ > + if (espdp == pp) > + continue; > /* > * Roll up the ZFS special case > * for those partitions that have > * zpools on them. > */ > + text = efi_devpath_name(pp->pd_devpath); > + if (text != NULL) { > + printf("Trying: %S\n", text); > + efi_free_devpath_name(text); > + } > if (try_as_currdev(dp, pp)) > return (0); > } > @@ -798,6 +832,8 @@ main(int argc, CHAR16 *argv[]) > } > } > } > + printf("howto %#x console set to %s\n", howto, getenv("console")); > + > /* > * howto is set now how we want to export the flags to the kernel, so > * set the env based on it. > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-head@freebsd.org Fri Jul 27 23:58: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 AA47C105AD25 for ; Fri, 27 Jul 2018 23:58:07 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x235.google.com (mail-it0-x235.google.com [IPv6:2607:f8b0:4001:c0b::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 362378FBB1 for ; Fri, 27 Jul 2018 23:58:07 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x235.google.com with SMTP id h23-v6so9649235ita.5 for ; Fri, 27 Jul 2018 16:58:07 -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=4cqbHGiNAiNzgnE/VKb+fdqcW/V4/ZnuxeePSIIr/K8=; b=WFgxwOWIsqsbH/K2R3NaHEHztqzbVptRBOneWXLSqzHokHE3htP1rhV2KnUtY+Njkw 7lyTne3uzcdroYqwoTvY7xte5RhZ/cUVFyWeaP9QDsqceAQqqFdHTwyrUnEEMRYKX2oF gZl5PmsRy0vtK5X6n/NhwJ5upBwLJa4PjnCxI0ASWOmM4kNQ4joH1MFka24TDHcjizfk +vBfAxt6krs3Ey9z2ycthlmfLsTNNCkxwH2oh+JrNK6DQBgLAjVc85i4PszScn0STcGv ECpB5w7fyepLTeY6/GzEDjpj5q1CGwIM5NHBEscx2AkqOZNZvXiiiqo1YzXw26geOgmf d7Kg== 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=4cqbHGiNAiNzgnE/VKb+fdqcW/V4/ZnuxeePSIIr/K8=; b=QO/tw7k6j8xGT8wbXOut+/dg7eriUlVTF7JomVL0z3obNoEwmDKsI1YZ8aPXStA+io r8U2V7mOCe3/cmN4Uf4FYN+brslN/G8zE0KwhJOJvxz5CYhP9EUzUmP7Cjli9wgufjGO mk4B3IGnySHKxXLgmwvMudkN7ao85kT1heQI00tCipAGhnwNp0ppL801LSEoc/V+IeQg 118sPCtzWvHEYb/79fZAuv7uWQk/AIHbdC4bVT1tXJpQb+1XY2lBgWB4qz0pJObgzYHv az1aFUpKJZjeqsyXrwJXfkeqM736/2Gs0nz+bNf4NIhZwAiAO2oWKJQkmWi6sjSA/jfo VcOA== X-Gm-Message-State: AOUpUlHqYmehClV45JzwTCYO7VHNjt8LnWYzeGO1a6nzE5jW/e80tt52 Su7HGs0RCiOmE1QQSQs1fJFRZl6bemRh5bSoNLTwKA== X-Google-Smtp-Source: AAOMgpfr266WNxknLgwhahW6YeCMX6Z4wRs+D6e4FKk6JvF/OgmYoN31HAPvbac3HT9XuoAmvlY5dvXL0F7Gd+nOyiE= X-Received: by 2002:a02:3344:: with SMTP id k4-v6mr8365860jak.45.1532735886259; Fri, 27 Jul 2018 16:58:06 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:4485:0:0:0:0:0 with HTTP; Fri, 27 Jul 2018 16:58:05 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:18a2:a4f7:170:8dd9] In-Reply-To: <201807272354.w6RNsHox053294@pdx.rh.CN85.dnsmgr.net> References: <201807272200.w6RM00n3024246@repo.freebsd.org> <201807272354.w6RNsHox053294@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Fri, 27 Jul 2018 17:58:05 -0600 X-Google-Sender-Auth: E4u7FzYoTaE4G6u_7Y8yQD-_pYA Message-ID: Subject: Re: svn commit: r336789 - head/stand/efi/loader To: "Rodney W. Grimes" Cc: Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.27 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: Fri, 27 Jul 2018 23:58:08 -0000 Yea, that was a misfire.... It's been a long week and I didn't check before I tried to commit and hit ^C too late when I realized my mistake. Warner On Fri, Jul 27, 2018 at 5:54 PM, Rodney W. Grimes < freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > [ Charset UTF-8 unsupported, converting... ] > > Author: imp > > Date: Fri Jul 27 22:00:00 2018 > > New Revision: 336789 > > URL: https://svnweb.freebsd.org/changeset/base/336789 > > > > Log: > > stand debug > > Thats a bit brief for a commit message... > > > Modified: > > head/stand/efi/loader/main.c > > > > Modified: head/stand/efi/loader/main.c > > ============================================================ > ================== > > --- head/stand/efi/loader/main.c Fri Jul 27 21:50:10 2018 > (r336788) > > +++ head/stand/efi/loader/main.c Fri Jul 27 22:00:00 2018 > (r336789) > > @@ -312,6 +312,7 @@ match_boot_info(EFI_LOADED_IMAGE *img __unused, > char * > > char *kernel = NULL; > > FILEPATH_DEVICE_PATH *fp; > > struct stat st; > > + CHAR16 *text; > > > > /* > > * FreeBSD encodes it's boot loading path into the boot loader > > @@ -349,6 +350,11 @@ match_boot_info(EFI_LOADED_IMAGE *img __unused, > char * > > if ((char *)edp > ep) > > return NOT_SPECIFIC; > > while (dp < edp) { > > + text = efi_devpath_name(dp); > > + if (text != NULL) { > > + printf(" BootInfo Path: %S\n", text); > > + efi_free_devpath_name(text); > > + } > > last_dp = dp; > > dp = (EFI_DEVICE_PATH *)((char *)dp + > efi_devpath_length(dp)); > > } > > @@ -359,22 +365,31 @@ match_boot_info(EFI_LOADED_IMAGE *img __unused, > char * > > * path in it. Those show up as various VenHw() nodes > > * which are basically opaque to us. Don't count those > > * as something specifc. > > + * path in it... > > */ > > - if (last_dp == first_dp) > > + if (last_dp == first_dp) { > > + printf("Ignoring BootXXX: Only one DP found\n"); > > return NOT_SPECIFIC; > > - if (efi_devpath_to_media_path(last_dp) == NULL) > > + } > > + if (efi_devpath_to_media_path(path) == NULL) { > > + printf("Ignoring BootXXXX: No Media Path\n"); > > return NOT_SPECIFIC; > > + } > > > > /* > > * OK. At this point we either have a good path or a bad one. > > * Let's check. > > */ > > pp = efiblk_get_pdinfo_by_device_path(last_dp); > > - if (pp == NULL) > > + if (pp == NULL) { > > + printf("Ignoring BootXXXX: Device Path not found\n"); > > return BAD_CHOICE; > > + } > > set_currdev_pdinfo(pp); > > - if (!sanity_check_currdev()) > > + if (!sanity_check_currdev()){ > > + printf("Ignoring BootXXX: sanity check failed\n"); > > return BAD_CHOICE; > > + } > > > > /* > > * OK. We've found a device that matches, next we need to check > the last > > @@ -386,20 +401,30 @@ match_boot_info(EFI_LOADED_IMAGE *img __unused, > char * > > */ > > dp = efi_devpath_last_node(last_dp); > > if (DevicePathType(dp) != MEDIA_DEVICE_PATH || > > - DevicePathSubType(dp) != MEDIA_FILEPATH_DP) > > + DevicePathSubType(dp) != MEDIA_FILEPATH_DP) { > > + printf("Using BootXXXX for root partition\n"); > > return (BOOT_INFO_OK); /* use currdir, default > kernel */ > > + } > > fp = (FILEPATH_DEVICE_PATH *)dp; > > ucs2_to_utf8(fp->PathName, &kernel); > > - if (kernel == NULL) > > + if (kernel == NULL) { > > + printf("Not using BootXXX: can't decode kernel\n"); > > return (BAD_CHOICE); > > + } > > if (*kernel == '\\' || isupper(*kernel)) > > fix_dosisms(kernel); > > if (stat(kernel, &st) != 0) { > > free(kernel); > > + printf("Not using BootXXX: can't find %s\n", kernel); > > return (BAD_CHOICE); > > } > > setenv("kernel", kernel, 1); > > free(kernel); > > + text = efi_devpath_name(last_dp); > > + if (text) { > > + printf("Using BootXXX %S + %s\n", text, kernel); > > + efi_free_devpath_name(text); > > + } > > > > return (BOOT_INFO_OK); > > } > > @@ -499,13 +524,22 @@ find_currdev(EFI_LOADED_IMAGE *img, bool > do_bootmgr, b > > if (sanity_check_currdev()) > > return (0); > > if (dp->pd_parent != NULL) { > > + pdinfo_t *espdp = dp; > > dp = dp->pd_parent; > > STAILQ_FOREACH(pp, &dp->pd_part, pd_link) { > > + /* Already tried the ESP */ > > + if (espdp == pp) > > + continue; > > /* > > * Roll up the ZFS special case > > * for those partitions that have > > * zpools on them. > > */ > > + text = efi_devpath_name(pp->pd_devpath); > > + if (text != NULL) { > > + printf("Trying: %S\n", text); > > + efi_free_devpath_name(text); > > + } > > if (try_as_currdev(dp, pp)) > > return (0); > > } > > @@ -798,6 +832,8 @@ main(int argc, CHAR16 *argv[]) > > } > > } > > } > > + printf("howto %#x console set to %s\n", howto, getenv("console")); > > + > > /* > > * howto is set now how we want to export the flags to the kernel, > so > > * set the env based on it. > > > > > > -- > Rod Grimes > rgrimes@freebsd.org > From owner-svn-src-head@freebsd.org Sat Jul 28 00:33: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 9FB44105B94D; Sat, 28 Jul 2018 00:33:41 +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 444EF70D13; Sat, 28 Jul 2018 00:33: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 05A121F32D; Sat, 28 Jul 2018 00:33: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 w6S0Xech006731; Sat, 28 Jul 2018 00:33:40 GMT (envelope-from eadler@FreeBSD.org) Received: (from eadler@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6S0XeqF006730; Sat, 28 Jul 2018 00:33:40 GMT (envelope-from eadler@FreeBSD.org) Message-Id: <201807280033.w6S0XeqF006730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: eadler set sender to eadler@FreeBSD.org using -f From: Eitan Adler Date: Sat, 28 Jul 2018 00:33:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336799 - head/tools/build X-SVN-Group: head X-SVN-Commit-Author: eadler X-SVN-Commit-Paths: head/tools/build X-SVN-Commit-Revision: 336799 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, 28 Jul 2018 00:33:41 -0000 Author: eadler Date: Sat Jul 28 00:33:40 2018 New Revision: 336799 URL: https://svnweb.freebsd.org/changeset/base/336799 Log: tools/build/beinstall.sh: Use some slightly better shell syntax; reduce duplication This is is a first pass at improving the be installer. Reviewed By: will Differential Revision: https://reviews.freebsd.org/D16081 Modified: head/tools/build/beinstall.sh Modified: head/tools/build/beinstall.sh ============================================================================== --- head/tools/build/beinstall.sh Fri Jul 27 23:38:31 2018 (r336798) +++ head/tools/build/beinstall.sh Sat Jul 28 00:33:40 2018 (r336799) @@ -69,7 +69,7 @@ cleanup() { errx() { cleanup - echo "error: $*" + echo "error: $@" exit 1 } @@ -107,16 +107,17 @@ if [ -e .git ] ; then [ $? -ne 0 ] && errx "Can't lookup git commit timestamp" commit_ts=$(date -r ${commit_time} '+%Y%m%d.%H%M%S') elif [ -d .svn ] ; then - if [ -f /usr/bin/svnlite ]; then - commit_ts=$( svnlite info --show-item last-changed-date | sed -e 's/\..*//' -e 's/T/./' -e 's/-//g' -e s'/://g' ) - elif [ -f /usr/local/bin/svn ]; then - commit_ts=$( svn info --show-item last-changed-date | sed -e 's/\..*//' -e 's/T/./' -e 's/-//g' -e s'/://g' ) - else - errx "Can't lookup Subversion commit timestamp" - fi + if [ -e /usr/bin/svnlite ]; then + svn=/usr/bin/svnlite + elif [ -e /usr/local/bin/svn ]; then + svn=/usr/local/bin/svn + else + errx "Unable to find subversion" + fi + commit_ts="$( "$svn" info --show-item last-changed-date | sed -e 's/\..*//' -e 's/T/./' -e 's/-//g' -e s'/://g' )" [ $? -ne 0 ] && errx "Can't lookup Subversion commit timestamp" else - errx "Unable to determine sandbox type" + errx "Unable to determine source control type" fi commit_ver=$(${objdir}/bin/freebsd-version/freebsd-version -u 2>/dev/null) @@ -137,8 +138,8 @@ beadm create ${BENAME} >/dev/null || errx "Unable to c beadm mount ${BENAME} ${BE_TMP}/mnt || errx "Unable to mount BE ${BENAME}." echo "Mounted ${BENAME} to ${BE_MNTPT}, performing install/update ..." -make $* DESTDIR=${BE_MNTPT} installkernel || errx "Installkernel failed!" -make $* DESTDIR=${BE_MNTPT} installworld || errx "Installworld failed!" +make "$@" DESTDIR=${BE_MNTPT} installkernel || errx "Installkernel failed!" +make "$@" DESTDIR=${BE_MNTPT} installworld || errx "Installworld failed!" if [ -n "${CONFIG_UPDATER}" ]; then "update_${CONFIG_UPDATER}" From owner-svn-src-head@freebsd.org Sat Jul 28 01:00: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 B1AF8105BE50; Sat, 28 Jul 2018 01:00:00 +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 66209716DD; Sat, 28 Jul 2018 01:00:00 +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 443031F66B; Sat, 28 Jul 2018 01:00:00 +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 w6S100x0016889; Sat, 28 Jul 2018 01:00:00 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6S100Gp016888; Sat, 28 Jul 2018 01:00:00 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201807280100.w6S100Gp016888@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 28 Jul 2018 01:00:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336801 - head/contrib/libarchive/libarchive X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/contrib/libarchive/libarchive X-SVN-Commit-Revision: 336801 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, 28 Jul 2018 01:00:00 -0000 Author: cem Date: Sat Jul 28 00:59:59 2018 New Revision: 336801 URL: https://svnweb.freebsd.org/changeset/base/336801 Log: MFV r336800: libarchive: Cherry-pick upstream 2c8c83b9 Relevant vendor changes: Fix issue #948: out-of-bounds read in lha_read_data_none() admbugs: 877 MFC after: 3 days Security: CVE-2017-14503 Modified: head/contrib/libarchive/libarchive/archive_read_support_format_lha.c Directory Properties: head/contrib/libarchive/ (props changed) Modified: head/contrib/libarchive/libarchive/archive_read_support_format_lha.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_lha.c Sat Jul 28 00:55:57 2018 (r336800) +++ head/contrib/libarchive/libarchive/archive_read_support_format_lha.c Sat Jul 28 00:59:59 2018 (r336801) @@ -701,6 +701,12 @@ archive_read_format_lha_read_header(struct archive_rea * Prepare variables used to read a file content. */ lha->entry_bytes_remaining = lha->compsize; + if (lha->entry_bytes_remaining < 0) { + archive_set_error(&a->archive, + ARCHIVE_ERRNO_FILE_FORMAT, + "Invalid LHa entry size"); + return (ARCHIVE_FATAL); + } lha->entry_offset = 0; lha->entry_crc_calculated = 0; From owner-svn-src-head@freebsd.org Sat Jul 28 02:53: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 B27601060732; Sat, 28 Jul 2018 02:53:39 +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 1849D75E54; Sat, 28 Jul 2018 02:53:38 +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 0497320AC1; Sat, 28 Jul 2018 02:53:36 +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 w6S2raac078728; Sat, 28 Jul 2018 02:53:36 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6S2rax2078727; Sat, 28 Jul 2018 02:53:36 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201807280253.w6S2rax2078727@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Sat, 28 Jul 2018 02:53:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336802 - head/tests/sys/kqueue/libkqueue X-SVN-Group: head X-SVN-Commit-Author: dab X-SVN-Commit-Paths: head/tests/sys/kqueue/libkqueue X-SVN-Commit-Revision: 336802 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, 28 Jul 2018 02:53:39 -0000 Author: dab Date: Sat Jul 28 02:53:36 2018 New Revision: 336802 URL: https://svnweb.freebsd.org/changeset/base/336802 Log: Fix compilation error on some arches after r336761 & r336781. Another cast for printing an intmax_t was needed in a kqueue test for some arches. Pointy-hat: me (twice) MFC after: 1 week X-MFC-with: r336761, r336781 Sponsored by: Dell EMC Modified: head/tests/sys/kqueue/libkqueue/timer.c Modified: head/tests/sys/kqueue/libkqueue/timer.c ============================================================================== --- head/tests/sys/kqueue/libkqueue/timer.c Sat Jul 28 00:59:59 2018 (r336801) +++ head/tests/sys/kqueue/libkqueue/timer.c Sat Jul 28 02:53:36 2018 (r336802) @@ -239,7 +239,7 @@ test_abstime(void) kev.fflags = 0; kevent_cmp(&kev, kevent_get(kqfd)); if (time(NULL) < when + timeout) - err(1, "too early %jd %jd", time(NULL), (intmax_t)(when + timeout)); + err(1, "too early %jd %jd", (intmax_t)time(NULL), (intmax_t)(when + timeout)); /* Check if the event occurs again */ sleep(3); From owner-svn-src-head@freebsd.org Sat Jul 28 04:06: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 C266E10623FE; Sat, 28 Jul 2018 04:06:34 +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 6E4DB7865D; Sat, 28 Jul 2018 04:06:34 +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 4C53E21706; Sat, 28 Jul 2018 04:06:34 +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 w6S46YIC015909; Sat, 28 Jul 2018 04:06:34 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6S46Y9r015908; Sat, 28 Jul 2018 04:06:34 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201807280406.w6S46Y9r015908@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 28 Jul 2018 04:06:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336803 - head/sys/vm X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/vm X-SVN-Commit-Revision: 336803 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, 28 Jul 2018 04:06:34 -0000 Author: alc Date: Sat Jul 28 04:06:33 2018 New Revision: 336803 URL: https://svnweb.freebsd.org/changeset/base/336803 Log: To date, mlockall(MCL_FUTURE) has had the unfortunate side effect of blocking vm map entry and object coalescing for the calling process. However, there is no reason that mlockall(MCL_FUTURE) should block such coalescing. This change enables it. Reviewed by: kib, markj Tested by: pho MFC after: 6 weeks Differential Revision: https://reviews.freebsd.org/D16413 Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Sat Jul 28 02:53:36 2018 (r336802) +++ head/sys/vm/vm_map.c Sat Jul 28 04:06:33 2018 (r336803) @@ -1277,10 +1277,9 @@ charged: vm_object_clear_flag(object, OBJ_ONEMAPPING); VM_OBJECT_WUNLOCK(object); } else if (prev_entry != &map->header && - prev_entry->eflags == protoeflags && + (prev_entry->eflags & ~MAP_ENTRY_USER_WIRED) == protoeflags && (cow & (MAP_STACK_GROWS_DOWN | MAP_STACK_GROWS_UP)) == 0 && - prev_entry->end == start && prev_entry->wired_count == 0 && - (prev_entry->cred == cred || + prev_entry->end == start && (prev_entry->cred == cred || (prev_entry->object.vm_object != NULL && prev_entry->object.vm_object->cred == cred)) && vm_object_coalesce(prev_entry->object.vm_object, @@ -1295,7 +1294,11 @@ charged: */ if (prev_entry->inheritance == inheritance && prev_entry->protection == prot && - prev_entry->max_protection == max) { + prev_entry->max_protection == max && + prev_entry->wired_count == 0) { + KASSERT((prev_entry->eflags & MAP_ENTRY_USER_WIRED) == + 0, ("prev_entry %p has incoherent wiring", + prev_entry)); if ((prev_entry->eflags & MAP_ENTRY_GUARD) == 0) map->size += end - prev_entry->end; prev_entry->end = end; From owner-svn-src-head@freebsd.org Sat Jul 28 06:46: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 2DD6910413EF; Sat, 28 Jul 2018 06:46:14 +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 D615F7D6A5; Sat, 28 Jul 2018 06:46:13 +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 B73FE23245; Sat, 28 Jul 2018 06:46:13 +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 w6S6kDF8099174; Sat, 28 Jul 2018 06:46:13 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6S6kBSg099126; Sat, 28 Jul 2018 06:46:11 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201807280646.w6S6kBSg099126@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 28 Jul 2018 06:46:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336804 - in head/sys/arm: allwinner altera/socfpga amlogic/aml8726 annapurna/alpine broadcom/bcm2835 freescale/imx mv/armada38x nvidia/tegra124 qemu rockchip samsung/exynos xilinx X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys/arm: allwinner altera/socfpga amlogic/aml8726 annapurna/alpine broadcom/bcm2835 freescale/imx mv/armada38x nvidia/tegra124 qemu rockchip samsung/exynos xilinx X-SVN-Commit-Revision: 336804 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, 28 Jul 2018 06:46:14 -0000 Author: andrew Date: Sat Jul 28 06:46:10 2018 New Revision: 336804 URL: https://svnweb.freebsd.org/changeset/base/336804 Log: Remove IPI_IRQ_START and IPI_IRQ_END from the arm kernel config files. These are unneeded with INTRNG. Modified: head/sys/arm/allwinner/std.allwinner head/sys/arm/altera/socfpga/std.socfpga head/sys/arm/amlogic/aml8726/std.aml8726 head/sys/arm/annapurna/alpine/std.alpine head/sys/arm/broadcom/bcm2835/std.bcm2836 head/sys/arm/freescale/imx/std.imx6 head/sys/arm/mv/armada38x/std.armada38x head/sys/arm/nvidia/tegra124/std.tegra124 head/sys/arm/qemu/std.virt head/sys/arm/rockchip/std.rk30xx head/sys/arm/samsung/exynos/std.exynos5250 head/sys/arm/samsung/exynos/std.exynos5420 head/sys/arm/xilinx/std.zynq7 Modified: head/sys/arm/allwinner/std.allwinner ============================================================================== --- head/sys/arm/allwinner/std.allwinner Sat Jul 28 04:06:33 2018 (r336803) +++ head/sys/arm/allwinner/std.allwinner Sat Jul 28 06:46:10 2018 (r336804) @@ -5,9 +5,6 @@ cpu CPU_CORTEXA machine arm armv7 makeoptions CONF_CFLAGS="-march=armv7a" -options IPI_IRQ_START=0 -options IPI_IRQ_END=15 - files "../allwinner/files.allwinner" files "../allwinner/a20/files.a20" files "../allwinner/a31/files.a31" Modified: head/sys/arm/altera/socfpga/std.socfpga ============================================================================== --- head/sys/arm/altera/socfpga/std.socfpga Sat Jul 28 04:06:33 2018 (r336803) +++ head/sys/arm/altera/socfpga/std.socfpga Sat Jul 28 06:46:10 2018 (r336804) @@ -4,7 +4,4 @@ cpu CPU_CORTEXA machine arm armv7 makeoptions CONF_CFLAGS="-march=armv7a" -options IPI_IRQ_START=0 -options IPI_IRQ_END=15 - files "../altera/socfpga/files.socfpga" Modified: head/sys/arm/amlogic/aml8726/std.aml8726 ============================================================================== --- head/sys/arm/amlogic/aml8726/std.aml8726 Sat Jul 28 04:06:33 2018 (r336803) +++ head/sys/arm/amlogic/aml8726/std.aml8726 Sat Jul 28 06:46:10 2018 (r336804) @@ -20,9 +20,6 @@ files "../amlogic/aml8726/files.aml8726" # Set all global interrupts to be edge triggered, active high. options GIC_DEFAULT_ICFGR_INIT=0xffffffff -options IPI_IRQ_START=0 -options IPI_IRQ_END=15 - #options EARLY_PRINTF #options SOCDEV_PA=0xc8100000 #options SOCDEV_VA=0xd8100000 Modified: head/sys/arm/annapurna/alpine/std.alpine ============================================================================== --- head/sys/arm/annapurna/alpine/std.alpine Sat Jul 28 04:06:33 2018 (r336803) +++ head/sys/arm/annapurna/alpine/std.alpine Sat Jul 28 06:46:10 2018 (r336804) @@ -10,7 +10,4 @@ options KERNVIRTADDR=0xa0200000 makeoptions KERNBASE=0xa0000000 options KERNBASE=0xa0000000 -options IPI_IRQ_START=0 -options IPI_IRQ_END=15 - files "../annapurna/alpine/files.alpine" Modified: head/sys/arm/broadcom/bcm2835/std.bcm2836 ============================================================================== --- head/sys/arm/broadcom/bcm2835/std.bcm2836 Sat Jul 28 04:06:33 2018 (r336803) +++ head/sys/arm/broadcom/bcm2835/std.bcm2836 Sat Jul 28 06:46:10 2018 (r336804) @@ -5,8 +5,6 @@ cpu CPU_CORTEXA makeoptions CONF_CFLAGS="-march=armv7a" options SOC_BCM2836 -options IPI_IRQ_START=76 - files "../broadcom/bcm2835/files.bcm2836" files "../broadcom/bcm2835/files.bcm283x" Modified: head/sys/arm/freescale/imx/std.imx6 ============================================================================== --- head/sys/arm/freescale/imx/std.imx6 Sat Jul 28 04:06:33 2018 (r336803) +++ head/sys/arm/freescale/imx/std.imx6 Sat Jul 28 06:46:10 2018 (r336804) @@ -3,8 +3,5 @@ machine arm armv7 cpu CPU_CORTEXA makeoptions CONF_CFLAGS="-march=armv7a" -options IPI_IRQ_START=0 -options IPI_IRQ_END=15 - files "../freescale/imx/files.imx6" Modified: head/sys/arm/mv/armada38x/std.armada38x ============================================================================== --- head/sys/arm/mv/armada38x/std.armada38x Sat Jul 28 04:06:33 2018 (r336803) +++ head/sys/arm/mv/armada38x/std.armada38x Sat Jul 28 06:46:10 2018 (r336804) @@ -4,6 +4,3 @@ cpu CPU_CORTEXA machine arm armv7 makeoptions CONF_CFLAGS="-march=armv7a" - -options IPI_IRQ_START=0 -options IPI_IRQ_END=15 Modified: head/sys/arm/nvidia/tegra124/std.tegra124 ============================================================================== --- head/sys/arm/nvidia/tegra124/std.tegra124 Sat Jul 28 04:06:33 2018 (r336803) +++ head/sys/arm/nvidia/tegra124/std.tegra124 Sat Jul 28 06:46:10 2018 (r336804) @@ -5,7 +5,4 @@ makeoptions CONF_CFLAGS="-march=armv7a" options INTRNG -options IPI_IRQ_START=0 -options IPI_IRQ_END=15 - files "../nvidia/tegra124/files.tegra124" Modified: head/sys/arm/qemu/std.virt ============================================================================== --- head/sys/arm/qemu/std.virt Sat Jul 28 04:06:33 2018 (r336803) +++ head/sys/arm/qemu/std.virt Sat Jul 28 06:46:10 2018 (r336804) @@ -6,8 +6,5 @@ makeoptions CONF_CFLAGS="-march=armv7a" options KERNVIRTADDR = 0xc1000000 makeoptions KERNVIRTADDR = 0xc1000000 -options IPI_IRQ_START=0 -options IPI_IRQ_END=15 - files "../qemu/files.qemu" Modified: head/sys/arm/rockchip/std.rk30xx ============================================================================== --- head/sys/arm/rockchip/std.rk30xx Sat Jul 28 04:06:33 2018 (r336803) +++ head/sys/arm/rockchip/std.rk30xx Sat Jul 28 06:46:10 2018 (r336804) @@ -5,7 +5,4 @@ cpu CPU_CORTEXA machine arm armv7 makeoptions CONF_CFLAGS="-march=armv7a" -options IPI_IRQ_START=0 -options IPI_IRQ_END=15 - files "../rockchip/files.rk30xx" Modified: head/sys/arm/samsung/exynos/std.exynos5250 ============================================================================== --- head/sys/arm/samsung/exynos/std.exynos5250 Sat Jul 28 04:06:33 2018 (r336803) +++ head/sys/arm/samsung/exynos/std.exynos5250 Sat Jul 28 06:46:10 2018 (r336804) @@ -4,7 +4,4 @@ cpu CPU_CORTEXA machine arm armv7 makeoptions CONF_CFLAGS="-march=armv7a" -options IPI_IRQ_START=0 -options IPI_IRQ_END=15 - files "../samsung/exynos/files.exynos5" Modified: head/sys/arm/samsung/exynos/std.exynos5420 ============================================================================== --- head/sys/arm/samsung/exynos/std.exynos5420 Sat Jul 28 04:06:33 2018 (r336803) +++ head/sys/arm/samsung/exynos/std.exynos5420 Sat Jul 28 06:46:10 2018 (r336804) @@ -4,7 +4,4 @@ cpu CPU_CORTEXA machine arm armv7 makeoptions CONF_CFLAGS="-march=armv7a" -options IPI_IRQ_START=0 -options IPI_IRQ_END=15 - files "../samsung/exynos/files.exynos5" Modified: head/sys/arm/xilinx/std.zynq7 ============================================================================== --- head/sys/arm/xilinx/std.zynq7 Sat Jul 28 04:06:33 2018 (r336803) +++ head/sys/arm/xilinx/std.zynq7 Sat Jul 28 06:46:10 2018 (r336804) @@ -8,6 +8,3 @@ machine arm armv7 makeoptions CONF_CFLAGS="-march=armv7a" files "../xilinx/files.zynq7" - -options IPI_IRQ_START=0 -options IPI_IRQ_END=15 From owner-svn-src-head@freebsd.org Sat Jul 28 07: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 9692010455A7; Sat, 28 Jul 2018 07:54:22 +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 44AFD8017B; Sat, 28 Jul 2018 07:54:22 +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 22F4A23DD5; Sat, 28 Jul 2018 07:54:22 +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 w6S7sMcY036014; Sat, 28 Jul 2018 07:54:22 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6S7sLY3036012; Sat, 28 Jul 2018 07:54:21 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201807280754.w6S7sLY3036012@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 28 Jul 2018 07:54:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336806 - in head/sys: arm/arm arm/include conf X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys: arm/arm arm/include conf X-SVN-Commit-Revision: 336806 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, 28 Jul 2018 07:54:22 -0000 Author: andrew Date: Sat Jul 28 07:54:21 2018 New Revision: 336806 URL: https://svnweb.freebsd.org/changeset/base/336806 Log: Only support INTRNG in the SMP code on arm. We already require INTRNG on anything that could be multicore on arm. Modified: head/sys/arm/arm/mp_machdep.c head/sys/arm/include/smp.h head/sys/conf/options.arm Modified: head/sys/arm/arm/mp_machdep.c ============================================================================== --- head/sys/arm/arm/mp_machdep.c Sat Jul 28 07:37:01 2018 (r336805) +++ head/sys/arm/arm/mp_machdep.c Sat Jul 28 07:54:21 2018 (r336806) @@ -26,7 +26,6 @@ * SUCH DAMAGE. */ #include "opt_ddb.h" -#include "opt_smp.h" #include __FBSDID("$FreeBSD$"); @@ -75,9 +74,6 @@ volatile int mp_naps; /* Set to 1 once we're ready to let the APs out of the pen. */ volatile int aps_ready = 0; -#ifndef INTRNG -static int ipi_handler(void *arg); -#endif void set_stackptrs(int cpu); /* Temporary variables for init_secondary() */ @@ -153,9 +149,6 @@ init_secondary(int cpu) { struct pcpu *pc; uint32_t loop_counter; -#ifndef INTRNG - int start = 0, end = 0; -#endif pmap_set_tex(); cpuinfo_reinit_mmu(pmap_kern_ttb); @@ -215,20 +208,6 @@ init_secondary(int cpu) mtx_unlock_spin(&ap_boot_mtx); -#ifndef INTRNG - /* Enable ipi */ -#ifdef IPI_IRQ_START - start = IPI_IRQ_START; -#ifdef IPI_IRQ_END - end = IPI_IRQ_END; -#else - end = IPI_IRQ_START; -#endif -#endif - - for (int i = start; i <= end; i++) - arm_unmask_irq(i); -#endif /* INTRNG */ enable_interrupts(PSR_I); loop_counter = 0; @@ -250,7 +229,6 @@ init_secondary(int cpu) /* NOTREACHED */ } -#ifdef INTRNG static void ipi_rendezvous(void *dummy __unused) { @@ -347,126 +325,20 @@ ipi_hardclock(void *arg) critical_exit(); } -#else -static int -ipi_handler(void *arg) -{ - u_int cpu, ipi; - - cpu = PCPU_GET(cpuid); - - ipi = pic_ipi_read((int)arg); - - while ((ipi != 0x3ff)) { - switch (ipi) { - case IPI_RENDEZVOUS: - CTR0(KTR_SMP, "IPI_RENDEZVOUS"); - smp_rendezvous_action(); - break; - - case IPI_AST: - CTR0(KTR_SMP, "IPI_AST"); - break; - - case IPI_STOP: - /* - * IPI_STOP_HARD is mapped to IPI_STOP so it is not - * necessary to add it in the switch. - */ - CTR0(KTR_SMP, "IPI_STOP or IPI_STOP_HARD"); - - savectx(&stoppcbs[cpu]); - - /* - * CPUs are stopped when entering the debugger and at - * system shutdown, both events which can precede a - * panic dump. For the dump to be correct, all caches - * must be flushed and invalidated, but on ARM there's - * no way to broadcast a wbinv_all to other cores. - * Instead, we have each core do the local wbinv_all as - * part of stopping the core. The core requesting the - * stop will do the l2 cache flush after all other cores - * have done their l1 flushes and stopped. - */ - dcache_wbinv_poc_all(); - - /* Indicate we are stopped */ - CPU_SET_ATOMIC(cpu, &stopped_cpus); - - /* Wait for restart */ - while (!CPU_ISSET(cpu, &started_cpus)) - cpu_spinwait(); - - CPU_CLR_ATOMIC(cpu, &started_cpus); - CPU_CLR_ATOMIC(cpu, &stopped_cpus); -#ifdef DDB - dbg_resume_dbreg(); -#endif - CTR0(KTR_SMP, "IPI_STOP (restart)"); - break; - case IPI_PREEMPT: - CTR1(KTR_SMP, "%s: IPI_PREEMPT", __func__); - sched_preempt(curthread); - break; - case IPI_HARDCLOCK: - CTR1(KTR_SMP, "%s: IPI_HARDCLOCK", __func__); - hardclockintr(); - break; - default: - panic("Unknown IPI 0x%0x on cpu %d", ipi, curcpu); - } - - pic_ipi_clear(ipi); - ipi = pic_ipi_read(-1); - } - - return (FILTER_HANDLED); -} -#endif - static void release_aps(void *dummy __unused) { uint32_t loop_counter; -#ifndef INTRNG - int start = 0, end = 0; -#endif if (mp_ncpus == 1) return; -#ifdef INTRNG intr_pic_ipi_setup(IPI_RENDEZVOUS, "rendezvous", ipi_rendezvous, NULL); intr_pic_ipi_setup(IPI_AST, "ast", ipi_ast, NULL); intr_pic_ipi_setup(IPI_STOP, "stop", ipi_stop, NULL); intr_pic_ipi_setup(IPI_PREEMPT, "preempt", ipi_preempt, NULL); intr_pic_ipi_setup(IPI_HARDCLOCK, "hardclock", ipi_hardclock, NULL); -#else -#ifdef IPI_IRQ_START - start = IPI_IRQ_START; -#ifdef IPI_IRQ_END - end = IPI_IRQ_END; -#else - end = IPI_IRQ_START; -#endif -#endif - for (int i = start; i <= end; i++) { - /* - * IPI handler - */ - /* - * Use 0xdeadbeef as the argument value for irq 0, - * if we used 0, the intr code will give the trap frame - * pointer instead. - */ - arm_setup_irqhandler("ipi", ipi_handler, NULL, (void *)i, i, - INTR_TYPE_MISC | INTR_EXCL, NULL); - - /* Enable ipi */ - arm_unmask_irq(i); - } -#endif atomic_store_rel_int(&aps_ready, 1); /* Wake the other threads up */ dsb(); @@ -507,11 +379,7 @@ ipi_all_but_self(u_int ipi) other_cpus = all_cpus; CPU_CLR(PCPU_GET(cpuid), &other_cpus); CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); -#ifdef INTRNG intr_ipi_send(other_cpus, ipi); -#else - pic_ipi_send(other_cpus, ipi); -#endif } void @@ -523,11 +391,7 @@ ipi_cpu(int cpu, u_int ipi) CPU_SET(cpu, &cpus); CTR3(KTR_SMP, "%s: cpu: %d, ipi: %x", __func__, cpu, ipi); -#ifdef INTRNG intr_ipi_send(cpus, ipi); -#else - pic_ipi_send(cpus, ipi); -#endif } void @@ -535,9 +399,5 @@ ipi_selected(cpuset_t cpus, u_int ipi) { CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); -#ifdef INTRNG intr_ipi_send(cpus, ipi); -#else - pic_ipi_send(cpus, ipi); -#endif } Modified: head/sys/arm/include/smp.h ============================================================================== --- head/sys/arm/include/smp.h Sat Jul 28 07:37:01 2018 (r336805) +++ head/sys/arm/include/smp.h Sat Jul 28 07:54:21 2018 (r336806) @@ -6,7 +6,6 @@ #include #include -#ifdef INTRNG enum { IPI_AST, IPI_PREEMPT, @@ -18,16 +17,6 @@ enum { IPI_CACHE, /* Not used now, but keep it reserved. */ INTR_IPI_COUNT }; -#else -#define IPI_AST 0 -#define IPI_PREEMPT 2 -#define IPI_RENDEZVOUS 3 -#define IPI_STOP 4 -#define IPI_STOP_HARD 4 -#define IPI_HARDCLOCK 6 -#define IPI_TLB 7 /* Not used now, but keep it reserved. */ -#define IPI_CACHE 8 /* Not used now, but keep it reserved. */ -#endif /* INTRNG */ void init_secondary(int cpu); void mpentry(void); @@ -35,13 +24,6 @@ void mpentry(void); void ipi_all_but_self(u_int ipi); void ipi_cpu(int cpu, u_int ipi); void ipi_selected(cpuset_t cpus, u_int ipi); - -/* PIC interface */ -#ifndef INTRNG -void pic_ipi_send(cpuset_t cpus, u_int ipi); -void pic_ipi_clear(int ipi); -int pic_ipi_read(int arg); -#endif /* Platform interface */ void platform_mp_setmaxid(void); Modified: head/sys/conf/options.arm ============================================================================== --- head/sys/conf/options.arm Sat Jul 28 07:37:01 2018 (r336805) +++ head/sys/conf/options.arm Sat Jul 28 07:54:21 2018 (r336806) @@ -23,8 +23,6 @@ EFI opt_platform.h FLASHADDR opt_global.h GIC_DEFAULT_ICFGR_INIT opt_global.h INTRNG opt_global.h -IPI_IRQ_START opt_smp.h -IPI_IRQ_END opt_smp.h FREEBSD_BOOT_LOADER opt_global.h KERNBASE opt_global.h KERNVIRTADDR opt_global.h From owner-svn-src-head@freebsd.org Sat Jul 28 10:48: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 03C2C104AA9F; Sat, 28 Jul 2018 10:48:42 +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 A418A84F17; Sat, 28 Jul 2018 10:48:41 +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 805FE259C9; Sat, 28 Jul 2018 10:48:41 +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 w6SAmf18023314; Sat, 28 Jul 2018 10:48:41 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6SAmf3R023313; Sat, 28 Jul 2018 10:48:41 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201807281048.w6SAmf3R023313@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 28 Jul 2018 10:48:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336807 - head/sys/arm/ralink X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm/ralink X-SVN-Commit-Revision: 336807 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, 28 Jul 2018 10:48:42 -0000 Author: andrew Date: Sat Jul 28 10:48:41 2018 New Revision: 336807 URL: https://svnweb.freebsd.org/changeset/base/336807 Log: The RT1310 is an ARM926EJ-S, fix the config to mark it as such. Modified: head/sys/arm/ralink/std.ralink Modified: head/sys/arm/ralink/std.ralink ============================================================================== --- head/sys/arm/ralink/std.ralink Sat Jul 28 07:54:21 2018 (r336806) +++ head/sys/arm/ralink/std.ralink Sat Jul 28 10:48:41 2018 (r336807) @@ -1,5 +1,6 @@ # $FreeBSD$ files "../ralink/files.ralink" -cpu CPU_ARM9 +cpu CPU_ARM9E machine arm +makeoptions CONF_CFLAGS="-march=armv5te" options INTRNG From owner-svn-src-head@freebsd.org Sat Jul 28 11:00: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 2888D104B2C9; Sat, 28 Jul 2018 11:00:47 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F173685DB7; Sat, 28 Jul 2018 11:00:46 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D2B0025B7B; Sat, 28 Jul 2018 11:00:46 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6SB0kv5030527; Sat, 28 Jul 2018 11:00:46 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6SB0kJs029811; Sat, 28 Jul 2018 11:00:46 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201807281100.w6SB0kJs029811@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 28 Jul 2018 11:00:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336813 - in head/sys: arm/arm arm/conf conf X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys: arm/arm arm/conf conf X-SVN-Commit-Revision: 336813 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, 28 Jul 2018 11:00:47 -0000 Author: andrew Date: Sat Jul 28 11:00:45 2018 New Revision: 336813 URL: https://svnweb.freebsd.org/changeset/base/336813 Log: Remove now the cow unused CPU_ARM9 and CPU_FA526 options. These are for ARMv4 CPUs that are no longer supported. Deleted: head/sys/arm/arm/cpufunc_asm_fa526.S head/sys/arm/arm/cpufunc_asm_xscale.S head/sys/arm/arm/cpufunc_asm_xscale_c3.S Modified: head/sys/arm/conf/NOTES head/sys/conf/Makefile.arm head/sys/conf/files.arm head/sys/conf/options.arm Modified: head/sys/arm/conf/NOTES ============================================================================== --- head/sys/arm/conf/NOTES Sat Jul 28 11:00:21 2018 (r336812) +++ head/sys/arm/conf/NOTES Sat Jul 28 11:00:45 2018 (r336813) @@ -2,9 +2,7 @@ machine arm -cpu CPU_ARM9 cpu CPU_ARM9E -cpu CPU_FA526 files "../mv/files.mv" files "../mv/discovery/files.db78xxx" Modified: head/sys/conf/Makefile.arm ============================================================================== --- head/sys/conf/Makefile.arm Sat Jul 28 11:00:21 2018 (r336812) +++ head/sys/conf/Makefile.arm Sat Jul 28 11:00:45 2018 (r336813) @@ -74,9 +74,9 @@ SYSTEM_LD_TAIL +=;sed s/" + SIZEOF_HEADERS"// ldscript FILES_CPU_FUNC = \ $S/$M/$M/cpufunc_asm_arm9.S \ - $S/$M/$M/cpufunc_asm_xscale.S $S/$M/$M/cpufunc_asm.S \ - $S/$M/$M/cpufunc_asm_xscale_c3.S $S/$M/$M/cpufunc_asm_armv5_ec.S \ - $S/$M/$M/cpufunc_asm_fa526.S $S/$M/$M/cpufunc_asm_sheeva.S + $S/$M/$M/cpufunc_asm.S \ + $S/$M/$M/cpufunc_asm_armv5_ec.S \ + $S/$M/$M/cpufunc_asm_sheeva.S .if ${MACHINE_ARCH:Marmv[67]*} == "" && defined(KERNPHYSADDR) KERNEL_EXTRA=trampoline Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Sat Jul 28 11:00:21 2018 (r336812) +++ head/sys/conf/files.arm Sat Jul 28 11:00:45 2018 (r336813) @@ -30,16 +30,13 @@ arm/arm/busdma_machdep-v6.c optional armv7 | armv6 | arm/arm/copystr.S standard arm/arm/cpufunc.c standard arm/arm/cpufunc_asm.S standard -arm/arm/cpufunc_asm_arm9.S optional cpu_arm9 | cpu_arm9e +arm/arm/cpufunc_asm_arm9.S optional cpu_arm9e arm/arm/cpufunc_asm_arm11x6.S optional cpu_arm1176 -arm/arm/cpufunc_asm_armv4.S optional cpu_arm9 | cpu_arm9e | cpu_fa526 | cpu_xscale_pxa2x0 | cpu_xscale_81342 +arm/arm/cpufunc_asm_armv4.S optional cpu_arm9e arm/arm/cpufunc_asm_armv5_ec.S optional cpu_arm9e arm/arm/cpufunc_asm_armv7.S optional cpu_cortexa | cpu_krait | cpu_mv_pj4b -arm/arm/cpufunc_asm_fa526.S optional cpu_fa526 arm/arm/cpufunc_asm_pj4b.S optional cpu_mv_pj4b arm/arm/cpufunc_asm_sheeva.S optional cpu_arm9e -arm/arm/cpufunc_asm_xscale.S optional cpu_xscale_pxa2x0 | cpu_xscale_81342 -arm/arm/cpufunc_asm_xscale_c3.S optional cpu_xscale_81342 arm/arm/cpuinfo.c standard arm/arm/cpu_asm-v6.S optional armv7 | armv6 arm/arm/db_disasm.c optional ddb Modified: head/sys/conf/options.arm ============================================================================== --- head/sys/conf/options.arm Sat Jul 28 11:00:21 2018 (r336812) +++ head/sys/conf/options.arm Sat Jul 28 11:00:45 2018 (r336813) @@ -9,12 +9,10 @@ ARM_USE_V6_BUSDMA opt_global.h ARM_WANT_TP_ADDRESS opt_global.h COUNTS_PER_SEC opt_timer.h CPSW_ETHERSWITCH opt_cpsw.h -CPU_ARM9 opt_global.h CPU_ARM9E opt_global.h CPU_ARM1176 opt_global.h CPU_CORTEXA opt_global.h CPU_KRAIT opt_global.h -CPU_FA526 opt_global.h CPU_MV_PJ4B opt_global.h SMP_ON_UP opt_global.h # Runtime detection of MP extensions DEV_GIC opt_global.h From owner-svn-src-head@freebsd.org Sat Jul 28 11:01: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 0BA8F104B540; Sat, 28 Jul 2018 11:01:56 +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 A7AF4860FA; Sat, 28 Jul 2018 11:01:55 +0000 (UTC) (envelope-from andrew@freebsd.org) Received: from [IPv6:2a02:c7f:1e13:cf00:24b4:9d71:ce9b:cd29] (unknown [IPv6:2a02:c7f:1e13:cf00:24b4:9d71:ce9b:cd29]) by fry.fubar.geek.nz (Postfix) with ESMTPSA id ACE3A4EBDD; Sat, 28 Jul 2018 11:01:47 +0000 (UTC) From: Andrew Turner Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) Subject: Re: svn commit: r336813 - in head/sys: arm/arm arm/conf conf Date: Sat, 28 Jul 2018 12:01:46 +0100 References: <201807281100.w6SB0kJs029811@repo.freebsd.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: <201807281100.w6SB0kJs029811@repo.freebsd.org> Message-Id: <70072E9A-20E8-40AC-89EA-9C13269591CC@freebsd.org> 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, 28 Jul 2018 11:01:56 -0000 > On 28 Jul 2018, at 12:00, Andrew Turner wrote: > > Author: andrew > Date: Sat Jul 28 11:00:45 2018 > New Revision: 336813 > URL: https://svnweb.freebsd.org/changeset/base/336813 > > Log: > Remove now the cow unused CPU_ARM9 and CPU_FA526 options. These are for > ARMv4 CPUs that are no longer supported. While here also remove unused xscale files. Andrew From owner-svn-src-head@freebsd.org Sat Jul 28 11:58: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 94A07104D698; Sat, 28 Jul 2018 11:58:44 +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 432BB89395; Sat, 28 Jul 2018 11:58:44 +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 260B926516; Sat, 28 Jul 2018 11:58:44 +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 w6SBwhOY060413; Sat, 28 Jul 2018 11:58:43 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6SBwheM060412; Sat, 28 Jul 2018 11:58:43 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201807281158.w6SBwheM060412@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 28 Jul 2018 11:58:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336825 - head/sys/arm/arm X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm/arm X-SVN-Commit-Revision: 336825 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, 28 Jul 2018 11:58:44 -0000 Author: andrew Date: Sat Jul 28 11:58:43 2018 New Revision: 336825 URL: https://svnweb.freebsd.org/changeset/base/336825 Log: Remove the old CPU_ values from the arm kernel trampoline. These options are gone so we can remove them from the code. Modified: head/sys/arm/arm/elf_trampoline.c Modified: head/sys/arm/arm/elf_trampoline.c ============================================================================== --- head/sys/arm/arm/elf_trampoline.c Sat Jul 28 11:09:34 2018 (r336824) +++ head/sys/arm/arm/elf_trampoline.c Sat Jul 28 11:58:43 2018 (r336825) @@ -61,26 +61,11 @@ extern void do_call(void *, void *, void *, int); #define GZ_HEAD 0xa -#if defined(CPU_ARM9) -#define cpu_idcache_wbinv_all arm9_idcache_wbinv_all -extern void arm9_idcache_wbinv_all(void); -#elif defined(CPU_FA526) -#define cpu_idcache_wbinv_all fa526_idcache_wbinv_all -extern void fa526_idcache_wbinv_all(void); -#elif defined(CPU_ARM9E) +#if defined(CPU_ARM9E) #define cpu_idcache_wbinv_all armv5_ec_idcache_wbinv_all extern void armv5_ec_idcache_wbinv_all(void); -#elif defined(CPU_XSCALE_PXA2X0) -#define cpu_idcache_wbinv_all xscale_cache_purgeID -extern void xscale_cache_purgeID(void); -#elif defined(CPU_XSCALE_81342) -#define cpu_idcache_wbinv_all xscalec3_cache_purgeID -extern void xscalec3_cache_purgeID(void); #endif -#ifdef CPU_XSCALE_81342 -#define cpu_l2cache_wbinv_all xscalec3_l2cache_purge -extern void xscalec3_l2cache_purge(void); -#elif defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_DISCOVERY) +#if defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_DISCOVERY) #define cpu_l2cache_wbinv_all sheeva_l2cache_wbinv_all extern void sheeva_l2cache_wbinv_all(void); #else @@ -121,11 +106,6 @@ static int arm_dcache_l2_linesize; */ static struct arm_boot_params s_boot_params; -extern int arm9_dcache_sets_inc; -extern int arm9_dcache_sets_max; -extern int arm9_dcache_index_max; -extern int arm9_dcache_index_inc; - static __inline void * memcpy(void *dst, const void *src, int len) { @@ -165,8 +145,6 @@ bzero(void *addr, int count) } } -static void arm9_setup(void); - void _startC(unsigned r0, unsigned r1, unsigned r2, unsigned r3) { @@ -250,13 +228,6 @@ _startC(unsigned r0, unsigned r1, unsigned r2, unsigne "2: nop\n" "mov sp, %2\n" : "=r" (tmp1), "+r" (kernphysaddr), "+r" (sp)); -#ifndef KZIP -#ifdef CPU_ARM9 - /* So that idcache_wbinv works; */ - if ((cpu_ident() & 0x0000f000) == 0x00009000) - arm9_setup(); -#endif -#endif __start(); } @@ -368,18 +339,6 @@ get_cachetype_cp15() } } -static void -arm9_setup(void) -{ - - get_cachetype_cp15(); - arm9_dcache_sets_inc = 1U << arm_dcache_l2_linesize; - arm9_dcache_sets_max = (1U << (arm_dcache_l2_linesize + - arm_dcache_l2_nsets)) - arm9_dcache_sets_inc; - arm9_dcache_index_inc = 1U << (32 - arm_dcache_l2_assoc); - arm9_dcache_index_max = 0U - arm9_dcache_index_inc; -} - #ifdef KZIP static unsigned char *orig_input, *i_input, *i_output; @@ -684,11 +643,6 @@ __start(void) pt_addr = L1_TABLE_SIZE + rounddown2((int)&_end + KERNSIZE + 0x100, L1_TABLE_SIZE); -#ifdef CPU_ARM9 - /* So that idcache_wbinv works; */ - if ((cpu_ident() & 0x0000f000) == 0x00009000) - arm9_setup(); -#endif setup_pagetables(pt_addr, (vm_paddr_t)curaddr, (vm_paddr_t)curaddr + 0x10000000, 1); /* Gzipped kernel */ From owner-svn-src-head@freebsd.org Sat Jul 28 12:00: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 B0FEA104DD3D; Sat, 28 Jul 2018 12:00:33 +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 88D47896A2; Sat, 28 Jul 2018 12:00:33 +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 6A19026522; Sat, 28 Jul 2018 12:00:33 +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 w6SC0XOS060786; Sat, 28 Jul 2018 12:00:33 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6SC0WDu060783; Sat, 28 Jul 2018 12:00:32 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201807281200.w6SC0WDu060783@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 28 Jul 2018 12:00:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336826 - in head/sys/arm: arm include X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys/arm: arm include X-SVN-Commit-Revision: 336826 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, 28 Jul 2018 12:00:33 -0000 Author: andrew Date: Sat Jul 28 12:00:32 2018 New Revision: 336826 URL: https://svnweb.freebsd.org/changeset/base/336826 Log: Remove old CPU_ values from the arm cpufunc code. These have been removed. Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/cpufunc_asm_arm9.S head/sys/arm/include/cpufunc.h Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Sat Jul 28 11:58:43 2018 (r336825) +++ head/sys/arm/arm/cpufunc.c Sat Jul 28 12:00:32 2018 (r336826) @@ -61,10 +61,6 @@ __FBSDID("$FreeBSD$"); #include -#if defined(CPU_XSCALE_81342) -#include -#endif - /* PRIMARY CACHE VARIABLES */ int arm_picache_size; int arm_picache_line_size; @@ -84,57 +80,6 @@ u_int arm_cache_level; u_int arm_cache_type[14]; u_int arm_cache_loc; -#ifdef CPU_ARM9 -struct cpu_functions arm9_cpufuncs = { - /* CPU functions */ - - cpufunc_nullop, /* cpwait */ - - /* MMU functions */ - - cpufunc_control, /* control */ - arm9_setttb, /* Setttb */ - - /* TLB functions */ - - armv4_tlb_flushID, /* tlb_flushID */ - arm9_tlb_flushID_SE, /* tlb_flushID_SE */ - armv4_tlb_flushD, /* tlb_flushD */ - armv4_tlb_flushD_SE, /* tlb_flushD_SE */ - - /* Cache operations */ - - arm9_icache_sync_range, /* icache_sync_range */ - - arm9_dcache_wbinv_all, /* dcache_wbinv_all */ - arm9_dcache_wbinv_range, /* dcache_wbinv_range */ - arm9_dcache_inv_range, /* dcache_inv_range */ - arm9_dcache_wb_range, /* dcache_wb_range */ - - armv4_idcache_inv_all, /* idcache_inv_all */ - arm9_idcache_wbinv_all, /* idcache_wbinv_all */ - arm9_idcache_wbinv_range, /* idcache_wbinv_range */ - cpufunc_nullop, /* l2cache_wbinv_all */ - (void *)cpufunc_nullop, /* l2cache_wbinv_range */ - (void *)cpufunc_nullop, /* l2cache_inv_range */ - (void *)cpufunc_nullop, /* l2cache_wb_range */ - (void *)cpufunc_nullop, /* l2cache_drain_writebuf */ - - /* Other functions */ - - armv4_drain_writebuf, /* drain_writebuf */ - - (void *)cpufunc_nullop, /* sleep */ - - /* Soft functions */ - - arm9_context_switch, /* context_switch */ - - arm9_setup /* cpu setup */ - -}; -#endif /* CPU_ARM9 */ - #if defined(CPU_ARM9E) struct cpu_functions armv5_ec_cpufuncs = { /* CPU functions */ @@ -254,160 +199,6 @@ struct cpu_functions pj4bv7_cpufuncs = { }; #endif /* CPU_MV_PJ4B */ -#if defined(CPU_XSCALE_PXA2X0) - -struct cpu_functions xscale_cpufuncs = { - /* CPU functions */ - - xscale_cpwait, /* cpwait */ - - /* MMU functions */ - - xscale_control, /* control */ - xscale_setttb, /* setttb */ - - /* TLB functions */ - - armv4_tlb_flushID, /* tlb_flushID */ - xscale_tlb_flushID_SE, /* tlb_flushID_SE */ - armv4_tlb_flushD, /* tlb_flushD */ - armv4_tlb_flushD_SE, /* tlb_flushD_SE */ - - /* Cache operations */ - - xscale_cache_syncI_rng, /* icache_sync_range */ - - xscale_cache_purgeD, /* dcache_wbinv_all */ - xscale_cache_purgeD_rng, /* dcache_wbinv_range */ - xscale_cache_flushD_rng, /* dcache_inv_range */ - xscale_cache_cleanD_rng, /* dcache_wb_range */ - - xscale_cache_flushID, /* idcache_inv_all */ - xscale_cache_purgeID, /* idcache_wbinv_all */ - xscale_cache_purgeID_rng, /* idcache_wbinv_range */ - cpufunc_nullop, /* l2cache_wbinv_all */ - (void *)cpufunc_nullop, /* l2cache_wbinv_range */ - (void *)cpufunc_nullop, /* l2cache_inv_range */ - (void *)cpufunc_nullop, /* l2cache_wb_range */ - (void *)cpufunc_nullop, /* l2cache_drain_writebuf */ - - /* Other functions */ - - armv4_drain_writebuf, /* drain_writebuf */ - - xscale_cpu_sleep, /* sleep */ - - /* Soft functions */ - - xscale_context_switch, /* context_switch */ - - xscale_setup /* cpu setup */ -}; -#endif -/* CPU_XSCALE_PXA2X0 */ - -#ifdef CPU_XSCALE_81342 -struct cpu_functions xscalec3_cpufuncs = { - /* CPU functions */ - - xscale_cpwait, /* cpwait */ - - /* MMU functions */ - - xscale_control, /* control */ - xscalec3_setttb, /* setttb */ - - /* TLB functions */ - - armv4_tlb_flushID, /* tlb_flushID */ - xscale_tlb_flushID_SE, /* tlb_flushID_SE */ - armv4_tlb_flushD, /* tlb_flushD */ - armv4_tlb_flushD_SE, /* tlb_flushD_SE */ - - /* Cache operations */ - - xscalec3_cache_syncI_rng, /* icache_sync_range */ - - xscalec3_cache_purgeD, /* dcache_wbinv_all */ - xscalec3_cache_purgeD_rng, /* dcache_wbinv_range */ - xscale_cache_flushD_rng, /* dcache_inv_range */ - xscalec3_cache_cleanD_rng, /* dcache_wb_range */ - - xscale_cache_flushID, /* idcache_inv_all */ - xscalec3_cache_purgeID, /* idcache_wbinv_all */ - xscalec3_cache_purgeID_rng, /* idcache_wbinv_range */ - xscalec3_l2cache_purge, /* l2cache_wbinv_all */ - xscalec3_l2cache_purge_rng, /* l2cache_wbinv_range */ - xscalec3_l2cache_flush_rng, /* l2cache_inv_range */ - xscalec3_l2cache_clean_rng, /* l2cache_wb_range */ - (void *)cpufunc_nullop, /* l2cache_drain_writebuf */ - - /* Other functions */ - - armv4_drain_writebuf, /* drain_writebuf */ - - xscale_cpu_sleep, /* sleep */ - - /* Soft functions */ - - xscalec3_context_switch, /* context_switch */ - - xscale_setup /* cpu setup */ -}; -#endif /* CPU_XSCALE_81342 */ - - -#if defined(CPU_FA526) -struct cpu_functions fa526_cpufuncs = { - /* CPU functions */ - - cpufunc_nullop, /* cpwait */ - - /* MMU functions */ - - cpufunc_control, /* control */ - fa526_setttb, /* setttb */ - - /* TLB functions */ - - armv4_tlb_flushID, /* tlb_flushID */ - fa526_tlb_flushID_SE, /* tlb_flushID_SE */ - armv4_tlb_flushD, /* tlb_flushD */ - armv4_tlb_flushD_SE, /* tlb_flushD_SE */ - - /* Cache operations */ - - fa526_icache_sync_range, /* icache_sync_range */ - - fa526_dcache_wbinv_all, /* dcache_wbinv_all */ - fa526_dcache_wbinv_range, /* dcache_wbinv_range */ - fa526_dcache_inv_range, /* dcache_inv_range */ - fa526_dcache_wb_range, /* dcache_wb_range */ - - armv4_idcache_inv_all, /* idcache_inv_all */ - fa526_idcache_wbinv_all, /* idcache_wbinv_all */ - fa526_idcache_wbinv_range, /* idcache_wbinv_range */ - cpufunc_nullop, /* l2cache_wbinv_all */ - (void *)cpufunc_nullop, /* l2cache_wbinv_range */ - (void *)cpufunc_nullop, /* l2cache_inv_range */ - (void *)cpufunc_nullop, /* l2cache_wb_range */ - (void *)cpufunc_nullop, /* l2cache_drain_writebuf */ - - /* Other functions */ - - armv4_drain_writebuf, /* drain_writebuf */ - - fa526_cpu_sleep, /* sleep */ - - /* Soft functions */ - - - fa526_context_switch, /* context_switch */ - - fa526_setup /* cpu setup */ -}; -#endif /* CPU_FA526 */ - #if defined(CPU_ARM1176) struct cpu_functions arm1176_cpufuncs = { @@ -459,12 +250,9 @@ u_int cputype; u_int cpu_reset_needs_v4_MMU_disable; /* flag used in locore-v4.s */ #endif -#if defined(CPU_ARM9) || \ - defined (CPU_ARM9E) || \ +#if defined (CPU_ARM9E) || \ defined(CPU_ARM1176) || \ - defined(CPU_XSCALE_PXA2X0) || \ - defined(CPU_FA526) || defined(CPU_MV_PJ4B) || \ - defined(CPU_XSCALE_81342) || \ + defined(CPU_MV_PJ4B) || \ defined(CPU_CORTEXA) || defined(CPU_KRAIT) /* Global cache line sizes, use 32 as default */ @@ -601,22 +389,6 @@ set_cpufuncs(void) cputype = cpu_ident(); cputype &= CPU_ID_CPU_MASK; -#ifdef CPU_ARM9 - if (((cputype & CPU_ID_IMPLEMENTOR_MASK) == CPU_ID_ARM_LTD || - (cputype & CPU_ID_IMPLEMENTOR_MASK) == CPU_ID_TI) && - (cputype & 0x0000f000) == 0x00009000) { - cpufuncs = arm9_cpufuncs; - cpu_reset_needs_v4_MMU_disable = 1; /* V4 or higher */ - get_cachetype_cp15(); - arm9_dcache_sets_inc = 1U << arm_dcache_l2_linesize; - arm9_dcache_sets_max = (1U << (arm_dcache_l2_linesize + - arm_dcache_l2_nsets)) - arm9_dcache_sets_inc; - arm9_dcache_index_inc = 1U << (32 - arm_dcache_l2_assoc); - arm9_dcache_index_max = 0U - arm9_dcache_index_inc; - pmap_pte_init_generic(); - goto out; - } -#endif /* CPU_ARM9 */ #if defined(CPU_ARM9E) if (cputype == CPU_ID_MV88FR131 || cputype == CPU_ID_MV88FR571_VD || cputype == CPU_ID_MV88FR571_41) { @@ -686,40 +458,6 @@ set_cpufuncs(void) } #endif /* CPU_MV_PJ4B */ -#if defined(CPU_FA526) - if (cputype == CPU_ID_FA526 || cputype == CPU_ID_FA626TE) { - cpufuncs = fa526_cpufuncs; - cpu_reset_needs_v4_MMU_disable = 1; /* SA needs it */ - get_cachetype_cp15(); - pmap_pte_init_generic(); - - goto out; - } -#endif /* CPU_FA526 */ - -#if defined(CPU_XSCALE_81342) - if (cputype == CPU_ID_81342) { - cpufuncs = xscalec3_cpufuncs; - cpu_reset_needs_v4_MMU_disable = 1; /* XScale needs it */ - get_cachetype_cp15(); - pmap_pte_init_xscale(); - goto out; - } -#endif /* CPU_XSCALE_81342 */ -#ifdef CPU_XSCALE_PXA2X0 - /* ignore core revision to test PXA2xx CPUs */ - if ((cputype & ~CPU_ID_XSCALE_COREREV_MASK) == CPU_ID_PXA250 || - (cputype & ~CPU_ID_XSCALE_COREREV_MASK) == CPU_ID_PXA27X || - (cputype & ~CPU_ID_XSCALE_COREREV_MASK) == CPU_ID_PXA210) { - - cpufuncs = xscale_cpufuncs; - cpu_reset_needs_v4_MMU_disable = 1; /* XScale needs it */ - get_cachetype_cp15(); - pmap_pte_init_xscale(); - - goto out; - } -#endif /* CPU_XSCALE_PXA2X0 */ /* * Bzzzz. And the answer was ... */ @@ -734,44 +472,6 @@ out: * CPU Setup code */ -#ifdef CPU_ARM9 -void -arm9_setup(void) -{ - int cpuctrl, cpuctrlmask; - - cpuctrl = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_32BP_ENABLE - | CPU_CONTROL_32BD_ENABLE | CPU_CONTROL_SYST_ENABLE - | CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE - | CPU_CONTROL_WBUF_ENABLE | CPU_CONTROL_LABT_ENABLE | - CPU_CONTROL_ROUNDROBIN; - cpuctrlmask = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_32BP_ENABLE - | CPU_CONTROL_32BD_ENABLE | CPU_CONTROL_SYST_ENABLE - | CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE - | CPU_CONTROL_WBUF_ENABLE | CPU_CONTROL_ROM_ENABLE - | CPU_CONTROL_BEND_ENABLE | CPU_CONTROL_AFLT_ENABLE - | CPU_CONTROL_LABT_ENABLE | CPU_CONTROL_VECRELOC - | CPU_CONTROL_ROUNDROBIN; - -#ifndef ARM32_DISABLE_ALIGNMENT_FAULTS - cpuctrl |= CPU_CONTROL_AFLT_ENABLE; -#endif - -#ifdef __ARMEB__ - cpuctrl |= CPU_CONTROL_BEND_ENABLE; -#endif - if (vector_page == ARM_VECTORS_HIGH) - cpuctrl |= CPU_CONTROL_VECRELOC; - - /* Clear out the cache */ - cpu_idcache_wbinv_all(); - - /* Set the control register (SCTLR) */ - cpu_control(cpuctrlmask, cpuctrl); - -} -#endif /* CPU_ARM9 */ - #if defined(CPU_ARM9E) void arm10_setup(void) @@ -894,109 +594,3 @@ cortexa_setup(void) cpu_scc_setup_ccnt(); } #endif /* CPU_CORTEXA || CPU_KRAIT */ - -#if defined(CPU_FA526) -void -fa526_setup(void) -{ - int cpuctrl, cpuctrlmask; - - cpuctrl = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_32BP_ENABLE - | CPU_CONTROL_32BD_ENABLE | CPU_CONTROL_SYST_ENABLE - | CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE - | CPU_CONTROL_WBUF_ENABLE | CPU_CONTROL_LABT_ENABLE - | CPU_CONTROL_BPRD_ENABLE; - cpuctrlmask = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_32BP_ENABLE - | CPU_CONTROL_32BD_ENABLE | CPU_CONTROL_SYST_ENABLE - | CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE - | CPU_CONTROL_WBUF_ENABLE | CPU_CONTROL_ROM_ENABLE - | CPU_CONTROL_BEND_ENABLE | CPU_CONTROL_AFLT_ENABLE - | CPU_CONTROL_LABT_ENABLE | CPU_CONTROL_BPRD_ENABLE - | CPU_CONTROL_CPCLK | CPU_CONTROL_VECRELOC; - -#ifndef ARM32_DISABLE_ALIGNMENT_FAULTS - cpuctrl |= CPU_CONTROL_AFLT_ENABLE; -#endif - -#ifdef __ARMEB__ - cpuctrl |= CPU_CONTROL_BEND_ENABLE; -#endif - - if (vector_page == ARM_VECTORS_HIGH) - cpuctrl |= CPU_CONTROL_VECRELOC; - - /* Clear out the cache */ - cpu_idcache_wbinv_all(); - - /* Set the control register */ - cpu_control(0xffffffff, cpuctrl); -} -#endif /* CPU_FA526 */ - -#if defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_81342) -void -xscale_setup(void) -{ - uint32_t auxctl; - int cpuctrl, cpuctrlmask; - - /* - * The XScale Write Buffer is always enabled. Our option - * is to enable/disable coalescing. Note that bits 6:3 - * must always be enabled. - */ - - cpuctrl = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_32BP_ENABLE - | CPU_CONTROL_32BD_ENABLE | CPU_CONTROL_SYST_ENABLE - | CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE - | CPU_CONTROL_WBUF_ENABLE | CPU_CONTROL_LABT_ENABLE - | CPU_CONTROL_BPRD_ENABLE; - cpuctrlmask = CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_32BP_ENABLE - | CPU_CONTROL_32BD_ENABLE | CPU_CONTROL_SYST_ENABLE - | CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE - | CPU_CONTROL_WBUF_ENABLE | CPU_CONTROL_ROM_ENABLE - | CPU_CONTROL_BEND_ENABLE | CPU_CONTROL_AFLT_ENABLE - | CPU_CONTROL_LABT_ENABLE | CPU_CONTROL_BPRD_ENABLE - | CPU_CONTROL_CPCLK | CPU_CONTROL_VECRELOC | \ - CPU_CONTROL_L2_ENABLE; - -#ifndef ARM32_DISABLE_ALIGNMENT_FAULTS - cpuctrl |= CPU_CONTROL_AFLT_ENABLE; -#endif - -#ifdef __ARMEB__ - cpuctrl |= CPU_CONTROL_BEND_ENABLE; -#endif - - if (vector_page == ARM_VECTORS_HIGH) - cpuctrl |= CPU_CONTROL_VECRELOC; -#ifdef CPU_XSCALE_CORE3 - cpuctrl |= CPU_CONTROL_L2_ENABLE; -#endif - - /* Clear out the cache */ - cpu_idcache_wbinv_all(); - - /* - * Set the control register. Note that bits 6:3 must always - * be set to 1. - */ -/* cpu_control(cpuctrlmask, cpuctrl);*/ - cpu_control(0xffffffff, cpuctrl); - - /* Make sure write coalescing is turned on */ - __asm __volatile("mrc p15, 0, %0, c1, c0, 1" - : "=r" (auxctl)); -#ifdef XSCALE_NO_COALESCE_WRITES - auxctl |= XSCALE_AUXCTL_K; -#else - auxctl &= ~XSCALE_AUXCTL_K; -#endif -#ifdef CPU_XSCALE_CORE3 - auxctl |= XSCALE_AUXCTL_LLR; - auxctl |= XSCALE_AUXCTL_MD_MASK; -#endif - __asm __volatile("mcr p15, 0, %0, c1, c0, 1" - : : "r" (auxctl)); -} -#endif /* CPU_XSCALE_PXA2X0 */ Modified: head/sys/arm/arm/cpufunc_asm_arm9.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_arm9.S Sat Jul 28 11:58:43 2018 (r336825) +++ head/sys/arm/arm/cpufunc_asm_arm9.S Sat Jul 28 12:00:32 2018 (r336826) @@ -35,23 +35,6 @@ __FBSDID("$FreeBSD$"); /* - * Functions to set the MMU Translation Table Base register - * - * We need to clean and flush the cache as it uses virtual - * addresses that are about to change. - */ -ENTRY(arm9_setttb) - stmfd sp!, {r0, lr} - bl _C_LABEL(arm9_idcache_wbinv_all) - ldmfd sp!, {r0, lr} - - mcr p15, 0, r0, c2, c0, 0 /* load new TTB */ - - mcr p15, 0, r0, c8, c7, 0 /* invalidate I+D TLBs */ - mov pc, lr -END(arm9_setttb) - -/* * TLB functions */ ENTRY(arm9_tlb_flushID_SE) @@ -61,160 +44,6 @@ ENTRY(arm9_tlb_flushID_SE) END(arm9_tlb_flushID_SE) /* - * Cache operations. For the entire cache we use the set/index - * operations. - */ - s_max .req r0 - i_max .req r1 - s_inc .req r2 - i_inc .req r3 - -ENTRY_NP(arm9_icache_sync_range) - ldr ip, .Larm9_line_size - cmp r1, #0x4000 - bcs .Larm9_icache_sync_all - ldr ip, [ip] - sub r3, ip, #1 - and r2, r0, r3 - add r1, r1, r2 - bic r0, r0, r3 -.Larm9_sync_next: - mcr p15, 0, r0, c7, c5, 1 /* Invalidate I cache SE with VA */ - mcr p15, 0, r0, c7, c10, 1 /* Clean D cache SE with VA */ - add r0, r0, ip - subs r1, r1, ip - bhi .Larm9_sync_next - mov pc, lr - -.Larm9_icache_sync_all: - /* - * We assume that the code here can never be out of sync with the - * dcache, so that we can safely flush the Icache and fall through - * into the Dcache cleaning code. - */ - mcr p15, 0, r0, c7, c5, 0 /* Flush I cache */ - /* Fall through to clean Dcache. */ - -.Larm9_dcache_wb: - ldr ip, .Larm9_cache_data - ldmia ip, {s_max, i_max, s_inc, i_inc} -.Lnext_set: - orr ip, s_max, i_max -.Lnext_index: - mcr p15, 0, ip, c7, c10, 2 /* Clean D cache SE with Set/Index */ - subs ip, ip, i_inc - bhs .Lnext_index /* Next index */ - subs s_max, s_max, s_inc - bhs .Lnext_set /* Next set */ - mov pc, lr -END(arm9_icache_sync_range) - -.Larm9_line_size: - .word _C_LABEL(arm_pdcache_line_size) - -ENTRY(arm9_dcache_wb_range) - ldr ip, .Larm9_line_size - cmp r1, #0x4000 - bcs .Larm9_dcache_wb - ldr ip, [ip] - sub r3, ip, #1 - and r2, r0, r3 - add r1, r1, r2 - bic r0, r0, r3 -.Larm9_wb_next: - mcr p15, 0, r0, c7, c10, 1 /* Clean D cache SE with VA */ - add r0, r0, ip - subs r1, r1, ip - bhi .Larm9_wb_next - mov pc, lr -END(arm9_dcache_wb_range) - -ENTRY(arm9_dcache_wbinv_range) - ldr ip, .Larm9_line_size - cmp r1, #0x4000 - bcs .Larm9_dcache_wbinv_all - ldr ip, [ip] - sub r3, ip, #1 - and r2, r0, r3 - add r1, r1, r2 - bic r0, r0, r3 -.Larm9_wbinv_next: - mcr p15, 0, r0, c7, c14, 1 /* Purge D cache SE with VA */ - add r0, r0, ip - subs r1, r1, ip - bhi .Larm9_wbinv_next - mov pc, lr -END(arm9_dcache_wbinv_range) - -/* - * Note, we must not invalidate everything. If the range is too big we - * must use wb-inv of the entire cache. - */ -ENTRY(arm9_dcache_inv_range) - ldr ip, .Larm9_line_size - cmp r1, #0x4000 - bcs .Larm9_dcache_wbinv_all - ldr ip, [ip] - sub r3, ip, #1 - and r2, r0, r3 - add r1, r1, r2 - bic r0, r0, r3 -.Larm9_inv_next: - mcr p15, 0, r0, c7, c6, 1 /* Invalidate D cache SE with VA */ - add r0, r0, ip - subs r1, r1, ip - bhi .Larm9_inv_next - mov pc, lr -END(arm9_dcache_inv_range) - -ENTRY(arm9_idcache_wbinv_range) - ldr ip, .Larm9_line_size - cmp r1, #0x4000 - bcs .Larm9_idcache_wbinv_all - ldr ip, [ip] - sub r3, ip, #1 - and r2, r0, r3 - add r1, r1, r2 - bic r0, r0, r3 -.Larm9_id_wbinv_next: - mcr p15, 0, r0, c7, c5, 1 /* Invalidate I cache SE with VA */ - mcr p15, 0, r0, c7, c14, 1 /* Purge D cache SE with VA */ - add r0, r0, ip - subs r1, r1, ip - bhi .Larm9_id_wbinv_next - mov pc, lr -END(arm9_idcache_wbinv_range) - -ENTRY_NP(arm9_idcache_wbinv_all) -.Larm9_idcache_wbinv_all: - /* - * We assume that the code here can never be out of sync with the - * dcache, so that we can safely flush the Icache and fall through - * into the Dcache purging code. - */ - mcr p15, 0, r0, c7, c5, 0 /* Flush I cache */ - /* Fall through */ - -EENTRY(arm9_dcache_wbinv_all) -.Larm9_dcache_wbinv_all: - ldr ip, .Larm9_cache_data - ldmia ip, {s_max, i_max, s_inc, i_inc} -.Lnext_set_inv: - orr ip, s_max, i_max -.Lnext_index_inv: - mcr p15, 0, ip, c7, c14, 2 /* Purge D cache SE with Set/Index */ - subs ip, ip, i_inc - bhs .Lnext_index_inv /* Next index */ - subs s_max, s_max, s_inc - bhs .Lnext_set_inv /* Next set */ - mov pc, lr -EEND(arm9_dcache_wbinv_all) -END(arm9_idcache_wbinv_all) - -.Larm9_cache_data: - .word _C_LABEL(arm9_dcache_sets_max) - -/* * Context switch. * * These is the CPU-specific parts of the context switcher cpu_switch() @@ -238,24 +67,3 @@ ENTRY(arm9_context_switch) nop mov pc, lr END(arm9_context_switch) - - .bss - -/* XXX The following macros should probably be moved to asm.h */ -#define _DATA_OBJECT(x) .globl x; .type x,_ASM_TYPE_OBJECT; x: -#define C_OBJECT(x) _DATA_OBJECT(_C_LABEL(x)) - -/* - * Parameters for the cache cleaning code. Note that the order of these - * four variables is assumed in the code above. Hence the reason for - * declaring them in the assembler file. - */ - .align 2 -C_OBJECT(arm9_dcache_sets_max) - .space 4 -C_OBJECT(arm9_dcache_index_max) - .space 4 -C_OBJECT(arm9_dcache_sets_inc) - .space 4 -C_OBJECT(arm9_dcache_index_inc) - .space 4 Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Sat Jul 28 11:58:43 2018 (r336825) +++ head/sys/arm/include/cpufunc.h Sat Jul 28 12:00:32 2018 (r336826) @@ -216,49 +216,10 @@ u_int cpu_faultaddress (void); u_int cpu_get_control (void); u_int cpu_pfr (int); -#if defined(CPU_FA526) -void fa526_setup (void); -void fa526_setttb (u_int ttb); -void fa526_context_switch (void); -void fa526_cpu_sleep (int); -void fa526_tlb_flushID_SE (u_int); - -void fa526_icache_sync_range(vm_offset_t start, vm_size_t end); -void fa526_dcache_wbinv_all (void); -void fa526_dcache_wbinv_range(vm_offset_t start, vm_size_t end); -void fa526_dcache_inv_range (vm_offset_t start, vm_size_t end); -void fa526_dcache_wb_range (vm_offset_t start, vm_size_t end); -void fa526_idcache_wbinv_all(void); -void fa526_idcache_wbinv_range(vm_offset_t start, vm_size_t end); -#endif - - -#if defined(CPU_ARM9) || defined(CPU_ARM9E) -void arm9_setttb (u_int); +#if defined(CPU_ARM9E) void arm9_tlb_flushID_SE (u_int va); void arm9_context_switch (void); -#endif -#if defined(CPU_ARM9) -void arm9_icache_sync_range (vm_offset_t, vm_size_t); - -void arm9_dcache_wbinv_all (void); -void arm9_dcache_wbinv_range (vm_offset_t, vm_size_t); -void arm9_dcache_inv_range (vm_offset_t, vm_size_t); -void arm9_dcache_wb_range (vm_offset_t, vm_size_t); - -void arm9_idcache_wbinv_all (void); -void arm9_idcache_wbinv_range (vm_offset_t, vm_size_t); - -void arm9_setup (void); - -extern unsigned arm9_dcache_sets_max; -extern unsigned arm9_dcache_sets_inc; -extern unsigned arm9_dcache_index_max; -extern unsigned arm9_dcache_index_inc; -#endif - -#if defined(CPU_ARM9E) void arm10_setup (void); u_int sheeva_control_ext (u_int, u_int); @@ -303,12 +264,7 @@ void armv5_ec_dcache_wb_range(vm_offset_t, vm_size_t); void armv5_ec_idcache_wbinv_all(void); void armv5_ec_idcache_wbinv_range(vm_offset_t, vm_size_t); -#endif -#if defined(CPU_ARM9) || defined(CPU_ARM9E) || \ - defined(CPU_FA526) || \ - defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_81342) - void armv4_tlb_flushID (void); void armv4_tlb_flushD (void); void armv4_tlb_flushD_SE (u_int va); @@ -316,71 +272,6 @@ void armv4_tlb_flushD_SE (u_int va); void armv4_drain_writebuf (void); void armv4_idcache_inv_all (void); #endif - -#if defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_81342) -void xscale_cpwait (void); - -void xscale_cpu_sleep (int mode); - -u_int xscale_control (u_int clear, u_int bic); - -void xscale_setttb (u_int ttb); - -void xscale_tlb_flushID_SE (u_int va); - -void xscale_cache_flushID (void); -void xscale_cache_flushI (void); -void xscale_cache_flushD (void); -void xscale_cache_flushD_SE (u_int entry); - -void xscale_cache_cleanID (void); -void xscale_cache_cleanD (void); -void xscale_cache_cleanD_E (u_int entry); - -void xscale_cache_clean_minidata (void); - -void xscale_cache_purgeID (void); -void xscale_cache_purgeID_E (u_int entry); -void xscale_cache_purgeD (void); -void xscale_cache_purgeD_E (u_int entry); - -void xscale_cache_syncI (void); -void xscale_cache_cleanID_rng (vm_offset_t start, vm_size_t end); -void xscale_cache_cleanD_rng (vm_offset_t start, vm_size_t end); -void xscale_cache_purgeID_rng (vm_offset_t start, vm_size_t end); -void xscale_cache_purgeD_rng (vm_offset_t start, vm_size_t end); -void xscale_cache_syncI_rng (vm_offset_t start, vm_size_t end); -void xscale_cache_flushD_rng (vm_offset_t start, vm_size_t end); - -void xscale_context_switch (void); - -void xscale_setup (void); -#endif /* CPU_XSCALE_PXA2X0 */ - -#ifdef CPU_XSCALE_81342 - -void xscalec3_l2cache_purge (void); -void xscalec3_cache_purgeID (void); -void xscalec3_cache_purgeD (void); -void xscalec3_cache_cleanID (void); -void xscalec3_cache_cleanD (void); -void xscalec3_cache_syncI (void); - -void xscalec3_cache_purgeID_rng (vm_offset_t start, vm_size_t end); -void xscalec3_cache_purgeD_rng (vm_offset_t start, vm_size_t end); -void xscalec3_cache_cleanID_rng (vm_offset_t start, vm_size_t end); -void xscalec3_cache_cleanD_rng (vm_offset_t start, vm_size_t end); -void xscalec3_cache_syncI_rng (vm_offset_t start, vm_size_t end); - -void xscalec3_l2cache_flush_rng (vm_offset_t, vm_size_t); -void xscalec3_l2cache_clean_rng (vm_offset_t start, vm_size_t end); -void xscalec3_l2cache_purge_rng (vm_offset_t start, vm_size_t end); - - -void xscalec3_setttb (u_int ttb); -void xscalec3_context_switch (void); - -#endif /* CPU_XSCALE_81342 */ /* * Macros for manipulating CPU interrupts From owner-svn-src-head@freebsd.org Sat Jul 28 12:16: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 B4E92104F678; Sat, 28 Jul 2018 12:16:58 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1F77F8B574; Sat, 28 Jul 2018 12:16:58 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 009C62686B; Sat, 28 Jul 2018 12:16:58 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6SCGvkV073514; Sat, 28 Jul 2018 12:16:57 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6SCGv9x073513; Sat, 28 Jul 2018 12:16:57 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201807281216.w6SCGv9x073513@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 28 Jul 2018 12:16:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336827 - head/sys/arm/arm X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm/arm X-SVN-Commit-Revision: 336827 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, 28 Jul 2018 12:16:59 -0000 Author: andrew Date: Sat Jul 28 12:16:57 2018 New Revision: 336827 URL: https://svnweb.freebsd.org/changeset/base/336827 Log: Remove an unneeded check for CPU_XSCALE_81342 Modified: head/sys/arm/arm/identcpu-v4.c Modified: head/sys/arm/arm/identcpu-v4.c ============================================================================== --- head/sys/arm/arm/identcpu-v4.c Sat Jul 28 12:00:32 2018 (r336826) +++ head/sys/arm/arm/identcpu-v4.c Sat Jul 28 12:16:57 2018 (r336827) @@ -317,9 +317,6 @@ identify_arm_cpu(void) case CPU_CLASS_MARVELL: print_enadis(ctrl & CPU_CONTROL_DC_ENABLE, "DC"); print_enadis(ctrl & CPU_CONTROL_IC_ENABLE, "IC"); -#ifdef CPU_XSCALE_81342 - print_enadis(ctrl & CPU_CONTROL_L2_ENABLE, "L2"); -#endif #if defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_DISCOVERY) i = sheeva_control_ext(0, 0); print_enadis(i & MV_WA_ENABLE, "WA"); From owner-svn-src-head@freebsd.org Sat Jul 28 12:20: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 355C7104F867; Sat, 28 Jul 2018 12:20:43 +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 E02558B857; Sat, 28 Jul 2018 12:20:42 +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 C2FBA26884; Sat, 28 Jul 2018 12:20:42 +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 w6SCKgUq074847; Sat, 28 Jul 2018 12:20:42 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6SCKgqw074845; Sat, 28 Jul 2018 12:20:42 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201807281220.w6SCKgqw074845@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 28 Jul 2018 12:20:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336828 - in head/sys/arm: arm include X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys/arm: arm include X-SVN-Commit-Revision: 336828 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, 28 Jul 2018 12:20:43 -0000 Author: andrew Date: Sat Jul 28 12:20:42 2018 New Revision: 336828 URL: https://svnweb.freebsd.org/changeset/base/336828 Log: Make the arm cpu setup functions static. Any other place that needs these functions will use the function pointer we create for them. Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/include/cpufunc.h Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Sat Jul 28 12:16:57 2018 (r336827) +++ head/sys/arm/arm/cpufunc.c Sat Jul 28 12:20:42 2018 (r336828) @@ -81,6 +81,19 @@ u_int arm_cache_type[14]; u_int arm_cache_loc; #if defined(CPU_ARM9E) +static void arm10_setup(void); +#endif +#ifdef CPU_MV_PJ4B +static void pj4bv7_setup(void); +#endif +#if defined(CPU_ARM1176) +static void arm11x6_setup(void); +#endif +#if defined(CPU_CORTEXA) || defined(CPU_KRAIT) +static void cortexa_setup(void); +#endif + +#if defined(CPU_ARM9E) struct cpu_functions armv5_ec_cpufuncs = { /* CPU functions */ @@ -473,7 +486,7 @@ out: */ #if defined(CPU_ARM9E) -void +static void arm10_setup(void) { int cpuctrl, cpuctrlmask; @@ -544,7 +557,7 @@ cpu_scc_setup_ccnt(void) #endif #if defined(CPU_ARM1176) -void +static void arm11x6_setup(void) { uint32_t auxctrl, auxctrl_wax; @@ -576,7 +589,7 @@ arm11x6_setup(void) #endif /* CPU_ARM1176 */ #ifdef CPU_MV_PJ4B -void +static void pj4bv7_setup(void) { @@ -586,8 +599,7 @@ pj4bv7_setup(void) #endif /* CPU_MV_PJ4B */ #if defined(CPU_CORTEXA) || defined(CPU_KRAIT) - -void +static void cortexa_setup(void) { Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Sat Jul 28 12:16:57 2018 (r336827) +++ head/sys/arm/include/cpufunc.h Sat Jul 28 12:20:42 2018 (r336828) @@ -220,8 +220,6 @@ u_int cpu_pfr (int); void arm9_tlb_flushID_SE (u_int va); void arm9_context_switch (void); -void arm10_setup (void); - u_int sheeva_control_ext (u_int, u_int); void sheeva_cpu_sleep (int); void sheeva_setttb (u_int); @@ -238,17 +236,12 @@ void sheeva_l2cache_wbinv_all (void); #if defined(CPU_CORTEXA) || defined(CPU_MV_PJ4B) || defined(CPU_KRAIT) void armv7_cpu_sleep (int); -void armv7_setup (void); - -void cortexa_setup (void); #endif #if defined(CPU_MV_PJ4B) void pj4b_config (void); -void pj4bv7_setup (void); #endif #if defined(CPU_ARM1176) -void arm11x6_setup (void); void arm11x6_sleep (int); /* no ref. for errata */ #endif From owner-svn-src-head@freebsd.org Sat Jul 28 12:50: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 C356F10507E9; Sat, 28 Jul 2018 12:50:10 +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 79D788CE0A; Sat, 28 Jul 2018 12:50:10 +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 43F3726D55; Sat, 28 Jul 2018 12:50:10 +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 w6SCoAI9090262; Sat, 28 Jul 2018 12:50:10 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6SCo9VX090259; Sat, 28 Jul 2018 12:50:09 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201807281250.w6SCo9VX090259@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 28 Jul 2018 12:50:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336829 - in head/sys: arm/arm conf X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys: arm/arm conf X-SVN-Commit-Revision: 336829 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, 28 Jul 2018 12:50:11 -0000 Author: andrew Date: Sat Jul 28 12:50:09 2018 New Revision: 336829 URL: https://svnweb.freebsd.org/changeset/base/336829 Log: Only build the cache handling code we need when building the arm ELF trampoline. Modified: head/sys/arm/arm/cpufunc_asm_armv5_ec.S head/sys/arm/arm/cpufunc_asm_sheeva.S head/sys/conf/Makefile.arm Modified: head/sys/arm/arm/cpufunc_asm_armv5_ec.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_armv5_ec.S Sat Jul 28 12:20:42 2018 (r336828) +++ head/sys/arm/arm/cpufunc_asm_armv5_ec.S Sat Jul 28 12:50:09 2018 (r336829) @@ -39,6 +39,7 @@ #include __FBSDID("$FreeBSD$"); +#ifndef ELF_TRAMPOLINE /* * Functions to set the MMU Translation Table Base register * @@ -192,6 +193,7 @@ ENTRY(armv5_ec_idcache_wbinv_range) mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ RET END(armv5_ec_idcache_wbinv_range) +#endif /* !ELF_TRAMPOLINE */ ENTRY_NP(armv5_ec_idcache_wbinv_all) .Larmv5_ec_idcache_wbinv_all: @@ -204,6 +206,7 @@ ENTRY_NP(armv5_ec_idcache_wbinv_all) /* Fall through to purge Dcache. */ END(armv5_ec_idcache_wbinv_all) +#ifndef ELF_TRAMPOLINE ENTRY(armv5_ec_dcache_wbinv_all) .Larmv5_ec_dcache_wbinv_all: 1: mrc p15, 0, APSR_nzcv, c7, c14, 3 /* Test, clean and invalidate DCache */ @@ -211,4 +214,4 @@ ENTRY(armv5_ec_dcache_wbinv_all) mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ RET END(armv5_ec_dcache_wbinv_all) - +#endif Modified: head/sys/arm/arm/cpufunc_asm_sheeva.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_sheeva.S Sat Jul 28 12:20:42 2018 (r336828) +++ head/sys/arm/arm/cpufunc_asm_sheeva.S Sat Jul 28 12:50:09 2018 (r336829) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include +#ifndef ELF_TRAMPOLINE .Lsheeva_cache_line_size: .word _C_LABEL(arm_pdcache_line_size) .Lsheeva_asm_page_mask: @@ -376,6 +377,7 @@ ENTRY(sheeva_l2cache_wb_range) ldr lr, [sp], #4 RET END(sheeva_l2cache_wb_range) +#endif /* !ELF_TRAMPOLINE */ ENTRY(sheeva_l2cache_wbinv_all) /* Disable irqs */ @@ -393,6 +395,7 @@ ENTRY(sheeva_l2cache_wbinv_all) RET END(sheeva_l2cache_wbinv_all) +#ifndef ELF_TRAMPOLINE /* This function modifies register value as follows: * * arg1 arg EFFECT (bit value saved into register) @@ -418,4 +421,4 @@ ENTRY(sheeva_cpu_sleep) mcr p15, 0, r0, c7, c0, 4 /* Wait for interrupt */ mov pc, lr END(sheeva_cpu_sleep) - +#endif /* !ELF_TRAMPOLINE */ Modified: head/sys/conf/Makefile.arm ============================================================================== --- head/sys/conf/Makefile.arm Sat Jul 28 12:20:42 2018 (r336828) +++ head/sys/conf/Makefile.arm Sat Jul 28 12:50:09 2018 (r336829) @@ -73,8 +73,6 @@ SYSTEM_LD_TAIL +=;sed s/" + SIZEOF_HEADERS"// ldscript rm ${FULLKERNEL}.noheader FILES_CPU_FUNC = \ - $S/$M/$M/cpufunc_asm_arm9.S \ - $S/$M/$M/cpufunc_asm.S \ $S/$M/$M/cpufunc_asm_armv5_ec.S \ $S/$M/$M/cpufunc_asm_sheeva.S From owner-svn-src-head@freebsd.org Sat Jul 28 12:52: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 7208D1050A1D; Sat, 28 Jul 2018 12:52:04 +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 289458D275; Sat, 28 Jul 2018 12:52:04 +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 09EEB26ED2; Sat, 28 Jul 2018 12:52:04 +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 w6SCq3GI094414; Sat, 28 Jul 2018 12:52:03 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6SCq3Td094413; Sat, 28 Jul 2018 12:52:03 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201807281252.w6SCq3Td094413@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 28 Jul 2018 12:52:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336830 - head/sys/arm/arm X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm/arm X-SVN-Commit-Revision: 336830 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, 28 Jul 2018 12:52:04 -0000 Author: andrew Date: Sat Jul 28 12:52:03 2018 New Revision: 336830 URL: https://svnweb.freebsd.org/changeset/base/336830 Log: Remove an unused function from the arm ELF trampoline. It tries to find properties about the CPU caches, however we never use these values. Modified: head/sys/arm/arm/elf_trampoline.c Modified: head/sys/arm/arm/elf_trampoline.c ============================================================================== --- head/sys/arm/arm/elf_trampoline.c Sat Jul 28 12:50:09 2018 (r336829) +++ head/sys/arm/arm/elf_trampoline.c Sat Jul 28 12:52:03 2018 (r336830) @@ -72,35 +72,6 @@ extern void sheeva_l2cache_wbinv_all(void); #define cpu_l2cache_wbinv_all() #endif - -int arm_picache_size; -int arm_picache_line_size; -int arm_picache_ways; - -int arm_pdcache_size; /* and unified */ -int arm_pdcache_line_size = 32; -int arm_pdcache_ways; - -int arm_pcache_type; -int arm_pcache_unified; - -int arm_dcache_align; -int arm_dcache_align_mask; - -int arm_dcache_min_line_size = 32; -int arm_icache_min_line_size = 32; -int arm_idcache_min_line_size = 32; - -u_int arm_cache_level; -u_int arm_cache_type[14]; -u_int arm_cache_loc; - -/* Additional cache information local to this file. Log2 of some of the - above numbers. */ -static int arm_dcache_l2_nsets; -static int arm_dcache_l2_assoc; -static int arm_dcache_l2_linesize; - /* * Boot parameters */ @@ -229,114 +200,6 @@ _startC(unsigned r0, unsigned r1, unsigned r2, unsigne "mov sp, %2\n" : "=r" (tmp1), "+r" (kernphysaddr), "+r" (sp)); __start(); -} - -static void -get_cachetype_cp15() -{ - u_int ctype, isize, dsize, cpuid; - u_int clevel, csize, i, sel; - u_int multiplier; - u_char type; - - __asm __volatile("mrc p15, 0, %0, c0, c0, 1" - : "=r" (ctype)); - - cpuid = cpu_ident(); - /* - * ...and thus spake the ARM ARM: - * - * If an value corresponding to an unimplemented or - * reserved ID register is encountered, the System Control - * processor returns the value of the main ID register. - */ - if (ctype == cpuid) - goto out; - - if (CPU_CT_FORMAT(ctype) == CPU_CT_ARMV7) { - /* Resolve minimal cache line sizes */ - arm_dcache_min_line_size = 1 << (CPU_CT_DMINLINE(ctype) + 2); - arm_icache_min_line_size = 1 << (CPU_CT_IMINLINE(ctype) + 2); - arm_idcache_min_line_size = - (arm_dcache_min_line_size > arm_icache_min_line_size ? - arm_icache_min_line_size : arm_dcache_min_line_size); - - __asm __volatile("mrc p15, 1, %0, c0, c0, 1" - : "=r" (clevel)); - arm_cache_level = clevel; - arm_cache_loc = CPU_CLIDR_LOC(arm_cache_level) + 1; - i = 0; - while ((type = (clevel & 0x7)) && i < 7) { - if (type == CACHE_DCACHE || type == CACHE_UNI_CACHE || - type == CACHE_SEP_CACHE) { - sel = i << 1; - __asm __volatile("mcr p15, 2, %0, c0, c0, 0" - : : "r" (sel)); - __asm __volatile("mrc p15, 1, %0, c0, c0, 0" - : "=r" (csize)); - arm_cache_type[sel] = csize; - } - if (type == CACHE_ICACHE || type == CACHE_SEP_CACHE) { - sel = (i << 1) | 1; - __asm __volatile("mcr p15, 2, %0, c0, c0, 0" - : : "r" (sel)); - __asm __volatile("mrc p15, 1, %0, c0, c0, 0" - : "=r" (csize)); - arm_cache_type[sel] = csize; - } - i++; - clevel >>= 3; - } - } else { - if ((ctype & CPU_CT_S) == 0) - arm_pcache_unified = 1; - - /* - * If you want to know how this code works, go read the ARM ARM. - */ - - arm_pcache_type = CPU_CT_CTYPE(ctype); - - if (arm_pcache_unified == 0) { - isize = CPU_CT_ISIZE(ctype); - multiplier = (isize & CPU_CT_xSIZE_M) ? 3 : 2; - arm_picache_line_size = 1U << (CPU_CT_xSIZE_LEN(isize) + 3); - if (CPU_CT_xSIZE_ASSOC(isize) == 0) { - if (isize & CPU_CT_xSIZE_M) - arm_picache_line_size = 0; /* not present */ - else - arm_picache_ways = 1; - } else { - arm_picache_ways = multiplier << - (CPU_CT_xSIZE_ASSOC(isize) - 1); - } - arm_picache_size = multiplier << (CPU_CT_xSIZE_SIZE(isize) + 8); - } - - dsize = CPU_CT_DSIZE(ctype); - multiplier = (dsize & CPU_CT_xSIZE_M) ? 3 : 2; - arm_pdcache_line_size = 1U << (CPU_CT_xSIZE_LEN(dsize) + 3); - if (CPU_CT_xSIZE_ASSOC(dsize) == 0) { - if (dsize & CPU_CT_xSIZE_M) - arm_pdcache_line_size = 0; /* not present */ - else - arm_pdcache_ways = 1; - } else { - arm_pdcache_ways = multiplier << - (CPU_CT_xSIZE_ASSOC(dsize) - 1); - } - arm_pdcache_size = multiplier << (CPU_CT_xSIZE_SIZE(dsize) + 8); - - arm_dcache_align = arm_pdcache_line_size; - - arm_dcache_l2_assoc = CPU_CT_xSIZE_ASSOC(dsize) + multiplier - 2; - arm_dcache_l2_linesize = CPU_CT_xSIZE_LEN(dsize) + 3; - arm_dcache_l2_nsets = 6 + CPU_CT_xSIZE_SIZE(dsize) - - CPU_CT_xSIZE_ASSOC(dsize) - CPU_CT_xSIZE_LEN(dsize); - - out: - arm_dcache_align_mask = arm_dcache_align - 1; - } } #ifdef KZIP From owner-svn-src-head@freebsd.org Sat Jul 28 12:53: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 EEA251050A96; Sat, 28 Jul 2018 12:53:10 +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 A2EF48D41B; Sat, 28 Jul 2018 12:53:10 +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 83BAF26EF8; Sat, 28 Jul 2018 12:53:10 +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 w6SCrAUd095439; Sat, 28 Jul 2018 12:53:10 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6SCrA9C095438; Sat, 28 Jul 2018 12:53:10 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201807281253.w6SCrA9C095438@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 28 Jul 2018 12:53:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336831 - head/sys/arm/arm X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm/arm X-SVN-Commit-Revision: 336831 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, 28 Jul 2018 12:53:11 -0000 Author: andrew Date: Sat Jul 28 12:53:10 2018 New Revision: 336831 URL: https://svnweb.freebsd.org/changeset/base/336831 Log: Remove some write only global values from the arm cpufunc code. Modified: head/sys/arm/arm/cpufunc.c Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Sat Jul 28 12:52:03 2018 (r336830) +++ head/sys/arm/arm/cpufunc.c Sat Jul 28 12:53:10 2018 (r336831) @@ -268,11 +268,6 @@ u_int cpu_reset_needs_v4_MMU_disable; /* flag used in defined(CPU_MV_PJ4B) || \ defined(CPU_CORTEXA) || defined(CPU_KRAIT) -/* Global cache line sizes, use 32 as default */ -int arm_dcache_min_line_size = 32; -int arm_icache_min_line_size = 32; -int arm_idcache_min_line_size = 32; - static void get_cachetype_cp15(void); /* Additional cache information local to this file. Log2 of some of the @@ -304,12 +299,6 @@ get_cachetype_cp15(void) goto out; if (CPU_CT_FORMAT(ctype) == CPU_CT_ARMV7) { - /* Resolve minimal cache line sizes */ - arm_dcache_min_line_size = 1 << (CPU_CT_DMINLINE(ctype) + 2); - arm_icache_min_line_size = 1 << (CPU_CT_IMINLINE(ctype) + 2); - arm_idcache_min_line_size = - min(arm_icache_min_line_size, arm_dcache_min_line_size); - __asm __volatile("mrc p15, 1, %0, c0, c0, 1" : "=r" (clevel)); arm_cache_level = clevel; From owner-svn-src-head@freebsd.org Sat Jul 28 15:42: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 3D5E010556F9; Sat, 28 Jul 2018 15:42:58 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E5C9E73B02; Sat, 28 Jul 2018 15:42:57 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C72DBB22; Sat, 28 Jul 2018 15:42:57 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6SFgvMT086241; Sat, 28 Jul 2018 15:42:57 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6SFgvpo086240; Sat, 28 Jul 2018 15:42:57 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201807281542.w6SFgvpo086240@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sat, 28 Jul 2018 15:42:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336832 - head/sys/sparc64/include X-SVN-Group: head X-SVN-Commit-Author: marius X-SVN-Commit-Paths: head/sys/sparc64/include X-SVN-Commit-Revision: 336832 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, 28 Jul 2018 15:42:58 -0000 Author: marius Date: Sat Jul 28 15:42:57 2018 New Revision: 336832 URL: https://svnweb.freebsd.org/changeset/base/336832 Log: Implement atomic_swap_{32,64,int,long,ptr}(9). Modified: head/sys/sparc64/include/atomic.h Modified: head/sys/sparc64/include/atomic.h ============================================================================== --- head/sys/sparc64/include/atomic.h Sat Jul 28 12:53:10 2018 (r336831) +++ head/sys/sparc64/include/atomic.h Sat Jul 28 15:42:57 2018 (r336832) @@ -154,14 +154,15 @@ e; \ }) -#define atomic_st(p, v, sz) do { \ +#define atomic_st(p, v, sz) ({ \ itype(sz) e, r; \ for (e = *(volatile itype(sz) *)(p);; e = r) { \ r = atomic_cas((p), e, (v), sz); \ if (r == e) \ break; \ } \ -} while (0) + e; \ +}) #define atomic_st_acq(p, v, sz) do { \ atomic_st((p), (v), sz); \ @@ -310,6 +311,12 @@ static __inline void \ atomic_store_rel_ ## name(volatile ptype p, vtype v) \ { \ atomic_st_rel((p), (v), sz); \ +} \ + \ +static __inline vtype \ +atomic_swap_ ## name(volatile ptype p, vtype v) \ +{ \ + return ((vtype)atomic_st((p), (v), sz)); \ } static __inline void From owner-svn-src-head@freebsd.org Sat Jul 28 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 66E561056E1C; Sat, 28 Jul 2018 16:56:47 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 12B6475945; Sat, 28 Jul 2018 16:56:47 +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 DDE2116BC; Sat, 28 Jul 2018 16:56:46 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6SGuk21022322; Sat, 28 Jul 2018 16:56:46 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6SGukIk022321; Sat, 28 Jul 2018 16:56:46 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201807281656.w6SGukIk022321@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 28 Jul 2018 16:56:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336833 - head/sys/arm/arm X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/arm/arm X-SVN-Commit-Revision: 336833 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, 28 Jul 2018 16:56:47 -0000 Author: andrew Date: Sat Jul 28 16:56:46 2018 New Revision: 336833 URL: https://svnweb.freebsd.org/changeset/base/336833 Log: Remove an unneeded cpu_ident() prototype. Modified: head/sys/arm/arm/elf_trampoline.c Modified: head/sys/arm/arm/elf_trampoline.c ============================================================================== --- head/sys/arm/arm/elf_trampoline.c Sat Jul 28 15:42:57 2018 (r336832) +++ head/sys/arm/arm/elf_trampoline.c Sat Jul 28 16:56:46 2018 (r336833) @@ -56,7 +56,6 @@ void _start(void); void __start(void); void __startC(unsigned r0, unsigned r1, unsigned r2, unsigned r3); -extern unsigned int cpu_ident(void); extern void do_call(void *, void *, void *, int); #define GZ_HEAD 0xa From owner-svn-src-head@freebsd.org Sat Jul 28 17:21: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 DEFB1105797D; Sat, 28 Jul 2018 17:21:36 +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 9462D765B7; Sat, 28 Jul 2018 17:21:36 +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 76BB41B4F; Sat, 28 Jul 2018 17:21:36 +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 w6SHLaYW034091; Sat, 28 Jul 2018 17:21:36 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6SHLYfN034083; Sat, 28 Jul 2018 17:21:34 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201807281721.w6SHLYfN034083@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 28 Jul 2018 17:21:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336834 - in head/sys/arm: arm include mv/armadaxp ti X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: in head/sys/arm: arm include mv/armadaxp ti X-SVN-Commit-Revision: 336834 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, 28 Jul 2018 17:21:37 -0000 Author: andrew Date: Sat Jul 28 17:21:34 2018 New Revision: 336834 URL: https://svnweb.freebsd.org/changeset/base/336834 Log: Use the cp15 functions to read cp15 registers rather than using assembly functions. The former are static inline functions so will compile to a single instruction. Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/cpufunc_asm.S head/sys/arm/arm/identcpu-v4.c head/sys/arm/arm/trap-v4.c head/sys/arm/include/cpufunc.h head/sys/arm/mv/armadaxp/armadaxp.c head/sys/arm/mv/armadaxp/armadaxp_mp.c head/sys/arm/ti/ti_cpuid.c Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Sat Jul 28 16:56:46 2018 (r336833) +++ head/sys/arm/arm/cpufunc.c Sat Jul 28 17:21:34 2018 (r336834) @@ -284,10 +284,8 @@ get_cachetype_cp15(void) u_int multiplier; u_char type; - __asm __volatile("mrc p15, 0, %0, c0, c0, 1" - : "=r" (ctype)); - - cpuid = cpu_ident(); + ctype = cp15_ctr_get(); + cpuid = cp15_midr_get(); /* * ...and thus spake the ARM ARM: * @@ -388,7 +386,7 @@ get_cachetype_cp15(void) int set_cpufuncs(void) { - cputype = cpu_ident(); + cputype = cp15_midr_get(); cputype &= CPU_ID_CPU_MASK; #if defined(CPU_ARM9E) @@ -553,7 +551,7 @@ arm11x6_setup(void) uint32_t tmp, tmp2; uint32_t cpuid; - cpuid = cpu_ident(); + cpuid = cp15_midr_get(); auxctrl = 0; auxctrl_wax = ~0; Modified: head/sys/arm/arm/cpufunc_asm.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm.S Sat Jul 28 16:56:46 2018 (r336833) +++ head/sys/arm/arm/cpufunc_asm.S Sat Jul 28 17:21:34 2018 (r336834) @@ -62,35 +62,10 @@ END(cpufunc_nullop) * */ -ENTRY(cpu_ident) - mrc p15, 0, r0, c0, c0, 0 - RET -END(cpu_ident) - -ENTRY(cpu_get_control) - mrc CP15_SCTLR(r0) - RET -END(cpu_get_control) - -ENTRY(cpu_read_cache_config) - mrc p15, 0, r0, c0, c0, 1 - RET -END(cpu_read_cache_config) - -ENTRY(cpu_faultstatus) - mrc p15, 0, r0, c5, c0, 0 - RET -END(cpu_faultstatus) - -ENTRY(cpu_faultaddress) - mrc p15, 0, r0, c6, c0, 0 - RET -END(cpu_faultaddress) - /* * Generic functions to write the internal coprocessor registers * - * + * Currently these registers are * c1 - CPU Control * c3 - Domain Access Control Modified: head/sys/arm/arm/identcpu-v4.c ============================================================================== --- head/sys/arm/arm/identcpu-v4.c Sat Jul 28 16:56:46 2018 (r336833) +++ head/sys/arm/arm/identcpu-v4.c Sat Jul 28 17:21:34 2018 (r336834) @@ -279,8 +279,8 @@ identify_arm_cpu(void) u_int cpuid, ctrl; int i; - ctrl = cpu_get_control(); - cpuid = cpu_ident(); + ctrl = cp15_sctlr_get(); + cpuid = cp15_midr_get(); if (cpuid == 0) { printf("Processor failed probe - no CPU ID\n"); Modified: head/sys/arm/arm/trap-v4.c ============================================================================== --- head/sys/arm/arm/trap-v4.c Sat Jul 28 16:56:46 2018 (r336833) +++ head/sys/arm/arm/trap-v4.c Sat Jul 28 17:21:34 2018 (r336834) @@ -189,8 +189,8 @@ abort_handler(struct trapframe *tf, int type) return (prefetch_abort_handler(tf)); /* Grab FAR/FSR before enabling interrupts */ - far = cpu_faultaddress(); - fsr = cpu_faultstatus(); + far = cp15_dfar_get(); + fsr = cp15_dfsr_get(); #if 0 printf("data abort: fault address=%p (from pc=%p lr=%p)\n", (void*)far, (void*)tf->tf_pc, (void*)tf->tf_svc_lr); Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Sat Jul 28 16:56:46 2018 (r336833) +++ head/sys/arm/include/cpufunc.h Sat Jul 28 17:21:34 2018 (r336834) @@ -208,12 +208,8 @@ int set_cpufuncs (void); #define ARCHITECTURE_NOT_SUPPORTED 2 /* not known */ void cpufunc_nullop (void); -u_int cpu_ident (void); u_int cpufunc_control (u_int clear, u_int bic); void cpu_domains (u_int domains); -u_int cpu_faultstatus (void); -u_int cpu_faultaddress (void); -u_int cpu_get_control (void); u_int cpu_pfr (int); #if defined(CPU_ARM9E) Modified: head/sys/arm/mv/armadaxp/armadaxp.c ============================================================================== --- head/sys/arm/mv/armadaxp/armadaxp.c Sat Jul 28 16:56:46 2018 (r336833) +++ head/sys/arm/mv/armadaxp/armadaxp.c Sat Jul 28 17:21:34 2018 (r336834) @@ -35,8 +35,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include +#include +#include #include #include @@ -142,7 +143,7 @@ get_tclk_armadaxp(void) { uint32_t cputype; - cputype = cpu_ident(); + cputype = cp15_midr_get(); cputype &= CPU_ID_CPU_MASK; if (cputype == CPU_ID_MV88SV584X_V7) Modified: head/sys/arm/mv/armadaxp/armadaxp_mp.c ============================================================================== --- head/sys/arm/mv/armadaxp/armadaxp_mp.c Sat Jul 28 16:56:46 2018 (r336833) +++ head/sys/arm/mv/armadaxp/armadaxp_mp.c Sat Jul 28 17:21:34 2018 (r336834) @@ -107,7 +107,7 @@ mv_axp_platform_mp_start_ap(platform_t plat) * Initialization procedure depends on core revision, * in this step CHIP ID is checked to choose proper procedure */ - cputype = cpu_ident(); + cputype = cp15_midr_get(); cputype &= CPU_ID_CPU_MASK; /* Modified: head/sys/arm/ti/ti_cpuid.c ============================================================================== --- head/sys/arm/ti/ti_cpuid.c Sat Jul 28 16:56:46 2018 (r336833) +++ head/sys/arm/ti/ti_cpuid.c Sat Jul 28 17:21:34 2018 (r336834) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -124,7 +125,7 @@ omap4_get_revision(void) * the ARM cpuid to get the correct revision. */ if (revision == 0) { - id_code = cpu_ident(); + id_code = cp15_midr_get(); revision = (id_code & 0xf) - 1; } From owner-svn-src-head@freebsd.org Sat Jul 28 19:08: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 84239105AC42; Sat, 28 Jul 2018 19:08:01 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3A6C97B1D8; Sat, 28 Jul 2018 19:08:01 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1CD602BDA; Sat, 28 Jul 2018 19:08:01 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6SJ800n089860; Sat, 28 Jul 2018 19:08:00 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6SJ80qo089859; Sat, 28 Jul 2018 19:08:00 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201807281908.w6SJ80qo089859@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 28 Jul 2018 19:08:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336835 - head/lib/libc/gen X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/lib/libc/gen X-SVN-Commit-Revision: 336835 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, 28 Jul 2018 19:08:01 -0000 Author: cem Date: Sat Jul 28 19:08:00 2018 New Revision: 336835 URL: https://svnweb.freebsd.org/changeset/base/336835 Log: Clean up execl*(3) manual page prototype formatting Rendering of execle was missing a comma between the NULL argument and envp. For unclear reasons, POSIX' definition of these routines comments out the mandatory trailing NULL argument. That seems unnecessary and probably (reasonably) confuses mdoc. For unclear reasons, POSIX' definition of these routines spells NULL as "(char *)0." This is needlessly unclear. One guess might be that POSIX targets more exotic computer architectures than FreeBSD does. Fortunately, there is no such problem on any reasonable platform for FreeBSD to support. Spell NULL as NULL. The comma was probably removed in r117204 while the comment and creative spelling of NULL were added in r116537 (both 15 years ago). Modified: head/lib/libc/gen/exec.3 Modified: head/lib/libc/gen/exec.3 ============================================================================== --- head/lib/libc/gen/exec.3 Sat Jul 28 17:21:34 2018 (r336834) +++ head/lib/libc/gen/exec.3 Sat Jul 28 19:08:00 2018 (r336835) @@ -28,7 +28,7 @@ .\" @(#)exec.3 8.3 (Berkeley) 1/24/94 .\" $FreeBSD$ .\" -.Dd January 5, 2016 +.Dd July 28, 2018 .Dt EXEC 3 .Os .Sh NAME @@ -46,16 +46,11 @@ .In unistd.h .Vt extern char **environ ; .Ft int -.Fn execl "const char *path" "const char *arg" ... /* "(char *)0" */ +.Fn execl "const char *path" "const char *arg" ... NULL .Ft int -.Fn execlp "const char *file" "const char *arg" ... /* "(char *)0" */ +.Fn execlp "const char *file" "const char *arg" ... NULL .Ft int -.Fo execle -.Fa "const char *path" "const char *arg" ... -.Fa /* -.Bk -words -.Fa "(char *)0" "char *const envp[]" */ -.Ek +.Fn execle "const char *path" "const char *arg" ... NULL "char *const envp[]" .Fc .Ft int .Fn exect "const char *path" "char *const argv[]" "char *const envp[]" From owner-svn-src-head@freebsd.org Sat Jul 28 19:35: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 07D3D105BA72; Sat, 28 Jul 2018 19:35:50 +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 B26937C6A1; Sat, 28 Jul 2018 19:35:49 +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 8F5CD30CA; Sat, 28 Jul 2018 19:35:49 +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 w6SJZnRH005834; Sat, 28 Jul 2018 19:35:49 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6SJZn9G005833; Sat, 28 Jul 2018 19:35:49 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201807281935.w6SJZn9G005833@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 28 Jul 2018 19:35:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336836 - head/release/tools X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/release/tools X-SVN-Commit-Revision: 336836 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, 28 Jul 2018 19:35:50 -0000 Author: cem Date: Sat Jul 28 19:35:49 2018 New Revision: 336836 URL: https://svnweb.freebsd.org/changeset/base/336836 Log: Remove insecure ciphers from GCE sshd configuration They were added for unclear reasons in r277263. The current OpenSSH defaults (7.5+) are reasonable, and do not include the insecure rc4 cipher: chacha20-poly1305@openssh.com, aes128-ctr,aes192-ctr,aes256-ctr, aes128-gcm@openssh.com,aes256-gcm@openssh.com, aes128-cbc,aes192-cbc,aes256-cbc I think I recall there being a reason for a specific list of ciphers on GCE at the time, but I do not recall what it was, and cannot find any current GCE documentation of such a list. So, just revert the explicit configuration and use sane openssh defaults. PR: 230092 Submitted by: Gustavo Scalet MFC after: 3 days Security: yes Modified: head/release/tools/gce.conf Modified: head/release/tools/gce.conf ============================================================================== --- head/release/tools/gce.conf Sat Jul 28 19:08:00 2018 (r336835) +++ head/release/tools/gce.conf Sat Jul 28 19:35:49 2018 (r336836) @@ -66,7 +66,6 @@ EOF ChallengeResponseAuthentication no X11Forwarding no AcceptEnv LANG -Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc AllowAgentForwarding no ClientAliveInterval 420 EOF From owner-svn-src-head@freebsd.org Sat Jul 28 19:44: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 4E6BB105BE5B; Sat, 28 Jul 2018 19:44:21 +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 E93057CCBE; Sat, 28 Jul 2018 19:44: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 C4C2E3265; Sat, 28 Jul 2018 19:44: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 w6SJiKpw011022; Sat, 28 Jul 2018 19:44:20 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6SJiK3k011020; Sat, 28 Jul 2018 19:44:20 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201807281944.w6SJiK3k011020@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 28 Jul 2018 19:44:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336837 - head/stand/efi/loader X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/stand/efi/loader X-SVN-Commit-Revision: 336837 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, 28 Jul 2018 19:44:21 -0000 Author: imp Date: Sat Jul 28 19:44:20 2018 New Revision: 336837 URL: https://svnweb.freebsd.org/changeset/base/336837 Log: Be more conservative about setting hw.uart.console Note when we've found a 8250 PNP node. Only try to set hw.uart.console if we see one (otherwise ignore serial hints). The 8250 is the only one known to have I/O ports, so limit the guessing to when we've positively seen one. And limit this to x86 since that's the only platform where we have I/O ports. Otherwise, we'd set the serial port to something crazy for the platform and fall off the cliff early in boot. Differential Revision: https://reviews.freebsd.org/D16463 Modified: head/stand/efi/loader/bootinfo.c head/stand/efi/loader/main.c Modified: head/stand/efi/loader/bootinfo.c ============================================================================== --- head/stand/efi/loader/bootinfo.c Sat Jul 28 19:35:49 2018 (r336836) +++ head/stand/efi/loader/bootinfo.c Sat Jul 28 19:44:20 2018 (r336837) @@ -82,10 +82,13 @@ bi_getboothowto(char *kargs) howto |= RB_SERIAL; if (strcmp(console, "nullconsole") == 0) howto |= RB_MUTE; - if (strcmp(console, "efi") == 0) { +#if defined(__i386__) || defined(__amd64__) + if (strcmp(console, "efi") == 0 && + getenv("efi_8250_uid") != NULL && + getenv("hw.uart.console") == NULL) { /* - * If we found a com port and com speed, we need to tell - * the kernel where the serial port is, and how + * If we found a 8250 com port and com speed, we need to + * tell the kernel where the serial port is, and how * fast. Ideally, we'd get the port from ACPI, but that * isn't running in the loader. Do the next best thing * by allowing it to be set by a loader.conf variable, @@ -93,24 +96,31 @@ bi_getboothowto(char *kargs) * comconsole_port if not. PCI support is needed, but * for that we'd ideally refactor the * libi386/comconsole.c code to have identical behavior. + * We only try to set the port for cases where we saw + * the Serial(x) node when parsing, otherwise + * specialized hardware that has Uart nodes will have a + * bogus address set. + * But if someone specifically setup hw.uart.console, + * don't override that. */ + speed = -1; + port = -1; tmp = getenv("efi_com_speed"); - if (tmp != NULL) { + if (tmp != NULL) speed = strtol(tmp, NULL, 0); - tmp = getenv("efi_com_port"); - if (tmp == NULL) - tmp = getenv("comconsole_port"); - /* XXX fallback to EFI variable set in rc.d? */ - if (tmp != NULL) - port = strtol(tmp, NULL, 0); - else - port = 0x3f8; + tmp = getenv("efi_com_port"); + if (tmp == NULL) + tmp = getenv("comconsole_port"); + if (tmp != NULL) + port = strtol(tmp, NULL, 0); + if (speed != -1 && port != -1) { snprintf(buf, sizeof(buf), "io:%d,br:%d", port, speed); env_setenv("hw.uart.console", EV_VOLATILE, buf, NULL, NULL); } } +#endif } return (howto); Modified: head/stand/efi/loader/main.c ============================================================================== --- head/stand/efi/loader/main.c Sat Jul 28 19:35:49 2018 (r336836) +++ head/stand/efi/loader/main.c Sat Jul 28 19:44:20 2018 (r336837) @@ -644,6 +644,15 @@ parse_args(int argc, CHAR16 *argv[]) return (howto); } +static void +setenv_int(const char *key, int val) +{ + char buf[20]; + + snprintf(buf, sizeof(buf), "%d", val); + setenv(key, buf, 1); +} + /* * Parse ConOut (the list of consoles active) and see if we can find a * serial port and/or a video port. It would be nice to also walk the @@ -675,15 +684,15 @@ parse_uefi_con_out(void) DevicePathSubType(node) == ACPI_DP) { /* Check for Serial node */ acpi = (void *)node; - if (EISA_ID_TO_NUM(acpi->HID) == 0x501) + if (EISA_ID_TO_NUM(acpi->HID) == 0x501) { + setenv_int("efi_8250_uid", acpi->UID); com_seen = ++seen; + } } else if (DevicePathType(node) == MESSAGING_DEVICE_PATH && DevicePathSubType(node) == MSG_UART_DP) { - char bd[16]; uart = (void *)node; - snprintf(bd, sizeof(bd), "%d", uart->BaudRate); - setenv("efi_com_speed", bd, 1); + setenv_int("efi_com_speed", uart->BaudRate); } else if (DevicePathType(node) == ACPI_DEVICE_PATH && DevicePathSubType(node) == ACPI_ADR_DP) { /* Check for AcpiAdr() Node for video */ From owner-svn-src-head@freebsd.org Sat Jul 28 20:04: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 0B38A105C681; Sat, 28 Jul 2018 20:04:41 +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 B452D7D956; Sat, 28 Jul 2018 20:04:40 +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 9552E393D; Sat, 28 Jul 2018 20:04:40 +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 w6SK4e1x021335; Sat, 28 Jul 2018 20:04:40 GMT (envelope-from asomers@FreeBSD.org) Received: (from asomers@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6SK4emt021332; Sat, 28 Jul 2018 20:04:40 GMT (envelope-from asomers@FreeBSD.org) Message-Id: <201807282004.w6SK4emt021332@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: asomers set sender to asomers@FreeBSD.org using -f From: Alan Somers Date: Sat, 28 Jul 2018 20:04:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336838 - in head/lib: libauditd libbsm X-SVN-Group: head X-SVN-Commit-Author: asomers X-SVN-Commit-Paths: in head/lib: libauditd libbsm X-SVN-Commit-Revision: 336838 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, 28 Jul 2018 20:04:41 -0000 Author: asomers Date: Sat Jul 28 20:04:39 2018 New Revision: 336838 URL: https://svnweb.freebsd.org/changeset/base/336838 Log: Disable -Wcast-align in libbsm and libauditd Along with some pending upstream changes, this will allow raising the WARNS level. Reviewed by: cem, aniketp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D16486 Modified: head/lib/libauditd/Makefile head/lib/libbsm/Makefile Modified: head/lib/libauditd/Makefile ============================================================================== --- head/lib/libauditd/Makefile Sat Jul 28 19:44:20 2018 (r336837) +++ head/lib/libauditd/Makefile Sat Jul 28 20:04:39 2018 (r336838) @@ -23,3 +23,10 @@ WARNS?= 3 MAN= .include + +# Disable -Wcast-align. Casting res->ai_addr in auditd_set_host triggers this +# warning, but it's ok because res->ai_addr must've originally pointed to a +# sockaddr_in or sockaddr_in6 anyway. +# Better would be to disable this warning in just that one function, but GCC +# 4.2 can't do that :( . +CWARNFLAGS.auditd_lib.c+= -Wno-cast-align Modified: head/lib/libbsm/Makefile ============================================================================== --- head/lib/libbsm/Makefile Sat Jul 28 19:44:20 2018 (r336837) +++ head/lib/libbsm/Makefile Sat Jul 28 20:04:39 2018 (r336838) @@ -181,3 +181,10 @@ MLINKS= libbsm.3 bsm.3 \ setaudit.2 setaudit_addr.2 .include + +# Disable -Wcast-align. Casting sa_local in au_to_socket_ex triggers this +# warning, but it's ok because sa_local must've originally pointed to a +# sockaddr_in or sockaddr_in6 anyway. +# Better would be to disable this warning in just that one function, but GCC +# 4.2 can't do that :( . +CWARNFLAGS.bsm_token.c+= -Wno-cast-align From owner-svn-src-head@freebsd.org Sat Jul 28 20:06: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 7A594105C839; Sat, 28 Jul 2018 20:06:27 +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 DB79D7DCAC; Sat, 28 Jul 2018 20:06:26 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id w6SK6BlE008333 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 28 Jul 2018 23:06:14 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w6SK6BlE008333 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w6SK6BPq008332; Sat, 28 Jul 2018 23:06:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 28 Jul 2018 23:06:11 +0300 From: Konstantin Belousov To: Conrad Meyer Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336835 - head/lib/libc/gen Message-ID: <20180728200611.GA40119@kib.kiev.ua> References: <201807281908.w6SJ80qo089859@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201807281908.w6SJ80qo089859@repo.freebsd.org> User-Agent: Mutt/1.10.1 (2018-07-13) 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.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, 28 Jul 2018 20:06:27 -0000 On Sat, Jul 28, 2018 at 07:08:00PM +0000, Conrad Meyer wrote: > For unclear reasons, POSIX' definition of these routines spells NULL as > "(char *)0." This is needlessly unclear. One guess might be that POSIX > targets more exotic computer architectures than FreeBSD does. Fortunately, > there is no such problem on any reasonable platform for FreeBSD to support. > Spell NULL as NULL. The reasons are quite clear. Practically NULL has to be defined as '0' or '0L' at best, for C and esp. C++ rules of the pointers automatic casts to work. This means that NULL cannot be used in vararg lists where the pointer is expected. In other words, the (char *)0 part of the pre-commit text was correct, while after-commit use of NULL only works on machines where pointers have the same representation as ints or longs. From owner-svn-src-head@freebsd.org Sat Jul 28 20:21: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 57302105CEE3; Sat, 28 Jul 2018 20:21:06 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2D92B7E789; Sat, 28 Jul 2018 20:21:06 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E8C5C3BD0; Sat, 28 Jul 2018 20:21:05 +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 w6SKL5DQ031892; Sat, 28 Jul 2018 20:21:05 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6SKL5UM031887; Sat, 28 Jul 2018 20:21:05 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201807282021.w6SKL5UM031887@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 28 Jul 2018 20:21:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336839 - in head/sys/fs: nfs nfsserver X-SVN-Group: head X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: in head/sys/fs: nfs nfsserver X-SVN-Commit-Revision: 336839 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, 28 Jul 2018 20:21:06 -0000 Author: rmacklem Date: Sat Jul 28 20:21:04 2018 New Revision: 336839 URL: https://svnweb.freebsd.org/changeset/base/336839 Log: Modify the NFSv4.1 server so that it allows ReclaimComplete as done by ESXi 6.7. I believe that a ReclaimComplete with rca_one_fs == TRUE is only to be used after a file system has been transferred to a different file server. However, RFC5661 is somewhat vague w.r.t. this and the ESXi 6.7 client does both a ReclaimComplete with rca_one_fs == TRUE and one with ReclaimComplete with rca_one_fs == FALSE. Therefore, just ignore the rca_one_fs == TRUE operation and return NFS_OK without doing anything instead of replying NFS4ERR_NOTSUPP. This allows the ESXi 6.7 NFSv4.1 client to do a mount. After discussion on the NFSv4 IETF working group mailing list, doing this along with setting a flag to note that a ReclaimComplete with rca_one_fs TRUE was an appropriate way to handle this. The flag that indicates that a ReclaimComplete with rca_one_fs == TRUE was done may be used to disable replies of NFS4ERR_GRACE for non-reclaim state operations in a future commit. This patch along with r332790, r334492 and r336357 allow ESXi 6.7 NFSv4.1 mounts work ok. ESX 6.5 NFSv4.1 mounts do not work well, due to what I believe are violations of RFC-5661 and should not be used. Reported by: andreas.nagy@frequentis.com Tested by: andreas.nagy@frequentis.com, daniel@ftml.net (earlier version) MFC after: 2 weeks Relnotes: yes Modified: head/sys/fs/nfs/nfs.h head/sys/fs/nfs/nfs_var.h head/sys/fs/nfsserver/nfs_nfsdserv.c head/sys/fs/nfsserver/nfs_nfsdstate.c Modified: head/sys/fs/nfs/nfs.h ============================================================================== --- head/sys/fs/nfs/nfs.h Sat Jul 28 20:04:39 2018 (r336838) +++ head/sys/fs/nfs/nfs.h Sat Jul 28 20:21:04 2018 (r336839) @@ -329,6 +329,7 @@ struct nfsreferral { #define LCL_RECLAIMCOMPLETE 0x00010000 #define LCL_NFSV41 0x00020000 #define LCL_DONEBINDCONN 0x00040000 +#define LCL_RECLAIMONEFS 0x00080000 #define LCL_GSS LCL_KERBV /* Or of all mechs */ Modified: head/sys/fs/nfs/nfs_var.h ============================================================================== --- head/sys/fs/nfs/nfs_var.h Sat Jul 28 20:04:39 2018 (r336838) +++ head/sys/fs/nfs/nfs_var.h Sat Jul 28 20:21:04 2018 (r336839) @@ -141,7 +141,7 @@ void nfsrv_nfsuserddelport(void); void nfsrv_throwawayallstate(NFSPROC_T *); int nfsrv_checksequence(struct nfsrv_descript *, uint32_t, uint32_t *, uint32_t *, int, uint32_t *, NFSPROC_T *); -int nfsrv_checkreclaimcomplete(struct nfsrv_descript *); +int nfsrv_checkreclaimcomplete(struct nfsrv_descript *, int); void nfsrv_cache_session(uint8_t *, uint32_t, int, struct mbuf **); void nfsrv_freeallbackchannel_xprts(void); int nfsrv_layoutcommit(struct nfsrv_descript *, vnode_t, int, int, uint64_t, Modified: head/sys/fs/nfsserver/nfs_nfsdserv.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdserv.c Sat Jul 28 20:04:39 2018 (r336838) +++ head/sys/fs/nfsserver/nfs_nfsdserv.c Sat Jul 28 20:21:04 2018 (r336839) @@ -4229,17 +4229,26 @@ nfsrvd_reclaimcomplete(struct nfsrv_descript *nd, __un __unused vnode_t vp, __unused NFSPROC_T *p, __unused struct nfsexstuff *exp) { uint32_t *tl; - int error = 0; + int error = 0, onefs; if (nfs_rootfhset == 0 || nfsd_checkrootexp(nd) != 0) { nd->nd_repstat = NFSERR_WRONGSEC; goto nfsmout; } NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); + /* + * I believe that a ReclaimComplete with rca_one_fs == TRUE is only + * to be used after a file system has been transferred to a different + * file server. However, RFC5661 is somewhat vague w.r.t. this and + * the ESXi 6.7 client does both a ReclaimComplete with rca_one_fs + * == TRUE and one with ReclaimComplete with rca_one_fs == FALSE. + * Therefore, just ignore the rca_one_fs == TRUE operation and return + * NFS_OK without doing anything. + */ + onefs = 0; if (*tl == newnfs_true) - nd->nd_repstat = NFSERR_NOTSUPP; - else - nd->nd_repstat = nfsrv_checkreclaimcomplete(nd); + onefs = 1; + nd->nd_repstat = nfsrv_checkreclaimcomplete(nd, onefs); nfsmout: NFSEXITCODE2(error, nd); return (error); Modified: head/sys/fs/nfsserver/nfs_nfsdstate.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdstate.c Sat Jul 28 20:04:39 2018 (r336838) +++ head/sys/fs/nfsserver/nfs_nfsdstate.c Sat Jul 28 20:21:04 2018 (r336839) @@ -6064,7 +6064,7 @@ nfsrv_checksequence(struct nfsrv_descript *nd, uint32_ * Check/set reclaim complete for this session/clientid. */ int -nfsrv_checkreclaimcomplete(struct nfsrv_descript *nd) +nfsrv_checkreclaimcomplete(struct nfsrv_descript *nd, int onefs) { struct nfsdsession *sep; struct nfssessionhash *shp; @@ -6080,8 +6080,10 @@ nfsrv_checkreclaimcomplete(struct nfsrv_descript *nd) return (NFSERR_BADSESSION); } - /* Check to see if reclaim complete has already happened. */ - if ((sep->sess_clp->lc_flags & LCL_RECLAIMCOMPLETE) != 0) + if (onefs != 0) + sep->sess_clp->lc_flags |= LCL_RECLAIMONEFS; + /* Check to see if reclaim complete has already happened. */ + else if ((sep->sess_clp->lc_flags & LCL_RECLAIMCOMPLETE) != 0) error = NFSERR_COMPLETEALREADY; else { sep->sess_clp->lc_flags |= LCL_RECLAIMCOMPLETE; From owner-svn-src-head@freebsd.org Sat Jul 28 20:21: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 A2D50105D047; Sat, 28 Jul 2018 20:21:24 +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 59D7C7E8D6; Sat, 28 Jul 2018 20:21:24 +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 3CA163BEC; Sat, 28 Jul 2018 20:21:24 +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 w6SKLODE031950; Sat, 28 Jul 2018 20:21:24 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6SKLNru031947; Sat, 28 Jul 2018 20:21:23 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201807282021.w6SKLNru031947@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Sat, 28 Jul 2018 20:21:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336840 - in head: etc lib/libc/gen X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: in head: etc lib/libc/gen X-SVN-Commit-Revision: 336840 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, 28 Jul 2018 20:21:24 -0000 Author: brd Date: Sat Jul 28 20:21:23 2018 New Revision: 336840 URL: https://svnweb.freebsd.org/changeset/base/336840 Log: Move etc/shells to lib/libc/gen with getusershell(3). Approved by: will (mentor) Differential Revision: https://reviews.freebsd.org/D16467 Added: head/lib/libc/gen/shells - copied unchanged from r336839, head/etc/shells Deleted: head/etc/shells Modified: head/etc/Makefile head/lib/libc/gen/Makefile.inc Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Sat Jul 28 20:21:04 2018 (r336839) +++ head/etc/Makefile Sat Jul 28 20:21:23 2018 (r336840) @@ -47,7 +47,6 @@ BIN1= crontab \ remote \ rpc \ services \ - shells \ sysctl.conf \ syslog.conf \ termcap.small Modified: head/lib/libc/gen/Makefile.inc ============================================================================== --- head/lib/libc/gen/Makefile.inc Sat Jul 28 20:21:04 2018 (r336839) +++ head/lib/libc/gen/Makefile.inc Sat Jul 28 20:21:23 2018 (r336840) @@ -4,6 +4,8 @@ # machine-independent gen sources .PATH: ${LIBC_SRCTOP}/${LIBC_ARCH}/gen ${LIBC_SRCTOP}/gen +CONFS= shells + SRCS+= __getosreldate.c \ __pthread_mutex_init_calloc_cb_stub.c \ __xuname.c \ Copied: head/lib/libc/gen/shells (from r336839, head/etc/shells) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/gen/shells Sat Jul 28 20:21:23 2018 (r336840, copy of r336839, head/etc/shells) @@ -0,0 +1,9 @@ +# $FreeBSD$ +# +# List of acceptable shells for chpass(1). +# Ftpd will not allow users to connect who are not using +# one of these shells. + +/bin/sh +/bin/csh +/bin/tcsh From owner-svn-src-head@freebsd.org Sat Jul 28 20:22: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 DF34B105D0DC; Sat, 28 Jul 2018 20:22:11 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f176.google.com (mail-io0-f176.google.com [209.85.223.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7A6927F0E3; Sat, 28 Jul 2018 20:22:11 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f176.google.com with SMTP id g11-v6so6857756ioq.9; Sat, 28 Jul 2018 13:22:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=OVPht73znUK8jqTXvmsM2MdJpoB5+jraf/Qq9sKXTDc=; b=ChDsovZRhI4v6ScrsS+BuYcMKWdN8Ig8pWRJMBuOuFKvo3GuPEGitz9dKaVmiED5WM PRTxcag583j5nx0yZYRbyRw2vXVP8rDPVJ5VTzJALDxkNGvacs8h6qZFCQVtEwNGmD5R uuDmAzQOCC5F5r+cRx47obGgcwILmuAnlYM1WoU6KfylyOhMF77YRdXrpBxKf6xJx9vD sftqK2w4YLdgPXbCQ2NUrhZVrW8FegOwA+KLu+4kRDfbp40bBW+KFUL8pgWmUvHjdCYA enPbD9YE/SBS5X8Pq4Xq8fZWtu7Kim7sudg/Os4nTUqBGNkheEEa7+OoibPl5lapOrJF WtZA== X-Gm-Message-State: AOUpUlH/22x90Zbaq/hKkRnPq53nl58CC20U8IfsMHC4XVteVofVY8Kb Sp2E3zQXUSfhhG7KeL5pWWP5hU+k X-Google-Smtp-Source: AAOMgpeQE/DwEDC0z9PI8TGWevmUnw8IyYGgh1UmgVpJlxECzQeUae3ipIYpKYRX4OSFe2wtsxelhw== X-Received: by 2002:a6b:d611:: with SMTP id w17-v6mr9406247ioa.216.1532809006588; Sat, 28 Jul 2018 13:16:46 -0700 (PDT) Received: from mail-io0-f174.google.com (mail-io0-f174.google.com. [209.85.223.174]) by smtp.gmail.com with ESMTPSA id 137-v6sm6747476itl.39.2018.07.28.13.16.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Jul 2018 13:16:46 -0700 (PDT) Received: by mail-io0-f174.google.com with SMTP id q19-v6so6843591ioh.11; Sat, 28 Jul 2018 13:16:46 -0700 (PDT) X-Received: by 2002:a6b:b0c5:: with SMTP id z188-v6mr8978436ioe.220.1532809006354; Sat, 28 Jul 2018 13:16:46 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 2002:a02:7e0a:0:0:0:0:0 with HTTP; Sat, 28 Jul 2018 13:16:45 -0700 (PDT) In-Reply-To: <20180728200611.GA40119@kib.kiev.ua> References: <201807281908.w6SJ80qo089859@repo.freebsd.org> <20180728200611.GA40119@kib.kiev.ua> From: Conrad Meyer Date: Sat, 28 Jul 2018 13:16:45 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r336835 - head/lib/libc/gen To: Konstantin Belousov Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-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, 28 Jul 2018 20:22:12 -0000 On Sat, Jul 28, 2018 at 1:06 PM, Konstantin Belousov wrote: > On Sat, Jul 28, 2018 at 07:08:00PM +0000, Conrad Meyer wrote: >> For unclear reasons, POSIX' definition of these routines spells NULL a= s >> "(char *)0." This is needlessly unclear. One guess might be that POS= IX >> targets more exotic computer architectures than FreeBSD does. Fortuna= tely, >> there is no such problem on any reasonable platform for FreeBSD to sup= port. >> Spell NULL as NULL. > > The reasons are quite clear. Unclear here refers to the lack of documentation, not the absense of a possible explanation. > Practically NULL has to be defined as '0' > or '0L' at best, for C and esp. C++ rules of the pointers automatic > casts to work. This means that NULL cannot be used in vararg lists where > the pointer is expected. This is not true on FreeBSD. NULL is (void*)0 in all C code, and the special nullptr value in C++. Yes, this is a stronger definition than the C standard guarantees. This is because the C standard permits much more exotic architectures than FreeBSD actually runs on. > In other words, the (char *)0 part of the pre-commit text was correct, > while after-commit use of NULL only works on machines where pointers > have the same representation as ints or longs. I believe this encompasses all architectures FreeBSD supports =E2=80=94 eve= n ignoring our sys/_null.h definition of NULL as (void *)0 or nullptr. Best, Conrad From owner-svn-src-head@freebsd.org Sat Jul 28 20:26: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 71477105D34B; Sat, 28 Jul 2018 20:26:26 +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 1913B7F4D0; Sat, 28 Jul 2018 20:26:26 +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 EDF8D3D62; Sat, 28 Jul 2018 20:26:25 +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 w6SKQPEF032349; Sat, 28 Jul 2018 20:26:25 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6SKQPFx032348; Sat, 28 Jul 2018 20:26:25 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201807282026.w6SKQPFx032348@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Sat, 28 Jul 2018 20:26:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336841 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 336841 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, 28 Jul 2018 20:26:26 -0000 Author: brd Date: Sat Jul 28 20:26:25 2018 New Revision: 336841 URL: https://svnweb.freebsd.org/changeset/base/336841 Log: Fix `make distribute' installing some configs which means CONFS was broken with etcupdate and mergemaster. Approved by: bapt (mentor) Differential Revision: https://reviews.freebsd.org/D16478 Modified: head/share/mk/bsd.confs.mk Modified: head/share/mk/bsd.confs.mk ============================================================================== --- head/share/mk/bsd.confs.mk Sat Jul 28 20:21:23 2018 (r336840) +++ head/share/mk/bsd.confs.mk Sat Jul 28 20:26:25 2018 (r336841) @@ -23,7 +23,6 @@ buildconfig: ${${group}} all: buildconfig . endif -. if !target(installconfig) . for group in ${CONFGROUPS} . if defined(${group}) && !empty(${group}) @@ -130,8 +129,6 @@ _${group}INS_${cnf:T}: ${cnf} . endif # defined(${group}) && !empty(${group}) . endfor - -.endif # !target(installconfig) .if ${MK_STAGING} != "no" . if !empty(STAGE_SETS) From owner-svn-src-head@freebsd.org Sat Jul 28 20:31: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 15E0F105D8E6; Sat, 28 Jul 2018 20:31:04 +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 BDF3D7FD4C; Sat, 28 Jul 2018 20:31:03 +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 A0A603E9B; Sat, 28 Jul 2018 20:31:03 +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 w6SKV3MX032778; Sat, 28 Jul 2018 20:31:03 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6SKV3tS032777; Sat, 28 Jul 2018 20:31:03 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201807282031.w6SKV3tS032777@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Sat, 28 Jul 2018 20:31:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336843 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 336843 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, 28 Jul 2018 20:31:04 -0000 Author: brd Date: Sat Jul 28 20:31:03 2018 New Revision: 336843 URL: https://svnweb.freebsd.org/changeset/base/336843 Log: Whitespace only change, no functional change intended. The padding makes it much easier to read, but occasionally means that commits like this one have to be done to follow up. I intentionally kept this separate from r336841 to try and make things easier to follow later on. Approved by: bapt (mentor) Modified: head/share/mk/bsd.confs.mk Modified: head/share/mk/bsd.confs.mk ============================================================================== --- head/share/mk/bsd.confs.mk Sat Jul 28 20:29:05 2018 (r336842) +++ head/share/mk/bsd.confs.mk Sat Jul 28 20:31:03 2018 (r336843) @@ -23,12 +23,12 @@ buildconfig: ${${group}} all: buildconfig . endif -. for group in ${CONFGROUPS} -. if defined(${group}) && !empty(${group}) +. for group in ${CONFGROUPS} +. if defined(${group}) && !empty(${group}) -. if !target(afterinstallconfig) +. if !target(afterinstallconfig) afterinstallconfig: -. endif +. endif installconfig: realinstallconfig afterinstallconfig .ORDER: realinstallconfig afterinstallconfig @@ -39,79 +39,79 @@ ${group}DIR?= ${CONFDIR} STAGE_SETS+= ${group:C,[/*],_,g} STAGE_DIR.${group:C,[/*],_,g}= ${STAGE_OBJTOP}${${group}DIR} -. if defined(NO_ROOT) -. if !defined(${group}TAGS) || ! ${${group}TAGS:Mpackage=*} -. if defined(${${group}PACKAGE}) +. if defined(NO_ROOT) +. if !defined(${group}TAGS) || ! ${${group}TAGS:Mpackage=*} +. if defined(${${group}PACKAGE}) ${group}TAGS+= package=${${group}PACKAGE:Uruntime} -. else +. else ${group}TAGS+= package=${PACKAGE:Uruntime} -. endif . endif +. endif ${group}TAGS+= config ${group}TAG_ARGS= -T ${${group}TAGS:[*]:S/ /,/g} -. endif +. endif -. if ${${group}DIR:S/^\///} == ${${group}DIR} +. if ${${group}DIR:S/^\///} == ${${group}DIR} # ${group}DIR specifies a variable that specifies a path DIRS+= ${${group}DIR} _${group}DIR= ${${group}DIR} -. else +. else # ${group}DIR specifies a path DIRS+= ${group}DIR _${group}DIR= ${group}DIR -. endif +. endif -. for cnf in ${${group}} +. for cnf in ${${group}} ${group}OWN_${cnf}?= ${${group}OWN} ${group}GRP_${cnf}?= ${${group}GRP} ${group}MODE_${cnf}?= ${${group}MODE} ${group}DIR_${cnf}?= ${${group}DIR} -. if defined(${group}NAME) +. if defined(${group}NAME) ${group}NAME_${cnf}?= ${${group}NAME} -. else +. else ${group}NAME_${cnf}?= ${cnf:T} -. endif +. endif # Determine the directory for the current file. Default to the parent group # DIR, then check to see how to pass that variable on below. ${group}DIR_${cnf}?= ${${group}DIR} -. if ${${group}DIR_${cnf}:S/^\///} == ${${group}DIR_${cnf}} +. if ${${group}DIR_${cnf}:S/^\///} == ${${group}DIR_${cnf}} # DIR specifies a variable that specifies a path _${group}DIR_${cnf}= ${${group}DIR_${cnf}} -. else +. else # DIR directly specifies a path _${group}DIR_${cnf}= ${group}DIR_${cnf} -. endif +. endif ${group}PREFIX_${cnf}= ${DESTDIR}${${_${group}DIR_${cnf}}} # Append DIR to DIRS if not already in place -- DIRS is already filtered, so # this is primarily to ease inspection. -. for d in ${DIRS} +. for d in ${DIRS} _DIRS+= ${${d}} -. endfor -. if ${DIRS:M${_${group}DIR_${cnf}}} == "" -. if ${_DIRS:M${${_${group}DIR_${cnf}}}} == "" +. endfor +. if ${DIRS:M${_${group}DIR_${cnf}}} == "" +. if ${_DIRS:M${${_${group}DIR_${cnf}}}} == "" DIRS+= ${_${group}DIR_${cnf}} -. else +. else _${group}DIR_${cnf}= ${group}DIR -. endif . endif +. endif -. if defined(${group}NAME) +. if defined(${group}NAME) ${group}NAME_${cnf}?= ${${group}NAME} -. else +. else ${group}NAME_${cnf}?= ${cnf:T} -. endif # defined(${group}NAME) +. endif # defined(${group}NAME) # Work around a bug with install(1) -C and /dev/null -. if ${cnf} == "/dev/null" +. if ${cnf} == "/dev/null" INSTALL_COPY= -. else +. else INSTALL_COPY= -C -. endif +. endif STAGE_AS_SETS+= ${cnf:T} STAGE_AS_${cnf:T}= ${${group}NAME_${cnf:T}} @@ -124,8 +124,7 @@ _${group}INS_${cnf:T}: ${cnf} ${INSTALL} ${${group}TAG_ARGS} ${INSTALL_COPY} -o ${${group}OWN_${cnf}} \ -g ${${group}GRP_${cnf}} -m ${${group}MODE_${cnf}} \ ${.ALLSRC} ${${group}PREFIX_${cnf}}/${${group}NAME_${cnf}} -. endfor # for cnf in ${${group}} - +. endfor # for cnf in ${${group}} . endif # defined(${group}) && !empty(${group}) . endfor From owner-svn-src-head@freebsd.org Sat Jul 28 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 E631B105DA64; Sat, 28 Jul 2018 20:33:04 +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 6599680060; Sat, 28 Jul 2018 20:33:04 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id w6SKWrHm014005 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 28 Jul 2018 23:32:57 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w6SKWrHm014005 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w6SKWrDM014004; Sat, 28 Jul 2018 23:32:53 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 28 Jul 2018 23:32:53 +0300 From: Konstantin Belousov To: Conrad Meyer Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336835 - head/lib/libc/gen Message-ID: <20180728203253.GB40119@kib.kiev.ua> References: <201807281908.w6SJ80qo089859@repo.freebsd.org> <20180728200611.GA40119@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) 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.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, 28 Jul 2018 20:33:05 -0000 On Sat, Jul 28, 2018 at 01:16:45PM -0700, Conrad Meyer wrote: > On Sat, Jul 28, 2018 at 1:06 PM, Konstantin Belousov > wrote: > > On Sat, Jul 28, 2018 at 07:08:00PM +0000, Conrad Meyer wrote: > >> For unclear reasons, POSIX' definition of these routines spells NULL as > >> "(char *)0." This is needlessly unclear. One guess might be that POSIX > >> targets more exotic computer architectures than FreeBSD does. Fortunately, > >> there is no such problem on any reasonable platform for FreeBSD to support. > >> Spell NULL as NULL. > > > > The reasons are quite clear. > > Unclear here refers to the lack of documentation, not the absense of a > possible explanation. > > > Practically NULL has to be defined as '0' > > or '0L' at best, for C and esp. C++ rules of the pointers automatic > > casts to work. This means that NULL cannot be used in vararg lists where > > the pointer is expected. > > This is not true on FreeBSD. NULL is (void*)0 in all C code, and the > special nullptr value in C++. Yes, this is a stronger definition than > the C standard guarantees. This is because the C standard permits > much more exotic architectures than FreeBSD actually runs on. Our existing practice is to not provide an advise in the man pages for the userspace code which would harm the portability or the standard conformance. > > > In other words, the (char *)0 part of the pre-commit text was correct, > > while after-commit use of NULL only works on machines where pointers > > have the same representation as ints or longs. > > I believe this encompasses all architectures FreeBSD supports ??? even > ignoring our sys/_null.h definition of NULL as (void *)0 or nullptr. I am not so sure about CheriBSD, for instance. From owner-svn-src-head@freebsd.org Sat Jul 28 20:33: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 13505105DA8E; Sat, 28 Jul 2018 20:33:12 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5924780101; Sat, 28 Jul 2018 20:33:09 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CC7733F24; Sat, 28 Jul 2018 20:33:08 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6SKX8vO037767; Sat, 28 Jul 2018 20:33:08 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6SKX8Nr037766; Sat, 28 Jul 2018 20:33:08 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201807282033.w6SKX8Nr037766@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sat, 28 Jul 2018 20:33:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336844 - head X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 336844 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, 28 Jul 2018 20:33:12 -0000 Author: manu Date: Sat Jul 28 20:33:08 2018 New Revision: 336844 URL: https://svnweb.freebsd.org/changeset/base/336844 Log: UPDATING: Add note about efifb support and serial output Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Jul 28 20:31:03 2018 (r336843) +++ head/UPDATING Sat Jul 28 20:33:08 2018 (r336844) @@ -52,6 +52,17 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: zfs boot blocks don't understand symlinks). 20180719: + ARM64 now have efifb support, if you want to have serial console + on your arm64 board when an screen is connected and the bootloader + setup a frambuffer for us to use, just add : + boot_serial=YES + boot_multicons=YES + in /boot/loader.conf + For Raspberry Pi 3 (RPI) users, this is needed even if you don't have + an screen connected as the firmware will setup a framebuffer are that + u-boot will expose as an EFI framebuffer. + +20180719: New uid:gid added, ntpd:ntpd (123:123). Be sure to run mergemaster or take steps to update /etc/passwd before doing installworld on existing systems. Also, rc.d/ntpd now starts ntpd(8) as user ntpd From owner-svn-src-head@freebsd.org Sat Jul 28 20:36: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 427CD105DCE9; Sat, 28 Jul 2018 20:36:25 +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 E61ED804D2; Sat, 28 Jul 2018 20:36:24 +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 C6F1C3F32; Sat, 28 Jul 2018 20:36:24 +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 w6SKaODZ037948; Sat, 28 Jul 2018 20:36:24 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6SKaNSi037944; Sat, 28 Jul 2018 20:36:23 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201807282036.w6SKaNSi037944@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Sat, 28 Jul 2018 20:36:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336845 - in head: etc etc/defaults etc/rc.d sbin/init sbin/init/rc.d X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: in head: etc etc/defaults etc/rc.d sbin/init sbin/init/rc.d X-SVN-Commit-Revision: 336845 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, 28 Jul 2018 20:36:25 -0000 Author: brd Date: Sat Jul 28 20:36:23 2018 New Revision: 336845 URL: https://svnweb.freebsd.org/changeset/base/336845 Log: Move rc startup scripts from etc/ to sbin/init/ This keeps most startup scripts as CONFS per discussion on src-committers from back during BSDCan. Approved by: will (mentor) Differential Revision: https://reviews.freebsd.org/D16466 Added: head/sbin/init/rc.d/ - copied from r336844, head/etc/rc.d/ Deleted: head/etc/rc.d/ Modified: head/etc/Makefile head/etc/defaults/Makefile head/sbin/init/Makefile head/sbin/init/rc.d/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Sat Jul 28 20:33:08 2018 (r336844) +++ head/etc/Makefile Sat Jul 28 20:36:23 2018 (r336845) @@ -31,19 +31,14 @@ BIN1= crontab \ mac.conf \ motd \ netconfig \ - network.subr \ networks \ newsyslog.conf \ nsswitch.conf \ phones \ profile \ protocols \ - rc \ rc.bsdextended \ rc.firewall \ - rc.initdiskless \ - rc.shutdown \ - rc.subr \ remote \ rpc \ services \ @@ -144,9 +139,6 @@ BIN1+= csh.cshrc csh.login csh.logout BIN1+= regdomain.xml .endif -# -rwxr-xr-x root:wheel, for the new cron root:wheel -BIN2= netstart pccard_ether rc.suspend rc.resume - .if ${MK_SENDMAIL} == "no" ETCMAIL=mailer.conf aliases .else @@ -187,8 +179,6 @@ distribution: ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ ${BIN1} ${DESTDIR}/etc; \ cap_mkdb ${CAP_MKDB_ENDIAN} ${DESTDIR}/etc/login.conf; \ - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \ - ${BIN2} ${DESTDIR}/etc; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; @@ -235,7 +225,6 @@ distribution: .if ${MK_PKGBOOTSTRAP} != "no" ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install .endif - ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install ${_+_}cd ${SRCTOP}/share/termcap; ${MAKE} etc-termcap ${_+_}cd ${.CURDIR}/syslog.d; ${MAKE} install ${_+_}cd ${SRCTOP}/usr.sbin/rmt; ${MAKE} etc-rmt Modified: head/etc/defaults/Makefile ============================================================================== --- head/etc/defaults/Makefile Sat Jul 28 20:33:08 2018 (r336844) +++ head/etc/defaults/Makefile Sat Jul 28 20:36:23 2018 (r336845) @@ -2,7 +2,7 @@ .include -FILES= devfs.rules periodic.conf rc.conf +FILES= devfs.rules periodic.conf FILESDIR= /etc/defaults .if ${MK_BLUETOOTH} != "no" Modified: head/sbin/init/Makefile ============================================================================== --- head/sbin/init/Makefile Sat Jul 28 20:33:08 2018 (r336844) +++ head/sbin/init/Makefile Sat Jul 28 20:36:23 2018 (r336845) @@ -1,6 +1,15 @@ # @(#)Makefile 8.1 (Berkeley) 7/19/93 # $FreeBSD$ +FILESGROUPS= FILESETC FILESETCEXEC FILESETCDEFAULTS +FILESETCDIR= /etc +FILESETC= network.subr rc rc.initdiskless rc.subr rc.shutdown +FILESETCMODE= 644 +FILESETCEXEC= netstart pccard_ether rc.resume rc.suspend +FILESETCEXECDIR= /etc +FILESETCEXECMODE= 755 +FILESETCDEFAULTSDIR= /etc/defaults +FILESETCDEFAULTS= rc.conf PACKAGE=runtime PROG= init SRCS= init.c getmntopts.c @@ -16,5 +25,7 @@ CFLAGS+=-I${MOUNT} .PATH: ${MOUNT} NO_SHARED?= YES + +SUBDIR+= rc.d .include Modified: head/sbin/init/rc.d/Makefile ============================================================================== --- head/etc/rc.d/Makefile Sat Jul 28 20:33:08 2018 (r336844) +++ head/sbin/init/rc.d/Makefile Sat Jul 28 20:36:23 2018 (r336845) @@ -2,10 +2,10 @@ .include -BINDIR= /etc/rc.d -FILESGROUPS= FILES +CONFSDIR= /etc/rc.d +CONFSGROUPS= CONFS -FILES= DAEMON \ +CONFS= DAEMON \ FILESYSTEMS \ LOGIN \ NETWORKING \ @@ -75,7 +75,6 @@ FILES= DAEMON \ netif \ netoptions \ netwait \ - newsyslog \ nfsclient \ nfscbd \ nfsd \ @@ -113,8 +112,6 @@ FILES= DAEMON \ stf \ swap \ swaplate \ - sysctl \ - syslogd \ tmp \ ${_ubthidhci} \ ugidfw \ @@ -123,7 +120,7 @@ FILES= DAEMON \ watchdogd .if ${MK_NIS} != "no" -FILES+= ypbind \ +CONFS+= ypbind \ ypldap \ yppasswdd \ ypserv \ @@ -133,29 +130,29 @@ FILES+= ypbind \ .endif .if ${MK_ACCT} != "no" -FILESGROUPS+= ACCT +CONFSGROUPS+= ACCT ACCT+= accounting ACCTPACKAGE= acct .endif .if ${MK_ACPI} != "no" -FILESGROUPS+= ACPI +CONFSGROUPS+= ACPI ACPI= power_profile ACPIPACKAGE= acpi .endif .if ${MK_ACPI} != "no" || ${MK_APM} != "no" -FILES+= powerd +CONFS+= powerd .endif .if ${MK_AMD} != "no" -FILESGROUPS+= AMD +CONFSGROUPS+= AMD AMD+= amd AMDPACKAGE= amd .endif .if ${MK_APM} != "no" -FILESGROUPS+= APM +CONFSGROUPS+= APM APM+= apm .if ${MACHINE} == "i386" APM+= apmd @@ -164,9 +161,9 @@ APMPACKAGE= apm .endif .if ${MK_AUTOFS} != "no" -FILES+= automount -FILES+= automountd -FILES+= autounmountd +CONFS+= automount +CONFS+= automountd +CONFS+= autounmountd .endif .if ${MK_BLACKLIST} != "no" @@ -177,77 +174,81 @@ _blacklistd+= blacklistd _bluetooth= bluetooth _bthidd= bthidd _hcsecd= hcsecd -FILES+= rfcomm_pppd_server -FILES+= sdpd +CONFS+= rfcomm_pppd_server +CONFS+= sdpd _ubthidhci= ubthidhci .endif .if ${MK_BOOTPARAMD} != "no" -FILES+= bootparams +CONFS+= bootparams .endif .if ${MK_BSNMP} != "no" -FILESGROUPS+= BSNMP +CONFSGROUPS+= BSNMP BSNMP+= bsnmpd BSNMPPACKAGE= bsnmp .endif .if ${MK_CCD} != "no" -FILES+= ccd +CONFS+= ccd .endif .if ${MK_FTP} != "no" -FILES+= ftpd +CONFS+= ftpd .endif .if ${MK_HAST} != "no" -FILESGROUPS+= HAST +CONFSGROUPS+= HAST HAST= hastd HASTPACKAGE= hast .endif .if ${MK_INETD} != "no" -FILES+= inetd +CONFS+= inetd .endif .if ${MK_IPFW} != "no" -FILES+= ipfw +CONFS+= ipfw .if ${MK_NETGRAPH} != "no" -FILES+= ipfw_netflow +CONFS+= ipfw_netflow .endif .endif .if ${MK_ISCSI} != "no" -FILES+= iscsictl -FILES+= iscsid +CONFS+= iscsictl +CONFS+= iscsid .endif .if ${MK_JAIL} != "no" -FILESGROUPS+= JAIL +CONFSGROUPS+= JAIL JAIL+= jail JAILPACKAGE= jail .endif .if ${MK_LEGACY_CONSOLE} != "no" -FILES+= moused -FILES+= syscons +CONFS+= moused +CONFS+= syscons .endif .if ${MK_LPR} != "no" -FILES+= lpd +CONFS+= lpd .endif .if ${MK_KERBEROS} != "no" -FILES+= ipropd_master -FILES+= ipropd_slave +CONFS+= ipropd_master +CONFS+= ipropd_slave _kadmind= kadmind _kdc= kdc _kfd= kfd _kpasswdd= kpasswdd + +DIRS+= VAR_HEMIDAL +VAR_HEMIDAL= /var/heimdal +VAR_HEMIDAL_MODE= 700 .endif .if ${MK_MAIL} != "no" -FILES+= othermta +CONFS+= othermta .endif .if ${MK_NS_CACHING} != "no" @@ -255,7 +256,7 @@ _nscd= nscd .endif .if ${MK_NTP} != "no" -FILES+= ntpd +CONFS+= ntpd .endif .if ${MK_OFED} != "no" @@ -263,35 +264,35 @@ _opensm= opensm .endif .if ${MK_OPENSSL} != "no" -FILES+= keyserv +CONFS+= keyserv .endif .if ${MK_OPENSSH} != "no" -FILESGROUPS+= SSH +CONFSGROUPS+= SSH SSH= sshd SSHPACKAGE= ssh .endif .if ${MK_PF} != "no" -FILES+= ftp-proxy +CONFS+= ftp-proxy .endif .if ${MK_ROUTED} != "no" -FILES+= routed +CONFS+= routed .endif .if ${MK_SENDMAIL} != "no" -FILESGROUPS+= SMRCD +CONFSGROUPS+= SMRCD SMRCD= sendmail SMRCDPACKAGE= sendmail .endif .if ${MK_TIMED} != "no" -FILES+= timed +CONFS+= timed .endif .if ${MK_UNBOUND} != "no" -FILESGROUPS+= UNBOUND +CONFSGROUPS+= UNBOUND UNBOUND+= local_unbound UNBOUNDPACKAGE= unbound .endif @@ -301,26 +302,29 @@ _utx= utx .endif .if ${MK_VI} != "no" -FILESGROUPS+= VI +CONFSGROUPS+= VI VI+= virecover VIPACKAGE= vi .endif .if ${MK_WIRELESS} != "no" -FILES+= hostapd -FILES+= wpa_supplicant +CONFS+= hostapd +CONFS+= wpa_supplicant .endif .if ${MK_ZFS} != "no" -FILESGROUPS+= ZFS +CONFSGROUPS+= ZFS ZFS+= zfs ZFS+= zfsbe ZFS+= zfsd ZFS+= zvol ZFSPACKAGE= zfs +DIRS+= ETC_ZFS +ETC_ZFS= /etc/zfs +ETC_ZFSPACKAGE= zfs .endif -.for fg in ${FILESGROUPS} +.for fg in ${CONFSGROUPS} ${fg}MODE?= ${BINMODE} .endfor From owner-svn-src-head@freebsd.org Sat Jul 28 20:41: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 91E80105E083; Sat, 28 Jul 2018 20:41: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 45E4D80918; Sat, 28 Jul 2018 20:41:34 +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 27C493F87; Sat, 28 Jul 2018 20:41:34 +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 w6SKfYtc041973; Sat, 28 Jul 2018 20:41:34 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6SKfXEJ041970; Sat, 28 Jul 2018 20:41:33 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201807282041.w6SKfXEJ041970@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Sat, 28 Jul 2018 20:41:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336847 - in head: etc etc/defaults sbin/init X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: in head: etc etc/defaults sbin/init X-SVN-Commit-Revision: 336847 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, 28 Jul 2018 20:41:35 -0000 Author: brd Date: Sat Jul 28 20:41:33 2018 New Revision: 336847 URL: https://svnweb.freebsd.org/changeset/base/336847 Log: Opps, I missed moving a couple of files in r336845. Approved by: will (mentor) Differential Revision: https://reviews.freebsd.org/D16466 Added: head/sbin/init/netstart - copied unchanged from r336846, head/etc/netstart head/sbin/init/network.subr - copied unchanged from r336846, head/etc/network.subr head/sbin/init/pccard_ether - copied unchanged from r336846, head/etc/pccard_ether head/sbin/init/rc - copied unchanged from r336846, head/etc/rc head/sbin/init/rc.conf - copied unchanged from r336846, head/etc/defaults/rc.conf head/sbin/init/rc.initdiskless - copied unchanged from r336846, head/etc/rc.initdiskless head/sbin/init/rc.resume - copied unchanged from r336846, head/etc/rc.resume head/sbin/init/rc.shutdown - copied unchanged from r336846, head/etc/rc.shutdown head/sbin/init/rc.subr - copied unchanged from r336846, head/etc/rc.subr head/sbin/init/rc.suspend - copied unchanged from r336846, head/etc/rc.suspend Deleted: head/etc/defaults/rc.conf head/etc/netstart head/etc/network.subr head/etc/pccard_ether head/etc/rc head/etc/rc.initdiskless head/etc/rc.resume head/etc/rc.shutdown head/etc/rc.subr head/etc/rc.suspend Copied: head/sbin/init/netstart (from r336846, head/etc/netstart) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/init/netstart Sat Jul 28 20:41:33 2018 (r336847, copy of r336846, head/etc/netstart) @@ -0,0 +1,57 @@ +#!/bin/sh - +# +# Copyright (c) 1993 The FreeBSD Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# From: @(#)netstart 5.9 (Berkeley) 3/30/91 +# + +# This file is NOT called by any of the other scripts - it has been +# obsoleted by /etc/rc.d/* and is provided here only for user +# convenience (if you're sitting in single user mode and wish to start +# the network by hand, this script will do it for you). +# + +_start=quietstart + +/etc/rc.d/devd ${_start} +/etc/rc.d/hostid ${_start} +/etc/rc.d/hostname ${_start} +/etc/rc.d/ipmon ${_start} +/etc/rc.d/ipfilter ${_start} +/etc/rc.d/ipnat ${_start} +/etc/rc.d/ipfs ${_start} +/etc/rc.d/sppp ${_start} +/etc/rc.d/netif ${_start} +/etc/rc.d/ipsec ${_start} +/etc/rc.d/ppp ${_start} +/etc/rc.d/ipfw ${_start} +/etc/rc.d/routing ${_start} +/etc/rc.d/route6d ${_start} +/etc/rc.d/routed ${_start} +/etc/rc.d/rtsold ${_start} +/etc/rc.d/nisdomain ${_start} + +exit 0 Copied: head/sbin/init/network.subr (from r336846, head/etc/network.subr) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/init/network.subr Sat Jul 28 20:41:33 2018 (r336847, copy of r336846, head/etc/network.subr) @@ -0,0 +1,1793 @@ +# +# Copyright (c) 2003 The FreeBSD Project. 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 PROJECT 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 PROJECT OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# +IFCONFIG_CMD="/sbin/ifconfig" +: ${netif_ipexpand_max:=2048} + +# +# Subroutines commonly used from network startup scripts. +# Requires that rc.conf be loaded first. +# + +# ifn_start ifn +# Bring up and configure an interface. If some configuration is +# applied, print the interface configuration. +# +ifn_start() +{ + local ifn cfg + ifn="$1" + cfg=1 + + [ -z "$ifn" ] && err 1 "ifn_start called without an interface" + + ifscript_up ${ifn} && cfg=0 + ifconfig_up ${ifn} && cfg=0 + if ! noafif $ifn; then + afexists inet && ipv4_up ${ifn} && cfg=0 + afexists inet6 && ipv6_up ${ifn} && cfg=0 + fi + childif_create ${ifn} && cfg=0 + + return $cfg +} + +# ifn_stop ifn +# Shutdown and de-configure an interface. If action is taken, +# print the interface name. +# +ifn_stop() +{ + local ifn cfg + ifn="$1" + cfg=1 + + [ -z "$ifn" ] && err 1 "ifn_stop called without an interface" + + if ! noafif $ifn; then + afexists inet6 && ipv6_down ${ifn} && cfg=0 + afexists inet && ipv4_down ${ifn} && cfg=0 + fi + ifconfig_down ${ifn} && cfg=0 + ifscript_down ${ifn} && cfg=0 + childif_destroy ${ifn} && cfg=0 + + return $cfg +} + +# ifn_vnetup ifn +# Move ifn to the specified vnet jail. +# +ifn_vnetup() +{ + + ifn_vnet0 $1 vnet +} + +# ifn_vnetdown ifn +# Reclaim ifn from the specified vnet jail. +# +ifn_vnetdown() +{ + + ifn_vnet0 $1 -vnet +} + +# ifn_vnet0 ifn action +# Helper function for ifn_vnetup and ifn_vnetdown. +# +ifn_vnet0() +{ + local _ifn _cfg _action _vnet + _ifn="$1" + _action="$2" + _cfg=1 + + if _vnet=$(vnetif $_ifn); then + ${IFCONFIG_CMD} $_ifn $_action $_vnet && _cfg=0 + fi + + return $_cfg +} + +# ifconfig_up if +# Evaluate ifconfig(8) arguments for interface $if and +# run ifconfig(8) with those arguments. It returns 0 if +# arguments were found and executed or 1 if the interface +# had no arguments. Pseudo arguments DHCP and WPA are handled +# here. +# +ifconfig_up() +{ + local _cfg _ifconfig_descr _ipv6_opts ifconfig_args + _cfg=1 + + # Make sure lo0 always comes up. + if [ "$1" = "lo0" ]; then + _cfg=0 + fi + + # inet6 specific + if ! noafif $1 && afexists inet6; then + if checkyesno ipv6_activate_all_interfaces; then + _ipv6_opts="-ifdisabled" + elif [ "$1" != "lo0" ]; then + _ipv6_opts="ifdisabled" + fi + + # backward compatibility: $ipv6_enable + case $ipv6_enable in + [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) + case $1 in + bridge[0-9]*) + # No accept_rtadv by default on if_bridge(4) + # to avoid a conflict with the member + # interfaces. + ;; + *) + if ! checkyesno ipv6_gateway_enable; then + _ipv6_opts="${_ipv6_opts} accept_rtadv" + fi + ;; + esac + ;; + esac + + case $ipv6_cpe_wanif in + $1) + _ipv6_opts="${_ipv6_opts} -no_radr accept_rtadv" + ;; + esac + + if [ -n "${_ipv6_opts}" ]; then + ${IFCONFIG_CMD} $1 inet6 ${_ipv6_opts} + fi + fi + + # ifconfig_IF + ifconfig_args=`ifconfig_getargs $1` + if [ -n "${ifconfig_args}" ]; then + eval ${IFCONFIG_CMD} $1 ${ifconfig_args} + _cfg=0 + fi + + # inet6 specific + if ! noafif $1 && afexists inet6; then + # ifconfig_IF_ipv6 + ifconfig_args=`ifconfig_getargs $1 ipv6` + if [ -n "${ifconfig_args}" ]; then + # backward compatibility: inet6 keyword + case "${ifconfig_args}" in + :*|[0-9a-fA-F]*:*) + warn "\$ifconfig_$1_ipv6 needs leading" \ + "\"inet6\" keyword for an IPv6 address." + ifconfig_args="inet6 ${ifconfig_args}" + ;; + esac + ${IFCONFIG_CMD} $1 inet6 -ifdisabled + eval ${IFCONFIG_CMD} $1 ${ifconfig_args} + _cfg=0 + fi + + # $ipv6_prefix_IF will be handled in + # ipv6_prefix_hostid_addr_common(). + ifconfig_args=`get_if_var $1 ipv6_prefix_IF` + if [ -n "${ifconfig_args}" ]; then + ${IFCONFIG_CMD} $1 inet6 -ifdisabled + _cfg=0 + fi + + # backward compatibility: $ipv6_ifconfig_IF + ifconfig_args=`get_if_var $1 ipv6_ifconfig_IF` + if [ -n "${ifconfig_args}" ]; then + warn "\$ipv6_ifconfig_$1 is obsolete." \ + " Use ifconfig_$1_ipv6 instead." + ${IFCONFIG_CMD} $1 inet6 -ifdisabled + eval ${IFCONFIG_CMD} $1 inet6 ${ifconfig_args} + _cfg=0 + fi + fi + + ifalias $1 link alias + ifalias $1 ether alias + + _ifconfig_descr=`get_if_var $1 ifconfig_IF_descr` + if [ -n "${_ifconfig_descr}" ]; then + ${IFCONFIG_CMD} $1 description "${_ifconfig_descr}" + fi + + if wpaif $1; then + /etc/rc.d/wpa_supplicant start $1 + _cfg=0 # XXX: not sure this should count + elif hostapif $1; then + /etc/rc.d/hostapd start $1 + _cfg=0 + elif [ ${_cfg} -eq 0 ]; then + ${IFCONFIG_CMD} $1 up + fi + + if dhcpif $1; then + if [ $_cfg -ne 0 ] ; then + ${IFCONFIG_CMD} $1 up + fi + if syncdhcpif $1; then + /etc/rc.d/dhclient start $1 + fi + _cfg=0 + fi + + return $_cfg +} + +# ifconfig_down if +# returns 1 if wpa_supplicant or dhclient was stopped or +# the interface exists. +# +ifconfig_down() +{ + local _cfg + _cfg=1 + + if wpaif $1; then + /etc/rc.d/wpa_supplicant stop $1 + _cfg=0 + elif hostapif $1; then + /etc/rc.d/hostapd stop $1 + _cfg=0 + fi + + if dhcpif $1; then + /etc/rc.d/dhclient stop $1 + _cfg=0 + fi + + if ifexists $1; then + ${IFCONFIG_CMD} $1 down + _cfg=0 + fi + + return $_cfg +} + +# get_if_var if var [default] +# Return the value of the pseudo-hash corresponding to $if where +# $var is a string containg the sub-string "IF" which will be +# replaced with $if after the characters defined in _punct are +# replaced with '_'. If the variable is unset, replace it with +# $default if given. +get_if_var() +{ + local _if _punct _punct_c _var _default prefix suffix + + if [ $# -ne 2 -a $# -ne 3 ]; then + err 3 'USAGE: get_if_var name var [default]' + fi + + _if=$1 + _punct=".-/+" + ltr ${_if} "${_punct}" '_' _if + _var=$2 + _default=$3 + + prefix=${_var%%IF*} + suffix=${_var##*IF} + eval echo \${${prefix}${_if}${suffix}-${_default}} +} + +# _ifconfig_getargs if [af] +# Prints the arguments for the supplied interface to stdout. +# Returns 1 if empty. In general, ifconfig_getargs should be used +# outside this file. +_ifconfig_getargs() +{ + local _ifn _af + _ifn=$1 + _af=${2+_$2} + + if [ -z "$_ifn" ]; then + return 1 + fi + + get_if_var $_ifn ifconfig_IF$_af "$ifconfig_DEFAULT" +} + +# ifconfig_getargs if [af] +# Takes the result from _ifconfig_getargs and removes pseudo +# args such as DHCP and WPA. +ifconfig_getargs() +{ + local _tmpargs _arg _args _vnet + _tmpargs=`_ifconfig_getargs $1 $2` + if [ $? -eq 1 ]; then + return 1 + fi + _args= + _vnet=0 + + for _arg in $_tmpargs; do + case $_arg:$_vnet in + [Dd][Hh][Cc][Pp]:0) ;; + [Nn][Oo][Aa][Uu][Tt][Oo]:0) ;; + [Nn][Oo][Ss][Yy][Nn][Cc][Dd][Hh][Cc][Pp]:0) ;; + [Ss][Yy][Nn][Cc][Dd][Hh][Cc][Pp]:0) ;; + [Ww][Pp][Aa]:0) ;; + [Hh][Oo][Ss][Tt][Aa][Pp]:0) ;; + vnet:0) _vnet=1 ;; + *:1) _vnet=0 ;; + *:0) + _args="$_args $_arg" + ;; + esac + done + + echo $_args +} + +# autoif +# Returns 0 if the interface should be automatically configured at +# boot time and 1 otherwise. +autoif() +{ + local _tmpargs _arg + _tmpargs=`_ifconfig_getargs $1` + + for _arg in $_tmpargs; do + case $_arg in + [Nn][Oo][Aa][Uu][Tt][Oo]) + return 1 + ;; + esac + done + + return 0 +} + +# dhcpif if +# Returns 0 if the interface is a DHCP interface and 1 otherwise. +dhcpif() +{ + local _tmpargs _arg + _tmpargs=`_ifconfig_getargs $1` + + case $1 in + lo[0-9]*|\ + stf[0-9]*|\ + lp[0-9]*|\ + sl[0-9]*) + return 1 + ;; + esac + if noafif $1; then + return 1 + fi + + for _arg in $_tmpargs; do + case $_arg in + [Dd][Hh][Cc][Pp]) + return 0 + ;; + [Nn][Oo][Ss][Yy][Nn][Cc][Dd][Hh][Cc][Pp]) + return 0 + ;; + [Ss][Yy][Nn][Cc][Dd][Hh][Cc][Pp]) + return 0 + ;; + esac + done + + return 1 +} + +# syncdhcpif +# Returns 0 if the interface should be configured synchronously and +# 1 otherwise. +syncdhcpif() +{ + local _tmpargs _arg + _tmpargs=`_ifconfig_getargs $1` + + if noafif $1; then + return 1 + fi + + for _arg in $_tmpargs; do + case $_arg in + [Nn][Oo][Ss][Yy][Nn][Cc][Dd][Hh][Cc][Pp]) + return 1 + ;; + [Ss][Yy][Nn][Cc][Dd][Hh][Cc][Pp]) + return 0 + ;; + esac + done + + checkyesno synchronous_dhclient +} + +# wpaif if +# Returns 0 if the interface is a WPA interface and 1 otherwise. +wpaif() +{ + local _tmpargs _arg + _tmpargs=`_ifconfig_getargs $1` + + for _arg in $_tmpargs; do + case $_arg in + [Ww][Pp][Aa]) + return 0 + ;; + esac + done + + return 1 +} + +# hostapif if +# Returns 0 if the interface is a HOSTAP interface and 1 otherwise. +hostapif() +{ + local _tmpargs _arg + _tmpargs=`_ifconfig_getargs $1` + + for _arg in $_tmpargs; do + case $_arg in + [Hh][Oo][Ss][Tt][Aa][Pp]) + return 0 + ;; + esac + done + + return 1 +} + +# vnetif if +# Returns 0 and echo jail if "vnet" keyword is specified on the +# interface, and 1 otherwise. +vnetif() +{ + local _tmpargs _arg _vnet + _tmpargs=`_ifconfig_getargs $1` + + _vnet=0 + for _arg in $_tmpargs; do + case $_arg:$_vnet in + vnet:0) _vnet=1 ;; + *:1) echo $_arg; return 0 ;; + esac + done + + return 1 +} + +# afexists af +# Returns 0 if the address family is enabled in the kernel +# 1 otherwise. +afexists() +{ + local _af + _af=$1 + + case ${_af} in + inet|inet6) + check_kern_features ${_af} + ;; + link|ether) + return 0 + ;; + *) + err 1 "afexists(): Unsupported address family: $_af" + ;; + esac +} + +# noafif if +# Returns 0 if the interface has no af configuration and 1 otherwise. +noafif() +{ + local _if + _if=$1 + + case $_if in + pflog[0-9]*|\ + pfsync[0-9]*|\ + usbus[0-9]*|\ + an[0-9]*|\ + ath[0-9]*|\ + ipw[0-9]*|\ + ipfw[0-9]*|\ + iwi[0-9]*|\ + iwn[0-9]*|\ + ral[0-9]*|\ + wi[0-9]*|\ + wl[0-9]*|\ + wpi[0-9]*) + return 0 + ;; + esac + + return 1 +} + +# ipv6if if +# Returns 0 if the interface should be configured for IPv6 and +# 1 otherwise. +ipv6if() +{ + local _if _tmpargs i + _if=$1 + + if ! afexists inet6; then + return 1 + fi + + # lo0 is always IPv6-enabled + case $_if in + lo0) + return 0 + ;; + esac + + case "${ipv6_network_interfaces}" in + $_if|"$_if "*|*" $_if"|*" $_if "*|[Aa][Uu][Tt][Oo]) + # True if $ifconfig_IF_ipv6 is defined. + _tmpargs=`_ifconfig_getargs $_if ipv6` + if [ -n "${_tmpargs}" ]; then + return 0 + fi + + # True if $ipv6_prefix_IF is defined. + _tmpargs=`get_if_var $_if ipv6_prefix_IF` + if [ -n "${_tmpargs}" ]; then + return 0 + fi + + # backward compatibility: True if $ipv6_ifconfig_IF is defined. + _tmpargs=`get_if_var $_if ipv6_ifconfig_IF` + if [ -n "${_tmpargs}" ]; then + return 0 + fi + ;; + esac + + return 1 +} + +# ipv6_autoconfif if +# Returns 0 if the interface should be configured for IPv6 with +# Stateless Address Configuration; 1 otherwise. +ipv6_autoconfif() +{ + local _if _tmpargs _arg + _if=$1 + + case $_if in + lo[0-9]*|\ + stf[0-9]*|\ + lp[0-9]*|\ + sl[0-9]*) + return 1 + ;; + esac + if noafif $_if; then + return 1 + fi + if ! ipv6if $_if; then + return 1 + fi + if checkyesno ipv6_gateway_enable; then + return 1 + fi + _tmpargs=`get_if_var $_if ipv6_prefix_IF` + if [ -n "${_tmpargs}" ]; then + return 1 + fi + # backward compatibility: $ipv6_enable + case $ipv6_enable in + [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) + if checkyesno ipv6_gateway_enable; then + return 1 + fi + case $1 in + bridge[0-9]*) + # No accept_rtadv by default on if_bridge(4) + # to avoid a conflict with the member + # interfaces. + return 1 + ;; + *) + return 0 + ;; + esac + ;; + esac + + _tmpargs=`_ifconfig_getargs $_if ipv6` + for _arg in $_tmpargs; do + case $_arg in + accept_rtadv) + return 0 + ;; + esac + done + + # backward compatibility: $ipv6_ifconfig_IF + _tmpargs=`get_if_var $_if ipv6_ifconfig_IF` + for _arg in $_tmpargs; do + case $_arg in + accept_rtadv) + return 0 + ;; + esac + done + + return 1 +} + +# ifexists if +# Returns 0 if the interface exists and 1 otherwise. +ifexists() +{ + [ -z "$1" ] && return 1 + ${IFCONFIG_CMD} -n $1 > /dev/null 2>&1 +} + +# ipv4_up if +# add IPv4 addresses to the interface $if +ipv4_up() +{ + local _if _ret + _if=$1 + _ret=1 + + # Add 127.0.0.1/8 to lo0 unless otherwise specified. + if [ "${_if}" = "lo0" ]; then + ifconfig_args=`get_if_var ${_if} ifconfig_IF` + if [ -z "${ifconfig_args}" ]; then + ${IFCONFIG_CMD} ${_if} inet 127.0.0.1/8 alias + fi + fi + ifalias ${_if} inet alias && _ret=0 + + return $_ret +} + +# ipv6_up if +# add IPv6 addresses to the interface $if +ipv6_up() +{ + local _if _ret + _if=$1 + _ret=1 + + if ! ipv6if $_if; then + return 0 + fi + + ifalias ${_if} inet6 alias && _ret=0 + ipv6_prefix_hostid_addr_common ${_if} alias && _ret=0 + ipv6_accept_rtadv_up ${_if} && _ret=0 + + return $_ret +} + +# ipv4_down if +# remove IPv4 addresses from the interface $if +ipv4_down() +{ + local _if _ifs _ret inetList oldifs _inet + _if=$1 + _ifs="^" + _ret=1 + + ifalias ${_if} inet -alias && _ret=0 + + inetList="`${IFCONFIG_CMD} ${_if} | grep 'inet ' | tr "\n\t" "$_ifs"`" + + oldifs="$IFS" + IFS="$_ifs" + for _inet in $inetList ; do + # get rid of extraneous line + case $_inet in + inet\ *) ;; + *) continue ;; + esac + + _inet=`expr "$_inet" : '.*\(inet \([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}\).*'` + + IFS="$oldifs" + ${IFCONFIG_CMD} ${_if} ${_inet} delete + IFS="$_ifs" + _ret=0 + done + IFS="$oldifs" + + return $_ret +} + +# ipv6_down if +# remove IPv6 addresses from the interface $if +ipv6_down() +{ + local _if _ifs _ret inetList oldifs _inet6 + _if=$1 + _ifs="^" + _ret=1 + + if ! ipv6if $_if; then + return 0 + fi + + ipv6_accept_rtadv_down ${_if} && _ret=0 + ipv6_prefix_hostid_addr_common ${_if} -alias && _ret=0 + ifalias ${_if} inet6 -alias && _ret=0 + + inetList="`${IFCONFIG_CMD} ${_if} | grep 'inet6 ' | tr "\n\t" "$_ifs"`" + + oldifs="$IFS" + IFS="$_ifs" + for _inet6 in $inetList ; do + # get rid of extraneous line + case $_inet6 in + inet6\ *) ;; + *) continue ;; + esac + + _inet6=`expr "$_inet6" : '.*\(inet6 \([0-9a-f:]*\)\).*'` + + IFS="$oldifs" + ${IFCONFIG_CMD} ${_if} ${_inet6} -alias + IFS="$_ifs" + _ret=0 + done + IFS="$oldifs" + + return $_ret +} + +# ifalias if af action +# Configure or remove aliases for network interface $if. +# It returns 0 if at least one alias was configured or +# removed, or 1 if there were none. +# +ifalias() +{ + local _ret + _ret=1 + + afexists $2 || return $_ret + + case "$2" in + inet|inet6|link|ether) + ifalias_af_common $1 $2 $3 && _ret=0 + ;; + esac + + return $_ret +} + +# ifalias_expand_addr af action addr +# Expand address range ("N-M") specification in addr. +# "addr" must not include an address-family keyword. +# The results will include an address-family keyword. +# +ifalias_expand_addr() +{ + local _af _action + + _af=$1 + _action=$2 + shift 2 + + afexists $_af || return + ifalias_expand_addr_$_af $_action $* +} + +# ifalias_expand_addr_inet action addr +# Helper function for ifalias_expand_addr(). Handles IPv4. +# +ifalias_expand_addr_inet() +{ + local _action _arg _cidr _cidr_addr _exargs + local _ipaddr _plen _range _iphead _iptail _iplow _iphigh _ipcount + local _retstr _c + _action=$1 + _arg=$2 + shift 2 + _exargs=$* + _retstr= + + case $_action:$_arg:$_exargs in + *:*--*) return ;; # invalid + tmp:*[0-9]-[0-9]*:*) # to be expanded + _action="alias" + ;; + *:*[0-9]-[0-9]*:*) # to be expanded + ;; + tmp:*:*netmask*) # already expanded w/ netmask option + echo ${_arg%/[0-9]*} $_exargs && return + ;; + tmp:*:*) # already expanded w/o netmask option + echo $_arg $_exargs && return + ;; + *:*:*netmask*) # already expanded w/ netmask option + echo inet ${_arg%/[0-9]*} $_exargs && return + ;; + *:*:*) # already expanded w/o netmask option + echo inet $_arg $_exargs && return + ;; + esac + + for _cidr in $_arg; do + _ipaddr=${_cidr%%/*} + _plen=${_cidr##*/} + # When subnet prefix length is not specified, use /32. + case $_plen in + $_ipaddr) _plen=32 ;; # "/" character not found + esac + + OIFS=$IFS + IFS=. set -- $_ipaddr + _range= + _iphead= + _iptail= + for _c in $@; do + case $_range:$_c in + :[0-9]*-[0-9]*) + _range=$_c + ;; + :*) + _iphead="${_iphead}${_iphead:+.}${_c}" + ;; + *:*) + _iptail="${_iptail}${_iptail:+.}${_c}" + ;; + esac + done + IFS=$OIFS + _iplow=${_range%-*} + _iphigh=${_range#*-} + + # clear netmask when removing aliases + if [ "$_action" = "-alias" ]; then + _plen="" + fi + + _ipcount=$_iplow + while [ "$_ipcount" -le "$_iphigh" ]; do + _retstr="${_retstr} ${_iphead}${_iphead:+.}${_ipcount}${_iptail:+.}${_iptail}${_plen:+/}${_plen}" + if [ $_ipcount -gt $(($_iplow + $netif_ipexpand_max)) ]; then + warn "Range specification is too large (${_iphead}${_iphead:+.}${_iplow}${_iptail:+.}${_iptail}-${_iphead}${_iphead:+.}${_iphigh}${_iptail:+.}${_iptail}). ${_iphead}${_iphead:+.}${_iplow}${_iptail:+.}${_iptail}-${_iphead}${_iphead:+.}${_ipcount}${_iptail:+.}${_iptail} was processed. Increase \$netif_ipexpand_max in rc.conf." + break + else + _ipcount=$(($_ipcount + 1)) + fi + # Forcibly set /32 for remaining aliases. + _plen=32 + done + done + + for _c in $_retstr; do + ifalias_expand_addr_inet $_action $_c $_exargs + done +} + +# ifalias_expand_addr_inet6 action addr +# Helper function for ifalias_expand_addr(). Handles IPv6. +# +ifalias_expand_addr_inet6() +{ + local _action _arg _cidr _cidr_addr _exargs + local _ipaddr _plen _ipleft _ipright _iplow _iphigh _ipcount + local _ipv4part + local _retstr _c + _action=$1 + _arg=$2 + shift 2 + _exargs=$* + _retstr= + + case $_action:$_arg:$_exargs in + *:*--*:*) return ;; # invalid + tmp:*[0-9a-zA-Z]-[0-9a-zA-Z]*:*)# to be expanded + _action="alias" + ;; + *:*[0-9a-zA-Z]-[0-9a-zA-Z]*:*) # to be expanded + ;; + tmp:*:*prefixlen*) # already expanded w/ prefixlen option + echo ${_arg%/[0-9]*} $_exargs && return + ;; + tmp:*:*) # already expanded w/o prefixlen option + echo $_arg $_exargs && return + ;; + *:*:*prefixlen*) # already expanded w/ prefixlen option + echo inet6 ${_arg%/[0-9]*} $_exargs && return + ;; + *:*:*) # already expanded w/o prefixlen option + echo inet6 $_arg $_exargs && return + ;; + esac + + for _cidr in $_arg; do + _ipaddr="${_cidr%%/*}" + _plen="${_cidr##*/}" + + case $_action:$_ipaddr:$_cidr in *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Sat Jul 28 20:45: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 1D494105E185; Sat, 28 Jul 2018 20:45:37 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B93D880C66; Sat, 28 Jul 2018 20:45:36 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 94F6B4115; Sat, 28 Jul 2018 20:45:36 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6SKjald042894; Sat, 28 Jul 2018 20:45:36 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6SKjamB042893; Sat, 28 Jul 2018 20:45:36 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201807282045.w6SKjamB042893@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sat, 28 Jul 2018 20:45:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336848 - head/release/arm X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: head/release/arm X-SVN-Commit-Revision: 336848 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, 28 Jul 2018 20:45:37 -0000 Author: manu Date: Sat Jul 28 20:45:36 2018 New Revision: 336848 URL: https://svnweb.freebsd.org/changeset/base/336848 Log: release: arm: Add a GENERIC sdcard image This produce a generic sdcard image using armv7 GENERIC kernel that just need some u-boot (or none if the board have u-boot or a SPI flash for example). Reviewed by: imp, gjb Differential Revision: https://reviews.freebsd.org/D16410 Added: head/release/arm/GENERICSD.conf (contents, props changed) Added: head/release/arm/GENERICSD.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/arm/GENERICSD.conf Sat Jul 28 20:45:36 2018 (r336848) @@ -0,0 +1,16 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +EMBEDDED_TARGET_ARCH="armv7" +EMBEDDED_TARGET="arm" +EMBEDDEDBUILD=1 +FAT_SIZE="50m -b 1m" +FAT_TYPE="16" +IMAGE_SIZE="3072M" +KERNEL="GENERIC" +MD_ARGS="-x 63 -y 255" +NODOC=1 +PART_SCHEME="MBR" +export BOARDNAME="GENERICSD" From owner-svn-src-head@freebsd.org Sat Jul 28 21:05: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 E0DA7105E909; Sat, 28 Jul 2018 21:05:40 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f44.google.com (mail-it0-f44.google.com [209.85.214.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 6AA0281584; Sat, 28 Jul 2018 21:05:40 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f44.google.com with SMTP id s7-v6so12351366itb.4; Sat, 28 Jul 2018 14:05:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=Mc5z/9YPuIjC8NL222/07PnHzkJHYNPRTWZsayRlMSc=; b=Tbe+axQuvI6Gxr5M7WPkeTZHrQAx2GKN5AUpakv2ikngiCLigrDA9L7K1jFwa4jOFd YbwxH7oeJr+yuNVA7felb0kvnMLqpJnw62x6vaNDfEyV2VTxQr+S/FMocioaq/qpfnYL TyogqvnAMz7ASZCGh9my5apVVAAeLra+PVN4lAeFuktU3rPkyRO5rRJ7RQZZhajhq2Y8 svXC4UMJ9RmbyEfslAixIwCIvFxgGbesH5dooFzThKQmcKZ8qWG7WK+0ZD2xPp7rPxZa CWFw8Cdn+TeXo44VFxLUyVvknOMGlJic+vB/eAwjjecSWvySfqtuFDt/jKh1Vw4pcZW8 Du1w== X-Gm-Message-State: AOUpUlEihhOcuZyEVOvI+RJsdDJ6+xFlPdmwc2abCvb60C3ZmvgvKUAK yjZ1Ahv7iMicrwQb1JvtDg+qrKgb X-Google-Smtp-Source: AAOMgpf4PUmwNcJwk6dzMpNiNtHgeOVxdAuO9moUSnLT6v0ZV0/wzosWMyp5lc/6zKbsbIT77R4r/A== X-Received: by 2002:a02:702:: with SMTP id f2-v6mr11277717jaf.70.1532811557273; Sat, 28 Jul 2018 13:59:17 -0700 (PDT) Received: from mail-io0-f169.google.com (mail-io0-f169.google.com. [209.85.223.169]) by smtp.gmail.com with ESMTPSA id b15-v6sm4503803itb.25.2018.07.28.13.59.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Jul 2018 13:59:17 -0700 (PDT) Received: by mail-io0-f169.google.com with SMTP id k16-v6so6885034iom.12; Sat, 28 Jul 2018 13:59:17 -0700 (PDT) X-Received: by 2002:a6b:b0c5:: with SMTP id z188-v6mr9040672ioe.220.1532811557047; Sat, 28 Jul 2018 13:59:17 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 2002:a02:7e0a:0:0:0:0:0 with HTTP; Sat, 28 Jul 2018 13:59:16 -0700 (PDT) In-Reply-To: <20180728203253.GB40119@kib.kiev.ua> References: <201807281908.w6SJ80qo089859@repo.freebsd.org> <20180728200611.GA40119@kib.kiev.ua> <20180728203253.GB40119@kib.kiev.ua> From: Conrad Meyer Date: Sat, 28 Jul 2018 13:59:16 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r336835 - head/lib/libc/gen To: Konstantin Belousov 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.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, 28 Jul 2018 21:05:41 -0000 On Sat, Jul 28, 2018 at 1:32 PM, Konstantin Belousov wrote: > Our existing practice is to not provide an advise in the man pages > for the userspace code which would harm the portability or the standard > conformance. Perhaps, but you do not have to look beyond this manual page to find that such a practice, if it is even nominally applied, is not followed consistently. The remainder of the document spells the terminating value as plain "NULL." FreeBSD manual pages consistently refer to NULL as a pointer value. The Linux manual page spells the terminating value (char *)NULL and explicitly documents why. That is perhaps both pedantically correct and clear. I am amenable to such a change. > I am not so sure about CheriBSD, for instance. I observe simply that CheriBSD is not FreeBSD and that CHERI is an exotic architecture. Best, Conrad From owner-svn-src-head@freebsd.org Sat Jul 28 21:45: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 7EDEF105F890; Sat, 28 Jul 2018 21:45:34 +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 D668C82993; Sat, 28 Jul 2018 21:45:33 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id w6SLjNFu031570 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 29 Jul 2018 00:45:26 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua w6SLjNFu031570 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id w6SLjNeI031568; Sun, 29 Jul 2018 00:45:23 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 29 Jul 2018 00:45:23 +0300 From: Konstantin Belousov To: Conrad Meyer Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r336835 - head/lib/libc/gen Message-ID: <20180728214523.GC40119@kib.kiev.ua> References: <201807281908.w6SJ80qo089859@repo.freebsd.org> <20180728200611.GA40119@kib.kiev.ua> <20180728203253.GB40119@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) 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.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, 28 Jul 2018 21:45:34 -0000 On Sat, Jul 28, 2018 at 01:59:16PM -0700, Conrad Meyer wrote: > On Sat, Jul 28, 2018 at 1:32 PM, Konstantin Belousov > wrote: > > Our existing practice is to not provide an advise in the man pages > > for the userspace code which would harm the portability or the standard > > conformance. > > Perhaps, but you do not have to look beyond this manual page to find > that such a practice, if it is even nominally applied, is not followed > consistently. The remainder of the document spells the terminating > value as plain "NULL." FreeBSD manual pages consistently refer to > NULL as a pointer value. > > The Linux manual page spells the terminating value (char *)NULL and > explicitly documents why. That is perhaps both pedantically correct > and clear. I am amenable to such a change. I do not see much difference between (char *)0 and (char *)NULL. Both are better there, because both are correct. If you prefer (char *)NULL, please use it. > > > I am not so sure about CheriBSD, for instance. > > I observe simply that CheriBSD is not FreeBSD and that CHERI is an > exotic architecture. We should not give an advise which breaks other architectures, even if not included into the mainline repo. From owner-svn-src-head@freebsd.org Sat Jul 28 23:02: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 70A801061207; Sat, 28 Jul 2018 23:02:11 +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 26CE684C58; Sat, 28 Jul 2018 23:02:11 +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 07D0A5783; Sat, 28 Jul 2018 23:02:11 +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 w6SN2Aak013812; Sat, 28 Jul 2018 23:02:10 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6SN2AJV013811; Sat, 28 Jul 2018 23:02:10 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201807282302.w6SN2AJV013811@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Sat, 28 Jul 2018 23:02:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336849 - head/sbin/init X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: head/sbin/init X-SVN-Commit-Revision: 336849 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, 28 Jul 2018 23:02:11 -0000 Author: brd Date: Sat Jul 28 23:02:10 2018 New Revision: 336849 URL: https://svnweb.freebsd.org/changeset/base/336849 Log: Switch these to CONFS as well so they work with etcupdate/mergemaster. Approved by: will (mentor) Modified: head/sbin/init/Makefile Modified: head/sbin/init/Makefile ============================================================================== --- head/sbin/init/Makefile Sat Jul 28 20:45:36 2018 (r336848) +++ head/sbin/init/Makefile Sat Jul 28 23:02:10 2018 (r336849) @@ -1,15 +1,15 @@ # @(#)Makefile 8.1 (Berkeley) 7/19/93 # $FreeBSD$ -FILESGROUPS= FILESETC FILESETCEXEC FILESETCDEFAULTS -FILESETCDIR= /etc -FILESETC= network.subr rc rc.initdiskless rc.subr rc.shutdown -FILESETCMODE= 644 -FILESETCEXEC= netstart pccard_ether rc.resume rc.suspend -FILESETCEXECDIR= /etc -FILESETCEXECMODE= 755 -FILESETCDEFAULTSDIR= /etc/defaults -FILESETCDEFAULTS= rc.conf +CONFGROUPS= CONFETC CONFETCEXEC CONFETCDEFAULTS +CONFETCDIR= /etc +CONFETC= network.subr rc rc.initdiskless rc.subr rc.shutdown +CONFETCMODE= 644 +CONFETCEXEC= netstart pccard_ether rc.resume rc.suspend +CONFETCEXECDIR= /etc +CONFETCEXECMODE= 755 +CONFETCDEFAULTSDIR= /etc/defaults +CONFETCDEFAULTS= rc.conf PACKAGE=runtime PROG= init SRCS= init.c getmntopts.c From owner-svn-src-head@freebsd.org Sat Jul 28 23:29: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 A8FFC106168E; Sat, 28 Jul 2018 23:29:37 +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 4B54B856C9; Sat, 28 Jul 2018 23:29:37 +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 2698D5AF3; Sat, 28 Jul 2018 23:29:37 +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 w6SNTa1f024577; Sat, 28 Jul 2018 23:29:36 GMT (envelope-from brd@FreeBSD.org) Received: (from brd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6SNTaIw024574; Sat, 28 Jul 2018 23:29:36 GMT (envelope-from brd@FreeBSD.org) Message-Id: <201807282329.w6SNTaIw024574@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brd set sender to brd@FreeBSD.org using -f From: Brad Davis Date: Sat, 28 Jul 2018 23:29:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336850 - in head: etc usr.sbin/nscd X-SVN-Group: head X-SVN-Commit-Author: brd X-SVN-Commit-Paths: in head: etc usr.sbin/nscd X-SVN-Commit-Revision: 336850 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, 28 Jul 2018 23:29:37 -0000 Author: brd Date: Sat Jul 28 23:29:36 2018 New Revision: 336850 URL: https://svnweb.freebsd.org/changeset/base/336850 Log: Move nscd.conf from etc/ to usr.sbin/nscd/ Approved by: will (mentor) Differential Revision: https://reviews.freebsd.org/D16490 Added: head/usr.sbin/nscd/nscd.conf - copied unchanged from r336849, head/etc/nscd.conf Deleted: head/etc/nscd.conf Modified: head/etc/Makefile head/usr.sbin/nscd/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Sat Jul 28 23:02:10 2018 (r336849) +++ head/etc/Makefile Sat Jul 28 23:29:36 2018 (r336850) @@ -115,10 +115,6 @@ SSH= ${SRCTOP}/crypto/openssh/ssh_config \ SSL= ${SRCTOP}/crypto/openssl/apps/openssl.cnf .endif -.if ${MK_NS_CACHING} != "no" -BIN1+= nscd.conf -.endif - .if ${MK_PORTSNAP} != "no" BIN1+= portsnap.conf .endif Modified: head/usr.sbin/nscd/Makefile ============================================================================== --- head/usr.sbin/nscd/Makefile Sat Jul 28 23:02:10 2018 (r336849) +++ head/usr.sbin/nscd/Makefile Sat Jul 28 23:29:36 2018 (r336850) @@ -1,5 +1,6 @@ # $FreeBSD$ +CONFS= nscd.conf PROG= nscd MAN= nscd.conf.5 nscd.8 Copied: head/usr.sbin/nscd/nscd.conf (from r336849, head/etc/nscd.conf) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/nscd/nscd.conf Sat Jul 28 23:29:36 2018 (r336850, copy of r336849, head/etc/nscd.conf) @@ -0,0 +1,12 @@ +# +# Default caching daemon configuration file +# $FreeBSD$ +# + +enable-cache passwd yes +enable-cache group yes +enable-cache hosts yes +enable-cache services yes +enable-cache protocols yes +enable-cache rpc yes +enable-cache networks yes From owner-svn-src-head@freebsd.org Sat Jul 28 23:55: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 B59651061D9F; Sat, 28 Jul 2018 23:55:19 +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 5E4AE86378; Sat, 28 Jul 2018 23:55:19 +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 32B6F5FC6; Sat, 28 Jul 2018 23:55:19 +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 w6SNtI0w039785; Sat, 28 Jul 2018 23:55:18 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6SNtIZB039784; Sat, 28 Jul 2018 23:55:18 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201807282355.w6SNtIZB039784@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 28 Jul 2018 23:55:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336852 - head/lib/libc/gen X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/lib/libc/gen X-SVN-Commit-Revision: 336852 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, 28 Jul 2018 23:55:19 -0000 Author: cem Date: Sat Jul 28 23:55:18 2018 New Revision: 336852 URL: https://svnweb.freebsd.org/changeset/base/336852 Log: exec.3: Add BUGS section and document non-FreeBSD portability Requested by: kib (in part) Modified: head/lib/libc/gen/exec.3 Modified: head/lib/libc/gen/exec.3 ============================================================================== --- head/lib/libc/gen/exec.3 Sat Jul 28 23:47:22 2018 (r336851) +++ head/lib/libc/gen/exec.3 Sat Jul 28 23:55:18 2018 (r336852) @@ -314,3 +314,55 @@ The .Fn execvP function first appeared in .Fx 5.2 . +.Sh BUGS +The type of the +.Fa argv +and +.Fa envp +parameters to +.Fn execle , +.Fn exect , +.Fn execv , +.Fn execvp , +and +.Fn execvP +is a historical accident and no sane implementation should modify the provided +strings. +The bogus parameter types trigger false positives from +.Li const +correctness analyzers. +On +.Fx , +the +.Fn __DECONST +macro may be used to work around this limitation. +.Pp +Due to a fluke of the C standard, on platforms other than +.Fx +the definition of +.Dv NULL +may be the untyped number zero, rather than a +.Ad (void *)0 +expression. +To distinguish the concepts, they are referred to as a +.Dq null pointer constant +and a +.Dq null pointer , +respectively. +On exotic computer architectures that +.Fx +does not support, the null pointer constant and null pointer may have a +different representation. +In general, where this document and others reference a +.Dv NULL +value, they actually imply a null pointer. +E.g., for portability to non-FreeBSD operating systems on exotic computer +architectures, one may use +.Li (char *)NULL +in place of +.Dv NULL +when invoking +.Fn execl , +.Fn execle , +and +.Fn execlp . From owner-svn-src-head@freebsd.org Sat Jul 28 23:59: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 7ACC61062036; Sat, 28 Jul 2018 23:59:37 +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 1FB4E865C4; Sat, 28 Jul 2018 23:59:37 +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 EF87A5FC8; Sat, 28 Jul 2018 23:59:36 +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 w6SNxaJR040118; Sat, 28 Jul 2018 23:59:36 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6SNxaAM040117; Sat, 28 Jul 2018 23:59:36 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201807282359.w6SNxaAM040117@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Sat, 28 Jul 2018 23:59:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336853 - head/usr.sbin/wpa/wpa_supplicant X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/usr.sbin/wpa/wpa_supplicant X-SVN-Commit-Revision: 336853 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, 28 Jul 2018 23:59:37 -0000 Author: cem Date: Sat Jul 28 23:59:36 2018 New Revision: 336853 URL: https://svnweb.freebsd.org/changeset/base/336853 Log: wpa_supplicant.8: Remove removed option Our base version of wpa_supplicant does not support the -u option, so remove it. PR: 230102 Submitted by: D Green Modified: head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.8 Modified: head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.8 ============================================================================== --- head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.8 Sat Jul 28 23:55:18 2018 (r336852) +++ head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.8 Sat Jul 28 23:59:36 2018 (r336853) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 7, 2012 +.Dd July 28, 2018 .Dt WPA_SUPPLICANT 8 .Os .Sh NAME @@ -144,8 +144,6 @@ Send log messages through instead of to the terminal. .It Fl t Include timestamp in debug messages. -.It Fl u -Enable DBus control interface. .It Fl v Display version information on the terminal and exit. .It Fl W