From owner-freebsd-hackers@FreeBSD.ORG Fri Feb 11 09:48:00 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EC901065670 for ; Fri, 11 Feb 2011 09:48:00 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id F270E8FC15 for ; Fri, 11 Feb 2011 09:47:59 +0000 (UTC) Received: from outgoing.leidinger.net (p57B3B9CC.dip.t-dialin.net [87.179.185.204]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 37149844012; Fri, 11 Feb 2011 10:30:32 +0100 (CET) Received: from webmail.leidinger.net (unknown [IPv6:fd73:10c7:2053:1::2:102]) by outgoing.leidinger.net (Postfix) with ESMTP id 2274B2F48; Fri, 11 Feb 2011 10:30:29 +0100 (CET) Received: (from www@localhost) by webmail.leidinger.net (8.14.4/8.13.8/Submit) id p1B9USQ2072052; Fri, 11 Feb 2011 10:30:28 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.ec.europa.eu (pslux.ec.europa.eu [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Fri, 11 Feb 2011 10:30:28 +0100 Message-ID: <20110211103028.12684f54yrw8tgqo@webmail.leidinger.net> Date: Fri, 11 Feb 2011 10:30:28 +0100 From: Alexander Leidinger To: hackers@freebsd.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_3y2cjioe7e80" Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 37149844012.A7A5E X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=1.351, required 6, autolearn=disabled, RDNS_NONE 1.27, TW_KM 0.08) X-EBL-MailScanner-SpamScore: s X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1298021433.35377@C3NLCtrvSL2/Pe4y3HmBfw X-EBL-Spam-Status: No X-Mailman-Approved-At: Fri, 11 Feb 2011 12:15:57 +0000 Cc: kibab@freebsd.org Subject: CFR: FEATURE macros for AUDIT/CAM/IPC/KTR/MAC/NFS/NTP/PMC/SYSV/... 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: Fri, 11 Feb 2011 09:48:00 -0000 This message is in MIME format. --=_3y2cjioe7e80 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit Hi, during the last GSoC various FEATURE macros where added to the system. Before committing them, I would like to get some review (like if macro is in the correct file, and for those FEATURES where the description was not taken from NOTES if the description is OK). If nobody complains, I would like to commit this in 1-2 weeks. If you need more time to review, just tell me. Here is the list of affected files (for those impatient ones which do not want to look at the attached patch before noticing that they are not interested to look at it): ---snip--- cam/cam.c fs/nfsclient/nfs_clvfsops.c fs/nfsserver/nfs_nfsdport.c kern/kern_dtrace.c kern/kern_ktr.c kern/kern_ktrace.c kern/kern_lock.c kern/kern_lockstat.c kern/kern_ntptime.c kern/kern_pmc.c kern/kern_prot.c kern/ksched.c kern/subr_mchain.c kern/subr_stack.c kern/sysv_msg.c kern/sysv_sem.c kern/sysv_shm.c kern/uipc_cow.c kern/uipc_mqueue.c kern/uipc_sem.c nfsclient/nfs_vfsops.c nfsserver/nfs_serv.c security/audit/audit.c security/mac/mac_syscalls.c ---snip--- Thanks, Alexander. -- Most people in this society who aren't actively mad are, at best, reformed or potential lunatics. -- Susan Sontag http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 --=_3y2cjioe7e80 Content-Type: text/x-patch; charset=UTF-8; name="features_rest.diff" Content-Disposition: attachment; filename="features_rest.diff" Content-Transfer-Encoding: 7bit Index: cam/cam.c =================================================================== --- cam/cam.c (Revision 218482) +++ cam/cam.c (Arbeitskopie) @@ -51,6 +51,9 @@ #include #include #include + +FEATURE(scbus, "SCSI devices support"); + #endif static int camstatusentrycomp(const void *key, const void *member); Index: fs/nfsclient/nfs_clvfsops.c =================================================================== --- fs/nfsclient/nfs_clvfsops.c (Revision 218482) +++ fs/nfsclient/nfs_clvfsops.c (Arbeitskopie) @@ -73,6 +73,8 @@ #include #include +FEATURE(nfscl, "NFSv4 client"); + extern int nfscl_ticks; extern struct timeval nfsboottime; extern struct nfsstats newnfsstats; Index: fs/nfsserver/nfs_nfsdport.c =================================================================== --- fs/nfsserver/nfs_nfsdport.c (Revision 218482) +++ fs/nfsserver/nfs_nfsdport.c (Arbeitskopie) @@ -46,6 +46,8 @@ #include #include +FEATURE(nfsd, "NFSv4 server"); + extern u_int32_t newnfs_true, newnfs_false, newnfs_xdrneg1; extern int nfsrv_useacl; extern int newnfs_numnfsd; Index: kern/kern_dtrace.c =================================================================== --- kern/kern_dtrace.c (Revision 218482) +++ kern/kern_dtrace.c (Arbeitskopie) @@ -37,10 +37,14 @@ #include #include #include +#include #define KDTRACE_PROC_SIZE 64 #define KDTRACE_THREAD_SIZE 256 +FEATURE(kdtrace_hooks, + "Kernel DTrace hooks which are required to load DTrace kernel modules"); + MALLOC_DEFINE(M_KDTRACE, "kdtrace", "DTrace hooks"); /* Return the DTrace process data size compiled in the kernel hooks. */ Index: kern/kern_ktr.c =================================================================== --- kern/kern_ktr.c (Revision 218482) +++ kern/kern_ktr.c (Arbeitskopie) @@ -80,6 +80,8 @@ #define KTR_CPU PCPU_GET(cpuid) #endif +FEATURE(ktr, "Kernel support for KTR kernel tracing facility"); + SYSCTL_NODE(_debug, OID_AUTO, ktr, CTLFLAG_RD, 0, "KTR options"); int ktr_cpumask = KTR_CPUMASK; Index: kern/kern_ktrace.c =================================================================== --- kern/kern_ktrace.c (Revision 218482) +++ kern/kern_ktrace.c (Arbeitskopie) @@ -83,6 +83,8 @@ #ifdef KTRACE +FEATURE(ktrace, "Kernel support for system-call tracing"); + #ifndef KTRACE_REQUEST_POOL #define KTRACE_REQUEST_POOL 100 #endif Index: kern/kern_lock.c =================================================================== --- kern/kern_lock.c (Revision 218482) +++ kern/kern_lock.c (Arbeitskopie) @@ -1299,6 +1299,10 @@ } #ifdef INVARIANT_SUPPORT + +FEATURE(invariant_support, + "Support for modules compiled with INVARIANTS option"); + #ifndef INVARIANTS #undef _lockmgr_assert #endif Index: kern/kern_lockstat.c =================================================================== --- kern/kern_lockstat.c (Revision 218482) +++ kern/kern_lockstat.c (Arbeitskopie) @@ -39,7 +39,10 @@ #include #include #include - +#include +#include +#include +FEATURE(kdtrace_hooks, "Kernel DTRACE hooks"); /* * The following must match the type definition of dtrace_probe. It is * defined this way to avoid having to rely on CDDL code. Index: kern/kern_ntptime.c =================================================================== --- kern/kern_ntptime.c (Revision 218482) +++ kern/kern_ntptime.c (Arbeitskopie) @@ -51,6 +51,10 @@ #include #include +#ifdef PPS_SYNC +FEATURE(pps_sync, "Support usage of external PPS signal by kernel PLL"); +#endif + /* * Single-precision macros for 64-bit machines */ Index: kern/kern_pmc.c =================================================================== --- kern/kern_pmc.c (Revision 218482) +++ kern/kern_pmc.c (Arbeitskopie) @@ -37,8 +37,10 @@ #include #include #include +#include #ifdef HWPMC_HOOKS +FEATURE(hwpmc_hooks, "Kernel support for HW PMC"); #define PMC_KERNEL_VERSION PMC_VERSION #else #define PMC_KERNEL_VERSION 0 Index: kern/kern_prot.c =================================================================== --- kern/kern_prot.c (Revision 218482) +++ kern/kern_prot.c (Arbeitskopie) @@ -69,6 +69,11 @@ #include #include +#ifdef REGRESSION +FEATURE(regression, + "Kernel support for interfaces nessesary for regression testing (SECURITY RISK!)"); +#endif + #if defined(INET) || defined(INET6) #include #include Index: kern/ksched.c =================================================================== --- kern/ksched.c (Revision 218482) +++ kern/ksched.c (Arbeitskopie) @@ -41,12 +41,16 @@ #include #include #include +#include +#include #include #include #include #include #include +FEATURE(kposix_priority_scheduling, "POSIX P1003.1B realtime extensions"); + /* ksched: Real-time extension to support POSIX priority scheduling. */ Index: kern/subr_mchain.c =================================================================== --- kern/subr_mchain.c (Revision 218482) +++ kern/subr_mchain.c (Arbeitskopie) @@ -32,6 +32,7 @@ #include #include +#include #include #include #include @@ -40,6 +41,8 @@ #include +FEATURE(libmchain, "mchain library"); + MODULE_VERSION(libmchain, 1); #define MBERROR(format, ...) printf("%s(%d): "format, __func__ , \ Index: kern/subr_stack.c =================================================================== --- kern/subr_stack.c (Revision 218482) +++ kern/subr_stack.c (Arbeitskopie) @@ -39,7 +39,10 @@ #include #include #include +#include +FEATURE(stack, "Support for capturing kernel stack"); + static MALLOC_DEFINE(M_STACK, "stack", "Stack Traces"); static int stack_symbol(vm_offset_t pc, char *namebuf, u_int buflen, Index: kern/sysv_msg.c =================================================================== --- kern/sysv_msg.c (Revision 218482) +++ kern/sysv_msg.c (Arbeitskopie) @@ -72,6 +72,8 @@ #include +FEATURE(sysv_msg, "System V message queues support"); + static MALLOC_DEFINE(M_MSG, "msg", "SVID compatible message queues"); static int msginit(void); Index: kern/sysv_sem.c =================================================================== --- kern/sysv_sem.c (Revision 218482) +++ kern/sysv_sem.c (Arbeitskopie) @@ -62,6 +62,8 @@ #include +FEATURE(sysv_sem, "System V semaphores support"); + static MALLOC_DEFINE(M_SEM, "sem", "SVID compatible semaphores"); #ifdef SEM_DEBUG Index: kern/sysv_shm.c =================================================================== --- kern/sysv_shm.c (Revision 218482) +++ kern/sysv_shm.c (Arbeitskopie) @@ -95,6 +95,8 @@ #include #include +FEATURE(sysv_shm, "System V shared memory segments support"); + static MALLOC_DEFINE(M_SHM, "shm", "SVID compatible shared memory segments"); static int shmget_allocate_segment(struct thread *td, Index: kern/uipc_cow.c =================================================================== --- kern/uipc_cow.c (Revision 218482) +++ kern/uipc_cow.c (Arbeitskopie) @@ -40,6 +40,7 @@ #include #include +#include #include #include #include @@ -57,6 +58,7 @@ #include #include +FEATURE(zero_copy_sockets, "Zero copy sockets support"); struct netsend_cow_stats { int attempted; Index: kern/uipc_mqueue.c =================================================================== --- kern/uipc_mqueue.c (Revision 218482) +++ kern/uipc_mqueue.c (Arbeitskopie) @@ -82,6 +82,8 @@ #include #include +FEATURE(p1003_1b_mqueue, "POSIX P1003.1B message queues support"); + /* * Limits and constants */ Index: kern/uipc_sem.c =================================================================== --- kern/uipc_sem.c (Revision 218482) +++ kern/uipc_sem.c (Arbeitskopie) @@ -65,6 +65,7 @@ #include +FEATURE(p1003_1b_semaphores, "POSIX1003.1B semaphores support"); /* * TODO * Index: nfsclient/nfs_vfsops.c =================================================================== --- nfsclient/nfs_vfsops.c (Revision 218482) +++ nfsclient/nfs_vfsops.c (Arbeitskopie) @@ -78,6 +78,8 @@ #include #include +FEATURE(nfsclient, "NFS client"); + MALLOC_DEFINE(M_NFSREQ, "nfsclient_req", "NFS request header"); MALLOC_DEFINE(M_NFSBIGFH, "nfsclient_bigfh", "NFS version 3 file handle"); MALLOC_DEFINE(M_NFSDIROFF, "nfsclient_diroff", "NFS directory offset data"); Index: nfsserver/nfs_serv.c =================================================================== --- nfsserver/nfs_serv.c (Revision 218482) +++ nfsserver/nfs_serv.c (Arbeitskopie) @@ -97,6 +97,8 @@ #include #include +FEATURE(nfsserver, "NFS server"); + #ifdef NFSRV_DEBUG #define nfsdbprintf(info) printf info #else Index: security/audit/audit.c =================================================================== --- security/audit/audit.c (Revision 218482) +++ security/audit/audit.c (Arbeitskopie) @@ -72,6 +72,8 @@ #include +FEATURE(audit, "BSM audit support"); + static uma_zone_t audit_record_zone; static MALLOC_DEFINE(M_AUDITCRED, "audit_cred", "Audit cred storage"); MALLOC_DEFINE(M_AUDITDATA, "audit_data", "Audit data storage"); Index: security/mac/mac_syscalls.c =================================================================== --- security/mac/mac_syscalls.c (Revision 218482) +++ security/mac/mac_syscalls.c (Arbeitskopie) @@ -56,6 +56,7 @@ #include #include #include +#include #include #include #include @@ -72,6 +73,8 @@ #ifdef MAC +FEATURE(mac, "Mandatory Access Control support"); + int __mac_get_pid(struct thread *td, struct __mac_get_pid_args *uap) { --=_3y2cjioe7e80--