From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 15 22:35:22 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DE7AD16A41F; Thu, 15 Dec 2005 22:35:22 +0000 (GMT) (envelope-from dunstan@freebsd.czest.pl) Received: from freebsd.czest.pl (freebsd.czest.pl [80.48.250.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F51B43D62; Thu, 15 Dec 2005 22:35:22 +0000 (GMT) (envelope-from dunstan@freebsd.czest.pl) Received: from freebsd.czest.pl (freebsd.czest.pl [80.48.250.4]) by freebsd.czest.pl (8.12.10/8.12.9) with ESMTP id jBFMbjPx037825; Thu, 15 Dec 2005 22:37:45 GMT (envelope-from dunstan@freebsd.czest.pl) Received: (from dunstan@localhost) by freebsd.czest.pl (8.13.4/8.12.9/Submit) id jBFMbj7v037824; Thu, 15 Dec 2005 22:37:45 GMT (envelope-from dunstan) Date: Thu, 15 Dec 2005 22:37:45 +0000 From: "Wojciech A. Koszek" To: freebsd-hackers@freebsd.org Message-ID: <20051215223745.GA37768@FreeBSD.czest.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Cc: phk@freebsd.org Subject: [CALL FOR TESTERS] New system call: abort2() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Dec 2005 22:35:23 -0000 (discussed task was picked from Poul-Henning Kamp's TODO list) Hackers, I've implemented abort2() system call. Works just like abort(3), but delivers signal reliably. Here is a prototype: abort2(const char *why, int nargs, void **args); "why" is reason of program abort, "nargs" is number of arguments passed in "args". Both "why" and "args" (with "%p" format) will be printed via log(9). Sample output: [..] pid <3004> abort2: ABORT2 pid <3019> abort2: invalid argument [..] I put two versions: one implemented as KLD so that more people can test it without a problem: http://freebsd.czest.pl/dunstan/FreeBSD/abort2/abort2-0.3.tgz ..and also as a patch: http://freebsd.czest.pl/dunstan/FreeBSD/abort2/diff.1.abort2-sycall If I miss some tests, please let me know, especially in user<->kernelspace interaction area. (currently I run patched kernel and couldn't get a panic in testing process). Short description - function: abort2(const char *why, int nargs, void **args); ..never returns. If improper arguments are used, instead of SIGABRT, SIGKILL is delivered. By improper arguments I understand: invalid pointers -- "why" or "args" or 0 > "nargs" > 16. Comments are welcome! -- * Wojciech A. Koszek && dunstan@FreeBSD.czest.pl