From owner-svn-src-head@FreeBSD.ORG Mon Jun 1 16:13:06 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB749106597C; Mon, 1 Jun 2009 16:13:06 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B92AB8FC17; Mon, 1 Jun 2009 16:13:06 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n51GD6jA083857; Mon, 1 Jun 2009 16:13:06 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n51GD6kZ083855; Mon, 1 Jun 2009 16:13:06 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200906011613.n51GD6kZ083855@svn.freebsd.org> From: Robert Watson Date: Mon, 1 Jun 2009 16:13:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193234 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jun 2009 16:13:07 -0000 Author: rwatson Date: Mon Jun 1 16:13:06 2009 New Revision: 193234 URL: http://svn.freebsd.org/changeset/base/193234 Log: Add 'sy_flags', a currently unused per-syscall entry flags field that will see future use in 9-CURRENT and 8-STABLE for features such as the capability-mode enable flag and pay-as-you-audit. Discussed with: jhb, sson Modified: head/sys/kern/makesyscalls.sh head/sys/sys/sysent.h Modified: head/sys/kern/makesyscalls.sh ============================================================================== --- head/sys/kern/makesyscalls.sh Mon Jun 1 16:00:36 2009 (r193233) +++ head/sys/kern/makesyscalls.sh Mon Jun 1 16:13:06 2009 (r193234) @@ -318,6 +318,13 @@ s/\$//g auditev = $2; } + # + # The currently-empty flags field. + # + { + flags = "0"; + } + $3 == "STD" || $3 == "NODEF" || $3 == "NOARGS" || $3 == "NOPROTO" \ || $3 == "NOIMPL" || $3 == "NOSTD" { parseline() @@ -369,14 +376,14 @@ s/\$//g printf("\t{ %s, (sy_call_t *)", argssize) > sysent column = 8 + 2 + length(argssize) + 15 if ($3 == "NOIMPL") { - printf("%s },", "nosys, AUE_NULL, NULL, 0, 0") > sysent - column = column + length("nosys") + 3 + printf("%s },", "nosys, AUE_NULL, NULL, 0, 0, 0") > sysent + column = column + length("nosys") + length("AUE_NULL") + 3 } else if ($3 == "NOSTD") { - printf("%s },", "lkmressys, AUE_NULL, NULL, 0, 0") > sysent - column = column + length("lkmressys") + 3 + printf("%s },", "lkmressys, AUE_NULL, NULL, 0, 0, 0") > sysent + column = column + length("lkmressys") + length("AUE_NULL") + 3 } else { - printf("%s, %s, NULL, 0, 0 },", funcname, auditev) > sysent - column = column + length(funcname) + length(auditev) + 3 + printf("%s, %s, NULL, 0, 0, %s },", funcname, auditev, flags) > sysent + column = column + length(funcname) + length(auditev) + length(flags) + 3 } align_sysent_comment(column) printf("/* %d = %s */\n", syscall, funcalias) > sysent @@ -426,10 +433,10 @@ s/\$//g argalias) > sysarg printf("%s\t%s%s(struct thread *, struct %s *);\n", rettype, prefix, funcname, argalias) > outdcl - printf("\t{ %s(%s,%s), %s, NULL, 0, 0 },", - wrap, argssize, funcname, auditev) > sysent + printf("\t{ %s(%s,%s), %s, NULL, 0, 0, %s },", + wrap, argssize, funcname, auditev, flags) > sysent align_sysent_comment(8 + 9 + \ - length(argssize) + 1 + length(funcname) + length(auditev) + 4) + length(argssize) + 1 + length(funcname) + length(auditev) + length(flags) + 4) printf("/* %d = old %s */\n", syscall, funcalias) > sysent printf("\t\"%s.%s\",\t\t/* %d = old %s */\n", wrap, funcalias, syscall, funcalias) > sysnames @@ -448,10 +455,10 @@ s/\$//g ncompat++ parseline() printf("%s\to%s();\n", rettype, funcname) > syscompatdcl - printf("\t{ compat(%s,%s), %s, NULL, 0, 0 },", - argssize, funcname, auditev) > sysent + printf("\t{ compat(%s,%s), %s, NULL, 0, 0, %s },", + argssize, funcname, auditev, flags) > sysent align_sysent_comment(8 + 9 + \ - length(argssize) + 1 + length(funcname) + length(auditev) + 4) + length(argssize) + 1 + length(funcname) + length(auditev) + length(flags) + 4) printf("/* %d = old %s */\n", syscall, funcalias) > sysent printf("\t\"old.%s\",\t\t/* %d = old %s */\n", funcalias, syscall, funcalias) > sysnames @@ -462,7 +469,7 @@ s/\$//g next } $3 == "OBSOL" { - printf("\t{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 },") > sysent + printf("\t{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 },") > sysent align_sysent_comment(34) printf("/* %d = obsolete %s */\n", syscall, comment) > sysent printf("\t\"obs_%s\",\t\t\t/* %d = obsolete %s */\n", @@ -473,7 +480,7 @@ s/\$//g next } $3 == "UNIMPL" { - printf("\t{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 },\t\t\t/* %d = %s */\n", + printf("\t{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0 },\t\t\t/* %d = %s */\n", syscall, comment) > sysent printf("\t\"#%d\",\t\t\t/* %d = %s */\n", syscall, syscall, comment) > sysnames Modified: head/sys/sys/sysent.h ============================================================================== --- head/sys/sys/sysent.h Mon Jun 1 16:00:36 2009 (r193233) +++ head/sys/sys/sysent.h Mon Jun 1 16:13:06 2009 (r193234) @@ -60,6 +60,7 @@ struct sysent { /* system call table * /* optional argument conversion function. */ u_int32_t sy_entry; /* DTrace entry ID for systrace. */ u_int32_t sy_return; /* DTrace return ID for systrace. */ + u_int32_t sy_flags; /* General flags for system calls. */ }; struct image_params;