From owner-svn-src-user@freebsd.org Sun Oct 23 19:57:27 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3685C1B2ED for ; Sun, 23 Oct 2016 19:57: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 mx1.freebsd.org (Postfix) with ESMTPS id C0A6E3C7; Sun, 23 Oct 2016 19:57: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 u9NJvQRw038226; Sun, 23 Oct 2016 19:57:26 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9NJvQqX038225; Sun, 23 Oct 2016 19:57:26 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201610231957.u9NJvQqX038225@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 23 Oct 2016 19:57:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r307829 - user/alc/PQ_LAUNDRY/sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2016 19:57:28 -0000 Author: markj Date: Sun Oct 23 19:57:26 2016 New Revision: 307829 URL: https://svnweb.freebsd.org/changeset/base/307829 Log: Use vm_page_deactivate_noreuse() instead of _vm_page_deactivate(). Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_page.c Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_page.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/vm/vm_page.c Sun Oct 23 19:02:19 2016 (r307828) +++ user/alc/PQ_LAUNDRY/sys/vm/vm_page.c Sun Oct 23 19:57:26 2016 (r307829) @@ -3314,7 +3314,7 @@ vm_page_advise(vm_page_t m, int advice) * laundry are moved there. */ if (m->dirty == 0) - _vm_page_deactivate(m, TRUE); + vm_page_deactivate_noreuse(m); else vm_page_launder(m); } From owner-svn-src-user@freebsd.org Mon Oct 24 07:50:41 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 736EEC1FFFA for ; Mon, 24 Oct 2016 07:50:41 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 45F20E71; Mon, 24 Oct 2016 07:50:41 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9O7oegm005543; Mon, 24 Oct 2016 07:50:40 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9O7oeQ4005526; Mon, 24 Oct 2016 07:50:40 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201610240750.u9O7oeQ4005526@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Mon, 24 Oct 2016 07:50:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r307847 - user/pho/stress2/misc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2016 07:50:41 -0000 Author: pho Date: Mon Oct 24 07:50:40 2016 New Revision: 307847 URL: https://svnweb.freebsd.org/changeset/base/307847 Log: Added problem found. Sponsored by: Dell EMC Isilon Modified: user/pho/stress2/misc/quota4.sh Modified: user/pho/stress2/misc/quota4.sh ============================================================================== --- user/pho/stress2/misc/quota4.sh Mon Oct 24 06:10:57 2016 (r307846) +++ user/pho/stress2/misc/quota4.sh Mon Oct 24 07:50:40 2016 (r307847) @@ -31,6 +31,7 @@ [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 # Has shown a deadlock after 7 hours of testing +# https://people.freebsd.org/~pho/stress/log/quota4.txt . ../default.cfg From owner-svn-src-user@freebsd.org Mon Oct 24 07:52:05 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53616C1F144 for ; Mon, 24 Oct 2016 07:52:05 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 235A71165; Mon, 24 Oct 2016 07:52:05 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9O7q49C008818; Mon, 24 Oct 2016 07:52:04 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9O7q4ub008817; Mon, 24 Oct 2016 07:52:04 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201610240752.u9O7q4ub008817@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Mon, 24 Oct 2016 07:52:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r307848 - user/pho/stress2/misc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2016 07:52:05 -0000 Author: pho Date: Mon Oct 24 07:52:04 2016 New Revision: 307848 URL: https://svnweb.freebsd.org/changeset/base/307848 Log: Only load and unload geom_nop, if not already loaded. Sponsored by: Dell EMC Isilon Modified: user/pho/stress2/misc/gnop.sh Modified: user/pho/stress2/misc/gnop.sh ============================================================================== --- user/pho/stress2/misc/gnop.sh Mon Oct 24 07:50:40 2016 (r307847) +++ user/pho/stress2/misc/gnop.sh Mon Oct 24 07:52:04 2016 (r307848) @@ -59,11 +59,13 @@ test() { mdconfig -d -u $mdstart } -gnop load +kldstat | grep -q geom_nop || { gnop load 2>/dev/null || exit 0 && + notloaded=1; } gnop status || exit for i in 1k 2k 4k 8k; do test $i done -gnop unload +[ $notloaded ] && gnop unload +exit 0 From owner-svn-src-user@freebsd.org Mon Oct 24 07:54:56 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8381C1F17A for ; Mon, 24 Oct 2016 07:54:56 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 999261301; Mon, 24 Oct 2016 07:54:56 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9O7stHD008947; Mon, 24 Oct 2016 07:54:55 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9O7std5008946; Mon, 24 Oct 2016 07:54:55 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201610240754.u9O7std5008946@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Mon, 24 Oct 2016 07:54:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r307849 - user/pho/stress2/misc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2016 07:54:56 -0000 Author: pho Date: Mon Oct 24 07:54:55 2016 New Revision: 307849 URL: https://svnweb.freebsd.org/changeset/base/307849 Log: Style fix. Added missing cleanup on error exit. Sponsored by: Dell EMC Isilon Modified: user/pho/stress2/misc/umountf5.sh Modified: user/pho/stress2/misc/umountf5.sh ============================================================================== --- user/pho/stress2/misc/umountf5.sh Mon Oct 24 07:52:04 2016 (r307848) +++ user/pho/stress2/misc/umountf5.sh Mon Oct 24 07:54:55 2016 (r307849) @@ -38,10 +38,11 @@ D=$diskimage dd if=/dev/zero of=$D$m bs=1m count=10 2>&1 | egrep -v "records|transferred" -mount | grep "$mntpoint" | grep md${mdstart}$part > /dev/null && umount $mntpoint -mdconfig -l | grep md${mdstart} > /dev/null && mdconfig -d -u ${mdstart} +mount | grep "$mntpoint" | grep md${mdstart}$part > /dev/null && + umount $mntpoint +mdconfig -l | grep md$mdstart > /dev/null && mdconfig -d -u $mdstart -mdconfig -a -t vnode -f $D -u ${mdstart} +mdconfig -a -t vnode -f $D -u $mdstart || { rm -f $diskimage; exit 1; } bsdlabel -w md${mdstart} auto newfs $newfs_flags md${mdstart}$part > /dev/null 2>&1 mount /dev/md${mdstart}$part $mntpoint @@ -49,7 +50,6 @@ mount /dev/md${mdstart}$part $mntpoint export RUNDIR=$mntpoint/stressX export runRUNTIME=2m cd ..; ./run.sh vfs.cfg > /dev/null 2>&1 & -pid=$! sleep 30 @@ -57,7 +57,8 @@ umount -f $mntpoint mdconfig -d -u $mdstart rm -f $D -while ps | egrep "testcases|swap|mkdir|creat" | grep -vq grep; do - ps | egrep "testcases|swap|mkdir|creat" | grep -v grep | awk '{print $1}' | xargs kill +while pkill -f "swap|mkdir|creat"; do sleep 1 done +wait +exit 0 From owner-svn-src-user@freebsd.org Mon Oct 24 07:56:21 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5AF7C1F299 for ; Mon, 24 Oct 2016 07:56:21 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 732FA151E; Mon, 24 Oct 2016 07:56:21 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9O7uKEH009059; Mon, 24 Oct 2016 07:56:20 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9O7uKMP009058; Mon, 24 Oct 2016 07:56:20 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201610240756.u9O7uKMP009058@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Mon, 24 Oct 2016 07:56:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r307850 - user/pho/stress2/misc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2016 07:56:21 -0000 Author: pho Date: Mon Oct 24 07:56:20 2016 New Revision: 307850 URL: https://svnweb.freebsd.org/changeset/base/307850 Log: Fixed typo in cleanup. Sponsored by: Dell EMC Isilon Modified: user/pho/stress2/misc/fdgrowtable.sh Modified: user/pho/stress2/misc/fdgrowtable.sh ============================================================================== --- user/pho/stress2/misc/fdgrowtable.sh Mon Oct 24 07:54:55 2016 (r307849) +++ user/pho/stress2/misc/fdgrowtable.sh Mon Oct 24 07:56:20 2016 (r307850) @@ -48,7 +48,7 @@ while kill -0 $! 2>/dev/null; do ../testcases/swap/swap -t 2m -i 40 -h done wait -rm -d /tmp/fdgrowtable +rm -f /tmp/fdgrowtable exit EOF From owner-svn-src-user@freebsd.org Mon Oct 24 07:58:16 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1356C1F2EB for ; Mon, 24 Oct 2016 07:58:16 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 83C3C1660; Mon, 24 Oct 2016 07:58:16 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9O7wFfD009165; Mon, 24 Oct 2016 07:58:15 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9O7wFc3009164; Mon, 24 Oct 2016 07:58:15 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201610240758.u9O7wFc3009164@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Mon, 24 Oct 2016 07:58:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r307851 - user/pho/stress2/misc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2016 07:58:16 -0000 Author: pho Date: Mon Oct 24 07:58:15 2016 New Revision: 307851 URL: https://svnweb.freebsd.org/changeset/base/307851 Log: Style fixes. Added missing cleanup on error exit. Sponsored by: Dell EMC Isilon Modified: user/pho/stress2/misc/umountf.sh Modified: user/pho/stress2/misc/umountf.sh ============================================================================== --- user/pho/stress2/misc/umountf.sh Mon Oct 24 07:56:20 2016 (r307850) +++ user/pho/stress2/misc/umountf.sh Mon Oct 24 07:58:15 2016 (r307851) @@ -37,18 +37,18 @@ D=$diskimage dede $D 1m 110 || exit 1 -mount | grep "$mntpoint" | grep md${mdstart}${part} > /dev/null && umount $mntpoint -mdconfig -l | grep md${mdstart} > /dev/null && mdconfig -d -u ${mdstart} - -mdconfig -a -t vnode -f $D -u ${mdstart} -bsdlabel -w md${mdstart} auto -newfs md${mdstart}${part} -mount /dev/md${mdstart}${part} $mntpoint +mount | grep "$mntpoint" | grep md${mdstart}${part} > /dev/null && + umount $mntpoint +mdconfig -l | grep md$mdstart > /dev/null && mdconfig -d -u $mdstart + +mdconfig -a -t vnode -f $D -u $mdstart || { rm $diskimage; exit 1; } +bsdlabel -w md$mdstart auto +newfs md${mdstart}$part > /dev/null +mount /dev/md${mdstart}$part $mntpoint export RUNDIR=$mntpoint/stressX export runRUNTIME=2m cd ..; ./run.sh vfs.cfg > /dev/null 2>&1 & -pid=$! sleep 30 @@ -56,7 +56,7 @@ umount -f $mntpoint mdconfig -d -u $mdstart rm -f $D -while ps | egrep "testcases|swap|mkdir|creat" | grep -vq grep; do - ps | egrep "testcases|swap|mkdir|creat" | grep -v grep | awk '{print $1}' | xargs kill - sleep 1 +while pkill -f "swap|mkdir|creat"; do + sleep 1 done +wait From owner-svn-src-user@freebsd.org Mon Oct 24 08:00:01 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23E72C1F530 for ; Mon, 24 Oct 2016 08:00:01 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 E5470179A; Mon, 24 Oct 2016 08:00:00 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9O7xxJQ009278; Mon, 24 Oct 2016 07:59:59 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9O7xxoY009277; Mon, 24 Oct 2016 07:59:59 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201610240759.u9O7xxoY009277@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Mon, 24 Oct 2016 07:59:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r307852 - user/pho/stress2/misc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2016 08:00:01 -0000 Author: pho Date: Mon Oct 24 07:59:59 2016 New Revision: 307852 URL: https://svnweb.freebsd.org/changeset/base/307852 Log: Added a time out. Style fixes. Sponsored by: Dell EMC Isilon Modified: user/pho/stress2/misc/newfs2.sh Modified: user/pho/stress2/misc/newfs2.sh ============================================================================== --- user/pho/stress2/misc/newfs2.sh Mon Oct 24 07:58:15 2016 (r307851) +++ user/pho/stress2/misc/newfs2.sh Mon Oct 24 07:59:59 2016 (r307852) @@ -39,12 +39,14 @@ size=$((32 * 1024 * 1024)) mount | grep "$mntpoint" | grep -q md${mdstart}$part && umount $mntpoint [ -c /dev/md$mdstart ] && mdconfig -d -u $mdstart +start=`date '+%s'` while [ $size -le $((900 * 1024 * 1024)) ]; do mb=$((size / 1024 / 1024)) rm -f $diskimage dd if=/dev/zero of=$diskimage bs=1m count=$mb 2>&1 | egrep -v "records|transferred" - mdconfig -a -t vnode -f $diskimage -u $mdstart + mdconfig -a -t vnode -f $diskimage -u $mdstart || + { rm $diskimage; exit 1; } bsdlabel -w md$mdstart auto newfs -b 32768 -f 4096 -O2 md${mdstart}$part > /dev/null 2>&1 mount /dev/md${mdstart}$part $mntpoint @@ -58,5 +60,11 @@ while [ $size -le $((900 * 1024 * 1024)) done mdconfig -d -u $mdstart size=$((size + 32 * 1024 * 1024)) + if [ $((`date '+%s'` - start)) -gt 1800 ]; then + echo "Timed out" + s=1 + break + fi done rm -f $diskimage +return $s From owner-svn-src-user@freebsd.org Mon Oct 24 11:22:40 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2EE5CC1FC47 for ; Mon, 24 Oct 2016 11:22:40 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 E5C42EAB; Mon, 24 Oct 2016 11:22:39 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9OBMdMH089696; Mon, 24 Oct 2016 11:22:39 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9OBMdAI089695; Mon, 24 Oct 2016 11:22:39 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201610241122.u9OBMdAI089695@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Mon, 24 Oct 2016 11:22:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r307853 - user/pho/stress2/misc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2016 11:22:40 -0000 Author: pho Date: Mon Oct 24 11:22:38 2016 New Revision: 307853 URL: https://svnweb.freebsd.org/changeset/base/307853 Log: Style fix. Sponsored by: Dell EMC Isilon Modified: user/pho/stress2/misc/kinfo2.sh Modified: user/pho/stress2/misc/kinfo2.sh ============================================================================== --- user/pho/stress2/misc/kinfo2.sh Mon Oct 24 07:59:59 2016 (r307852) +++ user/pho/stress2/misc/kinfo2.sh Mon Oct 24 11:22:38 2016 (r307853) @@ -37,7 +37,7 @@ odir=`pwd` cd /tmp sed '1,/^EOF/d' < $odir/$0 > kinfo2.c -mycc -o kinfo2 -Wall kinfo2.c -lutil +mycc -o kinfo2 -Wall -Wextra kinfo2.c -lutil || exit 1 rm -f kinfo2.c mount | grep -q procfs || mount -t procfs procfs /proc @@ -45,37 +45,35 @@ for i in `jot 30`; do for j in `jot 5`; do /tmp/kinfo2 & done - - for j in `jot 5`; do - wait - done + wait done rm -f /tmp/kinfo2 -exit +exit 0 EOF #include -#include -#include -#include #include +#include + #include -#include #include -#include -#include +#include #include +#include +#include +#include +#include -char buf[8096]; +static char buf[8096]; -void -handler(int i) { - exit(0); +static void +handler(int i __unused) { + _exit(0); } /* Stir /dev/proc */ -int +static void churning(void) { pid_t r; int fd, status; @@ -86,7 +84,7 @@ churning(void) { if ((fd = open("/proc/curproc/mem", O_RDONLY)) == -1) err(1, "open(/proc/curproc/mem)"); bzero(buf, sizeof(buf)); - exit(0); + _exit(0); } if (r < 0) { perror("fork"); @@ -100,15 +98,15 @@ churning(void) { void list(void) { - int cnt, fd, n; - int space = sizeof(buf); - long base; struct dirent *dp; struct kinfo_file *freep; struct kinfo_vmentry *freep_vm; - char *bp = buf; pid_t pid; + long base; long l; + int cnt, fd, n; + int space = sizeof(buf); + char *bp = buf; char *dummy; if ((fd = open("/proc", O_RDONLY)) == -1) @@ -125,14 +123,15 @@ list(void) bp = buf; dp = (struct dirent *)bp; for (;;) { -#if 0 - printf("name: %-10s, inode %7d, type %2d, namelen %d, d_reclen %d\n", - dp->d_name, dp->d_fileno, dp->d_type, dp->d_namlen, - dp->d_reclen); fflush(stdout); +#if defined(DEBUG) + printf("name: %-10s, inode %7lu, type %2d, namelen %d, " + "d_reclen %d\n", + dp->d_name, (unsigned long)dp->d_fileno, dp->d_type, + dp->d_namlen, dp->d_reclen); fflush(stdout); #endif if (dp->d_type == DT_DIR && - (dp->d_name[0] >= '0' && dp->d_name[0] <= '9')) { + (dp->d_name[0] >= '0' && dp->d_name[0] <= '9')) { l = strtol(dp->d_name, &dummy, 10); pid = l; @@ -153,9 +152,10 @@ list(void) } int -main(int argc, char **argv) +main(void) { pid_t r; + signal(SIGALRM, handler); alarm(60); From owner-svn-src-user@freebsd.org Mon Oct 24 17:02:27 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1EC8FC1FC8A for ; Mon, 24 Oct 2016 17:02:27 +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 mx1.freebsd.org (Postfix) with ESMTPS id E3C16C84; Mon, 24 Oct 2016 17:02:26 +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 u9OH2Qgj018604; Mon, 24 Oct 2016 17:02:26 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9OH2Q0h018603; Mon, 24 Oct 2016 17:02:26 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201610241702.u9OH2Q0h018603@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Mon, 24 Oct 2016 17:02:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r307867 - user/alc/PQ_LAUNDRY/sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2016 17:02:27 -0000 Author: alc Date: Mon Oct 24 17:02:25 2016 New Revision: 307867 URL: https://svnweb.freebsd.org/changeset/base/307867 Log: Don't rely upon the pager's put pages function to requeue pages, unless that function returned VM_PAGER_PEND. Reviewed by: kib, markj Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Mon Oct 24 16:40:27 2016 (r307866) +++ user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Mon Oct 24 17:02:25 2016 (r307867) @@ -405,7 +405,6 @@ vm_pageout_cluster(vm_page_t m) */ vm_page_assert_unbusied(m); KASSERT(m->hold_count == 0, ("page %p is held", m)); - vm_page_dequeue(m); vm_page_unlock(m); mc[vm_pageout_page_count] = pb = ps = m; @@ -448,7 +447,6 @@ more: ib = 0; break; } - vm_page_dequeue(p); vm_page_unlock(p); mc[--page_base] = pb = p; ++pageout_count; @@ -474,7 +472,6 @@ more: vm_page_unlock(p); break; } - vm_page_dequeue(p); vm_page_unlock(p); mc[page_base + pageout_count] = ps = p; ++pageout_count; @@ -550,6 +547,11 @@ vm_pageout_flush(vm_page_t *mc, int coun ("vm_pageout_flush: page %p is not write protected", mt)); switch (pageout_status[i]) { case VM_PAGER_OK: + vm_page_lock(mt); + if (vm_page_in_laundry(mt)) + vm_page_deactivate_noreuse(mt); + vm_page_unlock(mt); + /* FALLTHROUGH */ case VM_PAGER_PEND: numpagedout++; break; From owner-svn-src-user@freebsd.org Mon Oct 24 17:08:16 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC970C1FFA6 for ; Mon, 24 Oct 2016 17:08:16 +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 mx1.freebsd.org (Postfix) with ESMTPS id 63CC4144F; Mon, 24 Oct 2016 17:08:16 +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 u9OH8Ft3021182; Mon, 24 Oct 2016 17:08:15 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9OH8Dn5021157; Mon, 24 Oct 2016 17:08:13 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201610241708.u9OH8Dn5021157@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Mon, 24 Oct 2016 17:08:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r307868 - in user/alc/PQ_LAUNDRY: . contrib/binutils/bfd contrib/elftoolchain/elfcopy contrib/gcc/config/rs6000 contrib/libarchive contrib/libarchive/cat/test contrib/libarchive/cpio/te... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2016 17:08:16 -0000 Author: alc Date: Mon Oct 24 17:08:12 2016 New Revision: 307868 URL: https://svnweb.freebsd.org/changeset/base/307868 Log: MFH r307867 Added: user/alc/PQ_LAUNDRY/contrib/gcc/config/rs6000/freebsdspe.h - copied unchanged from r307867, head/contrib/gcc/config/rs6000/freebsdspe.h user/alc/PQ_LAUNDRY/lib/libc/powerpc/gen/Makefile.common - copied unchanged from r307867, head/lib/libc/powerpc/gen/Makefile.common user/alc/PQ_LAUNDRY/lib/libc/powerpcspe/ - copied from r307867, head/lib/libc/powerpcspe/ user/alc/PQ_LAUNDRY/share/man/man4/jedec_ts.4 - copied unchanged from r307867, head/share/man/man4/jedec_ts.4 user/alc/PQ_LAUNDRY/sys/conf/ldscript.powerpcspe - copied unchanged from r307867, head/sys/conf/ldscript.powerpcspe user/alc/PQ_LAUNDRY/sys/dev/jedec_ts/ - copied from r307867, head/sys/dev/jedec_ts/ user/alc/PQ_LAUNDRY/sys/modules/i2c/jedec_ts/ - copied from r307867, head/sys/modules/i2c/jedec_ts/ user/alc/PQ_LAUNDRY/sys/powerpc/booke/spe.c - copied unchanged from r307867, head/sys/powerpc/booke/spe.c user/alc/PQ_LAUNDRY/sys/powerpc/conf/MPC85XXSPE - copied unchanged from r307867, head/sys/powerpc/conf/MPC85XXSPE Modified: user/alc/PQ_LAUNDRY/Makefile user/alc/PQ_LAUNDRY/Makefile.inc1 user/alc/PQ_LAUNDRY/UPDATING user/alc/PQ_LAUNDRY/contrib/binutils/bfd/config.bfd user/alc/PQ_LAUNDRY/contrib/elftoolchain/elfcopy/main.c user/alc/PQ_LAUNDRY/contrib/libarchive/NEWS user/alc/PQ_LAUNDRY/contrib/libarchive/cat/test/main.c user/alc/PQ_LAUNDRY/contrib/libarchive/cat/test/test.h user/alc/PQ_LAUNDRY/contrib/libarchive/cpio/test/main.c user/alc/PQ_LAUNDRY/contrib/libarchive/cpio/test/test.h user/alc/PQ_LAUNDRY/contrib/libarchive/libarchive/archive.h user/alc/PQ_LAUNDRY/contrib/libarchive/libarchive/archive_entry.h user/alc/PQ_LAUNDRY/contrib/libarchive/libarchive/test/main.c user/alc/PQ_LAUNDRY/contrib/libarchive/libarchive/test/test.h user/alc/PQ_LAUNDRY/contrib/libarchive/libarchive/test/test_read_format_mtree_crash747.c user/alc/PQ_LAUNDRY/contrib/libarchive/libarchive/test/test_read_format_zip_high_compression.c user/alc/PQ_LAUNDRY/contrib/libarchive/libarchive/test/test_read_set_format.c user/alc/PQ_LAUNDRY/contrib/libarchive/libarchive/test/test_write_format_iso9660.c user/alc/PQ_LAUNDRY/contrib/libarchive/tar/test/main.c user/alc/PQ_LAUNDRY/contrib/libarchive/tar/test/test.h user/alc/PQ_LAUNDRY/contrib/libarchive/tar/test/test_option_b.c user/alc/PQ_LAUNDRY/contrib/libarchive/tar/test/test_symlink_dir.c user/alc/PQ_LAUNDRY/contrib/tzdata/asia user/alc/PQ_LAUNDRY/contrib/tzdata/australasia user/alc/PQ_LAUNDRY/contrib/tzdata/europe user/alc/PQ_LAUNDRY/contrib/tzdata/northamerica user/alc/PQ_LAUNDRY/etc/rc user/alc/PQ_LAUNDRY/etc/rc.d/Makefile user/alc/PQ_LAUNDRY/etc/rc.d/swaplate user/alc/PQ_LAUNDRY/gnu/lib/libgcc/Makefile user/alc/PQ_LAUNDRY/gnu/lib/libgomp/Makefile user/alc/PQ_LAUNDRY/gnu/usr.bin/binutils/Makefile.inc0 user/alc/PQ_LAUNDRY/gnu/usr.bin/cc/Makefile.tgt user/alc/PQ_LAUNDRY/gnu/usr.bin/cc/cc_tools/Makefile.hdrs user/alc/PQ_LAUNDRY/gnu/usr.bin/cc/include/Makefile user/alc/PQ_LAUNDRY/gnu/usr.bin/gdb/Makefile.inc user/alc/PQ_LAUNDRY/gnu/usr.bin/gdb/libgdb/Makefile user/alc/PQ_LAUNDRY/include/stddef.h user/alc/PQ_LAUNDRY/lib/libarchive/Makefile user/alc/PQ_LAUNDRY/lib/libc/powerpc/gen/Makefile.inc user/alc/PQ_LAUNDRY/lib/libcasper/services/cap_dns/Makefile user/alc/PQ_LAUNDRY/lib/libcasper/services/cap_grp/Makefile user/alc/PQ_LAUNDRY/lib/libcasper/services/cap_pwd/Makefile user/alc/PQ_LAUNDRY/lib/libcasper/services/cap_sysctl/Makefile user/alc/PQ_LAUNDRY/lib/libgcc_s/Makefile user/alc/PQ_LAUNDRY/lib/librss/Makefile user/alc/PQ_LAUNDRY/lib/librss/librss.3 user/alc/PQ_LAUNDRY/lib/libusb/libusb20_ugen20.c user/alc/PQ_LAUNDRY/lib/msun/powerpc/fenv.h user/alc/PQ_LAUNDRY/sbin/swapon/swapon.8 user/alc/PQ_LAUNDRY/sbin/swapon/swapon.c user/alc/PQ_LAUNDRY/share/doc/psd/contents/contents.ms user/alc/PQ_LAUNDRY/share/doc/psd/title/Title user/alc/PQ_LAUNDRY/share/misc/pci_vendors user/alc/PQ_LAUNDRY/share/mk/bsd.cpu.mk user/alc/PQ_LAUNDRY/share/mk/bsd.endian.mk user/alc/PQ_LAUNDRY/share/mk/bsd.suffixes.mk user/alc/PQ_LAUNDRY/share/mk/local.meta.sys.mk user/alc/PQ_LAUNDRY/share/mk/sys.mk user/alc/PQ_LAUNDRY/sys/amd64/amd64/trap.c user/alc/PQ_LAUNDRY/sys/arm/allwinner/aw_thermal.c user/alc/PQ_LAUNDRY/sys/arm/conf/GENERIC user/alc/PQ_LAUNDRY/sys/arm64/include/param.h user/alc/PQ_LAUNDRY/sys/boot/efi/Makefile user/alc/PQ_LAUNDRY/sys/boot/powerpc/Makefile user/alc/PQ_LAUNDRY/sys/boot/zfs/zfsimpl.c user/alc/PQ_LAUNDRY/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c user/alc/PQ_LAUNDRY/sys/conf/Makefile.powerpc user/alc/PQ_LAUNDRY/sys/conf/NOTES user/alc/PQ_LAUNDRY/sys/conf/files user/alc/PQ_LAUNDRY/sys/conf/files.powerpc user/alc/PQ_LAUNDRY/sys/conf/kern.mk user/alc/PQ_LAUNDRY/sys/conf/options.powerpc user/alc/PQ_LAUNDRY/sys/dev/cxgbe/common/t4_hw.c user/alc/PQ_LAUNDRY/sys/dev/dpaa/bman_fdt.c user/alc/PQ_LAUNDRY/sys/dev/dpaa/qman_fdt.c user/alc/PQ_LAUNDRY/sys/dev/evdev/evdev.c user/alc/PQ_LAUNDRY/sys/dev/evdev/evdev.h user/alc/PQ_LAUNDRY/sys/dev/evdev/evdev_utils.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_net_vsc.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_net_vsc.h user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_rndis_filter.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/if_hnvar.h user/alc/PQ_LAUNDRY/sys/dev/hyperv/utilities/hv_heartbeat.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/utilities/hv_kvp.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/utilities/hv_kvp.h user/alc/PQ_LAUNDRY/sys/dev/hyperv/utilities/hv_shutdown.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/utilities/hv_timesync.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/utilities/hv_util.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/utilities/hv_util.h user/alc/PQ_LAUNDRY/sys/dev/hyperv/utilities/hv_utilreg.h user/alc/PQ_LAUNDRY/sys/dev/hyperv/utilities/vmbus_icreg.h user/alc/PQ_LAUNDRY/sys/dev/usb/input/ums.c user/alc/PQ_LAUNDRY/sys/i386/i386/trap.c user/alc/PQ_LAUNDRY/sys/kern/subr_smp.c user/alc/PQ_LAUNDRY/sys/kern/subr_turnstile.c user/alc/PQ_LAUNDRY/sys/kern/subr_uio.c user/alc/PQ_LAUNDRY/sys/modules/Makefile user/alc/PQ_LAUNDRY/sys/modules/i2c/Makefile user/alc/PQ_LAUNDRY/sys/net/rndis.h user/alc/PQ_LAUNDRY/sys/net80211/ieee80211.h user/alc/PQ_LAUNDRY/sys/net80211/ieee80211_freebsd.c user/alc/PQ_LAUNDRY/sys/net80211/ieee80211_freebsd.h user/alc/PQ_LAUNDRY/sys/netinet/sctp_bsd_addr.c user/alc/PQ_LAUNDRY/sys/netinet/sctp_output.c user/alc/PQ_LAUNDRY/sys/powerpc/booke/booke_machdep.c user/alc/PQ_LAUNDRY/sys/powerpc/conf/MPC85XX user/alc/PQ_LAUNDRY/sys/powerpc/include/param.h user/alc/PQ_LAUNDRY/sys/powerpc/include/spr.h user/alc/PQ_LAUNDRY/sys/powerpc/include/trap.h user/alc/PQ_LAUNDRY/sys/powerpc/powerpc/trap.c user/alc/PQ_LAUNDRY/sys/sys/_types.h user/alc/PQ_LAUNDRY/sys/x86/include/x86_smp.h user/alc/PQ_LAUNDRY/sys/x86/include/x86_var.h user/alc/PQ_LAUNDRY/sys/x86/x86/cpu_machdep.c user/alc/PQ_LAUNDRY/sys/x86/x86/mp_x86.c user/alc/PQ_LAUNDRY/tools/build/mk/OptionalObsoleteFiles.inc user/alc/PQ_LAUNDRY/usr.bin/bsdcat/Makefile user/alc/PQ_LAUNDRY/usr.bin/cpio/Makefile user/alc/PQ_LAUNDRY/usr.bin/tar/Makefile user/alc/PQ_LAUNDRY/usr.sbin/Makefile user/alc/PQ_LAUNDRY/usr.sbin/Makefile.powerpc user/alc/PQ_LAUNDRY/usr.sbin/amd/Makefile.inc user/alc/PQ_LAUNDRY/usr.sbin/amd/amd/Makefile user/alc/PQ_LAUNDRY/usr.sbin/amd/libamu/Makefile user/alc/PQ_LAUNDRY/usr.sbin/daemon/daemon.8 user/alc/PQ_LAUNDRY/usr.sbin/daemon/daemon.c user/alc/PQ_LAUNDRY/usr.sbin/pw/grupd.c user/alc/PQ_LAUNDRY/usr.sbin/pw/pw_nis.c user/alc/PQ_LAUNDRY/usr.sbin/pw/pwupd.c user/alc/PQ_LAUNDRY/usr.sbin/tzsetup/Makefile user/alc/PQ_LAUNDRY/usr.sbin/tzsetup/tzsetup.c Directory Properties: user/alc/PQ_LAUNDRY/ (props changed) user/alc/PQ_LAUNDRY/contrib/binutils/ (props changed) user/alc/PQ_LAUNDRY/contrib/elftoolchain/ (props changed) user/alc/PQ_LAUNDRY/contrib/gcc/ (props changed) user/alc/PQ_LAUNDRY/contrib/libarchive/ (props changed) user/alc/PQ_LAUNDRY/contrib/tzdata/ (props changed) user/alc/PQ_LAUNDRY/gnu/lib/ (props changed) user/alc/PQ_LAUNDRY/gnu/usr.bin/binutils/ (props changed) user/alc/PQ_LAUNDRY/gnu/usr.bin/cc/cc_tools/ (props changed) user/alc/PQ_LAUNDRY/gnu/usr.bin/gdb/ (props changed) user/alc/PQ_LAUNDRY/sys/cddl/contrib/opensolaris/ (props changed) Modified: user/alc/PQ_LAUNDRY/Makefile ============================================================================== --- user/alc/PQ_LAUNDRY/Makefile Mon Oct 24 17:02:25 2016 (r307867) +++ user/alc/PQ_LAUNDRY/Makefile Mon Oct 24 17:08:12 2016 (r307868) @@ -239,7 +239,7 @@ _MAKE+= MK_META_MODE=no _TARGET_ARCH= ${TARGET:S/pc98/i386/:S/arm64/aarch64/} .elif !defined(TARGET) && defined(TARGET_ARCH) && \ ${TARGET_ARCH} != ${MACHINE_ARCH} -_TARGET= ${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/aarch64/arm64/:C/powerpc64/powerpc/:C/riscv64/riscv/} +_TARGET= ${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/aarch64/arm64/:C/powerpc64/powerpc/:C/powerpcspe/powerpc/:C/riscv64/riscv/} .endif .if defined(TARGET) && !defined(_TARGET) _TARGET=${TARGET} @@ -422,7 +422,7 @@ _UNIVERSE_TARGETS= ${TARGETS} TARGET_ARCHES_arm?= arm armeb armv6 TARGET_ARCHES_arm64?= aarch64 TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 -TARGET_ARCHES_powerpc?= powerpc powerpc64 +TARGET_ARCHES_powerpc?= powerpc powerpc64 powerpcspe TARGET_ARCHES_pc98?= i386 .for target in ${TARGETS} TARGET_ARCHES_${target}?= ${target} Modified: user/alc/PQ_LAUNDRY/Makefile.inc1 ============================================================================== --- user/alc/PQ_LAUNDRY/Makefile.inc1 Mon Oct 24 17:02:25 2016 (r307867) +++ user/alc/PQ_LAUNDRY/Makefile.inc1 Mon Oct 24 17:08:12 2016 (r307868) @@ -358,6 +358,7 @@ KNOWN_ARCHES?= aarch64/arm64 \ mipsn32/mips \ powerpc \ powerpc64/powerpc \ + powerpcspe/powerpc \ riscv64/riscv \ sparc64 @@ -452,7 +453,7 @@ PACKAGE= kernel # BOOTSTRAPPING?= 0 -# Keep these in sync +# Keep these in sync -- see below for special case exception MINIMUM_SUPPORTED_OSREL?= 900044 MINIMUM_SUPPORTED_REL?= 9.1 @@ -1556,10 +1557,23 @@ _elftoolchain_libs= lib/libelf lib/libdw .endif legacy: .PHONY +# Temporary special case for automatically detecting the clang compiler issue +# Note: 9.x didn't have FreeBSD_version bumps often enough, so you may need to +# set BOOTSTRAPPING to 0 if you're stable/9 tree post-dates r286035 but is before +# the version bump in r296219 (from July 29, 2015 -> Feb 29, 2016). +.if ${BOOTSTRAPPING} != 0 && \ + ${WANT_COMPILER_TYPE} == "clang" && ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} < 30601 +.if ${BOOTSTRAPPING} > 10000000 && ${BOOTSTRAPPING} < 1002501 + @echo "ERROR: Source upgrades from stable/10 prior to r286033 are not supported."; false +.elif ${BOOTSTRAPPING} > 9000000 && ${BOOTSTRAPPING} < 903509 + @echo "ERROR: Source upgrades from stable/9 prior to r286035 are not supported."; false +.endif +.endif .if ${BOOTSTRAPPING} < ${MINIMUM_SUPPORTED_OSREL} && ${BOOTSTRAPPING} != 0 @echo "ERROR: Source upgrades from versions prior to ${MINIMUM_SUPPORTED_REL} are not supported."; \ false .endif + .for _tool in tools/build ${_elftoolchain_libs} ${_+_}@${ECHODIR} "===> ${_tool} (obj,includes,all,install)"; \ cd ${.CURDIR}/${_tool}; \ Modified: user/alc/PQ_LAUNDRY/UPDATING ============================================================================== --- user/alc/PQ_LAUNDRY/UPDATING Mon Oct 24 17:02:25 2016 (r307867) +++ user/alc/PQ_LAUNDRY/UPDATING Mon Oct 24 17:08:12 2016 (r307868) @@ -41,10 +41,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 11.0-RELEASE). These revisions post-date the 10.2 and 9.3 releases, so you'll need to take the unusual step of upgrading to the tip of the stable branch before moving to 11 or -current via a source upgrade. - stable/11 and 11.0-RELEASE post-date the fix so you can move from them - to -current. This differs from the historical situation where one could - upgrade from anywhere on the last couple of stable branches, so be - careful. + stable/11 and 11.0-RELEASE have working newer compiler. This differs + from the historical situation where one could upgrade from anywhere on + the last couple of stable branches, so be careful. + + If you're running a hybrid system on 9.x or 10.x with an updated clang + compiler or are using an supported external toolchain, the build system + will allow the upgrade. Otherwise it will print a reminder. ****************************** SPECIAL WARNING: ****************************** Modified: user/alc/PQ_LAUNDRY/contrib/binutils/bfd/config.bfd ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/binutils/bfd/config.bfd Mon Oct 24 17:02:25 2016 (r307867) +++ user/alc/PQ_LAUNDRY/contrib/binutils/bfd/config.bfd Mon Oct 24 17:08:12 2016 (r307868) @@ -1103,7 +1103,7 @@ case "${targ}" in want64=true ;; #endif - powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \ + powerpc-*-*bsd* | powerpcspe-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \ powerpc-*-solaris2* | powerpc-*-linux-* | powerpc-*-rtems* | \ powerpc-*-chorus*) targ_defvec=bfd_elf32_powerpc_vec Modified: user/alc/PQ_LAUNDRY/contrib/elftoolchain/elfcopy/main.c ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/elftoolchain/elfcopy/main.c Mon Oct 24 17:02:25 2016 (r307867) +++ user/alc/PQ_LAUNDRY/contrib/elftoolchain/elfcopy/main.c Mon Oct 24 17:08:12 2016 (r307868) @@ -1529,6 +1529,22 @@ print_version(void) exit(EXIT_SUCCESS); } +/* + * Compare the ending of s with end. + */ +static int +strrcmp(const char *s, const char *end) +{ + size_t endlen, slen; + + slen = strlen(s); + endlen = strlen(end); + + if (slen >= endlen) + s += slen - endlen; + return (strcmp(s, end)); +} + int main(int argc, char **argv) { @@ -1562,12 +1578,16 @@ main(int argc, char **argv) if ((ecp->progname = ELFTC_GETPROGNAME()) == NULL) ecp->progname = "elfcopy"; - if (strcmp(ecp->progname, "strip") == 0) + if (strrcmp(ecp->progname, "strip") == 0) strip_main(ecp, argc, argv); - else if (strcmp(ecp->progname, "mcs") == 0) + else if (strrcmp(ecp->progname, "mcs") == 0) mcs_main(ecp, argc, argv); - else + else { + if (strrcmp(ecp->progname, "elfcopy") != 0 && + strrcmp(ecp->progname, "objcopy") != 0) + warnx("program mode not known, defaulting to elfcopy"); elfcopy_main(ecp, argc, argv); + } free_sec_add(ecp); free_sec_act(ecp); Copied: user/alc/PQ_LAUNDRY/contrib/gcc/config/rs6000/freebsdspe.h (from r307867, head/contrib/gcc/config/rs6000/freebsdspe.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/alc/PQ_LAUNDRY/contrib/gcc/config/rs6000/freebsdspe.h Mon Oct 24 17:08:12 2016 (r307868, copy of r307867, head/contrib/gcc/config/rs6000/freebsdspe.h) @@ -0,0 +1,77 @@ +/* Definitions of target machine for GNU compiler, + for PowerPC e500 machines running FreeBSD. + Based on linuxspe.h + Copyright (C) 2003, 2004 Free Software Foundation, Inc. + Contributed by Aldy Hernandez (aldy@quesejoda.com). + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 2, or (at your + option) any later version. + + GCC is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. + + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING. If not, write to the + Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. */ + +#undef TARGET_VERSION +#define TARGET_VERSION fprintf (stderr, " (PowerPC E500 FreeBSD)"); + +/* Override rs6000.h and sysv4.h definition. */ +#undef TARGET_DEFAULT +#define TARGET_DEFAULT (MASK_POWERPC | MASK_NEW_MNEMONICS | MASK_STRICT_ALIGN) + +#undef TARGET_SPE_ABI +#undef TARGET_SPE +#undef TARGET_E500 +#undef TARGET_ISEL +#undef TARGET_FPRS +#undef TARGET_E500_SINGLE +#undef TARGET_E500_DOUBLE + +#define TARGET_SPE_ABI rs6000_spe_abi +#define TARGET_SPE rs6000_spe +#define TARGET_E500 (rs6000_cpu == PROCESSOR_PPC8540) +#define TARGET_ISEL rs6000_isel +#define TARGET_FPRS (rs6000_float_gprs == 0) +#define TARGET_E500_SINGLE (TARGET_HARD_FLOAT && rs6000_float_gprs == 1) +#define TARGET_E500_DOUBLE (TARGET_HARD_FLOAT && rs6000_float_gprs == 2) + +#undef SUBSUBTARGET_OVERRIDE_OPTIONS +#define SUBSUBTARGET_OVERRIDE_OPTIONS \ + if (rs6000_select[1].string == NULL) \ + rs6000_cpu = PROCESSOR_PPC8540; \ + if (!rs6000_explicit_options.abi) \ + rs6000_spe_abi = 1; \ + if (!rs6000_explicit_options.float_gprs) \ + rs6000_float_gprs = 1; \ + /* See note below. */ \ + /*if (!rs6000_explicit_options.long_double)*/ \ + /* rs6000_long_double_type_size = 128;*/ \ + if (!rs6000_explicit_options.spe) \ + rs6000_spe = 1; \ + if (!rs6000_explicit_options.isel) \ + rs6000_isel = 1; \ + if (target_flags & MASK_64BIT) \ + error ("-m64 not supported in this configuration") + +/* The e500 ABI says that either long doubles are 128 bits, or if + implemented in any other size, the compiler/linker should error out. + We have no emulation libraries for 128 bit long doubles, and I hate + the dozens of failures on the regression suite. So I'm breaking ABI + specifications, until I properly fix the emulation. + + Enable these later. +#undef CPP_LONGDOUBLE_DEFAULT_SPEC +#define CPP_LONGDOUBLE_DEFAULT_SPEC "-D__LONG_DOUBLE_128__=1" +*/ + +#undef ASM_DEFAULT_SPEC +#define ASM_DEFAULT_SPEC "-mppc -mspe -me500" Modified: user/alc/PQ_LAUNDRY/contrib/libarchive/NEWS ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/libarchive/NEWS Mon Oct 24 17:02:25 2016 (r307867) +++ user/alc/PQ_LAUNDRY/contrib/libarchive/NEWS Mon Oct 24 17:08:12 2016 (r307868) @@ -1,3 +1,6 @@ +Oct 23, 2016: libarchive 3.2.2 released + Security release + Jun 20, 2016: libarchive 3.2.1 released This fixes a handful of security and other critical issues with 3.2.0 Modified: user/alc/PQ_LAUNDRY/contrib/libarchive/cat/test/main.c ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/libarchive/cat/test/main.c Mon Oct 24 17:02:25 2016 (r307867) +++ user/alc/PQ_LAUNDRY/contrib/libarchive/cat/test/main.c Mon Oct 24 17:08:12 2016 (r307868) @@ -129,6 +129,13 @@ # include #endif +mode_t umasked(mode_t expected_mode) +{ + mode_t mode = umask(0); + umask(mode); + return expected_mode & ~mode; +} + /* Path to working directory for current test */ const char *testworkdir; #ifdef PROGRAM @@ -1156,6 +1163,35 @@ assertion_file_contains_lines_any_order( return (0); } +/* Verify that a text file does not contains the specified strings */ +int +assertion_file_contains_no_invalid_strings(const char *file, int line, + const char *pathname, const char *strings[]) +{ + char *buff; + int i; + + buff = slurpfile(NULL, "%s", pathname); + if (buff == NULL) { + failure_start(file, line, "Can't read file: %s", pathname); + failure_finish(NULL); + return (0); + } + + for (i = 0; strings[i] != NULL; ++i) { + if (strstr(buff, strings[i]) != NULL) { + failure_start(file, line, "Invalid string in %s: %s", pathname, + strings[i]); + failure_finish(NULL); + free(buff); + return(0); + } + } + + free(buff); + return (0); +} + /* Test that two paths point to the same file. */ /* As a side-effect, asserts that both files exist. */ static int @@ -1293,6 +1329,11 @@ assertion_file_time(const char *file, in switch (type) { case 'a': filet_nsec = st.st_atimespec.tv_nsec; break; case 'b': filet = st.st_birthtime; + /* FreeBSD filesystems that don't support birthtime + * (e.g., UFS1) always return -1 here. */ + if (filet == -1) { + return (1); + } filet_nsec = st.st_birthtimespec.tv_nsec; break; case 'm': filet_nsec = st.st_mtimespec.tv_nsec; break; default: fprintf(stderr, "INTERNAL: Bad type %c for file time", type); @@ -1370,6 +1411,8 @@ assertion_file_mode(const char *file, in assertion_count(file, line); #if defined(_WIN32) && !defined(__CYGWIN__) failure_start(file, line, "assertFileMode not yet implemented for Windows"); + (void)mode; /* UNUSED */ + (void)r; /* UNUSED */ #else { struct stat st; @@ -1424,7 +1467,7 @@ assertion_file_nlinks(const char *file, assertion_count(file, line); r = lstat(pathname, &st); if (r == 0 && (int)st.st_nlink == nlinks) - return (1); + return (1); failure_start(file, line, "File %s has %d links, expected %d", pathname, st.st_nlink, nlinks); failure_finish(NULL); @@ -1660,6 +1703,7 @@ assertion_make_file(const char *file, in if (0 != chmod(path, mode)) { failure_start(file, line, "Could not chmod %s", path); failure_finish(NULL); + close(fd); return (0); } if (contents != NULL) { @@ -1674,6 +1718,7 @@ assertion_make_file(const char *file, in failure_start(file, line, "Could not write to %s", path); failure_finish(NULL); + close(fd); return (0); } } Modified: user/alc/PQ_LAUNDRY/contrib/libarchive/cat/test/test.h ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/libarchive/cat/test/test.h Mon Oct 24 17:02:25 2016 (r307867) +++ user/alc/PQ_LAUNDRY/contrib/libarchive/cat/test/test.h Mon Oct 24 17:08:12 2016 (r307868) @@ -174,6 +174,9 @@ /* Assert that file contents match a string. */ #define assertFileContents(data, data_size, pathname) \ assertion_file_contents(__FILE__, __LINE__, data, data_size, pathname) +/* Verify that a file does not contain invalid strings */ +#define assertFileContainsNoInvalidStrings(pathname, strings) \ + assertion_file_contains_no_invalid_strings(__FILE__, __LINE__, pathname, strings) #define assertFileMtime(pathname, sec, nsec) \ assertion_file_mtime(__FILE__, __LINE__, pathname, sec, nsec) #define assertFileMtimeRecent(pathname) \ @@ -182,6 +185,8 @@ assertion_file_nlinks(__FILE__, __LINE__, pathname, nlinks) #define assertFileSize(pathname, size) \ assertion_file_size(__FILE__, __LINE__, pathname, size) +#define assertFileMode(pathname, mode) \ + assertion_file_mode(__FILE__, __LINE__, pathname, mode) #define assertTextFileContents(text, pathname) \ assertion_text_file_contents(__FILE__, __LINE__, text, pathname) #define assertFileContainsLinesAnyOrder(pathname, lines) \ @@ -239,6 +244,7 @@ int assertion_file_atime_recent(const ch int assertion_file_birthtime(const char *, int, const char *, long, long); int assertion_file_birthtime_recent(const char *, int, const char *); int assertion_file_contains_lines_any_order(const char *, int, const char *, const char **); +int assertion_file_contains_no_invalid_strings(const char *, int, const char *, const char **); int assertion_file_contents(const char *, int, const void *, int, const char *); int assertion_file_exists(const char *, int, const char *); int assertion_file_mode(const char *, int, const char *, int); @@ -327,6 +333,9 @@ void copy_reference_file(const char *); */ void extract_reference_files(const char **); +/* Subtract umask from mode */ +mode_t umasked(mode_t expected_mode); + /* Path to working directory for current test */ extern const char *testworkdir; Modified: user/alc/PQ_LAUNDRY/contrib/libarchive/cpio/test/main.c ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/libarchive/cpio/test/main.c Mon Oct 24 17:02:25 2016 (r307867) +++ user/alc/PQ_LAUNDRY/contrib/libarchive/cpio/test/main.c Mon Oct 24 17:08:12 2016 (r307868) @@ -1164,6 +1164,35 @@ assertion_file_contains_lines_any_order( return (0); } +/* Verify that a text file does not contains the specified strings */ +int +assertion_file_contains_no_invalid_strings(const char *file, int line, + const char *pathname, const char *strings[]) +{ + char *buff; + int i; + + buff = slurpfile(NULL, "%s", pathname); + if (buff == NULL) { + failure_start(file, line, "Can't read file: %s", pathname); + failure_finish(NULL); + return (0); + } + + for (i = 0; strings[i] != NULL; ++i) { + if (strstr(buff, strings[i]) != NULL) { + failure_start(file, line, "Invalid string in %s: %s", pathname, + strings[i]); + failure_finish(NULL); + free(buff); + return(0); + } + } + + free(buff); + return (0); +} + /* Test that two paths point to the same file. */ /* As a side-effect, asserts that both files exist. */ static int @@ -1383,6 +1412,8 @@ assertion_file_mode(const char *file, in assertion_count(file, line); #if defined(_WIN32) && !defined(__CYGWIN__) failure_start(file, line, "assertFileMode not yet implemented for Windows"); + (void)mode; /* UNUSED */ + (void)r; /* UNUSED */ #else { struct stat st; Modified: user/alc/PQ_LAUNDRY/contrib/libarchive/cpio/test/test.h ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/libarchive/cpio/test/test.h Mon Oct 24 17:02:25 2016 (r307867) +++ user/alc/PQ_LAUNDRY/contrib/libarchive/cpio/test/test.h Mon Oct 24 17:08:12 2016 (r307868) @@ -174,6 +174,9 @@ /* Assert that file contents match a string. */ #define assertFileContents(data, data_size, pathname) \ assertion_file_contents(__FILE__, __LINE__, data, data_size, pathname) +/* Verify that a file does not contain invalid strings */ +#define assertFileContainsNoInvalidStrings(pathname, strings) \ + assertion_file_contains_no_invalid_strings(__FILE__, __LINE__, pathname, strings) #define assertFileMtime(pathname, sec, nsec) \ assertion_file_mtime(__FILE__, __LINE__, pathname, sec, nsec) #define assertFileMtimeRecent(pathname) \ @@ -241,6 +244,7 @@ int assertion_file_atime_recent(const ch int assertion_file_birthtime(const char *, int, const char *, long, long); int assertion_file_birthtime_recent(const char *, int, const char *); int assertion_file_contains_lines_any_order(const char *, int, const char *, const char **); +int assertion_file_contains_no_invalid_strings(const char *, int, const char *, const char **); int assertion_file_contents(const char *, int, const void *, int, const char *); int assertion_file_exists(const char *, int, const char *); int assertion_file_mode(const char *, int, const char *, int); Modified: user/alc/PQ_LAUNDRY/contrib/libarchive/libarchive/archive.h ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/libarchive/libarchive/archive.h Mon Oct 24 17:02:25 2016 (r307867) +++ user/alc/PQ_LAUNDRY/contrib/libarchive/libarchive/archive.h Mon Oct 24 17:08:12 2016 (r307868) @@ -36,7 +36,7 @@ * assert that ARCHIVE_VERSION_NUMBER >= 2012108. */ /* Note: Compiler will complain if this does not match archive_entry.h! */ -#define ARCHIVE_VERSION_NUMBER 3002001 +#define ARCHIVE_VERSION_NUMBER 3002002 #include #include /* for wchar_t */ @@ -155,7 +155,7 @@ __LA_DECL int archive_version_number(vo /* * Textual name/version of the library, useful for version displays. */ -#define ARCHIVE_VERSION_ONLY_STRING "3.2.1" +#define ARCHIVE_VERSION_ONLY_STRING "3.2.2" #define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING __LA_DECL const char * archive_version_string(void); Modified: user/alc/PQ_LAUNDRY/contrib/libarchive/libarchive/archive_entry.h ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/libarchive/libarchive/archive_entry.h Mon Oct 24 17:02:25 2016 (r307867) +++ user/alc/PQ_LAUNDRY/contrib/libarchive/libarchive/archive_entry.h Mon Oct 24 17:08:12 2016 (r307868) @@ -29,7 +29,7 @@ #define ARCHIVE_ENTRY_H_INCLUDED /* Note: Compiler will complain if this does not match archive.h! */ -#define ARCHIVE_VERSION_NUMBER 3002001 +#define ARCHIVE_VERSION_NUMBER 3002002 /* * Note: archive_entry.h is for use outside of libarchive; the Modified: user/alc/PQ_LAUNDRY/contrib/libarchive/libarchive/test/main.c ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/libarchive/libarchive/test/main.c Mon Oct 24 17:02:25 2016 (r307867) +++ user/alc/PQ_LAUNDRY/contrib/libarchive/libarchive/test/main.c Mon Oct 24 17:08:12 2016 (r307868) @@ -1162,6 +1162,35 @@ assertion_file_contains_lines_any_order( return (0); } +/* Verify that a text file does not contains the specified strings */ +int +assertion_file_contains_no_invalid_strings(const char *file, int line, + const char *pathname, const char *strings[]) +{ + char *buff; + int i; + + buff = slurpfile(NULL, "%s", pathname); + if (buff == NULL) { + failure_start(file, line, "Can't read file: %s", pathname); + failure_finish(NULL); + return (0); + } + + for (i = 0; strings[i] != NULL; ++i) { + if (strstr(buff, strings[i]) != NULL) { + failure_start(file, line, "Invalid string in %s: %s", pathname, + strings[i]); + failure_finish(NULL); + free(buff); + return(0); + } + } + + free(buff); + return (0); +} + /* Test that two paths point to the same file. */ /* As a side-effect, asserts that both files exist. */ static int @@ -1381,6 +1410,8 @@ assertion_file_mode(const char *file, in assertion_count(file, line); #if defined(_WIN32) && !defined(__CYGWIN__) failure_start(file, line, "assertFileMode not yet implemented for Windows"); + (void)mode; /* UNUSED */ + (void)r; /* UNUSED */ #else { struct stat st; Modified: user/alc/PQ_LAUNDRY/contrib/libarchive/libarchive/test/test.h ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/libarchive/libarchive/test/test.h Mon Oct 24 17:02:25 2016 (r307867) +++ user/alc/PQ_LAUNDRY/contrib/libarchive/libarchive/test/test.h Mon Oct 24 17:08:12 2016 (r307868) @@ -174,6 +174,9 @@ /* Assert that file contents match a string. */ #define assertFileContents(data, data_size, pathname) \ assertion_file_contents(__FILE__, __LINE__, data, data_size, pathname) +/* Verify that a file does not contain invalid strings */ +#define assertFileContainsNoInvalidStrings(pathname, strings) \ + assertion_file_contains_no_invalid_strings(__FILE__, __LINE__, pathname, strings) #define assertFileMtime(pathname, sec, nsec) \ assertion_file_mtime(__FILE__, __LINE__, pathname, sec, nsec) #define assertFileMtimeRecent(pathname) \ @@ -241,6 +244,7 @@ int assertion_file_atime_recent(const ch int assertion_file_birthtime(const char *, int, const char *, long, long); int assertion_file_birthtime_recent(const char *, int, const char *); int assertion_file_contains_lines_any_order(const char *, int, const char *, const char **); +int assertion_file_contains_no_invalid_strings(const char *, int, const char *, const char **); int assertion_file_contents(const char *, int, const void *, int, const char *); int assertion_file_exists(const char *, int, const char *); int assertion_file_mode(const char *, int, const char *, int); Modified: user/alc/PQ_LAUNDRY/contrib/libarchive/libarchive/test/test_read_format_mtree_crash747.c ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/libarchive/libarchive/test/test_read_format_mtree_crash747.c Mon Oct 24 17:02:25 2016 (r307867) +++ user/alc/PQ_LAUNDRY/contrib/libarchive/libarchive/test/test_read_format_mtree_crash747.c Mon Oct 24 17:08:12 2016 (r307868) @@ -33,6 +33,11 @@ DEFINE_TEST(test_read_format_mtree_crash const char *reffile = "test_read_format_mtree_crash747.mtree.bz2"; struct archive *a; + if (archive_bzlib_version() == NULL) { + skipping("This test requires bzlib"); + return; + } + extract_reference_file(reffile); assert((a = archive_read_new()) != NULL); Modified: user/alc/PQ_LAUNDRY/contrib/libarchive/libarchive/test/test_read_format_zip_high_compression.c ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/libarchive/libarchive/test/test_read_format_zip_high_compression.c Mon Oct 24 17:02:25 2016 (r307867) +++ user/alc/PQ_LAUNDRY/contrib/libarchive/libarchive/test/test_read_format_zip_high_compression.c Mon Oct 24 17:08:12 2016 (r307868) @@ -50,6 +50,11 @@ DEFINE_TEST(test_read_format_zip_high_co size_t s; int64_t o; + if (archive_zlib_version() == NULL) { + skipping("Zip compression test requires zlib"); + return; + } + extract_reference_file(refname); p = slurpfile(&archive_size, refname); @@ -82,6 +87,11 @@ DEFINE_TEST(test_read_format_zip_high_co char *body, *body_read, *buff; int n; + if (archive_zlib_version() == NULL) { + skipping("Zip compression test requires zlib"); + return; + } + assert((body = malloc(body_size)) != NULL); assert((body_read = malloc(body_size)) != NULL); assert((buff = malloc(buff_size)) != NULL); Modified: user/alc/PQ_LAUNDRY/contrib/libarchive/libarchive/test/test_read_set_format.c ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/libarchive/libarchive/test/test_read_set_format.c Mon Oct 24 17:02:25 2016 (r307867) +++ user/alc/PQ_LAUNDRY/contrib/libarchive/libarchive/test/test_read_set_format.c Mon Oct 24 17:08:12 2016 (r307868) @@ -133,11 +133,12 @@ DEFINE_TEST(test_read_append_filter) assert((a = archive_read_new()) != NULL); assertA(0 == archive_read_set_format(a, ARCHIVE_FORMAT_TAR)); r = archive_read_append_filter(a, ARCHIVE_FILTER_GZIP); - if (r == ARCHIVE_WARN && !canGzip()) { - skipping("gzip reading not fully supported on this platform"); + if (r != ARCHIVE_OK && archive_zlib_version() == NULL && !canGzip()) { + skipping("gzip tests require zlib or working gzip command"); assertEqualInt(ARCHIVE_OK, archive_read_free(a)); return; } + assertEqualIntA(a, ARCHIVE_OK, r); assertEqualInt(ARCHIVE_OK, archive_read_open_memory(a, archive, sizeof(archive))); assertEqualInt(ARCHIVE_OK, archive_read_next_header(a, &ae)); @@ -200,8 +201,11 @@ DEFINE_TEST(test_read_append_filter_wron { struct archive_entry *ae; struct archive *a; +#if !defined(_WIN32) || defined(__CYGWIN__) + FILE * fp; int fd; fpos_t pos; +#endif /* * If we have "bunzip2 -q", try using that. @@ -211,11 +215,13 @@ DEFINE_TEST(test_read_append_filter_wron return; } +#if !defined(_WIN32) || defined(__CYGWIN__) /* bunzip2 will write to stderr, redirect it to a file */ fflush(stderr); fgetpos(stderr, &pos); fd = dup(fileno(stderr)); - freopen("stderr1", "w", stderr); + fp = freopen("stderr1", "w", stderr); +#endif assert((a = archive_read_new()) != NULL); assertA(0 == archive_read_set_format(a, ARCHIVE_FORMAT_TAR)); @@ -227,12 +233,15 @@ DEFINE_TEST(test_read_append_filter_wron assertEqualIntA(a, ARCHIVE_WARN, archive_read_close(a)); assertEqualInt(ARCHIVE_OK, archive_read_free(a)); - /* restore stderr */ - fflush(stderr); - dup2(fd, fileno(stderr)); - close(fd); - clearerr(stderr); - fsetpos(stderr, &pos); - +#if !defined(_WIN32) || defined(__CYGWIN__) + /* restore stderr and verify results */ + if (fp != NULL) { + fflush(stderr); + dup2(fd, fileno(stderr)); + close(fd); + clearerr(stderr); + fsetpos(stderr, &pos); + } assertTextFileContents("bunzip2: (stdin) is not a bzip2 file.\n", "stderr1"); +#endif } Modified: user/alc/PQ_LAUNDRY/contrib/libarchive/libarchive/test/test_write_format_iso9660.c ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/libarchive/libarchive/test/test_write_format_iso9660.c Mon Oct 24 17:02:25 2016 (r307867) +++ user/alc/PQ_LAUNDRY/contrib/libarchive/libarchive/test/test_write_format_iso9660.c Mon Oct 24 17:08:12 2016 (r307868) @@ -117,8 +117,8 @@ DEFINE_TEST(test_write_format_iso9660) */ dirname[0] = '\0'; strcpy(dir, "/dir0"); - for (i = 0; i < 10; i++) { - dir[4] = '0' + i; + for (i = 0; i < 13; i++) { + dir[4] = "0123456789ABCDEF"[i]; if (i == 0) strcat(dirname, dir+1); else @@ -134,6 +134,19 @@ DEFINE_TEST(test_write_format_iso9660) archive_entry_free(ae); } + strcat(dirname, "/file"); + assert((ae = archive_entry_new()) != NULL); + archive_entry_set_atime(ae, 2, 20); + archive_entry_set_birthtime(ae, 3, 30); + archive_entry_set_ctime(ae, 4, 40); + archive_entry_set_mtime(ae, 5, 50); + archive_entry_copy_pathname(ae, dirname); + archive_entry_set_mode(ae, S_IFREG | 0755); + archive_entry_set_size(ae, 8); + assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae)); + archive_entry_free(ae); + assertEqualIntA(a, 8, archive_write_data(a, "12345678", 9)); + /* * "dir0/dir1/file1" has 8 bytes of data. */ @@ -333,6 +346,45 @@ DEFINE_TEST(test_write_format_iso9660) assertEqualInt(2048, archive_entry_size(ae)); /* + * Read "dir0/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dirA" + */ + assertEqualIntA(a, 0, archive_read_next_header(a, &ae)); + assertEqualInt(2, archive_entry_atime(ae)); + assertEqualInt(3, archive_entry_birthtime(ae)); + assertEqualInt(4, archive_entry_ctime(ae)); + assertEqualInt(5, archive_entry_mtime(ae)); + assertEqualString("dir0/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dirA", + archive_entry_pathname(ae)); + assert((S_IFDIR | 0555) == archive_entry_mode(ae)); + assertEqualInt(2048, archive_entry_size(ae)); + + /* + * Read "dir0/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dirA/dirB" + */ + assertEqualIntA(a, 0, archive_read_next_header(a, &ae)); + assertEqualInt(2, archive_entry_atime(ae)); + assertEqualInt(3, archive_entry_birthtime(ae)); + assertEqualInt(4, archive_entry_ctime(ae)); + assertEqualInt(5, archive_entry_mtime(ae)); + assertEqualString("dir0/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dirA/dirB", + archive_entry_pathname(ae)); + assert((S_IFDIR | 0555) == archive_entry_mode(ae)); + assertEqualInt(2048, archive_entry_size(ae)); + + /* + * Read "dir0/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dirA/dirB/dirC" + */ + assertEqualIntA(a, 0, archive_read_next_header(a, &ae)); + assertEqualInt(2, archive_entry_atime(ae)); + assertEqualInt(3, archive_entry_birthtime(ae)); + assertEqualInt(4, archive_entry_ctime(ae)); + assertEqualInt(5, archive_entry_mtime(ae)); + assertEqualString("dir0/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dirA/dirB/dirC", + archive_entry_pathname(ae)); + assert((S_IFDIR | 0555) == archive_entry_mode(ae)); + assertEqualInt(2048, archive_entry_size(ae)); + + /* * Read "hardlnk" */ assertEqualIntA(a, 0, archive_read_next_header(a, &ae)); @@ -386,6 +438,21 @@ DEFINE_TEST(test_write_format_iso9660) assertEqualMem(buff2, "12345678", 8); /* + * Read "dir0/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dirA/dirB/dirC/file" + */ + assertEqualIntA(a, 0, archive_read_next_header(a, &ae)); + assertEqualInt(2, archive_entry_atime(ae)); + assertEqualInt(3, archive_entry_birthtime(ae)); + assertEqualInt(4, archive_entry_ctime(ae)); + assertEqualInt(5, archive_entry_mtime(ae)); + assertEqualString("dir0/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dirA/dirB/dirC/file", archive_entry_pathname(ae)); + assert((AE_IFREG | 0555) == archive_entry_mode(ae)); + assertEqualInt(1, archive_entry_nlink(ae)); + assertEqualInt(8, archive_entry_size(ae)); + assertEqualIntA(a, 8, archive_read_data(a, buff2, 10)); + assertEqualMem(buff2, "12345678", 8); + + /* * Read "dir0/dir1/file1" */ assertEqualIntA(a, 0, archive_read_next_header(a, &ae)); @@ -580,29 +647,65 @@ DEFINE_TEST(test_write_format_iso9660) assertEqualInt(2048, archive_entry_size(ae)); /* - * Read "hardlnk" + * Read "dir0/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dirA" */ assertEqualIntA(a, 0, archive_read_next_header(a, &ae)); assertEqualInt(5, archive_entry_atime(ae)); assertEqualInt(5, archive_entry_ctime(ae)); assertEqualInt(5, archive_entry_mtime(ae)); - assertEqualString("hardlnk", archive_entry_pathname(ae)); + assertEqualString("dir0/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dirA", + archive_entry_pathname(ae)); + assert((S_IFDIR | 0700) == archive_entry_mode(ae)); + assertEqualInt(2048, archive_entry_size(ae)); + + /* + * Read "dir0/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dirA/dirB" + */ + assertEqualIntA(a, 0, archive_read_next_header(a, &ae)); + assertEqualInt(5, archive_entry_atime(ae)); + assertEqualInt(5, archive_entry_ctime(ae)); + assertEqualInt(5, archive_entry_mtime(ae)); + assertEqualString("dir0/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dirA/dirB", + archive_entry_pathname(ae)); + assert((S_IFDIR | 0700) == archive_entry_mode(ae)); + assertEqualInt(2048, archive_entry_size(ae)); + + /* + * Read "dir0/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dirA/dirB/dirC" + */ + assertEqualIntA(a, 0, archive_read_next_header(a, &ae)); + assertEqualInt(5, archive_entry_atime(ae)); + assertEqualInt(5, archive_entry_ctime(ae)); + assertEqualInt(5, archive_entry_mtime(ae)); + assertEqualString("dir0/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dirA/dirB/dirC", + archive_entry_pathname(ae)); + assert((S_IFDIR | 0700) == archive_entry_mode(ae)); + assertEqualInt(2048, archive_entry_size(ae)); + + /* + * Read "file" + */ + assertEqualIntA(a, 0, archive_read_next_header(a, &ae)); + assertEqualInt(5, archive_entry_atime(ae)); + assertEqualInt(5, archive_entry_ctime(ae)); + assertEqualInt(5, archive_entry_mtime(ae)); + assertEqualString("file", archive_entry_pathname(ae)); assert((AE_IFREG | 0400) == archive_entry_mode(ae)); - assertEqualInt(2, archive_entry_nlink(ae)); assertEqualInt(8, archive_entry_size(ae)); assertEqualIntA(a, 8, archive_read_data(a, buff2, 10)); assertEqualMem(buff2, "12345678", 8); /* - * Read "file" + * Read "hardlnk" */ assertEqualIntA(a, 0, archive_read_next_header(a, &ae)); assertEqualInt(5, archive_entry_atime(ae)); assertEqualInt(5, archive_entry_ctime(ae)); assertEqualInt(5, archive_entry_mtime(ae)); - assertEqualString("file", archive_entry_pathname(ae)); - assertEqualString("hardlnk", archive_entry_hardlink(ae)); + assertEqualString("hardlnk", archive_entry_pathname(ae)); + assertEqualString("file", archive_entry_hardlink(ae)); assert((AE_IFREG | 0400) == archive_entry_mode(ae)); + assertEqualInt(2, archive_entry_nlink(ae)); assertEqualInt(0, archive_entry_size(ae)); assertEqualIntA(a, 0, archive_read_data(a, buff2, 10)); @@ -625,6 +728,22 @@ DEFINE_TEST(test_write_format_iso9660) assertEqualMem(buff2, "12345678", 8); /* + * Read "dir0/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dirA/dirB/dirC/file" + */ + assertEqualIntA(a, 0, archive_read_next_header(a, &ae)); + assertEqualInt(5, archive_entry_atime(ae)); + assertEqualInt(5, archive_entry_ctime(ae)); + assertEqualInt(5, archive_entry_mtime(ae)); + assertEqualString( + "dir0/dir1/dir2/dir3/dir4/dir5/dir6/dir7/dir8/dir9/dirA/dirB/dirC/file", + archive_entry_pathname(ae)); + assert((AE_IFREG | 0400) == archive_entry_mode(ae)); + assertEqualInt(1, archive_entry_nlink(ae)); + assertEqualInt(8, archive_entry_size(ae)); + assertEqualIntA(a, 8, archive_read_data(a, buff2, 10)); + assertEqualMem(buff2, "12345678", 8); + + /* * Read "dir0/dir1/file1" */ assertEqualIntA(a, 0, archive_read_next_header(a, &ae)); @@ -746,6 +865,42 @@ DEFINE_TEST(test_write_format_iso9660) assertEqualInt(2048, archive_entry_size(ae)); /* + * Read "rr_moved/dir7/dir8/dir9/dira" + */ + assertEqualIntA(a, 0, archive_read_next_header(a, &ae)); + assertEqualInt(5, archive_entry_atime(ae)); + assertEqualInt(5, archive_entry_ctime(ae)); + assertEqualInt(5, archive_entry_mtime(ae)); + assertEqualString("RR_MOVED/DIR7/DIR8/DIR9/DIRA", + archive_entry_pathname(ae)); + assert((S_IFDIR | 0700) == archive_entry_mode(ae)); + assertEqualInt(2048, archive_entry_size(ae)); + + /* + * Read "rr_moved/dir7/dir8/dir9/dira/dirB" + */ + assertEqualIntA(a, 0, archive_read_next_header(a, &ae)); + assertEqualInt(5, archive_entry_atime(ae)); + assertEqualInt(5, archive_entry_ctime(ae)); + assertEqualInt(5, archive_entry_mtime(ae)); + assertEqualString("RR_MOVED/DIR7/DIR8/DIR9/DIRA/DIRB", + archive_entry_pathname(ae)); + assert((S_IFDIR | 0700) == archive_entry_mode(ae)); + assertEqualInt(2048, archive_entry_size(ae)); + + /* + * Read "rr_moved/dir7/dir8/dir9/dirA/dirB/dirC" + */ + assertEqualIntA(a, 0, archive_read_next_header(a, &ae)); + assertEqualInt(5, archive_entry_atime(ae)); + assertEqualInt(5, archive_entry_ctime(ae)); + assertEqualInt(5, archive_entry_mtime(ae)); + assertEqualString("RR_MOVED/DIR7/DIR8/DIR9/DIRA/DIRB/DIRC", + archive_entry_pathname(ae)); + assert((S_IFDIR | 0700) == archive_entry_mode(ae)); + assertEqualInt(2048, archive_entry_size(ae)); + + /* * Read "dir0" */ assertEqualIntA(a, 0, archive_read_next_header(a, &ae)); @@ -827,33 +982,35 @@ DEFINE_TEST(test_write_format_iso9660) assertEqualInt(2048, archive_entry_size(ae)); /* - * Read "file" + * Read "hardlink" */ assertEqualIntA(a, 0, archive_read_next_header(a, &ae)); assertEqualInt(5, archive_entry_atime(ae)); - assertEqualInt(0, archive_entry_birthtime(ae)); assertEqualInt(5, archive_entry_ctime(ae)); assertEqualInt(5, archive_entry_mtime(ae)); - assertEqualString("FILE", archive_entry_pathname(ae)); + assertEqualString("HARDLNK", archive_entry_pathname(ae)); + assertEqualString(NULL, archive_entry_hardlink(ae)); assert((AE_IFREG | 0400) == archive_entry_mode(ae)); - assertEqualInt(2, archive_entry_nlink(ae)); assertEqualInt(8, archive_entry_size(ae)); assertEqualIntA(a, 8, archive_read_data(a, buff2, 10)); assertEqualMem(buff2, "12345678", 8); /* - * Read "hardlink" + * Read "file" */ assertEqualIntA(a, 0, archive_read_next_header(a, &ae)); assertEqualInt(5, archive_entry_atime(ae)); + assertEqualInt(0, archive_entry_birthtime(ae)); assertEqualInt(5, archive_entry_ctime(ae)); assertEqualInt(5, archive_entry_mtime(ae)); - assertEqualString("HARDLNK", archive_entry_pathname(ae)); - assertEqualString("FILE", archive_entry_hardlink(ae)); + assertEqualString("FILE", archive_entry_pathname(ae)); + assertEqualString("HARDLNK", archive_entry_hardlink(ae)); assert((AE_IFREG | 0400) == archive_entry_mode(ae)); + assertEqualInt(2, archive_entry_nlink(ae)); assertEqualInt(0, archive_entry_size(ae)); assertEqualIntA(a, 0, archive_read_data(a, buff2, 10)); + /* * Read longname */ @@ -871,6 +1028,22 @@ DEFINE_TEST(test_write_format_iso9660) assertEqualMem(buff2, "12345678", 8); /* + * Read "rr_moved/dir7/dir8/dir9/dirA/dirB/dirC/file" + */ + assertEqualIntA(a, 0, archive_read_next_header(a, &ae)); + assertEqualInt(5, archive_entry_atime(ae)); + assertEqualInt(5, archive_entry_ctime(ae)); + assertEqualInt(5, archive_entry_mtime(ae)); + assertEqualString( + "RR_MOVED/DIR7/DIR8/DIR9/DIRA/DIRB/DIRC/FILE", + archive_entry_pathname(ae)); + assert((AE_IFREG | 0400) == archive_entry_mode(ae)); + assertEqualInt(1, archive_entry_nlink(ae)); + assertEqualInt(8, archive_entry_size(ae)); + assertEqualIntA(a, 8, archive_read_data(a, buff2, 10)); + assertEqualMem(buff2, "12345678", 8); + + /* * Read "dir0/dir1/file1" */ assertEqualIntA(a, 0, archive_read_next_header(a, &ae)); Modified: user/alc/PQ_LAUNDRY/contrib/libarchive/tar/test/main.c ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/libarchive/tar/test/main.c Mon Oct 24 17:02:25 2016 (r307867) +++ user/alc/PQ_LAUNDRY/contrib/libarchive/tar/test/main.c Mon Oct 24 17:08:12 2016 (r307868) @@ -1188,7 +1188,7 @@ assertion_file_contains_no_invalid_strin return(0); } } - + free(buff); return (0); } @@ -1412,6 +1412,8 @@ assertion_file_mode(const char *file, in assertion_count(file, line); #if defined(_WIN32) && !defined(__CYGWIN__) failure_start(file, line, "assertFileMode not yet implemented for Windows"); + (void)mode; /* UNUSED */ + (void)r; /* UNUSED */ #else { struct stat st; Modified: user/alc/PQ_LAUNDRY/contrib/libarchive/tar/test/test.h ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/libarchive/tar/test/test.h Mon Oct 24 17:02:25 2016 (r307867) +++ user/alc/PQ_LAUNDRY/contrib/libarchive/tar/test/test.h Mon Oct 24 17:08:12 2016 (r307868) @@ -244,7 +244,7 @@ int assertion_file_atime_recent(const ch int assertion_file_birthtime(const char *, int, const char *, long, long); int assertion_file_birthtime_recent(const char *, int, const char *); int assertion_file_contains_lines_any_order(const char *, int, const char *, const char **); -int assertion_file_contains_no_invalid_strings(const char *, int, const char *, const char **); +int assertion_file_contains_no_invalid_strings(const char *, int, const char *, const char **); int assertion_file_contents(const char *, int, const void *, int, const char *); int assertion_file_exists(const char *, int, const char *); int assertion_file_mode(const char *, int, const char *, int); Modified: user/alc/PQ_LAUNDRY/contrib/libarchive/tar/test/test_option_b.c ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/libarchive/tar/test/test_option_b.c Mon Oct 24 17:02:25 2016 (r307867) +++ user/alc/PQ_LAUNDRY/contrib/libarchive/tar/test/test_option_b.c Mon Oct 24 17:08:12 2016 (r307868) @@ -33,7 +33,7 @@ DEFINE_TEST(test_option_b) assertMakeFile("file1", 0644, "file1"); if (systemf("cat file1 > test_cat.out 2> test_cat.err") != 0) { - skipping("Platform doesn't have cat"); + skipping("This test requires a `cat` program"); return; } testprog_ustar = malloc(strlen(testprog) + sizeof(USTAR_OPT) + 1); Modified: user/alc/PQ_LAUNDRY/contrib/libarchive/tar/test/test_symlink_dir.c ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/libarchive/tar/test/test_symlink_dir.c Mon Oct 24 17:02:25 2016 (r307867) +++ user/alc/PQ_LAUNDRY/contrib/libarchive/tar/test/test_symlink_dir.c Mon Oct 24 17:08:12 2016 (r307868) @@ -63,7 +63,7 @@ DEFINE_TEST(test_symlink_dir) /* "dir2" is a symlink to a non-existing "real_dir2" */ assertMakeSymlink("dest1/dir2", "real_dir2"); } else { - skipping("some symlink checks"); + skipping("Symlinks are not supported on this platform"); } /* "dir3" is a symlink to an existing "non_dir3" */ assertMakeFile("dest1/non_dir3", 0755, "abcdef"); Modified: user/alc/PQ_LAUNDRY/contrib/tzdata/asia ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/tzdata/asia Mon Oct 24 17:02:25 2016 (r307867) +++ user/alc/PQ_LAUNDRY/contrib/tzdata/asia Mon Oct 24 17:08:12 2016 (r307868) @@ -2544,11 +2544,6 @@ Zone Asia/Karachi 4:28:12 - LMT 1907 # From Paul Eggert (2015-03-03): # http://www.timeanddate.com/time/change/west-bank/ramallah?year=2014 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@freebsd.org Mon Oct 24 18:27:25 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B302CC1F480 for ; Mon, 24 Oct 2016 18:27:25 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84984F22; Mon, 24 Oct 2016 18:27:25 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9OIROfQ051984; Mon, 24 Oct 2016 18:27:24 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9OIROWU051983; Mon, 24 Oct 2016 18:27:24 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201610241827.u9OIROWU051983@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 24 Oct 2016 18:27:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r307875 - user/cperciva/freebsd-update-build/patches/10.3-RELEASE X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2016 18:27:25 -0000 Author: glebius Date: Mon Oct 24 18:27:24 2016 New Revision: 307875 URL: https://svnweb.freebsd.org/changeset/base/307875 Log: The SA-16:31 mispatching happened in svn only, not in freebsd-update, so this patch isn't needed. Added: user/cperciva/freebsd-update-build/patches/10.3-RELEASE/11-SA-16:15.sysarch Deleted: user/cperciva/freebsd-update-build/patches/10.3-RELEASE/11-SA-16:31.libarchive Added: user/cperciva/freebsd-update-build/patches/10.3-RELEASE/11-SA-16:15.sysarch ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/cperciva/freebsd-update-build/patches/10.3-RELEASE/11-SA-16:15.sysarch Mon Oct 24 18:27:24 2016 (r307875) @@ -0,0 +1,21 @@ +--- sys/amd64/amd64/sys_machdep.c.orig ++++ sys/amd64/amd64/sys_machdep.c +@@ -608,6 +608,8 @@ + largest_ld = uap->start + uap->num; + if (largest_ld > max_ldt_segment) + largest_ld = max_ldt_segment; ++ if (largest_ld < uap->start) ++ return (EINVAL); + i = largest_ld - uap->start; + mtx_lock(&dt_lock); + bzero(&((struct user_segment_descriptor *)(pldt->ldt_base)) +@@ -620,7 +622,8 @@ + /* verify range of descriptors to modify */ + largest_ld = uap->start + uap->num; + if (uap->start >= max_ldt_segment || +- largest_ld > max_ldt_segment) ++ largest_ld > max_ldt_segment || ++ largest_ld < uap->start) + return (EINVAL); + } + From owner-svn-src-user@freebsd.org Mon Oct 24 21:33:01 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AEDEAC2089D for ; Mon, 24 Oct 2016 21:33:01 +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 mx1.freebsd.org (Postfix) with ESMTPS id 7ECF0157; Mon, 24 Oct 2016 21:33:01 +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 u9OLX0qL025415; Mon, 24 Oct 2016 21:33:00 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9OLX0dm025414; Mon, 24 Oct 2016 21:33:00 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201610242133.u9OLX0dm025414@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Mon, 24 Oct 2016 21:33:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r307886 - user/alc/PQ_LAUNDRY/sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2016 21:33:01 -0000 Author: alc Date: Mon Oct 24 21:33:00 2016 New Revision: 307886 URL: https://svnweb.freebsd.org/changeset/base/307886 Log: Colocate a related variable and SYSCTL. Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Mon Oct 24 21:31:47 2016 (r307885) +++ user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Mon Oct 24 21:33:00 2016 (r307886) @@ -184,7 +184,6 @@ static int vm_pageout_update_period; static int disable_swap_pageouts; static int lowmem_period = 10; static time_t lowmem_uptime; -static u_int vm_background_launder_target; #if defined(NO_SWAPPING) static int vm_swap_enabled = 0; @@ -239,6 +238,7 @@ SYSCTL_INT(_vm, OID_AUTO, act_scan_laund CTLFLAG_RW, &act_scan_laundry_weight, 0, "weight given to clean vs. dirty pages in active queue scans"); +static u_int vm_background_launder_target; SYSCTL_UINT(_vm, OID_AUTO, background_launder_target, CTLFLAG_RW, &vm_background_launder_target, 0, "background laundering target, in pages"); From owner-svn-src-user@freebsd.org Tue Oct 25 03:03:36 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11C53C2078E for ; Tue, 25 Oct 2016 03:03:36 +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 mx1.freebsd.org (Postfix) with ESMTPS id D37377C3; Tue, 25 Oct 2016 03:03:35 +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 u9P33Yno050489; Tue, 25 Oct 2016 03:03:34 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9P33YQv050488; Tue, 25 Oct 2016 03:03:34 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201610250303.u9P33YQv050488@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Tue, 25 Oct 2016 03:03:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r307894 - user/alc/PQ_LAUNDRY/sys/sys X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2016 03:03:36 -0000 Author: alc Date: Tue Oct 25 03:03:34 2016 New Revision: 307894 URL: https://svnweb.freebsd.org/changeset/base/307894 Log: Revise the description of v_laundry_count. Submitted by: markj Modified: user/alc/PQ_LAUNDRY/sys/sys/vmmeter.h Modified: user/alc/PQ_LAUNDRY/sys/sys/vmmeter.h ============================================================================== --- user/alc/PQ_LAUNDRY/sys/sys/vmmeter.h Tue Oct 25 01:41:39 2016 (r307893) +++ user/alc/PQ_LAUNDRY/sys/sys/vmmeter.h Tue Oct 25 03:03:34 2016 (r307894) @@ -97,7 +97,7 @@ struct vmmeter { u_int v_active_count; /* (q) pages active */ u_int v_inactive_target; /* (c) pages desired inactive */ u_int v_inactive_count; /* (q) pages inactive */ - u_int v_laundry_count; /* (q) pages dirty */ + u_int v_laundry_count; /* (q) pages eligible for laundering */ u_int v_cache_count; /* (f) pages on cache queue */ u_int v_pageout_free_min; /* (c) min pages reserved for kernel */ u_int v_interrupt_free_min; /* (c) reserved pages for int code */ From owner-svn-src-user@freebsd.org Tue Oct 25 03:34:28 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDAC7C20085 for ; Tue, 25 Oct 2016 03:34:28 +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 mx1.freebsd.org (Postfix) with ESMTPS id 907BAB85; Tue, 25 Oct 2016 03:34:28 +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 u9P3YReh062381; Tue, 25 Oct 2016 03:34:27 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9P3YOSx062350; Tue, 25 Oct 2016 03:34:24 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201610250334.u9P3YOSx062350@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Tue, 25 Oct 2016 03:34:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r307896 - in user/alc/PQ_LAUNDRY: contrib/bsnmp/lib lib/libc/powerpc/gen lib/libnetbsd lib/libnetbsd/sys release/tools share/mk sys/amd64/amd64 sys/arm/allwinner sys/arm/conf sys/boot/e... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2016 03:34:29 -0000 Author: alc Date: Tue Oct 25 03:34:24 2016 New Revision: 307896 URL: https://svnweb.freebsd.org/changeset/base/307896 Log: MFH r307894 Added: user/alc/PQ_LAUNDRY/sys/boot/forth/efi.4th - copied unchanged from r307894, head/sys/boot/forth/efi.4th Deleted: user/alc/PQ_LAUNDRY/sys/boot/ficl/efi.c Modified: user/alc/PQ_LAUNDRY/contrib/bsnmp/lib/snmp.c user/alc/PQ_LAUNDRY/lib/libc/powerpc/gen/Makefile.inc user/alc/PQ_LAUNDRY/lib/libnetbsd/sys/cdefs.h user/alc/PQ_LAUNDRY/lib/libnetbsd/util.c user/alc/PQ_LAUNDRY/release/tools/arm.subr user/alc/PQ_LAUNDRY/share/mk/bsd.compiler.mk user/alc/PQ_LAUNDRY/sys/amd64/amd64/trap.c user/alc/PQ_LAUNDRY/sys/arm/allwinner/aw_rsb.c user/alc/PQ_LAUNDRY/sys/arm/allwinner/aw_thermal.c user/alc/PQ_LAUNDRY/sys/arm/allwinner/files.allwinner user/alc/PQ_LAUNDRY/sys/arm/conf/GENERIC user/alc/PQ_LAUNDRY/sys/boot/efi/libefi/Makefile user/alc/PQ_LAUNDRY/sys/boot/efi/libefi/env.c user/alc/PQ_LAUNDRY/sys/boot/efi/loader/main.c user/alc/PQ_LAUNDRY/sys/boot/fdt/dts/arm/olimex-a20-som-evb.dts user/alc/PQ_LAUNDRY/sys/boot/ficl/loader.c user/alc/PQ_LAUNDRY/sys/boot/forth/Makefile.inc user/alc/PQ_LAUNDRY/sys/boot/forth/loader.4th user/alc/PQ_LAUNDRY/sys/contrib/rdma/krping/krping.c user/alc/PQ_LAUNDRY/sys/dev/cxgbe/t4_sge.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c user/alc/PQ_LAUNDRY/sys/i386/i386/trap.c user/alc/PQ_LAUNDRY/sys/kern/subr_prf.c user/alc/PQ_LAUNDRY/sys/netinet/ip_output.c user/alc/PQ_LAUNDRY/sys/ufs/ffs/ffs_tables.c user/alc/PQ_LAUNDRY/sys/x86/include/x86_var.h user/alc/PQ_LAUNDRY/sys/x86/x86/cpu_machdep.c user/alc/PQ_LAUNDRY/sys/x86/x86/mp_x86.c user/alc/PQ_LAUNDRY/usr.sbin/mountd/mountd.8 user/alc/PQ_LAUNDRY/usr.sbin/mountd/mountd.c Directory Properties: user/alc/PQ_LAUNDRY/ (props changed) Modified: user/alc/PQ_LAUNDRY/contrib/bsnmp/lib/snmp.c ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/bsnmp/lib/snmp.c Tue Oct 25 03:26:00 2016 (r307895) +++ user/alc/PQ_LAUNDRY/contrib/bsnmp/lib/snmp.c Tue Oct 25 03:34:24 2016 (r307896) @@ -288,7 +288,7 @@ parse_secparams(struct asn_buf *b, struc memset(buf, 0, 256); tb.asn_ptr = buf; tb.asn_len = 256; - u_int len; + u_int len = 256; if (asn_get_octetstring(b, buf, &len) != ASN_ERR_OK) { snmp_error("cannot parse usm header"); Modified: user/alc/PQ_LAUNDRY/lib/libc/powerpc/gen/Makefile.inc ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libc/powerpc/gen/Makefile.inc Tue Oct 25 03:26:00 2016 (r307895) +++ user/alc/PQ_LAUNDRY/lib/libc/powerpc/gen/Makefile.inc Tue Oct 25 03:34:24 2016 (r307896) @@ -1,6 +1,6 @@ # $FreeBSD$ -.include "${LIBC_SRC}/powerpc/gen/Makefile.common" +.include "${LIBC_SRCTOP}/powerpc/gen/Makefile.common" SRCS += fabs.S flt_rounds.c fpgetmask.c fpgetround.c \ fpgetsticky.c fpsetmask.c fpsetround.c \ Modified: user/alc/PQ_LAUNDRY/lib/libnetbsd/sys/cdefs.h ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libnetbsd/sys/cdefs.h Tue Oct 25 03:26:00 2016 (r307895) +++ user/alc/PQ_LAUNDRY/lib/libnetbsd/sys/cdefs.h Tue Oct 25 03:34:24 2016 (r307896) @@ -35,11 +35,13 @@ #include_next +#ifndef __dead #ifdef __dead2 #define __dead __dead2 #else #define __dead #endif +#endif /* !__dead */ /* * The __CONCAT macro is used to concatenate parts of symbol names, e.g. Modified: user/alc/PQ_LAUNDRY/lib/libnetbsd/util.c ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libnetbsd/util.c Tue Oct 25 03:26:00 2016 (r307895) +++ user/alc/PQ_LAUNDRY/lib/libnetbsd/util.c Tue Oct 25 03:34:24 2016 (r307896) @@ -36,7 +36,8 @@ #include #include #include -#include + +#include "util.h" char * flags_to_string(u_long flags, const char *def) Modified: user/alc/PQ_LAUNDRY/release/tools/arm.subr ============================================================================== --- user/alc/PQ_LAUNDRY/release/tools/arm.subr Tue Oct 25 03:26:00 2016 (r307895) +++ user/alc/PQ_LAUNDRY/release/tools/arm.subr Tue Oct 25 03:34:24 2016 (r307896) @@ -88,7 +88,6 @@ arm_create_user() { -c 'FreeBSD User' -d '/home/freebsd' -s '/bin/csh' chroot ${CHROOTDIR} /usr/sbin/pw -R ${DESTDIR} \ usermod root -w yes - chroot ${CHROOTDIR} ln -s /home ${DESTDIR}/usr/home return 0 } Modified: user/alc/PQ_LAUNDRY/share/mk/bsd.compiler.mk ============================================================================== --- user/alc/PQ_LAUNDRY/share/mk/bsd.compiler.mk Tue Oct 25 03:26:00 2016 (r307895) +++ user/alc/PQ_LAUNDRY/share/mk/bsd.compiler.mk Tue Oct 25 03:34:24 2016 (r307896) @@ -147,7 +147,7 @@ ${X_}COMPILER_TYPE:= clang ${X_}COMPILER_TYPE:= gcc . elif ${_v:M\(GCC\)} ${X_}COMPILER_TYPE:= gcc -. elif ${_v:Mclang} +. elif ${_v:Mclang} || ${_v:M(clang-*.*.*)} ${X_}COMPILER_TYPE:= clang . else .error Unable to determine compiler type for ${cc}=${${cc}}. Consider setting ${X_}COMPILER_TYPE. Modified: user/alc/PQ_LAUNDRY/sys/amd64/amd64/trap.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/amd64/amd64/trap.c Tue Oct 25 03:26:00 2016 (r307895) +++ user/alc/PQ_LAUNDRY/sys/amd64/amd64/trap.c Tue Oct 25 03:34:24 2016 (r307896) @@ -144,9 +144,6 @@ static char *trap_msg[] = { "DTrace pid return trap", /* 32 T_DTRACE_RET */ }; -static int panic_on_nmi = 1; -SYSCTL_INT(_machdep, OID_AUTO, panic_on_nmi, CTLFLAG_RWTUN, - &panic_on_nmi, 0, "Panic on NMI"); static int prot_fault_translation; SYSCTL_INT(_machdep, OID_AUTO, prot_fault_translation, CTLFLAG_RWTUN, &prot_fault_translation, 0, @@ -372,7 +369,7 @@ trap(struct trapframe *frame) #ifdef DEV_ISA case T_NMI: - nmi_handle_intr(type, frame, true); + nmi_handle_intr(type, frame); break; #endif /* DEV_ISA */ @@ -544,10 +541,8 @@ trap(struct trapframe *frame) #ifdef DEV_ISA case T_NMI: - if (nmi_handle_intr(type, frame, false) || - !panic_on_nmi) - goto out; - /* FALLTHROUGH */ + nmi_handle_intr(type, frame); + goto out; #endif /* DEV_ISA */ } Modified: user/alc/PQ_LAUNDRY/sys/arm/allwinner/aw_rsb.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/arm/allwinner/aw_rsb.c Tue Oct 25 03:26:00 2016 (r307895) +++ user/alc/PQ_LAUNDRY/sys/arm/allwinner/aw_rsb.c Tue Oct 25 03:34:24 2016 (r307896) @@ -27,7 +27,7 @@ */ /* - * Allwinner RSB (Reduced Serial Bus) + * Allwinner RSB (Reduced Serial Bus) and P2WI (Push-Pull Two Wire Interface) */ #include @@ -92,8 +92,12 @@ __FBSDID("$FreeBSD$"); #define RSB_ADDR_PMIC_SECONDARY 0x745 #define RSB_ADDR_PERIPH_IC 0xe89 +#define A31_P2WI 1 +#define A23_RSB 2 + static struct ofw_compat_data compat_data[] = { - { "allwinner,sun8i-a23-rsb", 1 }, + { "allwinner,sun6i-a31-p2wi", A31_P2WI }, + { "allwinner,sun8i-a23-rsb", A23_RSB }, { NULL, 0 } }; @@ -131,6 +135,7 @@ struct rsb_softc { int busy; uint32_t status; uint16_t cur_addr; + int type; struct iic_msg *msg; }; @@ -270,8 +275,8 @@ rsb_transfer(device_t dev, struct iic_ms sc = device_get_softc(dev); /* - * RSB is not really an I2C or SMBus controller, so there are some - * restrictions imposed by the driver. + * P2WI and RSB are not really I2C or SMBus controllers, so there are + * some restrictions imposed by the driver. * * Transfers must contain exactly two messages. The first is always * a write, containing a single data byte offset. Data will either @@ -284,34 +289,36 @@ rsb_transfer(device_t dev, struct iic_ms msgs[0].len != 1 || msgs[1].len > RSB_MAXLEN) return (EINVAL); - /* The controller can read or write 1, 2, or 4 bytes at a time. */ - if ((msgs[1].flags & IIC_M_RD) != 0) { - switch (msgs[1].len) { - case 1: - cmd = CMD_RD8; - break; - case 2: - cmd = CMD_RD16; - break; - case 4: - cmd = CMD_RD32; - break; - default: - return (EINVAL); - } - } else { - switch (msgs[1].len) { - case 1: - cmd = CMD_WR8; - break; - case 2: - cmd = CMD_WR16; - break; - case 4: - cmd = CMD_WR32; - break; - default: - return (EINVAL); + /* The RSB controller can read or write 1, 2, or 4 bytes at a time. */ + if (sc->type == A23_RSB) { + if ((msgs[1].flags & IIC_M_RD) != 0) { + switch (msgs[1].len) { + case 1: + cmd = CMD_RD8; + break; + case 2: + cmd = CMD_RD16; + break; + case 4: + cmd = CMD_RD32; + break; + default: + return (EINVAL); + } + } else { + switch (msgs[1].len) { + case 1: + cmd = CMD_WR8; + break; + case 2: + cmd = CMD_WR16; + break; + case 4: + cmd = CMD_WR32; + break; + default: + return (EINVAL); + } } } @@ -322,13 +329,15 @@ rsb_transfer(device_t dev, struct iic_ms sc->status = 0; /* Select current run-time address if necessary */ - device_addr = msgs[0].slave >> 1; - if (sc->cur_addr != device_addr) { - error = rsb_set_rta(dev, device_addr); - if (error != 0) - goto done; - sc->cur_addr = device_addr; - sc->status = 0; + if (sc->type == A23_RSB) { + device_addr = msgs[0].slave >> 1; + if (sc->cur_addr != device_addr) { + error = rsb_set_rta(dev, device_addr); + if (error != 0) + goto done; + sc->cur_addr = device_addr; + sc->status = 0; + } } /* Clear interrupt status */ @@ -344,8 +353,9 @@ rsb_transfer(device_t dev, struct iic_ms RSB_WRITE(sc, RSB_DATA0, data[0]); } - /* Set command type */ - RSB_WRITE(sc, RSB_CMD, cmd); + /* Set command type for RSB */ + if (sc->type == A23_RSB) + RSB_WRITE(sc, RSB_CMD, cmd); /* Program data length register and transfer direction */ dlen = msgs[0].len - 1; @@ -379,10 +389,17 @@ rsb_probe(device_t dev) if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) + switch (ofw_bus_search_compatible(dev, compat_data)->ocd_data) { + case A23_RSB: + device_set_desc(dev, "Allwinner RSB"); + break; + case A31_P2WI: + device_set_desc(dev, "Allwinner P2WI"); + break; + default: return (ENXIO); + } - device_set_desc(dev, "Allwinner RSB"); return (BUS_PROBE_DEFAULT); } @@ -395,6 +412,8 @@ rsb_attach(device_t dev) sc = device_get_softc(dev); mtx_init(&sc->mtx, device_get_nameunit(dev), "rsb", MTX_DEF); + sc->type = ofw_bus_search_compatible(dev, compat_data)->ocd_data; + if (clk_get_by_ofw_index(dev, 0, 0, &sc->clk) == 0) { error = clk_enable(sc->clk); if (error != 0) { Modified: user/alc/PQ_LAUNDRY/sys/arm/allwinner/aw_thermal.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/arm/allwinner/aw_thermal.c Tue Oct 25 03:26:00 2016 (r307895) +++ user/alc/PQ_LAUNDRY/sys/arm/allwinner/aw_thermal.c Tue Oct 25 03:34:24 2016 (r307896) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -249,6 +250,7 @@ struct aw_thermal_softc { struct resource *res[2]; struct aw_thermal_config *conf; + struct task cf_task; int throttle; int min_freq; struct cf_level levels[MAX_CF_LEVELS]; @@ -390,6 +392,16 @@ aw_thermal_throttle(struct aw_thermal_so } static void +aw_thermal_cf_task(void *arg, int pending) +{ + struct aw_thermal_softc *sc; + + sc = arg; + + aw_thermal_throttle(sc, 1); +} + +static void aw_thermal_cf_pre_change(void *arg, const struct cf_level *level, int *status) { struct aw_thermal_softc *sc; @@ -430,7 +442,7 @@ aw_thermal_intr(void *arg) } if ((ints & ALARM_INT_ALL) != 0) - aw_thermal_throttle(sc, 1); + taskqueue_enqueue(taskqueue_thread, &sc->cf_task); } static int @@ -461,6 +473,7 @@ aw_thermal_attach(device_t dev) ih = NULL; sc->conf = THS_CONF(dev); + TASK_INIT(&sc->cf_task, 0, aw_thermal_cf_task, sc); if (bus_alloc_resources(dev, aw_thermal_spec, sc->res) != 0) { device_printf(dev, "cannot allocate resources for device\n"); Modified: user/alc/PQ_LAUNDRY/sys/arm/allwinner/files.allwinner ============================================================================== --- user/alc/PQ_LAUNDRY/sys/arm/allwinner/files.allwinner Tue Oct 25 03:26:00 2016 (r307895) +++ user/alc/PQ_LAUNDRY/sys/arm/allwinner/files.allwinner Tue Oct 25 03:34:24 2016 (r307896) @@ -12,7 +12,7 @@ arm/allwinner/a10_mmc.c optional mmc arm/allwinner/a10_sramc.c standard arm/allwinner/aw_nmi.c optional intrng arm/allwinner/aw_if_dwc.c optional dwc -arm/allwinner/aw_rsb.c optional rsb +arm/allwinner/aw_rsb.c optional rsb | p2wi arm/allwinner/aw_rtc.c standard arm/allwinner/aw_ts.c standard arm/allwinner/aw_wdog.c standard Modified: user/alc/PQ_LAUNDRY/sys/arm/conf/GENERIC ============================================================================== --- user/alc/PQ_LAUNDRY/sys/arm/conf/GENERIC Tue Oct 25 03:26:00 2016 (r307895) +++ user/alc/PQ_LAUNDRY/sys/arm/conf/GENERIC Tue Oct 25 03:34:24 2016 (r307896) @@ -106,11 +106,13 @@ device psci device iicbus device iic device twsi -device rsb +device rsb # Allwinner Reduced Serial Bus +device p2wi # Allwinner Push-Pull Two Wire device axp209 # AXP209 Power Management Unit device axp81x # AXP813/818 Power Management Unit device bcm2835_bsc device icee +device sy8106a # SY8106A Buck Regulator # GPIO device gpio Modified: user/alc/PQ_LAUNDRY/sys/boot/efi/libefi/Makefile ============================================================================== --- user/alc/PQ_LAUNDRY/sys/boot/efi/libefi/Makefile Tue Oct 25 03:26:00 2016 (r307895) +++ user/alc/PQ_LAUNDRY/sys/boot/efi/libefi/Makefile Tue Oct 25 03:34:24 2016 (r307896) @@ -26,6 +26,7 @@ CFLAGS+= -msoft-float -mgeneral-regs-onl .if ${MACHINE_ARCH} == "amd64" CFLAGS+= -fPIC -mno-red-zone .endif +CFLAGS+= -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/${MACHINE} CFLAGS+= -I${.CURDIR}/../include CFLAGS+= -I${.CURDIR}/../include/${MACHINE} CFLAGS+= -I${.CURDIR}/../../../../lib/libstand Modified: user/alc/PQ_LAUNDRY/sys/boot/efi/libefi/env.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/boot/efi/libefi/env.c Tue Oct 25 03:26:00 2016 (r307895) +++ user/alc/PQ_LAUNDRY/sys/boot/efi/libefi/env.c Tue Oct 25 03:34:24 2016 (r307896) @@ -26,8 +26,15 @@ #include __FBSDID("$FreeBSD$"); +#include +#include #include #include +#include +#include "bootstrap.h" +#include "ficl.h" + +int efi_variable_support = 1; /* * Simple wrappers to the underlying UEFI functions. @@ -53,3 +60,175 @@ efi_set_variable(CHAR16 *variable_name, { return RS->SetVariable(variable_name, vendor_guid, attributes, data_size, data); } + +/* + * FreeBSD's loader interaction words and extras + * + * efi-setenv ( value n name n guid n attr -- 0 | -1) + * efi-getenv ( guid n addr n -- addr' n' | -1 ) + * efi-unsetenv ( name n guid n'' -- ) + */ + +/* + * efi-setenv + * efi-setenv ( value n name n guid n attr -- 0 | -1) + * + * Set environment variables using the SetVariable EFI runtime service. + * + * Value and guid are passed through in binary form (so guid needs to be + * converted to binary form from its string form). Name is converted from + * ASCII to CHAR16. Since ficl doesn't have support for internationalization, + * there's no native CHAR16 interface provided. + * + * attr is an int in the bitmask of the following attributes for this variable. + * + * 1 Non volatile + * 2 Boot service access + * 4 Run time access + * (corresponding to the same bits in the UEFI spec). + */ +void +ficlEfiSetenv(FICL_VM *pVM) +{ +#ifndef TESTMAIN + char *value = NULL, *guid = NULL; + CHAR16 *name = NULL; + int i; +#endif + char *namep, *valuep, *guidp; + int names, values, guids, attr; + int status; + uuid_t u; + uint32_t ustatus; + +#if FICL_ROBUST > 1 + vmCheckStack(pVM, 6, 0); +#endif + attr = stackPopINT(pVM->pStack); + guids = stackPopINT(pVM->pStack); + guidp = (char*)stackPopPtr(pVM->pStack); + names = stackPopINT(pVM->pStack); + namep = (char*)stackPopPtr(pVM->pStack); + values = stackPopINT(pVM->pStack); + valuep = (char*)stackPopPtr(pVM->pStack); + +#ifndef TESTMAIN + guid = (char*)ficlMalloc(guids); + if (guid != NULL) + vmThrowErr(pVM, "Error: out of memory"); + memcpy(guid, guidp, guids); + uuid_from_string(guid, &u, &ustatus); + if (ustatus != uuid_s_ok) { + stackPushINT(pVM->pStack, -1); + goto out; + } + + name = (CHAR16 *)ficlMalloc((names + 1) * sizeof(CHAR16)); + if (name == NULL) + vmThrowErr(pVM, "Error: out of memory"); + for (i = 0; i < names; i++) + name[i] = namep[i]; + name[names] = (CHAR16)0; + + value = (char*)ficlMalloc(values + 1); + if (value != NULL) + vmThrowErr(pVM, "Error: out of memory"); + memcpy(value, valuep, values); + + status = efi_set_variable(name, (EFI_GUID *)&u, attr, values, value); + if (status == EFI_SUCCESS) + stackPushINT(pVM->pStack, 0); + else + stackPushINT(pVM->pStack, -1); +out: + ficlFree(name); + ficlFree(value); + ficlFree(guid); +#endif + + return; +} + +void +ficlEfiGetenv(FICL_VM *pVM) +{ +#ifndef TESTMAIN + char *name, *value; +#endif + char *namep; + int names; + +#if FICL_ROBUST > 1 + vmCheckStack(pVM, 2, 2); +#endif + names = stackPopINT(pVM->pStack); + namep = (char*) stackPopPtr(pVM->pStack); + +#ifndef TESTMAIN + name = (char*) ficlMalloc(names+1); + if (!name) + vmThrowErr(pVM, "Error: out of memory"); + strncpy(name, namep, names); + name[names] = '\0'; + + value = getenv(name); + ficlFree(name); + + if(value != NULL) { + stackPushPtr(pVM->pStack, value); + stackPushINT(pVM->pStack, strlen(value)); + } else +#endif + stackPushINT(pVM->pStack, -1); + + return; +} + +void +ficlEfiUnsetenv(FICL_VM *pVM) +{ +#ifndef TESTMAIN + char *name; +#endif + char *namep; + int names; + +#if FICL_ROBUST > 1 + vmCheckStack(pVM, 2, 0); +#endif + names = stackPopINT(pVM->pStack); + namep = (char*) stackPopPtr(pVM->pStack); + +#ifndef TESTMAIN + name = (char*) ficlMalloc(names+1); + if (!name) + vmThrowErr(pVM, "Error: out of memory"); + strncpy(name, namep, names); + name[names] = '\0'; + + unsetenv(name); + ficlFree(name); +#endif + + return; +} + +/************************************************************************** +** Add FreeBSD UEFI platform extensions into the system dictionary +**************************************************************************/ +void ficlEfiCompilePlatform(FICL_SYSTEM *pSys) +{ + FICL_DICT *dp = pSys->dp; + assert (dp); + + dictAppendWord(dp, "efi-setenv", ficlEfiSetenv, FW_DEFAULT); + dictAppendWord(dp, "efi-getenv", ficlEfiGetenv, FW_DEFAULT); + dictAppendWord(dp, "efi-unsetenv", ficlEfiUnsetenv, FW_DEFAULT); + + /* Would like to export the EFI version, but this will do for now */ + ficlSetEnv(pSys, "efi-boot", 1); + + return; +} + +FICL_COMPILE_SET(ficlEfiCompilePlatform); Modified: user/alc/PQ_LAUNDRY/sys/boot/efi/loader/main.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/boot/efi/loader/main.c Tue Oct 25 03:26:00 2016 (r307895) +++ user/alc/PQ_LAUNDRY/sys/boot/efi/loader/main.c Tue Oct 25 03:34:24 2016 (r307896) @@ -55,6 +55,10 @@ extern char bootprog_rev[]; extern char bootprog_date[]; extern char bootprog_maker[]; +/* Force a reference to bring in EFI support from the library */ +extern int efi_variable_support; +int *dummy1 = &efi_variable_support; + struct arch_switch archsw; /* MI/MD interface boundary */ EFI_GUID acpi = ACPI_TABLE_GUID; @@ -906,8 +910,8 @@ command_efi_show(int argc, char *argv[]) return (rv); } - if (argc != 0) { - printf("Too many args\n"); + if (argc > 0) { + printf("Too many args %d\n", argc); pager_close(); return (CMD_ERROR); } Modified: user/alc/PQ_LAUNDRY/sys/boot/fdt/dts/arm/olimex-a20-som-evb.dts ============================================================================== --- user/alc/PQ_LAUNDRY/sys/boot/fdt/dts/arm/olimex-a20-som-evb.dts Tue Oct 25 03:26:00 2016 (r307895) +++ user/alc/PQ_LAUNDRY/sys/boot/fdt/dts/arm/olimex-a20-som-evb.dts Tue Oct 25 03:34:24 2016 (r307896) @@ -41,3 +41,7 @@ }; }; }; + +&cpu0 { + cpu-supply = <®_dcdc2>; +}; Modified: user/alc/PQ_LAUNDRY/sys/boot/ficl/loader.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/boot/ficl/loader.c Tue Oct 25 03:26:00 2016 (r307895) +++ user/alc/PQ_LAUNDRY/sys/boot/ficl/loader.c Tue Oct 25 03:34:24 2016 (r307896) @@ -824,9 +824,8 @@ void ficlCompilePlatform(FICL_SYSTEM *pS dictAppendWord(dp, "uuid-from-string", ficlUuidFromString, FW_DEFAULT); dictAppendWord(dp, "uuid-to-string", ficlUuidToString, FW_DEFAULT); - SET_FOREACH(fnpp, Xficl_compile_set) { + SET_FOREACH(fnpp, Xficl_compile_set) (*fnpp)(pSys); - } #if defined(PC98) ficlSetEnv(pSys, "arch-pc98", FICL_TRUE); Modified: user/alc/PQ_LAUNDRY/sys/boot/forth/Makefile.inc ============================================================================== --- user/alc/PQ_LAUNDRY/sys/boot/forth/Makefile.inc Tue Oct 25 03:26:00 2016 (r307895) +++ user/alc/PQ_LAUNDRY/sys/boot/forth/Makefile.inc Tue Oct 25 03:34:24 2016 (r307896) @@ -6,6 +6,7 @@ FILES+= brand-fbsd.4th FILES+= check-password.4th FILES+= color.4th FILES+= delay.4th +FILES+= efi.4th FILES+= frames.4th FILES+= loader.4th FILES+= loader.conf Copied: user/alc/PQ_LAUNDRY/sys/boot/forth/efi.4th (from r307894, head/sys/boot/forth/efi.4th) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/alc/PQ_LAUNDRY/sys/boot/forth/efi.4th Tue Oct 25 03:34:24 2016 (r307896, copy of r307894, head/sys/boot/forth/efi.4th) @@ -0,0 +1,30 @@ +\ Copyright (c) 2016 Netflix, Inc +\ 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$ + +only forth definitions + +\ Place holder for more functions +.( EFI boot environment) cr Modified: user/alc/PQ_LAUNDRY/sys/boot/forth/loader.4th ============================================================================== --- user/alc/PQ_LAUNDRY/sys/boot/forth/loader.4th Tue Oct 25 03:26:00 2016 (r307895) +++ user/alc/PQ_LAUNDRY/sys/boot/forth/loader.4th Tue Oct 25 03:34:24 2016 (r307896) @@ -46,6 +46,9 @@ include /boot/support.4th include /boot/color.4th include /boot/delay.4th include /boot/check-password.4th +s" efi-boot" environment? [if] [if] + include /boot/efi.4th +[then] [then] only forth definitions Modified: user/alc/PQ_LAUNDRY/sys/contrib/rdma/krping/krping.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/contrib/rdma/krping/krping.c Tue Oct 25 03:26:00 2016 (r307895) +++ user/alc/PQ_LAUNDRY/sys/contrib/rdma/krping/krping.c Tue Oct 25 03:34:24 2016 (r307896) @@ -548,11 +548,11 @@ static int krping_setup_buffers(struct k DEBUG_LOG(cb, "krping_setup_buffers called on cb %p\n", cb); - cb->recv_dma_addr = dma_map_single(cb->pd->device->dma_device, + cb->recv_dma_addr = ib_dma_map_single(cb->pd->device, &cb->recv_buf, sizeof(cb->recv_buf), DMA_BIDIRECTIONAL); pci_unmap_addr_set(cb, recv_mapping, cb->recv_dma_addr); - cb->send_dma_addr = dma_map_single(cb->pd->device->dma_device, + cb->send_dma_addr = ib_dma_map_single(cb->pd->device, &cb->send_buf, sizeof(cb->send_buf), DMA_BIDIRECTIONAL); pci_unmap_addr_set(cb, send_mapping, cb->send_dma_addr); @@ -606,7 +606,7 @@ static int krping_setup_buffers(struct k goto bail; } - cb->rdma_dma_addr = dma_map_single(cb->pd->device->dma_device, + cb->rdma_dma_addr = ib_dma_map_single(cb->pd->device, cb->rdma_buf, cb->size, DMA_BIDIRECTIONAL); pci_unmap_addr_set(cb, rdma_mapping, cb->rdma_dma_addr); @@ -676,7 +676,7 @@ static int krping_setup_buffers(struct k goto bail; } - cb->start_dma_addr = dma_map_single(cb->pd->device->dma_device, + cb->start_dma_addr = ib_dma_map_single(cb->pd->device, cb->start_buf, cb->size, DMA_BIDIRECTIONAL); pci_unmap_addr_set(cb, start_mapping, cb->start_dma_addr); @@ -1707,7 +1707,7 @@ static void krping_fr_test5(struct krpin goto err2; } DEBUG_LOG(cb, "%s buf[%u] %p\n", __func__, scnt, buf[scnt]); - dma_addr[scnt] = dma_map_single(cb->pd->device->dma_device, + dma_addr[scnt] = ib_dma_map_single(cb->pd->device, buf[scnt], cb->size, DMA_BIDIRECTIONAL); if (dma_mapping_error(cb->pd->device->dma_device, @@ -2032,7 +2032,7 @@ static void krping_fr_test6(struct krpin goto err2; } DEBUG_LOG(cb, "%s buf[%u] %p\n", __func__, scnt, buf[scnt]); - dma_addr[scnt] = dma_map_single(cb->pd->device->dma_device, + dma_addr[scnt] = ib_dma_map_single(cb->pd->device, buf[scnt], cb->size, DMA_BIDIRECTIONAL); if (dma_mapping_error(cb->pd->device->dma_device, Modified: user/alc/PQ_LAUNDRY/sys/dev/cxgbe/t4_sge.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/dev/cxgbe/t4_sge.c Tue Oct 25 03:26:00 2016 (r307895) +++ user/alc/PQ_LAUNDRY/sys/dev/cxgbe/t4_sge.c Tue Oct 25 03:34:24 2016 (r307896) @@ -2110,24 +2110,6 @@ m_advance(struct mbuf **pm, int *poffset return ((void *)p); } -static inline int -same_paddr(char *a, char *b) -{ - - if (a == b) - return (1); - else if (a != NULL && b != NULL) { - vm_offset_t x = (vm_offset_t)a; - vm_offset_t y = (vm_offset_t)b; - - if ((x & PAGE_MASK) == (y & PAGE_MASK) && - pmap_kextract(x) == pmap_kextract(y)) - return (1); - } - - return (0); -} - /* * Can deal with empty mbufs in the chain that have m_len = 0, but the chain * must have at least one mbuf that's not empty. @@ -2135,24 +2117,25 @@ same_paddr(char *a, char *b) static inline int count_mbuf_nsegs(struct mbuf *m) { - char *prev_end, *start; + vm_paddr_t lastb, next; + vm_offset_t va; int len, nsegs; MPASS(m != NULL); nsegs = 0; - prev_end = NULL; + lastb = 0; for (; m; m = m->m_next) { len = m->m_len; if (__predict_false(len == 0)) continue; - start = mtod(m, char *); - - nsegs += sglist_count(start, len); - if (same_paddr(prev_end, start)) + va = mtod(m, vm_offset_t); + next = pmap_kextract(va); + nsegs += sglist_count(m->m_data, len); + if (lastb + 1 == next) nsegs--; - prev_end = start + len; + lastb = pmap_kextract(va + len - 1); } MPASS(nsegs > 0); Modified: user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Tue Oct 25 03:26:00 2016 (r307895) +++ user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Tue Oct 25 03:34:24 2016 (r307896) @@ -789,6 +789,7 @@ netvsc_attach(device_t dev) * Setup the ifnet for this interface. */ + ifp->if_baudrate = IF_Gbps(10); ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; ifp->if_ioctl = hn_ioctl; ifp->if_init = hn_init; Modified: user/alc/PQ_LAUNDRY/sys/i386/i386/trap.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/i386/i386/trap.c Tue Oct 25 03:26:00 2016 (r307895) +++ user/alc/PQ_LAUNDRY/sys/i386/i386/trap.c Tue Oct 25 03:34:24 2016 (r307896) @@ -158,14 +158,6 @@ static char *trap_msg[] = { int has_f00f_bug = 0; /* Initialized so that it can be patched. */ #endif -#ifdef KDB -static int kdb_on_nmi = 1; -SYSCTL_INT(_machdep, OID_AUTO, kdb_on_nmi, CTLFLAG_RWTUN, - &kdb_on_nmi, 0, "Go to KDB on NMI"); -#endif -static int panic_on_nmi = 1; -SYSCTL_INT(_machdep, OID_AUTO, panic_on_nmi, CTLFLAG_RWTUN, - &panic_on_nmi, 0, "Panic on NMI"); static int prot_fault_translation = 0; SYSCTL_INT(_machdep, OID_AUTO, prot_fault_translation, CTLFLAG_RW, &prot_fault_translation, 0, "Select signal to deliver on protection fault"); @@ -467,7 +459,7 @@ user_trctrap_out: } goto userout; #else /* !POWERFAIL_NMI */ - nmi_handle_intr(type, frame, true); + nmi_handle_intr(type, frame); break; #endif /* POWERFAIL_NMI */ #endif /* DEV_ISA */ @@ -716,10 +708,8 @@ kernel_trctrap: } goto out; #else /* !POWERFAIL_NMI */ - if (nmi_handle_intr(type, frame, false) || - !panic_on_nmi) - goto out; - /* FALLTHROUGH */ + nmi_handle_intr(type, frame); + goto out; #endif /* POWERFAIL_NMI */ #endif /* DEV_ISA */ } Modified: user/alc/PQ_LAUNDRY/sys/kern/subr_prf.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/kern/subr_prf.c Tue Oct 25 03:26:00 2016 (r307895) +++ user/alc/PQ_LAUNDRY/sys/kern/subr_prf.c Tue Oct 25 03:34:24 2016 (r307896) @@ -72,7 +72,11 @@ __FBSDID("$FreeBSD$"); * Note that stdarg.h and the ANSI style va_start macro is used for both * ANSI and traditional C compilers. */ +#ifdef _KERNEL #include +#else +#include +#endif #ifdef _KERNEL Modified: user/alc/PQ_LAUNDRY/sys/netinet/ip_output.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/netinet/ip_output.c Tue Oct 25 03:26:00 2016 (r307895) +++ user/alc/PQ_LAUNDRY/sys/netinet/ip_output.c Tue Oct 25 03:34:24 2016 (r307896) @@ -350,7 +350,8 @@ again: have_ia_ref = 1; ifp = ia->ia_ifp; ip->ip_ttl = 1; - isbroadcast = in_ifaddr_broadcast(dst->sin_addr, ia); + isbroadcast = ifp->if_flags & IFF_BROADCAST ? + in_ifaddr_broadcast(dst->sin_addr, ia) : 0; } else if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr)) && imo != NULL && imo->imo_multicast_ifp != NULL) { /* @@ -403,8 +404,10 @@ again: gw = (struct sockaddr_in *)rte->rt_gateway; if (rte->rt_flags & RTF_HOST) isbroadcast = (rte->rt_flags & RTF_BROADCAST); - else + else if (ifp->if_flags & IFF_BROADCAST) isbroadcast = in_ifaddr_broadcast(gw->sin_addr, ia); + else + isbroadcast = 0; } /* Modified: user/alc/PQ_LAUNDRY/sys/ufs/ffs/ffs_tables.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/ufs/ffs/ffs_tables.c Tue Oct 25 03:26:00 2016 (r307895) +++ user/alc/PQ_LAUNDRY/sys/ufs/ffs/ffs_tables.c Tue Oct 25 03:34:24 2016 (r307896) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include Modified: user/alc/PQ_LAUNDRY/sys/x86/include/x86_var.h ============================================================================== --- user/alc/PQ_LAUNDRY/sys/x86/include/x86_var.h Tue Oct 25 03:26:00 2016 (r307895) +++ user/alc/PQ_LAUNDRY/sys/x86/include/x86_var.h Tue Oct 25 03:34:24 2016 (r307896) @@ -108,10 +108,9 @@ bool fix_cpuid(void); void fillw(int /*u_short*/ pat, void *base, size_t cnt); int is_physical_memory(vm_paddr_t addr); int isa_nmi(int cd); -bool nmi_call_kdb(u_int cpu, u_int type, struct trapframe *frame, - bool panic); -bool nmi_call_kdb_smp(u_int type, struct trapframe *frame, bool panic); -int nmi_handle_intr(u_int type, struct trapframe *frame, bool panic); +void nmi_call_kdb(u_int cpu, u_int type, struct trapframe *frame); +void nmi_call_kdb_smp(u_int type, struct trapframe *frame); +void nmi_handle_intr(u_int type, struct trapframe *frame); void pagecopy(void *from, void *to); void printcpuinfo(void); int user_dbreg_trap(void); Modified: user/alc/PQ_LAUNDRY/sys/x86/x86/cpu_machdep.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/x86/x86/cpu_machdep.c Tue Oct 25 03:26:00 2016 (r307895) +++ user/alc/PQ_LAUNDRY/sys/x86/x86/cpu_machdep.c Tue Oct 25 03:34:24 2016 (r307896) @@ -524,6 +524,10 @@ idle_sysctl(SYSCTL_HANDLER_ARGS) SYSCTL_PROC(_machdep, OID_AUTO, idle, CTLTYPE_STRING | CTLFLAG_RW, 0, 0, idle_sysctl, "A", "currently selected idle function"); +static int panic_on_nmi = 1; +SYSCTL_INT(_machdep, OID_AUTO, panic_on_nmi, CTLFLAG_RWTUN, + &panic_on_nmi, 0, + "Panic on NMI"); int nmi_is_broadcast = 1; SYSCTL_INT(_machdep, OID_AUTO, nmi_is_broadcast, CTLFLAG_RWTUN, &nmi_is_broadcast, 0, @@ -536,8 +540,8 @@ SYSCTL_INT(_machdep, OID_AUTO, kdb_on_nm #endif #ifdef DEV_ISA -bool -nmi_call_kdb(u_int cpu, u_int type, struct trapframe *frame, bool do_panic) +void +nmi_call_kdb(u_int cpu, u_int type, struct trapframe *frame) { /* machine/parity/power fail/"kitchen sink" faults */ @@ -549,26 +553,25 @@ nmi_call_kdb(u_int cpu, u_int type, stru if (kdb_on_nmi) { printf ("NMI/cpu%d ... going to debugger\n", cpu); kdb_trap(type, 0, frame); - return (true); } - } else #endif /* KDB */ - if (do_panic) + } else if (panic_on_nmi) { panic("NMI indicates hardware failure"); - return (false); + } } #endif -int -nmi_handle_intr(u_int type, struct trapframe *frame, bool panic) +void +nmi_handle_intr(u_int type, struct trapframe *frame) { #ifdef DEV_ISA #ifdef SMP - if (nmi_is_broadcast) - return (nmi_call_kdb_smp(type, frame, panic)); - else + if (nmi_is_broadcast) { + nmi_call_kdb_smp(type, frame); + return; + } #endif - return (nmi_call_kdb(0, type, frame, panic)); + nmi_call_kdb(0, type, frame); #endif } Modified: user/alc/PQ_LAUNDRY/sys/x86/x86/mp_x86.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/x86/x86/mp_x86.c Tue Oct 25 03:26:00 2016 (r307895) +++ user/alc/PQ_LAUNDRY/sys/x86/x86/mp_x86.c Tue Oct 25 03:34:24 2016 (r307896) @@ -1216,18 +1216,17 @@ ipi_nmi_handler(void) #ifdef DEV_ISA int nmi_kdb_lock; -bool -nmi_call_kdb_smp(u_int type, struct trapframe *frame, bool do_panic) +void +nmi_call_kdb_smp(u_int type, struct trapframe *frame) { int cpu; - bool call_post, ret; + bool call_post; cpu = PCPU_GET(cpuid); if (atomic_cmpset_acq_int(&nmi_kdb_lock, 0, 1)) { - ret = nmi_call_kdb(cpu, type, frame, do_panic); + nmi_call_kdb(cpu, type, frame); call_post = false; } else { - ret = true; savectx(&stoppcbs[cpu]); CPU_SET_ATOMIC(cpu, &stopped_cpus); while (!atomic_cmpset_acq_int(&nmi_kdb_lock, 0, 1)) @@ -1237,7 +1236,6 @@ nmi_call_kdb_smp(u_int type, struct trap atomic_store_rel_int(&nmi_kdb_lock, 0); if (call_post) cpustop_handler_post(cpu); - return (ret); } #endif @@ -1351,7 +1349,7 @@ invlcache_handler(void) * Reading the generation here allows greater parallelism * since wbinvd is a serializing instruction. Without the * temporary, we'd wait for wbinvd to complete, then the read - * would execute, then the dependent write, whuch must then + * would execute, then the dependent write, which must then * complete before return from interrupt. */ generation = smp_tlb_generation; Modified: user/alc/PQ_LAUNDRY/usr.sbin/mountd/mountd.8 ============================================================================== --- user/alc/PQ_LAUNDRY/usr.sbin/mountd/mountd.8 Tue Oct 25 03:26:00 2016 (r307895) +++ user/alc/PQ_LAUNDRY/usr.sbin/mountd/mountd.8 Tue Oct 25 03:34:24 2016 (r307896) @@ -28,7 +28,7 @@ .\" @(#)mountd.8 8.4 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd October 14, 2012 +.Dd October 24, 2016 .Dt MOUNTD 8 .Os *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@freebsd.org Tue Oct 25 04:14:05 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 07886C20E80 for ; Tue, 25 Oct 2016 04:14:05 +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 mx1.freebsd.org (Postfix) with ESMTPS id C65DB381; Tue, 25 Oct 2016 04:14:04 +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 u9P4E3lT077767; Tue, 25 Oct 2016 04:14:03 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9P4E3Ia077766; Tue, 25 Oct 2016 04:14:03 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201610250414.u9P4E3Ia077766@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Tue, 25 Oct 2016 04:14:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r307898 - user/alc/PQ_LAUNDRY/sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2016 04:14:05 -0000 Author: alc Date: Tue Oct 25 04:14:03 2016 New Revision: 307898 URL: https://svnweb.freebsd.org/changeset/base/307898 Log: Revise the description of v_laundry_count. Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_meter.c Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_meter.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/vm/vm_meter.c Tue Oct 25 03:55:56 2016 (r307897) +++ user/alc/PQ_LAUNDRY/sys/vm/vm_meter.c Tue Oct 25 04:14:03 2016 (r307898) @@ -304,7 +304,7 @@ VM_STATS_VM(v_wire_count, "Wired pages") VM_STATS_VM(v_active_count, "Active pages"); VM_STATS_VM(v_inactive_target, "Desired inactive pages"); VM_STATS_VM(v_inactive_count, "Inactive pages"); -VM_STATS_VM(v_laundry_count, "Dirty pages"); +VM_STATS_VM(v_laundry_count, "Pages eligible for laundering"); VM_STATS_VM(v_cache_count, "Pages on cache queue"); VM_STATS_VM(v_pageout_free_min, "Min pages reserved for kernel"); VM_STATS_VM(v_interrupt_free_min, "Reserved pages for interrupt code"); From owner-svn-src-user@freebsd.org Tue Oct 25 18:17:04 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC4C5C20B7F for ; Tue, 25 Oct 2016 18:17:04 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F545AED; Tue, 25 Oct 2016 18:17:04 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9PIH3v7099936; Tue, 25 Oct 2016 18:17:03 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9PIH3SX099931; Tue, 25 Oct 2016 18:17:03 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201610251817.u9PIH3SX099931@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 25 Oct 2016 18:17:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r307945 - in user/cperciva/freebsd-update-build/patches: 10.1-RELEASE 10.2-RELEASE 11.0-RELEASE 9.3-RELEASE X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2016 18:17:04 -0000 Author: glebius Date: Tue Oct 25 18:17:03 2016 New Revision: 307945 URL: https://svnweb.freebsd.org/changeset/base/307945 Log: SA-16:15 and SA-16:32. Added: user/cperciva/freebsd-update-build/patches/10.1-RELEASE/41-SA-16:15.sysarch user/cperciva/freebsd-update-build/patches/10.2-RELEASE/24-SA-16:15.sysarch user/cperciva/freebsd-update-build/patches/11.0-RELEASE/2-SA-16:15.sysarch user/cperciva/freebsd-update-build/patches/11.0-RELEASE/2-SA-16:32.bhyve user/cperciva/freebsd-update-build/patches/9.3-RELEASE/49-SA-16:15.sysarch Added: user/cperciva/freebsd-update-build/patches/10.1-RELEASE/41-SA-16:15.sysarch ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/cperciva/freebsd-update-build/patches/10.1-RELEASE/41-SA-16:15.sysarch Tue Oct 25 18:17:03 2016 (r307945) @@ -0,0 +1,21 @@ +--- sys/amd64/amd64/sys_machdep.c.orig ++++ sys/amd64/amd64/sys_machdep.c +@@ -608,6 +608,8 @@ + largest_ld = uap->start + uap->num; + if (largest_ld > max_ldt_segment) + largest_ld = max_ldt_segment; ++ if (largest_ld < uap->start) ++ return (EINVAL); + i = largest_ld - uap->start; + mtx_lock(&dt_lock); + bzero(&((struct user_segment_descriptor *)(pldt->ldt_base)) +@@ -620,7 +622,8 @@ + /* verify range of descriptors to modify */ + largest_ld = uap->start + uap->num; + if (uap->start >= max_ldt_segment || +- largest_ld > max_ldt_segment) ++ largest_ld > max_ldt_segment || ++ largest_ld < uap->start) + return (EINVAL); + } + Added: user/cperciva/freebsd-update-build/patches/10.2-RELEASE/24-SA-16:15.sysarch ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/cperciva/freebsd-update-build/patches/10.2-RELEASE/24-SA-16:15.sysarch Tue Oct 25 18:17:03 2016 (r307945) @@ -0,0 +1,21 @@ +--- sys/amd64/amd64/sys_machdep.c.orig ++++ sys/amd64/amd64/sys_machdep.c +@@ -608,6 +608,8 @@ + largest_ld = uap->start + uap->num; + if (largest_ld > max_ldt_segment) + largest_ld = max_ldt_segment; ++ if (largest_ld < uap->start) ++ return (EINVAL); + i = largest_ld - uap->start; + mtx_lock(&dt_lock); + bzero(&((struct user_segment_descriptor *)(pldt->ldt_base)) +@@ -620,7 +622,8 @@ + /* verify range of descriptors to modify */ + largest_ld = uap->start + uap->num; + if (uap->start >= max_ldt_segment || +- largest_ld > max_ldt_segment) ++ largest_ld > max_ldt_segment || ++ largest_ld < uap->start) + return (EINVAL); + } + Added: user/cperciva/freebsd-update-build/patches/11.0-RELEASE/2-SA-16:15.sysarch ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/cperciva/freebsd-update-build/patches/11.0-RELEASE/2-SA-16:15.sysarch Tue Oct 25 18:17:03 2016 (r307945) @@ -0,0 +1,21 @@ +--- sys/amd64/amd64/sys_machdep.c.orig ++++ sys/amd64/amd64/sys_machdep.c +@@ -608,6 +608,8 @@ + largest_ld = uap->start + uap->num; + if (largest_ld > max_ldt_segment) + largest_ld = max_ldt_segment; ++ if (largest_ld < uap->start) ++ return (EINVAL); + i = largest_ld - uap->start; + mtx_lock(&dt_lock); + bzero(&((struct user_segment_descriptor *)(pldt->ldt_base)) +@@ -620,7 +622,8 @@ + /* verify range of descriptors to modify */ + largest_ld = uap->start + uap->num; + if (uap->start >= max_ldt_segment || +- largest_ld > max_ldt_segment) ++ largest_ld > max_ldt_segment || ++ largest_ld < uap->start) + return (EINVAL); + } + Added: user/cperciva/freebsd-update-build/patches/11.0-RELEASE/2-SA-16:32.bhyve ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/cperciva/freebsd-update-build/patches/11.0-RELEASE/2-SA-16:32.bhyve Tue Oct 25 18:17:03 2016 (r307945) @@ -0,0 +1,17 @@ +--- usr.sbin/bhyve/vga.c.orig ++++ usr.sbin/bhyve/vga.c +@@ -161,10 +161,10 @@ + */ + struct { + uint8_t dac_state; +- int dac_rd_index; +- int dac_rd_subindex; +- int dac_wr_index; +- int dac_wr_subindex; ++ uint8_t dac_rd_index; ++ uint8_t dac_rd_subindex; ++ uint8_t dac_wr_index; ++ uint8_t dac_wr_subindex; + uint8_t dac_palette[3 * 256]; + uint32_t dac_palette_rgb[256]; + } vga_dac; Added: user/cperciva/freebsd-update-build/patches/9.3-RELEASE/49-SA-16:15.sysarch ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/cperciva/freebsd-update-build/patches/9.3-RELEASE/49-SA-16:15.sysarch Tue Oct 25 18:17:03 2016 (r307945) @@ -0,0 +1,21 @@ +--- sys/amd64/amd64/sys_machdep.c.orig ++++ sys/amd64/amd64/sys_machdep.c +@@ -608,6 +608,8 @@ + largest_ld = uap->start + uap->num; + if (largest_ld > max_ldt_segment) + largest_ld = max_ldt_segment; ++ if (largest_ld < uap->start) ++ return (EINVAL); + i = largest_ld - uap->start; + mtx_lock(&dt_lock); + bzero(&((struct user_segment_descriptor *)(pldt->ldt_base)) +@@ -620,7 +622,8 @@ + /* verify range of descriptors to modify */ + largest_ld = uap->start + uap->num; + if (uap->start >= max_ldt_segment || +- largest_ld > max_ldt_segment) ++ largest_ld > max_ldt_segment || ++ largest_ld < uap->start) + return (EINVAL); + } + From owner-svn-src-user@freebsd.org Thu Oct 27 00:08:03 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DCAFC22013 for ; Thu, 27 Oct 2016 00:08:03 +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 mx1.freebsd.org (Postfix) with ESMTPS id 2DCACD0A; Thu, 27 Oct 2016 00:08:03 +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 u9R082tU088370; Thu, 27 Oct 2016 00:08:02 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9R082KT088369; Thu, 27 Oct 2016 00:08:02 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201610270008.u9R082KT088369@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 27 Oct 2016 00:08:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r307980 - user/alc/PQ_LAUNDRY/sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Oct 2016 00:08:03 -0000 Author: markj Date: Thu Oct 27 00:08:02 2016 New Revision: 307980 URL: https://svnweb.freebsd.org/changeset/base/307980 Log: Use a defined constant for the pagedaemon's sleep interval. Reviewed by: alc Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Wed Oct 26 23:40:07 2016 (r307979) +++ user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Thu Oct 27 00:08:02 2016 (r307980) @@ -154,11 +154,9 @@ static struct kproc_desc vm_kp = { SYSINIT(vmdaemon, SI_SUB_KTHREAD_VM, SI_ORDER_FIRST, kproc_start, &vm_kp); #endif -/* Sleep intervals for pagedaemon threads, in subdivisions of one second. */ -#define VM_LAUNDER_INTERVAL 10 -#define VM_INACT_SCAN_INTERVAL 2 - -#define VM_LAUNDER_RATE (VM_LAUNDER_INTERVAL / VM_INACT_SCAN_INTERVAL) +/* Pagedaemon activity rates, in subdivisions of one second. */ +#define VM_LAUNDER_RATE 10 +#define VM_INACT_SCAN_RATE 2 int vm_pageout_deficit; /* Estimated number of pages deficit */ u_int vm_pageout_wakeup_thresh; @@ -1148,7 +1146,7 @@ vm_pageout_laundry_worker(void *arg) */ if (shortfall > 0) { in_shortfall = true; - shortfall_cycle = VM_LAUNDER_RATE; + shortfall_cycle = VM_LAUNDER_RATE / VM_INACT_SCAN_RATE; target = shortfall; } else if (!in_shortfall) goto trybackground; @@ -1210,7 +1208,7 @@ trybackground: target = 0; } launder = vm_background_launder_rate * PAGE_SIZE / 1024; - launder /= VM_LAUNDER_INTERVAL; + launder /= VM_LAUNDER_RATE; if (launder > target) launder = target; } @@ -1224,7 +1222,7 @@ dolaundry: */ target -= min(vm_pageout_launder(domain, launder, in_shortfall), target); - pause("laundp", hz / VM_LAUNDER_INTERVAL); + pause("laundp", hz / VM_LAUNDER_RATE); } /* @@ -1975,7 +1973,7 @@ vm_pageout_worker(void *arg) */ mtx_unlock(&vm_page_queue_free_mtx); if (pass >= 1) - pause("psleep", hz / 2); + pause("psleep", hz / VM_INACT_SCAN_RATE); pass++; } else { /* From owner-svn-src-user@freebsd.org Thu Oct 27 00:33:18 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 527A2C22501 for ; Thu, 27 Oct 2016 00:33: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 mx1.freebsd.org (Postfix) with ESMTPS id 1E361B97; Thu, 27 Oct 2016 00:33: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 u9R0XH5V099847; Thu, 27 Oct 2016 00:33:17 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9R0XF7x099822; Thu, 27 Oct 2016 00:33:15 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201610270033.u9R0XF7x099822@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 27 Oct 2016 00:33:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r307981 - in user/alc/PQ_LAUNDRY: contrib/elftoolchain/strings crypto/openssl/crypto crypto/openssl/crypto/aes/asm crypto/openssl/crypto/modes/asm lib/libproc lib/libsysdecode secure/li... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Oct 2016 00:33:18 -0000 Author: markj Date: Thu Oct 27 00:33:14 2016 New Revision: 307981 URL: https://svnweb.freebsd.org/changeset/base/307981 Log: MFH r307980 Added: user/alc/PQ_LAUNDRY/secure/lib/libcrypto/aarch64/ - copied from r307980, head/secure/lib/libcrypto/aarch64/ user/alc/PQ_LAUNDRY/sys/arm64/arm64/memcpy.S - copied unchanged from r307980, head/sys/arm64/arm64/memcpy.S user/alc/PQ_LAUNDRY/sys/arm64/arm64/memmove.S - copied unchanged from r307980, head/sys/arm64/arm64/memmove.S user/alc/PQ_LAUNDRY/sys/boot/Makefile.ficl - copied unchanged from r307980, head/sys/boot/Makefile.ficl user/alc/PQ_LAUNDRY/sys/dev/fdt/fdt_intr.h - copied unchanged from r307980, head/sys/dev/fdt/fdt_intr.h Deleted: user/alc/PQ_LAUNDRY/sys/arm64/arm64/bcopy.c Modified: user/alc/PQ_LAUNDRY/contrib/elftoolchain/strings/strings.c user/alc/PQ_LAUNDRY/crypto/openssl/crypto/aes/asm/aesv8-armx.pl user/alc/PQ_LAUNDRY/crypto/openssl/crypto/arm64cpuid.S user/alc/PQ_LAUNDRY/crypto/openssl/crypto/modes/asm/ghashv8-armx.pl user/alc/PQ_LAUNDRY/lib/libproc/proc_bkpt.c user/alc/PQ_LAUNDRY/lib/libsysdecode/flags.c user/alc/PQ_LAUNDRY/secure/lib/libcrypto/Makefile user/alc/PQ_LAUNDRY/secure/lib/libcrypto/Makefile.asm user/alc/PQ_LAUNDRY/secure/lib/libcrypto/Makefile.inc user/alc/PQ_LAUNDRY/sys/amd64/amd64/sys_machdep.c user/alc/PQ_LAUNDRY/sys/amd64/vmm/amd/svm.c user/alc/PQ_LAUNDRY/sys/arm/allwinner/aw_nmi.c user/alc/PQ_LAUNDRY/sys/arm/allwinner/clk/aw_pll.c user/alc/PQ_LAUNDRY/sys/arm/arm/cpufunc_asm_arm11x6.S user/alc/PQ_LAUNDRY/sys/arm/arm/cpufunc_asm_armv7.S user/alc/PQ_LAUNDRY/sys/arm/arm/gic.c user/alc/PQ_LAUNDRY/sys/arm/include/cpu-v6.h user/alc/PQ_LAUNDRY/sys/arm/include/cpufunc.h user/alc/PQ_LAUNDRY/sys/arm/include/platformvar.h user/alc/PQ_LAUNDRY/sys/arm/ti/am335x/am335x_dmtimer.c user/alc/PQ_LAUNDRY/sys/arm/ti/ti_machdep.c user/alc/PQ_LAUNDRY/sys/arm64/arm64/gic_v3.c user/alc/PQ_LAUNDRY/sys/arm64/arm64/mp_machdep.c user/alc/PQ_LAUNDRY/sys/arm64/arm64/trap.c user/alc/PQ_LAUNDRY/sys/boot/common/Makefile.inc user/alc/PQ_LAUNDRY/sys/boot/common/pnp.c user/alc/PQ_LAUNDRY/sys/boot/efi/libefi/Makefile user/alc/PQ_LAUNDRY/sys/boot/efi/libefi/env.c user/alc/PQ_LAUNDRY/sys/boot/efi/loader/main.c user/alc/PQ_LAUNDRY/sys/boot/ficl/Makefile user/alc/PQ_LAUNDRY/sys/boot/ficl32/Makefile user/alc/PQ_LAUNDRY/sys/boot/i386/Makefile.inc user/alc/PQ_LAUNDRY/sys/boot/i386/gptboot/Makefile user/alc/PQ_LAUNDRY/sys/boot/i386/gptzfsboot/Makefile user/alc/PQ_LAUNDRY/sys/boot/i386/libi386/biospci.c user/alc/PQ_LAUNDRY/sys/boot/i386/loader/Makefile user/alc/PQ_LAUNDRY/sys/conf/files.arm64 user/alc/PQ_LAUNDRY/sys/dev/bfe/if_bfe.c user/alc/PQ_LAUNDRY/sys/dev/bxe/bxe.c user/alc/PQ_LAUNDRY/sys/dev/gpio/gpiobusvar.h user/alc/PQ_LAUNDRY/sys/dev/gpio/ofw_gpiobus.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/vmbus/vmbus.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/vmbus/vmbus_chan.c user/alc/PQ_LAUNDRY/sys/dev/psci/psci.c user/alc/PQ_LAUNDRY/sys/dev/psci/psci.h user/alc/PQ_LAUNDRY/sys/dev/usb/net/uhso.c user/alc/PQ_LAUNDRY/sys/dev/usb/usb_device.c user/alc/PQ_LAUNDRY/sys/i386/i386/initcpu.c user/alc/PQ_LAUNDRY/sys/mips/include/signal.h user/alc/PQ_LAUNDRY/sys/net/if_bridge.c user/alc/PQ_LAUNDRY/sys/netinet/cc/cc_cdg.c user/alc/PQ_LAUNDRY/sys/netinet/cc/cc_chd.c user/alc/PQ_LAUNDRY/sys/netinet/cc/cc_cubic.c user/alc/PQ_LAUNDRY/sys/netinet/cc/cc_dctcp.c user/alc/PQ_LAUNDRY/sys/netinet/cc/cc_htcp.c user/alc/PQ_LAUNDRY/sys/netinet/cc/cc_newreno.c user/alc/PQ_LAUNDRY/sys/netinet/tcp_input.c user/alc/PQ_LAUNDRY/sys/netinet/tcp_stacks/fastpath.c user/alc/PQ_LAUNDRY/sys/netinet/tcp_syncache.c user/alc/PQ_LAUNDRY/sys/ufs/ufs/ufs_vnops.c user/alc/PQ_LAUNDRY/tests/sys/geom/class/uzip/Makefile user/alc/PQ_LAUNDRY/usr.sbin/bhyve/dbgport.c user/alc/PQ_LAUNDRY/usr.sbin/bhyve/vga.c (contents, props changed) user/alc/PQ_LAUNDRY/usr.sbin/config/Makefile user/alc/PQ_LAUNDRY/usr.sbin/makefs/Makefile user/alc/PQ_LAUNDRY/usr.sbin/makefs/cd9660.c user/alc/PQ_LAUNDRY/usr.sbin/makefs/cd9660/Makefile.inc user/alc/PQ_LAUNDRY/usr.sbin/makefs/cd9660/cd9660_archimedes.c user/alc/PQ_LAUNDRY/usr.sbin/makefs/cd9660/iso9660_rrip.c user/alc/PQ_LAUNDRY/usr.sbin/makefs/ffs/Makefile.inc user/alc/PQ_LAUNDRY/usr.sbin/makefs/ffs/ffs_bswap.c user/alc/PQ_LAUNDRY/usr.sbin/makefs/ffs/ffs_subr.c user/alc/PQ_LAUNDRY/usr.sbin/makefs/mtree.c user/alc/PQ_LAUNDRY/usr.sbin/makefs/walk.c Directory Properties: user/alc/PQ_LAUNDRY/ (props changed) user/alc/PQ_LAUNDRY/contrib/elftoolchain/ (props changed) user/alc/PQ_LAUNDRY/crypto/openssl/ (props changed) Modified: user/alc/PQ_LAUNDRY/contrib/elftoolchain/strings/strings.c ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/elftoolchain/strings/strings.c Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/contrib/elftoolchain/strings/strings.c Thu Oct 27 00:33:14 2016 (r307981) @@ -48,12 +48,6 @@ ELFTC_VCSID("$Id: strings.c 3446 2016-05-03 01:31:17Z emaste $"); -enum return_code { - RETURN_OK, - RETURN_NOINPUT, - RETURN_SOFTWARE -}; - enum radix_style { RADIX_DECIMAL, RADIX_HEX, @@ -107,7 +101,7 @@ main(int argc, char **argv) { int ch, rc; - rc = RETURN_OK; + rc = 0; min_len = 0; encoding_size = 1; if (elf_version(EV_CURRENT) == EV_NONE) @@ -197,7 +191,8 @@ main(int argc, char **argv) if (!*argv) rc = handle_file("{standard input}"); else while (*argv) { - rc = handle_file(*argv); + if (handle_file(*argv) != 0) + rc = 1; argv++; } return (rc); @@ -209,11 +204,11 @@ handle_file(const char *name) int fd, rt; if (name == NULL) - return (RETURN_NOINPUT); + return (1); if (strcmp("{standard input}", name) != 0) { if (freopen(name, "rb", stdin) == NULL) { warnx("'%s': %s", name, strerror(errno)); - return (RETURN_NOINPUT); + return (1); } } else { return (find_strings(name, (off_t)0, (off_t)0)); @@ -221,7 +216,7 @@ handle_file(const char *name) fd = fileno(stdin); if (fd < 0) - return (RETURN_NOINPUT); + return (1); rt = handle_elf(name, fd); return (rt); } @@ -239,7 +234,7 @@ handle_binary(const char *name, int fd) (void) lseek(fd, (off_t)0, SEEK_SET); if (!fstat(fd, &buf)) return (find_strings(name, (off_t)0, buf.st_size)); - return (RETURN_SOFTWARE); + return (1); } /* @@ -257,7 +252,7 @@ handle_elf(const char *name, int fd) Elf_Scn *scn; int rc; - rc = RETURN_OK; + rc = 0; /* If entire file is chosen, treat it as a binary file */ if (entire_file) return (handle_binary(name, fd)); @@ -272,7 +267,7 @@ handle_elf(const char *name, int fd) if (gelf_getehdr(elf, &elfhdr) == NULL) { (void) elf_end(elf); warnx("%s: ELF file could not be processed", name); - return (RETURN_SOFTWARE); + return (1); } if (elfhdr.e_shnum == 0 && elfhdr.e_type == ET_CORE) { @@ -352,7 +347,7 @@ find_strings(const char *name, off_t off if ((obuf = (char*)calloc(1, min_len + 1)) == NULL) { (void) fprintf(stderr, "Unable to allocate memory: %s\n", strerror(errno)); - return (RETURN_SOFTWARE); + return (1); } (void) fseeko(stdin, offset, SEEK_SET); @@ -426,7 +421,7 @@ find_strings(const char *name, off_t off } _exit1: free(obuf); - return (RETURN_OK); + return (0); } #define USAGE_MESSAGE "\ Modified: user/alc/PQ_LAUNDRY/crypto/openssl/crypto/aes/asm/aesv8-armx.pl ============================================================================== --- user/alc/PQ_LAUNDRY/crypto/openssl/crypto/aes/asm/aesv8-armx.pl Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/crypto/openssl/crypto/aes/asm/aesv8-armx.pl Thu Oct 27 00:33:14 2016 (r307981) @@ -42,7 +42,7 @@ $code=<<___; #if __ARM_MAX_ARCH__>=7 .text ___ -$code.=".arch armv8-a+crypto\n" if ($flavour =~ /64/); +# $code.=".arch armv8-a+crypto\n" if ($flavour =~ /64/); $code.=".arch armv7-a\n.fpu neon\n.code 32\n" if ($flavour !~ /64/); #^^^^^^ this is done to simplify adoption by not depending # on latest binutils. Modified: user/alc/PQ_LAUNDRY/crypto/openssl/crypto/arm64cpuid.S ============================================================================== --- user/alc/PQ_LAUNDRY/crypto/openssl/crypto/arm64cpuid.S Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/crypto/openssl/crypto/arm64cpuid.S Thu Oct 27 00:33:14 2016 (r307981) @@ -1,7 +1,6 @@ #include "arm_arch.h" .text -.arch armv8-a+crypto .align 5 .global _armv7_neon_probe Modified: user/alc/PQ_LAUNDRY/crypto/openssl/crypto/modes/asm/ghashv8-armx.pl ============================================================================== --- user/alc/PQ_LAUNDRY/crypto/openssl/crypto/modes/asm/ghashv8-armx.pl Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/crypto/openssl/crypto/modes/asm/ghashv8-armx.pl Thu Oct 27 00:33:14 2016 (r307981) @@ -49,7 +49,7 @@ $code=<<___; .text ___ -$code.=".arch armv8-a+crypto\n" if ($flavour =~ /64/); +# $code.=".arch armv8-a+crypto\n" if ($flavour =~ /64/); $code.=".fpu neon\n.code 32\n" if ($flavour !~ /64/); ################################################################################ Modified: user/alc/PQ_LAUNDRY/lib/libproc/proc_bkpt.c ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libproc/proc_bkpt.c Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/lib/libproc/proc_bkpt.c Thu Oct 27 00:33:14 2016 (r307981) @@ -68,6 +68,14 @@ __FBSDID("$FreeBSD$"); #error "Add support for your architecture" #endif +/* + * Use 4-bytes holder for breakpoint instruction on all the platforms. + * Works for x86 as well until it is endian-little platform. + * (We are coping one byte only on x86 from this 4-bytes piece of + * memory). + */ +typedef uint32_t instr_t; + static int proc_stop(struct proc_handle *phdl) { @@ -92,8 +100,9 @@ proc_bkptset(struct proc_handle *phdl, u unsigned long *saved) { struct ptrace_io_desc piod; - unsigned long paddr, caddr; + unsigned long caddr; int ret = 0, stopped; + instr_t instr; *saved = 0; if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || @@ -115,10 +124,10 @@ proc_bkptset(struct proc_handle *phdl, u * Read the original instruction. */ caddr = address; - paddr = 0; + instr = 0; piod.piod_op = PIOD_READ_I; piod.piod_offs = (void *)caddr; - piod.piod_addr = &paddr; + piod.piod_addr = &instr; piod.piod_len = BREAKPOINT_INSTR_SZ; if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) { DPRINTF("ERROR: couldn't read instruction at address 0x%" @@ -126,15 +135,15 @@ proc_bkptset(struct proc_handle *phdl, u ret = -1; goto done; } - *saved = paddr; + *saved = instr; /* * Write a breakpoint instruction to that address. */ caddr = address; - paddr = BREAKPOINT_INSTR; + instr = BREAKPOINT_INSTR; piod.piod_op = PIOD_WRITE_I; piod.piod_offs = (void *)caddr; - piod.piod_addr = &paddr; + piod.piod_addr = &instr; piod.piod_len = BREAKPOINT_INSTR_SZ; if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) { DPRINTF("ERROR: couldn't write instruction at address 0x%" @@ -156,8 +165,9 @@ proc_bkptdel(struct proc_handle *phdl, u unsigned long saved) { struct ptrace_io_desc piod; - unsigned long paddr, caddr; + unsigned long caddr; int ret = 0, stopped; + instr_t instr; if (phdl->status == PS_DEAD || phdl->status == PS_UNDEAD || phdl->status == PS_IDLE) { @@ -178,10 +188,10 @@ proc_bkptdel(struct proc_handle *phdl, u * Overwrite the breakpoint instruction that we setup previously. */ caddr = address; - paddr = saved; + instr = saved; piod.piod_op = PIOD_WRITE_I; piod.piod_offs = (void *)caddr; - piod.piod_addr = &paddr; + piod.piod_addr = &instr; piod.piod_len = BREAKPOINT_INSTR_SZ; if (ptrace(PT_IO, proc_getpid(phdl), (caddr_t)&piod, 0) < 0) { DPRINTF("ERROR: couldn't write instruction at address 0x%" Modified: user/alc/PQ_LAUNDRY/lib/libsysdecode/flags.c ============================================================================== --- user/alc/PQ_LAUNDRY/lib/libsysdecode/flags.c Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/lib/libsysdecode/flags.c Thu Oct 27 00:33:14 2016 (r307981) @@ -959,7 +959,7 @@ sysdecode_umtx_rwlock_flags(FILE *fp, u_ } /* XXX: This should be in */ -#define CAPMASK(right) ((right) && (((uint64_t)1 << 57) - 1)) +#define CAPMASK(right) ((right) & (((uint64_t)1 << 57) - 1)) void sysdecode_cap_rights(FILE *fp, cap_rights_t *rightsp) Modified: user/alc/PQ_LAUNDRY/secure/lib/libcrypto/Makefile ============================================================================== --- user/alc/PQ_LAUNDRY/secure/lib/libcrypto/Makefile Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/secure/lib/libcrypto/Makefile Thu Oct 27 00:33:14 2016 (r307981) @@ -22,7 +22,10 @@ MAN+= config.5 des_modes.7 # base sources SRCS= cpt_err.c cryptlib.c cversion.c ex_data.c mem.c mem_dbg.c o_dir.c \ o_fips.c o_init.c o_str.c o_time.c uid.c -.if defined(ASM_amd64) +.if defined(ASM_aarch64) +SRCS+= arm64cpuid.S armcap.c mem_clr.c +ACFLAGS.arm64cpuid.S= -march=armv8-a+crypto +.elif defined(ASM_amd64) SRCS+= x86_64cpuid.S .elif defined(ASM_arm) SRCS+= armcap.c armv4cpuid.S @@ -35,7 +38,10 @@ INCS+= crypto.h ebcdic.h opensslv.h ossl # aes SRCS+= aes_cfb.c aes_ctr.c aes_ecb.c aes_ige.c aes_misc.c aes_ofb.c aes_wrap.c -.if defined(ASM_amd64) +.if defined(ASM_aarch64) +SRCS+= aes_cbc.c aes_core.c aesv8-armx.S +ACFLAGS.aesv8-armx.S= -march=armv8-a+crypto +.elif defined(ASM_amd64) SRCS+= aes-x86_64.S aesni-mb-x86_64.S aesni-sha1-x86_64.S \ aesni-sha256-x86_64.S aesni-x86_64.S bsaes-x86_64.S vpaes-x86_64.S .elif defined(ASM_arm) @@ -238,7 +244,10 @@ INCS+= mdc2.h # modes SRCS+= cbc128.c ccm128.c cfb128.c ctr128.c cts128.c gcm128.c ofb128.c \ wrap128.c xts128.c -.if defined(ASM_amd64) +.if defined(ASM_aarch64) +SRCS+= ghashv8-armx.S +ACFLAGS.ghashv8-armx.S= -march=armv8-a+crypto +.elif defined(ASM_amd64) SRCS+= aesni-gcm-x86_64.S ghash-x86_64.S .elif defined(ASM_arm) SRCS+= ghash-armv4.S ghashv8-armx.S @@ -324,7 +333,9 @@ INCS+= seed.h # sha SRCS+= sha1_one.c sha1dgst.c sha256.c sha512.c sha_dgst.c sha_one.c -.if defined(ASM_amd64) +.if defined(ASM_aarch64) +SRCS+= sha1-armv8.S sha256-armv8.S sha512-armv8.S +.elif defined(ASM_amd64) SRCS+= sha1-mb-x86_64.S sha1-x86_64.S sha256-mb-x86_64.S sha256-x86_64.S \ sha512-x86_64.S .elif defined(ASM_arm) Modified: user/alc/PQ_LAUNDRY/secure/lib/libcrypto/Makefile.asm ============================================================================== --- user/alc/PQ_LAUNDRY/secure/lib/libcrypto/Makefile.asm Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/secure/lib/libcrypto/Makefile.asm Thu Oct 27 00:33:14 2016 (r307981) @@ -6,7 +6,44 @@ .include "Makefile.inc" -.if defined(ASM_amd64) +.if defined(ASM_aarch64) + +.PATH: ${LCRYPTO_SRC}/crypto \ + ${LCRYPTO_SRC}/crypto/aes/asm \ + ${LCRYPTO_SRC}/crypto/modes/asm \ + ${LCRYPTO_SRC}/crypto/sha/asm + +PERLPATH= -I${LCRYPTO_SRC}/crypto/perlasm + +# aes +SRCS= aesv8-armx.pl + +# modes +SRCS+= ghashv8-armx.pl + +# sha +SRCS+= sha1-armv8.pl sha512-armv8.pl + +ASM= ${SRCS:R:S/$/.S/} sha256-armv8.S + +all: ${ASM} + +CLEANFILES= ${ASM} ${SRCS:R:S/$/.s/} sha256-armv8.s +.SUFFIXES: .pl + +sha256-armv8.S: sha512-armv8.pl + env CC=cc perl ${.ALLSRC} 64 ${.TARGET:R:S/$/.s/} + ( echo '/* $$'FreeBSD'$$ */' ;\ + echo '/* Do not modify. This file is auto-generated from ${.ALLSRC:T:R:S/$/.pl/}. */' ;\ + cat ${.TARGET:R:S/$/.s/}) > ${.TARGET} + +.pl.S: + env CC=cc perl ${.IMPSRC} 64 ${.TARGET:R:S/$/.s/} + ( echo '/* $$'FreeBSD'$$ */' ;\ + echo '/* Do not modify. This file is auto-generated from ${.IMPSRC:T:R:S/$/.pl/}. */' ;\ + cat ${.TARGET:R:S/$/.s/}) > ${.TARGET} + +.elif defined(ASM_amd64) .PATH: ${LCRYPTO_SRC}/crypto \ ${LCRYPTO_SRC}/crypto/aes/asm \ Modified: user/alc/PQ_LAUNDRY/secure/lib/libcrypto/Makefile.inc ============================================================================== --- user/alc/PQ_LAUNDRY/secure/lib/libcrypto/Makefile.inc Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/secure/lib/libcrypto/Makefile.inc Thu Oct 27 00:33:14 2016 (r307981) @@ -21,7 +21,9 @@ CFLAGS+=-DL_ENDIAN CFLAGS+=-DB_ENDIAN .endif -.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" +.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" +ASM_${MACHINE_CPUARCH}= +.elif ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" _ASM_AVX!= { \ echo vzeroall | \ ${CC} -x assembler -o /dev/null -c - 2> /dev/null; \ @@ -29,11 +31,11 @@ _ASM_AVX!= { \ .if ${_ASM_AVX} == yes ASM_${MACHINE_CPUARCH}= .endif -.elif ${MACHINE_CPUARCH} == "arm" -ASM_arm= .endif -.if defined(ASM_amd64) +.if defined(ASM_aarch64) +CFLAGS+=-DSHA1_ASM -DSHA256_ASM -DSHA512_ASM +.elif defined(ASM_amd64) CFLAGS+=-DOPENSSL_IA32_SSE2 CFLAGS+=-DAES_ASM -DBSAES_ASM -DVPAES_ASM CFLAGS+=-DECP_NISTZ256_ASM Modified: user/alc/PQ_LAUNDRY/sys/amd64/amd64/sys_machdep.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/amd64/amd64/sys_machdep.c Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/sys/amd64/amd64/sys_machdep.c Thu Oct 27 00:33:14 2016 (r307981) @@ -608,6 +608,8 @@ amd64_set_ldt(td, uap, descs) largest_ld = uap->start + uap->num; if (largest_ld > max_ldt_segment) largest_ld = max_ldt_segment; + if (largest_ld < uap->start) + return (EINVAL); i = largest_ld - uap->start; mtx_lock(&dt_lock); bzero(&((struct user_segment_descriptor *)(pldt->ldt_base)) @@ -620,7 +622,8 @@ amd64_set_ldt(td, uap, descs) /* verify range of descriptors to modify */ largest_ld = uap->start + uap->num; if (uap->start >= max_ldt_segment || - largest_ld > max_ldt_segment) + largest_ld > max_ldt_segment || + largest_ld < uap->start) return (EINVAL); } Modified: user/alc/PQ_LAUNDRY/sys/amd64/vmm/amd/svm.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/amd64/vmm/amd/svm.c Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/sys/amd64/vmm/amd/svm.c Thu Oct 27 00:33:14 2016 (r307981) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "vmm_lapic.h" #include "vmm_stat.h" @@ -517,7 +518,8 @@ svm_vminit(struct vm *vm, pmap_t pmap) vm_paddr_t msrpm_pa, iopm_pa, pml4_pa; int i; - svm_sc = malloc(sizeof (struct svm_softc), M_SVM, M_WAITOK | M_ZERO); + svm_sc = contigmalloc(sizeof (*svm_sc), M_SVM, M_WAITOK | M_ZERO, + 0, VM_MAX_ADDRESS, PAGE_SIZE, 0); svm_sc->vm = vm; svm_sc->nptp = (vm_offset_t)vtophys(pmap->pm_pml4); @@ -2042,7 +2044,7 @@ svm_vmcleanup(void *arg) { struct svm_softc *sc = arg; - free(sc, M_SVM); + contigfree(sc, sizeof (*sc), M_SVM); } static register_t * Modified: user/alc/PQ_LAUNDRY/sys/arm/allwinner/aw_nmi.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/arm/allwinner/aw_nmi.c Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/sys/arm/allwinner/aw_nmi.c Thu Oct 27 00:33:14 2016 (r307981) @@ -40,12 +40,11 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include -#include - #include "pic_if.h" #define NMI_IRQ_CTRL_REG 0x0 @@ -155,19 +154,19 @@ aw_nmi_map_fdt(device_t dev, u_int ncell tripol = cells[1]; switch (tripol) { - case IRQ_TYPE_EDGE_RISING: + case FDT_INTR_EDGE_RISING: trig = INTR_TRIGGER_EDGE; pol = INTR_POLARITY_HIGH; break; - case IRQ_TYPE_EDGE_FALLING: + case FDT_INTR_EDGE_FALLING: trig = INTR_TRIGGER_EDGE; pol = INTR_POLARITY_LOW; break; - case IRQ_TYPE_LEVEL_HIGH: + case FDT_INTR_LEVEL_HIGH: trig = INTR_TRIGGER_LEVEL; pol = INTR_POLARITY_HIGH; break; - case IRQ_TYPE_LEVEL_LOW: + case FDT_INTR_LEVEL_LOW: trig = INTR_TRIGGER_LEVEL; pol = INTR_POLARITY_LOW; break; Modified: user/alc/PQ_LAUNDRY/sys/arm/allwinner/clk/aw_pll.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/arm/allwinner/clk/aw_pll.c Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/sys/arm/allwinner/clk/aw_pll.c Thu Oct 27 00:33:14 2016 (r307981) @@ -47,12 +47,15 @@ __FBSDID("$FreeBSD$"); #include -#include - #include #include "clkdev_if.h" +#define SUN4I_A10_PLL2_1X 0 +#define SUN4I_A10_PLL2_2X 1 +#define SUN4I_A10_PLL2_4X 2 +#define SUN4I_A10_PLL2_8X 3 + #define AW_PLL_ENABLE (1 << 31) #define A10_PLL1_OUT_EXT_DIVP (0x3 << 16) @@ -192,6 +195,16 @@ struct aw_pll_factor { #define PLLFACTOR(_n, _k, _m, _p, _freq) \ { .n = (_n), .k = (_k), .m = (_m), .p = (_p), .freq = (_freq) } +static struct aw_pll_factor aw_a10_pll1_factors[] = { + PLLFACTOR(6, 0, 0, 0, 144000000), + PLLFACTOR(12, 0, 0, 0, 312000000), + PLLFACTOR(21, 0, 0, 0, 528000000), + PLLFACTOR(29, 0, 0, 0, 720000000), + PLLFACTOR(18, 1, 0, 0, 864000000), + PLLFACTOR(19, 1, 0, 0, 912000000), + PLLFACTOR(20, 1, 0, 0, 960000000), +}; + static struct aw_pll_factor aw_a23_pll1_factors[] = { PLLFACTOR(9, 0, 0, 2, 60000000), PLLFACTOR(10, 0, 0, 2, 66000000), @@ -300,6 +313,38 @@ struct aw_pll_funcs { #define DEVICE_UNLOCK(sc) CLKDEV_DEVICE_UNLOCK((sc)->clkdev) static int +a10_pll1_set_freq(struct aw_pll_sc *sc, uint64_t fin, uint64_t *fout, + int flags) +{ + struct aw_pll_factor *f; + uint32_t val; + int n; + + f = NULL; + for (n = 0; n < nitems(aw_a10_pll1_factors); n++) { + if (aw_a10_pll1_factors[n].freq == *fout) { + f = &aw_a10_pll1_factors[n]; + break; + } + } + if (f == NULL) + return (EINVAL); + + DEVICE_LOCK(sc); + PLL_READ(sc, &val); + val &= ~(A10_PLL1_FACTOR_N|A10_PLL1_FACTOR_K|A10_PLL1_FACTOR_M| + A10_PLL1_OUT_EXT_DIVP); + val |= (f->p << A10_PLL1_OUT_EXT_DIVP_SHIFT); + val |= (f->n << A10_PLL1_FACTOR_N_SHIFT); + val |= (f->k << A10_PLL1_FACTOR_K_SHIFT); + val |= (f->m << A10_PLL1_FACTOR_M_SHIFT); + PLL_WRITE(sc, val); + DEVICE_UNLOCK(sc); + + return (0); +} + +static int a10_pll1_recalc(struct aw_pll_sc *sc, uint64_t *freq) { uint32_t val, m, n, k, p; @@ -948,7 +993,7 @@ a83t_pllcpux_set_freq(struct aw_pll_sc * } static struct aw_pll_funcs aw_pll_func[] = { - PLL(AWPLL_A10_PLL1, a10_pll1_recalc, NULL, NULL), + PLL(AWPLL_A10_PLL1, a10_pll1_recalc, a10_pll1_set_freq, NULL), PLL(AWPLL_A10_PLL2, a10_pll2_recalc, a10_pll2_set_freq, NULL), PLL(AWPLL_A10_PLL3, a10_pll3_recalc, a10_pll3_set_freq, a10_pll3_init), PLL(AWPLL_A10_PLL5, a10_pll5_recalc, NULL, NULL), Modified: user/alc/PQ_LAUNDRY/sys/arm/arm/cpufunc_asm_arm11x6.S ============================================================================== --- user/alc/PQ_LAUNDRY/sys/arm/arm/cpufunc_asm_arm11x6.S Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/sys/arm/arm/cpufunc_asm_arm11x6.S Thu Oct 27 00:33:14 2016 (r307981) @@ -64,14 +64,6 @@ __FBSDID("$FreeBSD$"); .cpu arm1176jz-s -ENTRY(arm11x6_setttb) - mov r1, #0 - mcr p15, 0, r0, c2, c0, 0 /* load new TTB */ - mcr p15, 0, r1, c8, c7, 0 /* invalidate I+D TLBs */ - mcr p15, 0, r1, c7, c10, 4 /* drain write buffer */ - RET -END(arm11x6_setttb) - /* * Preload the cache before issuing the WFI by conditionally disabling the * mcr intstructions the first time around the loop. Ensure the function is Modified: user/alc/PQ_LAUNDRY/sys/arm/arm/cpufunc_asm_armv7.S ============================================================================== --- user/alc/PQ_LAUNDRY/sys/arm/arm/cpufunc_asm_armv7.S Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/sys/arm/arm/cpufunc_asm_armv7.S Thu Oct 27 00:33:14 2016 (r307981) @@ -37,56 +37,16 @@ __FBSDID("$FreeBSD$"); .cpu cortex-a8 +#ifdef ELF_TRAMPOLINE .Lcoherency_level: .word _C_LABEL(arm_cache_loc) .Lcache_type: .word _C_LABEL(arm_cache_type) -.Larmv7_dcache_line_size: - .word _C_LABEL(arm_dcache_min_line_size) -.Larmv7_icache_line_size: - .word _C_LABEL(arm_icache_min_line_size) -.Larmv7_idcache_line_size: - .word _C_LABEL(arm_idcache_min_line_size) .Lway_mask: .word 0x3ff .Lmax_index: .word 0x7fff -.Lpage_mask: - .word 0xfff - -#define PT_NOS (1 << 5) -#define PT_S (1 << 1) -#define PT_INNER_NC 0 -#define PT_INNER_WT (1 << 0) -#define PT_INNER_WB ((1 << 0) | (1 << 6)) -#define PT_INNER_WBWA (1 << 6) -#define PT_OUTER_NC 0 -#define PT_OUTER_WT (2 << 3) -#define PT_OUTER_WB (3 << 3) -#define PT_OUTER_WBWA (1 << 3) -#ifdef SMP -#define PT_ATTR (PT_S|PT_INNER_WBWA|PT_OUTER_WBWA|PT_NOS) -#else -#define PT_ATTR (PT_INNER_WBWA|PT_OUTER_WBWA) -#endif - -ENTRY(armv7_setttb) - dsb - orr r0, r0, #PT_ATTR - mcr CP15_TTBR0(r0) - isb -#ifdef SMP - mcr CP15_TLBIALLIS -#else - mcr CP15_TLBIALL -#endif - dsb - isb - RET -END(armv7_setttb) - -#ifdef ELF_TRAMPOLINE /* Based on algorithm from ARM Architecture Reference Manual */ ENTRY(armv7_dcache_wbinv_all) stmdb sp!, {r4, r5, r6, r7, r8, r9} Modified: user/alc/PQ_LAUNDRY/sys/arm/arm/gic.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/arm/arm/gic.c Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/sys/arm/arm/gic.c Thu Oct 27 00:33:14 2016 (r307981) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -821,13 +822,15 @@ gic_map_fdt(device_t dev, u_int ncells, } tripol = cells[2] & 0xff; - if (tripol & 0xf0 || (tripol & 0x0a && cells[0] == 0)) + if (tripol & 0xf0 || (tripol & FDT_INTR_LOW_MASK && + cells[0] == 0)) device_printf(dev, "unsupported trigger/polarity " "configuration 0x%02x\n", tripol); *irqp = irq; *polp = INTR_POLARITY_CONFORM; - *trigp = tripol & 0x03 ? INTR_TRIGGER_EDGE : INTR_TRIGGER_LEVEL; + *trigp = tripol & FDT_INTR_EDGE_MASK ? + INTR_TRIGGER_EDGE : INTR_TRIGGER_LEVEL; return (0); } return (EINVAL); Modified: user/alc/PQ_LAUNDRY/sys/arm/include/cpu-v6.h ============================================================================== --- user/alc/PQ_LAUNDRY/sys/arm/include/cpu-v6.h Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/sys/arm/include/cpu-v6.h Thu Oct 27 00:33:14 2016 (r307981) @@ -347,12 +347,21 @@ tlb_flush_range_local(vm_offset_t va, vm /* Broadcasting operations. */ #if __ARM_ARCH >= 7 && defined SMP +#if defined(CPU_CORTEXA8) +#define ARM_HAVE_MP_EXTENSIONS (cpuinfo.mp_ext != 0) +#else +#define ARM_HAVE_MP_EXTENSIONS 1 +#endif + static __inline void tlb_flush_all(void) { dsb(); - _CP15_TLBIALLIS(); + if (ARM_HAVE_MP_EXTENSIONS) + _CP15_TLBIALLIS(); + else + _CP15_TLBIALL(); dsb(); } @@ -361,7 +370,10 @@ tlb_flush_all_ng(void) { dsb(); - _CP15_TLBIASIDIS(CPU_ASID_KERNEL); + if (ARM_HAVE_MP_EXTENSIONS) + _CP15_TLBIASIDIS(CPU_ASID_KERNEL); + else + _CP15_TLBIASID(CPU_ASID_KERNEL); dsb(); } @@ -372,7 +384,10 @@ tlb_flush(vm_offset_t va) KASSERT((va & PAGE_MASK) == 0, ("%s: va %#x not aligned", __func__, va)); dsb(); - _CP15_TLBIMVAAIS(va); + if (ARM_HAVE_MP_EXTENSIONS) + _CP15_TLBIMVAAIS(va); + else + _CP15_TLBIMVA(va | CPU_ASID_KERNEL); dsb(); } @@ -386,8 +401,13 @@ tlb_flush_range(vm_offset_t va, vm_size size)); dsb(); - for (; va < eva; va += PAGE_SIZE) - _CP15_TLBIMVAAIS(va); + if (ARM_HAVE_MP_EXTENSIONS) { + for (; va < eva; va += PAGE_SIZE) + _CP15_TLBIMVAAIS(va); + } else { + for (; va < eva; va += PAGE_SIZE) + _CP15_TLBIMVA(va | CPU_ASID_KERNEL); + } dsb(); } #else /* SMP */ @@ -411,19 +431,23 @@ icache_sync(vm_offset_t va, vm_size_t si dsb(); va &= ~cpuinfo.dcache_line_mask; - for ( ; va < eva; va += cpuinfo.dcache_line_size) { #if __ARM_ARCH >= 7 && defined SMP - _CP15_DCCMVAU(va); -#else - _CP15_DCCMVAC(va); + if (ARM_HAVE_MP_EXTENSIONS) { + for ( ; va < eva; va += cpuinfo.dcache_line_size) + _CP15_DCCMVAU(va); + } else #endif + { + for ( ; va < eva; va += cpuinfo.dcache_line_size) + _CP15_DCCMVAC(va); } dsb(); #if __ARM_ARCH >= 7 && defined SMP - _CP15_ICIALLUIS(); -#else - _CP15_ICIALLU(); + if (ARM_HAVE_MP_EXTENSIONS) + _CP15_ICIALLUIS(); + else #endif + _CP15_ICIALLU(); dsb(); isb(); } @@ -433,10 +457,11 @@ static __inline void icache_inv_all(void) { #if __ARM_ARCH >= 7 && defined SMP - _CP15_ICIALLUIS(); -#else - _CP15_ICIALLU(); + if (ARM_HAVE_MP_EXTENSIONS) + _CP15_ICIALLUIS(); + else #endif + _CP15_ICIALLU(); dsb(); isb(); } @@ -446,10 +471,11 @@ static __inline void bpb_inv_all(void) { #if __ARM_ARCH >= 7 && defined SMP - _CP15_BPIALLIS(); -#else - _CP15_BPIALL(); + if (ARM_HAVE_MP_EXTENSIONS) + _CP15_BPIALLIS(); + else #endif + _CP15_BPIALL(); dsb(); isb(); } @@ -462,12 +488,15 @@ dcache_wb_pou(vm_offset_t va, vm_size_t dsb(); va &= ~cpuinfo.dcache_line_mask; - for ( ; va < eva; va += cpuinfo.dcache_line_size) { #if __ARM_ARCH >= 7 && defined SMP - _CP15_DCCMVAU(va); -#else - _CP15_DCCMVAC(va); + if (ARM_HAVE_MP_EXTENSIONS) { + for ( ; va < eva; va += cpuinfo.dcache_line_size) + _CP15_DCCMVAU(va); + } else #endif + { + for ( ; va < eva; va += cpuinfo.dcache_line_size) + _CP15_DCCMVAC(va); } dsb(); } Modified: user/alc/PQ_LAUNDRY/sys/arm/include/cpufunc.h ============================================================================== --- user/alc/PQ_LAUNDRY/sys/arm/include/cpufunc.h Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/sys/arm/include/cpufunc.h Thu Oct 27 00:33:14 2016 (r307981) @@ -279,14 +279,11 @@ void armv6_idcache_wbinv_all (void); #endif #if defined(CPU_CORTEXA8) || defined(CPU_CORTEXA_MP) || \ defined(CPU_MV_PJ4B) || defined(CPU_KRAIT) -void armv7_setttb (u_int); void armv7_idcache_wbinv_all (void); void armv7_cpu_sleep (int); void armv7_setup (void); void armv7_drain_writebuf (void); -void armadaxp_idcache_wbinv_all (void); - void cortexa_setup (void); #endif #if defined(CPU_MV_PJ4B) @@ -297,7 +294,6 @@ void pj4bv7_setup (void); #if defined(CPU_ARM1176) void arm11_drain_writebuf (void); -void arm11x6_setttb (u_int); void arm11x6_setup (void); void arm11x6_sleep (int); /* no ref. for errata */ #endif Modified: user/alc/PQ_LAUNDRY/sys/arm/include/platformvar.h ============================================================================== --- user/alc/PQ_LAUNDRY/sys/arm/include/platformvar.h Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/sys/arm/include/platformvar.h Thu Oct 27 00:33:14 2016 (r307981) @@ -93,7 +93,7 @@ extern platform_method_t fdt_platform_me #ifdef MULTIDELAY #define FDT_PLATFORM_CTASSERT(delay) CTASSERT(delay > 0) #else -#define FDT_PLATFORM_CTASSERT(delay) CTASSERT(delay == 0) +#define FDT_PLATFORM_CTASSERT(delay) #endif #define FDT_PLATFORM_DEF2(NAME, VAR_NAME, NAME_STR, size, compatible, \ Modified: user/alc/PQ_LAUNDRY/sys/arm/ti/am335x/am335x_dmtimer.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/arm/ti/am335x/am335x_dmtimer.c Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/sys/arm/ti/am335x/am335x_dmtimer.c Thu Oct 27 00:33:14 2016 (r307981) @@ -38,6 +38,10 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef MULTIDELAY +#include /* For arm_set_delay */ +#endif + #include #include #include @@ -67,6 +71,8 @@ struct am335x_dmtimer_softc { static struct am335x_dmtimer_softc *am335x_dmtimer_et_sc = NULL; static struct am335x_dmtimer_softc *am335x_dmtimer_tc_sc = NULL; +static void am335x_dmtimer_delay(int, void *); + /* * We use dmtimer2 for eventtimer and dmtimer3 for timecounter. */ @@ -235,6 +241,10 @@ am335x_dmtimer_tc_init(struct am335x_dmt am335x_dmtimer_tc_sc = sc; tc_init(&sc->func.tc); +#ifdef MULTIDELAY + arm_set_delay(am335x_dmtimer_delay, sc); +#endif + return (0); } @@ -328,23 +338,13 @@ static devclass_t am335x_dmtimer_devclas DRIVER_MODULE(am335x_dmtimer, simplebus, am335x_dmtimer_driver, am335x_dmtimer_devclass, 0, 0); MODULE_DEPEND(am335x_dmtimer, am335x_prcm, 1, 1, 1); -void -DELAY(int usec) +static void +am335x_dmtimer_delay(int usec, void *arg) { - struct am335x_dmtimer_softc *sc; + struct am335x_dmtimer_softc *sc = arg; int32_t counts; uint32_t first, last; - sc = am335x_dmtimer_tc_sc; - - if (sc == NULL) { - for (; usec > 0; usec--) - for (counts = 200; counts > 0; counts--) - /* Prevent gcc from optimizing out the loop */ - cpufunc_nullop(); - return; - } - /* Get the number of times to count */ counts = (usec + 1) * (sc->sysclk_freq / 1000000); @@ -361,3 +361,19 @@ DELAY(int usec) } } +#ifndef MULTIDELAY +void +DELAY(int usec) +{ + int32_t counts; + + if (am335x_dmtimer_tc_sc == NULL) { + for (; usec > 0; usec--) + for (counts = 200; counts > 0; counts--) + /* Prevent gcc from optimizing out the loop */ + cpufunc_nullop(); + return; + } else + am335x_dmtimer_delay(usec, am335x_dmtimer_tc_sc); +} +#endif Modified: user/alc/PQ_LAUNDRY/sys/arm/ti/ti_machdep.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/arm/ti/ti_machdep.c Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/sys/arm/ti/ti_machdep.c Thu Oct 27 00:33:14 2016 (r307981) @@ -124,5 +124,5 @@ static platform_method_t am335x_methods[ PLATFORMMETHOD_END, }; -FDT_PLATFORM_DEF(am335x, "am335x", 0, "ti,am335x", 0); +FDT_PLATFORM_DEF(am335x, "am335x", 0, "ti,am335x", 200); #endif Modified: user/alc/PQ_LAUNDRY/sys/arm64/arm64/gic_v3.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/arm64/arm64/gic_v3.c Thu Oct 27 00:08:02 2016 (r307980) +++ user/alc/PQ_LAUNDRY/sys/arm64/arm64/gic_v3.c Thu Oct 27 00:33:14 2016 (r307981) @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #ifdef FDT +#include #include #endif @@ -470,20 +471,20 @@ gic_map_fdt(device_t dev, u_int ncells, return (EINVAL); } - switch (cells[2] & 0xf) { - case 1: + switch (cells[2] & FDT_INTR_MASK) { + case FDT_INTR_EDGE_RISING: *trigp = INTR_TRIGGER_EDGE; *polp = INTR_POLARITY_HIGH; break; - case 2: + case FDT_INTR_EDGE_FALLING: *trigp = INTR_TRIGGER_EDGE; *polp = INTR_POLARITY_LOW; break; - case 4: + case FDT_INTR_LEVEL_HIGH: *trigp = INTR_TRIGGER_LEVEL; *polp = INTR_POLARITY_HIGH; break; - case 8: + case FDT_INTR_LEVEL_LOW: *trigp = INTR_TRIGGER_LEVEL; *polp = INTR_POLARITY_LOW; break; Copied: user/alc/PQ_LAUNDRY/sys/arm64/arm64/memcpy.S (from r307980, head/sys/arm64/arm64/memcpy.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/alc/PQ_LAUNDRY/sys/arm64/arm64/memcpy.S Thu Oct 27 00:33:14 2016 (r307981, copy of r307980, head/sys/arm64/arm64/memcpy.S) @@ -0,0 +1,219 @@ +/* Copyright (c) 2012, Linaro Limited + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * 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. + * Neither the name of the Linaro nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +/* + * Copyright (c) 2015 ARM Ltd + * 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. + * 3. The name of the company may not be used to endorse or promote + * products derived from this software without specific prior written + * permission. + * + * THIS SOFTWARE IS PROVIDED BY ARM LTD ``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 ARM LTD 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$"); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@freebsd.org Thu Oct 27 06:35:54 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26F3DC2213B for ; Thu, 27 Oct 2016 06:35:54 +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 mx1.freebsd.org (Postfix) with ESMTPS id D23DF22A; Thu, 27 Oct 2016 06:35:53 +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 u9R6Zrg7037194; Thu, 27 Oct 2016 06:35:53 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9R6ZreQ037193; Thu, 27 Oct 2016 06:35:53 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201610270635.u9R6ZreQ037193@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Thu, 27 Oct 2016 06:35:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r307992 - user/alc/PQ_LAUNDRY/sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Oct 2016 06:35:54 -0000 Author: alc Date: Thu Oct 27 06:35:52 2016 New Revision: 307992 URL: https://svnweb.freebsd.org/changeset/base/307992 Log: Write the new sysctl's in the correct style. Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Thu Oct 27 05:33:48 2016 (r307991) +++ user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Thu Oct 27 06:35:52 2016 (r307992) @@ -232,24 +232,23 @@ SYSCTL_INT(_vm, OID_AUTO, pageout_oom_se "back-to-back calls to oom detector to start OOM"); static int act_scan_laundry_weight = 3; -SYSCTL_INT(_vm, OID_AUTO, act_scan_laundry_weight, - CTLFLAG_RW, &act_scan_laundry_weight, 0, - "weight given to clean vs. dirty pages in active queue scans"); +SYSCTL_INT(_vm, OID_AUTO, act_scan_laundry_weight, CTLFLAG_RW, + &act_scan_laundry_weight, 0, + "weight given to clean vs. dirty pages in active queue scans"); static u_int vm_background_launder_target; -SYSCTL_UINT(_vm, OID_AUTO, background_launder_target, - CTLFLAG_RW, &vm_background_launder_target, 0, - "background laundering target, in pages"); +SYSCTL_UINT(_vm, OID_AUTO, background_launder_target, CTLFLAG_RW, + &vm_background_launder_target, 0, + "background laundering target, in pages"); static u_int vm_background_launder_rate = 4096; -SYSCTL_UINT(_vm, OID_AUTO, background_launder_rate, - CTLFLAG_RW, &vm_background_launder_rate, 0, - "background laundering rate, in kilobytes per second"); +SYSCTL_UINT(_vm, OID_AUTO, background_launder_rate, CTLFLAG_RW, + &vm_background_launder_rate, 0, + "background laundering rate, in kilobytes per second"); static u_int vm_background_launder_max = 20 * 1024; -SYSCTL_UINT(_vm, OID_AUTO, background_launder_max, - CTLFLAG_RW, &vm_background_launder_max, 0, - "background laundering cap, in kilobytes"); +SYSCTL_UINT(_vm, OID_AUTO, background_launder_max, CTLFLAG_RW, + &vm_background_launder_max, 0, "background laundering cap, in kilobytes"); #define VM_PAGEOUT_PAGE_COUNT 16 int vm_pageout_page_count = VM_PAGEOUT_PAGE_COUNT; From owner-svn-src-user@freebsd.org Thu Oct 27 15:51:40 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6528FC230C7 for ; Thu, 27 Oct 2016 15:51:40 +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 mx1.freebsd.org (Postfix) with ESMTPS id 322D5DAA; Thu, 27 Oct 2016 15:51:40 +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 u9RFpd1W051165; Thu, 27 Oct 2016 15:51:39 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9RFpdNa051164; Thu, 27 Oct 2016 15:51:39 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201610271551.u9RFpdNa051164@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Thu, 27 Oct 2016 15:51:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r308002 - user/alc/PQ_LAUNDRY/sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Oct 2016 15:51:40 -0000 Author: alc Date: Thu Oct 27 15:51:39 2016 New Revision: 308002 URL: https://svnweb.freebsd.org/changeset/base/308002 Log: It's already the case that we repurpose the variable "pq" over the course of vm_pageout_scan() to refer to both the inactive and active queues. Use it for the laundry queue as well. Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Thu Oct 27 14:21:54 2016 (r308001) +++ user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Thu Oct 27 15:51:39 2016 (r308002) @@ -1265,7 +1265,7 @@ static bool vm_pageout_scan(struct vm_domain *vmd, int pass) { vm_page_t m, next; - struct vm_pagequeue *pq, *laundryq; + struct vm_pagequeue *pq; vm_object_t object; long min_scan; int act_delta, addl_page_shortage, deficit, inactq_shortage, maxscan; @@ -1494,15 +1494,15 @@ drop_page: */ if (vm_laundry_request == VM_LAUNDRY_IDLE && starting_page_shortage > 0) { - laundryq = &vm_dom[0].vmd_pagequeues[PQ_LAUNDRY]; - vm_pagequeue_lock(laundryq); + pq = &vm_dom[0].vmd_pagequeues[PQ_LAUNDRY]; + vm_pagequeue_lock(pq); if (page_shortage > 0) { vm_laundry_request = VM_LAUNDRY_SHORTFALL; PCPU_INC(cnt.v_pdshortfalls); } else if (vm_laundry_request != VM_LAUNDRY_SHORTFALL) vm_laundry_request = VM_LAUNDRY_BACKGROUND; wakeup(&vm_laundry_request); - vm_pagequeue_unlock(laundryq); + vm_pagequeue_unlock(pq); } #if !defined(NO_SWAPPING) From owner-svn-src-user@freebsd.org Fri Oct 28 16:22:46 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC303C2429D for ; Fri, 28 Oct 2016 16:22:46 +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 mx1.freebsd.org (Postfix) with ESMTPS id 7C0ECC4F; Fri, 28 Oct 2016 16:22:46 +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 u9SGMj9w019981; Fri, 28 Oct 2016 16:22:45 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9SGMjkY019980; Fri, 28 Oct 2016 16:22:45 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201610281622.u9SGMjkY019980@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Fri, 28 Oct 2016 16:22:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r308052 - user/alc/PQ_LAUNDRY/sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Oct 2016 16:22:46 -0000 Author: alc Date: Fri Oct 28 16:22:45 2016 New Revision: 308052 URL: https://svnweb.freebsd.org/changeset/base/308052 Log: Tweak vm_pageout_flush()'s handling of the VM_PAGER_BAD case. In particular, don't move the page from its current queue unless it was in the laundry. And, if it was, then we don't expect it to be reused. Discussed with: markj Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Modified: user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c ============================================================================== --- user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Fri Oct 28 16:21:31 2016 (r308051) +++ user/alc/PQ_LAUNDRY/sys/vm/vm_pageout.c Fri Oct 28 16:22:45 2016 (r308052) @@ -554,13 +554,15 @@ vm_pageout_flush(vm_page_t *mc, int coun break; case VM_PAGER_BAD: /* - * Page outside of range of object. Right now we - * essentially lose the changes by pretending it - * worked. + * The page is outside the object's range. We pretend + * that the page out worked and clean the page, so the + * changes will be lost if the page is reclaimed by + * the page daemon. */ vm_page_undirty(mt); vm_page_lock(mt); - vm_page_deactivate(mt); + if (vm_page_in_laundry(mt)) + vm_page_deactivate_noreuse(mt); vm_page_unlock(mt); break; case VM_PAGER_ERROR: From owner-svn-src-user@freebsd.org Fri Oct 28 16:32:00 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE31AC245DC for ; Fri, 28 Oct 2016 16:32:00 +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 mx1.freebsd.org (Postfix) with ESMTPS id 89164253; Fri, 28 Oct 2016 16:32:00 +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 u9SGVxjX023334; Fri, 28 Oct 2016 16:31:59 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9SGVwUp023324; Fri, 28 Oct 2016 16:31:58 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201610281631.u9SGVwUp023324@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Fri, 28 Oct 2016 16:31:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r308054 - in user/alc/PQ_LAUNDRY: contrib/llvm/projects/libunwind/include contrib/llvm/projects/libunwind/src lib/libgcc_eh share/mk sys/amd64/amd64 sys/amd64/vmm/amd sys/arm/allwinner ... X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Oct 2016 16:32:00 -0000 Author: alc Date: Fri Oct 28 16:31:58 2016 New Revision: 308054 URL: https://svnweb.freebsd.org/changeset/base/308054 Log: MFH r308053 Added: user/alc/PQ_LAUNDRY/sys/arm/allwinner/aw_cir.c - copied unchanged from r308053, head/sys/arm/allwinner/aw_cir.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hn_nvs.c - copied unchanged from r308053, head/sys/dev/hyperv/netvsc/hn_nvs.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hn_nvs.h - copied unchanged from r308053, head/sys/dev/hyperv/netvsc/hn_nvs.h user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hn_rndis.h - copied unchanged from r308053, head/sys/dev/hyperv/netvsc/hn_rndis.h Deleted: user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_net_vsc.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_net_vsc.h user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_rndis_filter.h Modified: user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/include/libunwind.h user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/AddressSpace.hpp user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/CompactUnwinder.hpp user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/EHHeaderParser.hpp user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/Unwind-EHABI.cpp user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/Unwind-sjlj.c user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/UnwindCursor.hpp user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/UnwindLevel1-gcc-ext.c user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/UnwindLevel1.c user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/config.h user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/libunwind.cpp user/alc/PQ_LAUNDRY/lib/libgcc_eh/Makefile.inc user/alc/PQ_LAUNDRY/share/mk/bsd.suffixes.mk user/alc/PQ_LAUNDRY/share/mk/sys.mk user/alc/PQ_LAUNDRY/sys/amd64/amd64/mem.c user/alc/PQ_LAUNDRY/sys/amd64/vmm/amd/svm.c user/alc/PQ_LAUNDRY/sys/arm/allwinner/files.allwinner user/alc/PQ_LAUNDRY/sys/arm/conf/GENERIC user/alc/PQ_LAUNDRY/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c user/alc/PQ_LAUNDRY/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zrlock.c user/alc/PQ_LAUNDRY/sys/conf/files.amd64 user/alc/PQ_LAUNDRY/sys/conf/files.i386 user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/hv_rndis_filter.c user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/if_hnvar.h user/alc/PQ_LAUNDRY/sys/dev/hyperv/netvsc/ndis.h user/alc/PQ_LAUNDRY/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c user/alc/PQ_LAUNDRY/sys/dev/netmap/if_em_netmap.h user/alc/PQ_LAUNDRY/sys/dev/netmap/if_ptnet.c user/alc/PQ_LAUNDRY/sys/dev/netmap/netmap.c user/alc/PQ_LAUNDRY/sys/dev/netmap/netmap_freebsd.c user/alc/PQ_LAUNDRY/sys/dev/netmap/netmap_kern.h user/alc/PQ_LAUNDRY/sys/dev/netmap/netmap_mem2.c user/alc/PQ_LAUNDRY/sys/dev/netmap/netmap_mem2.h user/alc/PQ_LAUNDRY/sys/dev/netmap/netmap_pt.c user/alc/PQ_LAUNDRY/sys/dev/netmap/netmap_vale.c user/alc/PQ_LAUNDRY/sys/dev/re/if_re.c user/alc/PQ_LAUNDRY/sys/fs/cd9660/cd9660_vnops.c user/alc/PQ_LAUNDRY/sys/fs/msdosfs/msdosfs_fat.c user/alc/PQ_LAUNDRY/sys/fs/msdosfs/msdosfs_vfsops.c user/alc/PQ_LAUNDRY/sys/fs/msdosfs/msdosfs_vnops.c user/alc/PQ_LAUNDRY/sys/i386/i386/mem.c user/alc/PQ_LAUNDRY/sys/i386/i386/pmap.c user/alc/PQ_LAUNDRY/sys/kern/vfs_bio.c user/alc/PQ_LAUNDRY/sys/modules/hyperv/netvsc/Makefile user/alc/PQ_LAUNDRY/sys/net/netmap.h user/alc/PQ_LAUNDRY/sys/net/netmap_virt.h user/alc/PQ_LAUNDRY/sys/net/rndis.h user/alc/PQ_LAUNDRY/sys/net80211/ieee80211_scan.c user/alc/PQ_LAUNDRY/sys/net80211/ieee80211_scan_sw.c user/alc/PQ_LAUNDRY/sys/sys/buf.h user/alc/PQ_LAUNDRY/sys/ufs/ffs/ffs_vnops.c user/alc/PQ_LAUNDRY/sys/x86/cpufreq/hwpstate.c user/alc/PQ_LAUNDRY/sys/x86/include/x86_var.h user/alc/PQ_LAUNDRY/sys/x86/x86/cpu_machdep.c user/alc/PQ_LAUNDRY/usr.sbin/watchdogd/watchdogd.c Directory Properties: user/alc/PQ_LAUNDRY/ (props changed) user/alc/PQ_LAUNDRY/contrib/llvm/ (props changed) user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/ (props changed) user/alc/PQ_LAUNDRY/sys/cddl/contrib/opensolaris/ (props changed) Modified: user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/include/libunwind.h ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/include/libunwind.h Fri Oct 28 16:27:58 2016 (r308053) +++ user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/include/libunwind.h Fri Oct 28 16:31:58 2016 (r308054) @@ -6,7 +6,7 @@ // Source Licenses. See LICENSE.TXT for details. // // -// Compatible with libuwind API documented at: +// Compatible with libunwind API documented at: // http://www.nongnu.org/libunwind/man/libunwind(3).html // //===----------------------------------------------------------------------===// @@ -120,7 +120,7 @@ extern int unw_init_remote_thread(unw_cu #endif /* UNW_REMOTE */ /* - * traditional libuwind "remote" API + * traditional libunwind "remote" API * NOT IMPLEMENTED on Mac OS X * * extern int unw_init_remote(unw_cursor_t*, unw_addr_space_t, Modified: user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/AddressSpace.hpp ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/AddressSpace.hpp Fri Oct 28 16:27:58 2016 (r308053) +++ user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/AddressSpace.hpp Fri Oct 28 16:31:58 2016 (r308054) @@ -374,7 +374,7 @@ inline bool LocalAddressSpace::findUnwin (_Unwind_Ptr) targetAddr, &length); info.arm_section_length = (uintptr_t)length; #endif - _LIBUNWIND_TRACE_UNWINDING("findUnwindSections: section %X length %x\n", + _LIBUNWIND_TRACE_UNWINDING("findUnwindSections: section %X length %x", info.arm_section, info.arm_section_length); if (info.arm_section && info.arm_section_length) return true; Modified: user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/CompactUnwinder.hpp ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/CompactUnwinder.hpp Fri Oct 28 16:27:58 2016 (r308053) +++ user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/CompactUnwinder.hpp Fri Oct 28 16:31:58 2016 (r308054) @@ -105,7 +105,7 @@ int CompactUnwinder_x86::stepWithComp default: (void)functionStart; _LIBUNWIND_DEBUG_LOG("bad register for EBP frame, encoding=%08X for " - "function starting at 0x%X\n", + "function starting at 0x%X", compactEncoding, functionStart); _LIBUNWIND_ABORT("invalid compact unwind encoding"); } @@ -224,7 +224,7 @@ int CompactUnwinder_x86::stepWithComp break; default: _LIBUNWIND_DEBUG_LOG("bad register for frameless, encoding=%08X for " - "function starting at 0x%X\n", + "function starting at 0x%X", encoding, functionStart); _LIBUNWIND_ABORT("invalid compact unwind encoding"); } @@ -336,7 +336,7 @@ int CompactUnwinder_x86_64::stepWithC default: (void)functionStart; _LIBUNWIND_DEBUG_LOG("bad register for RBP frame, encoding=%08X for " - "function starting at 0x%llX\n", + "function starting at 0x%llX", compactEncoding, functionStart); _LIBUNWIND_ABORT("invalid compact unwind encoding"); } @@ -455,7 +455,7 @@ int CompactUnwinder_x86_64::stepWithC break; default: _LIBUNWIND_DEBUG_LOG("bad register for frameless, encoding=%08X for " - "function starting at 0x%llX\n", + "function starting at 0x%llX", encoding, functionStart); _LIBUNWIND_ABORT("invalid compact unwind encoding"); } Modified: user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/EHHeaderParser.hpp ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/EHHeaderParser.hpp Fri Oct 28 16:27:58 2016 (r308053) +++ user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/EHHeaderParser.hpp Fri Oct 28 16:31:58 2016 (r308054) @@ -85,7 +85,7 @@ bool EHHeaderParser::decodeTableEntry const char *message = CFI_Parser::decodeFDE(addressSpace, fde, fdeInfo, cieInfo); if (message != NULL) { - _LIBUNWIND_DEBUG_LOG("EHHeaderParser::decodeTableEntry: bad fde: %s\n", + _LIBUNWIND_DEBUG_LOG("EHHeaderParser::decodeTableEntry: bad fde: %s", message); return false; } Modified: user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/Unwind-EHABI.cpp ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/Unwind-EHABI.cpp Fri Oct 28 16:27:58 2016 (r308053) +++ user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/Unwind-EHABI.cpp Fri Oct 28 16:31:58 2016 (r308054) @@ -454,7 +454,7 @@ unwind_phase1(unw_context_t *uc, unw_cur unw_proc_info_t frameInfo; if (unw_get_proc_info(cursor, &frameInfo) != UNW_ESUCCESS) { _LIBUNWIND_TRACE_UNWINDING("unwind_phase1(ex_ojb=%p): unw_get_proc_info " - "failed => _URC_FATAL_PHASE1_ERROR\n", + "failed => _URC_FATAL_PHASE1_ERROR", static_cast(exception_object)); return _URC_FATAL_PHASE1_ERROR; } @@ -472,7 +472,7 @@ unwind_phase1(unw_context_t *uc, unw_cur unw_get_reg(cursor, UNW_REG_IP, &pc); _LIBUNWIND_TRACE_UNWINDING( "unwind_phase1(ex_ojb=%p): pc=0x%llX, start_ip=0x%llX, func=%s, " - "lsda=0x%llX, personality=0x%llX\n", + "lsda=0x%llX, personality=0x%llX", static_cast(exception_object), (long long)pc, (long long)frameInfo.start_ip, functionName, (long long)frameInfo.lsda, (long long)frameInfo.handler); @@ -484,7 +484,7 @@ unwind_phase1(unw_context_t *uc, unw_cur __personality_routine p = (__personality_routine)(long)(frameInfo.handler); _LIBUNWIND_TRACE_UNWINDING( - "unwind_phase1(ex_ojb=%p): calling personality function %p\n", + "unwind_phase1(ex_ojb=%p): calling personality function %p", static_cast(exception_object), reinterpret_cast(reinterpret_cast(p))); struct _Unwind_Context *context = (struct _Unwind_Context *)(cursor); @@ -496,7 +496,7 @@ unwind_phase1(unw_context_t *uc, unw_cur (*p)(_US_VIRTUAL_UNWIND_FRAME, exception_object, context); _LIBUNWIND_TRACE_UNWINDING( "unwind_phase1(ex_ojb=%p): personality result %d start_ip %x ehtp %p " - "additional %x\n", + "additional %x", static_cast(exception_object), personalityResult, exception_object->pr_cache.fnstart, static_cast(exception_object->pr_cache.ehtp), @@ -508,13 +508,13 @@ unwind_phase1(unw_context_t *uc, unw_cur handlerNotFound = false; // p should have initialized barrier_cache. EHABI #7.3.5 _LIBUNWIND_TRACE_UNWINDING( - "unwind_phase1(ex_ojb=%p): _URC_HANDLER_FOUND \n", + "unwind_phase1(ex_ojb=%p): _URC_HANDLER_FOUND", static_cast(exception_object)); return _URC_NO_REASON; case _URC_CONTINUE_UNWIND: _LIBUNWIND_TRACE_UNWINDING( - "unwind_phase1(ex_ojb=%p): _URC_CONTINUE_UNWIND\n", + "unwind_phase1(ex_ojb=%p): _URC_CONTINUE_UNWIND", static_cast(exception_object)); // continue unwinding break; @@ -526,7 +526,7 @@ unwind_phase1(unw_context_t *uc, unw_cur default: // something went wrong _LIBUNWIND_TRACE_UNWINDING( - "unwind_phase1(ex_ojb=%p): _URC_FATAL_PHASE1_ERROR\n", + "unwind_phase1(ex_ojb=%p): _URC_FATAL_PHASE1_ERROR", static_cast(exception_object)); return _URC_FATAL_PHASE1_ERROR; } @@ -541,13 +541,13 @@ static _Unwind_Reason_Code unwind_phase2 // See comment at the start of unwind_phase1 regarding VRS integrity. unw_init_local(cursor, uc); - _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p)\n", + _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p)", static_cast(exception_object)); int frame_count = 0; // Walk each frame until we reach where search phase said to stop. while (true) { - // Ask libuwind to get next frame (skip over first which is + // Ask libunwind to get next frame (skip over first which is // _Unwind_RaiseException or _Unwind_Resume). // // Resume only ever makes sense for 1 frame. @@ -572,7 +572,7 @@ static _Unwind_Reason_Code unwind_phase2 unw_get_reg(cursor, UNW_REG_SP, &sp); if (unw_get_proc_info(cursor, &frameInfo) != UNW_ESUCCESS) { _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p): unw_get_proc_info " - "failed => _URC_FATAL_PHASE2_ERROR\n", + "failed => _URC_FATAL_PHASE2_ERROR", static_cast(exception_object)); return _URC_FATAL_PHASE2_ERROR; } @@ -588,7 +588,7 @@ static _Unwind_Reason_Code unwind_phase2 functionName = ".anonymous."; _LIBUNWIND_TRACE_UNWINDING( "unwind_phase2(ex_ojb=%p): start_ip=0x%llX, func=%s, sp=0x%llX, " - "lsda=0x%llX, personality=0x%llX\n", + "lsda=0x%llX, personality=0x%llX", static_cast(exception_object), (long long)frameInfo.start_ip, functionName, (long long)sp, (long long)frameInfo.lsda, (long long)frameInfo.handler); @@ -610,7 +610,7 @@ static _Unwind_Reason_Code unwind_phase2 case _URC_CONTINUE_UNWIND: // Continue unwinding _LIBUNWIND_TRACE_UNWINDING( - "unwind_phase2(ex_ojb=%p): _URC_CONTINUE_UNWIND\n", + "unwind_phase2(ex_ojb=%p): _URC_CONTINUE_UNWIND", static_cast(exception_object)); // EHABI #7.2 if (sp == exception_object->barrier_cache.sp) { @@ -621,7 +621,7 @@ static _Unwind_Reason_Code unwind_phase2 break; case _URC_INSTALL_CONTEXT: _LIBUNWIND_TRACE_UNWINDING( - "unwind_phase2(ex_ojb=%p): _URC_INSTALL_CONTEXT\n", + "unwind_phase2(ex_ojb=%p): _URC_INSTALL_CONTEXT", static_cast(exception_object)); // Personality routine says to transfer control to landing pad. // We may get control back if landing pad calls _Unwind_Resume(). @@ -630,7 +630,7 @@ static _Unwind_Reason_Code unwind_phase2 unw_get_reg(cursor, UNW_REG_IP, &pc); unw_get_reg(cursor, UNW_REG_SP, &sp); _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p): re-entering " - "user code with ip=0x%llX, sp=0x%llX\n", + "user code with ip=0x%llX, sp=0x%llX", static_cast(exception_object), (long long)pc, (long long)sp); } @@ -668,7 +668,7 @@ static _Unwind_Reason_Code unwind_phase2 /// Called by __cxa_throw. Only returns if there is a fatal error. _LIBUNWIND_EXPORT _Unwind_Reason_Code _Unwind_RaiseException(_Unwind_Exception *exception_object) { - _LIBUNWIND_TRACE_API("_Unwind_RaiseException(ex_obj=%p)\n", + _LIBUNWIND_TRACE_API("_Unwind_RaiseException(ex_obj=%p)", static_cast(exception_object)); unw_context_t uc; unw_cursor_t cursor; @@ -706,7 +706,7 @@ _LIBUNWIND_EXPORT void _Unwind_Complete( /// in turn calls _Unwind_Resume_or_Rethrow(). _LIBUNWIND_EXPORT void _Unwind_Resume(_Unwind_Exception *exception_object) { - _LIBUNWIND_TRACE_API("_Unwind_Resume(ex_obj=%p)\n", + _LIBUNWIND_TRACE_API("_Unwind_Resume(ex_obj=%p)", static_cast(exception_object)); unw_context_t uc; unw_cursor_t cursor; @@ -730,7 +730,7 @@ _Unwind_GetLanguageSpecificData(struct _ if (unw_get_proc_info(cursor, &frameInfo) == UNW_ESUCCESS) result = (uintptr_t)frameInfo.lsda; _LIBUNWIND_TRACE_API( - "_Unwind_GetLanguageSpecificData(context=%p) => 0x%llx\n", + "_Unwind_GetLanguageSpecificData(context=%p) => 0x%llx", static_cast(context), (long long)result); return result; } @@ -758,7 +758,7 @@ _Unwind_VRS_Set(_Unwind_Context *context uint32_t regno, _Unwind_VRS_DataRepresentation representation, void *valuep) { _LIBUNWIND_TRACE_API("_Unwind_VRS_Set(context=%p, regclass=%d, reg=%d, " - "rep=%d, value=0x%llX)\n", + "rep=%d, value=0x%llX)", static_cast(context), regclass, regno, representation, ValueAsBitPattern(representation, valuep)); @@ -863,7 +863,7 @@ _Unwind_VRS_Result _Unwind_VRS_Get( _Unwind_VRS_Get_Internal(context, regclass, regno, representation, valuep); _LIBUNWIND_TRACE_API("_Unwind_VRS_Get(context=%p, regclass=%d, reg=%d, " - "rep=%d, value=0x%llX, result = %d)\n", + "rep=%d, value=0x%llX, result = %d)", static_cast(context), regclass, regno, representation, ValueAsBitPattern(representation, valuep), result); @@ -875,7 +875,7 @@ _Unwind_VRS_Pop(_Unwind_Context *context uint32_t discriminator, _Unwind_VRS_DataRepresentation representation) { _LIBUNWIND_TRACE_API("_Unwind_VRS_Pop(context=%p, regclass=%d, " - "discriminator=%d, representation=%d)\n", + "discriminator=%d, representation=%d)", static_cast(context), regclass, discriminator, representation); switch (regclass) { @@ -948,7 +948,7 @@ _Unwind_GetRegionStart(struct _Unwind_Co uintptr_t result = 0; if (unw_get_proc_info(cursor, &frameInfo) == UNW_ESUCCESS) result = (uintptr_t)frameInfo.start_ip; - _LIBUNWIND_TRACE_API("_Unwind_GetRegionStart(context=%p) => 0x%llX\n", + _LIBUNWIND_TRACE_API("_Unwind_GetRegionStart(context=%p) => 0x%llX", static_cast(context), (long long)result); return result; } @@ -958,7 +958,7 @@ _Unwind_GetRegionStart(struct _Unwind_Co // is caught. _LIBUNWIND_EXPORT void _Unwind_DeleteException(_Unwind_Exception *exception_object) { - _LIBUNWIND_TRACE_API("_Unwind_DeleteException(ex_obj=%p)\n", + _LIBUNWIND_TRACE_API("_Unwind_DeleteException(ex_obj=%p)", static_cast(exception_object)); if (exception_object->exception_cleanup != NULL) (*exception_object->exception_cleanup)(_URC_FOREIGN_EXCEPTION_CAUGHT, Modified: user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/Unwind-sjlj.c ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/Unwind-sjlj.c Fri Oct 28 16:27:58 2016 (r308053) +++ user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/Unwind-sjlj.c Fri Oct 28 16:31:58 2016 (r308054) @@ -72,7 +72,7 @@ _Unwind_SjLj_Unregister(struct _Unwind_F static _Unwind_Reason_Code unwind_phase1(struct _Unwind_Exception *exception_object) { _Unwind_FunctionContext_t c = __Unwind_SjLj_GetTopOfFunctionStack(); - _LIBUNWIND_TRACE_UNWINDING("unwind_phase1: initial function-context=%p\n", c); + _LIBUNWIND_TRACE_UNWINDING("unwind_phase1: initial function-context=%p", c); // walk each frame looking for a place to stop for (bool handlerNotFound = true; handlerNotFound; c = c->prev) { @@ -80,17 +80,17 @@ unwind_phase1(struct _Unwind_Exception * // check for no more frames if (c == NULL) { _LIBUNWIND_TRACE_UNWINDING("unwind_phase1(ex_ojb=%p): reached " - "bottom => _URC_END_OF_STACK\n", + "bottom => _URC_END_OF_STACK", exception_object); return _URC_END_OF_STACK; } - _LIBUNWIND_TRACE_UNWINDING("unwind_phase1: function-context=%p\n", c); + _LIBUNWIND_TRACE_UNWINDING("unwind_phase1: function-context=%p", c); // if there is a personality routine, ask it if it will want to stop at this // frame if (c->personality != NULL) { _LIBUNWIND_TRACE_UNWINDING("unwind_phase1(ex_ojb=%p): calling " - "personality function %p\n", + "personality function %p", exception_object, c->personality); _Unwind_Reason_Code personalityResult = (*c->personality)( 1, _UA_SEARCH_PHASE, exception_object->exception_class, @@ -102,19 +102,19 @@ unwind_phase1(struct _Unwind_Exception * handlerNotFound = false; exception_object->private_2 = (uintptr_t) c; _LIBUNWIND_TRACE_UNWINDING("unwind_phase1(ex_ojb=%p): " - "_URC_HANDLER_FOUND\n", exception_object); + "_URC_HANDLER_FOUND", exception_object); return _URC_NO_REASON; case _URC_CONTINUE_UNWIND: _LIBUNWIND_TRACE_UNWINDING("unwind_phase1(ex_ojb=%p): " - "_URC_CONTINUE_UNWIND\n", exception_object); + "_URC_CONTINUE_UNWIND", exception_object); // continue unwinding break; default: // something went wrong _LIBUNWIND_TRACE_UNWINDING( - "unwind_phase1(ex_ojb=%p): _URC_FATAL_PHASE1_ERROR\n", + "unwind_phase1(ex_ojb=%p): _URC_FATAL_PHASE1_ERROR", exception_object); return _URC_FATAL_PHASE1_ERROR; } @@ -126,18 +126,18 @@ unwind_phase1(struct _Unwind_Exception * static _Unwind_Reason_Code unwind_phase2(struct _Unwind_Exception *exception_object) { - _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p)\n", exception_object); + _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p)", exception_object); // walk each frame until we reach where search phase said to stop _Unwind_FunctionContext_t c = __Unwind_SjLj_GetTopOfFunctionStack(); while (true) { - _LIBUNWIND_TRACE_UNWINDING("unwind_phase2s(ex_ojb=%p): context=%p\n", + _LIBUNWIND_TRACE_UNWINDING("unwind_phase2s(ex_ojb=%p): context=%p", exception_object, c); // check for no more frames if (c == NULL) { _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p): unw_step() reached " - "bottom => _URC_END_OF_STACK\n", + "bottom => _URC_END_OF_STACK", exception_object); return _URC_END_OF_STACK; } @@ -157,7 +157,7 @@ unwind_phase2(struct _Unwind_Exception * case _URC_CONTINUE_UNWIND: // continue unwinding _LIBUNWIND_TRACE_UNWINDING( - "unwind_phase2(ex_ojb=%p): _URC_CONTINUE_UNWIND\n", + "unwind_phase2(ex_ojb=%p): _URC_CONTINUE_UNWIND", exception_object); if ((uintptr_t) c == exception_object->private_2) { // phase 1 said we would stop at this frame, but we did not... @@ -168,7 +168,7 @@ unwind_phase2(struct _Unwind_Exception * case _URC_INSTALL_CONTEXT: _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p): " "_URC_INSTALL_CONTEXT, will resume at " - "landing pad %p\n", + "landing pad %p", exception_object, c->jbuf[1]); // personality routine says to transfer control to landing pad // we may get control back if landing pad calls _Unwind_Resume() @@ -202,7 +202,7 @@ unwind_phase2_forced(struct _Unwind_Exce // get next frame (skip over first which is _Unwind_RaiseException) if (c == NULL) { _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p): unw_step() reached " - "bottom => _URC_END_OF_STACK\n", + "bottom => _URC_END_OF_STACK", exception_object); return _URC_END_OF_STACK; } @@ -214,11 +214,11 @@ unwind_phase2_forced(struct _Unwind_Exce (*stop)(1, action, exception_object->exception_class, exception_object, (struct _Unwind_Context *)c, stop_parameter); _LIBUNWIND_TRACE_UNWINDING("unwind_phase2_forced(ex_ojb=%p): " - "stop function returned %d\n", + "stop function returned %d", exception_object, stopResult); if (stopResult != _URC_NO_REASON) { _LIBUNWIND_TRACE_UNWINDING("unwind_phase2_forced(ex_ojb=%p): " - "stopped by stop function\n", + "stopped by stop function", exception_object); return _URC_FATAL_PHASE2_ERROR; } @@ -227,7 +227,7 @@ unwind_phase2_forced(struct _Unwind_Exce if (c->personality != NULL) { __personality_routine p = (__personality_routine) c->personality; _LIBUNWIND_TRACE_UNWINDING("unwind_phase2_forced(ex_ojb=%p): " - "calling personality function %p\n", + "calling personality function %p", exception_object, p); _Unwind_Reason_Code personalityResult = (*p)(1, action, exception_object->exception_class, exception_object, @@ -235,13 +235,13 @@ unwind_phase2_forced(struct _Unwind_Exce switch (personalityResult) { case _URC_CONTINUE_UNWIND: _LIBUNWIND_TRACE_UNWINDING("unwind_phase2_forced(ex_ojb=%p): " - "personality returned _URC_CONTINUE_UNWIND\n", + "personality returned _URC_CONTINUE_UNWIND", exception_object); // destructors called, continue unwinding break; case _URC_INSTALL_CONTEXT: _LIBUNWIND_TRACE_UNWINDING("unwind_phase2_forced(ex_ojb=%p): " - "personality returned _URC_INSTALL_CONTEXT\n", + "personality returned _URC_INSTALL_CONTEXT", exception_object); // we may get control back if landing pad calls _Unwind_Resume() __Unwind_SjLj_SetTopOfFunctionStack(c); @@ -251,7 +251,7 @@ unwind_phase2_forced(struct _Unwind_Exce // something went wrong _LIBUNWIND_TRACE_UNWINDING("unwind_phase2_forced(ex_ojb=%p): " "personality returned %d, " - "_URC_FATAL_PHASE2_ERROR\n", + "_URC_FATAL_PHASE2_ERROR", exception_object, personalityResult); return _URC_FATAL_PHASE2_ERROR; } @@ -262,7 +262,7 @@ unwind_phase2_forced(struct _Unwind_Exce // call stop function one last time and tell it we've reached the end of the // stack _LIBUNWIND_TRACE_UNWINDING("unwind_phase2_forced(ex_ojb=%p): calling stop " - "function with _UA_END_OF_STACK\n", + "function with _UA_END_OF_STACK", exception_object); _Unwind_Action lastAction = (_Unwind_Action)(_UA_FORCE_UNWIND | _UA_CLEANUP_PHASE | _UA_END_OF_STACK); @@ -278,7 +278,7 @@ unwind_phase2_forced(struct _Unwind_Exce /// Called by __cxa_throw. Only returns if there is a fatal error _LIBUNWIND_EXPORT _Unwind_Reason_Code _Unwind_SjLj_RaiseException(struct _Unwind_Exception *exception_object) { - _LIBUNWIND_TRACE_API("_Unwind_SjLj_RaiseException(ex_obj=%p)\n", exception_object); + _LIBUNWIND_TRACE_API("_Unwind_SjLj_RaiseException(ex_obj=%p)", exception_object); // mark that this is a non-forced unwind, so _Unwind_Resume() can do the right // thing @@ -308,7 +308,7 @@ _Unwind_SjLj_RaiseException(struct _Unwi /// __cxa_rethrow() which in turn calls _Unwind_Resume_or_Rethrow() _LIBUNWIND_EXPORT void _Unwind_SjLj_Resume(struct _Unwind_Exception *exception_object) { - _LIBUNWIND_TRACE_API("_Unwind_SjLj_Resume(ex_obj=%p)\n", exception_object); + _LIBUNWIND_TRACE_API("_Unwind_SjLj_Resume(ex_obj=%p)", exception_object); if (exception_object->private_1 != 0) unwind_phase2_forced(exception_object, @@ -326,7 +326,7 @@ _Unwind_SjLj_Resume(struct _Unwind_Excep _LIBUNWIND_EXPORT _Unwind_Reason_Code _Unwind_SjLj_Resume_or_Rethrow(struct _Unwind_Exception *exception_object) { _LIBUNWIND_TRACE_API("__Unwind_SjLj_Resume_or_Rethrow(ex_obj=%p), " - "private_1=%ld\n", + "private_1=%ld", exception_object, exception_object->private_1); // If this is non-forced and a stopping place was found, then this is a // re-throw. @@ -350,7 +350,7 @@ _LIBUNWIND_EXPORT uintptr_t _Unwind_GetLanguageSpecificData(struct _Unwind_Context *context) { _Unwind_FunctionContext_t ufc = (_Unwind_FunctionContext_t) context; _LIBUNWIND_TRACE_API("_Unwind_GetLanguageSpecificData(context=%p) " - "=> 0x%0lX\n", context, ufc->lsda); + "=> 0x%0lX", context, ufc->lsda); return ufc->lsda; } @@ -358,7 +358,7 @@ _Unwind_GetLanguageSpecificData(struct _ /// Called by personality handler during phase 2 to get register values. _LIBUNWIND_EXPORT uintptr_t _Unwind_GetGR(struct _Unwind_Context *context, int index) { - _LIBUNWIND_TRACE_API("_Unwind_GetGR(context=%p, reg=%d)\n", + _LIBUNWIND_TRACE_API("_Unwind_GetGR(context=%p, reg=%d)", context, index); _Unwind_FunctionContext_t ufc = (_Unwind_FunctionContext_t) context; return ufc->resumeParameters[index]; @@ -368,7 +368,7 @@ _LIBUNWIND_EXPORT uintptr_t _Unwind_GetG /// Called by personality handler during phase 2 to alter register values. _LIBUNWIND_EXPORT void _Unwind_SetGR(struct _Unwind_Context *context, int index, uintptr_t new_value) { - _LIBUNWIND_TRACE_API("_Unwind_SetGR(context=%p, reg=%d, value=0x%0lX)\n" + _LIBUNWIND_TRACE_API("_Unwind_SetGR(context=%p, reg=%d, value=0x%0lX)" , context, index, new_value); _Unwind_FunctionContext_t ufc = (_Unwind_FunctionContext_t) context; ufc->resumeParameters[index] = new_value; @@ -378,7 +378,7 @@ _LIBUNWIND_EXPORT void _Unwind_SetGR(str /// Called by personality handler during phase 2 to get instruction pointer. _LIBUNWIND_EXPORT uintptr_t _Unwind_GetIP(struct _Unwind_Context *context) { _Unwind_FunctionContext_t ufc = (_Unwind_FunctionContext_t) context; - _LIBUNWIND_TRACE_API("_Unwind_GetIP(context=%p) => 0x%lX\n", context, + _LIBUNWIND_TRACE_API("_Unwind_GetIP(context=%p) => 0x%lX", context, ufc->resumeLocation + 1); return ufc->resumeLocation + 1; } @@ -391,7 +391,7 @@ _LIBUNWIND_EXPORT uintptr_t _Unwind_GetI int *ipBefore) { _Unwind_FunctionContext_t ufc = (_Unwind_FunctionContext_t) context; *ipBefore = 0; - _LIBUNWIND_TRACE_API("_Unwind_GetIPInfo(context=%p, %p) => 0x%lX\n", + _LIBUNWIND_TRACE_API("_Unwind_GetIPInfo(context=%p, %p) => 0x%lX", context, ipBefore, ufc->resumeLocation + 1); return ufc->resumeLocation + 1; } @@ -400,7 +400,7 @@ _LIBUNWIND_EXPORT uintptr_t _Unwind_GetI /// Called by personality handler during phase 2 to alter instruction pointer. _LIBUNWIND_EXPORT void _Unwind_SetIP(struct _Unwind_Context *context, uintptr_t new_value) { - _LIBUNWIND_TRACE_API("_Unwind_SetIP(context=%p, value=0x%0lX)\n", + _LIBUNWIND_TRACE_API("_Unwind_SetIP(context=%p, value=0x%0lX)", context, new_value); _Unwind_FunctionContext_t ufc = (_Unwind_FunctionContext_t) context; ufc->resumeLocation = new_value - 1; @@ -413,7 +413,7 @@ _LIBUNWIND_EXPORT uintptr_t _Unwind_GetRegionStart(struct _Unwind_Context *context) { // Not supported or needed for sjlj based unwinding (void)context; - _LIBUNWIND_TRACE_API("_Unwind_GetRegionStart(context=%p)\n", context); + _LIBUNWIND_TRACE_API("_Unwind_GetRegionStart(context=%p)", context); return 0; } @@ -422,7 +422,7 @@ _Unwind_GetRegionStart(struct _Unwind_Co /// is caught. _LIBUNWIND_EXPORT void _Unwind_DeleteException(struct _Unwind_Exception *exception_object) { - _LIBUNWIND_TRACE_API("_Unwind_DeleteException(ex_obj=%p)\n", + _LIBUNWIND_TRACE_API("_Unwind_DeleteException(ex_obj=%p)", exception_object); if (exception_object->exception_cleanup != NULL) (*exception_object->exception_cleanup)(_URC_FOREIGN_EXCEPTION_CAUGHT, @@ -437,7 +437,7 @@ _LIBUNWIND_EXPORT uintptr_t _Unwind_GetDataRelBase(struct _Unwind_Context *context) { // Not supported or needed for sjlj based unwinding (void)context; - _LIBUNWIND_TRACE_API("_Unwind_GetDataRelBase(context=%p)\n", context); + _LIBUNWIND_TRACE_API("_Unwind_GetDataRelBase(context=%p)", context); _LIBUNWIND_ABORT("_Unwind_GetDataRelBase() not implemented"); } @@ -448,14 +448,14 @@ _LIBUNWIND_EXPORT uintptr_t _Unwind_GetTextRelBase(struct _Unwind_Context *context) { // Not supported or needed for sjlj based unwinding (void)context; - _LIBUNWIND_TRACE_API("_Unwind_GetTextRelBase(context=%p)\n", context); + _LIBUNWIND_TRACE_API("_Unwind_GetTextRelBase(context=%p)", context); _LIBUNWIND_ABORT("_Unwind_GetTextRelBase() not implemented"); } /// Called by personality handler to get "Call Frame Area" for current frame. _LIBUNWIND_EXPORT uintptr_t _Unwind_GetCFA(struct _Unwind_Context *context) { - _LIBUNWIND_TRACE_API("_Unwind_GetCFA(context=%p)\n", context); + _LIBUNWIND_TRACE_API("_Unwind_GetCFA(context=%p)", context); if (context != NULL) { _Unwind_FunctionContext_t ufc = (_Unwind_FunctionContext_t) context; // Setjmp/longjmp based exceptions don't have a true CFA. Modified: user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/UnwindCursor.hpp ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/UnwindCursor.hpp Fri Oct 28 16:27:58 2016 (r308053) +++ user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/UnwindCursor.hpp Fri Oct 28 16:31:58 2016 (r308054) @@ -6,7 +6,7 @@ // Source Licenses. See LICENSE.TXT for details. // // -// C++ interface to lower levels of libuwind +// C++ interface to lower levels of libunwind //===----------------------------------------------------------------------===// #ifndef __UNWINDCURSOR_HPP__ @@ -935,7 +935,7 @@ bool UnwindCursor::getInfoFromDwar return true; } } - //_LIBUNWIND_DEBUG_LOG("can't find/use FDE for pc=0x%llX\n", (uint64_t)pc); + //_LIBUNWIND_DEBUG_LOG("can't find/use FDE for pc=0x%llX", (uint64_t)pc); return false; } #endif // _LIBUNWIND_SUPPORT_DWARF_UNWIND @@ -1092,13 +1092,13 @@ bool UnwindCursor::getInfoFromComp funcEnd = firstLevelNextPageFunctionOffset + sects.dso_base; if (pc < funcStart) { _LIBUNWIND_DEBUG_LOG("malformed __unwind_info, pc=0x%llX not in second " - "level compressed unwind table. funcStart=0x%llX\n", + "level compressed unwind table. funcStart=0x%llX", (uint64_t) pc, (uint64_t) funcStart); return false; } if (pc > funcEnd) { _LIBUNWIND_DEBUG_LOG("malformed __unwind_info, pc=0x%llX not in second " - "level compressed unwind table. funcEnd=0x%llX\n", + "level compressed unwind table. funcEnd=0x%llX", (uint64_t) pc, (uint64_t) funcEnd); return false; } @@ -1119,7 +1119,7 @@ bool UnwindCursor::getInfoFromComp } } else { _LIBUNWIND_DEBUG_LOG("malformed __unwind_info at 0x%0llX bad second " - "level page\n", + "level page", (uint64_t) sects.compact_unwind_section); return false; } @@ -1149,7 +1149,7 @@ bool UnwindCursor::getInfoFromComp } if (lsda == 0) { _LIBUNWIND_DEBUG_LOG("found encoding 0x%08X with HAS_LSDA bit set for " - "pc=0x%0llX, but lsda table has no entry\n", + "pc=0x%0llX, but lsda table has no entry", encoding, (uint64_t) pc); return false; } @@ -1162,7 +1162,7 @@ bool UnwindCursor::getInfoFromComp --personalityIndex; // change 1-based to zero-based index if (personalityIndex > sectionHeader.personalityArrayCount()) { _LIBUNWIND_DEBUG_LOG("found encoding 0x%08X with personality index %d, " - "but personality table has only %d entires\n", + "but personality table has only %d entires", encoding, personalityIndex, sectionHeader.personalityArrayCount()); return false; Modified: user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/UnwindLevel1-gcc-ext.c ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/UnwindLevel1-gcc-ext.c Fri Oct 28 16:27:58 2016 (r308053) +++ user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/UnwindLevel1-gcc-ext.c Fri Oct 28 16:31:58 2016 (r308054) @@ -29,11 +29,11 @@ _LIBUNWIND_EXPORT _Unwind_Reason_Code _Unwind_Resume_or_Rethrow(_Unwind_Exception *exception_object) { #if _LIBUNWIND_ARM_EHABI - _LIBUNWIND_TRACE_API("_Unwind_Resume_or_Rethrow(ex_obj=%p), private_1=%ld\n", + _LIBUNWIND_TRACE_API("_Unwind_Resume_or_Rethrow(ex_obj=%p), private_1=%ld", (void *)exception_object, (long)exception_object->unwinder_cache.reserved1); #else - _LIBUNWIND_TRACE_API("_Unwind_Resume_or_Rethrow(ex_obj=%p), private_1=%ld\n", + _LIBUNWIND_TRACE_API("_Unwind_Resume_or_Rethrow(ex_obj=%p), private_1=%ld", (void *)exception_object, (long)exception_object->private_1); #endif @@ -66,7 +66,7 @@ _Unwind_Resume_or_Rethrow(_Unwind_Except _LIBUNWIND_EXPORT uintptr_t _Unwind_GetDataRelBase(struct _Unwind_Context *context) { (void)context; - _LIBUNWIND_TRACE_API("_Unwind_GetDataRelBase(context=%p)\n", (void *)context); + _LIBUNWIND_TRACE_API("_Unwind_GetDataRelBase(context=%p)", (void *)context); _LIBUNWIND_ABORT("_Unwind_GetDataRelBase() not implemented"); } @@ -76,7 +76,7 @@ _Unwind_GetDataRelBase(struct _Unwind_Co _LIBUNWIND_EXPORT uintptr_t _Unwind_GetTextRelBase(struct _Unwind_Context *context) { (void)context; - _LIBUNWIND_TRACE_API("_Unwind_GetTextRelBase(context=%p)\n", (void *)context); + _LIBUNWIND_TRACE_API("_Unwind_GetTextRelBase(context=%p)", (void *)context); _LIBUNWIND_ABORT("_Unwind_GetTextRelBase() not implemented"); } @@ -84,7 +84,7 @@ _Unwind_GetTextRelBase(struct _Unwind_Co /// Scans unwind information to find the function that contains the /// specified code address "pc". _LIBUNWIND_EXPORT void *_Unwind_FindEnclosingFunction(void *pc) { - _LIBUNWIND_TRACE_API("_Unwind_FindEnclosingFunction(pc=%p)\n", pc); + _LIBUNWIND_TRACE_API("_Unwind_FindEnclosingFunction(pc=%p)", pc); // This is slow, but works. // We create an unwind cursor then alter the IP to be pc unw_cursor_t cursor; @@ -108,7 +108,7 @@ _Unwind_Backtrace(_Unwind_Trace_Fn callb unw_getcontext(&uc); unw_init_local(&cursor, &uc); - _LIBUNWIND_TRACE_API("_Unwind_Backtrace(callback=%p)\n", + _LIBUNWIND_TRACE_API("_Unwind_Backtrace(callback=%p)", (void *)(uintptr_t)callback); #if _LIBUNWIND_ARM_EHABI @@ -123,11 +123,11 @@ _Unwind_Backtrace(_Unwind_Trace_Fn callb _Unwind_Reason_Code result; #if !_LIBUNWIND_ARM_EHABI - // ask libuwind to get next frame (skip over first frame which is + // ask libunwind to get next frame (skip over first frame which is // _Unwind_Backtrace()) if (unw_step(&cursor) <= 0) { _LIBUNWIND_TRACE_UNWINDING(" _backtrace: ended because cursor reached " - "bottom of stack, returning %d\n", + "bottom of stack, returning %d", _URC_END_OF_STACK); return _URC_END_OF_STACK; } @@ -164,7 +164,7 @@ _Unwind_Backtrace(_Unwind_Trace_Fn callb unw_get_proc_name(&cursor, functionName, 512, &offset); unw_get_proc_info(&cursor, &frame); _LIBUNWIND_TRACE_UNWINDING( - " _backtrace: start_ip=0x%llX, func=%s, lsda=0x%llX, context=%p\n", + " _backtrace: start_ip=0x%llX, func=%s, lsda=0x%llX, context=%p", (long long)frame.start_ip, functionName, (long long)frame.lsda, (void *)&cursor); } @@ -173,7 +173,7 @@ _Unwind_Backtrace(_Unwind_Trace_Fn callb result = (*callback)((struct _Unwind_Context *)(&cursor), ref); if (result != _URC_NO_REASON) { _LIBUNWIND_TRACE_UNWINDING( - " _backtrace: ended because callback returned %d\n", result); + " _backtrace: ended because callback returned %d", result); return result; } } @@ -195,7 +195,7 @@ _LIBUNWIND_EXPORT const void *_Unwind_Fi bases->tbase = (uintptr_t)info.extra; bases->dbase = 0; // dbase not used on Mac OS X bases->func = (uintptr_t)info.start_ip; - _LIBUNWIND_TRACE_API("_Unwind_Find_FDE(pc=%p) => %p\n", pc, + _LIBUNWIND_TRACE_API("_Unwind_Find_FDE(pc=%p) => %p", pc, (void *)(long) info.unwind_info); return (void *)(long) info.unwind_info; } @@ -206,7 +206,7 @@ _LIBUNWIND_EXPORT uintptr_t _Unwind_GetC unw_cursor_t *cursor = (unw_cursor_t *)context; unw_word_t result; unw_get_reg(cursor, UNW_REG_SP, &result); - _LIBUNWIND_TRACE_API("_Unwind_GetCFA(context=%p) => 0x%" PRIx64 "\n", + _LIBUNWIND_TRACE_API("_Unwind_GetCFA(context=%p) => 0x%" PRIx64, (void *)context, (uint64_t)result); return (uintptr_t)result; } @@ -217,7 +217,7 @@ _LIBUNWIND_EXPORT uintptr_t _Unwind_GetC /// site address. Normally IP is the return address. _LIBUNWIND_EXPORT uintptr_t _Unwind_GetIPInfo(struct _Unwind_Context *context, int *ipBefore) { - _LIBUNWIND_TRACE_API("_Unwind_GetIPInfo(context=%p)\n", (void *)context); + _LIBUNWIND_TRACE_API("_Unwind_GetIPInfo(context=%p)", (void *)context); *ipBefore = 0; return _Unwind_GetIP(context); } @@ -229,7 +229,7 @@ _LIBUNWIND_EXPORT uintptr_t _Unwind_GetI /// This function has existed on Mac OS X since 10.4, but /// was broken until 10.6. _LIBUNWIND_EXPORT void __register_frame(const void *fde) { - _LIBUNWIND_TRACE_API("__register_frame(%p)\n", fde); + _LIBUNWIND_TRACE_API("__register_frame(%p)", fde); _unw_add_dynamic_fde((unw_word_t)(uintptr_t) fde); } @@ -239,7 +239,7 @@ _LIBUNWIND_EXPORT void __register_frame( /// This function has existed on Mac OS X since 10.4, but /// was broken until 10.6. _LIBUNWIND_EXPORT void __deregister_frame(const void *fde) { - _LIBUNWIND_TRACE_API("__deregister_frame(%p)\n", fde); + _LIBUNWIND_TRACE_API("__deregister_frame(%p)", fde); _unw_remove_dynamic_fde((unw_word_t)(uintptr_t) fde); } @@ -259,7 +259,7 @@ _LIBUNWIND_EXPORT void __register_frame_ (void)ob; (void)tb; (void)db; - _LIBUNWIND_TRACE_API("__register_frame_info_bases(%p,%p, %p, %p)\n", + _LIBUNWIND_TRACE_API("__register_frame_info_bases(%p,%p, %p, %p)", fde, ob, tb, db); // do nothing, this function never worked in Mac OS X } @@ -267,7 +267,7 @@ _LIBUNWIND_EXPORT void __register_frame_ _LIBUNWIND_EXPORT void __register_frame_info(const void *fde, void *ob) { (void)fde; (void)ob; - _LIBUNWIND_TRACE_API("__register_frame_info(%p, %p)\n", fde, ob); + _LIBUNWIND_TRACE_API("__register_frame_info(%p, %p)", fde, ob); // do nothing, this function never worked in Mac OS X } @@ -279,33 +279,33 @@ _LIBUNWIND_EXPORT void __register_frame_ (void)tb; (void)db; _LIBUNWIND_TRACE_API("__register_frame_info_table_bases" - "(%p,%p, %p, %p)\n", fde, ob, tb, db); + "(%p,%p, %p, %p)", fde, ob, tb, db); // do nothing, this function never worked in Mac OS X } _LIBUNWIND_EXPORT void __register_frame_info_table(const void *fde, void *ob) { (void)fde; (void)ob; - _LIBUNWIND_TRACE_API("__register_frame_info_table(%p, %p)\n", fde, ob); + _LIBUNWIND_TRACE_API("__register_frame_info_table(%p, %p)", fde, ob); // do nothing, this function never worked in Mac OS X } _LIBUNWIND_EXPORT void __register_frame_table(const void *fde) { (void)fde; - _LIBUNWIND_TRACE_API("__register_frame_table(%p)\n", fde); + _LIBUNWIND_TRACE_API("__register_frame_table(%p)", fde); // do nothing, this function never worked in Mac OS X } _LIBUNWIND_EXPORT void *__deregister_frame_info(const void *fde) { (void)fde; - _LIBUNWIND_TRACE_API("__deregister_frame_info(%p)\n", fde); + _LIBUNWIND_TRACE_API("__deregister_frame_info(%p)", fde); // do nothing, this function never worked in Mac OS X return NULL; } _LIBUNWIND_EXPORT void *__deregister_frame_info_bases(const void *fde) { (void)fde; - _LIBUNWIND_TRACE_API("__deregister_frame_info_bases(%p)\n", fde); + _LIBUNWIND_TRACE_API("__deregister_frame_info_bases(%p)", fde); // do nothing, this function never worked in Mac OS X return NULL; } Modified: user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/UnwindLevel1.c ============================================================================== --- user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/UnwindLevel1.c Fri Oct 28 16:27:58 2016 (r308053) +++ user/alc/PQ_LAUNDRY/contrib/llvm/projects/libunwind/src/UnwindLevel1.c Fri Oct 28 16:31:58 2016 (r308054) @@ -39,17 +39,17 @@ unwind_phase1(unw_context_t *uc, unw_cur // Walk each frame looking for a place to stop. bool handlerNotFound = true; while (handlerNotFound) { - // Ask libuwind to get next frame (skip over first which is + // Ask libunwind to get next frame (skip over first which is // _Unwind_RaiseException). int stepResult = unw_step(cursor); if (stepResult == 0) { _LIBUNWIND_TRACE_UNWINDING("unwind_phase1(ex_ojb=%p): unw_step() reached " - "bottom => _URC_END_OF_STACK\n", + "bottom => _URC_END_OF_STACK", (void *)exception_object); return _URC_END_OF_STACK; } else if (stepResult < 0) { _LIBUNWIND_TRACE_UNWINDING("unwind_phase1(ex_ojb=%p): unw_step failed => " - "_URC_FATAL_PHASE1_ERROR\n", + "_URC_FATAL_PHASE1_ERROR", (void *)exception_object); return _URC_FATAL_PHASE1_ERROR; } @@ -59,7 +59,7 @@ unwind_phase1(unw_context_t *uc, unw_cur unw_word_t sp; if (unw_get_proc_info(cursor, &frameInfo) != UNW_ESUCCESS) { _LIBUNWIND_TRACE_UNWINDING("unwind_phase1(ex_ojb=%p): unw_get_proc_info " - "failed => _URC_FATAL_PHASE1_ERROR\n", + "failed => _URC_FATAL_PHASE1_ERROR", (void *)exception_object); return _URC_FATAL_PHASE1_ERROR; } @@ -77,7 +77,7 @@ unwind_phase1(unw_context_t *uc, unw_cur unw_get_reg(cursor, UNW_REG_IP, &pc); _LIBUNWIND_TRACE_UNWINDING( "unwind_phase1(ex_ojb=%p): pc=0x%" PRIx64 ", start_ip=0x%" PRIx64 - ", func=%s, lsda=0x%" PRIx64 ", personality=0x%" PRIx64 "\n", + ", func=%s, lsda=0x%" PRIx64 ", personality=0x%" PRIx64 "", (void *)exception_object, pc, frameInfo.start_ip, functionName, frameInfo.lsda, frameInfo.handler); } @@ -88,7 +88,7 @@ unwind_phase1(unw_context_t *uc, unw_cur __personality_routine p = (__personality_routine)(long)(frameInfo.handler); _LIBUNWIND_TRACE_UNWINDING( - "unwind_phase1(ex_ojb=%p): calling personality function %p\n", + "unwind_phase1(ex_ojb=%p): calling personality function %p", (void *)exception_object, (void *)(uintptr_t)p); _Unwind_Reason_Code personalityResult = (*p)(1, _UA_SEARCH_PHASE, exception_object->exception_class, @@ -101,13 +101,13 @@ unwind_phase1(unw_context_t *uc, unw_cur unw_get_reg(cursor, UNW_REG_SP, &sp); exception_object->private_2 = (uintptr_t)sp; _LIBUNWIND_TRACE_UNWINDING( - "unwind_phase1(ex_ojb=%p): _URC_HANDLER_FOUND \n", + "unwind_phase1(ex_ojb=%p): _URC_HANDLER_FOUND", (void *)exception_object); return _URC_NO_REASON; case _URC_CONTINUE_UNWIND: _LIBUNWIND_TRACE_UNWINDING( - "unwind_phase1(ex_ojb=%p): _URC_CONTINUE_UNWIND\n", + "unwind_phase1(ex_ojb=%p): _URC_CONTINUE_UNWIND", (void *)exception_object); // continue unwinding break; @@ -115,7 +115,7 @@ unwind_phase1(unw_context_t *uc, unw_cur default: // something went wrong _LIBUNWIND_TRACE_UNWINDING( - "unwind_phase1(ex_ojb=%p): _URC_FATAL_PHASE1_ERROR\n", + "unwind_phase1(ex_ojb=%p): _URC_FATAL_PHASE1_ERROR", (void *)exception_object); return _URC_FATAL_PHASE1_ERROR; } @@ -129,23 +129,23 @@ static _Unwind_Reason_Code unwind_phase2(unw_context_t *uc, unw_cursor_t *cursor, _Unwind_Exception *exception_object) { unw_init_local(cursor, uc); - _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p)\n", + _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p)", (void *)exception_object); // Walk each frame until we reach where search phase said to stop. while (true) { - // Ask libuwind to get next frame (skip over first which is + // Ask libunwind to get next frame (skip over first which is // _Unwind_RaiseException). int stepResult = unw_step(cursor); if (stepResult == 0) { _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p): unw_step() reached " - "bottom => _URC_END_OF_STACK\n", + "bottom => _URC_END_OF_STACK", (void *)exception_object); return _URC_END_OF_STACK; } else if (stepResult < 0) { _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p): unw_step failed => " - "_URC_FATAL_PHASE1_ERROR\n", + "_URC_FATAL_PHASE1_ERROR", (void *)exception_object); return _URC_FATAL_PHASE2_ERROR; } @@ -156,7 +156,7 @@ unwind_phase2(unw_context_t *uc, unw_cur unw_get_reg(cursor, UNW_REG_SP, &sp); if (unw_get_proc_info(cursor, &frameInfo) != UNW_ESUCCESS) { _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p): unw_get_proc_info " - "failed => _URC_FATAL_PHASE1_ERROR\n", + "failed => _URC_FATAL_PHASE1_ERROR", (void *)exception_object); return _URC_FATAL_PHASE2_ERROR; } @@ -172,7 +172,7 @@ unwind_phase2(unw_context_t *uc, unw_cur functionName = ".anonymous."; _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p): start_ip=0x%" PRIx64 ", func=%s, sp=0x%" PRIx64 ", lsda=0x%" PRIx64 - ", personality=0x%" PRIx64 "\n", + ", personality=0x%" PRIx64, (void *)exception_object, frameInfo.start_ip, functionName, sp, frameInfo.lsda, frameInfo.handler); @@ -194,7 +194,7 @@ unwind_phase2(unw_context_t *uc, unw_cur case _URC_CONTINUE_UNWIND: // Continue unwinding _LIBUNWIND_TRACE_UNWINDING( - "unwind_phase2(ex_ojb=%p): _URC_CONTINUE_UNWIND\n", + "unwind_phase2(ex_ojb=%p): _URC_CONTINUE_UNWIND", (void *)exception_object); if (sp == exception_object->private_2) { // Phase 1 said we would stop at this frame, but we did not... @@ -204,7 +204,7 @@ unwind_phase2(unw_context_t *uc, unw_cur break; case _URC_INSTALL_CONTEXT: _LIBUNWIND_TRACE_UNWINDING( - "unwind_phase2(ex_ojb=%p): _URC_INSTALL_CONTEXT\n", + "unwind_phase2(ex_ojb=%p): _URC_INSTALL_CONTEXT", (void *)exception_object); // Personality routine says to transfer control to landing pad. // We may get control back if landing pad calls _Unwind_Resume(). @@ -214,7 +214,7 @@ unwind_phase2(unw_context_t *uc, unw_cur unw_get_reg(cursor, UNW_REG_SP, &sp); _LIBUNWIND_TRACE_UNWINDING("unwind_phase2(ex_ojb=%p): re-entering " "user code with ip=0x%" PRIx64 - ", sp=0x%" PRIx64 "\n", + ", sp=0x%" PRIx64, (void *)exception_object, pc, sp); } unw_resume(cursor); @@ -247,7 +247,7 @@ unwind_phase2_forced(unw_context_t *uc, unw_proc_info_t frameInfo; if (unw_get_proc_info(cursor, &frameInfo) != UNW_ESUCCESS) { _LIBUNWIND_TRACE_UNWINDING("unwind_phase2_forced(ex_ojb=%p): unw_step " - "failed => _URC_END_OF_STACK\n", + "failed => _URC_END_OF_STACK", (void *)exception_object); return _URC_FATAL_PHASE2_ERROR; } @@ -263,7 +263,7 @@ unwind_phase2_forced(unw_context_t *uc, functionName = ".anonymous."; _LIBUNWIND_TRACE_UNWINDING( "unwind_phase2_forced(ex_ojb=%p): start_ip=0x%" PRIx64 - ", func=%s, lsda=0x%" PRIx64 ", personality=0x%" PRIx64 "\n", + ", func=%s, lsda=0x%" PRIx64 ", personality=0x%" PRIx64, (void *)exception_object, frameInfo.start_ip, functionName, frameInfo.lsda, frameInfo.handler); } @@ -275,11 +275,11 @@ unwind_phase2_forced(unw_context_t *uc, (*stop)(1, action, exception_object->exception_class, exception_object, (struct _Unwind_Context *)(cursor), stop_parameter); _LIBUNWIND_TRACE_UNWINDING( - "unwind_phase2_forced(ex_ojb=%p): stop function returned %d\n", + "unwind_phase2_forced(ex_ojb=%p): stop function returned %d", (void *)exception_object, stopResult); if (stopResult != _URC_NO_REASON) { _LIBUNWIND_TRACE_UNWINDING( - "unwind_phase2_forced(ex_ojb=%p): stopped by stop function\n", + "unwind_phase2_forced(ex_ojb=%p): stopped by stop function", (void *)exception_object); return _URC_FATAL_PHASE2_ERROR; } @@ -289,7 +289,7 @@ unwind_phase2_forced(unw_context_t *uc, __personality_routine p = (__personality_routine)(long)(frameInfo.handler); _LIBUNWIND_TRACE_UNWINDING( - "unwind_phase2_forced(ex_ojb=%p): calling personality function %p\n", + "unwind_phase2_forced(ex_ojb=%p): calling personality function %p", (void *)exception_object, (void *)(uintptr_t)p); _Unwind_Reason_Code personalityResult = (*p)(1, action, exception_object->exception_class, exception_object, *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***