From owner-p4-projects@FreeBSD.ORG Mon Jun 9 03:20:43 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2977B10656AB; Mon, 9 Jun 2008 03:20:43 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDF451065680 for ; Mon, 9 Jun 2008 03:20:42 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C9FFE8FC1D for ; Mon, 9 Jun 2008 03:20:42 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m593KgHT052337 for ; Mon, 9 Jun 2008 03:20:42 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m593Kg51052335 for perforce@freebsd.org; Mon, 9 Jun 2008 03:20:42 GMT (envelope-from jb@freebsd.org) Date: Mon, 9 Jun 2008 03:20:42 GMT Message-Id: <200806090320.m593Kg51052335@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 143165 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2008 03:20:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=143165 Change 143165 by jb@freebsd3 on 2008/06/09 03:20:11 The DTrace syscall provider on releng6 breaks the sysent ABI, so it has to be enabled using the BREAK_SYSENT_ABI kernel option. The rest of DTrace functions without this. Affected files ... .. //depot/projects/dtrace6/src/sys/cddl/dev/systrace/systrace.c#2 edit Differences ... ==== //depot/projects/dtrace6/src/sys/cddl/dev/systrace/systrace.c#2 (text+ko) ==== @@ -131,6 +131,7 @@ * function registered. If so, it is a syscall registered * by a loaded module. */ +#ifdef BREAK_SYSENT_ABI if (sysent->sy_systrace_args_func != NULL) /* * Convert the syscall parameters using the registered @@ -144,6 +145,7 @@ * into thhe array of 64-bit values that DTrace * expects. */ +#endif systrace_args(sysnum, params, uargs, &n_args); /* Process the probe using the converted argments. */ @@ -207,21 +209,25 @@ static void systrace_enable(void *arg, dtrace_id_t id, void *parg) { +#ifdef BREAK_SYSENT_ABI int sysnum = SYSTRACE_SYSNUM((uintptr_t)parg); if (SYSTRACE_ISENTRY((uintptr_t)parg)) sysent[sysnum].sy_entry = id; else sysent[sysnum].sy_return = id; +#endif } static void systrace_disable(void *arg, dtrace_id_t id, void *parg) { +#ifdef BREAK_SYSENT_ABI int sysnum = SYSTRACE_SYSNUM((uintptr_t)parg); sysent[sysnum].sy_entry = 0; sysent[sysnum].sy_return = 0; +#endif } static void @@ -261,6 +267,10 @@ switch (type) { case MOD_LOAD: +#ifndef BREAK_SYSENT_ABI + printf("systrace: The BREAK_SYSENT_ABI kernel option is required to use the DTrace syscall provider!\n"); + error = EOPNOTSUPP; +#endif break; case MOD_UNLOAD: