Date: Mon, 20 Oct 2003 11:22:28 -0700 (PDT) From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 40013 for review Message-ID: <200310201822.h9KIMSKS074899@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=40013 Change 40013 by sam@sam_ebb on 2003/10/20 11:22:16 IFC @ 40008 Affected files ... .. //depot/projects/netperf/sys/alpha/alpha/machdep.c#6 integrate .. //depot/projects/netperf/sys/amd64/amd64/machdep.c#6 integrate .. //depot/projects/netperf/sys/cam/cam_periph.c#4 integrate .. //depot/projects/netperf/sys/cam/scsi/scsi_cd.c#9 integrate .. //depot/projects/netperf/sys/compat/linprocfs/linprocfs.c#9 integrate .. //depot/projects/netperf/sys/compat/linux/linux_ioctl.c#2 integrate .. //depot/projects/netperf/sys/compat/svr4/svr4_filio.c#2 integrate .. //depot/projects/netperf/sys/compat/svr4/svr4_misc.c#3 integrate .. //depot/projects/netperf/sys/compat/svr4/svr4_signal.c#2 integrate .. //depot/projects/netperf/sys/compat/svr4/svr4_stream.c#2 integrate .. //depot/projects/netperf/sys/compat/svr4/svr4_sysvec.c#3 integrate .. //depot/projects/netperf/sys/compat/svr4/svr4_util.h#2 integrate .. //depot/projects/netperf/sys/conf/files#14 integrate .. //depot/projects/netperf/sys/crypto/rijndael/Makefile#1 branch .. //depot/projects/netperf/sys/crypto/rijndael/rijndael-alg-fst.c#3 integrate .. //depot/projects/netperf/sys/crypto/rijndael/rijndael-alg-fst.h#3 integrate .. //depot/projects/netperf/sys/crypto/rijndael/rijndael-api-fst.c#5 integrate .. //depot/projects/netperf/sys/crypto/rijndael/rijndael-api-fst.h#3 integrate .. //depot/projects/netperf/sys/crypto/rijndael/test00.c#1 branch .. //depot/projects/netperf/sys/dev/acpica/acpi.c#10 integrate .. //depot/projects/netperf/sys/dev/ata/ata-lowlevel.c#9 integrate .. //depot/projects/netperf/sys/dev/ata/ata-pci.c#5 integrate .. //depot/projects/netperf/sys/dev/ata/ata-queue.c#7 integrate .. //depot/projects/netperf/sys/dev/ata/atapi-cd.c#9 integrate .. //depot/projects/netperf/sys/dev/ep/if_ep.c#5 integrate .. //depot/projects/netperf/sys/dev/ep/if_ep_eisa.c#3 integrate .. //depot/projects/netperf/sys/dev/ep/if_ep_isa.c#4 integrate .. //depot/projects/netperf/sys/dev/ep/if_ep_mca.c#3 integrate .. //depot/projects/netperf/sys/dev/ep/if_ep_pccard.c#4 integrate .. //depot/projects/netperf/sys/dev/ep/if_epreg.h#2 integrate .. //depot/projects/netperf/sys/dev/ep/if_epvar.h#2 integrate .. //depot/projects/netperf/sys/dev/firewire/sbp.c#8 integrate .. //depot/projects/netperf/sys/dev/firewire/sbp_targ.c#1 branch .. //depot/projects/netperf/sys/dev/ips/ips_commands.c#3 integrate .. //depot/projects/netperf/sys/dev/matcd/matcd.c#3 integrate .. //depot/projects/netperf/sys/dev/mcd/mcd.c#3 integrate .. //depot/projects/netperf/sys/dev/md/md.c#6 integrate .. //depot/projects/netperf/sys/dev/null/null.c#4 integrate .. //depot/projects/netperf/sys/dev/ofw/ofw_disk.c#3 integrate .. //depot/projects/netperf/sys/dev/raidframe/rf_freebsdkintf.c#4 integrate .. //depot/projects/netperf/sys/dev/scd/scd.c#3 integrate .. //depot/projects/netperf/sys/dev/streams/streams.c#3 integrate .. //depot/projects/netperf/sys/dev/vinum/vinumrequest.c#3 integrate .. //depot/projects/netperf/sys/fs/devfs/devfs_vnops.c#2 integrate .. //depot/projects/netperf/sys/fs/hpfs/hpfs_vnops.c#3 integrate .. //depot/projects/netperf/sys/fs/msdosfs/msdosfs_vnops.c#4 integrate .. //depot/projects/netperf/sys/fs/nwfs/nwfs_vnops.c#2 integrate .. //depot/projects/netperf/sys/fs/procfs/procfs_map.c#4 integrate .. //depot/projects/netperf/sys/fs/smbfs/smbfs_vnops.c#4 integrate .. //depot/projects/netperf/sys/fs/specfs/spec_vnops.c#7 integrate .. //depot/projects/netperf/sys/fs/udf/udf_vnops.c#3 integrate .. //depot/projects/netperf/sys/geom/geom_dev.c#7 integrate .. //depot/projects/netperf/sys/geom/geom_disk.c#5 integrate .. //depot/projects/netperf/sys/geom/geom_io.c#6 integrate .. //depot/projects/netperf/sys/gnu/ext2fs/ext2_bmap.c#2 integrate .. //depot/projects/netperf/sys/gnu/ext2fs/ext2_inode.c#3 integrate .. //depot/projects/netperf/sys/gnu/ext2fs/ext2_vnops.c#2 integrate .. //depot/projects/netperf/sys/i386/i386/machdep.c#8 integrate .. //depot/projects/netperf/sys/i386/i386/vm_machdep.c#4 integrate .. //depot/projects/netperf/sys/ia64/ia64/machdep.c#12 integrate .. //depot/projects/netperf/sys/ia64/include/vmparam.h#3 integrate .. //depot/projects/netperf/sys/isa/fd.c#5 integrate .. //depot/projects/netperf/sys/isofs/cd9660/cd9660_vnops.c#3 integrate .. //depot/projects/netperf/sys/kern/init_sysent.c#3 integrate .. //depot/projects/netperf/sys/kern/kern_descrip.c#6 integrate .. //depot/projects/netperf/sys/kern/kern_event.c#2 integrate .. //depot/projects/netperf/sys/kern/kern_exec.c#6 integrate .. //depot/projects/netperf/sys/kern/kern_idle.c#3 integrate .. //depot/projects/netperf/sys/kern/kern_physio.c#3 integrate .. //depot/projects/netperf/sys/kern/subr_disk.c#3 integrate .. //depot/projects/netperf/sys/kern/sys_pipe.c#7 integrate .. //depot/projects/netperf/sys/kern/syscalls.c#3 integrate .. //depot/projects/netperf/sys/kern/syscalls.master#3 integrate .. //depot/projects/netperf/sys/kern/tty_cons.c#6 integrate .. //depot/projects/netperf/sys/kern/uipc_syscalls.c#6 integrate .. //depot/projects/netperf/sys/kern/vfs_bio.c#10 integrate .. //depot/projects/netperf/sys/kern/vfs_cluster.c#3 integrate .. //depot/projects/netperf/sys/kern/vfs_syscalls.c#7 integrate .. //depot/projects/netperf/sys/modules/firewire/Makefile#2 integrate .. //depot/projects/netperf/sys/modules/firewire/sbp_targ/Makefile#1 branch .. //depot/projects/netperf/sys/net/bpf.h#2 integrate .. //depot/projects/netperf/sys/netinet/tcp_input.c#4 edit .. //depot/projects/netperf/sys/netinet6/ah_core.c#5 integrate .. //depot/projects/netperf/sys/netinet6/esp_core.c#6 integrate .. //depot/projects/netperf/sys/netinet6/in6.c#9 integrate .. //depot/projects/netperf/sys/netinet6/in6_rmx.c#8 integrate .. //depot/projects/netperf/sys/netinet6/ip6_forward.c#8 integrate .. //depot/projects/netperf/sys/netinet6/ip6_mroute.c#4 integrate .. //depot/projects/netperf/sys/netinet6/ip6_output.c#15 integrate .. //depot/projects/netperf/sys/netinet6/nd6.c#12 integrate .. //depot/projects/netperf/sys/netinet6/nd6.h#5 integrate .. //depot/projects/netperf/sys/netinet6/nd6_rtr.c#8 integrate .. //depot/projects/netperf/sys/nfsclient/nfs_bio.c#4 integrate .. //depot/projects/netperf/sys/nfsclient/nfs_vnops.c#6 integrate .. //depot/projects/netperf/sys/opencrypto/cryptodev.c#3 integrate .. //depot/projects/netperf/sys/pc98/i386/machdep.c#6 integrate .. //depot/projects/netperf/sys/pc98/pc98/fd.c#4 integrate .. //depot/projects/netperf/sys/pc98/pc98/wd.c#2 integrate .. //depot/projects/netperf/sys/pc98/pc98/wd_cd.c#2 integrate .. //depot/projects/netperf/sys/pci/if_dc.c#8 integrate .. //depot/projects/netperf/sys/pci/if_sis.c#11 integrate .. //depot/projects/netperf/sys/powerpc/powerpc/machdep.c#3 integrate .. //depot/projects/netperf/sys/sparc64/sparc64/machdep.c#5 integrate .. //depot/projects/netperf/sys/sys/bio.h#2 integrate .. //depot/projects/netperf/sys/sys/buf.h#4 integrate .. //depot/projects/netperf/sys/sys/cdio.h#2 integrate .. //depot/projects/netperf/sys/sys/conf.h#4 integrate .. //depot/projects/netperf/sys/sys/mbuf.h#4 integrate .. //depot/projects/netperf/sys/sys/proc.h#6 integrate .. //depot/projects/netperf/sys/sys/syscall.h#3 integrate .. //depot/projects/netperf/sys/sys/syscall.mk#3 integrate .. //depot/projects/netperf/sys/sys/sysproto.h#3 integrate .. //depot/projects/netperf/sys/ufs/ffs/ffs_inode.c#3 integrate .. //depot/projects/netperf/sys/ufs/ufs/ufs_bmap.c#2 integrate .. //depot/projects/netperf/sys/ufs/ufs/ufs_vnops.c#4 integrate .. //depot/projects/netperf/sys/vm/swap_pager.c#6 integrate .. //depot/projects/netperf/sys/vm/vm_contig.c#4 integrate .. //depot/projects/netperf/sys/vm/vm_map.c#9 integrate .. //depot/projects/netperf/sys/vm/vm_object.c#7 integrate .. //depot/projects/netperf/sys/vm/vm_pageout.c#8 integrate .. //depot/projects/netperf/sys/vm/vm_pageout.h#3 integrate .. //depot/projects/netperf/sys/vm/vm_pager.c#3 integrate .. //depot/projects/netperf/sys/vm/vnode_pager.c#8 integrate Differences ... ==== //depot/projects/netperf/sys/alpha/alpha/machdep.c#6 (text+ko) ==== @@ -88,7 +88,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.212 2003/08/25 03:43:07 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.213 2003/10/19 02:36:06 peter Exp $"); #include "opt_compat.h" #include "opt_ddb.h" @@ -1731,6 +1731,12 @@ prom_halt(1); } +void +cpu_idle(void) +{ + /* Insert code to halt (until next interrupt) for the idle loop */ +} + /* * Clear registers on exec */ ==== //depot/projects/netperf/sys/amd64/amd64/machdep.c#6 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.593 2003/09/23 00:45:55 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.594 2003/10/18 22:25:07 njl Exp $"); #include "opt_atalk.h" #include "opt_compat.h" @@ -455,6 +455,17 @@ SYSCTL_INT(_machdep, OID_AUTO, cpu_idle_hlt, CTLFLAG_RW, &cpu_idle_hlt, 0, "Idle loop HLT enable"); +static void +cpu_idle_default(void) +{ + /* + * we must absolutely guarentee that hlt is the + * absolute next instruction after sti or we + * introduce a timing window. + */ + __asm __volatile("sti; hlt"); +} + /* * Note that we have to be careful here to avoid a race between checking * sched_runnable() and actually halting. If we don't do this, we may waste @@ -467,19 +478,16 @@ if (cpu_idle_hlt) { disable_intr(); - if (sched_runnable()) { + if (sched_runnable()) enable_intr(); - } else { - /* - * we must absolutely guarentee that hlt is the - * absolute next instruction after sti or we - * introduce a timing window. - */ - __asm __volatile("sti; hlt"); - } + else + (*cpu_idle_hook)(); } } +/* Other subsystems (e.g., ACPI) can hook this later. */ +void (*cpu_idle_hook)(void) = cpu_idle_default; + /* * Clear registers on exec */ ==== //depot/projects/netperf/sys/cam/cam_periph.c#4 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/cam/cam_periph.c,v 1.53 2003/09/21 08:42:32 thomas Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/cam_periph.c,v 1.54 2003/10/18 11:01:11 phk Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -638,9 +638,6 @@ /* set the transfer length, we know it's < DFLTPHYS */ mapinfo->bp[i]->b_bufsize = lengths[i]; - /* set the flags */ - mapinfo->bp[i]->b_flags = B_PHYS; - /* set the direction */ mapinfo->bp[i]->b_iocmd = flags[i]; @@ -656,10 +653,8 @@ for (j = 0; j < i; ++j) { *data_ptrs[j] = mapinfo->bp[j]->b_saveaddr; vunmapbuf(mapinfo->bp[j]); - mapinfo->bp[j]->b_flags &= ~B_PHYS; relpbuf(mapinfo->bp[j], NULL); } - mapinfo->bp[i]->b_flags &= ~B_PHYS; relpbuf(mapinfo->bp[i], NULL); PRELE(curproc); return(EACCES); @@ -720,9 +715,6 @@ /* unmap the buffer */ vunmapbuf(mapinfo->bp[i]); - /* clear the flags we set above */ - mapinfo->bp[i]->b_flags &= ~B_PHYS; - /* release the buffer */ relpbuf(mapinfo->bp[i], NULL); } ==== //depot/projects/netperf/sys/cam/scsi/scsi_cd.c#9 (text+ko) ==== @@ -46,7 +46,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_cd.c,v 1.86 2003/10/07 14:46:59 thomas Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_cd.c,v 1.87 2003/10/18 17:24:05 phk Exp $"); #include "opt_cd.h" @@ -1518,8 +1518,8 @@ /* read */bp->bio_cmd == BIO_READ, /* byte2 */ 0, /* minimum_cmd_size */ 10, - /* lba */ bp->bio_blkno / - (softc->params.blksize / DEV_BSIZE), + /* lba */ bp->bio_offset / + softc->params.blksize, bp->bio_bcount / softc->params.blksize, /* data_ptr */ bp->bio_data, /* dxfer_len */ bp->bio_bcount, ==== //depot/projects/netperf/sys/compat/linprocfs/linprocfs.c#9 (text+ko) ==== @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.76 2003/10/08 18:05:59 gallatin Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.78 2003/10/20 04:10:20 cognet Exp $"); #include <sys/param.h> #include <sys/queue.h> @@ -822,11 +822,98 @@ static int linprocfs_doprocmaps(PFS_FILL_ARGS) { - sbuf_printf(sb, "doprocmaps\n%c", '\0'); - - return (0); -} - + char mebuffer[512]; + vm_map_t map = &p->p_vmspace->vm_map; + vm_map_entry_t entry; + vm_object_t obj, tobj, lobj; + vm_ooffset_t off = 0; + char *name = "", *freename = NULL; + size_t len; + ino_t ino; + int ref_count, shadow_count, flags; + int error; + + PROC_LOCK(p); + error = p_candebug(td, p); + PROC_UNLOCK(p); + if (error) + return (error); + + if (uio->uio_rw != UIO_READ) + return (EOPNOTSUPP); + + if (uio->uio_offset != 0) + return (0); + + error = 0; + if (map != &curthread->td_proc->p_vmspace->vm_map) + vm_map_lock_read(map); + for (entry = map->header.next; + ((uio->uio_resid > 0) && (entry != &map->header)); + entry = entry->next) { + name = ""; + freename = NULL; + if (entry->eflags & MAP_ENTRY_IS_SUB_MAP) + continue; + obj = entry->object.vm_object; + for (lobj = tobj = obj; tobj; tobj = tobj->backing_object) + lobj = tobj; + ino = 0; + if (lobj) { + VM_OBJECT_LOCK(lobj); + off = IDX_TO_OFF(lobj->size); + if (lobj->type == OBJT_VNODE && lobj->handle) { + vn_fullpath(td, (struct vnode *)lobj->handle, + &name, &freename); + ino = ((struct vnode *) + lobj->handle)->v_cachedid; + } + flags = obj->flags; + ref_count = obj->ref_count; + shadow_count = obj->shadow_count; + VM_OBJECT_UNLOCK(lobj); + } else { + flags = 0; + ref_count = 0; + shadow_count = 0; + } + + /* + * format: + * start, end, access, offset, major, minor, inode, name. + */ + snprintf(mebuffer, sizeof mebuffer, + "%08lx-%08lx %s%s%s%s %08lx %02x:%02x %lu%s%s\n", + (u_long)entry->start, (u_long)entry->end, + (entry->protection & VM_PROT_READ)?"r":"-", + (entry->protection & VM_PROT_WRITE)?"w":"-", + (entry->protection & VM_PROT_EXECUTE)?"x":"-", + "p", + (u_long)off, + 0, + 0, + (u_long)ino, + *name ? " " : "", + name + ); + if (freename) + free(freename, M_TEMP); + len = strlen(mebuffer); + if (len > uio->uio_resid) + len = uio->uio_resid; /* + * XXX We should probably return + * EFBIG here, as in procfs. + */ + error = uiomove(mebuffer, len, uio); + if (error) + break; + } + if (map != &curthread->td_proc->p_vmspace->vm_map) + vm_map_unlock_read(map); + + return (error); +} + /* * Filler function for proc/net/dev */ ==== //depot/projects/netperf/sys/compat/linux/linux_ioctl.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_ioctl.c,v 1.109 2003/06/28 19:32:07 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_ioctl.c,v 1.110 2003/10/20 09:51:00 sos Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -1408,24 +1408,7 @@ /* LINUX_CDROMREADMODE2 */ /* LINUX_CDROMREADMODE1 */ - - case LINUX_CDROMREADAUDIO: { - struct l_cdrom_read_audio lra; - struct ioc_read_audio bra; - - error = copyin((void *)args->arg, &lra, sizeof(lra)); - if (error) - break; - bra.address_format = lra.addr_format; - linux_to_bsd_msf_lba(bra.address_format, &lra.addr, - &bra.address); - bra.nframes = lra.nframes; - bra.buffer = lra.buf; - error = fo_ioctl(fp, CDIOCREADAUDIO, (caddr_t)&bra, - td->td_ucred, td); - break; - } - + /* LINUX_CDROMREADAUDIO */ /* LINUX_CDROMEJECT_SW */ /* LINUX_CDROMMULTISESSION */ /* LINUX_CDROM_GET_UPC */ ==== //depot/projects/netperf/sys/compat/svr4/svr4_filio.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_filio.c,v 1.29 2003/06/10 21:35:15 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_filio.c,v 1.30 2003/10/20 10:38:48 tjr Exp $"); #include <sys/param.h> #include <sys/proc.h> @@ -40,6 +40,8 @@ #include <sys/poll.h> #include <sys/malloc.h> #include <sys/mutex.h> +#include <sys/resource.h> +#include <sys/resourcevar.h> #include <sys/sysproto.h> @@ -64,6 +66,11 @@ int idx = 0, cerr; u_long siz; + mtx_assert(&Giant, MA_OWNED); + if (uap->nfds > td->td_proc->p_rlimit[RLIMIT_NOFILE].rlim_cur && + uap->nfds > FD_SETSIZE) + return (EINVAL); + pa.fds = uap->fds; pa.nfds = uap->nfds; pa.timeout = uap->timeout; ==== //depot/projects/netperf/sys/compat/svr4/svr4_misc.c#3 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_misc.c,v 1.66 2003/08/06 18:40:49 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_misc.c,v 1.67 2003/10/20 10:38:48 tjr Exp $"); #include "opt_mac.h" @@ -444,6 +444,9 @@ u_long *cookiebuf = NULL, *cookie; int ncookies = 0, *retval = td->td_retval; + if (uap->nbytes < 0) + return (EINVAL); + if ((error = getvnode(td->td_proc->p_fd, uap->fd, &fp)) != 0) return (error); @@ -1734,6 +1737,7 @@ { struct nameidata nd; int error, *retval = td->td_retval; + unsigned int ncopy; NDINIT(&nd, LOOKUP, NOFOLLOW | SAVENAME, UIO_USERSPACE, uap->path, td); @@ -1741,12 +1745,11 @@ if ((error = namei(&nd)) != 0) return error; - if ((error = copyout(nd.ni_cnd.cn_pnbuf, uap->buf, - uap->bufsiz)) != 0) + ncopy = min(uap->bufsiz, strlen(nd.ni_cnd.cn_pnbuf) + 1); + if ((error = copyout(nd.ni_cnd.cn_pnbuf, uap->buf, ncopy)) != 0) goto bad; - *retval = strlen(nd.ni_cnd.cn_pnbuf) < uap->bufsiz ? - strlen(nd.ni_cnd.cn_pnbuf) + 1 : uap->bufsiz; + *retval = ncopy; bad: NDFREE(&nd, NDF_ONLY_PNBUF); vput(nd.ni_vp); ==== //depot/projects/netperf/sys/compat/svr4/svr4_signal.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_signal.c,v 1.28 2003/06/10 21:35:15 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_signal.c,v 1.29 2003/10/20 10:38:48 tjr Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -269,6 +269,9 @@ struct sigaction *nbsap; int error; + if (uap->signum < 0 || uap->signum >= SVR4_NSIG) + return (EINVAL); + DPRINTF(("@@@ svr4_sys_sigaction(%d, %d, %d)\n", td->td_proc->p_pid, uap->signum, SVR4_SVR42BSD_SIG(uap->signum))); @@ -337,9 +340,14 @@ p = td->td_proc; DPRINTF(("@@@ svr4_sys_signal(%d)\n", p->p_pid)); - signum = SVR4_SVR42BSD_SIG(SVR4_SIGNO(uap->signum)); - if (signum <= 0 || signum > SVR4_NSIG) + signum = SVR4_SIGNO(uap->signum); + if (signum < 0 || signum >= SVR4_NSIG) { + if (SVR4_SIGCALL(uap->signum) == SVR4_SIGNAL_MASK || + SVR4_SIGCALL(uap->signum) == SVR4_SIGDEFER_MASK) + td->td_retval[0] = (int)SVR4_SIG_ERR; return (EINVAL); + } + signum = SVR4_SVR42BSD_SIG(signum); switch (SVR4_SIGCALL(uap->signum)) { case SVR4_SIGDEFER_MASK: @@ -509,6 +517,8 @@ { struct kill_args ka; + if (uap->signum < 0 || uap->signum >= SVR4_NSIG) + return (EINVAL); ka.pid = uap->pid; ka.signum = SVR4_SVR42BSD_SIG(uap->signum); return kill(td, &ka); ==== //depot/projects/netperf/sys/compat/svr4/svr4_stream.c#2 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_stream.c,v 1.45 2003/06/10 21:35:15 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_stream.c,v 1.46 2003/10/20 10:38:48 tjr Exp $"); #define COMPAT_43 1 @@ -406,22 +406,32 @@ const char *str; struct svr4_strioctl *ioc; { - u_char *ptr = (u_char *) malloc(ioc->len, M_TEMP, M_WAITOK); + u_char *ptr = NULL; + int len; int error; + len = ioc->len; + if (len > 1024) + len = 1024; + + if (len > 0) { + ptr = (u_char *) malloc(len, M_TEMP, M_WAITOK); + if ((error = copyin(ioc->buf, ptr, len)) != 0) { + free((char *) ptr, M_TEMP); + return error; + } + } + uprintf("%s cmd = %ld, timeout = %d, len = %d, buf = %p { ", str, ioc->cmd, ioc->timeout, ioc->len, ioc->buf); - if ((error = copyin(ioc->buf, ptr, ioc->len)) != 0) { - free((char *) ptr, M_TEMP); - return error; - } - - bufprint(ptr, ioc->len); + if (ptr != NULL) + bufprint(ptr, len); uprintf("}\n"); - free((char *) ptr, M_TEMP); + if (ptr != NULL) + free((char *) ptr, M_TEMP); return 0; } @@ -435,6 +445,9 @@ int maxlen = str->maxlen; int len = str->len; + if (maxlen > 8192) + maxlen = 8192; + if (maxlen < 0) maxlen = 0; @@ -521,7 +534,8 @@ size_t l = strlen(path) + 1; void *tpath; - tpath = stackgap_alloc(&sg, l); + if ((tpath = stackgap_alloc(&sg, l)) == NULL) + return ENAMETOOLONG; la.ub = stackgap_alloc(&sg, sizeof(struct stat)); if ((error = copyout(path, tpath, l)) != 0) @@ -760,6 +774,9 @@ if (st == NULL) return EINVAL; + if (ioc->len < 0 || ioc->len > sizeof(lst)) + return EINVAL; + if ((error = copyin(ioc->buf, &lst, ioc->len)) != 0) return error; @@ -961,6 +978,9 @@ memset(&info, 0, sizeof(info)); + if (ioc->len < 0 || ioc->len > sizeof(info)) + return EINVAL; + if ((error = copyin(ioc->buf, &info, ioc->len)) != 0) return error; @@ -1009,6 +1029,9 @@ return EINVAL; } + if (ioc->len < 0 || ioc->len > sizeof(bnd)) + return EINVAL; + if ((error = copyin(ioc->buf, &bnd, ioc->len)) != 0) return error; @@ -1137,7 +1160,7 @@ struct sockaddr_in sain; struct sockaddr_un saun; struct svr4_strmcmd sc; - int sasize; + int sasize, oldsasize; caddr_t sg; int *lenp; @@ -1225,11 +1248,16 @@ return error; } + oldsasize = sasize; + if ((error = copyin(lenp, &sasize, sizeof(*lenp))) != 0) { DPRINTF(("ti_ioctl: error copying in socket size\n")); return error; } + if (sasize < 0 || sasize > oldsasize) + return EINVAL; + switch (st->s_family) { case AF_INET: sockaddr_to_netaddr_in(&sc, &sain); @@ -1794,7 +1822,7 @@ return EINVAL; } - if (ctl.len > sizeof(sc)) { + if (ctl.len < 0 || ctl.len > sizeof(sc)) { DPRINTF(("putmsg: Bad control size %d != %d\n", ctl.len, sizeof(struct svr4_strmcmd))); return EINVAL; @@ -1962,6 +1990,8 @@ if (uap->ctl != NULL) { if ((error = copyin(uap->ctl, &ctl, sizeof(ctl))) != 0) return error; + if (ctl.len < 0) + return EINVAL; } else { ctl.len = -1; @@ -2147,6 +2177,9 @@ if (ctl.maxlen > 36 && ctl.len < 36) ctl.len = 36; + if (ctl.len > sizeof(sc)) + ctl.len = sizeof(sc); + if ((error = copyin(ctl.buf, &sc, ctl.len)) != 0) return error; ==== //depot/projects/netperf/sys/compat/svr4/svr4_sysvec.c#3 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_sysvec.c,v 1.34 2003/09/25 01:10:23 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_sysvec.c,v 1.35 2003/10/20 10:38:48 tjr Exp $"); /* XXX we use functions that might not exist. */ #include "opt_compat.h" @@ -364,8 +364,10 @@ *pbuf = buf; else { sz = &ptr[len] - buf; - *pbuf = stackgap_alloc(sgp, sz + 1); - error = copyout(buf, *pbuf, sz); + if ((*pbuf = stackgap_alloc(sgp, sz + 1)) != NULL) + error = copyout(buf, *pbuf, sz); + else + error = ENAMETOOLONG; free(buf, M_TEMP); } ==== //depot/projects/netperf/sys/compat/svr4/svr4_util.h#2 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/compat/svr4/svr4_util.h,v 1.6 2002/03/20 05:41:38 alfred Exp $ + * $FreeBSD: src/sys/compat/svr4/svr4_util.h,v 1.7 2003/10/20 10:38:48 tjr Exp $ */ #ifndef _SVR4_UTIL_H_ @@ -63,7 +63,10 @@ size_t sz; { void *p = (void *) *sgp; - *sgp += ALIGN(sz); + sz = ALIGN(sz); + if (*sgp + sz > (caddr_t)(PS_STRINGS - szsigcode)) + return NULL; + *sgp += sz; return p; } ==== //depot/projects/netperf/sys/conf/files#14 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.834 2003/10/15 08:53:04 phk Exp $ +# $FreeBSD: src/sys/conf/files,v 1.836 2003/10/19 21:28:33 ume Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -416,6 +416,7 @@ dev/firewire/fwohci_pci.c optional firewire pci dev/firewire/if_fwe.c optional fwe dev/firewire/sbp.c optional sbp +dev/firewire/sbp_targ.c optional sbp_targ dev/fxp/if_fxp.c optional fxp dev/gem/if_gem.c optional gem dev/gem/if_gem_pci.c optional gem pci @@ -1438,12 +1439,12 @@ netinet/tcp_timer.c optional inet netinet/tcp_usrreq.c optional inet netinet/udp_usrreq.c optional inet -netinet6/ah_aesxcbcmac.c optional ipsec +#netinet6/ah_aesxcbcmac.c optional ipsec netinet6/ah_core.c optional ipsec netinet6/ah_input.c optional ipsec netinet6/ah_output.c optional ipsec netinet6/dest6.c optional inet6 -netinet6/esp_aesctr.c optional ipsec ipsec_esp +#netinet6/esp_aesctr.c optional ipsec ipsec_esp netinet6/esp_core.c optional ipsec ipsec_esp netinet6/esp_input.c optional ipsec ipsec_esp netinet6/esp_output.c optional ipsec ipsec_esp ==== //depot/projects/netperf/sys/crypto/rijndael/rijndael-alg-fst.c#3 (text+ko) ==== @@ -1,31 +1,19 @@ -/* $KAME: rijndael-alg-fst.c,v 1.10 2003/07/15 10:47:16 itojun Exp $ */ -/** - * rijndael-alg-fst.c +/* $KAME: rijndael-alg-fst.c,v 1.7 2001/05/27 00:23:23 itojun Exp $ */ + +/* + * rijndael-alg-fst.c v2.3 April '2000 * - * @version 3.0 (December 2000) + * Optimised ANSI C code * - * Optimised ANSI C code for the Rijndael cipher (now AES) + * authors: v1.0: Antoon Bosselaers + * v2.0: Vincent Rijmen + * v2.3: Paulo Barreto * - * @author Vincent Rijmen <vincent.rijmen@esat.kuleuven.ac.be> - * @author Antoon Bosselaers <antoon.bosselaers@esat.kuleuven.ac.be> - * @author Paulo Barreto <paulo.barreto@terra.com.br> - * - * This code is hereby placed in the public domain. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS - * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, - * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * This code is placed in the public domain. */ + #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/crypto/rijndael/rijndael-alg-fst.c,v 1.5 2003/10/12 21:05:05 ume Exp $"); +__FBSDID("$FreeBSD: src/sys/crypto/rijndael/rijndael-alg-fst.c,v 1.6 2003/10/19 21:28:33 ume Exp $"); #include <sys/cdefs.h> #include <sys/types.h> @@ -34,1191 +22,1426 @@ #else #include <string.h> #endif - #include <crypto/rijndael/rijndael-alg-fst.h> #include <crypto/rijndael/rijndael_local.h> -/* -Te0[x] = S [x].[02, 01, 01, 03]; -Te1[x] = S [x].[03, 02, 01, 01]; -Te2[x] = S [x].[01, 03, 02, 01]; -Te3[x] = S [x].[01, 01, 03, 02]; -Te4[x] = S [x].[01, 01, 01, 01]; +const u8 S[256] = { + 99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, 118, +202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, 114, 192, +183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, 216, 49, 21, + 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, 235, 39, 178, 117, + 9, 131, 44, 26, 27, 110, 90, 160, 82, 59, 214, 179, 41, 227, 47, 132, + 83, 209, 0, 237, 32, 252, 177, 91, 106, 203, 190, 57, 74, 76, 88, 207, +208, 239, 170, 251, 67, 77, 51, 133, 69, 249, 2, 127, 80, 60, 159, 168, + 81, 163, 64, 143, 146, 157, 56, 245, 188, 182, 218, 33, 16, 255, 243, 210, +205, 12, 19, 236, 95, 151, 68, 23, 196, 167, 126, 61, 100, 93, 25, 115, + 96, 129, 79, 220, 34, 42, 144, 136, 70, 238, 184, 20, 222, 94, 11, 219, +224, 50, 58, 10, 73, 6, 36, 92, 194, 211, 172, 98, 145, 149, 228, 121, +231, 200, 55, 109, 141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, +186, 120, 37, 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, +112, 62, 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193, 29, 158, +225, 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, 223, +140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, 22 +}; + +#ifdef INTERMEDIATE_VALUE_KAT +static const u8 Si[256] = { + 82, 9, 106, 213, 48, 54, 165, 56, 191, 64, 163, 158, 129, 243, 215, 251, +124, 227, 57, 130, 155, 47, 255, 135, 52, 142, 67, 68, 196, 222, 233, 203, + 84, 123, 148, 50, 166, 194, 35, 61, 238, 76, 149, 11, 66, 250, 195, 78, + 8, 46, 161, 102, 40, 217, 36, 178, 118, 91, 162, 73, 109, 139, 209, 37, +114, 248, 246, 100, 134, 104, 152, 22, 212, 164, 92, 204, 93, 101, 182, 146, +108, 112, 72, 80, 253, 237, 185, 218, 94, 21, 70, 87, 167, 141, 157, 132, +144, 216, 171, 0, 140, 188, 211, 10, 247, 228, 88, 5, 184, 179, 69, 6, +208, 44, 30, 143, 202, 63, 15, 2, 193, 175, 189, 3, 1, 19, 138, 107, + 58, 145, 17, 65, 79, 103, 220, 234, 151, 242, 207, 206, 240, 180, 230, 115, +150, 172, 116, 34, 231, 173, 53, 133, 226, 249, 55, 232, 28, 117, 223, 110, + 71, 241, 26, 113, 29, 41, 197, 137, 111, 183, 98, 14, 170, 24, 190, 27, +252, 86, 62, 75, 198, 210, 121, 32, 154, 219, 192, 254, 120, 205, 90, 244, + 31, 221, 168, 51, 136, 7, 199, 49, 177, 18, 16, 89, 39, 128, 236, 95, + 96, 81, 127, 169, 25, 181, 74, 13, 45, 229, 122, 159, 147, 201, 156, 239, +160, 224, 59, 77, 174, 42, 245, 176, 200, 235, 187, 60, 131, 83, 153, 97, + 23, 43, 4, 126, 186, 119, 214, 38, 225, 105, 20, 99, 85, 33, 12, 125 +}; +#endif /* INTERMEDIATE_VALUE_KAT */ + +union xtab { + u32 xt32[256]; + u8 xt8[256][4]; +}; + +static const union xtab xT1 = { + .xt8 = { +{0xc6,0x63,0x63,0xa5}, {0xf8,0x7c,0x7c,0x84}, {0xee,0x77,0x77,0x99}, {0xf6,0x7b,0x7b,0x8d}, +{0xff,0xf2,0xf2,0x0d}, {0xd6,0x6b,0x6b,0xbd}, {0xde,0x6f,0x6f,0xb1}, {0x91,0xc5,0xc5,0x54}, +{0x60,0x30,0x30,0x50}, {0x02,0x01,0x01,0x03}, {0xce,0x67,0x67,0xa9}, {0x56,0x2b,0x2b,0x7d}, +{0xe7,0xfe,0xfe,0x19}, {0xb5,0xd7,0xd7,0x62}, {0x4d,0xab,0xab,0xe6}, {0xec,0x76,0x76,0x9a}, +{0x8f,0xca,0xca,0x45}, {0x1f,0x82,0x82,0x9d}, {0x89,0xc9,0xc9,0x40}, {0xfa,0x7d,0x7d,0x87}, +{0xef,0xfa,0xfa,0x15}, {0xb2,0x59,0x59,0xeb}, {0x8e,0x47,0x47,0xc9}, {0xfb,0xf0,0xf0,0x0b}, +{0x41,0xad,0xad,0xec}, {0xb3,0xd4,0xd4,0x67}, {0x5f,0xa2,0xa2,0xfd}, {0x45,0xaf,0xaf,0xea}, +{0x23,0x9c,0x9c,0xbf}, {0x53,0xa4,0xa4,0xf7}, {0xe4,0x72,0x72,0x96}, {0x9b,0xc0,0xc0,0x5b}, +{0x75,0xb7,0xb7,0xc2}, {0xe1,0xfd,0xfd,0x1c}, {0x3d,0x93,0x93,0xae}, {0x4c,0x26,0x26,0x6a}, +{0x6c,0x36,0x36,0x5a}, {0x7e,0x3f,0x3f,0x41}, {0xf5,0xf7,0xf7,0x02}, {0x83,0xcc,0xcc,0x4f}, +{0x68,0x34,0x34,0x5c}, {0x51,0xa5,0xa5,0xf4}, {0xd1,0xe5,0xe5,0x34}, {0xf9,0xf1,0xf1,0x08}, +{0xe2,0x71,0x71,0x93}, {0xab,0xd8,0xd8,0x73}, {0x62,0x31,0x31,0x53}, {0x2a,0x15,0x15,0x3f}, +{0x08,0x04,0x04,0x0c}, {0x95,0xc7,0xc7,0x52}, {0x46,0x23,0x23,0x65}, {0x9d,0xc3,0xc3,0x5e}, +{0x30,0x18,0x18,0x28}, {0x37,0x96,0x96,0xa1}, {0x0a,0x05,0x05,0x0f}, {0x2f,0x9a,0x9a,0xb5}, +{0x0e,0x07,0x07,0x09}, {0x24,0x12,0x12,0x36}, {0x1b,0x80,0x80,0x9b}, {0xdf,0xe2,0xe2,0x3d}, +{0xcd,0xeb,0xeb,0x26}, {0x4e,0x27,0x27,0x69}, {0x7f,0xb2,0xb2,0xcd}, {0xea,0x75,0x75,0x9f}, +{0x12,0x09,0x09,0x1b}, {0x1d,0x83,0x83,0x9e}, {0x58,0x2c,0x2c,0x74}, {0x34,0x1a,0x1a,0x2e}, +{0x36,0x1b,0x1b,0x2d}, {0xdc,0x6e,0x6e,0xb2}, {0xb4,0x5a,0x5a,0xee}, {0x5b,0xa0,0xa0,0xfb}, +{0xa4,0x52,0x52,0xf6}, {0x76,0x3b,0x3b,0x4d}, {0xb7,0xd6,0xd6,0x61}, {0x7d,0xb3,0xb3,0xce}, +{0x52,0x29,0x29,0x7b}, {0xdd,0xe3,0xe3,0x3e}, {0x5e,0x2f,0x2f,0x71}, {0x13,0x84,0x84,0x97}, +{0xa6,0x53,0x53,0xf5}, {0xb9,0xd1,0xd1,0x68}, {0x00,0x00,0x00,0x00}, {0xc1,0xed,0xed,0x2c}, +{0x40,0x20,0x20,0x60}, {0xe3,0xfc,0xfc,0x1f}, {0x79,0xb1,0xb1,0xc8}, {0xb6,0x5b,0x5b,0xed}, +{0xd4,0x6a,0x6a,0xbe}, {0x8d,0xcb,0xcb,0x46}, {0x67,0xbe,0xbe,0xd9}, {0x72,0x39,0x39,0x4b}, +{0x94,0x4a,0x4a,0xde}, {0x98,0x4c,0x4c,0xd4}, {0xb0,0x58,0x58,0xe8}, {0x85,0xcf,0xcf,0x4a}, +{0xbb,0xd0,0xd0,0x6b}, {0xc5,0xef,0xef,0x2a}, {0x4f,0xaa,0xaa,0xe5}, {0xed,0xfb,0xfb,0x16}, +{0x86,0x43,0x43,0xc5}, {0x9a,0x4d,0x4d,0xd7}, {0x66,0x33,0x33,0x55}, {0x11,0x85,0x85,0x94}, +{0x8a,0x45,0x45,0xcf}, {0xe9,0xf9,0xf9,0x10}, {0x04,0x02,0x02,0x06}, {0xfe,0x7f,0x7f,0x81}, +{0xa0,0x50,0x50,0xf0}, {0x78,0x3c,0x3c,0x44}, {0x25,0x9f,0x9f,0xba}, {0x4b,0xa8,0xa8,0xe3}, +{0xa2,0x51,0x51,0xf3}, {0x5d,0xa3,0xa3,0xfe}, {0x80,0x40,0x40,0xc0}, {0x05,0x8f,0x8f,0x8a}, +{0x3f,0x92,0x92,0xad}, {0x21,0x9d,0x9d,0xbc}, {0x70,0x38,0x38,0x48}, {0xf1,0xf5,0xf5,0x04}, +{0x63,0xbc,0xbc,0xdf}, {0x77,0xb6,0xb6,0xc1}, {0xaf,0xda,0xda,0x75}, {0x42,0x21,0x21,0x63}, +{0x20,0x10,0x10,0x30}, {0xe5,0xff,0xff,0x1a}, {0xfd,0xf3,0xf3,0x0e}, {0xbf,0xd2,0xd2,0x6d}, +{0x81,0xcd,0xcd,0x4c}, {0x18,0x0c,0x0c,0x14}, {0x26,0x13,0x13,0x35}, {0xc3,0xec,0xec,0x2f}, +{0xbe,0x5f,0x5f,0xe1}, {0x35,0x97,0x97,0xa2}, {0x88,0x44,0x44,0xcc}, {0x2e,0x17,0x17,0x39}, +{0x93,0xc4,0xc4,0x57}, {0x55,0xa7,0xa7,0xf2}, {0xfc,0x7e,0x7e,0x82}, {0x7a,0x3d,0x3d,0x47}, +{0xc8,0x64,0x64,0xac}, {0xba,0x5d,0x5d,0xe7}, {0x32,0x19,0x19,0x2b}, {0xe6,0x73,0x73,0x95}, +{0xc0,0x60,0x60,0xa0}, {0x19,0x81,0x81,0x98}, {0x9e,0x4f,0x4f,0xd1}, {0xa3,0xdc,0xdc,0x7f}, +{0x44,0x22,0x22,0x66}, {0x54,0x2a,0x2a,0x7e}, {0x3b,0x90,0x90,0xab}, {0x0b,0x88,0x88,0x83}, +{0x8c,0x46,0x46,0xca}, {0xc7,0xee,0xee,0x29}, {0x6b,0xb8,0xb8,0xd3}, {0x28,0x14,0x14,0x3c}, +{0xa7,0xde,0xde,0x79}, {0xbc,0x5e,0x5e,0xe2}, {0x16,0x0b,0x0b,0x1d}, {0xad,0xdb,0xdb,0x76}, +{0xdb,0xe0,0xe0,0x3b}, {0x64,0x32,0x32,0x56}, {0x74,0x3a,0x3a,0x4e}, {0x14,0x0a,0x0a,0x1e}, +{0x92,0x49,0x49,0xdb}, {0x0c,0x06,0x06,0x0a}, {0x48,0x24,0x24,0x6c}, {0xb8,0x5c,0x5c,0xe4}, +{0x9f,0xc2,0xc2,0x5d}, {0xbd,0xd3,0xd3,0x6e}, {0x43,0xac,0xac,0xef}, {0xc4,0x62,0x62,0xa6}, +{0x39,0x91,0x91,0xa8}, {0x31,0x95,0x95,0xa4}, {0xd3,0xe4,0xe4,0x37}, {0xf2,0x79,0x79,0x8b}, +{0xd5,0xe7,0xe7,0x32}, {0x8b,0xc8,0xc8,0x43}, {0x6e,0x37,0x37,0x59}, {0xda,0x6d,0x6d,0xb7}, +{0x01,0x8d,0x8d,0x8c}, {0xb1,0xd5,0xd5,0x64}, {0x9c,0x4e,0x4e,0xd2}, {0x49,0xa9,0xa9,0xe0}, +{0xd8,0x6c,0x6c,0xb4}, {0xac,0x56,0x56,0xfa}, {0xf3,0xf4,0xf4,0x07}, {0xcf,0xea,0xea,0x25}, +{0xca,0x65,0x65,0xaf}, {0xf4,0x7a,0x7a,0x8e}, {0x47,0xae,0xae,0xe9}, {0x10,0x08,0x08,0x18}, +{0x6f,0xba,0xba,0xd5}, {0xf0,0x78,0x78,0x88}, {0x4a,0x25,0x25,0x6f}, {0x5c,0x2e,0x2e,0x72}, +{0x38,0x1c,0x1c,0x24}, {0x57,0xa6,0xa6,0xf1}, {0x73,0xb4,0xb4,0xc7}, {0x97,0xc6,0xc6,0x51}, +{0xcb,0xe8,0xe8,0x23}, {0xa1,0xdd,0xdd,0x7c}, {0xe8,0x74,0x74,0x9c}, {0x3e,0x1f,0x1f,0x21}, +{0x96,0x4b,0x4b,0xdd}, {0x61,0xbd,0xbd,0xdc}, {0x0d,0x8b,0x8b,0x86}, {0x0f,0x8a,0x8a,0x85}, +{0xe0,0x70,0x70,0x90}, {0x7c,0x3e,0x3e,0x42}, {0x71,0xb5,0xb5,0xc4}, {0xcc,0x66,0x66,0xaa}, +{0x90,0x48,0x48,0xd8}, {0x06,0x03,0x03,0x05}, {0xf7,0xf6,0xf6,0x01}, {0x1c,0x0e,0x0e,0x12}, +{0xc2,0x61,0x61,0xa3}, {0x6a,0x35,0x35,0x5f}, {0xae,0x57,0x57,0xf9}, {0x69,0xb9,0xb9,0xd0}, +{0x17,0x86,0x86,0x91}, {0x99,0xc1,0xc1,0x58}, {0x3a,0x1d,0x1d,0x27}, {0x27,0x9e,0x9e,0xb9}, +{0xd9,0xe1,0xe1,0x38}, {0xeb,0xf8,0xf8,0x13}, {0x2b,0x98,0x98,0xb3}, {0x22,0x11,0x11,0x33}, +{0xd2,0x69,0x69,0xbb}, {0xa9,0xd9,0xd9,0x70}, {0x07,0x8e,0x8e,0x89}, {0x33,0x94,0x94,0xa7}, +{0x2d,0x9b,0x9b,0xb6}, {0x3c,0x1e,0x1e,0x22}, {0x15,0x87,0x87,0x92}, {0xc9,0xe9,0xe9,0x20}, +{0x87,0xce,0xce,0x49}, {0xaa,0x55,0x55,0xff}, {0x50,0x28,0x28,0x78}, {0xa5,0xdf,0xdf,0x7a}, +{0x03,0x8c,0x8c,0x8f}, {0x59,0xa1,0xa1,0xf8}, {0x09,0x89,0x89,0x80}, {0x1a,0x0d,0x0d,0x17}, +{0x65,0xbf,0xbf,0xda}, {0xd7,0xe6,0xe6,0x31}, {0x84,0x42,0x42,0xc6}, {0xd0,0x68,0x68,0xb8}, +{0x82,0x41,0x41,0xc3}, {0x29,0x99,0x99,0xb0}, {0x5a,0x2d,0x2d,0x77}, {0x1e,0x0f,0x0f,0x11}, +{0x7b,0xb0,0xb0,0xcb}, {0xa8,0x54,0x54,0xfc}, {0x6d,0xbb,0xbb,0xd6}, {0x2c,0x16,0x16,0x3a} + } +}; +#define T1 xT1.xt8 -Td0[x] = Si[x].[0e, 09, 0d, 0b]; -Td1[x] = Si[x].[0b, 0e, 09, 0d]; -Td2[x] = Si[x].[0d, 0b, 0e, 09]; -Td3[x] = Si[x].[09, 0d, 0b, 0e]; -Td4[x] = Si[x].[01, 01, 01, 01]; -*/ +static const union xtab xT2 = { + .xt8 = { +{0xa5,0xc6,0x63,0x63}, {0x84,0xf8,0x7c,0x7c}, {0x99,0xee,0x77,0x77}, {0x8d,0xf6,0x7b,0x7b}, +{0x0d,0xff,0xf2,0xf2}, {0xbd,0xd6,0x6b,0x6b}, {0xb1,0xde,0x6f,0x6f}, {0x54,0x91,0xc5,0xc5}, +{0x50,0x60,0x30,0x30}, {0x03,0x02,0x01,0x01}, {0xa9,0xce,0x67,0x67}, {0x7d,0x56,0x2b,0x2b}, +{0x19,0xe7,0xfe,0xfe}, {0x62,0xb5,0xd7,0xd7}, {0xe6,0x4d,0xab,0xab}, {0x9a,0xec,0x76,0x76}, +{0x45,0x8f,0xca,0xca}, {0x9d,0x1f,0x82,0x82}, {0x40,0x89,0xc9,0xc9}, {0x87,0xfa,0x7d,0x7d}, +{0x15,0xef,0xfa,0xfa}, {0xeb,0xb2,0x59,0x59}, {0xc9,0x8e,0x47,0x47}, {0x0b,0xfb,0xf0,0xf0}, +{0xec,0x41,0xad,0xad}, {0x67,0xb3,0xd4,0xd4}, {0xfd,0x5f,0xa2,0xa2}, {0xea,0x45,0xaf,0xaf}, +{0xbf,0x23,0x9c,0x9c}, {0xf7,0x53,0xa4,0xa4}, {0x96,0xe4,0x72,0x72}, {0x5b,0x9b,0xc0,0xc0}, +{0xc2,0x75,0xb7,0xb7}, {0x1c,0xe1,0xfd,0xfd}, {0xae,0x3d,0x93,0x93}, {0x6a,0x4c,0x26,0x26}, +{0x5a,0x6c,0x36,0x36}, {0x41,0x7e,0x3f,0x3f}, {0x02,0xf5,0xf7,0xf7}, {0x4f,0x83,0xcc,0xcc}, +{0x5c,0x68,0x34,0x34}, {0xf4,0x51,0xa5,0xa5}, {0x34,0xd1,0xe5,0xe5}, {0x08,0xf9,0xf1,0xf1}, +{0x93,0xe2,0x71,0x71}, {0x73,0xab,0xd8,0xd8}, {0x53,0x62,0x31,0x31}, {0x3f,0x2a,0x15,0x15}, +{0x0c,0x08,0x04,0x04}, {0x52,0x95,0xc7,0xc7}, {0x65,0x46,0x23,0x23}, {0x5e,0x9d,0xc3,0xc3}, +{0x28,0x30,0x18,0x18}, {0xa1,0x37,0x96,0x96}, {0x0f,0x0a,0x05,0x05}, {0xb5,0x2f,0x9a,0x9a}, +{0x09,0x0e,0x07,0x07}, {0x36,0x24,0x12,0x12}, {0x9b,0x1b,0x80,0x80}, {0x3d,0xdf,0xe2,0xe2}, +{0x26,0xcd,0xeb,0xeb}, {0x69,0x4e,0x27,0x27}, {0xcd,0x7f,0xb2,0xb2}, {0x9f,0xea,0x75,0x75}, +{0x1b,0x12,0x09,0x09}, {0x9e,0x1d,0x83,0x83}, {0x74,0x58,0x2c,0x2c}, {0x2e,0x34,0x1a,0x1a}, +{0x2d,0x36,0x1b,0x1b}, {0xb2,0xdc,0x6e,0x6e}, {0xee,0xb4,0x5a,0x5a}, {0xfb,0x5b,0xa0,0xa0}, +{0xf6,0xa4,0x52,0x52}, {0x4d,0x76,0x3b,0x3b}, {0x61,0xb7,0xd6,0xd6}, {0xce,0x7d,0xb3,0xb3}, +{0x7b,0x52,0x29,0x29}, {0x3e,0xdd,0xe3,0xe3}, {0x71,0x5e,0x2f,0x2f}, {0x97,0x13,0x84,0x84}, >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200310201822.h9KIMSKS074899>