CVS commit: src/distrib/sets/lists/xserver
Module Name:src Committed By: mrg Date: Thu Nov 18 07:52:45 UTC 2010 Modified Files: src/distrib/sets/lists/xserver: md.ofppc Log Message: make this actually correct for an xorg world. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/distrib/sets/lists/xserver/md.ofppc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/xserver/md.ofppc diff -u src/distrib/sets/lists/xserver/md.ofppc:1.9 src/distrib/sets/lists/xserver/md.ofppc:1.10 --- src/distrib/sets/lists/xserver/md.ofppc:1.9 Mon Nov 15 12:23:06 2010 +++ src/distrib/sets/lists/xserver/md.ofppc Thu Nov 18 07:52:45 2010 @@ -1,4 +1,4 @@ -# $NetBSD: md.ofppc,v 1.9 2010/11/15 12:23:06 njoly Exp $ +# $NetBSD: md.ofppc,v 1.10 2010/11/18 07:52:45 mrg Exp $ ./usr/X11R6/bin/X -unknown- x11 ./usr/X11R6/bin/XFree86 -unknown- x11 ./usr/X11R6/bin/gtf -unknown- x11 @@ -305,6 +305,4 @@ ./usr/X11R6/man/man4/wacom.4-unknown- .man,x11 ./usr/X11R6/man/man4/wsfb.4-unknown- .man,x11 ./usr/X11R6/man/man5/XF86Config.5 -unknown- .man,x11 -./usr/X11R7/lib/X11/doc/README.DRI -unknown- xorg ./usr/X11R7/lib/X11/doc/README.fonts -unknown- obsolete -./usr/X11R7/lib/X11/doc/README.rapidaccess -unknown- xorg
CVS commit: xsrc/external/mit/libpciaccess/dist/src
Module Name:xsrc Committed By: macallan Date: Thu Nov 18 04:47:01 UTC 2010 Modified Files: xsrc/external/mit/libpciaccess/dist/src: netbsd_pci.c Log Message: when trying to map a ROM go through the appropriate /dev/pci* instance instead of opening /dev/mem With this Xorg should be able to read graphics card ROMs on all ports. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c diff -u xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.6 xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.7 --- xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.6 Tue Jan 12 03:05:31 2010 +++ xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c Thu Nov 18 04:47:00 2010 @@ -388,7 +388,7 @@ pciaddr_t rom_base; size_t rom_size; uint32_t bios_val, command_val; -int pci_rom, memfd; +int pci_rom; if (((priv->base.device_class >> 16) & 0xff) != PCI_CLASS_DISPLAY || ((priv->base.device_class >> 8) & 0xff) != PCI_SUBCLASS_DISPLAY_VGA) @@ -434,23 +434,19 @@ } } -fprintf(stderr, "Using rom_base = 0x%lx (pci_rom=%d)\n", (long)rom_base, - pci_rom); -memfd = open("/dev/mem", O_RDONLY); -if (memfd == -1) - return errno; +fprintf(stderr, "Using rom_base = 0x%lx 0x%lx (pci_rom=%d)\n", +(long)rom_base, (long)rom_size, pci_rom); -bios = mmap(NULL, rom_size, PROT_READ, MAP_SHARED, memfd, (off_t)rom_base); +bios = mmap(NULL, rom_size, PROT_READ, MAP_SHARED, buses[dev->domain].fd, +(off_t)rom_base); if (bios == MAP_FAILED) { int serrno = errno; - close(memfd); return serrno; } memcpy(buffer, bios, rom_size); munmap(bios, rom_size); -close(memfd); if (pci_rom) { if ((command_val & PCI_COMMAND_MEM_ENABLE) == 0) {
CVS commit: [uebayasi-xip] src/sys/miscfs/genfs
Module Name:src Committed By: uebayasi Date: Thu Nov 18 01:53:05 UTC 2010 Modified Files: src/sys/miscfs/genfs [uebayasi-xip]: genfs_io.c Log Message: Style change. To generate a diff of this commit: cvs rdiff -u -r1.36.2.32 -r1.36.2.33 src/sys/miscfs/genfs/genfs_io.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/miscfs/genfs/genfs_io.c diff -u src/sys/miscfs/genfs/genfs_io.c:1.36.2.32 src/sys/miscfs/genfs/genfs_io.c:1.36.2.33 --- src/sys/miscfs/genfs/genfs_io.c:1.36.2.32 Tue Nov 16 07:44:25 2010 +++ src/sys/miscfs/genfs/genfs_io.c Thu Nov 18 01:53:04 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: genfs_io.c,v 1.36.2.32 2010/11/16 07:44:25 uebayasi Exp $ */ +/* $NetBSD: genfs_io.c,v 1.36.2.33 2010/11/18 01:53:04 uebayasi Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993 @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.36.2.32 2010/11/16 07:44:25 uebayasi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.36.2.33 2010/11/18 01:53:04 uebayasi Exp $"); #include "opt_xip.h" @@ -900,15 +900,14 @@ struct vm_page *pg = pps[i]; KASSERT((pg->flags & PG_RDONLY) != 0); - if (pg == zero_page) { - } else { - KASSERT((pg->flags & PG_BUSY) == 0); - KASSERT((pg->flags & PG_CLEAN) != 0); - KASSERT((pg->flags & PG_DEVICE) != 0); - pg->flags |= PG_BUSY; - pg->flags &= ~PG_FAKE; - pg->uobject = &vp->v_uobj; - } + if (pg == zero_page) + continue; + KASSERT((pg->flags & PG_BUSY) == 0); + KASSERT((pg->flags & PG_CLEAN) != 0); + KASSERT((pg->flags & PG_DEVICE) != 0); + pg->flags |= PG_BUSY; + pg->flags &= ~PG_FAKE; + pg->uobject = &vp->v_uobj; } if ((flags & PGO_LOCKED) == 0) @@ -1525,20 +1524,19 @@ pg = pgs[i]; if (pg == NULL || pg == PGO_DONTCARE) continue; - if (pg == uvm_page_zeropage) { + if (pg == uvm_page_zeropage) /* Do nothing for holes. */ - } else { -/* - * Freeing normal XIP pages; nothing to do. - */ -pmap_page_protect(pg, VM_PROT_NONE); -KASSERT((pg->flags & PG_BUSY) != 0); -KASSERT((pg->flags & PG_RDONLY) != 0); -KASSERT((pg->flags & PG_CLEAN) != 0); -KASSERT((pg->flags & PG_FAKE) == 0); -KASSERT((pg->flags & PG_DEVICE) != 0); -pg->flags &= ~PG_BUSY; - } +continue; + /* + * Freeing normal XIP pages; nothing to do. + */ + pmap_page_protect(pg, VM_PROT_NONE); + KASSERT((pg->flags & PG_BUSY) != 0); + KASSERT((pg->flags & PG_RDONLY) != 0); + KASSERT((pg->flags & PG_CLEAN) != 0); + KASSERT((pg->flags & PG_FAKE) == 0); + KASSERT((pg->flags & PG_DEVICE) != 0); + pg->flags &= ~PG_BUSY; } off += npages << PAGE_SHIFT; }
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Wed Nov 17 21:57:33 UTC 2010 Modified Files: src/sys/rump/librump/rumpkern: rump.c rump_private.h Log Message: Remove unused rump_set_vmspace. An equivalent needs to come back later, though, but in its current form it's just unusable garbage. To generate a diff of this commit: cvs rdiff -u -r1.199 -r1.200 src/sys/rump/librump/rumpkern/rump.c cvs rdiff -u -r1.62 -r1.63 src/sys/rump/librump/rumpkern/rump_private.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpkern/rump.c diff -u src/sys/rump/librump/rumpkern/rump.c:1.199 src/sys/rump/librump/rumpkern/rump.c:1.200 --- src/sys/rump/librump/rumpkern/rump.c:1.199 Wed Nov 17 21:52:29 2010 +++ src/sys/rump/librump/rumpkern/rump.c Wed Nov 17 21:57:33 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rump.c,v 1.199 2010/11/17 21:52:29 pooka Exp $ */ +/* $NetBSD: rump.c,v 1.200 2010/11/17 21:57:33 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.199 2010/11/17 21:52:29 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.200 2010/11/17 21:57:33 pooka Exp $"); #include #define ELFSIZE ARCH_ELFSIZE @@ -517,15 +517,6 @@ return resid; } -/* rump private. NEEDS WORK! */ -void -rump_set_vmspace(struct vmspace *vm) -{ - struct proc *p = curproc; - - p->p_vmspace = vm; -} - kauth_cred_t rump_cred_create(uid_t uid, gid_t gid, size_t ngroups, gid_t *groups) { Index: src/sys/rump/librump/rumpkern/rump_private.h diff -u src/sys/rump/librump/rumpkern/rump_private.h:1.62 src/sys/rump/librump/rumpkern/rump_private.h:1.63 --- src/sys/rump/librump/rumpkern/rump_private.h:1.62 Wed Nov 17 19:54:09 2010 +++ src/sys/rump/librump/rumpkern/rump_private.h Wed Nov 17 21:57:33 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_private.h,v 1.62 2010/11/17 19:54:09 pooka Exp $ */ +/* $NetBSD: rump_private.h,v 1.63 2010/11/17 21:57:33 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -87,8 +87,6 @@ void rump_component_init(enum rump_component_type); int rump_component_count(enum rump_component_type); -void rump_set_vmspace(struct vmspace *); - typedef void (*rump_proc_vfs_init_fn)(struct proc *); typedef void (*rump_proc_vfs_release_fn)(struct proc *); extern rump_proc_vfs_init_fn rump_proc_vfs_init;
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Wed Nov 17 21:52:29 UTC 2010 Modified Files: src/sys/rump/librump/rumpkern: rump.c Log Message: Provide a special rump_proxy_syscall for handling received proxy syscalls and retire unused rump_syscall. To generate a diff of this commit: cvs rdiff -u -r1.198 -r1.199 src/sys/rump/librump/rumpkern/rump.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpkern/rump.c diff -u src/sys/rump/librump/rumpkern/rump.c:1.198 src/sys/rump/librump/rumpkern/rump.c:1.199 --- src/sys/rump/librump/rumpkern/rump.c:1.198 Wed Nov 17 19:54:09 2010 +++ src/sys/rump/librump/rumpkern/rump.c Wed Nov 17 21:52:29 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rump.c,v 1.198 2010/11/17 19:54:09 pooka Exp $ */ +/* $NetBSD: rump.c,v 1.199 2010/11/17 21:52:29 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.198 2010/11/17 19:54:09 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.199 2010/11/17 21:52:29 pooka Exp $"); #include #define ELFSIZE ARCH_ELFSIZE @@ -107,6 +107,8 @@ static struct vmspace sp_vmspace; static bool iamtheserver = false; +static int rump_proxy_syscall(int, void *, register_t *); + static char rump_msgbuf[16*1024]; /* 16k should be enough for std rump needs */ static void @@ -195,7 +197,7 @@ .spop_lwproc_release = rump_lwproc_releaselwp, .spop_lwproc_newproc = rump_lwproc_newproc, .spop_lwproc_curlwp = rump_lwproc_curlwp, - .spop_syscall = rump_syscall, + .spop_syscall = rump_proxy_syscall, }; int @@ -634,8 +636,8 @@ return 0; } -int -rump_syscall(int num, void *arg, register_t *retval) +static int +rump_proxy_syscall(int num, void *arg, register_t *retval) { struct lwp *l; struct sysent *callp; @@ -646,11 +648,9 @@ callp = rump_sysent + num; l = curlwp; - if (iamtheserver) - curproc->p_vmspace = &sp_vmspace; + curproc->p_vmspace = &sp_vmspace; rv = sy_call(callp, l, (void *)arg, retval); - if (iamtheserver) - curproc->p_vmspace = vmspace_kernel(); + curproc->p_vmspace = vmspace_kernel(); return rv; }
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Wed Nov 17 21:50:34 UTC 2010 Modified Files: src/sys/rump/include/rump: rumpkern_if_pub.h src/sys/rump/librump/rumpkern: rumpkern_if_priv.h rumpkern_if_wrappers.c Log Message: regen: -rump_pub_syscall To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/rump/include/rump/rumpkern_if_pub.h cvs rdiff -u -r1.9 -r1.10 src/sys/rump/librump/rumpkern/rumpkern_if_priv.h \ src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/include/rump/rumpkern_if_pub.h diff -u src/sys/rump/include/rump/rumpkern_if_pub.h:1.10 src/sys/rump/include/rump/rumpkern_if_pub.h:1.11 --- src/sys/rump/include/rump/rumpkern_if_pub.h:1.10 Wed Oct 27 20:35:47 2010 +++ src/sys/rump/include/rump/rumpkern_if_pub.h Wed Nov 17 21:50:34 2010 @@ -1,8 +1,8 @@ -/* $NetBSD: rumpkern_if_pub.h,v 1.10 2010/10/27 20:35:47 pooka Exp $ */ +/* $NetBSD: rumpkern_if_pub.h,v 1.11 2010/11/17 21:50:34 pooka Exp $ */ /* * Automatically generated. DO NOT EDIT. - * from: NetBSD: rumpkern.ifspec,v 1.7 2010/10/27 20:34:50 pooka Exp + * from: NetBSD: rumpkern.ifspec,v 1.8 2010/11/17 21:49:52 pooka Exp * by: NetBSD: makerumpif.sh,v 1.5 2010/09/01 19:32:11 pooka Exp */ @@ -23,4 +23,3 @@ void rump_pub_lwproc_releaselwp(void); struct lwp * rump_pub_lwproc_curlwp(void); void rump_pub_allbetsareoff_setid(pid_t, int); -int rump_pub_syscall(int, void *, register_t *); Index: src/sys/rump/librump/rumpkern/rumpkern_if_priv.h diff -u src/sys/rump/librump/rumpkern/rumpkern_if_priv.h:1.9 src/sys/rump/librump/rumpkern/rumpkern_if_priv.h:1.10 --- src/sys/rump/librump/rumpkern/rumpkern_if_priv.h:1.9 Wed Oct 27 20:35:47 2010 +++ src/sys/rump/librump/rumpkern/rumpkern_if_priv.h Wed Nov 17 21:50:34 2010 @@ -1,8 +1,8 @@ -/* $NetBSD: rumpkern_if_priv.h,v 1.9 2010/10/27 20:35:47 pooka Exp $ */ +/* $NetBSD: rumpkern_if_priv.h,v 1.10 2010/11/17 21:50:34 pooka Exp $ */ /* * Automatically generated. DO NOT EDIT. - * from: NetBSD: rumpkern.ifspec,v 1.7 2010/10/27 20:34:50 pooka Exp + * from: NetBSD: rumpkern.ifspec,v 1.8 2010/11/17 21:49:52 pooka Exp * by: NetBSD: makerumpif.sh,v 1.5 2010/09/01 19:32:11 pooka Exp */ @@ -23,4 +23,3 @@ void rump_lwproc_releaselwp(void); struct lwp * rump_lwproc_curlwp(void); void rump_allbetsareoff_setid(pid_t, int); -int rump_syscall(int, void *, register_t *); Index: src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.c diff -u src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.c:1.9 src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.c:1.10 --- src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.c:1.9 Wed Oct 27 20:35:47 2010 +++ src/sys/rump/librump/rumpkern/rumpkern_if_wrappers.c Wed Nov 17 21:50:34 2010 @@ -1,8 +1,8 @@ -/* $NetBSD: rumpkern_if_wrappers.c,v 1.9 2010/10/27 20:35:47 pooka Exp $ */ +/* $NetBSD: rumpkern_if_wrappers.c,v 1.10 2010/11/17 21:50:34 pooka Exp $ */ /* * Automatically generated. DO NOT EDIT. - * from: NetBSD: rumpkern.ifspec,v 1.7 2010/10/27 20:34:50 pooka Exp + * from: NetBSD: rumpkern.ifspec,v 1.8 2010/11/17 21:49:52 pooka Exp * by: NetBSD: makerumpif.sh,v 1.5 2010/09/01 19:32:11 pooka Exp */ @@ -211,15 +211,3 @@ rump_allbetsareoff_setid(arg1, arg2); rump_unschedule(); } - -int -rump_pub_syscall(int arg1, void *arg2, register_t *arg3) -{ - int rv; - - rump_schedule(); - rv = rump_syscall(arg1, arg2, arg3); - rump_unschedule(); - - return rv; -}
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Wed Nov 17 21:49:52 UTC 2010 Modified Files: src/sys/rump/librump/rumpkern: rumpkern.ifspec Log Message: remove rump_pub_syscall -- unused/unusable To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/rump/librump/rumpkern/rumpkern.ifspec Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpkern/rumpkern.ifspec diff -u src/sys/rump/librump/rumpkern/rumpkern.ifspec:1.7 src/sys/rump/librump/rumpkern/rumpkern.ifspec:1.8 --- src/sys/rump/librump/rumpkern/rumpkern.ifspec:1.7 Wed Oct 27 20:34:50 2010 +++ src/sys/rump/librump/rumpkern/rumpkern.ifspec Wed Nov 17 21:49:52 2010 @@ -1,4 +1,4 @@ -; $NetBSD: rumpkern.ifspec,v 1.7 2010/10/27 20:34:50 pooka Exp $ +; $NetBSD: rumpkern.ifspec,v 1.8 2010/11/17 21:49:52 pooka Exp $ NAME|kern PUBHDR|include/rump/rumpkern_if_pub.h @@ -31,5 +31,3 @@ struct lwp * |lwproc_curlwp |void void |allbetsareoff_setid |pid_t, int - -int |syscall |int, void *, register_t *
CVS commit: src/sys/rump
Module Name:src Committed By: pooka Date: Wed Nov 17 21:48:08 UTC 2010 Modified Files: src/sys/rump/include/rump: rump_syscalls.h src/sys/rump/librump/rumpkern: rump_syscalls.c Log Message: regen: optimize local syscall path a bit To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/rump/include/rump/rump_syscalls.h cvs rdiff -u -r1.54 -r1.55 src/sys/rump/librump/rumpkern/rump_syscalls.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/include/rump/rump_syscalls.h diff -u src/sys/rump/include/rump/rump_syscalls.h:1.33 src/sys/rump/include/rump/rump_syscalls.h:1.34 --- src/sys/rump/include/rump/rump_syscalls.h:1.33 Thu Nov 11 14:48:13 2010 +++ src/sys/rump/include/rump/rump_syscalls.h Wed Nov 17 21:48:07 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_syscalls.h,v 1.33 2010/11/11 14:48:13 pooka Exp $ */ +/* $NetBSD: rump_syscalls.h,v 1.34 2010/11/17 21:48:07 pooka Exp $ */ /* * System call protos in rump namespace. Index: src/sys/rump/librump/rumpkern/rump_syscalls.c diff -u src/sys/rump/librump/rumpkern/rump_syscalls.c:1.54 src/sys/rump/librump/rumpkern/rump_syscalls.c:1.55 --- src/sys/rump/librump/rumpkern/rump_syscalls.c:1.54 Thu Nov 11 14:48:14 2010 +++ src/sys/rump/librump/rumpkern/rump_syscalls.c Wed Nov 17 21:48:07 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_syscalls.c,v 1.54 2010/11/11 14:48:14 pooka Exp $ */ +/* $NetBSD: rump_syscalls.c,v 1.55 2010/11/17 21:48:07 pooka Exp $ */ /* * System call vector and marshalling for rump. @@ -8,7 +8,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rump_syscalls.c,v 1.54 2010/11/11 14:48:14 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rump_syscalls.c,v 1.55 2010/11/17 21:48:07 pooka Exp $"); #include #include @@ -25,16 +25,21 @@ #define rsys_seterrno(error) errno = error #define rsys_alias(a,b) #else +#include + #include #include "rump_private.h" static int rsys_syscall(int num, void *data, size_t dlen, register_t *retval) { + struct sysent *callp = rump_sysent + num; int rv; + KASSERT(num > 0 && num < SYS_NSYSENT); + rump_schedule(); - rv = rump_syscall(num, data, retval); + rv = sy_call(callp, curlwp, data, retval); rump_unschedule(); return rv;
CVS commit: src/sys/kern
Module Name:src Committed By: pooka Date: Wed Nov 17 21:47:11 UTC 2010 Modified Files: src/sys/kern: makesyscalls.sh Log Message: Skip one extra function in the rump syscall local path and use sy_call() directly from rump_syscalls.c. To generate a diff of this commit: cvs rdiff -u -r1.102 -r1.103 src/sys/kern/makesyscalls.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/makesyscalls.sh diff -u src/sys/kern/makesyscalls.sh:1.102 src/sys/kern/makesyscalls.sh:1.103 --- src/sys/kern/makesyscalls.sh:1.102 Thu Nov 4 20:50:29 2010 +++ src/sys/kern/makesyscalls.sh Wed Nov 17 21:47:11 2010 @@ -1,5 +1,5 @@ #! /bin/sh - -# $NetBSD: makesyscalls.sh,v 1.102 2010/11/04 20:50:29 pooka Exp $ +# $NetBSD: makesyscalls.sh,v 1.103 2010/11/17 21:47:11 pooka Exp $ # # Copyright (c) 1994, 1996, 2000 Christopher G. Demetriou # All rights reserved. @@ -225,12 +225,16 @@ printf "rumpclient_syscall(num, data, dlen, retval)\n" > rumpcalls printf "#define rsys_seterrno(error) errno = error\n" > rumpcalls printf "#define rsys_alias(a,b)\n#else\n" > rumpcalls + printf "#include \n\n" > rumpcalls printf "#include \n" > rumpcalls printf "#include \"rump_private.h\"\n\n" > rumpcalls printf "static int\nrsys_syscall" > rumpcalls printf "(int num, void *data, size_t dlen, register_t *retval)" > rumpcalls - printf "\n{\n\tint rv;\n\n\trump_schedule();\n" > rumpcalls - printf "\trv = rump_syscall(num, data, retval);\n" > rumpcalls + printf "\n{\n\tstruct sysent *callp = rump_sysent + num;\n" > rumpcalls + printf "\tint rv;\n" > rumpcalls + printf "\n\tKASSERT(num > 0 && num < SYS_NSYSENT);\n\n" > rumpcalls + printf "\trump_schedule();\n" > rumpcalls + printf "\trv = sy_call(callp, curlwp, data, retval);\n" > rumpcalls printf "\trump_unschedule();\n\n\treturn rv;\n}\n\n" > rumpcalls printf "#define rsys_seterrno(error) rumpuser_seterrno(error)\n" > rumpcalls printf "#define rsys_alias(a,b) __weak_alias(a,b);\n#endif\n\n" > rumpcalls
CVS commit: src/sys/netbt
Module Name:src Committed By: plunky Date: Wed Nov 17 20:19:25 UTC 2010 Modified Files: src/sys/netbt: l2cap_signal.c rfcomm_session.c Log Message: do not produce an error when connections are closed normally for L2CAP sockets, this solves an irritating error message from sdpd(8), which can now differentiate between normal closure and error. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/netbt/l2cap_signal.c cvs rdiff -u -r1.16 -r1.17 src/sys/netbt/rfcomm_session.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netbt/l2cap_signal.c diff -u src/sys/netbt/l2cap_signal.c:1.10 src/sys/netbt/l2cap_signal.c:1.11 --- src/sys/netbt/l2cap_signal.c:1.10 Fri Sep 25 19:44:57 2009 +++ src/sys/netbt/l2cap_signal.c Wed Nov 17 20:19:25 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: l2cap_signal.c,v 1.10 2009/09/25 19:44:57 plunky Exp $ */ +/* $NetBSD: l2cap_signal.c,v 1.11 2010/11/17 20:19:25 plunky Exp $ */ /*- * Copyright (c) 2005 Iain Hibbert. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: l2cap_signal.c,v 1.10 2009/09/25 19:44:57 plunky Exp $"); +__KERNEL_RCSID(0, "$NetBSD: l2cap_signal.c,v 1.11 2010/11/17 20:19:25 plunky Exp $"); #include #include @@ -814,7 +814,7 @@ sizeof(rp), &rp); if (chan->lc_state != L2CAP_CLOSED) - l2cap_close(chan, ECONNRESET); + l2cap_close(chan, 0); } /* Index: src/sys/netbt/rfcomm_session.c diff -u src/sys/netbt/rfcomm_session.c:1.16 src/sys/netbt/rfcomm_session.c:1.17 --- src/sys/netbt/rfcomm_session.c:1.16 Sun Jan 3 16:38:15 2010 +++ src/sys/netbt/rfcomm_session.c Wed Nov 17 20:19:25 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rfcomm_session.c,v 1.16 2010/01/03 16:38:15 plunky Exp $ */ +/* $NetBSD: rfcomm_session.c,v 1.17 2010/11/17 20:19:25 plunky Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rfcomm_session.c,v 1.16 2010/01/03 16:38:15 plunky Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rfcomm_session.c,v 1.17 2010/11/17 20:19:25 plunky Exp $"); #include #include @@ -389,6 +389,13 @@ DPRINTF("Disconnected\n"); + /* + * If we have any DLCs outstanding in the unlikely case that the + * L2CAP channel disconnected normally, close them with an error + */ + if (err == 0) + err = ECONNRESET; + rs->rs_state = RFCOMM_SESSION_CLOSED; while (!LIST_EMPTY(&rs->rs_dlcs)) { @@ -816,7 +823,7 @@ return; } - rfcomm_dlc_close(dlc, ECONNRESET); + rfcomm_dlc_close(dlc, 0); rfcomm_session_send_frame(rs, RFCOMM_FRAME_UA, dlci); }
CVS commit: src/sys/kern
Module Name:src Committed By: dholland Date: Wed Nov 17 20:07:51 UTC 2010 Modified Files: src/sys/kern: kern_verifiedexec.c Log Message: typo in comment To generate a diff of this commit: cvs rdiff -u -r1.121 -r1.122 src/sys/kern/kern_verifiedexec.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_verifiedexec.c diff -u src/sys/kern/kern_verifiedexec.c:1.121 src/sys/kern/kern_verifiedexec.c:1.122 --- src/sys/kern/kern_verifiedexec.c:1.121 Mon Dec 28 07:16:41 2009 +++ src/sys/kern/kern_verifiedexec.c Wed Nov 17 20:07:50 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_verifiedexec.c,v 1.121 2009/12/28 07:16:41 elad Exp $ */ +/* $NetBSD: kern_verifiedexec.c,v 1.122 2010/11/17 20:07:50 dholland Exp $ */ /*- * Copyright (c) 2005, 2006 Elad Efrat @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_verifiedexec.c,v 1.121 2009/12/28 07:16:41 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_verifiedexec.c,v 1.122 2010/11/17 20:07:50 dholland Exp $"); #include "opt_veriexec.h" @@ -857,7 +857,7 @@ } /* - * Veriexe rename policy. + * Veriexec rename policy. * * XXX: Once there's a way to hook after a successful rename, it would be * XXX: nice to update vfe->filename to the new name if it's not NULL and
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Wed Nov 17 19:54:09 UTC 2010 Modified Files: src/sys/rump/librump/rumpkern: lwproc.c rump.c rump_private.h rumpcopy.c vm.c Log Message: cleanup some old garbage To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/rump/librump/rumpkern/lwproc.c cvs rdiff -u -r1.197 -r1.198 src/sys/rump/librump/rumpkern/rump.c cvs rdiff -u -r1.61 -r1.62 src/sys/rump/librump/rumpkern/rump_private.h cvs rdiff -u -r1.9 -r1.10 src/sys/rump/librump/rumpkern/rumpcopy.c cvs rdiff -u -r1.100 -r1.101 src/sys/rump/librump/rumpkern/vm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpkern/lwproc.c diff -u src/sys/rump/librump/rumpkern/lwproc.c:1.4 src/sys/rump/librump/rumpkern/lwproc.c:1.5 --- src/sys/rump/librump/rumpkern/lwproc.c:1.4 Mon Nov 15 20:37:22 2010 +++ src/sys/rump/librump/rumpkern/lwproc.c Wed Nov 17 19:54:09 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: lwproc.c,v 1.4 2010/11/15 20:37:22 pooka Exp $ */ +/* $NetBSD: lwproc.c,v 1.5 2010/11/17 19:54:09 pooka Exp $ */ /* * Copyright (c) 2010 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.4 2010/11/15 20:37:22 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.5 2010/11/17 19:54:09 pooka Exp $"); #include #include @@ -108,7 +108,7 @@ p->p_stats = pstatscopy(parent->p_stats); /* not based on parent */ - p->p_vmspace = &vmspace0; + p->p_vmspace = vmspace_kernel(); p->p_emul = &emul_netbsd; p->p_fd = fd_init(NULL); lim_addref(parent->p_limit); Index: src/sys/rump/librump/rumpkern/rump.c diff -u src/sys/rump/librump/rumpkern/rump.c:1.197 src/sys/rump/librump/rumpkern/rump.c:1.198 --- src/sys/rump/librump/rumpkern/rump.c:1.197 Mon Nov 15 20:24:09 2010 +++ src/sys/rump/librump/rumpkern/rump.c Wed Nov 17 19:54:09 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rump.c,v 1.197 2010/11/15 20:24:09 pooka Exp $ */ +/* $NetBSD: rump.c,v 1.198 2010/11/17 19:54:09 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.197 2010/11/15 20:24:09 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.198 2010/11/17 19:54:09 pooka Exp $"); #include #define ELFSIZE ARCH_ELFSIZE @@ -484,7 +484,7 @@ uio->uio_offset = offset; uio->uio_resid = bufsize; uio->uio_rw = uiorw; - uio->uio_vmspace = UIO_VMSPACE_SYS; + UIO_SETUP_SYSSPACE(uio); return uio; } @@ -650,7 +650,7 @@ curproc->p_vmspace = &sp_vmspace; rv = sy_call(callp, l, (void *)arg, retval); if (iamtheserver) - curproc->p_vmspace = &vmspace0; + curproc->p_vmspace = vmspace_kernel(); return rv; } Index: src/sys/rump/librump/rumpkern/rump_private.h diff -u src/sys/rump/librump/rumpkern/rump_private.h:1.61 src/sys/rump/librump/rumpkern/rump_private.h:1.62 --- src/sys/rump/librump/rumpkern/rump_private.h:1.61 Thu Nov 4 20:54:07 2010 +++ src/sys/rump/librump/rumpkern/rump_private.h Wed Nov 17 19:54:09 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_private.h,v 1.61 2010/11/04 20:54:07 pooka Exp $ */ +/* $NetBSD: rump_private.h,v 1.62 2010/11/17 19:54:09 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -47,19 +47,13 @@ #include "rumpkern_if_priv.h" -extern kauth_cred_t rump_cred; - extern struct rumpuser_mtx *rump_giantlock; -#define UIO_VMSPACE_SYS (&vmspace0) - extern int rump_threads; extern struct device rump_rootdev; extern struct sysent rump_sysent[]; -extern struct vmspace vmspace0; - enum rump_component_type { RUMP_COMPONENT_DEV, RUMP_COMPONENT_NET, RUMP_COMPONENT_NET_ROUTE, RUMP_COMPONENT_NET_IF, @@ -93,9 +87,6 @@ void rump_component_init(enum rump_component_type); int rump_component_count(enum rump_component_type); -void rump_gettime(struct timespec *); -void rump_getuptime(struct timespec *); - void rump_set_vmspace(struct vmspace *); typedef void (*rump_proc_vfs_init_fn)(struct proc *); Index: src/sys/rump/librump/rumpkern/rumpcopy.c diff -u src/sys/rump/librump/rumpkern/rumpcopy.c:1.9 src/sys/rump/librump/rumpkern/rumpcopy.c:1.10 --- src/sys/rump/librump/rumpkern/rumpcopy.c:1.9 Tue Nov 9 20:55:14 2010 +++ src/sys/rump/librump/rumpkern/rumpcopy.c Wed Nov 17 19:54:09 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpcopy.c,v 1.9 2010/11/09 20:55:14 pooka Exp $ */ +/* $NetBSD: rumpcopy.c,v 1.10 2010/11/17 19:54:09 pooka Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rumpcopy.c,v 1.9 2010/11/09 20:55:14 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rumpcopy.c,v 1.10 2010/11/17 19:54:09 pooka Exp $"); #include #include @@ -44,7 +44,7 @@ return EFAULT; } - if (curproc->p_vmspace == &vmspace0) { + if (curproc->p_vmspace == vmspace_kernel()) { memcpy(kaddr, uaddr, len); } else
CVS commit: src/sys/dev/pci
Module Name:src Committed By: dholland Date: Wed Nov 17 19:36:54 UTC 2010 Modified Files: src/sys/dev/pci: pciide_common.c Log Message: Fix build when NATA_DMA is 0. To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/sys/dev/pci/pciide_common.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/pciide_common.c diff -u src/sys/dev/pci/pciide_common.c:1.47 src/sys/dev/pci/pciide_common.c:1.48 --- src/sys/dev/pci/pciide_common.c:1.47 Sat Nov 13 13:52:08 2010 +++ src/sys/dev/pci/pciide_common.c Wed Nov 17 19:36:54 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pciide_common.c,v 1.47 2010/11/13 13:52:08 uebayasi Exp $ */ +/* $NetBSD: pciide_common.c,v 1.48 2010/11/17 19:36:54 dholland Exp $ */ /* @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pciide_common.c,v 1.47 2010/11/13 13:52:08 uebayasi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pciide_common.c,v 1.48 2010/11/17 19:36:54 dholland Exp $"); #include #include @@ -205,17 +205,21 @@ } for (drive = 0; drive < cp->ata_channel.ch_ndrive; drive++) { +#if NATA_DMA pciide_dma_table_teardown(sc, channel, drive); +#endif } free(cp->ata_channel.ch_queue, M_DEVBUF); cp->ata_channel.atabus = NULL; } +#if NATA_DMA if (sc->sc_dma_ios != 0) bus_space_unmap(sc->sc_dma_iot, sc->sc_dma_ioh, sc->sc_dma_ios); if (sc->sc_ba5_ss != 0) bus_space_unmap(sc->sc_ba5_st, sc->sc_ba5_sh, sc->sc_ba5_ss); +#endif return 0; }
CVS commit: src/sys/arch/amd64/amd64
Module Name:src Committed By: dholland Date: Wed Nov 17 18:22:17 UTC 2010 Modified Files: src/sys/arch/amd64/amd64: netbsd32_machdep.c Log Message: Fix build with COMPAT_13. To generate a diff of this commit: cvs rdiff -u -r1.67 -r1.68 src/sys/arch/amd64/amd64/netbsd32_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/amd64/netbsd32_machdep.c diff -u src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.67 src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.68 --- src/sys/arch/amd64/amd64/netbsd32_machdep.c:1.67 Sun Sep 5 20:52:38 2010 +++ src/sys/arch/amd64/amd64/netbsd32_machdep.c Wed Nov 17 18:22:17 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_machdep.c,v 1.67 2010/09/05 20:52:38 chs Exp $ */ +/* $NetBSD: netbsd32_machdep.c,v 1.68 2010/11/17 18:22:17 dholland Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.67 2010/09/05 20:52:38 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.68 2010/11/17 18:22:17 dholland Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -1085,7 +1085,7 @@ /* * Check for security violations. */ - error = check_sigcontext32((const struct netbsd32_sigcontext *)&context, tf); + error = check_sigcontext32(l, (const struct netbsd32_sigcontext *)&context); if (error != 0) return error;
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Wed Nov 17 18:03:49 UTC 2010 Modified Files: src/share/man/man4: virt.4 Log Message: Capitalize the Internet's importance. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/virt.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/virt.4 diff -u src/share/man/man4/virt.4:1.1 src/share/man/man4/virt.4:1.2 --- src/share/man/man4/virt.4:1.1 Mon Nov 15 21:52:47 2010 +++ src/share/man/man4/virt.4 Wed Nov 17 18:03:49 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: virt.4,v 1.1 2010/11/15 21:52:47 pooka Exp $ +.\" $NetBSD: virt.4,v 1.2 2010/11/17 18:03:49 wiz Exp $ .\" .\" Copyright (c) 2010 Antti Kantee .\" All rights reserved. @@ -74,7 +74,7 @@ The host's .Xr tap 4 interface can be further bridged with hardware interfaces to provide -full internet access to a rump kernel. +full Internet access to a rump kernel. .Sh SEE ALSO .Xr rump 3 , .Xr bridge 4 ,
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Wed Nov 17 18:02:20 UTC 2010 Modified Files: src/share/man/man4: shmif.4 Log Message: Convert manual list to Bl; fix typo; remove dot at end of SEE ALSO. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/shmif.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/shmif.4 diff -u src/share/man/man4/shmif.4:1.2 src/share/man/man4/shmif.4:1.3 --- src/share/man/man4/shmif.4:1.2 Wed Nov 17 17:55:00 2010 +++ src/share/man/man4/shmif.4 Wed Nov 17 18:02:20 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: shmif.4,v 1.2 2010/11/17 17:55:00 pooka Exp $ +.\" $NetBSD: shmif.4,v 1.3 2010/11/17 18:02:20 wiz Exp $ .\" .\" Copyright (c) 2010 Antti Kantee .\" All rights reserved. @@ -42,9 +42,14 @@ All interfaces connected to the same bus see each others' traffic. .Pp Using a memory mapped regular file as a bus has two implications: -1) the bus identifier is not in flat global namespace 2) configuring -and using the interface is possible without superuser privileges -on the host (normal host file access permissions for the bus hold). +.Bl -enum +.It +The bus identifier is not in flat global namespace. +.It +Configuring and using the interface is possible without superuser +privileges on the host (normal host file access permissions for +the bus hold). +.El .Pp It is not possible to directly access the host networking facilities from a rump virtual kernel using purely @@ -65,7 +70,7 @@ .Fn rump_pub_shmif_create . The bus pathname is passed in .Fa path . -The number of the newly created interface is available after a succesful +The number of the newly created interface is available after a successful call by dereferencing .Fa ifnum . .It @@ -88,4 +93,4 @@ .Sh SEE ALSO .Xr rump 3 , .Xr virt 4 , -.Xr ifconfig 8 . +.Xr ifconfig 8
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Wed Nov 17 17:59:25 UTC 2010 Modified Files: src/share/man/man4: nside.4 Log Message: Remove pasto. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/nside.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/nside.4 diff -u src/share/man/man4/nside.4:1.1 src/share/man/man4/nside.4:1.2 --- src/share/man/man4/nside.4:1.1 Mon Nov 15 23:07:38 2010 +++ src/share/man/man4/nside.4 Wed Nov 17 17:59:25 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: nside.4,v 1.1 2010/11/15 23:07:38 skrll Exp $ +.\" $NetBSD: nside.4,v 1.2 2010/11/17 17:59:25 wiz Exp $ .\" .\" Copyright (c) 2003 Manuel Bouyer. .\" @@ -37,7 +37,6 @@ interface controller, and provides the interface with the hardware for the .Xr ata 4 driver. -enabled. .Sh SEE ALSO .Xr ata 4 , .Xr atapi 4 ,
CVS commit: src/share/man/man4
Module Name:src Committed By: pooka Date: Wed Nov 17 17:55:00 UTC 2010 Modified Files: src/share/man/man4: shmif.4 Log Message: note that shmif can be destroyed now To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/shmif.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/shmif.4 diff -u src/share/man/man4/shmif.4:1.1 src/share/man/man4/shmif.4:1.2 --- src/share/man/man4/shmif.4:1.1 Mon Nov 15 23:10:51 2010 +++ src/share/man/man4/shmif.4 Wed Nov 17 17:55:00 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: shmif.4,v 1.1 2010/11/15 23:10:51 pooka Exp $ +.\" $NetBSD: shmif.4,v 1.2 2010/11/17 17:55:00 pooka Exp $ .\" .\" Copyright (c) 2010 Antti Kantee .\" All rights reserved. @@ -23,7 +23,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. .\" -.Dd November 15, 2010 +.Dd November 17, 2010 .Dt SHMIF 4 .Os .Sh NAME @@ -79,6 +79,12 @@ .Em linkstr before the interface address can be configured. .El +.Pp +Destroying an +.Nm +interface is possible only via +.Xr ifconfig 8 +.Em destroy . .Sh SEE ALSO .Xr rump 3 , .Xr virt 4 ,
CVS commit: src/sys/rump/net/lib/libshmif
Module Name:src Committed By: pooka Date: Wed Nov 17 17:51:22 UTC 2010 Modified Files: src/sys/rump/net/lib/libshmif: if_shmem.c Log Message: Support destroy in shmif. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/rump/net/lib/libshmif/if_shmem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/net/lib/libshmif/if_shmem.c diff -u src/sys/rump/net/lib/libshmif/if_shmem.c:1.31 src/sys/rump/net/lib/libshmif/if_shmem.c:1.32 --- src/sys/rump/net/lib/libshmif/if_shmem.c:1.31 Tue Nov 16 20:08:24 2010 +++ src/sys/rump/net/lib/libshmif/if_shmem.c Wed Nov 17 17:51:22 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_shmem.c,v 1.31 2010/11/16 20:08:24 pooka Exp $ */ +/* $NetBSD: if_shmem.c,v 1.32 2010/11/17 17:51:22 pooka Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.31 2010/11/16 20:08:24 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.32 2010/11/17 17:51:22 pooka Exp $"); #include #include @@ -81,12 +81,19 @@ struct shmif_mem *sc_busmem; int sc_memfd; int sc_kq; + int sc_unit; char *sc_backfile; size_t sc_backfilelen; uint64_t sc_devgen; uint32_t sc_nextpacket; + + kmutex_t sc_mtx; + kcondvar_t sc_cv; + + struct lwp *sc_rcvl; + bool sc_dying; }; static const uint32_t busversion = SHMIF_VERSION; @@ -142,18 +149,19 @@ struct shmif_sc *sc; struct ifnet *ifp; uint32_t randnum; - unsigned mynum = unit; + int error; randnum = arc4random(); memcpy(&enaddr[2], &randnum, sizeof(randnum)); sc = kmem_zalloc(sizeof(*sc), KM_SLEEP); sc->sc_memfd = -1; + sc->sc_unit = unit; ifp = &sc->sc_ec.ec_if; memcpy(sc->sc_myaddr, enaddr, sizeof(enaddr)); - sprintf(ifp->if_xname, "shmif%d", mynum); + sprintf(ifp->if_xname, "shmif%d", unit); ifp->if_softc = sc; ifp->if_flags = IFF_BROADCAST | IFF_MULTICAST; ifp->if_init = shmif_init; @@ -162,16 +170,32 @@ ifp->if_stop = shmif_stop; ifp->if_mtu = ETHERMTU; + mutex_init(&sc->sc_mtx, MUTEX_DEFAULT, IPL_NONE); + cv_init(&sc->sc_cv, "shmifcv"); + if_attach(ifp); ether_ifattach(ifp, enaddr); aprint_verbose("shmif%d: Ethernet address %s\n", - mynum, ether_sprintf(enaddr)); + unit, ether_sprintf(enaddr)); if (scp) *scp = sc; - return 0; + error = 0; + if (rump_threads) { + error = kthread_create(PRI_NONE, + KTHREAD_MPSAFE | KTHREAD_JOINABLE, NULL, + shmif_rcv, ifp, &sc->sc_rcvl, "shmif"); + } else { + printf("WARNING: threads not enabled, shmif NOT working\n"); + } + + if (error) { + shmif_unclone(ifp); + } + + return error; } static int @@ -221,48 +245,56 @@ shmif_unlockbus(sc->sc_busmem); sc->sc_kq = rumpuser_writewatchfile_setup(-1, memfd, 0, &error); - if (sc->sc_kq == -1) + if (sc->sc_kq == -1) { + rumpuser_unmap(sc->sc_busmem, BUSMEM_SIZE); return error; + } sc->sc_memfd = memfd; - return 0; + + return error; } static void finibackend(struct shmif_sc *sc) { - int dummy; - kmem_free(sc->sc_backfile, sc->sc_backfilelen); - sc->sc_backfile = NULL; - sc->sc_backfilelen = 0; + if (sc->sc_backfile == NULL) + return; + + if (sc->sc_backfile) { + kmem_free(sc->sc_backfile, sc->sc_backfilelen); + sc->sc_backfile = NULL; + sc->sc_backfilelen = 0; + } rumpuser_unmap(sc->sc_busmem, BUSMEM_SIZE); - rumpuser_close(sc->sc_memfd, &dummy); - rumpuser_close(sc->sc_kq, &dummy); + rumpuser_close(sc->sc_memfd, NULL); + rumpuser_close(sc->sc_kq, NULL); + + sc->sc_memfd = -1; } int rump_shmif_create(const char *path, int *ifnum) { struct shmif_sc *sc; - int mynum, error, memfd, dummy; + int unit, error, memfd; memfd = rumpuser_open(path, O_RDWR | O_CREAT, &error); if (memfd == -1) return error; - mynum = vmem_xalloc(shmif_units, 1, 0, 0, 0, 0, 0, + unit = vmem_xalloc(shmif_units, 1, 0, 0, 0, 0, 0, VM_INSTANTFIT | VM_SLEEP) - 1; - if ((error = allocif(mynum, &sc)) != 0) { + if ((error = allocif(unit, &sc)) != 0) { rumpuser_close(memfd, NULL); return error; } error = initbackend(sc, memfd); if (error) { - rumpuser_close(memfd, &dummy); - /* XXX: free sc */ + shmif_unclone(&sc->sc_ec.ec_if); return error; } @@ -271,7 +303,7 @@ strcpy(sc->sc_backfile, path); if (ifnum) - *ifnum = mynum; + *ifnum = unit; return 0; } @@ -300,8 +332,32 @@ static int shmif_unclone(struct ifnet *ifp) { + struct shmif_sc *sc = ifp->if_softc; + + shmif_stop(ifp, 1); + if_down(ifp); + finibackend(sc); + + mutex_enter(&sc->sc_mtx); + sc->sc_dying = true; + cv_broadcast(&sc->sc_cv); + mutex_exit(&sc->sc_mtx); - return EOPNOTSUPP; + if (sc->sc_rcvl) + kthread_join(sc->sc_rcvl); + sc->sc_rcvl = NULL; + + vmem_xfree(shmif_units, sc->sc_unit+1, 1); + + ether_ifdetach(ifp); + if_detach(ifp); + + cv_destroy(&sc->sc_cv); + mutex_destroy(&sc->sc_mtx); + + kmem_free(sc, sizeof(*sc)); + + return 0;
CVS commit: src/lib/librumpuser
Module Name:src Committed By: pooka Date: Wed Nov 17 17:36:15 UTC 2010 Modified Files: src/lib/librumpuser: rumpuser_sp.c Log Message: free syscall data after use To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/lib/librumpuser/rumpuser_sp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/librumpuser/rumpuser_sp.c diff -u src/lib/librumpuser/rumpuser_sp.c:1.5 src/lib/librumpuser/rumpuser_sp.c:1.6 --- src/lib/librumpuser/rumpuser_sp.c:1.5 Thu Nov 4 20:54:07 2010 +++ src/lib/librumpuser/rumpuser_sp.c Wed Nov 17 17:36:14 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpuser_sp.c,v 1.5 2010/11/04 20:54:07 pooka Exp $ */ +/* $NetBSD: rumpuser_sp.c,v 1.6 2010/11/17 17:36:14 pooka Exp $ */ /* * Copyright (c) 2010 Antti Kantee. All Rights Reserved. @@ -38,7 +38,7 @@ */ #include -__RCSID("$NetBSD: rumpuser_sp.c,v 1.5 2010/11/04 20:54:07 pooka Exp $"); +__RCSID("$NetBSD: rumpuser_sp.c,v 1.6 2010/11/17 17:36:14 pooka Exp $"); #include #include @@ -315,6 +315,7 @@ rv = rumpsyscall(sysnum, data, retval); lwproc_switch(NULL); pthread_setspecific(spclient_tls, NULL); + free(data); DPRINTF(("rump_sp: got return value %d\n", rv));
CVS commit: src/tests/util/sh
Module Name:src Committed By: christos Date: Wed Nov 17 13:41:52 UTC 2010 Modified Files: src/tests/util/sh: t_expand.sh Log Message: since the fix was reverted, revert the test. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/tests/util/sh/t_expand.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/util/sh/t_expand.sh diff -u src/tests/util/sh/t_expand.sh:1.8 src/tests/util/sh/t_expand.sh:1.9 --- src/tests/util/sh/t_expand.sh:1.8 Tue Nov 16 13:25:03 2010 +++ src/tests/util/sh/t_expand.sh Wed Nov 17 08:41:52 2010 @@ -1,4 +1,4 @@ -# $NetBSD: t_expand.sh,v 1.8 2010/11/16 18:25:03 christos Exp $ +# $NetBSD: t_expand.sh,v 1.9 2010/11/17 13:41:52 christos Exp $ # # Copyright (c) 2007, 2009 The NetBSD Foundation, Inc. # All rights reserved. @@ -86,11 +86,12 @@ strip_head() { atf_set "descr" "Checks that the %% operator works and strips" \ "the contents of a variable from the given point" \ - "to the end PR bin/43469" + "to the end" } strip_body() { line='#define bindir "/usr/bin" /* comment */' stripped='#define bindir "/usr/bin" ' + atf_expect_fail "PR bin/43469" atf_check_equal '$stripped' '${line%%/\**}' }
CVS commit: src/bin/sh
Module Name:src Committed By: christos Date: Wed Nov 17 13:40:48 UTC 2010 Modified Files: src/bin/sh: parser.c Log Message: revert again, since this breaks libtool amongst other things. To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/bin/sh/parser.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/parser.c diff -u src/bin/sh/parser.c:1.77 src/bin/sh/parser.c:1.78 --- src/bin/sh/parser.c:1.77 Tue Nov 16 13:17:32 2010 +++ src/bin/sh/parser.c Wed Nov 17 08:40:48 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: parser.c,v 1.77 2010/11/16 18:17:32 christos Exp $ */ +/* $NetBSD: parser.c,v 1.78 2010/11/17 13:40:48 christos Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)parser.c 8.7 (Berkeley) 5/16/95"; #else -__RCSID("$NetBSD: parser.c,v 1.77 2010/11/16 18:17:32 christos Exp $"); +__RCSID("$NetBSD: parser.c,v 1.78 2010/11/17 13:40:48 christos Exp $"); #endif #endif /* not lint */ @@ -896,27 +896,20 @@ * This code assumes that an int is 32 bits. We don't use uint32_t, * because the rest of the code does not. */ -#define VN (varnest - insub) -#define ISDBLQUOTE() ((VN < 32) ? (dblquote & (1 << VN)) : \ -(dblquotep[(VN / 32) - 1] & (1 << (VN % 32 +#define ISDBLQUOTE() ((varnest < 32) ? (dblquote & (1 << varnest)) : \ +(dblquotep[(varnest / 32) - 1] & (1 << (varnest % 32 #define SETDBLQUOTE() \ -do { \ - TRACE(("setdblquote varnest=%d insub=%d\n", varnest, insub)); \ - if (VN < 32) \ - dblquote |= (1 << VN); \ - else \ - dblquotep[(VN / 32) - 1] |= (1 << (VN % 32));\ -} while (/*CONSTCOND*/0) +if (varnest < 32) \ + dblquote |= (1 << varnest); \ +else \ + dblquotep[(varnest / 32) - 1] |= (1 << (varnest % 32)) #define CLRDBLQUOTE() \ -do { \ - TRACE(("clrdblquote varnest=%d insub=%d\n", varnest, insub)); \ - if (VN < 32) \ - dblquote &= ~(1 << VN); \ - else \ - dblquotep[(VN / 32) - 1] &= ~(1 << (VN % 32)); \ -} while (/*CONSTCOND*/0) +if (varnest < 32) \ + dblquote &= ~(1 << varnest); \ +else \ + dblquotep[(varnest / 32) - 1] &= ~(1 << (varnest % 32)) STATIC int readtoken1(int firstc, char const *syn, char *eofmark, int striptabs) @@ -935,7 +928,6 @@ volatile int arinest; /* levels of arithmetic expansion */ volatile int parenlevel; /* levels of parens in arithmetic */ volatile int oldstyle; - volatile int insub; char const * volatile prevsyntax; /* syntax before arithmetic */ #ifdef __GNUC__ prevsyntax = NULL; /* XXX gcc4 */ @@ -944,9 +936,9 @@ startlinno = plinno; dblquote = 0; varnest = 0; - insub = 0; - if (syntax == DQSYNTAX) + if (syntax == DQSYNTAX) { SETDBLQUOTE(); + } quotef = 0; bqlist = NULL; arinest = 0; @@ -1002,17 +994,10 @@ break; } quotef = 1; -TRACE(("varnest=%d doubleq=%d c=%c\n", -varnest, ISDBLQUOTE(), c)); if (ISDBLQUOTE() && c != '\\' && c != '`' && c != '$' && -(c != '"' || eofmark != NULL)) { - if (insub) { - USTPUTC(CTLESC, out); - USTPUTC(CTLESC, out); - } else - USTPUTC('\\', out); -} +(c != '"' || eofmark != NULL)) + USTPUTC('\\', out); if (SQSYNTAX[c] == CCTL) USTPUTC(CTLESC, out); else if (eofmark == NULL) { @@ -1068,8 +1053,6 @@ } if (eofmark != NULL) break; -TRACE(("CDQUOTE %d varnest=%d insub=%d\n", -ISDBLQUOTE(), varnest, insub)); if (ISDBLQUOTE()) { if (varnest != 0) USTPUTC(CTLQUOTEEND, out); @@ -1085,7 +1068,6 @@ PARSESUB(); /* parse substitution */ break; case CENDVAR: /* CLOSEBRACE */ -insub = 0; if (varnest > 0 && !ISDBLQUOTE()) { varnest--; USTPUTC(CTLENDVAR, out); @@ -1358,9 +1340,7 @@ flags |= VSQUOTE; *(stackblock() + typeloc) = subtype | flags; if (subtype != VSNORMAL) { - TRACE(("varnest=%d subtype=%d\n", varnest, subtype)); varnest++; - insub = 1; if (varnest >= maxnest) { dblquotep = ckrealloc(dblquotep, maxnest / 8); dblquotep[(maxnest / 32) - 1] = 0;
CVS commit: src/lib/libc/stdlib
Module Name:src Committed By: tron Date: Wed Nov 17 13:25:54 UTC 2010 Modified Files: src/lib/libc/stdlib: _env.c Log Message: Include "namespace.h" to get namespace protection. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/libc/stdlib/_env.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/stdlib/_env.c diff -u src/lib/libc/stdlib/_env.c:1.4 src/lib/libc/stdlib/_env.c:1.5 --- src/lib/libc/stdlib/_env.c:1.4 Tue Nov 16 17:23:10 2010 +++ src/lib/libc/stdlib/_env.c Wed Nov 17 13:25:53 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: _env.c,v 1.4 2010/11/16 17:23:10 tron Exp $ */ +/* $NetBSD: _env.c,v 1.5 2010/11/17 13:25:53 tron Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,9 +31,11 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _env.c,v 1.4 2010/11/16 17:23:10 tron Exp $"); +__RCSID("$NetBSD: _env.c,v 1.5 2010/11/17 13:25:53 tron Exp $"); #endif /* LIBC_SCCS and not lint */ +#include "namespace.h" + #include #include
CVS commit: src
Module Name:src Committed By: tron Date: Wed Nov 17 13:19:32 UTC 2010 Modified Files: src/common/lib/libc/gen: rb.c src/lib/libc/include: namespace.h Log Message: Provide proper namespace protection for rbtree(3) because it is now used by "libc" internally. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/common/lib/libc/gen/rb.c cvs rdiff -u -r1.144 -r1.145 src/lib/libc/include/namespace.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/gen/rb.c diff -u src/common/lib/libc/gen/rb.c:1.8 src/common/lib/libc/gen/rb.c:1.9 --- src/common/lib/libc/gen/rb.c:1.8 Sat Sep 25 01:42:38 2010 +++ src/common/lib/libc/gen/rb.c Wed Nov 17 13:19:32 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rb.c,v 1.8 2010/09/25 01:42:38 matt Exp $ */ +/* $NetBSD: rb.c,v 1.9 2010/11/17 13:19:32 tron Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -56,17 +56,7 @@ __weak_alias(rb_tree_depths, _rb_tree_depths) #endif -#define rb_tree_init _rb_tree_init -#define rb_tree_find_node _rb_tree_find_node -#define rb_tree_find_node_geq _rb_tree_find_node_geq -#define rb_tree_find_node_leq _rb_tree_find_node_leq -#define rb_tree_insert_node _rb_tree_insert_node -#define rb_tree_remove_node _rb_tree_remove_node -#define rb_tree_iterate _rb_tree_iterate -#ifdef RBDEBUG -#define rb_tree_check _rb_tree_check -#define rb_tree_depths _rb_tree_depths -#endif +#include "namespace.h" #endif #ifdef RBTEST Index: src/lib/libc/include/namespace.h diff -u src/lib/libc/include/namespace.h:1.144 src/lib/libc/include/namespace.h:1.145 --- src/lib/libc/include/namespace.h:1.144 Sat Nov 13 19:41:32 2010 +++ src/lib/libc/include/namespace.h Wed Nov 17 13:19:32 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: namespace.h,v 1.144 2010/11/13 19:41:32 christos Exp $ */ +/* $NetBSD: namespace.h,v 1.145 2010/11/17 13:19:32 tron Exp $ */ /*- * Copyright (c) 1997-2004 The NetBSD Foundation, Inc. @@ -805,6 +805,19 @@ #define dladdr __dladdr #define fmtcheck __fmtcheck +/* RB trees */ +#define rb_tree_init _rb_tree_init +#define rb_tree_find_node _rb_tree_find_node +#define rb_tree_find_node_geq _rb_tree_find_node_geq +#define rb_tree_find_node_leq _rb_tree_find_node_leq +#define rb_tree_insert_node _rb_tree_insert_node +#define rb_tree_remove_node _rb_tree_remove_node +#define rb_tree_iterate _rb_tree_iterate +#ifdef RBDEBUG +#define rb_tree_check _rb_tree_check +#define rb_tree_depths _rb_tree_depths +#endif + /* rpc locks */ #define authdes_lock __rpc_authdes_lock #define authnone_lock __rpc_authnone_lock
CVS commit: src/crypto/external/bsd/openssl/dist/ssl
Module Name:src Committed By: drochner Date: Wed Nov 17 12:09:34 UTC 2010 Modified Files: src/crypto/external/bsd/openssl/dist/ssl: t1_lib.c Log Message: apply patch from http://www.openssl.org/news/secadv_20101116.txt to fix a race condition which can be exploited in a buffer overrun attack (CVE-2010-3864) To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 \ src/crypto/external/bsd/openssl/dist/ssl/t1_lib.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssl/dist/ssl/t1_lib.c diff -u src/crypto/external/bsd/openssl/dist/ssl/t1_lib.c:1.1.1.2 src/crypto/external/bsd/openssl/dist/ssl/t1_lib.c:1.2 --- src/crypto/external/bsd/openssl/dist/ssl/t1_lib.c:1.1.1.2 Sat Dec 26 23:34:36 2009 +++ src/crypto/external/bsd/openssl/dist/ssl/t1_lib.c Wed Nov 17 12:09:34 2010 @@ -713,14 +713,23 @@ switch (servname_type) { case TLSEXT_NAMETYPE_host_name: - if (s->session->tlsext_hostname == NULL) + if (!s->hit) { - if (len > TLSEXT_MAXLEN_host_name || - ((s->session->tlsext_hostname = OPENSSL_malloc(len+1)) == NULL)) + if(s->session->tlsext_hostname) + { + *al = SSL_AD_DECODE_ERROR; + return 0; + } + if (len > TLSEXT_MAXLEN_host_name) { *al = TLS1_AD_UNRECOGNIZED_NAME; return 0; } + if ((s->session->tlsext_hostname = OPENSSL_malloc(len+1)) == NULL) + { + *al = TLS1_AD_INTERNAL_ERROR; + return 0; + } memcpy(s->session->tlsext_hostname, sdata, len); s->session->tlsext_hostname[len]='\0'; if (strlen(s->session->tlsext_hostname) != len) { @@ -733,7 +742,8 @@ } else - s->servername_done = strlen(s->session->tlsext_hostname) == len + s->servername_done = s->session->tlsext_hostname + && strlen(s->session->tlsext_hostname) == len && strncmp(s->session->tlsext_hostname, (char *)sdata, len) == 0; break; @@ -764,15 +774,22 @@ *al = TLS1_AD_DECODE_ERROR; return 0; } - s->session->tlsext_ecpointformatlist_length = 0; - if (s->session->tlsext_ecpointformatlist != NULL) OPENSSL_free(s->session->tlsext_ecpointformatlist); - if ((s->session->tlsext_ecpointformatlist = OPENSSL_malloc(ecpointformatlist_length)) == NULL) + if (!s->hit) { -*al = TLS1_AD_INTERNAL_ERROR; -return 0; +if(s->session->tlsext_ecpointformatlist) + { + *al = TLS1_AD_DECODE_ERROR; + return 0; + } +s->session->tlsext_ecpointformatlist_length = 0; +if ((s->session->tlsext_ecpointformatlist = OPENSSL_malloc(ecpointformatlist_length)) == NULL) + { + *al = TLS1_AD_INTERNAL_ERROR; + return 0; + } +s->session->tlsext_ecpointformatlist_length = ecpointformatlist_length; +memcpy(s->session->tlsext_ecpointformatlist, sdata, ecpointformatlist_length); } - s->session->tlsext_ecpointformatlist_length = ecpointformatlist_length; - memcpy(s->session->tlsext_ecpointformatlist, sdata, ecpointformatlist_length); #if 0 fprintf(stderr,"ssl_parse_clienthello_tlsext s->session->tlsext_ecpointformatlist (length=%i) ", s->session->tlsext_ecpointformatlist_length); sdata = s->session->tlsext_ecpointformatlist; @@ -793,15 +810,22 @@ *al = TLS1_AD_DECODE_ERROR; return 0; } - s->session->tlsext_ellipticcurvelist_length = 0; - if (s->session->tlsext_ellipticcurvelist != NULL) OPENSSL_free(s->session->tlsext_ellipticcurvelist); - if ((s->session->tlsext_ellipticcurvelist = OPENSSL_malloc(ellipticcurvelist_length)) == NULL) + if (!s->hit) { -*al = TLS1_AD_INTERNAL_ERROR; -return 0; +if(s->session->tlsext_ellipticcurvelist) + { + *al = TLS1_AD_DECODE_ERROR; + return 0; + } +s->session->tlsext_ellipticcurvelist_length = 0; +if ((s->session->tlsext_ellipticcurvelist = OPENSSL_malloc(ellipticcurvelist_length)) == NULL) + { + *al = TLS1_AD_INTERNAL_ERROR; + return 0; + } +s->session->tlsext_ellipticcurvelist_length = ellipticcurvelist_length; +memcpy(s->session->tlsext_ellipticcurvelist, sdata, ellipticcurvelist_length); } - s->session->tlsext_ellipticcurvelist_length = ellipticcurvelist_length; - memcpy(s->session->tlsext_ellipticcurvelist, sdata, ellipticcurvelist_length); #if 0 fprintf(stderr,"ssl_parse_clienthello_tlsext s->session->tlsext_ellipticcurvelist (length=%i) ", s->session->tlsext_ellipticcurvelist_length); sdata = s->session->tlsext_ellipticcurvelist;
CVS commit: src/crypto/dist/ipsec-tools/src/racoon
Module Name:src Committed By: tteras Date: Wed Nov 17 10:40:41 UTC 2010 Modified Files: src/crypto/dist/ipsec-tools/src/racoon: handler.c handler.h isakmp.c isakmp_inf.c Log Message: Fix my previous patch to not call purge_remote() twice. Change the place where purge_remote() is called. This fixes also a possible crash from the same patch since ph1->remote can be NULL (when we are responder and config is not yet selected). To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/crypto/dist/ipsec-tools/src/racoon/handler.c cvs rdiff -u -r1.24 -r1.25 src/crypto/dist/ipsec-tools/src/racoon/handler.h cvs rdiff -u -r1.65 -r1.66 src/crypto/dist/ipsec-tools/src/racoon/isakmp.c cvs rdiff -u -r1.43 -r1.44 \ src/crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/dist/ipsec-tools/src/racoon/handler.c diff -u src/crypto/dist/ipsec-tools/src/racoon/handler.c:1.33 src/crypto/dist/ipsec-tools/src/racoon/handler.c:1.34 --- src/crypto/dist/ipsec-tools/src/racoon/handler.c:1.33 Thu Oct 21 06:04:33 2010 +++ src/crypto/dist/ipsec-tools/src/racoon/handler.c Wed Nov 17 10:40:41 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: handler.c,v 1.33 2010/10/21 06:04:33 tteras Exp $ */ +/* $NetBSD: handler.c,v 1.34 2010/11/17 10:40:41 tteras Exp $ */ /* Id: handler.c,v 1.28 2006/05/26 12:17:29 manubsd Exp */ @@ -514,6 +514,22 @@ LIST_INIT(&ph1tree); } +int +ph1_rekey_enabled(iph1) + struct ph1handle *iph1; +{ + if (iph1->rmconf == NULL) + return 0; + if (iph1->rmconf->rekey == REKEY_FORCE) + return 1; +#ifdef ENABLE_DPD + if (iph1->rmconf->rekey == REKEY_ON && iph1->dpd_support && + iph1->rmconf->dpd_interval) + return 1; +#endif + return 0; +} + /* %%% management phase 2 handler */ int Index: src/crypto/dist/ipsec-tools/src/racoon/handler.h diff -u src/crypto/dist/ipsec-tools/src/racoon/handler.h:1.24 src/crypto/dist/ipsec-tools/src/racoon/handler.h:1.25 --- src/crypto/dist/ipsec-tools/src/racoon/handler.h:1.24 Fri Nov 12 09:09:47 2010 +++ src/crypto/dist/ipsec-tools/src/racoon/handler.h Wed Nov 17 10:40:41 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: handler.h,v 1.24 2010/11/12 09:09:47 tteras Exp $ */ +/* $NetBSD: handler.h,v 1.25 2010/11/17 10:40:41 tteras Exp $ */ /* Id: handler.h,v 1.19 2006/02/25 08:25:12 manubsd Exp */ @@ -493,6 +493,7 @@ extern int resolveph1rmconf __P((struct ph1handle *)); extern void flushph1 __P((void)); extern void initph1tree __P((void)); +extern int ph1_rekey_enabled __P((struct ph1handle *)); extern int enumph2 __P((struct ph2selector *ph2sel, int (* enum_func)(struct ph2handle *iph2, void *arg), Index: src/crypto/dist/ipsec-tools/src/racoon/isakmp.c diff -u src/crypto/dist/ipsec-tools/src/racoon/isakmp.c:1.65 src/crypto/dist/ipsec-tools/src/racoon/isakmp.c:1.66 --- src/crypto/dist/ipsec-tools/src/racoon/isakmp.c:1.65 Fri Nov 12 10:36:37 2010 +++ src/crypto/dist/ipsec-tools/src/racoon/isakmp.c Wed Nov 17 10:40:41 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: isakmp.c,v 1.65 2010/11/12 10:36:37 tteras Exp $ */ +/* $NetBSD: isakmp.c,v 1.66 2010/11/17 10:40:41 tteras Exp $ */ /* Id: isakmp.c,v 1.74 2006/05/07 21:32:59 manubsd Exp */ @@ -766,20 +766,6 @@ return 0; } -static int -ph1_rekey_enabled(iph1) - struct ph1handle *iph1; -{ - if (iph1->rmconf->rekey == REKEY_FORCE) - return 1; -#ifdef ENABLE_DPD - if (iph1->rmconf->rekey == REKEY_ON && iph1->dpd_support && - iph1->rmconf->dpd_interval) - return 1; -#endif - return 0; -} - /* * main function of phase 1. */ @@ -2081,11 +2067,9 @@ src, dst, isakmp_pindex(&iph1->index, 0)); evt_phase1(iph1, EVT_PHASE1_DOWN, NULL); - - if (new_iph1 == NULL && ph1_rekey_enabled(iph1)) { - purge_remote(iph1); + if (new_iph1 == NULL && ph1_rekey_enabled(iph1)) script_hook(iph1, SCRIPT_PHASE1_DEAD); - } + racoon_free(src); racoon_free(dst); @@ -3521,7 +3505,7 @@ } } - /* make source address in spidx */ + /* make source address in spidx */ if (iph2->id_p != NULL && (_XIDT(iph2->id_p) == IPSECDOI_ID_IPV4_ADDR || _XIDT(iph2->id_p) == IPSECDOI_ID_IPV6_ADDR Index: src/crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c diff -u src/crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c:1.43 src/crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c:1.44 --- src/crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c:1.43 Fri Nov 12 09:09:47 2010 +++ src/crypto/dist/ipsec-tools/src/racoon/isakmp_inf.c Wed Nov 17 10:40:41 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: isakmp_inf.c,v 1.43 2010/11/12 09:09:47 tteras Exp $ */ +/* $NetBSD: isakmp_inf.c,v 1.44 2010/11/17 10:40:41 tteras Exp $ */ /* Id: isakmp_inf.c,v 1.44 2006/05/06 20:45:52 manubsd Exp */ @@ -516,10 +516,12 @@ sched_cancel(&del_ph1->scr); /* - * Do not delete IPsec SAs when receiving an IKE delete notification. - * Just delete the IKE SA. + * Delete also IPsec-SAs if rekeying is enabl
CVS commit: src/tests/lib/libc/stdlib
Module Name:src Committed By: tron Date: Wed Nov 17 08:55:27 UTC 2010 Modified Files: src/tests/lib/libc/stdlib: t_environment_pth.c Log Message: Put my name in the author section. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/stdlib/t_environment_pth.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/stdlib/t_environment_pth.c diff -u src/tests/lib/libc/stdlib/t_environment_pth.c:1.1 src/tests/lib/libc/stdlib/t_environment_pth.c:1.2 --- src/tests/lib/libc/stdlib/t_environment_pth.c:1.1 Tue Nov 16 14:03:47 2010 +++ src/tests/lib/libc/stdlib/t_environment_pth.c Wed Nov 17 08:55:27 2010 @@ -1,11 +1,11 @@ -/* $NetBSD: t_environment_pth.c,v 1.1 2010/11/16 14:03:47 tron Exp $ */ +/* $NetBSD: t_environment_pth.c,v 1.2 2010/11/17 08:55:27 tron Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation - * by + * by Matthias Scheler. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: t_environment_pth.c,v 1.1 2010/11/16 14:03:47 tron Exp $"); +__RCSID("$NetBSD: t_environment_pth.c,v 1.2 2010/11/17 08:55:27 tron Exp $"); #include #include