PERFORCE change 42626 for review
Peter Wemm
peter at FreeBSD.org
Sun Nov 16 21:45:31 PST 2003
http://perforce.freebsd.org/chv.cgi?CH=42626
Change 42626 by peter at peter_freefall on 2003/11/16 21:44:34
IFC @42624
Affected files ...
.. //depot/projects/hammer/sys/alpha/alpha/vm_machdep.c#11 integrate
.. //depot/projects/hammer/sys/alpha/osf1/osf1_mount.c#7 integrate
.. //depot/projects/hammer/sys/amd64/amd64/vm_machdep.c#18 integrate
.. //depot/projects/hammer/sys/amd64/include/pcpu.h#14 integrate
.. //depot/projects/hammer/sys/conf/files.sparc64#13 integrate
.. //depot/projects/hammer/sys/conf/kmod.mk#14 integrate
.. //depot/projects/hammer/sys/dev/idt/idt.c#4 integrate
.. //depot/projects/hammer/sys/dev/sio/sio.c#22 integrate
.. //depot/projects/hammer/sys/i386/i386/vm_machdep.c#16 integrate
.. //depot/projects/hammer/sys/i386/include/atomic.h#3 integrate
.. //depot/projects/hammer/sys/i386/include/pcpu.h#6 integrate
.. //depot/projects/hammer/sys/ia64/ia64/vm_machdep.c#17 integrate
.. //depot/projects/hammer/sys/ia64/include/pcpu.h#4 integrate
.. //depot/projects/hammer/sys/kern/kern_mac.c#25 integrate
.. //depot/projects/hammer/sys/netinet/ip_divert.c#10 integrate
.. //depot/projects/hammer/sys/netinet/ip_input.c#23 integrate
.. //depot/projects/hammer/sys/nfsserver/nfs_srvsock.c#5 integrate
.. //depot/projects/hammer/sys/powerpc/powerpc/vm_machdep.c#10 integrate
.. //depot/projects/hammer/sys/security/mac/mac_internal.h#7 integrate
.. //depot/projects/hammer/sys/security/mac/mac_net.c#6 integrate
.. //depot/projects/hammer/sys/security/mac_biba/mac_biba.c#19 integrate
.. //depot/projects/hammer/sys/security/mac_lomac/mac_lomac.c#13 integrate
.. //depot/projects/hammer/sys/security/mac_mls/mac_mls.c#19 integrate
.. //depot/projects/hammer/sys/security/mac_stub/mac_stub.c#3 integrate
.. //depot/projects/hammer/sys/security/mac_test/mac_test.c#16 integrate
.. //depot/projects/hammer/sys/sparc64/sparc64/vm_machdep.c#10 integrate
.. //depot/projects/hammer/sys/sys/mac_policy.h#13 integrate
Differences ...
==== //depot/projects/hammer/sys/alpha/alpha/vm_machdep.c#11 (text+ko) ====
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/alpha/alpha/vm_machdep.c,v 1.95 2003/11/16 06:11:24 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/alpha/alpha/vm_machdep.c,v 1.96 2003/11/16 23:40:05 alc Exp $");
#include "opt_kstack_pages.h"
@@ -395,14 +395,12 @@
int i;
mtx_init(&sf_freelist.sf_lock, "sf_bufs list lock", NULL, MTX_DEF);
- mtx_lock(&sf_freelist.sf_lock);
SLIST_INIT(&sf_freelist.sf_head);
sf_bufs = malloc(nsfbufs * sizeof(struct sf_buf), M_TEMP,
M_NOWAIT | M_ZERO);
for (i = 0; i < nsfbufs; i++)
SLIST_INSERT_HEAD(&sf_freelist.sf_head, &sf_bufs[i], free_list);
sf_buf_alloc_want = 0;
- mtx_unlock(&sf_freelist.sf_lock);
}
/*
==== //depot/projects/hammer/sys/alpha/osf1/osf1_mount.c#7 (text+ko) ====
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/alpha/osf1/osf1_mount.c,v 1.17 2003/08/22 07:20:27 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/alpha/osf1/osf1_mount.c,v 1.18 2003/11/16 21:53:05 kris Exp $");
#include "opt_mac.h"
#include "opt_nfs.h"
@@ -58,6 +58,7 @@
#include <nfs/xdr_subs.h>
#include <nfs/rpcv2.h>
#include <nfs/nfsproto.h>
+#include <rpc/rpcclnt.h>
#include <nfsclient/nfs.h>
#include <nfsclient/nfsmount.h>
#include <nfsclient/nfsargs.h>
==== //depot/projects/hammer/sys/amd64/amd64/vm_machdep.c#18 (text+ko) ====
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.221 2003/11/16 06:11:25 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/vm_machdep.c,v 1.222 2003/11/16 23:40:06 alc Exp $");
#include "opt_isa.h"
#include "opt_kstack_pages.h"
@@ -440,14 +440,12 @@
int i;
mtx_init(&sf_freelist.sf_lock, "sf_bufs list lock", NULL, MTX_DEF);
- mtx_lock(&sf_freelist.sf_lock);
SLIST_INIT(&sf_freelist.sf_head);
sf_bufs = malloc(nsfbufs * sizeof(struct sf_buf), M_TEMP,
M_NOWAIT | M_ZERO);
for (i = 0; i < nsfbufs; i++)
SLIST_INSERT_HEAD(&sf_freelist.sf_head, &sf_bufs[i], free_list);
sf_buf_alloc_want = 0;
- mtx_unlock(&sf_freelist.sf_lock);
}
/*
==== //depot/projects/hammer/sys/amd64/include/pcpu.h#14 (text+ko) ====
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/amd64/include/pcpu.h,v 1.37 2003/11/15 18:58:29 njl Exp $
+ * $FreeBSD: src/sys/amd64/include/pcpu.h,v 1.39 2003/11/17 04:40:58 bde Exp $
*/
#ifndef _MACHINE_PCPU_H_
@@ -45,7 +45,7 @@
register_t pc_rsp0; \
register_t pc_scratch_rsp; /* User %rsp in syscall */ \
u_int pc_apic_id; \
- u_int pc_acpi_id; /* ACPI CPU id */
+ u_int pc_acpi_id /* ACPI CPU id */
#if defined(lint)
@@ -72,7 +72,7 @@
/*
* Evaluates to the address of the per-cpu variable name.
*/
-#define __PCPU_PTR(name) ({ \
+#define __PCPU_PTR(name) __extension__ ({ \
__pcpu_type(name) *__p; \
\
__asm __volatile("movq %%gs:%1,%0; addq %2,%0" \
@@ -86,7 +86,7 @@
/*
* Evaluates to the value of the per-cpu variable name.
*/
-#define __PCPU_GET(name) ({ \
+#define __PCPU_GET(name) __extension__ ({ \
__pcpu_type(name) __result; \
\
if (sizeof(__result) == 1) { \
@@ -123,7 +123,7 @@
/*
* Sets the value of the per-cpu variable name to value val.
*/
-#define __PCPU_SET(name, val) ({ \
+#define __PCPU_SET(name, val) { \
__pcpu_type(name) __val = (val); \
\
if (sizeof(__val) == 1) { \
@@ -153,7 +153,7 @@
} else { \
*__PCPU_PTR(name) = __val; \
} \
-})
+}
#define PCPU_GET(member) __PCPU_GET(pc_ ## member)
#define PCPU_PTR(member) __PCPU_PTR(pc_ ## member)
==== //depot/projects/hammer/sys/conf/files.sparc64#13 (text+ko) ====
@@ -1,7 +1,7 @@
# This file tells config what files go into building a kernel,
# files marked standard are always included.
#
-# $FreeBSD: src/sys/conf/files.sparc64,v 1.47 2003/11/11 07:33:24 jake Exp $
+# $FreeBSD: src/sys/conf/files.sparc64,v 1.48 2003/11/17 04:38:14 imp Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -102,3 +102,9 @@
sparc64/sparc64/trap.c standard
sparc64/sparc64/tsb.c standard
sparc64/sparc64/vm_machdep.c standard
+#
+ukbdmap.h optional ukbd_dflt_keymap \
+ compile-with "/usr/sbin/kbdcontrol -L ${UKBD_DFLT_KEYMAP} | sed -e 's/^static keymap_t.* = /static keymap_t key_map = /' -e 's/^static accentmap_t.* = /static accentmap_t accent_map = /' > ukbdmap.h" \
+ no-obj no-implicit-rule before-depend \
+ clean "ukbdmap.h"
+#
==== //depot/projects/hammer/sys/conf/kmod.mk#14 (text+ko) ====
@@ -1,5 +1,5 @@
# From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91
-# $FreeBSD: src/sys/conf/kmod.mk,v 1.148 2003/11/16 08:10:59 green Exp $
+# $FreeBSD: src/sys/conf/kmod.mk,v 1.149 2003/11/17 05:21:18 imp Exp $
#
# The include file <bsd.kmod.mk> handles installing Kernel Loadable Device
# drivers (KLD's).
@@ -251,7 +251,7 @@
CLEANFILES+= ${_src}
.if !target(${_src})
${_src}:
- ln -s ${KERNBUILDDIR}/${_src} ${.TARGET}
+ - at ln -s ${KERNBUILDDIR}/${_src} ${.TARGET}
.endif
.endfor
.else
==== //depot/projects/hammer/sys/dev/idt/idt.c#4 (text+ko) ====
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/idt/idt.c,v 1.6 2003/08/24 17:49:12 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/idt/idt.c,v 1.7 2003/11/16 22:33:42 imp Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -106,6 +106,14 @@
#include <net/if.h>
#include <net/if_arp.h>
+/* Gross kludge to make lint compile again. This sucks, but oh well */
+#ifdef COMPILING_LINT
+#undef MCLBYTES
+#undef MCLSHIFT
+#define MCLBYTES 2048
+#define MCLSHIFT 11
+#endif
+
#if MCLBYTES != 2048
#error "This nicstar driver depends on 2048 byte mbuf clusters."
#endif
==== //depot/projects/hammer/sys/dev/sio/sio.c#22 (text+ko) ====
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/sio/sio.c,v 1.414 2003/09/28 13:12:26 bde Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/sio/sio.c,v 1.415 2003/11/16 23:05:52 bde Exp $");
#include "opt_comconsole.h"
#include "opt_compat.h"
@@ -1733,7 +1733,7 @@
#endif /* COM_MULTIPORT */
}
-static struct timespec siots[8192];
+static struct timespec siots[8];
static int siotso;
static int volatile siotsunit = -1;
@@ -1743,17 +1743,17 @@
char buf[128];
long long delta;
size_t len;
- int error, i;
+ int error, i, tso;
- for (i = 1; i < siotso; i++) {
+ for (i = 1, tso = siotso; i < tso; i++) {
delta = (long long)(siots[i].tv_sec - siots[i - 1].tv_sec) *
1000000000 +
(siots[i].tv_nsec - siots[i - 1].tv_nsec);
len = sprintf(buf, "%lld\n", delta);
if (delta >= 110000)
len += sprintf(buf + len - 1, ": *** %ld.%09ld\n",
- (long)siots[i].tv_sec, siots[i].tv_nsec);
- if (i == siotso - 1)
+ (long)siots[i].tv_sec, siots[i].tv_nsec) - 1;
+ if (i == tso - 1)
buf[len - 1] = '\0';
error = SYSCTL_OUT(req, buf, len);
if (error != 0)
@@ -1925,11 +1925,9 @@
} else {
outb(com->data_port, *ioptr++);
++com->bytes_out;
- if (com->unit == siotsunit) {
- nanouptime(&siots[siotso]);
- siotso = (siotso + 1) %
- (sizeof siots / sizeof siots[0]);
- }
+ if (com->unit == siotsunit
+ && siotso < sizeof siots / sizeof siots[0])
+ nanouptime(&siots[siotso++]);
}
com->obufq.l_head = ioptr;
if (COM_IIR_TXRDYBUG(com->flags))
==== //depot/projects/hammer/sys/i386/i386/vm_machdep.c#16 (text+ko) ====
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/vm_machdep.c,v 1.217 2003/11/16 06:11:25 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/vm_machdep.c,v 1.218 2003/11/16 23:40:06 alc Exp $");
#include "opt_npx.h"
#ifdef PC98
@@ -576,7 +576,6 @@
int i;
mtx_init(&sf_freelist.sf_lock, "sf_bufs list lock", NULL, MTX_DEF);
- mtx_lock(&sf_freelist.sf_lock);
SLIST_INIT(&sf_freelist.sf_head);
sf_base = kmem_alloc_nofault(kernel_map, nsfbufs * PAGE_SIZE);
sf_bufs = malloc(nsfbufs * sizeof(struct sf_buf), M_TEMP,
@@ -586,7 +585,6 @@
SLIST_INSERT_HEAD(&sf_freelist.sf_head, &sf_bufs[i], free_list);
}
sf_buf_alloc_want = 0;
- mtx_unlock(&sf_freelist.sf_lock);
}
/*
==== //depot/projects/hammer/sys/i386/include/atomic.h#3 (text+ko) ====
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/i386/include/atomic.h,v 1.29 2002/10/14 19:33:12 pirzyk Exp $
+ * $FreeBSD: src/sys/i386/include/atomic.h,v 1.31 2003/11/17 02:55:25 bde Exp $
*/
#ifndef _MACHINE_ATOMIC_H_
#define _MACHINE_ATOMIC_H_
@@ -98,7 +98,8 @@
__asm __volatile(__XSTRING(MPLOCKED) OP \
: "+m" (*p) \
: CONS (V)); \
-}
+} \
+struct __hack
#else /* !__GNUC__ */
@@ -191,7 +192,8 @@
{ \
*p = v; \
__asm __volatile("" : : : "memory"); \
-}
+} \
+struct __hack
#else /* !defined(I386_CPU) */
@@ -219,7 +221,8 @@
: "+m" (*p), /* 0 */ \
"+r" (v) /* 1 */ \
: : "memory"); \
-}
+} \
+struct __hack
#endif /* defined(I386_CPU) */
@@ -368,7 +371,11 @@
static __inline void *
atomic_load_acq_ptr(volatile void *p)
{
- return (void *)atomic_load_acq_int((volatile u_int *)p);
+ /*
+ * The apparently-bogus cast to intptr_t in the following is to
+ * avoid a warning from "gcc -Wbad-function-cast".
+ */
+ return ((void *)(intptr_t)atomic_load_acq_int((volatile u_int *)p));
}
static __inline void
==== //depot/projects/hammer/sys/i386/include/pcpu.h#6 (text+ko) ====
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/i386/include/pcpu.h,v 1.38 2003/11/03 21:53:38 jhb Exp $
+ * $FreeBSD: src/sys/i386/include/pcpu.h,v 1.40 2003/11/17 04:40:58 bde Exp $
*/
#ifndef _MACHINE_PCPU_H_
@@ -49,7 +49,7 @@
struct segment_descriptor *pc_tss_gdt; \
int pc_currentldt; \
u_int pc_acpi_id; \
- u_int pc_apic_id;
+ u_int pc_apic_id
#if defined(lint)
@@ -76,7 +76,7 @@
/*
* Evaluates to the address of the per-cpu variable name.
*/
-#define __PCPU_PTR(name) ({ \
+#define __PCPU_PTR(name) __extension__ ({ \
__pcpu_type(name) *__p; \
\
__asm __volatile("movl %%fs:%1,%0; addl %2,%0" \
@@ -90,7 +90,7 @@
/*
* Evaluates to the value of the per-cpu variable name.
*/
-#define __PCPU_GET(name) ({ \
+#define __PCPU_GET(name) __extension__ ({ \
__pcpu_type(name) __result; \
\
if (sizeof(__result) == 1) { \
@@ -121,7 +121,7 @@
/*
* Sets the value of the per-cpu variable name to value val.
*/
-#define __PCPU_SET(name, val) ({ \
+#define __PCPU_SET(name, val) { \
__pcpu_type(name) __val = (val); \
\
if (sizeof(__val) == 1) { \
@@ -145,7 +145,7 @@
} else { \
*__PCPU_PTR(name) = __val; \
} \
-})
+}
#define PCPU_GET(member) __PCPU_GET(pc_ ## member)
#define PCPU_PTR(member) __PCPU_PTR(pc_ ## member)
==== //depot/projects/hammer/sys/ia64/ia64/vm_machdep.c#17 (text+ko) ====
@@ -38,7 +38,7 @@
*
* from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91
* Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
- * $FreeBSD: src/sys/ia64/ia64/vm_machdep.c,v 1.75 2003/11/16 06:11:25 alc Exp $
+ * $FreeBSD: src/sys/ia64/ia64/vm_machdep.c,v 1.76 2003/11/16 23:40:06 alc Exp $
*/
/*
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -334,14 +334,12 @@
int i;
mtx_init(&sf_freelist.sf_lock, "sf_bufs list lock", NULL, MTX_DEF);
- mtx_lock(&sf_freelist.sf_lock);
SLIST_INIT(&sf_freelist.sf_head);
sf_bufs = malloc(nsfbufs * sizeof(struct sf_buf), M_TEMP,
M_NOWAIT | M_ZERO);
for (i = 0; i < nsfbufs; i++)
SLIST_INSERT_HEAD(&sf_freelist.sf_head, sf_bufs+i, free_list);
sf_buf_alloc_want = 0;
- mtx_unlock(&sf_freelist.sf_lock);
}
/*
==== //depot/projects/hammer/sys/ia64/include/pcpu.h#4 (text+ko) ====
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/ia64/include/pcpu.h,v 1.16 2003/11/15 18:58:29 njl Exp $
+ * $FreeBSD: src/sys/ia64/include/pcpu.h,v 1.17 2003/11/17 03:40:41 bde Exp $
*/
#ifndef _MACHINE_PCPU_H_
@@ -39,7 +39,7 @@
uint32_t pc_awake:1; /* CPU is awake? */ \
uint64_t pc_clock; /* Clock counter. */ \
uint64_t pc_clockadj; /* Clock adjust. */ \
- uint32_t pc_acpi_id; /* ACPI CPU id. */
+ uint32_t pc_acpi_id /* ACPI CPU id. */
struct pcpu;
==== //depot/projects/hammer/sys/kern/kern_mac.c#25 (text+ko) ====
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/kern/kern_mac.c,v 1.106 2003/11/12 22:19:15 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/kern/kern_mac.c,v 1.107 2003/11/16 23:31:44 rwatson Exp $");
#include "opt_mac.h"
#include "opt_devfs.h"
@@ -701,6 +701,7 @@
struct mac mac;
struct vnode *vp;
struct pipe *pipe;
+ struct socket *so;
short label_type;
int error;
@@ -751,6 +752,19 @@
mac_pipe_label_free(intlabel);
break;
+ case DTYPE_SOCKET:
+ so = fp->f_data;
+ intlabel = mac_socket_label_alloc(M_WAITOK);
+ mtx_lock(&Giant); /* Sockets */
+ /* XXX: Socket lock here. */
+ mac_copy_socket_label(so->so_label, intlabel);
+ /* XXX: Socket unlock here. */
+ mtx_unlock(&Giant); /* Sockets */
+ error = mac_externalize_socket_label(intlabel, elements,
+ buffer, mac.m_buflen);
+ mac_socket_label_free(intlabel);
+ break;
+
default:
error = EINVAL;
}
@@ -881,6 +895,7 @@
{
struct label *intlabel;
struct pipe *pipe;
+ struct socket *so;
struct file *fp;
struct mount *mp;
struct vnode *vp;
@@ -945,6 +960,21 @@
mac_pipe_label_free(intlabel);
break;
+ case DTYPE_SOCKET:
+ intlabel = mac_socket_label_alloc(M_WAITOK);
+ error = mac_internalize_socket_label(intlabel, buffer);
+ if (error == 0) {
+ so = fp->f_data;
+ mtx_lock(&Giant); /* Sockets */
+ /* XXX: Socket lock here. */
+ error = mac_socket_label_set(td->td_ucred, so,
+ intlabel);
+ /* XXX: Socket unlock here. */
+ mtx_unlock(&Giant); /* Sockets */
+ }
+ mac_socket_label_free(intlabel);
+ break;
+
default:
error = EINVAL;
}
==== //depot/projects/hammer/sys/netinet/ip_divert.c#10 (text+ko) ====
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/netinet/ip_divert.c,v 1.77 2003/11/08 23:09:42 sam Exp $
+ * $FreeBSD: src/sys/netinet/ip_divert.c,v 1.78 2003/11/17 03:17:49 green Exp $
*/
#include "opt_inet.h"
@@ -284,6 +284,7 @@
divert_tag.mh_flags = PACKET_TAG_DIVERT;
divert_tag.mh_next = m;
divert_tag.mh_data = 0; /* the matching rule # */
+ divert_tag.mh_nextpkt = NULL;
m->m_pkthdr.rcvif = NULL; /* XXX is it necessary ? */
#ifdef MAC
==== //depot/projects/hammer/sys/netinet/ip_input.c#23 (text+ko) ====
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)ip_input.c 8.2 (Berkeley) 1/4/94
- * $FreeBSD: src/sys/netinet/ip_input.c,v 1.255 2003/11/15 01:45:56 andre Exp $
+ * $FreeBSD: src/sys/netinet/ip_input.c,v 1.256 2003/11/17 03:17:49 green Exp $
*/
#include "opt_bootp.h"
@@ -975,6 +975,7 @@
tag.mh_flags = PACKET_TAG_IPFORWARD;
tag.mh_data = (caddr_t)args.next_hop;
tag.mh_next = m;
+ tag.mh_nextpkt = NULL;
(*inetsw[ip_protox[ip->ip_p]].pr_input)(
(struct mbuf *)&tag, hlen);
@@ -1922,6 +1923,7 @@
tag.mh_flags = PACKET_TAG_IPFORWARD;
tag.mh_data = (caddr_t)next_hop;
tag.mh_next = m;
+ tag.mh_nextpkt = NULL;
m = (struct mbuf *)&tag;
}
error = ip_output(m, (struct mbuf *)0, NULL, IP_FORWARDING, 0, NULL);
==== //depot/projects/hammer/sys/nfsserver/nfs_srvsock.c#5 (text+ko) ====
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/nfsserver/nfs_srvsock.c,v 1.85 2003/11/07 22:57:09 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/nfsserver/nfs_srvsock.c,v 1.86 2003/11/17 00:56:53 rwatson Exp $");
/*
* Socket operations for use by nfs
@@ -358,7 +358,7 @@
* and related calls. Right now, this tramples on any
* extensible data in the ucred, fails to initialize the
* mutex, and worse. This must be fixed before FreeBSD
- * 5.0-RELEASE.
+ * 5.3-RELEASE.
*/
bzero((caddr_t)&nd->nd_cr, sizeof (struct ucred));
nd->nd_cr.cr_ref = 1;
==== //depot/projects/hammer/sys/powerpc/powerpc/vm_machdep.c#10 (text+ko) ====
@@ -38,7 +38,7 @@
*
* from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91
* Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
- * $FreeBSD: src/sys/powerpc/powerpc/vm_machdep.c,v 1.92 2003/11/16 06:11:26 alc Exp $
+ * $FreeBSD: src/sys/powerpc/powerpc/vm_machdep.c,v 1.93 2003/11/16 23:40:06 alc Exp $
*/
/*
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -246,7 +246,6 @@
int i;
mtx_init(&sf_freelist.sf_lock, "sf_bufs list lock", NULL, MTX_DEF);
- mtx_lock(&sf_freelist.sf_lock);
SLIST_INIT(&sf_freelist.sf_head);
sf_base = kmem_alloc_nofault(kernel_map, nsfbufs * PAGE_SIZE);
sf_bufs = malloc(nsfbufs * sizeof(struct sf_buf), M_TEMP,
@@ -256,7 +255,6 @@
SLIST_INSERT_HEAD(&sf_freelist.sf_head, &sf_bufs[i], free_list);
}
sf_buf_alloc_want = 0;
- mtx_unlock(&sf_freelist.sf_lock);
}
/*
==== //depot/projects/hammer/sys/security/mac/mac_internal.h#7 (text+ko) ====
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/security/mac/mac_internal.h,v 1.108 2003/11/16 20:01:50 rwatson Exp $
+ * $FreeBSD: src/sys/security/mac/mac_internal.h,v 1.109 2003/11/16 23:31:44 rwatson Exp $
*/
/*
@@ -109,6 +109,8 @@
*/
struct label *mac_pipe_label_alloc(void);
void mac_pipe_label_free(struct label *label);
+struct label *mac_socket_label_alloc(int flag);
+void mac_socket_label_free(struct label *label);
int mac_check_cred_relabel(struct ucred *cred, struct label *newlabel);
int mac_externalize_cred_label(struct label *label, char *elements,
@@ -123,6 +125,10 @@
int mac_socket_label_set(struct ucred *cred, struct socket *so,
struct label *label);
+void mac_copy_socket_label(struct label *src, struct label *dest);
+int mac_externalize_socket_label(struct label *label, char *elements,
+ char *outbuf, size_t outbuflen);
+int mac_internalize_socket_label(struct label *label, char *string);
int mac_externalize_vnode_label(struct label *label, char *elements,
char *outbuf, size_t outbuflen);
==== //depot/projects/hammer/sys/security/mac/mac_net.c#6 (text+ko) ====
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/security/mac/mac_net.c,v 1.108 2003/11/16 20:01:50 rwatson Exp $");
+__FBSDID("$FreeBSD: src/sys/security/mac/mac_net.c,v 1.109 2003/11/16 23:31:44 rwatson Exp $");
#include "opt_mac.h"
@@ -91,9 +91,6 @@
&nmacsockets, 0, "number of sockets in use");
#endif
-static void mac_socket_label_free(struct label *label);
-
-
static struct label *
mbuf_to_label(struct mbuf *mbuf)
{
@@ -220,7 +217,7 @@
return (0);
}
-static struct label *
+struct label *
mac_socket_label_alloc(int flag)
{
struct label *label;
@@ -339,7 +336,7 @@
MAC_DEBUG_COUNTER_DEC(&nmacmbufs);
}
-static void
+void
mac_socket_label_free(struct label *label)
{
@@ -382,6 +379,13 @@
MAC_PERFORM(copy_mbuf_label, src_label, dest_label);
}
+void
+mac_copy_socket_label(struct label *src, struct label *dest)
+{
+
+ MAC_PERFORM(copy_socket_label, src, dest);
+}
+
static int
mac_externalize_ifnet_label(struct label *label, char *elements,
char *outbuf, size_t outbuflen)
@@ -393,7 +397,7 @@
return (error);
}
-static int
+int
mac_externalize_socket_label(struct label *label, char *elements,
char *outbuf, size_t outbuflen)
{
@@ -425,7 +429,7 @@
return (error);
}
-static int
+int
mac_internalize_socket_label(struct label *label, char *string)
{
int error;
==== //depot/projects/hammer/sys/security/mac_biba/mac_biba.c#19 (text+ko) ====
@@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/security/mac_biba/mac_biba.c,v 1.67 2003/11/12 15:09:39 rwatson Exp $
+ * $FreeBSD: src/sys/security/mac_biba/mac_biba.c,v 1.69 2003/11/17 01:04:06 rwatson Exp $
*/
/*
@@ -488,12 +488,6 @@
* Policy module operations.
*/
static void
-mac_biba_destroy(struct mac_policy_conf *conf)
-{
-
-}
-
-static void
mac_biba_init(struct mac_policy_conf *conf)
{
@@ -2607,7 +2601,6 @@
static struct mac_policy_ops mac_biba_ops =
{
- .mpo_destroy = mac_biba_destroy,
.mpo_init = mac_biba_init,
.mpo_init_bpfdesc_label = mac_biba_init_label,
.mpo_init_cred_label = mac_biba_init_label,
@@ -2635,6 +2628,7 @@
.mpo_destroy_vnode_label = mac_biba_destroy_label,
.mpo_copy_mbuf_label = mac_biba_copy_label,
.mpo_copy_pipe_label = mac_biba_copy_label,
+ .mpo_copy_socket_label = mac_biba_copy_label,
.mpo_copy_vnode_label = mac_biba_copy_label,
.mpo_externalize_cred_label = mac_biba_externalize_label,
.mpo_externalize_ifnet_label = mac_biba_externalize_label,
==== //depot/projects/hammer/sys/security/mac_lomac/mac_lomac.c#13 (text+ko) ====
@@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/security/mac_lomac/mac_lomac.c,v 1.21 2003/11/12 03:14:30 rwatson Exp $
+ * $FreeBSD: src/sys/security/mac_lomac/mac_lomac.c,v 1.23 2003/11/17 01:04:06 rwatson Exp $
*/
/*
@@ -599,12 +599,6 @@
* Policy module operations.
*/
static void
-mac_lomac_destroy(struct mac_policy_conf *conf)
-{
-
-}
-
-static void
mac_lomac_init(struct mac_policy_conf *conf)
{
@@ -2585,7 +2579,6 @@
static struct mac_policy_ops mac_lomac_ops =
{
- .mpo_destroy = mac_lomac_destroy,
.mpo_init = mac_lomac_init,
.mpo_init_bpfdesc_label = mac_lomac_init_label,
.mpo_init_cred_label = mac_lomac_init_label,
@@ -2615,6 +2608,7 @@
.mpo_destroy_vnode_label = mac_lomac_destroy_label,
.mpo_copy_mbuf_label = mac_lomac_copy_label,
.mpo_copy_pipe_label = mac_lomac_copy_label,
+ .mpo_copy_socket_label = mac_lomac_copy_label,
.mpo_copy_vnode_label = mac_lomac_copy_label,
.mpo_externalize_cred_label = mac_lomac_externalize_label,
.mpo_externalize_ifnet_label = mac_lomac_externalize_label,
==== //depot/projects/hammer/sys/security/mac_mls/mac_mls.c#19 (text+ko) ====
@@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/security/mac_mls/mac_mls.c,v 1.54 2003/11/12 15:09:39 rwatson Exp $
+ * $FreeBSD: src/sys/security/mac_mls/mac_mls.c,v 1.56 2003/11/17 01:04:07 rwatson Exp $
*/
/*
@@ -454,12 +454,6 @@
* Policy module operations.
*/
static void
-mac_mls_destroy(struct mac_policy_conf *conf)
-{
-
-}
-
-static void
mac_mls_init(struct mac_policy_conf *conf)
{
@@ -2379,7 +2373,6 @@
static struct mac_policy_ops mac_mls_ops =
{
- .mpo_destroy = mac_mls_destroy,
.mpo_init = mac_mls_init,
.mpo_init_bpfdesc_label = mac_mls_init_label,
.mpo_init_cred_label = mac_mls_init_label,
@@ -2407,6 +2400,7 @@
.mpo_destroy_vnode_label = mac_mls_destroy_label,
.mpo_copy_mbuf_label = mac_mls_copy_label,
.mpo_copy_pipe_label = mac_mls_copy_label,
+ .mpo_copy_socket_label = mac_mls_copy_label,
.mpo_copy_vnode_label = mac_mls_copy_label,
.mpo_externalize_cred_label = mac_mls_externalize_label,
.mpo_externalize_ifnet_label = mac_mls_externalize_label,
==== //depot/projects/hammer/sys/security/mac_stub/mac_stub.c#3 (text+ko) ====
@@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/security/mac_stub/mac_stub.c,v 1.33 2003/11/16 18:28:58 rwatson Exp $
+ * $FreeBSD: src/sys/security/mac_stub/mac_stub.c,v 1.34 2003/11/16 23:31:45 rwatson Exp $
*/
/*
@@ -1032,6 +1032,7 @@
.mpo_destroy_vnode_label = stub_destroy_label,
.mpo_copy_mbuf_label = stub_copy_label,
.mpo_copy_pipe_label = stub_copy_label,
+ .mpo_copy_socket_label = stub_copy_label,
.mpo_copy_vnode_label = stub_copy_label,
.mpo_externalize_cred_label = stub_externalize_label,
.mpo_externalize_ifnet_label = stub_externalize_label,
==== //depot/projects/hammer/sys/security/mac_test/mac_test.c#16 (text+ko) ====
@@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/security/mac_test/mac_test.c,v 1.35 2003/11/16 18:28:58 rwatson Exp $
+ * $FreeBSD: src/sys/security/mac_test/mac_test.c,v 1.36 2003/11/16 23:31:45 rwatson Exp $
*/
/*
@@ -570,6 +570,14 @@
}
static void
+mac_test_copy_socket_label(struct label *src, struct label *dest)
+{
+
+ ASSERT_SOCKET_LABEL(src);
+ ASSERT_SOCKET_LABEL(dest);
+}
+
+static void
mac_test_copy_vnode_label(struct label *src, struct label *dest)
{
@@ -1805,6 +1813,7 @@
.mpo_destroy_vnode_label = mac_test_destroy_vnode_label,
.mpo_copy_mbuf_label = mac_test_copy_mbuf_label,
.mpo_copy_pipe_label = mac_test_copy_pipe_label,
+ .mpo_copy_socket_label = mac_test_copy_socket_label,
.mpo_copy_vnode_label = mac_test_copy_vnode_label,
.mpo_externalize_cred_label = mac_test_externalize_label,
.mpo_externalize_ifnet_label = mac_test_externalize_label,
==== //depot/projects/hammer/sys/sparc64/sparc64/vm_machdep.c#10 (text+ko) ====
@@ -40,7 +40,7 @@
* from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91
* Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
* from: FreeBSD: src/sys/i386/i386/vm_machdep.c,v 1.167 2001/07/12
- * $FreeBSD: src/sys/sparc64/sparc64/vm_machdep.c,v 1.54 2003/11/16 06:11:26 alc Exp $
+ * $FreeBSD: src/sys/sparc64/sparc64/vm_machdep.c,v 1.55 2003/11/16 23:40:06 alc Exp $
*/
#include "opt_kstack_pages.h"
@@ -373,7 +373,6 @@
int i;
mtx_init(&sf_freelist.sf_lock, "sf_bufs list lock", NULL, MTX_DEF);
- mtx_lock(&sf_freelist.sf_lock);
SLIST_INIT(&sf_freelist.sf_head);
sf_base = kmem_alloc_nofault(kernel_map, nsfbufs * PAGE_SIZE);
sf_bufs = malloc(nsfbufs * sizeof(struct sf_buf), M_TEMP,
@@ -383,7 +382,6 @@
SLIST_INSERT_HEAD(&sf_freelist.sf_head, &sf_bufs[i], free_list);
}
sf_buf_alloc_want = 0;
- mtx_unlock(&sf_freelist.sf_lock);
}
/*
==== //depot/projects/hammer/sys/sys/mac_policy.h#13 (text+ko) ====
@@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/sys/mac_policy.h,v 1.43 2003/08/21 18:21:22 rwatson Exp $
+ * $FreeBSD: src/sys/sys/mac_policy.h,v 1.44 2003/11/16 23:31:45 rwatson Exp $
*/
/*
* Kernel interface for MAC policy modules.
@@ -112,6 +112,8 @@
struct label *dest);
void (*mpo_copy_pipe_label)(struct label *src,
struct label *dest);
+ void (*mpo_copy_socket_label)(struct label *src,
+ struct label *dest);
void (*mpo_copy_vnode_label)(struct label *src,
struct label *dest);
int (*mpo_externalize_cred_label)(struct label *label,
More information about the p4-projects
mailing list