PERFORCE change 118426 for review
Robert Watson
rwatson at FreeBSD.org
Thu Apr 19 17:27:14 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=118426
Change 118426 by rwatson at rwatson_zoo on 2007/04/19 17:26:35
Integrate TrustedBSD audit3 branch from TrustedBSD base branch to
loop back the remainder of OpenBSM 1.0 alpha 14.
Affected files ...
.. //depot/projects/trustedbsd/audit3/UPDATING#20 integrate
.. //depot/projects/trustedbsd/audit3/etc/mtree/BSD.include.dist#13 integrate
.. //depot/projects/trustedbsd/audit3/lib/libc/stdio/fputs.3#3 integrate
.. //depot/projects/trustedbsd/audit3/libexec/ftpd/ftpcmd.y#5 integrate
.. //depot/projects/trustedbsd/audit3/libexec/ftpd/ftpd.8#6 integrate
.. //depot/projects/trustedbsd/audit3/libexec/ftpd/ftpd.c#8 integrate
.. //depot/projects/trustedbsd/audit3/share/man/man7/hier.7#9 integrate
.. //depot/projects/trustedbsd/audit3/sys/amd64/linux32/linux32_dummy.c#9 integrate
.. //depot/projects/trustedbsd/audit3/sys/amd64/linux32/linux32_machdep.c#13 integrate
.. //depot/projects/trustedbsd/audit3/sys/bsm/audit.h#37 integrate
.. //depot/projects/trustedbsd/audit3/sys/bsm/audit_internal.h#17 integrate
.. //depot/projects/trustedbsd/audit3/sys/bsm/audit_kevents.h#33 integrate
.. //depot/projects/trustedbsd/audit3/sys/bsm/audit_record.h#25 integrate
.. //depot/projects/trustedbsd/audit3/sys/cam/cam_sim.c#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/cam/cam_sim.h#4 integrate
.. //depot/projects/trustedbsd/audit3/sys/cam/cam_xpt.c#13 integrate
.. //depot/projects/trustedbsd/audit3/sys/compat/opensolaris/kern/opensolaris_vfs.c#3 integrate
.. //depot/projects/trustedbsd/audit3/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c#4 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/ath/if_ath.c#16 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/hwpmc/hwpmc_logging.c#4 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/hwpmc/hwpmc_mod.c#8 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/hwpmc/hwpmc_piv.c#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/ral/rt2560.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/isa/ad1816.c#7 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/isa/ess.c#7 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/isa/mss.c#8 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/isa/sb16.c#7 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/isa/sb8.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/pci/als4000.c#7 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/pci/atiixp.c#8 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/pci/au88x0.c#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/pci/aureal.c#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/pci/cmi.c#11 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/pci/cs4281.c#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/pci/csapcm.c#7 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/pci/ds1.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/pci/emu10k1.c#9 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/pci/emu10kx-pcm.c#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/pci/es137x.c#9 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/pci/fm801.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/pci/hda/hdac.c#4 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/pci/ich.c#11 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/pci/maestro3.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/pci/solo.c#8 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/pci/t4dwave.c#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/pci/via8233.c#10 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/pci/via82c686.c#7 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/pci/vibes.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/pcm/ac97.c#9 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/pcm/ac97.h#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/pcm/ac97_patch.c#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/pcm/ac97_patch.h#6 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/pcm/buffer.c#9 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/pcm/buffer.h#7 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/pcm/sound.h#11 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/sound/sbus/cs4231.c#4 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/usb/if_ural.c#13 integrate
.. //depot/projects/trustedbsd/audit3/sys/dev/wi/if_wi.c#13 integrate
.. //depot/projects/trustedbsd/audit3/sys/i386/i386/bios.c#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/i386/i386/identcpu.c#14 integrate
.. //depot/projects/trustedbsd/audit3/sys/kern/kern_intr.c#12 integrate
.. //depot/projects/trustedbsd/audit3/sys/kern/subr_witness.c#12 integrate
.. //depot/projects/trustedbsd/audit3/sys/kern/uipc_syscalls.c#15 integrate
.. //depot/projects/trustedbsd/audit3/sys/netinet/sctp_indata.c#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/netinet/sctp_input.c#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/netinet/sctp_lock_bsd.h#4 integrate
.. //depot/projects/trustedbsd/audit3/sys/netinet/sctp_output.c#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/netinet/sctp_pcb.c#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/netinet/sctp_structs.h#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/netinet/sctp_uio.h#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/netinet/sctp_usrreq.c#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/netinet/sctp_var.h#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/netinet/sctputil.c#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/netinet/sctputil.h#5 integrate
.. //depot/projects/trustedbsd/audit3/sys/netinet/tcp_subr.c#16 integrate
.. //depot/projects/trustedbsd/audit3/sys/sys/interrupt.h#8 integrate
.. //depot/projects/trustedbsd/audit3/sys/sys/socket.h#7 integrate
.. //depot/projects/trustedbsd/audit3/sys/vm/vm_contig.c#15 integrate
.. //depot/projects/trustedbsd/audit3/sys/vm/vm_param.h#4 integrate
.. //depot/projects/trustedbsd/audit3/tools/regression/sockets/sendfile/Makefile#3 integrate
.. //depot/projects/trustedbsd/audit3/tools/regression/sockets/sendfile/sendfile.c#2 integrate
.. //depot/projects/trustedbsd/audit3/usr.bin/lastcomm/lastcomm.1#4 integrate
.. //depot/projects/trustedbsd/audit3/usr.bin/lastcomm/lastcomm.c#5 integrate
.. //depot/projects/trustedbsd/audit3/usr.bin/tar/test/test-basic.sh#2 integrate
.. //depot/projects/trustedbsd/audit3/usr.bin/tar/util.c#6 integrate
Differences ...
==== //depot/projects/trustedbsd/audit3/UPDATING#20 (text+ko) ====
@@ -21,6 +21,17 @@
developers choose to disable these features on build machines
to maximize performance.
+20070418:
+ A new acct(5) format is imminent. If you want to maintain access
+ to your accounting files, use the new lastcomm(1) -X functionality to
+ export them into text format, and keep around a copy of the lastcomm
+ binary. An updated lastcomm(1) program will allow you to import
+ the text files into the new acct(5) format. The change will also
+ invalidate the condensed summary files /var/account/savacct and
+ /var/account/usracct. If your process accounting system relies
+ on them, you will need to save their contents in a readable format
+ before the switch.
+
20070417:
The new trunk(4) driver has been renamed to lagg(4) as it better
reflects its purpose. ifconfig will need to be recompiled.
@@ -767,4 +778,4 @@
Contact Warner Losh if you have any questions about your use of
this document.
-$FreeBSD: src/UPDATING,v 1.486 2007/04/17 00:41:59 thompsa Exp $
+$FreeBSD: src/UPDATING,v 1.487 2007/04/18 17:34:59 dds Exp $
==== //depot/projects/trustedbsd/audit3/etc/mtree/BSD.include.dist#13 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/etc/mtree/BSD.include.dist,v 1.111 2007/02/27 04:01:57 mjacob Exp $
+# $FreeBSD: src/etc/mtree/BSD.include.dist,v 1.112 2007/04/18 10:16:42 trhodes Exp $
#
# Please see the file src/etc/mtree/README before making changes to this file.
#
@@ -209,8 +209,6 @@
..
pccard
..
- posix4
- ..
protocols
..
readline
==== //depot/projects/trustedbsd/audit3/lib/libc/stdio/fputs.3#3 (text+ko) ====
@@ -30,7 +30,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)fputs.3 8.1 (Berkeley) 6/4/93
-.\" $FreeBSD: src/lib/libc/stdio/fputs.3,v 1.12 2007/01/09 00:28:06 imp Exp $
+.\" $FreeBSD: src/lib/libc/stdio/fputs.3,v 1.13 2007/04/19 09:38:31 phk Exp $
.\"
.Dd June 4, 1993
.Dt FPUTS 3
@@ -66,12 +66,9 @@
to the stream
.Dv stdout .
.Sh RETURN VALUES
-The
+The functions
.Fn fputs
-function
-returns 0 on success and
-.Dv EOF
-on error;
+and
.Fn puts
returns a nonnegative integer on success and
.Dv EOF
==== //depot/projects/trustedbsd/audit3/libexec/ftpd/ftpcmd.y#5 (text+ko) ====
@@ -47,7 +47,7 @@
#endif /* not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/libexec/ftpd/ftpcmd.y,v 1.65 2006/06/05 15:50:34 yar Exp $");
+__FBSDID("$FreeBSD: src/libexec/ftpd/ftpcmd.y,v 1.66 2007/04/18 22:43:39 yar Exp $");
#include <sys/param.h>
#include <sys/socket.h>
@@ -95,6 +95,7 @@
extern int usedefault;
extern char tmpline[];
extern int readonly;
+extern int assumeutf8;
extern int noepsv;
extern int noretr;
extern int noguestretr;
@@ -135,7 +136,7 @@
ABOR DELE CWD LIST NLST SITE
STAT HELP NOOP MKD RMD PWD
CDUP STOU SMNT SYST SIZE MDTM
- LPRT LPSV EPRT EPSV
+ LPRT LPSV EPRT EPSV FEAT
UMASK IDLE CHMOD MDFIVE
@@ -687,6 +688,25 @@
if ($4 != NULL)
free($4);
}
+ | FEAT CRLF
+ {
+ lreply(211, "Extensions supported:");
+#if 0
+ /* XXX these two keywords are non-standard */
+ printf(" EPRT\r\n");
+ if (!noepsv)
+ printf(" EPSV\r\n");
+#endif
+ printf(" MDTM\r\n");
+ printf(" REST STREAM\r\n");
+ printf(" SIZE\r\n");
+ if (assumeutf8) {
+ /* TVFS requires UTF8, see RFC 3659 */
+ printf(" TVFS\r\n");
+ printf(" UTF8\r\n");
+ }
+ reply(211, "End.");
+ }
| SYST check_login CRLF
{
if ($2) {
@@ -1112,6 +1132,7 @@
{ "NLST", NLST, OSTR, 1, "[ <sp> path-name ]" },
{ "SITE", SITE, SITECMD, 1, "site-cmd [ <sp> arguments ]" },
{ "SYST", SYST, ARGS, 1, "(get type of operating system)" },
+ { "FEAT", FEAT, ARGS, 1, "(get extended features)" },
{ "STAT", STAT, OSTR, 1, "[ <sp> path-name ]" },
{ "HELP", HELP, OSTR, 1, "[ <sp> <string> ]" },
{ "NOOP", NOOP, ARGS, 1, "" },
==== //depot/projects/trustedbsd/audit3/libexec/ftpd/ftpd.8#6 (text+ko) ====
@@ -30,7 +30,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)ftpd.8 8.2 (Berkeley) 4/19/94
-.\" $FreeBSD: src/libexec/ftpd/ftpd.8,v 1.71 2006/01/29 13:10:38 yar Exp $
+.\" $FreeBSD: src/libexec/ftpd/ftpd.8,v 1.72 2007/04/18 22:43:39 yar Exp $
.\"
.Dd January 21, 2006
.Dt FTPD 8
@@ -40,7 +40,7 @@
.Nd Internet File Transfer Protocol server
.Sh SYNOPSIS
.Nm
-.Op Fl 46ADdEhMmOoRrSUvW
+.Op Fl 468ADdEhMmOoRrSUvW
.Op Fl l Op Fl l
.Op Fl a Ar address
.Op Fl P Ar port
@@ -78,6 +78,21 @@
is specified, accept connections via
.Dv AF_INET6
socket.
+.It Fl 8
+The server is running in transparent UTF-8 mode.
+That is, it just encourages RFC\ 2640 compliant clients to send
+paths encoded in UTF-8 in their commands.
+In particular, the names of files uploaded by such clients will
+have UTF-8 encoding.
+The clients will also assume that server replies and existing file
+names have UTF-8 encoding, too.
+The names of files preloaded to the server should meet this expectation
+for the clients to present the correct file names to their users.
+Own messages of
+.Nm
+are always encoded in ASCII, which in fact is a subset of UTF-8.
+.Pp
+Note that this option does not make the server do any encoding conversion.
.It Fl A
Allow only anonymous ftp access.
.It Fl a
@@ -250,6 +265,7 @@
.It DELE Ta "delete a file [RW]"
.It EPRT Ta "specify data connection port, multiprotocol"
.It EPSV Ta "prepare for server-to-server transfer, multiprotocol"
+.It FEAT Ta "give information on extended features of server"
.It HELP Ta "give help information"
.It LIST Ta "give list files in a directory" Pq Dq Li "ls -lgA"
.It LPRT Ta "specify data connection port, multiprotocol"
==== //depot/projects/trustedbsd/audit3/libexec/ftpd/ftpd.c#8 (text+ko) ====
@@ -46,7 +46,7 @@
#endif /* not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/libexec/ftpd/ftpd.c,v 1.211 2007/02/09 17:18:39 yar Exp $");
+__FBSDID("$FreeBSD: src/libexec/ftpd/ftpd.c,v 1.212 2007/04/18 22:43:39 yar Exp $");
/*
* FTP server.
@@ -128,6 +128,7 @@
int restricted_data_ports = 1;
int paranoid = 1; /* be extra careful about security */
int anon_only = 0; /* Only anonymous ftp allowed */
+int assumeutf8 = 0; /* Assume that server file names are in UTF-8 */
int guest;
int dochroot;
char *chrootdir;
@@ -308,7 +309,7 @@
openlog("ftpd", LOG_PID | LOG_NDELAY, LOG_FTP);
while ((ch = getopt(argc, argv,
- "46a:AdDEhlmMoOp:P:rRSt:T:u:UvW")) != -1) {
+ "468a:AdDEhlmMoOp:P:rRSt:T:u:UvW")) != -1) {
switch (ch) {
case '4':
family = (family == AF_INET6) ? AF_UNSPEC : AF_INET;
@@ -318,6 +319,10 @@
family = (family == AF_INET) ? AF_UNSPEC : AF_INET6;
break;
+ case '8':
+ assumeutf8 = 1;
+ break;
+
case 'a':
bindname = optarg;
break;
==== //depot/projects/trustedbsd/audit3/share/man/man7/hier.7#9 (text+ko) ====
@@ -30,9 +30,9 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)hier.7 8.1 (Berkeley) 6/5/93
-.\" $FreeBSD: src/share/man/man7/hier.7,v 1.125 2007/04/04 00:14:36 chinsan Exp $
+.\" $FreeBSD: src/share/man/man7/hier.7,v 1.126 2007/04/18 10:16:43 trhodes Exp $
.\"
-.Dd April 3, 2007
+.Dd April 18, 2007
.Dt HIER 7
.Os
.Sh NAME
@@ -349,10 +349,6 @@
OpenSSL (Cryptography/SSL toolkit) headers
.It Pa pccard/
PC-CARD controllers
-.It Pa posix4/
-POSIX real-time extensions includes;
-see
-.Xr p1003_1b 9
.It Pa protocols/
C include files for Berkeley service protocols
.It Pa readline/
==== //depot/projects/trustedbsd/audit3/sys/amd64/linux32/linux32_dummy.c#9 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_dummy.c,v 1.8 2007/03/29 02:11:46 julian Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_dummy.c,v 1.9 2007/04/18 18:08:12 jkim Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -64,7 +64,6 @@
DUMMY(mincore);
DUMMY(fadvise64);
DUMMY(ptrace);
-DUMMY(settimeofday);
DUMMY(lookup_dcookie);
DUMMY(epoll_create);
DUMMY(epoll_ctl);
==== //depot/projects/trustedbsd/audit3/sys/amd64/linux32/linux32_machdep.c#13 (text+ko) ====
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.39 2007/03/30 17:27:13 jkim Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.42 2007/04/18 20:12:05 jkim Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -252,7 +252,7 @@
if (iovcnt > UIO_MAXIOV)
return (EINVAL);
iovlen = iovcnt * sizeof(struct iovec);
- uio = malloc(iovlen + sizeof *uio, M_IOV, M_WAITOK);
+ uio = malloc(iovlen + sizeof(*uio), M_IOV, M_WAITOK);
iov = (struct iovec *)(uio + 1);
for (i = 0; i < iovcnt; i++) {
error = copyin(&iovp[i], &iov32, sizeof(struct iovec32));
@@ -526,7 +526,9 @@
td2 = FIRST_THREAD_IN_PROC(p2);
- /* make it run */
+ /*
+ * Make this runnable after we are finished with it.
+ */
mtx_lock_spin(&sched_lock);
TD_SET_CAN_RUN(td2);
sched_add(td2, SRQ_BORING);
@@ -572,8 +574,8 @@
/*
* XXX: In Linux, sharing of fs info (chroot/cwd/umask)
* and open files is independant. In FreeBSD, its in one
- * structure but in reality it does not make any problems
- * because both of these flags are set at once usually.
+ * structure but in reality it does not cause any problems
+ * because both of these flags are usually set together.
*/
if (!(args->flags & (LINUX_CLONE_FILES | LINUX_CLONE_FS)))
ff |= RFFDG;
@@ -660,15 +662,15 @@
if (args->flags & LINUX_CLONE_SETTLS) {
struct user_segment_descriptor sd;
struct l_user_desc info;
- int a[2];
+ int a[2];
- error = copyin((void *)td->td_frame->tf_rsi, &info,
+ error = copyin((void *)td->td_frame->tf_rsi, &info,
sizeof(struct l_user_desc));
if (error) {
printf(LMSG("copyin failed!"));
} else {
/* We might copy out the entry_number as GUGS32_SEL. */
- info.entry_number = GUGS32_SEL;
+ info.entry_number = GUGS32_SEL;
error = copyout(&info, (void *)td->td_frame->tf_rsi,
sizeof(struct l_user_desc));
if (error)
@@ -871,7 +873,7 @@
*
* Our mmap with MAP_STACK takes addr as the maximum
* downsize limit on BOS, and as len the max size of
- * the region. It them maps the top SGROWSIZ bytes,
+ * the region. It then maps the top SGROWSIZ bytes,
* and auto grows the region down, up to the limit
* in addr.
*
@@ -1167,17 +1169,44 @@
microtime(&atv);
atv32.tv_sec = atv.tv_sec;
atv32.tv_usec = atv.tv_usec;
- error = copyout(&atv32, uap->tp, sizeof (atv32));
+ error = copyout(&atv32, uap->tp, sizeof(atv32));
}
if (error == 0 && uap->tzp != NULL) {
rtz.tz_minuteswest = tz_minuteswest;
rtz.tz_dsttime = tz_dsttime;
- error = copyout(&rtz, uap->tzp, sizeof (rtz));
+ error = copyout(&rtz, uap->tzp, sizeof(rtz));
}
return (error);
}
int
+linux_settimeofday(struct thread *td, struct linux_settimeofday_args *uap)
+{
+ l_timeval atv32;
+ struct timeval atv, *tvp;
+ struct timezone atz, *tzp;
+ int error;
+
+ if (uap->tp) {
+ error = copyin(uap->tp, &atv32, sizeof(atv32));
+ if (error)
+ return (error);
+ atv.tv_sec = atv32.tv_sec;
+ atv.tv_usec = atv32.tv_usec;
+ tvp = &atv;
+ } else
+ tvp = NULL;
+ if (uap->tzp) {
+ error = copyin(uap->tzp, &atz, sizeof(atz));
+ if (error)
+ return (error);
+ tzp = &atz;
+ } else
+ tzp = NULL;
+ return (kern_settimeofday(td, tvp, tzp));
+}
+
+int
linux_getrusage(struct thread *td, struct linux_getrusage_args *uap)
{
struct l_rusage s32;
@@ -1242,7 +1271,7 @@
#ifdef DEBUG
if (ldebug(set_thread_area))
- printf(ARGS(set_thread_area, "%i, %x, %x, %i, %i, %i, "
+ printf(ARGS(set_thread_area, "%i, %x, %x, %i, %i, %i, "
"%i, %i, %i"), info.entry_number, info.base_addr,
info.limit, info.seg_32bit, info.contents,
info.read_exec_only, info.limit_in_pages,
@@ -1261,9 +1290,10 @@
* The tls_array[] is used only in [gs]et_thread_area() syscalls and
* for loading the GDT descriptors. We use just one GDT descriptor
* for TLS, so we will load just one.
- * XXX: This doesnt work when user-space process tries to use more
+ *
+ * XXX: This doesn't work when a user space process tries to use more
* than one TLS segment. Comment in the Linux source says wine might
- * do that.
+ * do this.
*/
/*
@@ -1284,8 +1314,9 @@
/*
* We have to copy out the GDT entry we use.
- * XXX: What if userspace program does not check return value and
- * tries to use 6, 7 or 8?
+ *
+ * XXX: What if a user space program does not check the return value
+ * and tries to use 6, 7 or 8?
*/
error = copyout(&info, args->desc, sizeof(struct l_user_desc));
if (error)
==== //depot/projects/trustedbsd/audit3/sys/bsm/audit.h#37 (text+ko) ====
@@ -30,8 +30,8 @@
*
* @APPLE_BSD_LICENSE_HEADER_END@
*
- * $P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit.h#36 $
- * $FreeBSD: src/sys/bsm/audit.h,v 1.6 2006/09/21 07:27:02 rwatson Exp $
+ * $P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit.h#37 $
+ * $FreeBSD: src/sys/bsm/audit.h,v 1.8 2007/04/17 12:27:08 rwatson Exp $
*/
#ifndef _BSM_AUDIT_H
==== //depot/projects/trustedbsd/audit3/sys/bsm/audit_internal.h#17 (text+ko) ====
@@ -34,8 +34,8 @@
*
* @APPLE_BSD_LICENSE_HEADER_END@
*
- * $P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit_internal.h#16 $
- * $FreeBSD: src/sys/bsm/audit_internal.h,v 1.5 2006/09/21 07:27:02 rwatson Exp $
+ * $P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit_internal.h#17 $
+ * $FreeBSD: src/sys/bsm/audit_internal.h,v 1.7 2007/04/17 12:27:08 rwatson Exp $
*/
#ifndef _AUDIT_INTERNAL_H
==== //depot/projects/trustedbsd/audit3/sys/bsm/audit_kevents.h#33 (text+ko) ====
@@ -30,8 +30,8 @@
*
* @APPLE_BSD_LICENSE_HEADER_END@
*
- * $P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit_kevents.h#32 $
- * $FreeBSD: src/sys/bsm/audit_kevents.h,v 1.9 2006/09/25 12:22:07 rwatson Exp $
+ * $P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit_kevents.h#33 $
+ * $FreeBSD: src/sys/bsm/audit_kevents.h,v 1.11 2007/04/17 12:27:08 rwatson Exp $
*/
#ifndef _BSM_AUDIT_KEVENTS_H_
==== //depot/projects/trustedbsd/audit3/sys/bsm/audit_record.h#25 (text+ko) ====
@@ -30,8 +30,8 @@
*
* @APPLE_BSD_LICENSE_HEADER_END@
*
- * $P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit_record.h#24 $
- * $FreeBSD: src/sys/bsm/audit_record.h,v 1.6 2006/09/21 07:27:02 rwatson Exp $
+ * $P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit_record.h#25 $
+ * $FreeBSD: src/sys/bsm/audit_record.h,v 1.9 2007/04/17 12:27:08 rwatson Exp $
*/
#ifndef _BSM_AUDIT_RECORD_H_
==== //depot/projects/trustedbsd/audit3/sys/cam/cam_sim.c#5 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/cam_sim.c,v 1.10 2007/04/15 08:49:09 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/cam_sim.c,v 1.11 2007/04/19 14:28:43 scottl Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -95,6 +95,7 @@
}
SLIST_INIT(&sim->ccb_freeq);
+ TAILQ_INIT(&sim->sim_doneq);
return (sim);
}
==== //depot/projects/trustedbsd/audit3/sys/cam/cam_sim.h#4 (text+ko) ====
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/cam/cam_sim.h,v 1.7 2007/04/15 08:49:09 scottl Exp $
+ * $FreeBSD: src/sys/cam/cam_sim.h,v 1.8 2007/04/19 14:28:43 scottl Exp $
*/
#ifndef _CAM_CAM_SIM_H
@@ -92,6 +92,8 @@
const char *sim_name;
void *softc;
struct mtx *mtx;
+ TAILQ_HEAD(, ccb_hdr) sim_doneq;
+ TAILQ_ENTRY(cam_sim) links;
u_int32_t path_id;/* The Boot device may set this to 0? */
u_int32_t unit_number;
u_int32_t bus_id;
@@ -100,6 +102,7 @@
u_int32_t flags;
#define CAM_SIM_REL_TIMEOUT_PENDING 0x01
#define CAM_SIM_MPSAFE 0x02
+#define CAM_SIM_ON_DONEQ 0x04
struct callout callout;
struct cam_devq *devq; /* Device Queue to use for this SIM */
==== //depot/projects/trustedbsd/audit3/sys/cam/cam_xpt.c#13 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.178 2007/04/18 04:58:52 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.180 2007/04/19 14:45:37 scottl Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -665,8 +665,9 @@
/* Queues for our software interrupt handler */
typedef TAILQ_HEAD(cam_isrq, ccb_hdr) cam_isrq_t;
-static cam_isrq_t cam_bioq;
-static struct mtx cam_bioq_lock;
+typedef TAILQ_HEAD(cam_simq, cam_sim) cam_simq_t;
+static cam_simq_t cam_simq;
+static struct mtx cam_simq_lock;
/* Pointers to software interrupt handlers */
static void *cambio_ih;
@@ -821,6 +822,7 @@
static void xptaction(struct cam_sim *sim, union ccb *work_ccb);
static void xptpoll(struct cam_sim *sim);
static void camisr(void *);
+static void camisr_runqueue(void *);
static dev_match_ret xptbusmatch(struct dev_match_pattern *patterns,
u_int num_patterns, struct cam_eb *bus);
static dev_match_ret xptdevicematch(struct dev_match_pattern *patterns,
@@ -1472,12 +1474,12 @@
cam_status status;
TAILQ_INIT(&xsoftc.xpt_busses);
- TAILQ_INIT(&cam_bioq);
+ TAILQ_INIT(&cam_simq);
TAILQ_INIT(&xsoftc.ccb_scanq);
STAILQ_INIT(&xsoftc.highpowerq);
xsoftc.num_highpower = CAM_MAX_HIGHPOWER;
- mtx_init(&cam_bioq_lock, "CAM BIOQ lock", NULL, MTX_DEF);
+ mtx_init(&cam_simq_lock, "CAM SIMQ lock", NULL, MTX_DEF);
mtx_init(&xsoftc.xpt_lock, "XPT lock", NULL, MTX_DEF);
mtx_init(&xsoftc.xpt_topo_lock, "XPT topology lock", NULL, MTX_DEF);
@@ -1551,7 +1553,7 @@
printf("xpt_init: failed to create rescan thread\n");
}
/* Install our software interrupt handlers */
- swi_add(NULL, "cambio", camisr, &cam_bioq, SWI_CAMBIO, INTR_MPSAFE, &cambio_ih);
+ swi_add(NULL, "cambio", camisr, NULL, SWI_CAMBIO, INTR_MPSAFE, &cambio_ih);
return (0);
}
@@ -3639,7 +3641,7 @@
dev->ccbq.dev_openings < 0) && (--timeout > 0)) {
DELAY(1000);
(*(sim->sim_poll))(sim);
- camisr(&cam_bioq);
+ camisr_runqueue(&sim->sim_doneq);
}
dev->ccbq.devq_openings++;
@@ -3649,7 +3651,7 @@
xpt_action(start_ccb);
while(--timeout > 0) {
(*(sim->sim_poll))(sim);
- camisr(&cam_bioq);
+ camisr_runqueue(&sim->sim_doneq);
if ((start_ccb->ccb_h.status & CAM_STATUS_MASK)
!= CAM_REQ_INPROG)
break;
@@ -4490,6 +4492,7 @@
/* The SIM may be gone, so use a dummy SIM for any stray operations. */
devq = bus_path.bus->sim->devq;
+ ccbsim = bus_path.bus->sim;
bus_path.bus->sim = &cam_dead_sim;
/* Execute any pending operations now. */
@@ -4504,7 +4507,6 @@
devq->active_dev = device;
cam_ccbq_remove_ccb(&device->ccbq, work_ccb);
cam_ccbq_send_ccb(&device->ccbq, work_ccb);
- ccbsim = work_ccb->ccb_h.path->bus->sim;
(*(ccbsim->sim_action))(ccbsim, work_ccb);
}
@@ -4516,8 +4518,8 @@
}
/* Make sure all completed CCBs are processed. */
- while (!TAILQ_EMPTY(&cam_bioq)) {
- camisr(&cam_bioq);
+ while (!TAILQ_EMPTY(&ccbsim->sim_doneq)) {
+ camisr_runqueue(&ccbsim->sim_doneq);
/* Repeat the async's for the benefit of any new devices. */
xpt_async(AC_LOST_DEVICE, &bus_path, NULL);
@@ -4528,10 +4530,6 @@
xpt_release_bus(bus_path.bus);
xpt_release_path(&bus_path);
- /* Recheck for more completed CCBs. */
- while (!TAILQ_EMPTY(&cam_bioq))
- camisr(&cam_bioq);
-
return (CAM_REQ_CMP);
}
@@ -4949,6 +4947,7 @@
void
xpt_done(union ccb *done_ccb)
{
+ struct cam_sim *sim;
int s;
s = splcam();
@@ -4959,13 +4958,19 @@
* Queue up the request for handling by our SWI handler
* any of the "non-immediate" type of ccbs.
*/
+ sim = done_ccb->ccb_h.path->bus->sim;
switch (done_ccb->ccb_h.path->periph->type) {
case CAM_PERIPH_BIO:
- mtx_lock(&cam_bioq_lock);
- TAILQ_INSERT_TAIL(&cam_bioq, &done_ccb->ccb_h,
+ TAILQ_INSERT_TAIL(&sim->sim_doneq, &done_ccb->ccb_h,
sim_links.tqe);
done_ccb->ccb_h.pinfo.index = CAM_DONEQ_INDEX;
- mtx_unlock(&cam_bioq_lock);
+ if ((sim->flags & CAM_SIM_ON_DONEQ) == 0) {
+ mtx_lock(&cam_simq_lock);
+ TAILQ_INSERT_TAIL(&cam_simq, sim,
+ links);
+ sim->flags |= CAM_SIM_ON_DONEQ;
+ mtx_unlock(&cam_simq_lock);
+ }
if ((done_ccb->ccb_h.path->periph->flags &
CAM_PERIPH_POLLED) == 0)
swi_sched(cambio_ih, 0);
@@ -4983,7 +4988,7 @@
{
union ccb *new_ccb;
- new_ccb = malloc(sizeof(*new_ccb), M_CAMXPT, M_WAITOK);
+ new_ccb = malloc(sizeof(*new_ccb), M_CAMXPT, M_ZERO|M_WAITOK);
return (new_ccb);
}
@@ -4992,7 +4997,7 @@
{
union ccb *new_ccb;
- new_ccb = malloc(sizeof(*new_ccb), M_CAMXPT, M_NOWAIT);
+ new_ccb = malloc(sizeof(*new_ccb), M_CAMXPT, M_ZERO|M_NOWAIT);
return (new_ccb);
}
@@ -7231,31 +7236,36 @@
}
static void
-camisr(void *V_queue)
+camisr(void *dummy)
{
- cam_isrq_t *oqueue = V_queue;
- cam_isrq_t queue;
- int s;
- struct ccb_hdr *ccb_h;
- struct cam_sim *sim;
+ cam_simq_t queue;
+ struct cam_sim *sim;
- /*
- * Transfer the ccb_bioq list to a temporary list so we can operate
- * on it without needing to lock/unlock on every loop. The concat
- * function with re-init the real list for us.
- */
- s = splcam();
- mtx_lock(&cam_bioq_lock);
+ mtx_lock(&cam_simq_lock);
TAILQ_INIT(&queue);
- TAILQ_CONCAT(&queue, oqueue, sim_links.tqe);
- mtx_unlock(&cam_bioq_lock);
+ TAILQ_CONCAT(&queue, &cam_simq, links);
+ mtx_unlock(&cam_simq_lock);
+
+ while ((sim = TAILQ_FIRST(&queue)) != NULL) {
+ TAILQ_REMOVE(&queue, sim, links);
+ mtx_lock(sim->mtx);
+ sim->flags &= ~CAM_SIM_ON_DONEQ;
+ camisr_runqueue(&sim->sim_doneq);
+ mtx_unlock(sim->mtx);
+ }
+}
+
+static void
+camisr_runqueue(void *V_queue)
+{
+ cam_isrq_t *queue = V_queue;
+ struct ccb_hdr *ccb_h;
- while ((ccb_h = TAILQ_FIRST(&queue)) != NULL) {
+ while ((ccb_h = TAILQ_FIRST(queue)) != NULL) {
int runq;
- TAILQ_REMOVE(&queue, ccb_h, sim_links.tqe);
+ TAILQ_REMOVE(queue, ccb_h, sim_links.tqe);
ccb_h->pinfo.index = CAM_UNQUEUED_INDEX;
- splx(s);
CAM_DEBUG(ccb_h->path, CAM_DEBUG_TRACE,
("camisr\n"));
@@ -7290,22 +7300,17 @@
mtx_unlock(&xsoftc.xpt_lock);
}
- sim = ccb_h->path->bus->sim;
- mtx_lock(sim->mtx);
-
if ((ccb_h->func_code & XPT_FC_USER_CCB) == 0) {
struct cam_ed *dev;
dev = ccb_h->path->device;
- s = splcam();
cam_ccbq_ccb_done(&dev->ccbq, (union ccb *)ccb_h);
if (!SIM_DEAD(ccb_h->path->bus->sim)) {
ccb_h->path->bus->sim->devq->send_active--;
ccb_h->path->bus->sim->devq->send_openings++;
}
- splx(s);
if (((dev->flags & CAM_DEV_REL_ON_COMPLETE) != 0
&& (ccb_h->status&CAM_STATUS_MASK) != CAM_REQUEUE_REQ)
@@ -7346,12 +7351,7 @@
/* Call the peripheral driver's callback */
(*ccb_h->cbfcnp)(ccb_h->path->periph, (union ccb *)ccb_h);
-
- /* Raise IPL for while test */
- mtx_unlock(sim->mtx);
- s = splcam();
}
- splx(s);
}
static void
==== //depot/projects/trustedbsd/audit3/sys/compat/opensolaris/kern/opensolaris_vfs.c#3 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/opensolaris/kern/opensolaris_vfs.c,v 1.2 2007/04/17 21:16:34 pjd Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/opensolaris/kern/opensolaris_vfs.c,v 1.3 2007/04/18 15:24:48 pjd Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -169,9 +169,6 @@
if (strlen(fstype) >= MFSNAMELEN || strlen(fspath) >= MNAMELEN)
return (ENAMETOOLONG);
- if ((error = priv_check(td, PRIV_VFS_MOUNT)) != 0)
- return (error);
-
vfsp = vfs_byname_kld(fstype, td, &error);
if (vfsp == NULL)
return (ENODEV);
@@ -207,6 +204,13 @@
mp->mnt_flag |= MNT_RDONLY;
mp->mnt_flag &=~ MNT_UPDATEMASK;
mp->mnt_flag |= fsflags & (MNT_UPDATEMASK | MNT_FORCE | MNT_ROOTFS);
+ /*
+ * Unprivileged user can trigger mounting a snapshot, but we don't want
+ * him to unmount it, so we switch to privileged credential.
+ */
+ crfree(mp->mnt_cred);
+ mp->mnt_cred = crdup(kcred);
+ mp->mnt_stat.f_owner = mp->mnt_cred->cr_uid;
MNT_IUNLOCK(mp);
/*
* Mount the filesystem.
@@ -260,12 +264,9 @@
VI_LOCK(vp);
vp->v_iflag &= ~VI_MOUNT;
VI_UNLOCK(vp);
+ VOP_UNLOCK(vp, 0, td);
vfs_unbusy(mp, td);
vfs_mount_destroy(mp);
- if (VOP_ISLOCKED(vp, td) != LK_EXCLUSIVE) {
- printf("%s:%u: vnode vp=%p not locked\n", __func__, __LINE__, vp);
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
- }
}
return (error);
}
==== //depot/projects/trustedbsd/audit3/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c#4 (text+ko) ====
@@ -578,10 +578,6 @@
char *from;
int error;
- /* TODO: For now deny user mounts. */
- if ((error = priv_check(td, PRIV_VFS_MOUNT)) != 0)
- return (error);
-
/*
* When doing a remount, we simply refresh our temporary properties
* according to those options set in the current VFS options.
==== //depot/projects/trustedbsd/audit3/sys/dev/ath/if_ath.c#16 (text+ko) ====
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.164 2007/03/05 21:56:33 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.165 2007/04/19 13:09:56 sephe Exp $");
/*
* Driver for the Atheros Wireless LAN controller.
@@ -5838,6 +5838,7 @@
struct ath_buf *bf;
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || sc->sc_invalid) {
+ ieee80211_free_node(ni);
m_freem(m);
return ENETDOWN;
}
@@ -5854,6 +5855,7 @@
__func__);
sc->sc_stats.ast_tx_qstop++;
ifp->if_drv_flags |= IFF_DRV_OACTIVE;
+ ieee80211_free_node(ni);
m_freem(m);
return ENOBUFS;
}
==== //depot/projects/trustedbsd/audit3/sys/dev/hwpmc/hwpmc_logging.c#4 (text+ko) ====
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/hwpmc/hwpmc_logging.c,v 1.6 2006/03/26 12:20:53 jkoshy Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/hwpmc/hwpmc_logging.c,v 1.7 2007/04/19 08:02:51 jkoshy Exp $");
#include <sys/param.h>
#include <sys/file.h>
@@ -973,8 +973,9 @@
PMCLOG_INIT_BUFFER_DESCRIPTOR(plb);
TAILQ_INSERT_HEAD(&pmc_bufferlist, plb, plb_next);
}
- mtx_init(&pmc_bufferlist_mtx, "pmc-buffer-list", "pmc", MTX_SPIN);
- mtx_init(&pmc_kthread_mtx, "pmc-kthread", "pmc", MTX_DEF);
+ mtx_init(&pmc_bufferlist_mtx, "pmc-buffer-list", "pmc-leaf",
+ MTX_SPIN);
+ mtx_init(&pmc_kthread_mtx, "pmc-kthread", "pmc-sleep", MTX_DEF);
}
/*
==== //depot/projects/trustedbsd/audit3/sys/dev/hwpmc/hwpmc_mod.c#8 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/hwpmc/hwpmc_mod.c,v 1.27 2007/02/27 17:23:27 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/hwpmc/hwpmc_mod.c,v 1.28 2007/04/19 08:02:51 jkoshy Exp $");
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list