Date: Fri, 1 Apr 2005 03:20:17 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 74237 for review Message-ID: <200504010320.j313KHbC089509@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=74237 Change 74237 by sam@sam_ebb on 2005/04/01 03:19:35 IFC @ 74236 Affected files ... .. //depot/projects/wifi/release/Makefile#7 integrate .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#12 integrate .. //depot/projects/wifi/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#7 integrate .. //depot/projects/wifi/release/doc/share/misc/dev.archlist.txt#11 integrate .. //depot/projects/wifi/release/scripts/package-split.py#2 integrate .. //depot/projects/wifi/sbin/ffsinfo/ffsinfo.8#3 integrate .. //depot/projects/wifi/sbin/ffsinfo/ffsinfo.c#4 integrate .. //depot/projects/wifi/sbin/growfs/Makefile#3 integrate .. //depot/projects/wifi/share/man/man4/Makefile#17 integrate .. //depot/projects/wifi/share/man/man4/arcmsr.4#1 branch .. //depot/projects/wifi/share/man/man4/cpufreq.4#4 integrate .. //depot/projects/wifi/share/man/man5/rc.conf.5#12 integrate .. //depot/projects/wifi/sys/alpha/osf1/osf1_misc.c#5 integrate .. //depot/projects/wifi/sys/amd64/amd64/db_disasm.c#3 integrate .. //depot/projects/wifi/sys/amd64/conf/GENERIC#7 integrate .. //depot/projects/wifi/sys/amd64/conf/NOTES#5 integrate .. //depot/projects/wifi/sys/amd64/linux32/linux32_machdep.c#3 integrate .. //depot/projects/wifi/sys/cam/cam_xpt.c#9 integrate .. //depot/projects/wifi/sys/cam/scsi/scsi_sa.c#3 integrate .. //depot/projects/wifi/sys/cam/scsi/scsi_target.c#4 integrate .. //depot/projects/wifi/sys/coda/coda_fbsd.c#5 integrate .. //depot/projects/wifi/sys/compat/freebsd32/freebsd32_misc.c#6 integrate .. //depot/projects/wifi/sys/compat/ndis/subr_ndis.c#10 integrate .. //depot/projects/wifi/sys/conf/NOTES#16 integrate .. //depot/projects/wifi/sys/conf/files.amd64#9 integrate .. //depot/projects/wifi/sys/conf/files.i386#14 integrate .. //depot/projects/wifi/sys/conf/kern.mk#3 integrate .. //depot/projects/wifi/sys/dev/acpica/acpi.c#11 integrate .. //depot/projects/wifi/sys/dev/aic7xxx/aic7xxx.c#5 integrate .. //depot/projects/wifi/sys/dev/amr/amr.c#8 integrate .. //depot/projects/wifi/sys/dev/arcmsr/arcmsr.c#1 branch .. //depot/projects/wifi/sys/dev/arcmsr/arcmsr.h#1 branch .. //depot/projects/wifi/sys/dev/ata/ata-all.c#5 integrate .. //depot/projects/wifi/sys/dev/ata/ata-cbus.c#3 integrate .. //depot/projects/wifi/sys/dev/ata/ata-chipset.c#6 integrate .. //depot/projects/wifi/sys/dev/ata/ata-disk.c#5 integrate .. //depot/projects/wifi/sys/dev/ata/ata-lowlevel.c#7 integrate .. //depot/projects/wifi/sys/dev/ata/ata-pci.c#4 integrate .. //depot/projects/wifi/sys/dev/ata/ata-pci.h#4 integrate .. //depot/projects/wifi/sys/dev/ata/ata-queue.c#5 integrate .. //depot/projects/wifi/sys/dev/ata/ata_if.m#2 integrate .. //depot/projects/wifi/sys/dev/ata/atapi-cd.c#5 integrate .. //depot/projects/wifi/sys/dev/ata/atapi-fd.c#3 integrate .. //depot/projects/wifi/sys/dev/ata/atapi-tape.c#4 integrate .. //depot/projects/wifi/sys/dev/ath/if_ath.c#81 integrate .. //depot/projects/wifi/sys/dev/firewire/fwdev.c#3 integrate .. //depot/projects/wifi/sys/dev/hptmv/hptproc.c#2 integrate .. //depot/projects/wifi/sys/dev/mlx/mlx.c#3 integrate .. //depot/projects/wifi/sys/dev/nmdm/nmdm.c#5 integrate .. //depot/projects/wifi/sys/dev/snp/snp.c#6 integrate .. //depot/projects/wifi/sys/dev/sound/pcm/dsp.c#4 integrate .. //depot/projects/wifi/sys/dev/sound/pcm/mixer.c#4 integrate .. //depot/projects/wifi/sys/dev/vkbd/vkbd.c#5 integrate .. //depot/projects/wifi/sys/fs/devfs/devfs_devs.c#5 integrate .. //depot/projects/wifi/sys/fs/devfs/devfs_vfsops.c#8 integrate .. //depot/projects/wifi/sys/fs/devfs/devfs_vnops.c#19 integrate .. //depot/projects/wifi/sys/i386/conf/GENERIC#7 integrate .. //depot/projects/wifi/sys/i386/conf/NOTES#11 integrate .. //depot/projects/wifi/sys/i386/cpufreq/powernow.c#2 integrate .. //depot/projects/wifi/sys/i386/ibcs2/ibcs2_misc.c#4 integrate .. //depot/projects/wifi/sys/kern/kern_conf.c#9 integrate .. //depot/projects/wifi/sys/kern/kern_cpu.c#4 integrate .. //depot/projects/wifi/sys/kern/kern_jail.c#4 integrate .. //depot/projects/wifi/sys/kern/kern_linker.c#2 integrate .. //depot/projects/wifi/sys/kern/kern_lock.c#8 integrate .. //depot/projects/wifi/sys/kern/kern_ntptime.c#4 integrate .. //depot/projects/wifi/sys/kern/kern_synch.c#5 integrate .. //depot/projects/wifi/sys/kern/kern_time.c#6 integrate .. //depot/projects/wifi/sys/kern/subr_bus.c#11 integrate .. //depot/projects/wifi/sys/kern/sys_generic.c#8 integrate .. //depot/projects/wifi/sys/kern/tty_pty.c#5 integrate .. //depot/projects/wifi/sys/kern/tty_tty.c#3 integrate .. //depot/projects/wifi/sys/kern/uipc_syscalls.c#11 integrate .. //depot/projects/wifi/sys/kern/vfs_mount.c#18 integrate .. //depot/projects/wifi/sys/kern/vfs_subr.c#19 integrate .. //depot/projects/wifi/sys/kern/vfs_vnops.c#12 integrate .. //depot/projects/wifi/sys/modules/Makefile#17 integrate .. //depot/projects/wifi/sys/modules/arcmsr/Makefile#1 branch .. //depot/projects/wifi/sys/modules/cpufreq/Makefile#4 integrate .. //depot/projects/wifi/sys/net/bpf.c#9 integrate .. //depot/projects/wifi/sys/net/if_tap.c#5 integrate .. //depot/projects/wifi/sys/net/if_tun.c#5 integrate .. //depot/projects/wifi/sys/netsmb/smb_dev.c#4 integrate .. //depot/projects/wifi/sys/nfsclient/nfs_node.c#9 integrate .. //depot/projects/wifi/sys/pci/if_ti.c#7 integrate .. //depot/projects/wifi/sys/posix4/p1003_1b.c#3 integrate .. //depot/projects/wifi/sys/powerpc/powermac/ata_kauai.c#4 integrate .. //depot/projects/wifi/sys/powerpc/powermac/ata_macio.c#4 integrate .. //depot/projects/wifi/sys/powerpc/psim/ata_iobus.c#4 integrate .. //depot/projects/wifi/sys/sys/conf.h#9 integrate .. //depot/projects/wifi/sys/sys/lockmgr.h#6 integrate .. //depot/projects/wifi/sys/sys/proc.h#10 integrate .. //depot/projects/wifi/sys/sys/syscallsubr.h#8 integrate .. //depot/projects/wifi/sys/ufs/ffs/ffs_rawread.c#7 integrate .. //depot/projects/wifi/sys/ufs/ffs/ffs_snapshot.c#12 integrate .. //depot/projects/wifi/sys/ufs/ffs/ffs_vfsops.c#19 integrate .. //depot/projects/wifi/sys/ufs/ffs/ffs_vnops.c#11 integrate .. //depot/projects/wifi/sys/ufs/ufs/ufs_extattr.c#8 integrate .. //depot/projects/wifi/sys/vm/vnode_pager.c#15 integrate .. //depot/projects/wifi/usr.bin/calendar/calendars/calendar.freebsd#10 integrate .. //depot/projects/wifi/usr.bin/make/arch.c#11 integrate .. //depot/projects/wifi/usr.bin/make/arch.h#3 integrate .. //depot/projects/wifi/usr.bin/make/buf.c#6 integrate .. //depot/projects/wifi/usr.bin/make/main.c#16 integrate .. //depot/projects/wifi/usr.bin/make/make.1#7 integrate .. //depot/projects/wifi/usr.bin/make/util.h#3 integrate .. //depot/projects/wifi/usr.sbin/Makefile#8 integrate .. //depot/projects/wifi/usr.sbin/config/main.c#3 integrate Differences ... ==== //depot/projects/wifi/release/Makefile#7 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/release/Makefile,v 1.881 2005/03/23 15:01:54 jhb Exp $ +# $FreeBSD: src/release/Makefile,v 1.882 2005/03/31 16:19:26 jhb Exp $ # # make release [BUILDNAME=somename] CHROOTDIR=/some/dir CVSROOT=/cvs/dir \ # [RELEASETAG=tag] @@ -945,6 +945,16 @@ @mkdir -p ${CD_DISC2} @echo "CD_VERSION = ${BUILDNAME}" > ${CD_DISC2}/cdrom.inf @echo "CD_VOLUME = 2" >> ${CD_DISC2}/cdrom.inf +.if !defined(NODOC) + @mkdir -p ${CD_DISC2}/usr/share/doc + @for i in `ls ${CD_LIVEFS}/usr/share/doc`; do \ + if [ -L ${CD_LIVEFS}/usr/share/doc/$$i -o \ + -d /usr/doc/$$i ]; then \ + mv ${CD_LIVEFS}/usr/share/doc/$$i \ + ${CD_DISC2}/usr/share/doc; \ + fi \ + done +.endif touch ${.TARGET} # @@ -998,6 +1008,7 @@ FreeBSD_LiveFS \ ${CD}/${BUILDNAME}-${TARGET}-livefs.iso ${CD_LIVEFS} .endif + @echo "Generating MD5 sums..." @(cd ${CD} && md5 *.iso > ${BUILDNAME}-${TARGET}-iso.CHECKSUM.MD5) touch ${.TARGET} .else ==== //depot/projects/wifi/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml#12 (text+ko) ==== @@ -29,7 +29,7 @@ <sect1 id="support"> <sect1info> - <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml,v 1.276 2005/03/18 03:12:46 brueffer Exp $</pubdate> + <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/hardware/common/dev.sgml,v 1.277 2005/03/31 20:52:26 brueffer Exp $</pubdate> </sect1info> <title>Supported Devices</title> @@ -148,6 +148,8 @@ supported due to SRM limitations.</para> </note> + &hwlist.arcmsr; + &hwlist.mlx; <note> ==== //depot/projects/wifi/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#7 (text+ko) ==== @@ -3,7 +3,7 @@ <corpauthor>The &os; Project</corpauthor> - <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml,v 1.835 2005/03/27 17:25:18 delphij Exp $</pubdate> + <pubdate>$FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml,v 1.838 2005/03/31 16:02:12 bmah Exp $</pubdate> <copyright> <year>2000</year> @@ -128,6 +128,14 @@ <ulink url="ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-04:17.procfs.asc">FreeBSD-SA-04:17.procfs</ulink>. &merged;</para> + <para>Two buffer overflows in the TELNET client program have been + corrected. They could have allowed a malicious TELNET server or + an active network attacker to cause &man.telnet.1; to execute + arbitrary code with the privileges of the user running it. + More information can be found in security advisory + <ulink url="ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-05:01.telnet.asc">FreeBSD-SA-05:01.telnet</ulink>. + &merged;</para> + </sect2> <sect2 id="kernel"> @@ -401,7 +409,7 @@ nVidia nForce MCP Networking Adapter, has been added.</para> <para>The &man.re.4; driver now supports the &man.altq.4; - framework.</para> + framework. &merged;</para> <para>The &man.sf.4; driver now has support for device polling and &man.altq.4;. &merged;</para> @@ -822,6 +830,9 @@ <para>The &man.rescue.8; utilities in the <filename>/rescue</filename> directory now include &man.bsdtar.1; instead of GNU tar.</para> + <para>The &man.restore.8; utility has regained the ability to read + &os; version 1 dump tapes.</para> + <para>The &man.rm.1; utility now supports an <option>-I</option> option that asks for confirmation (once) if recursively removing directories or if more than 3 files are listed in the @@ -893,13 +904,13 @@ Korea. &merged;</para> <para>The <option>-I</option> option of the &man.xargs.1; command - has been changed to conform IEEE Std 1003.1-2004. + has been changed to conform to IEEE Std 1003.1-2004. The standard requires that the constructed arguments cannot grow larger than 255 bytes.</para> <para>A bug, which caused the last line of configuration files such as &man.hosts.5;, &man.services.5;, and so on to be ignored if it did not end in a newline character, - has been fixed.</para> + has been fixed. &merged;</para> <sect3 id="rc-scripts"> <title><filename>/etc/rc.d</filename> Scripts</title> @@ -1091,7 +1102,7 @@ &man.inet6.rth.space.3;, &man.inet6.rthdr.space.3;, &man.icmp6.4;, and - &man.ip6.4;.</para> + &man.ip6.4;. &merged;</para> </sect2> </sect1> ==== //depot/projects/wifi/release/doc/share/misc/dev.archlist.txt#11 (text+ko) ==== @@ -23,7 +23,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/release/doc/share/misc/dev.archlist.txt,v 1.58 2005/03/18 03:12:47 brueffer Exp $ +# $FreeBSD: src/release/doc/share/misc/dev.archlist.txt,v 1.59 2005/03/31 20:52:27 brueffer Exp $ # # @@ -43,6 +43,7 @@ ahd i386,sparc64,ia64,amd64 aic i386,pc98,amd64 amd i386,pc98,amd64 +arcmsr i386,amd64 asr i386 ath i386 aue i386,pc98,ia64,amd64 ==== //depot/projects/wifi/release/scripts/package-split.py#2 (text+ko) ==== @@ -7,7 +7,7 @@ # # Usage: package-split.py <INDEX> <master INDEX> # -# $FreeBSD: src/release/scripts/package-split.py,v 1.3 2005/03/21 20:03:56 jhb Exp $ +# $FreeBSD: src/release/scripts/package-split.py,v 1.4 2005/03/31 13:52:12 kensmith Exp $ import os import sys @@ -100,7 +100,6 @@ 'www/apache2'] if arch == 'i386': pkgs.extend(['comms/ltmdm', - 'print/acroread', 'www/opera']) return pkgs ==== //depot/projects/wifi/sbin/ffsinfo/ffsinfo.8#3 (text+ko) ==== @@ -35,7 +35,7 @@ .\" SUCH DAMAGE. .\" .\" $TSHeader: src/sbin/ffsinfo/ffsinfo.8,v 1.3 2000/12/12 19:30:55 tomsoft Exp $ -.\" $FreeBSD: src/sbin/ffsinfo/ffsinfo.8,v 1.15 2005/01/18 10:09:31 ru Exp $ +.\" $FreeBSD: src/sbin/ffsinfo/ffsinfo.8,v 1.16 2005/03/31 04:05:17 rwatson Exp $ .\" .Dd September 8, 2000 .Dt FSINFO 8 @@ -106,18 +106,19 @@ indirect block dump .El .It Fl o Ar outfile -This allows to change the output filename where the dump is written to. -The current default is -.Pa /var/tmp/ffsinfo . +This allows to set the output filename where the dump is written to, and +must be specified. If .Fl is provided, output will be sent to stdout. .El .Sh EXAMPLES -.Dl ffsinfo -l 1023 /dev/vinum/testvol +.Dl ffsinfo -o /var/tmp/ffsinfo -l 1023 /dev/vinum/testvol .Pp will dump .Pa /dev/vinum/testvol +to +.Pa /var/tmp/ffsinfo with all available information. .Sh SEE ALSO .Xr disklabel 8 , ==== //depot/projects/wifi/sbin/ffsinfo/ffsinfo.c#4 (text+ko) ==== @@ -48,7 +48,7 @@ #ifndef lint static const char rcsid[] = - "$FreeBSD: src/sbin/ffsinfo/ffsinfo.c,v 1.9 2005/02/10 09:19:29 ru Exp $"; + "$FreeBSD: src/sbin/ffsinfo/ffsinfo.c,v 1.10 2005/03/31 04:05:17 rwatson Exp $"; #endif /* not lint */ /* ********************************************************** INCLUDES ***** */ @@ -141,10 +141,7 @@ cfg_lv=0xff; cfg_in=-2; cfg_cg=-2; - out_file=strdup("/var/tmp/ffsinfo"); - if(out_file == NULL) { - errx(1, "strdup failed"); - } + out_file=NULL; while ((ch=getopt(argc, argv, "g:i:l:o:")) != -1) { switch(ch) { @@ -192,6 +189,8 @@ usage(); } device=*argv; + if (out_file == NULL) + errx(1, "out_file not specified"); /* * Now we try to guess the (raw)device name. ==== //depot/projects/wifi/sbin/growfs/Makefile#3 (text+ko) ==== @@ -1,7 +1,7 @@ # @(#)Makefile 8.8 (Berkeley) 6/21/2000 # # $TSHeader: src/sbin/growfs/Makefile,v 1.4 2000/12/05 19:45:24 tomsoft Exp $ -# $FreeBSD: src/sbin/growfs/Makefile,v 1.12 2004/10/24 15:32:37 ru Exp $ +# $FreeBSD: src/sbin/growfs/Makefile,v 1.13 2005/03/31 04:10:31 rwatson Exp $ # #GFSDBG= @@ -14,7 +14,6 @@ .if defined(GFSDBG) SRCS+= debug.c -CFLAGS+=-DFS_DEBUG .endif .include <bsd.prog.mk> ==== //depot/projects/wifi/share/man/man4/Makefile#17 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile 8.1 (Berkeley) 6/18/93 -# $FreeBSD: src/share/man/man4/Makefile,v 1.310 2005/03/24 04:45:09 jcamou Exp $ +# $FreeBSD: src/share/man/man4/Makefile,v 1.311 2005/03/31 19:44:15 scottl Exp $ MAN= aac.4 \ acpi.4 \ @@ -16,6 +16,7 @@ altq.4 \ amd.4 \ amr.4 \ + arcmsr.4 \ an.4 \ asr.4 \ ata.4 \ ==== //depot/projects/wifi/share/man/man4/cpufreq.4#4 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man4/cpufreq.4,v 1.6 2005/02/26 22:48:04 njl Exp $ +.\" $FreeBSD: src/share/man/man4/cpufreq.4,v 1.7 2005/03/31 06:05:16 njl Exp $ .\" .Dd February 26, 2005 .Dt CPUFREQ 4 @@ -101,6 +101,8 @@ Intel Enhanced SpeedStep .It Pa ichss Intel SpeedStep for ICH +.It Pa powernow +AMD PowerNow! for K7 and K8 .El .Pp The following device drivers offer relative frequency control and ==== //depot/projects/wifi/share/man/man5/rc.conf.5#12 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man5/rc.conf.5,v 1.248 2005/03/12 21:10:42 trhodes Exp $ +.\" $FreeBSD: src/share/man/man5/rc.conf.5,v 1.249 2005/03/31 06:02:44 njl Exp $ .\" .Dd March 12, 2005 .Dt RC.CONF 5 @@ -221,6 +221,13 @@ driver which can lead to system hangs when using some newer .Xr ed 4 based cards. +.It Va powerd_enable +.Pq Vt bool +If set to +.Dq Li YES , +enable the system power control facility with the +.Xr powerd 8 +daemon. .It Va removable_interfaces .Pq Vt str List of removable network interfaces to be supported by ==== //depot/projects/wifi/sys/alpha/osf1/osf1_misc.c#5 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/alpha/osf1/osf1_misc.c,v 1.53 2005/02/18 18:37:26 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/osf1/osf1_misc.c,v 1.54 2005/03/31 22:56:14 jhb Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -993,52 +993,61 @@ char *iov_base; int iov_len; }; -#define STACKGAPLEN 400 + +static int +osf1_copyinuio(struct osf1_iovec *iovp, u_int iovcnt, struct uio **uiop) +{ + struct osf1_iovec oiov; + struct iovec *iov; + struct uio *uio; + u_int iovlen; + int error, i; + + *uiop = NULL; + if (iovcnt > UIO_MAXIOV) + return (EINVAL); + iovlen = iovcnt * sizeof(struct iovec); + uio = malloc(iovlen + sizeof *uio, M_IOV, M_WAITOK); + iov = (struct iovec *)(uio + 1); + for (i = 0; i < iovcnt; i++) { + error = copyin(&iovp[i], &oiov, sizeof(struct osf1_iovec)); + if (error) { + free(uio, M_IOV); + return (error); + } + iov[i].iov_base = oiov.iov_base; + iov[i].iov_len = oiov.iov_len; + } + uio->uio_iov = iov; + uio->uio_iovcnt = iovcnt; + uio->uio_segflg = UIO_USERSPACE; + uio->uio_offset = -1; + uio->uio_resid = 0; + for (i = 0; i < iovcnt; i++) { + if (iov->iov_len > INT_MAX - uio->uio_resid) { + free(uio, M_IOV); + return (EINVAL); + } + uio->uio_resid += iov->iov_len; + iov++; + } + *uiop = uio; + return (0); +} + int osf1_readv(td, uap) struct thread *td; struct osf1_readv_args *uap; { - int error, osize, nsize, i; - caddr_t sg; - struct readv_args /* { - syscallarg(int) fd; - syscallarg(struct iovec *) iovp; - syscallarg(u_int) iovcnt; - } */ a; - struct osf1_iovec *oio; - struct iovec *nio; + struct uio *auio; + int error; - sg = stackgap_init(); - - if (uap->iovcnt > (STACKGAPLEN / sizeof (struct iovec))) - return (EINVAL); - - osize = uap->iovcnt * sizeof (struct osf1_iovec); - nsize = uap->iovcnt * sizeof (struct iovec); - - oio = malloc(osize, M_TEMP, M_WAITOK); - nio = malloc(nsize, M_TEMP, M_WAITOK); - - error = 0; - if ((error = copyin(uap->iovp, oio, osize))) - goto punt; - for (i = 0; i < uap->iovcnt; i++) { - nio[i].iov_base = oio[i].iov_base; - nio[i].iov_len = oio[i].iov_len; - } - - a.fd = uap->fd; - a.iovp = stackgap_alloc(&sg, nsize); - a.iovcnt = uap->iovcnt; - - if ((error = copyout(nio, (caddr_t)a.iovp, nsize))) - goto punt; - error = readv(td, &a); - -punt: - free(oio, M_TEMP); - free(nio, M_TEMP); + error = osf1_copyinuio(uap->iovp, uap->iovcnt, &auio); + if (error) + return (error); + error = kern_readv(td, uap->fd, auio); + free(auio, M_IOV); return (error); } @@ -1048,46 +1057,14 @@ struct thread *td; struct osf1_writev_args *uap; { - int error, i, nsize, osize; - caddr_t sg; - struct writev_args /* { - syscallarg(int) fd; - syscallarg(struct iovec *) iovp; - syscallarg(u_int) iovcnt; - } */ a; - struct osf1_iovec *oio; - struct iovec *nio; + struct uio *auio; + int error; - sg = stackgap_init(); - - if (uap->iovcnt > (STACKGAPLEN / sizeof (struct iovec))) - return (EINVAL); - - osize = uap->iovcnt * sizeof (struct osf1_iovec); - nsize = uap->iovcnt * sizeof (struct iovec); - - oio = malloc(osize, M_TEMP, M_WAITOK); - nio = malloc(nsize, M_TEMP, M_WAITOK); - - error = 0; - if ((error = copyin(uap->iovp, oio, osize))) - goto punt; - for (i = 0; i < uap->iovcnt; i++) { - nio[i].iov_base = oio[i].iov_base; - nio[i].iov_len = oio[i].iov_len; - } - - a.fd = uap->fd; - a.iovp = stackgap_alloc(&sg, nsize); - a.iovcnt = uap->iovcnt; - - if ((error = copyout(nio, (caddr_t)a.iovp, nsize))) - goto punt; - error = writev(td, &a); - -punt: - free(oio, M_TEMP); - free(nio, M_TEMP); + error = osf1_copyinuio(uap->iovp, uap->iovcnt, &auio); + if (error) + return (error); + error = kern_writev(td, uap->fd, auio); + free(auio, M_IOV); return (error); } ==== //depot/projects/wifi/sys/amd64/amd64/db_disasm.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_disasm.c,v 1.28 2005/01/05 20:17:20 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_disasm.c,v 1.30 2005/03/30 22:57:41 peter Exp $"); /* * Instruction disassembler. @@ -50,6 +50,15 @@ #define NONE 8 /* + * REX prefix and bits + */ +#define REX_B 1 +#define REX_X 2 +#define REX_R 4 +#define REX_W 8 +#define REX 0x40 + +/* * Addressing modes */ #define E 1 /* general effective address */ @@ -85,9 +94,10 @@ #define STI 32 /* FP stack */ #define X 33 /* extended FP op */ #define XA 34 /* for 'fstcw %ax' */ -#define El 35 /* address, long size */ +#define El 35 /* address, long/quad size */ #define Ril 36 /* long register in instruction */ #define Iba 37 /* byte immediate, don't print if 0xa */ +#define EL 38 /* address, explicitly long size */ struct inst { const char * i_name; /* name */ @@ -213,6 +223,26 @@ /*3f*/ { "", FALSE, NONE, 0, 0 }, }; +static const struct inst db_inst_0f4x[] = { +/*40*/ { "cmovo", TRUE, NONE, op2(E, R), 0 }, +/*41*/ { "cmovno", TRUE, NONE, op2(E, R), 0 }, +/*42*/ { "cmovb", TRUE, NONE, op2(E, R), 0 }, +/*43*/ { "cmovnb", TRUE, NONE, op2(E, R), 0 }, +/*44*/ { "cmovz", TRUE, NONE, op2(E, R), 0 }, +/*45*/ { "cmovnz", TRUE, NONE, op2(E, R), 0 }, +/*46*/ { "cmovbe", TRUE, NONE, op2(E, R), 0 }, +/*47*/ { "cmovnbe",TRUE, NONE, op2(E, R), 0 }, + +/*48*/ { "cmovs", TRUE, NONE, op2(E, R), 0 }, +/*49*/ { "cmovns", TRUE, NONE, op2(E, R), 0 }, +/*4a*/ { "cmovp", TRUE, NONE, op2(E, R), 0 }, +/*4b*/ { "cmovnp", TRUE, NONE, op2(E, R), 0 }, +/*4c*/ { "cmovl", TRUE, NONE, op2(E, R), 0 }, +/*4d*/ { "cmovnl", TRUE, NONE, op2(E, R), 0 }, +/*4e*/ { "cmovle", TRUE, NONE, op2(E, R), 0 }, +/*4f*/ { "cmovnle",TRUE, NONE, op2(E, R), 0 }, +}; + static const struct inst db_inst_0f8x[] = { /*80*/ { "jo", FALSE, NONE, op1(Dl), 0 }, /*81*/ { "jno", FALSE, NONE, op1(Dl), 0 }, @@ -317,6 +347,7 @@ 0, db_inst_0f2x, db_inst_0f3x, + db_inst_0f4x, 0, 0, 0, @@ -585,23 +616,23 @@ /*3e*/ { "", FALSE, NONE, 0, 0 }, /*3f*/ { "aas", FALSE, NONE, 0, 0 }, -/*40*/ { "inc", FALSE, LONG, op1(Ri), 0 }, -/*41*/ { "inc", FALSE, LONG, op1(Ri), 0 }, -/*42*/ { "inc", FALSE, LONG, op1(Ri), 0 }, -/*43*/ { "inc", FALSE, LONG, op1(Ri), 0 }, -/*44*/ { "inc", FALSE, LONG, op1(Ri), 0 }, -/*45*/ { "inc", FALSE, LONG, op1(Ri), 0 }, -/*46*/ { "inc", FALSE, LONG, op1(Ri), 0 }, -/*47*/ { "inc", FALSE, LONG, op1(Ri), 0 }, +/*40*/ { "rex", FALSE, NONE, 0, 0 }, +/*41*/ { "rex.b", FALSE, NONE, 0, 0 }, +/*42*/ { "rex.x", FALSE, NONE, 0, 0 }, +/*43*/ { "rex.xb", FALSE, NONE, 0, 0 }, +/*44*/ { "rex.r", FALSE, NONE, 0, 0 }, +/*45*/ { "rex.rb", FALSE, NONE, 0, 0 }, +/*46*/ { "rex.rx", FALSE, NONE, 0, 0 }, +/*47*/ { "rex.rxb", FALSE, NONE, 0, 0 }, -/*48*/ { "dec", FALSE, LONG, op1(Ri), 0 }, -/*49*/ { "dec", FALSE, LONG, op1(Ri), 0 }, -/*4a*/ { "dec", FALSE, LONG, op1(Ri), 0 }, -/*4b*/ { "dec", FALSE, LONG, op1(Ri), 0 }, -/*4c*/ { "dec", FALSE, LONG, op1(Ri), 0 }, -/*4d*/ { "dec", FALSE, LONG, op1(Ri), 0 }, -/*4e*/ { "dec", FALSE, LONG, op1(Ri), 0 }, -/*4f*/ { "dec", FALSE, LONG, op1(Ri), 0 }, +/*48*/ { "rex.w", FALSE, NONE, 0, 0 }, +/*49*/ { "rex.wb", FALSE, NONE, 0, 0 }, +/*4a*/ { "rex.wx", FALSE, NONE, 0, 0 }, +/*4b*/ { "rex.wxb", FALSE, NONE, 0, 0 }, +/*4c*/ { "rex.wr", FALSE, NONE, 0, 0 }, +/*4d*/ { "rex.wrb", FALSE, NONE, 0, 0 }, +/*4e*/ { "rex.wrx", FALSE, NONE, 0, 0 }, +/*4f*/ { "rex.wrxb", FALSE, NONE, 0, 0 }, /*50*/ { "push", FALSE, LONG, op1(Ri), 0 }, /*51*/ { "push", FALSE, LONG, op1(Ri), 0 }, @@ -624,7 +655,7 @@ /*60*/ { "pusha", FALSE, LONG, 0, 0 }, /*61*/ { "popa", FALSE, LONG, 0, 0 }, /*62*/ { "bound", TRUE, LONG, op2(E, R), 0 }, -/*63*/ { "arpl", TRUE, NONE, op2(Rw,Ew), 0 }, +/*63*/ { "movslq", TRUE, NONE, op2(EL,R), 0 }, /*64*/ { "", FALSE, NONE, 0, 0 }, /*65*/ { "", FALSE, NONE, 0, 0 }, @@ -807,13 +838,13 @@ { "???", FALSE, NONE, 0, 0 } ; -#define f_mod(byte) ((byte)>>6) -#define f_reg(byte) (((byte)>>3)&0x7) -#define f_rm(byte) ((byte)&0x7) +#define f_mod(rex, byte) ((byte)>>6) +#define f_reg(rex, byte) ((((byte)>>3)&0x7) | (rex & REX_R ? 0x8 : 0x0)) +#define f_rm(rex, byte) (((byte)&0x7) | (rex & REX_B ? 0x8 : 0x0)) -#define sib_ss(byte) ((byte)>>6) -#define sib_index(byte) (((byte)>>3)&0x7) -#define sib_base(byte) ((byte)&0x7) +#define sib_ss(rex, byte) ((byte)>>6) +#define sib_index(rex, byte) ((((byte)>>3)&0x7) | (rex & REX_X ? 0x8 : 0x0)) +#define sib_base(rex, byte) (((byte)&0x7) | (rex & REX_B ? 0x8 : 0x0)) struct i_addr { int is_reg; /* if reg, reg number is in 'disp' */ @@ -834,10 +865,25 @@ "%bx" }; -static const char * const db_reg[3][8] = { - { "%al", "%cl", "%dl", "%bl", "%ah", "%ch", "%dh", "%bh" }, - { "%ax", "%cx", "%dx", "%bx", "%sp", "%bp", "%si", "%di" }, - { "%eax", "%ecx", "%edx", "%ebx", "%esp", "%ebp", "%esi", "%edi" } +static const char * const db_reg[2][4][16] = { + + {{"%al", "%cl", "%dl", "%bl", "%ah", "%ch", "%dh", "%bh", + "%r8b", "%r9b", "%r10b", "%r11b", "%r12b", "%r13b", "%r14b", "%r15b" }, + { "%ax", "%cx", "%dx", "%bx", "%sp", "%bp", "%si", "%di", + "%r8w", "%r9w", "%r10w", "%r11w", "%r12w", "%r13w", "%r14w", "%r15w" }, + { "%eax", "%ecx", "%edx", "%ebx", "%esp", "%ebp", "%esi", "%edi", + "%r8d", "%r9d", "%r10d", "%r11d", "%r12d", "%r13d", "%r14d", "%r15d" }, + { "%rax", "%rcx", "%rdx", "%rbx", "%rsp", "%rbp", "%rsi", "%rdi", + "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15" }}, + + {{"%al", "%cl", "%dl", "%bl", "%spl", "%bpl", "%sil", "%dil", + "%r8b", "%r9b", "%r10b", "%r11b", "%r12b", "%r13b", "%r14b", "%r15b" }, + { "%ax", "%cx", "%dx", "%bx", "%sp", "%bp", "%si", "%di", + "%r8w", "%r9w", "%r10w", "%r11w", "%r12w", "%r13w", "%r14w", "%r15w" }, + { "%eax", "%ecx", "%edx", "%ebx", "%esp", "%ebp", "%esi", "%edi", + "%r8d", "%r9d", "%r10d", "%r11d", "%r12d", "%r13d", "%r14d", "%r15d" }, + { "%rax", "%rcx", "%rdx", "%rbx", "%rsp", "%rbp", "%rsi", "%rdi", + "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15" }} }; static const char * const db_seg_reg[8] = { @@ -862,28 +908,29 @@ (loc) += (size); static db_addr_t - db_disasm_esc(db_addr_t loc, int inst, int short_addr, + db_disasm_esc(db_addr_t loc, int inst, int rex, int short_addr, int size, const char *seg); -static void db_print_address(const char *seg, int size, +static void db_print_address(const char *seg, int size, int rex, struct i_addr *addrp); static db_addr_t - db_read_address(db_addr_t loc, int short_addr, int regmodrm, + db_read_address(db_addr_t loc, int short_addr, int rex, int regmodrm, struct i_addr *addrp); /* * Read address at location and return updated location. */ static db_addr_t -db_read_address(loc, short_addr, regmodrm, addrp) +db_read_address(loc, short_addr, rex, regmodrm, addrp) db_addr_t loc; int short_addr; + int rex; int regmodrm; struct i_addr * addrp; /* out */ { int mod, rm, sib, index, disp; - mod = f_mod(regmodrm); - rm = f_rm(regmodrm); + mod = f_mod(rex, regmodrm); + rm = f_rm(rex, regmodrm); if (mod == 3) { addrp->is_reg = TRUE; @@ -924,11 +971,11 @@ else { if (mod != 3 && rm == 4) { get_value_inc(sib, loc, 1, FALSE); - rm = sib_base(sib); - index = sib_index(sib); + rm = sib_base(rex, sib); + index = sib_index(rex, sib); if (index != 4) - addrp->index = db_reg[LONG][index]; - addrp->ss = sib_ss(sib); + addrp->index = db_reg[1][QUAD][index]; + addrp->ss = sib_ss(rex, sib); } switch (mod) { @@ -939,20 +986,20 @@ } else { addrp->disp = 0; - addrp->base = db_reg[LONG][rm]; + addrp->base = db_reg[1][QUAD][rm]; } break; case 1: get_value_inc(disp, loc, 1, TRUE); addrp->disp = disp; - addrp->base = db_reg[LONG][rm]; + addrp->base = db_reg[1][QUAD][rm]; break; case 2: get_value_inc(disp, loc, 4, FALSE); addrp->disp = disp; - addrp->base = db_reg[LONG][rm]; + addrp->base = db_reg[1][QUAD][rm]; break; } } @@ -960,13 +1007,14 @@ } static void -db_print_address(seg, size, addrp) +db_print_address(seg, size, rex, addrp) const char * seg; int size; + int rex; struct i_addr * addrp; { if (addrp->is_reg) { - db_printf("%s", db_reg[size][addrp->disp]); + db_printf("%s", db_reg[rex != 0 ? 1 : 0][(size == LONG && (rex & REX_W)) ? QUAD : size][addrp->disp]); return; } @@ -990,9 +1038,10 @@ * and return updated location. */ static db_addr_t -db_disasm_esc(loc, inst, short_addr, size, seg) +db_disasm_esc(loc, inst, rex, short_addr, size, seg) db_addr_t loc; int inst; + int rex; int short_addr; int size; const char * seg; @@ -1004,8 +1053,8 @@ const char * name; get_value_inc(regmodrm, loc, 1, FALSE); - fp = &db_Esc_inst[inst - 0xd8][f_reg(regmodrm)]; - mod = f_mod(regmodrm); + fp = &db_Esc_inst[inst - 0xd8][f_reg(rex, regmodrm)]; + mod = f_mod(rex, regmodrm); if (mod != 3) { if (*fp->f_name == '\0') { db_printf("<bad instruction>"); @@ -1014,7 +1063,7 @@ /* * Normal address modes. */ - loc = db_read_address(loc, short_addr, regmodrm, &address); + loc = db_read_address(loc, short_addr, rex, regmodrm, &address); db_printf("%s", fp->f_name); switch(fp->f_size) { case SNGL: @@ -1039,7 +1088,7 @@ break; } db_printf("\t"); - db_print_address(seg, BYTE, &address); + db_print_address(seg, BYTE, rex, &address); } else { /* @@ -1048,24 +1097,24 @@ switch (fp->f_rrmode) { case op2(ST,STI): name = (fp->f_rrname) ? fp->f_rrname : fp->f_name; - db_printf("%s\t%%st,%%st(%d)",name,f_rm(regmodrm)); + db_printf("%s\t%%st,%%st(%d)",name,f_rm(rex, regmodrm)); break; case op2(STI,ST): name = (fp->f_rrname) ? fp->f_rrname : fp->f_name; - db_printf("%s\t%%st(%d),%%st",name, f_rm(regmodrm)); + db_printf("%s\t%%st(%d),%%st",name, f_rm(rex, regmodrm)); break; case op1(STI): name = (fp->f_rrname) ? fp->f_rrname : fp->f_name; - db_printf("%s\t%%st(%d)",name, f_rm(regmodrm)); + db_printf("%s\t%%st(%d)",name, f_rm(rex, regmodrm)); break; case op1(X): - name = ((const char * const *)fp->f_rrname)[f_rm(regmodrm)]; + name = ((const char * const *)fp->f_rrname)[f_rm(rex, regmodrm)]; if (*name == '\0') goto bad; db_printf("%s", name); break; case op1(XA): - name = ((const char * const *)fp->f_rrname)[f_rm(regmodrm)]; + name = ((const char * const *)fp->f_rrname)[f_rm(rex, regmodrm)]; if (*name == '\0') goto bad; db_printf("%s\t%%ax", name); @@ -1098,6 +1147,7 @@ const char * i_name; int i_size; int i_mode; + int rex = 0; int regmodrm = 0; boolean_t first; int displ; @@ -1155,13 +1205,17 @@ prefix = FALSE; break; } + if (inst >= 0x40 && inst < 0x50) { + rex = inst; + prefix = TRUE; + } if (prefix) { get_value_inc(inst, loc, 1, FALSE); } } while (prefix); if (inst >= 0xd8 && inst <= 0xdf) { - loc = db_disasm_esc(loc, inst, short_addr, size, seg); + loc = db_disasm_esc(loc, inst, rex, short_addr, size, seg); db_printf("\n"); return (loc); } @@ -1181,7 +1235,7 @@ if (ip->i_has_modrm) { get_value_inc(regmodrm, loc, 1, FALSE); - loc = db_read_address(loc, short_addr, regmodrm, &address); + loc = db_read_address(loc, short_addr, rex, regmodrm, &address); } i_name = ip->i_name; @@ -1191,17 +1245,17 @@ if (ip->i_extra == db_Grp1 || ip->i_extra == db_Grp2 || ip->i_extra == db_Grp6 || ip->i_extra == db_Grp7 || ip->i_extra == db_Grp8 || ip->i_extra == db_Grp9) { - i_name = ((const char * const *)ip->i_extra)[f_reg(regmodrm)]; + i_name = ((const char * const *)ip->i_extra)[f_reg(rex, regmodrm)]; } else if (ip->i_extra == db_Grp3) { ip = ip->i_extra; - ip = &ip[f_reg(regmodrm)]; + ip = &ip[f_reg(rex, regmodrm)]; i_name = ip->i_name; i_mode = ip->i_mode; } else if (ip->i_extra == db_Grp4 || ip->i_extra == db_Grp5) { ip = ip->i_extra; - ip = &ip[f_reg(regmodrm)]; + ip = &ip[f_reg(rex, regmodrm)]; i_name = ip->i_name; i_mode = ip->i_mode; i_size = ip->i_size; @@ -1215,6 +1269,10 @@ >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200504010320.j313KHbC089509>