CVS commit: src/common/lib/libc/arch/arm/gen
Module Name:src Committed By: matt Date: Thu Jun 20 07:16:23 UTC 2013 Modified Files: src/common/lib/libc/arch/arm/gen: divide.S divsi3.S modsi3.S udivsi3.S umodsi3.S Log Message: Add support for __ARM_ARCH_EXT_IDIV__ which is set for those cores with hardware divide instructions. Note that gcc 4.5.x doesn't support this so this is just latent. gcc 4.7.x does. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/gen/divide.S \ src/common/lib/libc/arch/arm/gen/modsi3.S \ src/common/lib/libc/arch/arm/gen/umodsi3.S cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/arch/arm/gen/divsi3.S cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/arm/gen/udivsi3.S 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/arch/arm/gen/divide.S diff -u src/common/lib/libc/arch/arm/gen/divide.S:1.2 src/common/lib/libc/arch/arm/gen/divide.S:1.3 --- src/common/lib/libc/arch/arm/gen/divide.S:1.2 Wed May 8 05:13:56 2013 +++ src/common/lib/libc/arch/arm/gen/divide.S Thu Jun 20 07:16:23 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: divide.S,v 1.2 2013/05/08 05:13:56 matt Exp $ */ +/* $NetBSD: divide.S,v 1.3 2013/06/20 07:16:23 matt Exp $ */ /* * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND @@ -14,6 +14,8 @@ * SUCH DAMAGE. */ +#ifndef __ARM_ARCH_EXT_IDIV__ + #include /* @@ -374,3 +376,5 @@ __divide:/* r0 = r0 / r1; r1 = r0 % addhs r3, r3, r2 mov r0, r3 RET + +#endif /* __ARM_ARCH_EXT_IDIV__ */ Index: src/common/lib/libc/arch/arm/gen/modsi3.S diff -u src/common/lib/libc/arch/arm/gen/modsi3.S:1.2 src/common/lib/libc/arch/arm/gen/modsi3.S:1.3 --- src/common/lib/libc/arch/arm/gen/modsi3.S:1.2 Wed Nov 28 01:35:05 2012 +++ src/common/lib/libc/arch/arm/gen/modsi3.S Thu Jun 20 07:16:23 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: modsi3.S,v 1.2 2012/11/28 01:35:05 matt Exp $ */ +/* $NetBSD: modsi3.S,v 1.3 2013/06/20 07:16:23 matt Exp $ */ /* * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND @@ -22,9 +22,14 @@ */ ENTRY(__modsi3) +#ifdef __ARM_ARCH_EXT_IDIV__ + sdiv r3, r0, r1 + mls r0, r3, r1, r0 +#else str lr, [sp, #-8]! /* push lr */ bl PIC_SYM(__divsi3, PLT) mov r0, r1 ldr lr, [sp], #8 /* pop lr */ +#endif RET END(__modsi3) Index: src/common/lib/libc/arch/arm/gen/umodsi3.S diff -u src/common/lib/libc/arch/arm/gen/umodsi3.S:1.2 src/common/lib/libc/arch/arm/gen/umodsi3.S:1.3 --- src/common/lib/libc/arch/arm/gen/umodsi3.S:1.2 Wed Nov 28 01:35:05 2012 +++ src/common/lib/libc/arch/arm/gen/umodsi3.S Thu Jun 20 07:16:23 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: umodsi3.S,v 1.2 2012/11/28 01:35:05 matt Exp $ */ +/* $NetBSD: umodsi3.S,v 1.3 2013/06/20 07:16:23 matt Exp $ */ /* * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND @@ -22,8 +22,13 @@ */ ENTRY(__umodsi3) +#ifdef __ARM_ARCH_EXT_IDIV__ + udiv r3, r0, r1 + mls r0, r3, r1, r0 +#else str lr, [sp, #-8]! /* push lr */ bl PIC_SYM(__udivsi3, PLT) mov r0, r1 ldr lr, [sp], #8 /* pop lr */ +#endif RET Index: src/common/lib/libc/arch/arm/gen/divsi3.S diff -u src/common/lib/libc/arch/arm/gen/divsi3.S:1.5 src/common/lib/libc/arch/arm/gen/divsi3.S:1.6 --- src/common/lib/libc/arch/arm/gen/divsi3.S:1.5 Wed May 8 05:13:56 2013 +++ src/common/lib/libc/arch/arm/gen/divsi3.S Thu Jun 20 07:16:23 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: divsi3.S,v 1.5 2013/05/08 05:13:56 matt Exp $ */ +/* $NetBSD: divsi3.S,v 1.6 2013/06/20 07:16:23 matt Exp $ */ /* * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND @@ -23,4 +23,15 @@ ENTRY_NP(__aeabi_idiv) .symver __aeabi_idivmod,__aeabi_idivmod@@GCC_3.5 #endif ENTRY(__divsi3) +#if defined(__ARM_ARCH_EXT_IDIV__) +# if defined(__ARM_EABI__) + mov r3, r0 @ save for mls +# endif + sdiv r0, r0, r1 +# if defined(__ARM_EABI__) + mls r1, r0, r1, r3 @ return modulus in r1 +# endif + RET +#else b __divide +#endif Index: src/common/lib/libc/arch/arm/gen/udivsi3.S diff -u src/common/lib/libc/arch/arm/gen/udivsi3.S:1.1 src/common/lib/libc/arch/arm/gen/udivsi3.S:1.2 --- src/common/lib/libc/arch/arm/gen/udivsi3.S:1.1 Tue Oct 30 12:42:13 2012 +++ src/common/lib/libc/arch/arm/gen/udivsi3.S Thu Jun 20 07:16:23 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: udivsi3.S,v 1.1 2012/10/30 12:42:13 christos Exp $ */ +/* $NetBSD: udivsi3.S,v 1.2 2013/06/20 07:16:23 matt Exp $ */ /* * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND @@ -20,4 +20,15 @@ ENTRY_NP(__aeabi_uidivmod) ENTRY_NP(__aeabi_uidiv) ENTRY(__udivsi3) +#if defined(__ARM_ARCH_EXT_IDIV__) +# if defined(__ARM_EABI__) + mov r3, r0 @ save for mls +# endif + udiv r0, r0, r1 +# if defined(__ARM_EABI__) + mls r1, r0, r1, r3 @ return modulus in r1 +# endif + RET +#else b __udivide +#endif
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: matt Date: Thu Jun 20 07:18:40 UTC 2013 Modified Files: src/lib/libc/arch/arm/gen: Makefile.inc Log Message: modsi3/umodsi3 is not needed for earm since __aeabi_*divmod takes care of it. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/lib/libc/arch/arm/gen/Makefile.inc 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/arch/arm/gen/Makefile.inc diff -u src/lib/libc/arch/arm/gen/Makefile.inc:1.22 src/lib/libc/arch/arm/gen/Makefile.inc:1.23 --- src/lib/libc/arch/arm/gen/Makefile.inc:1.22 Tue Apr 30 01:42:04 2013 +++ src/lib/libc/arch/arm/gen/Makefile.inc Thu Jun 20 07:18:40 2013 @@ -1,7 +1,7 @@ -# $NetBSD: Makefile.inc,v 1.22 2013/04/30 01:42:04 matt Exp $ +# $NetBSD: Makefile.inc,v 1.23 2013/06/20 07:18:40 matt Exp $ -SRCS+= alloca.S byte_swap_2.S byte_swap_4.S bswap64.c divsi3.S \ - fabs.c flt_rounds.c modsi3.S umodsi3.S divide.S divsi3.S udivsi3.S +SRCS+= alloca.S byte_swap_2.S byte_swap_4.S bswap64.c divide.S divsi3.S \ + fabs.c flt_rounds.c udivsi3.S # Common ieee754 constants and functions SRCS+= infinityf_ieee754.c infinity_ieee754.c infinityl_dbl_ieee754.c @@ -14,6 +14,8 @@ SRCS+= signbitf_ieee754.c signbitd_ieee7 .if !empty(LIBC_MACHINE_ARCH:Mearm*) SRCS+= __aeabi_fcmpun.c __aeabi_dcmpun.c SRCS+= __aeabi_idiv0.c __aeabi_ldiv0.c +.else +SRCS+= modsi3.s umodsi3.S .endif SRCS+= nanf.c
CVS commit: src/sys/lib/libkern/arch/arm
Module Name:src Committed By: matt Date: Thu Jun 20 07:29:50 UTC 2013 Modified Files: src/sys/lib/libkern/arch/arm: Makefile.inc Log Message: modsi3/umodsi3 are only needed !EABI arm To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/lib/libkern/arch/arm/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/lib/libkern/arch/arm/Makefile.inc diff -u src/sys/lib/libkern/arch/arm/Makefile.inc:1.16 src/sys/lib/libkern/arch/arm/Makefile.inc:1.17 --- src/sys/lib/libkern/arch/arm/Makefile.inc:1.16 Thu May 2 03:56:42 2013 +++ src/sys/lib/libkern/arch/arm/Makefile.inc Thu Jun 20 07:29:50 2013 @@ -1,10 +1,12 @@ -# $NetBSD: Makefile.inc,v 1.16 2013/05/02 03:56:42 matt Exp $ +# $NetBSD: Makefile.inc,v 1.17 2013/06/20 07:29:50 matt Exp $ SRCS+= byte_swap_2.S byte_swap_4.S SRCS+= ffs.S -SRCS+= divsi3.S udivsi3.S divide.S clzsi2.S modsi3.S umodsi3.S +SRCS+= divsi3.S udivsi3.S divide.S clzsi2.S SRCS+= memcmp.S memcpy.S memset.S memmove.S strcmp.S strncmp.S .if !empty(MACHINE_ARCH:Mearm*) SRCS+= __aeabi_ldivmod.S __aeabi_uldivmod.S __aeabi_lcmp.c __aeabi_ulcmp.c +.else +SRCS+= modsi3.S umodsi3.S .endif
CVS commit: src/usr.bin/netstat
Module Name:src Committed By: martin Date: Thu Jun 20 10:43:18 UTC 2013 Modified Files: src/usr.bin/netstat: inet.c inet6.c Log Message: Not all pointers are 64bit - use uintptr_t instead of uint64_t. To generate a diff of this commit: cvs rdiff -u -r1.102 -r1.103 src/usr.bin/netstat/inet.c cvs rdiff -u -r1.61 -r1.62 src/usr.bin/netstat/inet6.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/netstat/inet.c diff -u src/usr.bin/netstat/inet.c:1.102 src/usr.bin/netstat/inet.c:1.103 --- src/usr.bin/netstat/inet.c:1.102 Wed Jun 19 21:12:03 2013 +++ src/usr.bin/netstat/inet.c Thu Jun 20 10:43:18 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: inet.c,v 1.102 2013/06/19 21:12:03 christos Exp $ */ +/* $NetBSD: inet.c,v 1.103 2013/06/20 10:43:18 martin Exp $ */ /* * Copyright (c) 1983, 1988, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "from: @(#)inet.c 8.4 (Berkeley) 4/20/94"; #else -__RCSID("$NetBSD: inet.c,v 1.102 2013/06/19 21:12:03 christos Exp $"); +__RCSID("$NetBSD: inet.c,v 1.103 2013/06/20 10:43:18 martin Exp $"); #endif #endif /* not lint */ @@ -306,7 +306,7 @@ getpcblist_kmem(u_long off, const char * (char *)&tcpcb, sizeof (tcpcb)); } pcblist[i].ki_ppcbaddr = - istcp ? (uint64_t) inpcb.inp_ppcb : (uint64_t) prev; + istcp ? (uintptr_t) inpcb.inp_ppcb : (uintptr_t) prev; pcblist[i].ki_rcvq = (uint64_t)sockb.so_rcv.sb_cc; pcblist[i].ki_sndq = (uint64_t)sockb.so_snd.sb_cc; Index: src/usr.bin/netstat/inet6.c diff -u src/usr.bin/netstat/inet6.c:1.61 src/usr.bin/netstat/inet6.c:1.62 --- src/usr.bin/netstat/inet6.c:1.61 Wed Jun 19 21:12:03 2013 +++ src/usr.bin/netstat/inet6.c Thu Jun 20 10:43:18 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: inet6.c,v 1.61 2013/06/19 21:12:03 christos Exp $ */ +/* $NetBSD: inet6.c,v 1.62 2013/06/20 10:43:18 martin Exp $ */ /* BSDI inet.c,v 2.3 1995/10/24 02:19:29 prb Exp */ /* @@ -64,7 +64,7 @@ #if 0 static char sccsid[] = "@(#)inet.c 8.4 (Berkeley) 4/20/94"; #else -__RCSID("$NetBSD: inet6.c,v 1.61 2013/06/19 21:12:03 christos Exp $"); +__RCSID("$NetBSD: inet6.c,v 1.62 2013/06/20 10:43:18 martin Exp $"); #endif #endif /* not lint */ @@ -323,7 +323,7 @@ getpcblist_kmem(u_long off, const char * #endif } pcblist[i].ki_ppcbaddr = - istcp ? (uint64_t) in6pcb.in6p_ppcb : (uint64_t) prev; + istcp ? (uintptr_t) in6pcb.in6p_ppcb : (uintptr_t) prev; pcblist[i].ki_rcvq = (uint64_t)sockb.so_rcv.sb_cc; pcblist[i].ki_sndq = (uint64_t)sockb.so_snd.sb_cc; sin6.sin6_addr = in6pcb.in6p_laddr;
CVS commit: src/external/bsd/dhcp/dist/client
Module Name:src Committed By: christos Date: Thu Jun 20 12:15:38 UTC 2013 Modified Files: src/external/bsd/dhcp/dist/client: dhclient.8 Log Message: document -m flag To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/dhcp/dist/client/dhclient.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcp/dist/client/dhclient.8 diff -u src/external/bsd/dhcp/dist/client/dhclient.8:1.1.1.2 src/external/bsd/dhcp/dist/client/dhclient.8:1.2 --- src/external/bsd/dhcp/dist/client/dhclient.8:1.1.1.2 Sun Mar 24 18:50:27 2013 +++ src/external/bsd/dhcp/dist/client/dhclient.8 Thu Jun 20 08:15:38 2013 @@ -1,4 +1,4 @@ -.\" $NetBSD: dhclient.8,v 1.1.1.2 2013/03/24 22:50:27 christos Exp $ +.\" $NetBSD: dhclient.8,v 1.2 2013/06/20 12:15:38 christos Exp $ .\" .\" Id: dhclient.8,v 1.32.24.4 2011/04/15 22:12:50 sar Exp .\" @@ -76,6 +76,9 @@ dhclient - Dynamic Host Configuration Pr .B -q ] [ +.B -m +] +[ .B -1 ] [ @@ -249,6 +252,10 @@ inittab on System V systems. This impli Become a daemon immediately (nowait) rather than waiting until an an IP address has been acquired. .TP +.BI \-m +Don't require that the responding ethernet address of the dhcp server +matches the one we expect. +.TP .BI \-q Be quiet at startup, this is the default. .TP
CVS commit: src/external/bsd/dhcp/dist/client
Module Name:src Committed By: christos Date: Thu Jun 20 12:24:08 UTC 2013 Modified Files: src/external/bsd/dhcp/dist/client: dhc6.c dhclient.c Log Message: 1. don't try to open the pid file if the path is NULL 2. daemonize in two stages: always fork() first and wait for the child to tell us when the interface is ready, so that we don't lose track of the file descriptors since we are threaded. 3. Add an option (-m) not to match the hardware address of the responding dhcp server. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/dhcp/dist/client/dhc6.c cvs rdiff -u -r1.5 -r1.6 src/external/bsd/dhcp/dist/client/dhclient.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcp/dist/client/dhc6.c diff -u src/external/bsd/dhcp/dist/client/dhc6.c:1.4 src/external/bsd/dhcp/dist/client/dhc6.c:1.5 --- src/external/bsd/dhcp/dist/client/dhc6.c:1.4 Tue Mar 26 20:38:07 2013 +++ src/external/bsd/dhcp/dist/client/dhc6.c Thu Jun 20 08:24:08 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: dhc6.c,v 1.4 2013/03/27 00:38:07 christos Exp $ */ +/* $NetBSD: dhc6.c,v 1.5 2013/06/20 12:24:08 christos Exp $ */ /* dhc6.c - DHCPv6 client routines. */ @@ -26,7 +26,7 @@ */ #include -__RCSID("$NetBSD: dhc6.c,v 1.4 2013/03/27 00:38:07 christos Exp $"); +__RCSID("$NetBSD: dhc6.c,v 1.5 2013/06/20 12:24:08 christos Exp $"); #include "dhcpd.h" @@ -1371,7 +1371,7 @@ start_init6(struct client_state *client) add_timeout(&tv, do_init6, client, NULL, NULL); if (nowait) - go_daemon(); + finish_daemon(); } /* Index: src/external/bsd/dhcp/dist/client/dhclient.c diff -u src/external/bsd/dhcp/dist/client/dhclient.c:1.5 src/external/bsd/dhcp/dist/client/dhclient.c:1.6 --- src/external/bsd/dhcp/dist/client/dhclient.c:1.5 Sun Jun 16 19:49:50 2013 +++ src/external/bsd/dhcp/dist/client/dhclient.c Thu Jun 20 08:24:08 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: dhclient.c,v 1.5 2013/06/16 23:49:50 christos Exp $ */ +/* $NetBSD: dhclient.c,v 1.6 2013/06/20 12:24:08 christos Exp $ */ /* dhclient.c @@ -33,7 +33,7 @@ */ #include -__RCSID("$NetBSD: dhclient.c,v 1.5 2013/06/16 23:49:50 christos Exp $"); +__RCSID("$NetBSD: dhclient.c,v 1.6 2013/06/20 12:24:08 christos Exp $"); #include "dhcpd.h" #include @@ -55,6 +55,7 @@ char *path_dhclient_script = path_dhclie /* False (default) => we write and use a pid file */ isc_boolean_t no_pid_file = ISC_FALSE; +isc_boolean_t hw_mismatch_drop = ISC_TRUE; int dhcp_max_agent_option_packet_length = 0; @@ -344,6 +345,8 @@ main(int argc, char **argv) { usage(); } #endif /* DHCPv6 */ + } else if (!strcmp(argv[i], "-m")) { + hw_mismatch_drop = ISC_FALSE; } else if (!strcmp(argv[i], "-v")) { quiet = 0; } else if (!strcmp(argv[i], "--version")) { @@ -362,8 +365,7 @@ main(int argc, char **argv) { * Do this before setup, otherwise if we are using threads things * are not going to work */ - if (nowait) - go_daemon(); + go_daemon(); setup(); if (interfaces_requested > 0) add_interfaces(ifaces, interfaces_requested); @@ -431,7 +433,8 @@ main(int argc, char **argv) { * to write a pid file - we assume they are controlling * the process in some other fashion. */ - if ((release_mode || exit_mode) && (no_pid_file == ISC_FALSE)) { + if (path_dhclient_pid != NULL && + (release_mode || exit_mode) && (no_pid_file == ISC_FALSE)) { FILE *pidfd; pid_t oldpid; long temp; @@ -712,8 +715,6 @@ main(int argc, char **argv) { dmalloc_longterm = dmalloc_outstanding; dmalloc_outstanding = 0; #endif - - /* If we're not going to daemonize, write the pid file now. */ if (no_daemon || nowait) @@ -736,9 +737,9 @@ static void usage() log_fatal("Usage: dhclient " #ifdef DHCPv6 - "[-4|-6] [-SNTP1dvrx] [-nw] [-p ] [-D LL|LLT]\n" + "[-4|-6] [-SNTP1dvrx] [-nw] [-m] [-p ] [-D LL|LLT]\n" #else /* DHCPv6 */ - "[-1dvrx] [-nw] [-p ]\n" + "[-1dvrx] [-nw] [-m] [-p ]\n" #endif /* DHCPv6 */ "[-s server-addr] [-cf config-file] " "[-lf lease-file]\n" @@ -815,7 +816,7 @@ void run_stateless(int exit_mode) /* If we're not supposed to wait before getting the address, don't. */ if (nowait) - go_daemon(); + finish_daemon(); /* If we're not going to daemonize, write the pid file now. */ @@ -893,7 +894,7 @@ int find_subnet (struct subnet **sp, */ #include -__RCSID("$NetBSD: dhclient.c,v 1.5 2013/06/16 23:49:50 christos Exp $"); +__RCSID("$NetBSD: dhclient.c,v 1.6 2013/06/20 12:24:08 christos Exp $"); void state_reboot (cpp) void *cpp; @@ -1045,6 +1046,25 @@ void state_selecting (cpp) send_request (client); } +static isc_boolean_t +compare_hw_address(const char *name, struct packet *packet) { + if (packet->interface->hw_address.hlen - 1 != packet->raw->hlen || + memcmp(&packet->interface->hw_address.hbuf[1], + packet->raw->chaddr, pa
CVS commit: src/external/bsd/dhcp/dist/includes
Module Name:src Committed By: christos Date: Thu Jun 20 12:26:34 UTC 2013 Modified Files: src/external/bsd/dhcp/dist/includes: dhcpd.h Log Message: add finish_daemon(); To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/dhcp/dist/includes/dhcpd.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcp/dist/includes/dhcpd.h diff -u src/external/bsd/dhcp/dist/includes/dhcpd.h:1.4 src/external/bsd/dhcp/dist/includes/dhcpd.h:1.5 --- src/external/bsd/dhcp/dist/includes/dhcpd.h:1.4 Tue Mar 26 20:38:08 2013 +++ src/external/bsd/dhcp/dist/includes/dhcpd.h Thu Jun 20 08:26:34 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: dhcpd.h,v 1.4 2013/03/27 00:38:08 christos Exp $ */ +/* $NetBSD: dhcpd.h,v 1.5 2013/06/20 12:26:34 christos Exp $ */ /* dhcpd.h @@ -2753,6 +2753,7 @@ void client_envadd (struct client_state struct client_lease *packet_to_lease (struct packet *, struct client_state *); void go_daemon (void); +void finish_daemon (void); void write_client_pid_file (void); void client_location_changed (void); void do_release (struct client_state *);
CVS commit: src/sys/arch/epoc32/stand/e32boot
Module Name:src Committed By: kiyohara Date: Thu Jun 20 13:36:48 UTC 2013 Modified Files: src/sys/arch/epoc32/stand/e32boot/exe: e32boot.cpp netbsd.cpp version src/sys/arch/epoc32/stand/e32boot/include: netbsd.h Log Message: Support boot argument for kernel. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/epoc32/stand/e32boot/exe/e32boot.cpp \ src/sys/arch/epoc32/stand/e32boot/exe/netbsd.cpp \ src/sys/arch/epoc32/stand/e32boot/exe/version cvs rdiff -u -r1.1 -r1.2 src/sys/arch/epoc32/stand/e32boot/include/netbsd.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/arch/epoc32/stand/e32boot/exe/e32boot.cpp diff -u src/sys/arch/epoc32/stand/e32boot/exe/e32boot.cpp:1.1 src/sys/arch/epoc32/stand/e32boot/exe/e32boot.cpp:1.2 --- src/sys/arch/epoc32/stand/e32boot/exe/e32boot.cpp:1.1 Sun Apr 28 12:11:26 2013 +++ src/sys/arch/epoc32/stand/e32boot/exe/e32boot.cpp Thu Jun 20 13:36:48 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: e32boot.cpp,v 1.1 2013/04/28 12:11:26 kiyohara Exp $ */ +/* $NetBSD: e32boot.cpp,v 1.2 2013/06/20 13:36:48 kiyohara Exp $ */ /* * Copyright (c) 2012, 2013 KIYOHARA Takashi * All rights reserved. @@ -131,6 +131,7 @@ E32BootL(void) struct btinfo_common *bootinfo; struct btinfo_model *model; struct btinfo_video *video; + struct btinfo_bootargs *bootargs; console = Console::NewL(E32BootName, TSize(KConsFullScreen, KConsFullScreen)); @@ -160,6 +161,8 @@ E32BootL(void) console->Printf(_L("\n")); + bootargs = + (struct btinfo_bootargs *)FindBootInfoL(bootinfo, BTINFO_BOOTARGS); TRAP(err, netbsd = LoadNetBSDL()); if (err != KErrNone) User::Leave(err); @@ -167,6 +170,12 @@ E32BootL(void) return; console->Printf(_L("\nLoaded\n")); + int n, m; + n = sizeof(bootargs->bootargs); + m = (*netbsd->GetArgs()).Length(); + Mem::Copy(bootargs->bootargs, &(*netbsd->GetArgs())[0], n < m ? n : m); + bootargs->bootargs[n < m ? n - 1 : m] = '\0'; + netbsd->ParseHeader(); /* Load logical device(kernel part of e32boot). */ @@ -220,13 +229,15 @@ LOCAL_C NetBSD * LoadNetBSDL(void) { NetBSD *netbsd = NULL; - TBuf input; + TBuf input, *args; TPtrC Default = _L("C:\\netbsd"); TPtrC Prompt = _L("Boot: "); TInt pos, err; TBool retry; input.Zero(); + args = new TBuf; + args->Zero(); retry = false; console->Printf(Prompt); console->Printf(_L("[")); @@ -264,19 +275,29 @@ LoadNetBSDL(void) break; } if (gChar == EKeyEnter) { - if (input.Length() > 0) { -TBufC kernel = -TBufC(input); + input.TrimAll(); + if (input[0] == '-') +input.Swap(*args); + for (int i = 0; i < input.Length(); i++) +if (input[i] == ' ') { + args->Copy(input); + input.SetLength(i); + args->Delete(0, i + 1); + break; +} + args->ZeroTerminate(); -TRAP(err, netbsd = NetBSD::New(kernel)); + if (input.Length() > 0) { +TRAP(err, netbsd = NetBSD::New(input, *args)); } else { -TRAP(err, netbsd = NetBSD::New(Default)); +TRAP(err, netbsd = NetBSD::New(Default, *args)); } if (err == 0 && netbsd != NULL) break; console->Printf(_L("\nLoad failed: %d\n"), err); input.Zero(); + args->Zero(); console->Printf(Prompt); pos = 0; retry = true; @@ -306,6 +327,7 @@ CreateBootInfo(TAny *buf) struct btinfo_model *model; struct btinfo_memory *memory; struct btinfo_video *video; + struct btinfo_bootargs *bootargs; struct memmap *memmap; TUint memsize; TUint i; @@ -361,6 +383,12 @@ CreateBootInfo(TAny *buf) common = &(memory + 1)->common; } + common->len = sizeof(struct btinfo_bootargs); + common->type = BTINFO_BOOTARGS; + bootargs = (struct btinfo_bootargs *)common; + bootargs->bootargs[0] = '\0'; + common = &(bootargs + 1)->common; + common->len = 0; common->type = BTINFO_NONE; Index: src/sys/arch/epoc32/stand/e32boot/exe/netbsd.cpp diff -u src/sys/arch/epoc32/stand/e32boot/exe/netbsd.cpp:1.1 src/sys/arch/epoc32/stand/e32boot/exe/netbsd.cpp:1.2 --- src/sys/arch/epoc32/stand/e32boot/exe/netbsd.cpp:1.1 Sun Apr 28 12:11:26 2013 +++ src/sys/arch/epoc32/stand/e32boot/exe/netbsd.cpp Thu Jun 20 13:36:48 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd.cpp,v 1.1 2013/04/28 12:11:26 kiyohara Exp $ */ +/* $NetBSD: netbsd.cpp,v 1.2 2013/06/20 13:36:48 kiyohara Exp $ */ /* * Copyright (c) 2012 KIYOHARA Takashi * All rights reserved. @@ -76,6 +76,16 @@ NetBSD::New(const TDesC &aFilename) return netbsd; } +NetBSD * +NetBSD::New(const TDesC &aFilename, const TDesC &aArgs) +{ + NetBSD *netbsd = New(aFilename); + + netbsd->Args = &aArgs; + + return netbsd; +} + void ELF::ParseHeader(void) Index: src/sys/arch/epoc32/stand/e32boot/exe/version diff -u src/sys/arch/epoc32/stand/e32boot/exe/version:1.1 src/sys/arch/epoc32/stand/e32boot/exe/version:1.2 --- src/sys/arch/epoc32/stand/e32boot/exe/version:1.1 Sun Apr 28 12:11:26 2013 +++ src/sy
CVS commit: src/sys/arch/epoc32/include
Module Name:src Committed By: kiyohara Date: Thu Jun 20 13:38:03 UTC 2013 Modified Files: src/sys/arch/epoc32/include: bootinfo.h Log Message: Support boot argument for kernel. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/epoc32/include/bootinfo.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/arch/epoc32/include/bootinfo.h diff -u src/sys/arch/epoc32/include/bootinfo.h:1.1 src/sys/arch/epoc32/include/bootinfo.h:1.2 --- src/sys/arch/epoc32/include/bootinfo.h:1.1 Sun Apr 28 12:11:25 2013 +++ src/sys/arch/epoc32/include/bootinfo.h Thu Jun 20 13:38:03 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: bootinfo.h,v 1.1 2013/04/28 12:11:25 kiyohara Exp $ */ +/* $NetBSD: bootinfo.h,v 1.2 2013/06/20 13:38:03 kiyohara Exp $ */ /* * Copyright (c) 2012 KIYOHARA Takashi * All rights reserved. @@ -40,6 +40,7 @@ struct btinfo_common { #define BTINFO_MODEL 1 #define BTINFO_MEMORY 2 #define BTINFO_VIDEO 3 +#define BTINFO_BOOTARGS 4 #define BTINFO_MAX_SIZE 512 @@ -60,6 +61,11 @@ struct btinfo_video { int width; int height; }; + +struct btinfo_bootargs { + struct btinfo_common common; + char bootargs[256]; +}; #endif /* _LOCORE */ #endif /* _EPOC32_BOOTINFO_H_ */
CVS commit: src/sys/arch/epoc32/epoc32
Module Name:src Committed By: kiyohara Date: Thu Jun 20 13:40:09 UTC 2013 Modified Files: src/sys/arch/epoc32/epoc32: autoconf.c machdep.c Log Message: Support boothowto. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/epoc32/epoc32/autoconf.c \ src/sys/arch/epoc32/epoc32/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/epoc32/epoc32/autoconf.c diff -u src/sys/arch/epoc32/epoc32/autoconf.c:1.1 src/sys/arch/epoc32/epoc32/autoconf.c:1.2 --- src/sys/arch/epoc32/epoc32/autoconf.c:1.1 Sun Apr 28 12:11:26 2013 +++ src/sys/arch/epoc32/epoc32/autoconf.c Thu Jun 20 13:40:09 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.1 2013/04/28 12:11:26 kiyohara Exp $ */ +/* $NetBSD: autoconf.c,v 1.2 2013/06/20 13:40:09 kiyohara Exp $ */ /* * Copyright (c) 2013 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.1 2013/04/28 12:11:26 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.2 2013/06/20 13:40:09 kiyohara Exp $"); #include #include @@ -71,4 +71,8 @@ device_register(device_t dev, void *aux) prop_dictionary_set_uint32(dict, "height", epoc32_fb_height); prop_dictionary_set_uint32(dict, "addr", epoc32_fb_addr); } + + if (booted_device == NULL) + if (device_is_a(dev, "wd")) + booted_device = dev; } Index: src/sys/arch/epoc32/epoc32/machdep.c diff -u src/sys/arch/epoc32/epoc32/machdep.c:1.1 src/sys/arch/epoc32/epoc32/machdep.c:1.2 --- src/sys/arch/epoc32/epoc32/machdep.c:1.1 Sun Apr 28 12:11:26 2013 +++ src/sys/arch/epoc32/epoc32/machdep.c Thu Jun 20 13:40:09 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.1 2013/04/28 12:11:26 kiyohara Exp $ */ +/* $NetBSD: machdep.c,v 1.2 2013/06/20 13:40:09 kiyohara Exp $ */ /* * Copyright (c) 2012, 2013 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.1 2013/04/28 12:11:26 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.2 2013/06/20 13:40:09 kiyohara Exp $"); #include "clpscom.h" #include "clpslcd.h" @@ -84,6 +84,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v BootConfig bootconfig; /* Boot config storage */ +static char bootargs[256]; char *boot_args = NULL; vm_offset_t physical_start; @@ -170,6 +171,7 @@ initarm(void *arg) struct btinfo_model *model = NULL; struct btinfo_memory *memory = NULL; struct btinfo_video *video = NULL; + struct btinfo_bootargs *args = NULL; u_int l1pagetable, _end_physical; int loop, loop1, n, i; @@ -211,6 +213,20 @@ initarm(void *arg) epoc32_fb_width = video->width; epoc32_fb_height = video->height; break; + + case BTINFO_BOOTARGS: + args = (struct btinfo_bootargs *)btinfo; + btinfo = &(args + 1)->common; + memcpy(bootargs, args->bootargs, + min(sizeof(bootargs), sizeof(args->bootargs))); + bootargs[sizeof(bootargs) - 1] = '\0'; + boot_args = bootargs; + break; + + default: +#define NEXT_BOOTINFO(bi) (struct btinfo_common *)((char *)bi + (bi)->len) + + btinfo = NEXT_BOOTINFO(btinfo); } } if (bootconfig.dramblocks == 0) @@ -218,6 +234,9 @@ initarm(void *arg) consinit(); + if (boot_args != NULL) + parse_mi_bootargs(boot_args); + physical_start = bootconfig.dram[0].address; physical_freestart = bootconfig.dram[0].address; physical_freeend = KERNEL_TEXT_BASE;
CVS commit: src/sys/arch/epoc32/dev
Module Name:src Committed By: kiyohara Date: Thu Jun 20 13:42:02 UTC 2013 Modified Files: src/sys/arch/epoc32/dev: epockbdmap.h Log Message: Add DE and FR keymap. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/epoc32/dev/epockbdmap.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/arch/epoc32/dev/epockbdmap.h diff -u src/sys/arch/epoc32/dev/epockbdmap.h:1.1 src/sys/arch/epoc32/dev/epockbdmap.h:1.2 --- src/sys/arch/epoc32/dev/epockbdmap.h:1.1 Sun Apr 28 12:11:25 2013 +++ src/sys/arch/epoc32/dev/epockbdmap.h Thu Jun 20 13:42:02 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: epockbdmap.h,v 1.1 2013/04/28 12:11:25 kiyohara Exp $ */ +/* $NetBSD: epockbdmap.h,v 1.2 2013/06/20 13:42:02 kiyohara Exp $ */ /* * Copyright (c) 2013 KIYOHARA Takashi * All rights reserved. @@ -46,7 +46,7 @@ static const keysym_t epockbd_keysym_us[ KC(13), KS_8, KS_asterisk, KS_bracketright, KC(14), KS_7, KS_ampersand, KS_bracketleft, // KC(15), Play -KC(17), KS_y, KS_voidSymbol, KS_asterisk, +KC(17), KS_y, KS_Y, KS_asterisk, KC(18), KS_t, KC(19), KS_r, KC(20), KS_e, @@ -92,23 +92,92 @@ static const keysym_t epockbd_keysym_us[ static const keysym_t epockbd_keysym_uk[] = { /* pos normal shifted altgr */ -KC(3), KS_4, KS_dollar, KS_at, -KC(4), KS_3, KS_sterling, KS_backslash, -KC(5), KS_2, KS_quotedbl, KS_numbersign, +KC(3), KS_4, KS_dollar, KS_at, KS_Cmd_Screen3, +KC(4), KS_3, KS_sterling, KS_backslash, KS_Cmd_Screen2, +KC(5), KS_2, KS_quotedbl, KS_numbersign, KS_Cmd_Screen1, KC(9), KS_apostrophe, KS_asciitilde, KS_colon, KC(26), KS_l, KS_L, KS_semicolon, KC(42), KS_period, KS_question, KS_plus, KC(59), KS_comma, KS_slash, KS_Help, }; +static const keysym_t epockbd_keysym_de[] = { +/* pos normal shifted altgr shift+altgr */ +KC(1), KS_6, KS_ampersand, KS_greater, +KC(3), KS_4, KS_dollar, KS_asciitilde, KS_Cmd_Screen3, +KC(4), KS_3, KS_section, KS_backslash, KS_Cmd_Screen2, +KC(5), KS_2, KS_quotedbl, KS_slash, KS_Cmd_Screen1, +KC(9), KS_numbersign, KS_asterisk, KS_equal, +KC(11), KS_0, KS_apostrophe, KS_braceright, +KC(12), KS_9, KS_parenright, KS_braceleft, +KC(13), KS_8, KS_parenleft, KS_bracketright, +KC(14), KS_7, KS_question, KS_bracketleft, +KC(19), KS_r, KS_R, KS_masculine, +KC(20), KS_e, KS_E, KS_currency, +KC(21), KS_w, KS_W, KS_asciicircum, +KC(22), KS_q, KS_Q, KS_at, +KC(26), KS_l, KS_L, KS_minus, +KC(27), KS_p, KS_P, KS_ssharp, +KC(28), KS_o, KS_O, KS_diaeresis, +KC(29), KS_i, KS_I, KS_mu, +KC(30), KS_u, KS_U, KS_udiaeresis, +KC(31), KS_Menu, +KC(37), KS_a, KS_A, KS_adiaeresis, +KC(42), KS_comma, KS_semicolon, +KC(43), KS_m, +KC(44), KS_k, KS_K, KS_plus, +KC(45), KS_j, KS_J, KS_slash, +KC(47), KS_Mode_switch, KS_Multi_key, +KC(50), KS_b, KS_B, KS_dead_caron, +KC(51), KS_v, KS_V, KS_dead_breve, +KC(52), KS_c, KS_C, KS_acute, +KC(54), KS_y, KS_Y, KS_diaeresis, +KC(59), KS_period, KS_colon, +}; + +static const keysym_t epockbd_keysym_fr[] = { +/* pos normal shifted altgr shift+altgr */ +KC(1), KS_6, KS_dollar, KS_parenright, +KC(2), KS_5, KS_degree, KS_parenleft, +KC(3), KS_4, KS_dead_tilde, KS_apostrophe, KS_Cmd_Screen3, +KC(4), KS_3, KS_numbersign, KS_quotedbl, KS_Cmd_Screen2, +KC(5), KS_2, KS_percent, KS_eacute, KS_Cmd_Screen1, +KC(6), KS_1, KS_exclam, KS_ampersand, KS_Cmd_Screen0, +KC(9), KS_m, KS_M, KS_minus, +KC(11), KS_0, KS_at, KS_agrave, +KC(12), KS_9, KS_dead_circumflex, KS_ccedilla, +KC(13), KS_8, KS_backslash, KS_underscore, +KC(14), KS_7, KS_sterling, KS_eacute, +KC(17), KS_y, KS_Y, KS_braceright, +KC(18), KS_t, KS_T, KS_braceleft, +KC(19), KS_r, KS_R, KS_bracketright, +KC(20), KS_e, KS_E, KS_bracketleft, +KC(21), KS_z, KS_Z, KS_greater, +KC(22), KS_a, KS_A, KS_less, +KC(26), KS_l, KS_L, KS_plus, +KC(28), KS_o, +KC(29), KS_i, KS_I, KS_bar, +KC(30), KS_u, KS_U, KS_ugrave, +KC(37), KS_q, +KC(42), KS_period, KS_semicolon, KS_slash, +KC(43), KS_question, KS_comma, +KC(44), KS_k, KS_K, KS_KP_Divide, +KC(50), KS_b, KS_B, KS_dead_circumflex, +KC(51), KS_v, KS_V, KS_dead_tilde, +KC(52), KS_c, KS_C, KS_apostrophe, +KC(53), KS_x, KS_X, KS_grave, +KC(54), KS_w, KS_W, KS_dead_diaeresis, +KC(59), KS_colon, KS_mu, +}; + #define KBD_MAP(name, base, map) \ { name, base, sizeof(map)/sizeof(keysym_t), map } struct wscons_keydesc epockbd_keydesctab[] = { KBD_MAP(KB_UK, KB_US, epockbd_keysym_uk), KBD_MAP(KB_US, 0, epockbd_keysym_us)
CVS commit: src/sys
Module Name:src Committed By: roy Date: Thu Jun 20 13:56:29 UTC 2013 Modified Files: src/sys/dev/mii: mii_physubr.c src/sys/net: if.c src/sys/netinet6: in6.c in6.h nd6_rtr.c Log Message: Move the detaching and making tentative addresses out if in6_if_up and into in6_if_link_up. This fixes a possible panic where link is up but not the interface. Note that a better solution would be to listen to the routing socket in the kernel, but I don't know how to do that. Reachable Router tests for IFF_UP as well. To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/sys/dev/mii/mii_physubr.c cvs rdiff -u -r1.263 -r1.264 src/sys/net/if.c cvs rdiff -u -r1.164 -r1.165 src/sys/netinet6/in6.c cvs rdiff -u -r1.72 -r1.73 src/sys/netinet6/in6.h cvs rdiff -u -r1.88 -r1.89 src/sys/netinet6/nd6_rtr.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/mii/mii_physubr.c diff -u src/sys/dev/mii/mii_physubr.c:1.79 src/sys/dev/mii/mii_physubr.c:1.80 --- src/sys/dev/mii/mii_physubr.c:1.79 Sun Jun 16 06:29:08 2013 +++ src/sys/dev/mii/mii_physubr.c Thu Jun 20 13:56:29 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: mii_physubr.c,v 1.79 2013/06/16 06:29:08 msaitoh Exp $ */ +/* $NetBSD: mii_physubr.c,v 1.80 2013/06/20 13:56:29 roy Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.79 2013/06/16 06:29:08 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.80 2013/06/20 13:56:29 roy Exp $"); #include #include @@ -436,9 +436,7 @@ mii_phy_statusmsg(struct mii_softc *sc) { struct mii_data *mii = sc->mii_pdata; struct ifnet *ifp = mii->mii_ifp; - int s; - s = splnet(); if (mii->mii_media_status & IFM_AVALID) { if (mii->mii_media_status & IFM_ACTIVE) if_link_state_change(ifp, LINK_STATE_UP); @@ -446,7 +444,6 @@ mii_phy_statusmsg(struct mii_softc *sc) if_link_state_change(ifp, LINK_STATE_DOWN); } else if_link_state_change(ifp, LINK_STATE_UNKNOWN); - splx(s); ifp->if_baudrate = ifmedia_baudrate(mii->mii_media_active); } Index: src/sys/net/if.c diff -u src/sys/net/if.c:1.263 src/sys/net/if.c:1.264 --- src/sys/net/if.c:1.263 Tue Jun 11 12:08:29 2013 +++ src/sys/net/if.c Thu Jun 20 13:56:29 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: if.c,v 1.263 2013/06/11 12:08:29 roy Exp $ */ +/* $NetBSD: if.c,v 1.264 2013/06/20 13:56:29 roy Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc. @@ -90,7 +90,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.263 2013/06/11 12:08:29 roy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.264 2013/06/20 13:56:29 roy Exp $"); #include "opt_inet.h" @@ -1333,14 +1333,19 @@ link_rtrequest(int cmd, struct rtentry * /* * Handle a change in the interface link state. + * XXX: We should listen to the routing socket in-kernel rather + * than calling in6_if_link_* functions directly from here. */ void if_link_state_change(struct ifnet *ifp, int link_state) { - int old_link_state; + int old_link_state, s; - if (ifp->if_link_state == link_state) + s = splnet(); + if (ifp->if_link_state == link_state) { + splx(s); return; + } old_link_state = ifp->if_link_state; ifp->if_link_state = link_state; @@ -1349,7 +1354,7 @@ if_link_state_change(struct ifnet *ifp, link_state == LINK_STATE_UP ? "UP" : link_state == LINK_STATE_DOWN ? "DOWN" : "UNKNOWN", - old_link_state == LINK_STATE_UP ? "UP" : + old_link_state == LINK_STATE_UP ? "UP" : old_link_state == LINK_STATE_DOWN ? "DOWN" : "UNKNOWN"); #endif @@ -1366,7 +1371,7 @@ if_link_state_change(struct ifnet *ifp, */ if (link_state == LINK_STATE_UP && old_link_state == LINK_STATE_UNKNOWN) - in6_if_down(ifp); + in6_if_link_down(ifp); #endif /* Notify that the link state has changed. */ @@ -1379,10 +1384,12 @@ if_link_state_change(struct ifnet *ifp, #ifdef INET6 if (link_state == LINK_STATE_DOWN) - in6_if_down(ifp); + in6_if_link_down(ifp); else if (link_state == LINK_STATE_UP) - in6_if_up(ifp); + in6_if_link_up(ifp); #endif + + splx(s); } /* Index: src/sys/netinet6/in6.c diff -u src/sys/netinet6/in6.c:1.164 src/sys/netinet6/in6.c:1.165 --- src/sys/netinet6/in6.c:1.164 Tue Jun 11 12:08:29 2013 +++ src/sys/netinet6/in6.c Thu Jun 20 13:56:29 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: in6.c,v 1.164 2013/06/11 12:08:29 roy Exp $ */ +/* $NetBSD: in6.c,v 1.165 2013/06/20 13:56:29 roy Exp $ */ /* $KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.164 2013/06/11 12:08:29 roy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.165 2013/06/20 13:56:29 roy Exp $"); #include "opt_inet.h" #include "opt_pfil_hooks.h" @@ -2165,7 +2165,7 @@ in6_ifawithifp(struct ifnet *ifp, struct * perform DAD when interface becomes IFF_U
CVS commit: src/external/bsd/dhcp/dist/client
Module Name:src Committed By: christos Date: Thu Jun 20 15:14:03 UTC 2013 Modified Files: src/external/bsd/dhcp/dist/client: dhclient.c Log Message: file descriptor neatness. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/bsd/dhcp/dist/client/dhclient.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcp/dist/client/dhclient.c diff -u src/external/bsd/dhcp/dist/client/dhclient.c:1.6 src/external/bsd/dhcp/dist/client/dhclient.c:1.7 --- src/external/bsd/dhcp/dist/client/dhclient.c:1.6 Thu Jun 20 08:24:08 2013 +++ src/external/bsd/dhcp/dist/client/dhclient.c Thu Jun 20 11:14:03 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: dhclient.c,v 1.6 2013/06/20 12:24:08 christos Exp $ */ +/* $NetBSD: dhclient.c,v 1.7 2013/06/20 15:14:03 christos Exp $ */ /* dhclient.c @@ -33,7 +33,7 @@ */ #include -__RCSID("$NetBSD: dhclient.c,v 1.6 2013/06/20 12:24:08 christos Exp $"); +__RCSID("$NetBSD: dhclient.c,v 1.7 2013/06/20 15:14:03 christos Exp $"); #include "dhcpd.h" #include @@ -894,7 +894,7 @@ int find_subnet (struct subnet **sp, */ #include -__RCSID("$NetBSD: dhclient.c,v 1.6 2013/06/20 12:24:08 christos Exp $"); +__RCSID("$NetBSD: dhclient.c,v 1.7 2013/06/20 15:14:03 christos Exp $"); void state_reboot (cpp) void *cpp; @@ -3532,9 +3532,11 @@ void go_daemon (void) log_fatal ("Can't fork daemon: %m"); else if (pid) { char c; + close(pfd[0]); read(pfd[1], &c, 1); exit (0); - } + } else + close(pfd[1]); } void write_client_pid_file ()
CVS commit: src/sys/arch/epoc32/stand/e32boot/exe
Module Name:src Committed By: kiyohara Date: Thu Jun 20 15:30:00 UTC 2013 Modified Files: src/sys/arch/epoc32/stand/e32boot/exe: e32boot.cpp Log Message: Fix fault when 0 byte copy. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/epoc32/stand/e32boot/exe/e32boot.cpp 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/epoc32/stand/e32boot/exe/e32boot.cpp diff -u src/sys/arch/epoc32/stand/e32boot/exe/e32boot.cpp:1.2 src/sys/arch/epoc32/stand/e32boot/exe/e32boot.cpp:1.3 --- src/sys/arch/epoc32/stand/e32boot/exe/e32boot.cpp:1.2 Thu Jun 20 13:36:48 2013 +++ src/sys/arch/epoc32/stand/e32boot/exe/e32boot.cpp Thu Jun 20 15:30:00 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: e32boot.cpp,v 1.2 2013/06/20 13:36:48 kiyohara Exp $ */ +/* $NetBSD: e32boot.cpp,v 1.3 2013/06/20 15:30:00 kiyohara Exp $ */ /* * Copyright (c) 2012, 2013 KIYOHARA Takashi * All rights reserved. @@ -173,7 +173,9 @@ E32BootL(void) int n, m; n = sizeof(bootargs->bootargs); m = (*netbsd->GetArgs()).Length(); - Mem::Copy(bootargs->bootargs, &(*netbsd->GetArgs())[0], n < m ? n : m); + if (m > 0) + Mem::Copy(bootargs->bootargs, &(*netbsd->GetArgs())[0], + n < m ? n : m); bootargs->bootargs[n < m ? n - 1 : m] = '\0'; netbsd->ParseHeader();
CVS commit: src/crypto/dist/ipsec-tools
Module Name:src Committed By: christos Date: Thu Jun 20 15:41:18 UTC 2013 Modified Files: src/crypto/dist/ipsec-tools: configure.ac src/crypto/dist/ipsec-tools/src/racoon: localconf.c racoon.conf.5 Log Message: Add an option --enable-wildcard-match to enable wildcard matching and explain why we might want it and why it is a bad idea in general that's why it is not enabled by default. ok tteras@, manu@ To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/crypto/dist/ipsec-tools/configure.ac cvs rdiff -u -r1.8 -r1.9 src/crypto/dist/ipsec-tools/src/racoon/localconf.c cvs rdiff -u -r1.66 -r1.67 \ src/crypto/dist/ipsec-tools/src/racoon/racoon.conf.5 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/configure.ac diff -u src/crypto/dist/ipsec-tools/configure.ac:1.13 src/crypto/dist/ipsec-tools/configure.ac:1.14 --- src/crypto/dist/ipsec-tools/configure.ac:1.13 Tue Jan 8 07:42:31 2013 +++ src/crypto/dist/ipsec-tools/configure.ac Thu Jun 20 11:41:18 2013 @@ -105,6 +105,14 @@ case "$host_os" in ;; esac +AH_TEMPLATE(ENABLE_WILDCARD_MATCH, [Enable wildcard matching in pre-shared-key file]) +AC_ARG_ENABLE([wildcard-match], +[--enable-wildcard-match Enable wildcard matching in pre-shared-key file], +[case "${enableval}" in +(yes) AC_DEFINE(ENABLE_WILDCARD_MATCH);; +(no) ;; +(*) AC_MSG_ERROR(bad value ${enableval} for --enable-wildcard-match);; +esac],[]) ### Some basic toolchain checks # Checks for header files. Index: src/crypto/dist/ipsec-tools/src/racoon/localconf.c diff -u src/crypto/dist/ipsec-tools/src/racoon/localconf.c:1.8 src/crypto/dist/ipsec-tools/src/racoon/localconf.c:1.9 --- src/crypto/dist/ipsec-tools/src/racoon/localconf.c:1.8 Sun Jan 1 10:29:28 2012 +++ src/crypto/dist/ipsec-tools/src/racoon/localconf.c Thu Jun 20 11:41:18 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: localconf.c,v 1.8 2012/01/01 15:29:28 tteras Exp $ */ +/* $NetBSD: localconf.c,v 1.9 2013/06/20 15:41:18 christos Exp $ */ /* $KAME: localconf.c,v 1.33 2001/08/09 07:32:19 sakane Exp $ */ @@ -247,7 +247,11 @@ getpsk(str, len) if (*p == '\0') continue; /* no 2nd parameter */ p--; - if (strncmp(buf, str, len) == 0 && buf[len] == '\0') { + if ( +#ifdef ENABLE_WILDCARD_MATCH + strncmp(buf, "*", 2) == 0 || +#endif + (strncmp(buf, str, len) == 0 && buf[len] == '\0')) { p++; keylen = 0; for (q = p; *q != '\0' && *q != '\n'; q++) Index: src/crypto/dist/ipsec-tools/src/racoon/racoon.conf.5 diff -u src/crypto/dist/ipsec-tools/src/racoon/racoon.conf.5:1.66 src/crypto/dist/ipsec-tools/src/racoon/racoon.conf.5:1.67 --- src/crypto/dist/ipsec-tools/src/racoon/racoon.conf.5:1.66 Fri Nov 30 03:19:01 2012 +++ src/crypto/dist/ipsec-tools/src/racoon/racoon.conf.5 Thu Jun 20 11:41:18 2013 @@ -1,4 +1,4 @@ -.\" $NetBSD: racoon.conf.5,v 1.66 2012/11/30 08:19:01 wiz Exp $ +.\" $NetBSD: racoon.conf.5,v 1.67 2013/06/20 15:41:18 christos Exp $ .\" .\" Id: racoon.conf.5,v 1.54 2006/08/22 18:17:17 manubsd Exp .\" @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd November 29, 2012 +.Dd June 17, 2013 .Dt RACOON.CONF 5 .Os .\" @@ -1468,6 +1468,32 @@ Note that the file must be owned by the .Xr racoon 8 .Pq usually the privileged user , and must not be accessible by others. +.Pp +If configured with +.Dv ENABLE_WILDCARD_MATCH , +this implementation allows a wildcard key +.Dq * . +This is allowed for the special case of a single user connecting to +a gateway using an iPhone. +On an iPhone, L2TP over IPSEC only supports +main mode with pre-shared keys (no certificates). +Unfortunately racoon +only supports pre-shared-key lookup by address when identity protection +is used, and since the iPhone does not have a specific IP address, we +don't know what key to put in the pre-shared key file. +.Pp +Sharing the connection with more than one user is strongly discouraged +because any user can pretend to be the server since they know the pre-shared +key. +This means that any user can steal the traffic of any other user, by +spoofing DNS which is not trivial but easy. +Even worse, the malicious user will be able to then steal any other +authentication data (CHAP/XAUTH etc.) that another user will supply +to the compromised server, because it assumes that phase 1 is secured +by the pre-shared key. +.Pp +In summary, never use wildcard keys if your gateway is hosting more than +one user. .\" .Sh EXAMPLES The following shows how the remote directive should be configured.
CVS commit: src/usr.sbin/racoon
Module Name:src Committed By: christos Date: Thu Jun 20 15:42:58 UTC 2013 Modified Files: src/usr.sbin/racoon: Makefile Log Message: Enable wildcard matching in psk files. We are big kids and if we put a * in the psk file, we mean it. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/usr.sbin/racoon/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/racoon/Makefile diff -u src/usr.sbin/racoon/Makefile:1.25 src/usr.sbin/racoon/Makefile:1.26 --- src/usr.sbin/racoon/Makefile:1.25 Sat Jul 14 00:03:44 2012 +++ src/usr.sbin/racoon/Makefile Thu Jun 20 11:42:58 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.25 2012/07/14 04:03:44 christos Exp $ +# $NetBSD: Makefile,v 1.26 2013/06/20 15:42:58 christos Exp $ WARNS?= 0 # XXX third-party program, many issues NOCLANGERROR= # defined @@ -27,7 +27,7 @@ DIST= ${NETBSDSRCDIR}/crypto/dist/ipsec- CPPFLAGS+= -I${DIST}/src/racoon -I${DIST}/src/racoon/missing CPPFLAGS+= -I${DIST}/src/libipsec CPPFLAGS+= -I${NETBSDSRCDIR}/lib/libipsec -I. -CPPFLAGS+= -DIPSEC_DEBUG -DHAVE_CONFIG_H +CPPFLAGS+= -DIPSEC_DEBUG -DHAVE_CONFIG_H -DENABLE_WILDCARD_MATCH CPPFLAGS+= -DADMINPORTDIR=\"/var/run\" CPPFLAGS+= -DSYSCONFDIR=\"/etc/racoon\"
CVS commit: src/lib/libc/arch/arm/gen
Module Name:src Committed By: msaitoh Date: Thu Jun 20 17:53:01 UTC 2013 Modified Files: src/lib/libc/arch/arm/gen: Makefile.inc Log Message: Fix compile error. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/lib/libc/arch/arm/gen/Makefile.inc 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/arch/arm/gen/Makefile.inc diff -u src/lib/libc/arch/arm/gen/Makefile.inc:1.23 src/lib/libc/arch/arm/gen/Makefile.inc:1.24 --- src/lib/libc/arch/arm/gen/Makefile.inc:1.23 Thu Jun 20 07:18:40 2013 +++ src/lib/libc/arch/arm/gen/Makefile.inc Thu Jun 20 17:53:01 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.23 2013/06/20 07:18:40 matt Exp $ +# $NetBSD: Makefile.inc,v 1.24 2013/06/20 17:53:01 msaitoh Exp $ SRCS+= alloca.S byte_swap_2.S byte_swap_4.S bswap64.c divide.S divsi3.S \ fabs.c flt_rounds.c udivsi3.S @@ -15,7 +15,7 @@ SRCS+= signbitf_ieee754.c signbitd_ieee7 SRCS+= __aeabi_fcmpun.c __aeabi_dcmpun.c SRCS+= __aeabi_idiv0.c __aeabi_ldiv0.c .else -SRCS+= modsi3.s umodsi3.S +SRCS+= modsi3.S umodsi3.S .endif SRCS+= nanf.c
CVS commit: src/dist/dhcp
Module Name:src Committed By: christos Date: Thu Jun 20 18:39:16 UTC 2013 Removed Files: src/dist/dhcp: ANONCVS CHANGES COPYRIGHT LICENSE Makefile Makefile.conf Makefile.dist README RELNOTES configure site.conf src/dist/dhcp/client: Makefile.dist clparse.c dhclient-script.8 dhclient.8 dhclient.c dhclient.conf dhclient.conf.5 dhclient.leases.5 src/dist/dhcp/client/scripts: bsdos freebsd linux netbsd nextstep openbsd solaris src/dist/dhcp/common: Makefile.dist alloc.c bpf.c comapi.c conflex.c ctrace.c dhcp-eval.5 dhcp-options.5 discover.c dispatch.c dlpi.c dns.c ethernet.c execute.c fddi.c icmp.c inet.c lpf.c memory.c nit.c options.c packet.c parse.c print.c raw.c resolv.c socket.c tables.c tr.c tree.c upf.c src/dist/dhcp/contrib: 3.0b1-lease-convert dhcp.spec sethostname.sh solaris.init src/dist/dhcp/contrib/ms2isc: Registry.pm ms2isc.pl readme.txt src/dist/dhcp/dhcpctl: Makefile.dist callback.c cltest.c dhcpctl.3 dhcpctl.c dhcpctl.h omshell.1 omshell.c remote.c src/dist/dhcp/doc: IANA-arp-parameters api+protocol draft-ietf-dhc-authentication-14.txt draft-ietf-dhc-dhcp-dns-12.txt draft-ietf-dhc-failover-07.txt rfc1542.txt rfc2131.txt rfc2132.txt rfc2485.txt rfc2489.txt rfc951.txt src/dist/dhcp/doc/ja_JP.eucJP: dhclient-script.8 dhclient.8 dhclient.conf.5 dhclient.leases.5 dhcp-eval.5 dhcp-options.5 src/dist/dhcp/dst: Makefile.dist base64.c dst_api.c dst_internal.h dst_support.c hmac_link.c md5.h md5_dgst.c md5_locl.h prandom.c src/dist/dhcp/includes: cdefs.h ctrace.h dhcp.h dhcpd.h dhctoken.h failover.h inet.h osdep.h site.h statement.h tree.h version.h src/dist/dhcp/includes/arpa: nameser.h nameser_compat.h src/dist/dhcp/includes/cf: aix.h alphaosf.h bsdos.h cygwin32.h freebsd.h hpux.h irix.h linux.h netbsd.h nextstep.h openbsd.h qnx.h rhapsody.h sample.h sco.h sunos4.h sunos5-5.h ultrix.h src/dist/dhcp/includes/isc-dhcp: boolean.h dst.h int.h lang.h list.h result.h types.h src/dist/dhcp/includes/minires: minires.h res_update.h resolv.h src/dist/dhcp/includes/netinet: if_ether.h ip.h ip_icmp.h udp.h src/dist/dhcp/includes/omapip: alloc.h buffer.h convert.h hash.h omapip.h omapip_p.h trace.h trace_mr.h src/dist/dhcp/minires: Makefile.dist ns_date.c ns_name.c ns_parse.c ns_samedomain.c ns_sign.c ns_verify.c res_comp.c res_findzonecut.c res_init.c res_mkquery.c res_mkupdate.c res_query.c res_send.c res_sendsigned.c res_update.c src/dist/dhcp/omapip: Makefile.dist alloc.c array.c auth.c buffer.c connection.c convert.c dispatch.c errwarn.c generic.c handle.c hash.c inet_addr.c iscprint.c listener.c message.c mrtrace.c omapi.3 protocol.c result.c support.c test.c toisc.c trace.c src/dist/dhcp/relay: Makefile.dist dhcrelay.8 dhcrelay.c src/dist/dhcp/server: Makefile.dist bootp.c class.c confpars.c db.c ddns.c dhcp.c dhcpd.8 dhcpd.c dhcpd.conf dhcpd.conf.5 dhcpd.leases.5 failover.c mdb.c omapi.c salloc.c stables.c src/dist/dhcp/tests/failover: dhcp-1.cf dhcp-2.cf new-failover Log Message: buy ancient code To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r0 src/dist/dhcp/ANONCVS src/dist/dhcp/CHANGES \ src/dist/dhcp/LICENSE src/dist/dhcp/site.conf cvs rdiff -u -r1.2 -r0 src/dist/dhcp/COPYRIGHT cvs rdiff -u -r1.3 -r0 src/dist/dhcp/Makefile src/dist/dhcp/Makefile.dist \ src/dist/dhcp/configure cvs rdiff -u -r1.4 -r0 src/dist/dhcp/Makefile.conf src/dist/dhcp/README \ src/dist/dhcp/RELNOTES cvs rdiff -u -r1.3 -r0 src/dist/dhcp/client/Makefile.dist cvs rdiff -u -r1.10 -r0 src/dist/dhcp/client/clparse.c cvs rdiff -u -r1.5 -r0 src/dist/dhcp/client/dhclient-script.8 cvs rdiff -u -r1.9 -r0 src/dist/dhcp/client/dhclient.8 \ src/dist/dhcp/client/dhclient.conf.5 cvs rdiff -u -r1.22 -r0 src/dist/dhcp/client/dhclient.c cvs rdiff -u -r1.1.1.1 -r0 src/dist/dhcp/client/dhclient.conf cvs rdiff -u -r1.6 -r0 src/dist/dhcp/client/dhclient.leases.5 cvs rdiff -u -r1.1.1.1 -r0 src/dist/dhcp/client/scripts/bsdos \ src/dist/dhcp/client/scripts/netbsd src/dist/dhcp/client/scripts/nextstep \ src/dist/dhcp/client/scripts/openbsd src/dist/dhcp/client/scripts/solaris cvs rdiff -u -r1.4 -r0 src/dist/dhcp/client/scripts/freebsd cvs rdiff -u -r1.3 -r0 src/dist/dhcp/client/scripts/linux cvs rdiff -u -r1.3 -r0 src/dist/dhcp/common/Makefile.dist \ src/dist/dhcp/common/ctrace.c src/dist/dhcp/common/dispatch.c \ src/dist/dhcp/common/dlpi.c src/dist/dhcp/common/ethernet.c \ src/dist/dhcp/common/lpf.c src/dist/dhcp/common/nit.c \ src/dist/dhcp/common/tr.c src/dist/dhcp/common/upf.c cv
CVS commit: src/usr.sbin/dhcp
Module Name:src Committed By: christos Date: Thu Jun 20 18:41:27 UTC 2013 Removed Files: src/usr.sbin/dhcp: Makefile Makefile.inc src/usr.sbin/dhcp/client: Makefile src/usr.sbin/dhcp/clientscript: Makefile dhclient-script src/usr.sbin/dhcp/common: Makefile src/usr.sbin/dhcp/dhcpctl: Makefile src/usr.sbin/dhcp/dst: Makefile src/usr.sbin/dhcp/minires: Makefile src/usr.sbin/dhcp/omapip: Makefile src/usr.sbin/dhcp/omshell: Makefile src/usr.sbin/dhcp/relay: Makefile src/usr.sbin/dhcp/server: Makefile src/usr.sbin/dhcp/share: Makefile src/usr.sbin/dhcp/share/dhcpd: Makefile pxe.defs Log Message: bye build glue To generate a diff of this commit: cvs rdiff -u -r1.13 -r0 src/usr.sbin/dhcp/Makefile cvs rdiff -u -r1.27 -r0 src/usr.sbin/dhcp/Makefile.inc cvs rdiff -u -r1.15 -r0 src/usr.sbin/dhcp/client/Makefile cvs rdiff -u -r1.4 -r0 src/usr.sbin/dhcp/clientscript/Makefile cvs rdiff -u -r1.13 -r0 src/usr.sbin/dhcp/clientscript/dhclient-script cvs rdiff -u -r1.27 -r0 src/usr.sbin/dhcp/common/Makefile cvs rdiff -u -r1.6 -r0 src/usr.sbin/dhcp/dhcpctl/Makefile cvs rdiff -u -r1.8 -r0 src/usr.sbin/dhcp/dst/Makefile cvs rdiff -u -r1.9 -r0 src/usr.sbin/dhcp/minires/Makefile cvs rdiff -u -r1.9 -r0 src/usr.sbin/dhcp/omapip/Makefile cvs rdiff -u -r1.4 -r0 src/usr.sbin/dhcp/omshell/Makefile cvs rdiff -u -r1.3 -r0 src/usr.sbin/dhcp/relay/Makefile cvs rdiff -u -r1.18 -r0 src/usr.sbin/dhcp/server/Makefile cvs rdiff -u -r1.1 -r0 src/usr.sbin/dhcp/share/Makefile cvs rdiff -u -r1.2 -r0 src/usr.sbin/dhcp/share/dhcpd/Makefile \ src/usr.sbin/dhcp/share/dhcpd/pxe.defs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libm
Module Name:src Committed By: christos Date: Thu Jun 20 19:49:47 UTC 2013 Modified Files: src/lib/libm: Makefile Log Message: Add missing .go and fix lint rule. To generate a diff of this commit: cvs rdiff -u -r1.138 -r1.139 src/lib/libm/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libm/Makefile diff -u src/lib/libm/Makefile:1.138 src/lib/libm/Makefile:1.139 --- src/lib/libm/Makefile:1.138 Fri May 24 08:45:40 2013 +++ src/lib/libm/Makefile Thu Jun 20 15:49:47 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.138 2013/05/24 12:45:40 martin Exp $ +# $NetBSD: Makefile,v 1.139 2013/06/20 19:49:47 christos Exp $ # # @(#)Makefile 5.1beta 93/09/24 # @@ -57,7 +57,7 @@ COMMON_SRCS+= fenv.c ARCH_SRCS = e_sqrt.S e_sqrtf.S lrint.S lrintf.S s_fabsf.S s_fma.S s_fmaf.S .else .for i in e_sqrt.o e_sqrtf.o lrint.o lrintf.o s_fabsf.o s_fma.o s_fmaf.o -${i} ${i:.o=.po} ${i:.o=.pico} ${i.o=.ln}: ${i:.o=.c} +${i} ${i:.o=.po} ${i:.o=.pico} ${i:.o=.go} ${i:.o=.ln}: ${i:.o=.c} .endfor .endif .elif (${MACHINE_ARCH} == "sparc")
CVS commit: src/lib/libutil
Module Name:src Committed By: christos Date: Thu Jun 20 20:42:30 UTC 2013 Modified Files: src/lib/libutil: Makefile login_cap.3 Log Message: document login_getpwclass(3) To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.75 src/lib/libutil/Makefile cvs rdiff -u -r1.18 -r1.19 src/lib/libutil/login_cap.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libutil/Makefile diff -u src/lib/libutil/Makefile:1.74 src/lib/libutil/Makefile:1.75 --- src/lib/libutil/Makefile:1.74 Thu May 2 03:17:09 2013 +++ src/lib/libutil/Makefile Thu Jun 20 16:42:30 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.74 2013/05/02 07:17:09 matt Exp $ +# $NetBSD: Makefile,v 1.75 2013/06/20 20:42:30 christos Exp $ # @(#)Makefile 8.1 (Berkeley) 6/4/93 USE_SHLIBDIR= yes @@ -51,6 +51,7 @@ MLINKS+=login_cap.3 login_getcapnum.3 MLINKS+=login_cap.3 login_getcapsize.3 MLINKS+=login_cap.3 login_getcapstr.3 MLINKS+=login_cap.3 login_getcaptime.3 +MLINKS+=login_cap.3 login_getpwclass.3 MLINKS+=login_cap.3 login_close.3 MLINKS+=login_cap.3 setclasscontext.3 MLINKS+=login_cap.3 setusercontext.3 Index: src/lib/libutil/login_cap.3 diff -u src/lib/libutil/login_cap.3:1.18 src/lib/libutil/login_cap.3:1.19 --- src/lib/libutil/login_cap.3:1.18 Wed May 5 18:05:31 2010 +++ src/lib/libutil/login_cap.3 Thu Jun 20 16:42:30 2013 @@ -1,4 +1,4 @@ -.\" $NetBSD: login_cap.3,v 1.18 2010/05/05 22:05:31 wiz Exp $ +.\" $NetBSD: login_cap.3,v 1.19 2013/06/20 20:42:30 christos Exp $ .\" .\" Copyright (c) 1996,1997 Berkeley Software Design, Inc. All rights reserved. .\" @@ -32,7 +32,7 @@ .\" .\" BSDI login_cap.3,v 1.4 1997/11/07 16:22:27 jch Exp .\" -.Dd October 6, 2007 +.Dd June 20, 2013 .Dt LOGIN_CAP 3 .Os .Sh NAME @@ -42,6 +42,7 @@ .Nm login_getcapsize , .Nm login_getcapstr , .Nm login_getcaptime , +.Nm login_getpwclass , .Nm login_close , .Nm setclasscontext , .Nm setusercontext @@ -63,6 +64,8 @@ .Fn login_getcapstr "login_cap_t *lc" "const char *cap" "char *def" "char *err" .Ft quad_t .Fn login_getcaptime "login_cap_t *lc" "const char *cap" "quad_t def" "quad_t err" +.Ft login_cap_t * +.Fn login_getpwclass "struct passwd *pwd" .Ft void .Fn login_close "login_cap_t *lc" .Ft int @@ -96,6 +99,14 @@ structure is no longer needed, it should .Fn login_close function. .Pp +The +.Fn login_getpwclass +function is equivalent to: +login_getclass( +.Fa pwd +? pwd->pw_class : +.Dv NULL ). +.Pp Once .Ar lc has been returned by
CVS commit: src/distrib/sets/lists/comp
Module Name:src Committed By: christos Date: Thu Jun 20 20:43:33 UTC 2013 Modified Files: src/distrib/sets/lists/comp: mi Log Message: add login_getpwclass To generate a diff of this commit: cvs rdiff -u -r1.1824 -r1.1825 src/distrib/sets/lists/comp/mi 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/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1824 src/distrib/sets/lists/comp/mi:1.1825 --- src/distrib/sets/lists/comp/mi:1.1824 Mon Jun 17 08:35:02 2013 +++ src/distrib/sets/lists/comp/mi Thu Jun 20 16:43:33 2013 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1824 2013/06/17 12:35:02 tsutsui Exp $ +# $NetBSD: mi,v 1.1825 2013/06/20 20:43:33 christos Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -6956,6 +6956,7 @@ ./usr/share/man/cat3/login_getcapstr.0 comp-c-catman .cat ./usr/share/man/cat3/login_getcaptime.0 comp-c-catman .cat ./usr/share/man/cat3/login_getclass.0 comp-c-catman .cat +./usr/share/man/cat3/login_getpwclass.0 comp-c-catman .cat ./usr/share/man/cat3/login_tty.0 comp-c-catman .cat ./usr/share/man/cat3/loginx.0 comp-c-catman .cat ./usr/share/man/cat3/logout.0 comp-c-catman .cat @@ -13458,6 +13459,7 @@ ./usr/share/man/html3/login_getcapstr.html comp-c-htmlman html ./usr/share/man/html3/login_getcaptime.html comp-c-htmlman html ./usr/share/man/html3/login_getclass.html comp-c-htmlman html +./usr/share/man/html3/login_getpwclass.html comp-c-htmlman html ./usr/share/man/html3/login_tty.html comp-c-htmlman html ./usr/share/man/html3/loginx.html comp-c-htmlman html ./usr/share/man/html3/logout.html comp-c-htmlman html @@ -19944,6 +19946,7 @@ ./usr/share/man/man3/login_getcapstr.3 comp-c-man .man ./usr/share/man/man3/login_getcaptime.3 comp-c-man .man ./usr/share/man/man3/login_getclass.3 comp-c-man .man +./usr/share/man/man3/login_getpwclass.3 comp-c-man .man ./usr/share/man/man3/login_tty.3 comp-c-man .man ./usr/share/man/man3/loginx.3 comp-c-man .man ./usr/share/man/man3/logout.3 comp-c-man .man
CVS commit: src/usr.bin/su
Module Name:src Committed By: christos Date: Thu Jun 20 20:54:02 UTC 2013 Modified Files: src/usr.bin/su: su_pam.c Log Message: - don't re-use the va list twice, leads to coredumps. - introduce and use a "safe" version of pam_strerror(3) that does not return NULL To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/usr.bin/su/su_pam.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/su/su_pam.c diff -u src/usr.bin/su/su_pam.c:1.17 src/usr.bin/su/su_pam.c:1.18 --- src/usr.bin/su/su_pam.c:1.17 Wed Mar 14 22:02:23 2012 +++ src/usr.bin/su/su_pam.c Thu Jun 20 16:54:02 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: su_pam.c,v 1.17 2012/03/15 02:02:23 joerg Exp $ */ +/* $NetBSD: su_pam.c,v 1.18 2013/06/20 20:54:02 christos Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988\ #if 0 static char sccsid[] = "@(#)su.c 8.3 (Berkeley) 4/2/94";*/ #else -__RCSID("$NetBSD: su_pam.c,v 1.17 2012/03/15 02:02:23 joerg Exp $"); +__RCSID("$NetBSD: su_pam.c,v 1.18 2013/06/20 20:54:02 christos Exp $"); #endif #endif /* not lint */ @@ -83,6 +83,18 @@ static const struct pam_conv pamc = { &o static void logit(const char *, ...) __printflike(1, 2); +static const char * +safe_pam_strerror(pam_handle_t *pamh, int pam_err) { + const char *msg; + + if ((msg = pam_strerror(pamh, pam_err)) != NULL) + return msg; + + static char buf[1024]; + snprintf(buf, sizeof(buf), "Unknown pam error %d", pam_err); + return buf; +} + int main(int argc, char **argv) { @@ -215,7 +227,7 @@ main(int argc, char **argv) PAM_END("pam_start"); /* Things went really bad... */ syslog(LOG_ERR, "pam_start failed: %s", - pam_strerror(pamh, pam_err)); + safe_pam_strerror(pamh, pam_err)); errx(EXIT_FAILURE, "pam_start failed"); } @@ -239,9 +251,9 @@ main(int argc, char **argv) */ if ((pam_err = pam_authenticate(pamh, 0)) != PAM_SUCCESS) { syslog(LOG_WARNING, "BAD SU %s to %s%s: %s", - username, user, ontty(), pam_strerror(pamh, pam_err)); + username, user, ontty(), safe_pam_strerror(pamh, pam_err)); (void)pam_end(pamh, pam_err); - errx(EXIT_FAILURE, "Sorry: %s", pam_strerror(pamh, pam_err)); + errx(EXIT_FAILURE, "Sorry: %s", safe_pam_strerror(pamh, pam_err)); } /* @@ -267,7 +279,7 @@ main(int argc, char **argv) pam_err = pam_get_item(pamh, PAM_USER, &newuser); if (pam_err != PAM_SUCCESS) { syslog(LOG_WARNING, - "pam_get_item(PAM_USER): %s", pam_strerror(pamh, pam_err)); + "pam_get_item(PAM_USER): %s", safe_pam_strerror(pamh, pam_err)); } else { user = (char *)__UNCONST(newuser); if (getpwnam_r(user, &pwres, pwbuf, sizeof(pwbuf), &pwd) != 0 || @@ -423,11 +435,11 @@ out: pam_err = pam_setcred(pamh, PAM_DELETE_CRED); if (pam_err != PAM_SUCCESS) logit("pam_setcred: %s", -pam_strerror(pamh, pam_err)); +safe_pam_strerror(pamh, pam_err)); pam_err = pam_close_session(pamh, 0); if (pam_err != PAM_SUCCESS) logit("pam_close_session: %s", -pam_strerror(pamh, pam_err)); +safe_pam_strerror(pamh, pam_err)); (void)pam_end(pamh, pam_err); exit(WEXITSTATUS(status)); break; @@ -543,7 +555,7 @@ out: (void)execv(shell, np); err(EXIT_FAILURE, "%s", shell); done: - logit("%s: %s", func, pam_strerror(pamh, pam_err)); + logit("%s: %s", func, safe_pam_strerror(pamh, pam_err)); (void)pam_end(pamh, pam_err); return EXIT_FAILURE; } @@ -555,6 +567,8 @@ logit(const char *fmt, ...) va_start(ap, fmt); vwarnx(fmt, ap); + va_end(ap); + va_start(ap, fmt); vsyslog(LOG_ERR, fmt, ap); va_end(ap); }
CVS commit: src/lib/libpam/modules
Module Name:src Committed By: christos Date: Thu Jun 20 20:54:52 UTC 2013 Modified Files: src/lib/libpam/modules/pam_nologin: pam_nologin.c src/lib/libpam/modules/pam_unix: pam_unix.c Log Message: use login_getpwclass() everywhere for consistency. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/lib/libpam/modules/pam_nologin/pam_nologin.c cvs rdiff -u -r1.14 -r1.15 src/lib/libpam/modules/pam_unix/pam_unix.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/libpam/modules/pam_nologin/pam_nologin.c diff -u src/lib/libpam/modules/pam_nologin/pam_nologin.c:1.8 src/lib/libpam/modules/pam_nologin/pam_nologin.c:1.9 --- src/lib/libpam/modules/pam_nologin/pam_nologin.c:1.8 Sun Jan 17 18:17:08 2010 +++ src/lib/libpam/modules/pam_nologin/pam_nologin.c Thu Jun 20 16:54:52 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: pam_nologin.c,v 1.8 2010/01/17 23:17:08 wiz Exp $ */ +/* $NetBSD: pam_nologin.c,v 1.9 2013/06/20 20:54:52 christos Exp $ */ /*- * Copyright 2001 Mark R V Murray @@ -40,7 +40,7 @@ #ifdef __FreeBSD__ __FBSDID("$FreeBSD: src/lib/libpam/modules/pam_nologin/pam_nologin.c,v 1.10 2002/04/12 22:27:21 des Exp $"); #else -__RCSID("$NetBSD: pam_nologin.c,v 1.8 2010/01/17 23:17:08 wiz Exp $"); +__RCSID("$NetBSD: pam_nologin.c,v 1.9 2013/06/20 20:54:52 christos Exp $"); #endif @@ -100,7 +100,7 @@ pam_sm_authenticate(pam_handle_t *pamh, rootlogin = 1; } - lc = login_getclass(pwd->pw_class); + lc = login_getpwclass(pwd); ignorenologin = login_getcapbool(lc, "ignorenologin", rootlogin); nologin = login_getcapstr(lc, "nologin", nologin_def, nologin_def); login_close(lc); Index: src/lib/libpam/modules/pam_unix/pam_unix.c diff -u src/lib/libpam/modules/pam_unix/pam_unix.c:1.14 src/lib/libpam/modules/pam_unix/pam_unix.c:1.15 --- src/lib/libpam/modules/pam_unix/pam_unix.c:1.14 Wed Nov 18 12:06:23 2009 +++ src/lib/libpam/modules/pam_unix/pam_unix.c Thu Jun 20 16:54:52 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: pam_unix.c,v 1.14 2009/11/18 17:06:23 drochner Exp $ */ +/* $NetBSD: pam_unix.c,v 1.15 2013/06/20 20:54:52 christos Exp $ */ /*- * Copyright 1998 Juniper Networks, Inc. @@ -40,7 +40,7 @@ #ifdef __FreeBSD__ __FBSDID("$FreeBSD: src/lib/libpam/modules/pam_unix/pam_unix.c,v 1.49 2004/02/10 10:13:21 des Exp $"); #else -__RCSID("$NetBSD: pam_unix.c,v 1.14 2009/11/18 17:06:23 drochner Exp $"); +__RCSID("$NetBSD: pam_unix.c,v 1.15 2013/06/20 20:54:52 christos Exp $"); #endif @@ -111,12 +111,11 @@ pam_sm_authenticate(pam_handle_t *pamh, return (PAM_SUCCESS); realpw = "*"; } - lc = login_getpwclass(pwd); } else { PAM_LOG("Doing dummy authentication"); realpw = "*"; - lc = login_getclass(NULL); } + lc = login_getpwclass(pwd); retval = pam_get_authtok(pamh, PAM_AUTHTOK, &pass, NULL); login_close(lc); if (retval != PAM_SUCCESS) @@ -543,7 +542,7 @@ pam_sm_chauthtok(pam_handle_t *pamh, int PAM_LOG("UPDATE round"); - if ((lc = login_getclass(pwd->pw_class)) != NULL) { + if ((lc = login_getpwclass(pwd)) != NULL) { min_pw_len = (int) login_getcapnum(lc, "minpasswordlen", (quad_t)0, (quad_t)0); pw_expiry = (int) login_getcapnum(lc,
CVS commit: src/sys
Module Name:src Committed By: christos Date: Thu Jun 20 23:21:42 UTC 2013 Modified Files: src/sys/kern: init_main.c kern_rndq.c src/sys/sys: rnd.h Log Message: Initialize the rnd softint explicitly via a function late in main. Avoids LOCKDEBUG panic since softint_establish() was called via wdcintr -> wddone from an interrupt context and tried to acquire a non-spin mutex. To generate a diff of this commit: cvs rdiff -u -r1.449 -r1.450 src/sys/kern/init_main.c cvs rdiff -u -r1.12 -r1.13 src/sys/kern/kern_rndq.c cvs rdiff -u -r1.36 -r1.37 src/sys/sys/rnd.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/kern/init_main.c diff -u src/sys/kern/init_main.c:1.449 src/sys/kern/init_main.c:1.450 --- src/sys/kern/init_main.c:1.449 Wed Jun 5 15:01:26 2013 +++ src/sys/kern/init_main.c Thu Jun 20 19:21:41 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: init_main.c,v 1.449 2013/06/05 19:01:26 christos Exp $ */ +/* $NetBSD: init_main.c,v 1.450 2013/06/20 23:21:41 christos Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -97,7 +97,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.449 2013/06/05 19:01:26 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.450 2013/06/20 23:21:41 christos Exp $"); #include "opt_ddb.h" #include "opt_ipsec.h" @@ -565,6 +565,8 @@ main(void) if_attachdomain(); splx(s); + rnd_init_softint(); + #ifdef GPROF /* Initialize kernel profiling. */ kmstartup(); Index: src/sys/kern/kern_rndq.c diff -u src/sys/kern/kern_rndq.c:1.12 src/sys/kern/kern_rndq.c:1.13 --- src/sys/kern/kern_rndq.c:1.12 Wed Jun 12 21:37:03 2013 +++ src/sys/kern/kern_rndq.c Thu Jun 20 19:21:41 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_rndq.c,v 1.12 2013/06/13 01:37:03 tls Exp $ */ +/* $NetBSD: kern_rndq.c,v 1.13 2013/06/20 23:21:41 christos Exp $ */ /*- * Copyright (c) 1997-2013 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.12 2013/06/13 01:37:03 tls Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_rndq.c,v 1.13 2013/06/20 23:21:41 christos Exp $"); #include #include @@ -174,6 +174,12 @@ LIST_HEAD(, krndsource) rnd_sources; rndsave_t *boot_rsp; +void +rnd_init_softint(void) { + rnd_process = softint_establish(SOFTINT_SERIAL|SOFTINT_MPSAFE, + rnd_intr, NULL); +} + /* * Generate a 32-bit counter. This should be more machine dependent, * using cycle counters and the like when possible. @@ -207,20 +213,12 @@ rnd_schedule_softint(void *softint) kpreempt_enable(); } -/* - * XXX repulsive: we can't initialize our softints in rnd_init - * XXX (too early) so we wrap the points where we'd schedule them, thus. - */ static inline void rnd_schedule_process(void) { if (__predict_true(rnd_process)) { rnd_schedule_softint(rnd_process); return; - } - if (!cold) { - rnd_process = softint_establish(SOFTINT_SERIAL|SOFTINT_MPSAFE, - rnd_intr, NULL); } rnd_process_events(); } Index: src/sys/sys/rnd.h diff -u src/sys/sys/rnd.h:1.36 src/sys/sys/rnd.h:1.37 --- src/sys/sys/rnd.h:1.36 Wed Jun 12 20:55:01 2013 +++ src/sys/sys/rnd.h Thu Jun 20 19:21:42 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rnd.h,v 1.36 2013/06/13 00:55:01 tls Exp $ */ +/* $NetBSD: rnd.h,v 1.37 2013/06/20 23:21:42 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -176,6 +176,7 @@ uint32_t rndpool_get_poolsize(void); void rndpool_add_data(rndpool_t *, void *, uint32_t, uint32_t); uint32_t rndpool_extract_data(rndpool_t *, void *, uint32_t, uint32_t); void rnd_init(void); +void rnd_init_softint(void); void _rnd_add_uint32(krndsource_t *, uint32_t); void rnd_add_data(krndsource_t *, const void *const, uint32_t, uint32_t);
CVS commit: src/external/bsd/libelf/dist
Module Name:src Committed By: christos Date: Fri Jun 21 01:36:31 UTC 2013 Modified Files: src/external/bsd/libelf/dist: libelf_data.c Log Message: Instead of hard-coding each processor-specific section type, handle all processor-specific section types the same way. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/external/bsd/libelf/dist/libelf_data.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/libelf/dist/libelf_data.c diff -u src/external/bsd/libelf/dist/libelf_data.c:1.4 src/external/bsd/libelf/dist/libelf_data.c:1.5 --- src/external/bsd/libelf/dist/libelf_data.c:1.4 Mon Feb 22 05:48:33 2010 +++ src/external/bsd/libelf/dist/libelf_data.c Thu Jun 20 21:36:31 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: libelf_data.c,v 1.4 2010/02/22 10:48:33 darran Exp $ */ +/* $NetBSD: libelf_data.c,v 1.5 2013/06/21 01:36:31 christos Exp $ */ /*- * Copyright (c) 2006 Joseph Koshy @@ -87,9 +87,9 @@ _libelf_xlate_shtype(uint32_t sht) case SHT_SUNW_syminfo: return (ELF_T_SYMINFO); #endif /* __LIBELF_HAVE_ELF_SYMINFO */ - case SHT_AMD64_UNWIND: /* == SHT_IA_64_UNWIND */ - return (ELF_T_BYTE); default: + if (sht >= SHT_LOPROC && sht <= SHT_HIPROC) + return (ELF_T_BYTE); return (-1); } }
CVS commit: src/sys/sys
Module Name:src Committed By: christos Date: Fri Jun 21 01:40:24 UTC 2013 Modified Files: src/sys/sys: exec_elf.h Log Message: Add the ARM processor-specific sections: http://infocenter.arm.com/help/topic/com.arm.doc.ihi0044e/IHI0044E_aaelf.pdf To generate a diff of this commit: cvs rdiff -u -r1.127 -r1.128 src/sys/sys/exec_elf.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/sys/exec_elf.h diff -u src/sys/sys/exec_elf.h:1.127 src/sys/sys/exec_elf.h:1.128 --- src/sys/sys/exec_elf.h:1.127 Tue Jan 29 20:12:56 2013 +++ src/sys/sys/exec_elf.h Thu Jun 20 21:40:24 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: exec_elf.h,v 1.127 2013/01/30 01:12:56 matt Exp $ */ +/* $NetBSD: exec_elf.h,v 1.128 2013/06/21 01:40:24 christos Exp $ */ /*- * Copyright (c) 1994 The NetBSD Foundation, Inc. @@ -429,6 +429,13 @@ typedef struct { #define SHT_HIOS 0x6fff #define SHT_LOPROC 0x7000 /* Processor-specific range */ #define SHT_AMD64_UNWIND 0x7001 /* unwind information */ +#define SHT_ARM_EXIDX 0x7001 /* exception index table */ +#define SHT_ARM_PREEMPTMAP 0x7002 /* BPABI DLL dynamic linking + * pre-emption map */ +#define SHT_ARM_ATTRIBUTES 0x7003 /* Object file compatibility + * attributes */ +#define SHT_ARM_DEBUGOVERLAY 0x7004 /* See DBGOVL for details */ +#define SHT_ARM_OVERLAYSECTION 0x7005 #define SHT_HIPROC 0x7fff #define SHT_LOUSER 0x8000 /* Application-specific range */ #define SHT_HIUSER 0x
CVS commit: src/sys/arch/amd64/include
Module Name:src Committed By: uebayasi Date: Fri Jun 21 02:47:06 UTC 2013 Modified Files: src/sys/arch/amd64/include: asm.h Log Message: Add END(y) as i386/asm.h does. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/amd64/include/asm.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/arch/amd64/include/asm.h diff -u src/sys/arch/amd64/include/asm.h:1.15 src/sys/arch/amd64/include/asm.h:1.16 --- src/sys/arch/amd64/include/asm.h:1.15 Mon Jun 11 15:18:05 2012 +++ src/sys/arch/amd64/include/asm.h Fri Jun 21 02:47:06 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: asm.h,v 1.15 2012/06/11 15:18:05 chs Exp $ */ +/* $NetBSD: asm.h,v 1.16 2013/06/21 02:47:06 uebayasi Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -104,6 +104,7 @@ #define ALTENTRY(x) NENTRY(x) #define ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE #define LABEL(y) _LABEL(_C_LABEL(y)) +#define END(y) .size y, . - y #define ASMSTR .asciz
CVS commit: src/sys/dev/mii
Module Name:src Committed By: msaitoh Date: Fri Jun 21 04:25:51 UTC 2013 Modified Files: src/sys/dev/mii: brgphy.c Log Message: Call brgpy specific autonego function in MII_TICK. Before this commit, only MII_MEDIACHG calls brgphy_mii_phy_auto() and MII_TICK calls MI mii_phy_auto(). That was not intended. To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/sys/dev/mii/brgphy.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/mii/brgphy.c diff -u src/sys/dev/mii/brgphy.c:1.66 src/sys/dev/mii/brgphy.c:1.67 --- src/sys/dev/mii/brgphy.c:1.66 Sun Jun 16 06:29:08 2013 +++ src/sys/dev/mii/brgphy.c Fri Jun 21 04:25:51 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: brgphy.c,v 1.66 2013/06/16 06:29:08 msaitoh Exp $ */ +/* $NetBSD: brgphy.c,v 1.67 2013/06/21 04:25:51 msaitoh Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.66 2013/06/16 06:29:08 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: brgphy.c,v 1.67 2013/06/21 04:25:51 msaitoh Exp $"); #include #include @@ -411,8 +411,47 @@ setit: if (IFM_INST(ife->ifm_media) != sc->mii_inst) return (0); - if (mii_phy_tick(sc) == EJUSTRETURN) - return (0); + /* + * Is the interface even up? + */ + if ((mii->mii_ifp->if_flags & IFF_UP) == 0) + return 0; + + /* + * Only used for autonegotiation. + */ + if ((IFM_SUBTYPE(ife->ifm_media) != IFM_AUTO) && + (IFM_SUBTYPE(ife->ifm_media) != IFM_1000_T)) { + sc->mii_ticks = 0; + break; + } + + /* + * Check for link. + * Read the status register twice; BMSR_LINK is latch-low. + */ + reg = PHY_READ(sc, MII_BMSR) | PHY_READ(sc, MII_BMSR); + if (reg & BMSR_LINK) { + sc->mii_ticks = 0; + break; + } + + /* + * mii_ticks == 0 means it's the first tick after changing the + * media or the link became down since the last tick + * (see above), so break to update the status. + */ + if (sc->mii_ticks++ == 0) + break; + + /* + * Only retry autonegotiation every mii_anegticks seconds. + */ + KASSERT(sc->mii_anegticks != 0); + if (sc->mii_ticks <= sc->mii_anegticks) + break; + + brgphy_mii_phy_auto(sc); break; case MII_DOWN:
CVS commit: src/sys/lib/libkern/arch/arm
Module Name:src Committed By: matt Date: Fri Jun 21 05:06:24 UTC 2013 Modified Files: src/sys/lib/libkern/arch/arm: Makefile.inc Log Message: Add back {,u}modsi3 for libkern since if we are building standalone tools we might be using the old ABI and might need them. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/lib/libkern/arch/arm/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/lib/libkern/arch/arm/Makefile.inc diff -u src/sys/lib/libkern/arch/arm/Makefile.inc:1.17 src/sys/lib/libkern/arch/arm/Makefile.inc:1.18 --- src/sys/lib/libkern/arch/arm/Makefile.inc:1.17 Thu Jun 20 07:29:50 2013 +++ src/sys/lib/libkern/arch/arm/Makefile.inc Fri Jun 21 05:06:24 2013 @@ -1,12 +1,12 @@ -# $NetBSD: Makefile.inc,v 1.17 2013/06/20 07:29:50 matt Exp $ +# $NetBSD: Makefile.inc,v 1.18 2013/06/21 05:06:24 matt Exp $ SRCS+= byte_swap_2.S byte_swap_4.S SRCS+= ffs.S SRCS+= divsi3.S udivsi3.S divide.S clzsi2.S SRCS+= memcmp.S memcpy.S memset.S memmove.S strcmp.S strncmp.S +SRCS+= modsi3.S umodsi3.S .if !empty(MACHINE_ARCH:Mearm*) SRCS+= __aeabi_ldivmod.S __aeabi_uldivmod.S __aeabi_lcmp.c __aeabi_ulcmp.c .else -SRCS+= modsi3.S umodsi3.S .endif