From nobody Wed Aug 24 11:22:28 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MCNx02Z0Lz4Zy4L; Wed, 24 Aug 2022 11:22:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MCNx028MMz3lBk; Wed, 24 Aug 2022 11:22:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661340148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+alqBvY34sSErQyM7iYfL1x1jOMc6AbPWMvL6kOHdlA=; b=WR4yrmX9JzJr5FdQFjMjivTAgPZLfAFPog2NRK7Q6HLBdzZPvId2ZAgtW6kgweKdyjLK7t n0999tS4lMm1YOxrnBmMaUIgV/idQvT75I/KS1W27XQN7EnRsUbe0Wo3TMw/DjfBUsW3ji pWx2KXT5VCL5zQ5gTZ+vg7UQMXJi/xjl9IxbSSm9Fv2WTFjH9PNmuif4FbK3HUQ/aH+4Sy uAeDauBWRAmGgRurszG5NtROKuJqXG8zHbKVBaOgHYtNgMsvaK+LlnxzDF+YKB9VTbjOzU YA6L3YYdTf1sHdpH0G218HMnvQ5EzFkvK+iMxVYN5sAXGae9iWxm9F9Jh7IRig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MCNx01Bl5z16hq; Wed, 24 Aug 2022 11:22:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27OBMS3Q090824; Wed, 24 Aug 2022 11:22:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27OBMS5i090823; Wed, 24 Aug 2022 11:22:28 GMT (envelope-from git) Date: Wed, 24 Aug 2022 11:22:28 GMT Message-Id: <202208241122.27OBMS5i090823@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 4e4f49fd4af2 - main - stress2: Added another sigreturn(2) fuzzer test List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4e4f49fd4af29eaffe7c1a1d5e61a4a8f2ffeef4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661340148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+alqBvY34sSErQyM7iYfL1x1jOMc6AbPWMvL6kOHdlA=; b=r5VeCgUsxVj0HDCgmRjQcS0c7z5JFIXOKTnRZpQGMEYNoXO9JN2Js0tKehwg3tDPqDsjk/ 3c6iaQPSo6KcDQtRylHWoSFF9OGh/dcmKfawSMx1v5lTuiW/E+L2FQM+essJsKlV3JIkOs urZg6yfBeWWxrt1T9ciGHTqkzBpeSL+Ag+13A7O5IR6hHSAMqSRBTv5XZFZeFJv6lOixhV gPrPfqzLiIQRhTjajhWnym2FIdLKWOW+llPHwUybR8frQAxAXHRbG2rVlp7nkOFAXEIPX0 Ezaxu4PEdYfxv5YGL3DNkezUnWpv2laGbZZnBfB8u4cpSjzaMy4nISsR9V5QUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661340148; a=rsa-sha256; cv=none; b=R6WGNHrjdvgM21D7zhD2HH1nJkW64jfU1/K5n96LtnVb8mpkvw1fWCVWid3UO4G4bnkJzD EtAfvyFMAQKZkl5DS5+4GoFRItukEtJdGBKtdpC1g5H9/tgMLHIa5EdZnkbmuTtkvEM23f MLIVyDQJw9NiSEccMpvv/P1LXb8dlPq2w/qcJemF1au3jyUa2x/dGDWpcIlf7L8sXn+jeA 4yhfGw1CyoFbdzxLPTmqHoyrYoRKFe9ouJUGwrcTA4gDU9cFbA8kqkFszhCkqOQVputSPp wtWhJ39LXG5oRqinsjkN6PkxCNRLX8JZHiXExs8VASjsmRcItk45TvI1wxOBLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=4e4f49fd4af29eaffe7c1a1d5e61a4a8f2ffeef4 commit 4e4f49fd4af29eaffe7c1a1d5e61a4a8f2ffeef4 Author: Peter Holm AuthorDate: 2022-08-24 11:21:55 +0000 Commit: Peter Holm CommitDate: 2022-08-24 11:21:55 +0000 stress2: Added another sigreturn(2) fuzzer test --- tools/test/stress2/misc/sigreturn2.sh | 69 +++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/tools/test/stress2/misc/sigreturn2.sh b/tools/test/stress2/misc/sigreturn2.sh new file mode 100755 index 000000000000..610922a809ab --- /dev/null +++ b/tools/test/stress2/misc/sigreturn2.sh @@ -0,0 +1,69 @@ +#!/bin/sh + +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2022 Peter Holm +# +# 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. +# + +# A sigreturn(2) syscall fuzzer + +# panic: vm_fault_lookup: fault on nofault entry, addr: 0 +# cpuid = 0 +# time = 1661248103 +# KDB: stack backtrace: +# db_trace_self_wrapper(e,27e1dae0,27e1dae2,ffc07db8,c1f0490,...) at db_trace_self_wrapper+0x28/frame 0xffc07d24 +# vpanic(150b260,ffc07d60,ffc07d60,ffc07e20,12cb565,...) at vpanic+0xf4/frame 0xffc07d40 +# panic(150b260,14ec2f3,0,149349d,1430,...) at panic+0x14/frame 0xffc07d54 +# vm_fault(1e37000,0,4,0,0) at vm_fault+0x1725/frame 0xffc07e20 +# vm_fault_trap(1e37000,3b,4,0,0,0) at vm_fault_trap+0x52/frame 0xffc07e48 +# trap_pfault(3b,0,0) at trap_pfault+0x176/frame 0xffc07e94 +# trap(ffc07f6c,8,28,28,1915b000,...) at trap+0x2d9/frame 0xffc07f60 +# calltrap() at 0xffc031ef/frame 0xffc07f60 +# --- trap 0xc, eip = 0x3b, esp = 0xffc07fac, ebp = 0xffc0340c --- +# (null)() at 0x3b/frame 0xffc0340c +# KDB: enter: panic +# [ thread pid 26126 tid 120029 ] +# Stopped at kdb_enter+0x34: movl $0,kdb_why +# db> x/s version +# version: FreeBSD 14.0-CURRENT #0 ast-n257558-eb20af97a66-dirty: Mon Aug 22 17:53:22 CEST 2022 +# pho@mercat1.netperf.freebsd.org:/media/obj/var/tmp/deviant3/i386.i386/sys/PHO +# db> + +inc=/usr/include/sys/syscall.h +[ -f $inc ] || exit 0 +num=`awk '/SYS_sigreturn/ {print $NF}' < $inc` +old=`grep -E 'sigreturn \*' < $inc | \ + sed 's/.* \([0-9]\{1,3\}\) .*/\1/' | tr '\n' ' '` +num="$num $old" + +start=`date +%s` +while [ $((`date +%s` - start)) -lt 180 ]; do + for i in $num; do + echo "noswap=1 ./syscall4.sh $i" + noswap=1 ./syscall4.sh $i + done +done + +exit 0