CVS commit: src/sys/arch/powerpc/include
Module Name:src Committed By: matt Date: Sat Jan 15 10:00:07 UTC 2011 Modified Files: src/sys/arch/powerpc/include: elf_machdep.h Log Message: Add some more reloc types as well as DT_PPC_GOT To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/powerpc/include/elf_machdep.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/powerpc/include/elf_machdep.h diff -u src/sys/arch/powerpc/include/elf_machdep.h:1.8 src/sys/arch/powerpc/include/elf_machdep.h:1.9 --- src/sys/arch/powerpc/include/elf_machdep.h:1.8 Sat May 30 05:56:53 2009 +++ src/sys/arch/powerpc/include/elf_machdep.h Sat Jan 15 10:00:07 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: elf_machdep.h,v 1.8 2009/05/30 05:56:53 skrll Exp $ */ +/* $NetBSD: elf_machdep.h,v 1.9 2011/01/15 10:00:07 matt Exp $ */ #define ELF32_MACHDEP_ENDIANNESS ELFDATA2MSB #define ELF32_MACHDEP_ID_CASES \ @@ -19,6 +19,9 @@ #define ARCH_ELFSIZE 32 /* MD native binary size */ #endif +/* Specify the value of _GLOBAL_OFFSET_TABLE_ */ +#define DT_PPC_GOT DT_LOPROC + #define R_PPC_NONE 0 #define R_PPC_32 1 #define R_PPC_24 2 @@ -51,7 +54,12 @@ #define R_PPC_PLT16_LO 29 #define R_PPC_PLT16_HI 30 #define R_PPC_PLT16_HA 31 -#define R_PPC_SDAREL 32 +#define R_PPC_SDAREL16 32 +#define R_PPC_SECTOFF 33 +#define R_PPC_SECTOFF_LO 34 +#define R_PPC_SECTOFF_HI 35 +#define R_PPC_SECTOFF_HA 36 +#define R_PPC_ADDR30 37 /* TLS relocations */ #define R_PPC_TLS 67 @@ -88,4 +96,10 @@ #define R_PPC_TLSGD 95 #define R_PPC_TLSLD 96 +/* Used for the secure-plt PIC code sequences */ +#define R_PPC_REL16 249 +#define R_PPC_REL16_LO 250 +#define R_PPC_REL16_HI 251 +#define R_PPC_REL16_HA 252 + #define R_TYPE(name) __CONCAT(R_PPC_,name)
CVS commit: src/lib/libbluetooth
Module Name:src Committed By: plunky Date: Sat Jan 15 11:51:26 UTC 2011 Modified Files: src/lib/libbluetooth: sdp_data.3 Log Message: add sdp_put_[u]int64() .Fn prototypes to list To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/lib/libbluetooth/sdp_data.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/libbluetooth/sdp_data.3 diff -u src/lib/libbluetooth/sdp_data.3:1.6 src/lib/libbluetooth/sdp_data.3:1.7 --- src/lib/libbluetooth/sdp_data.3:1.6 Thu Dec 16 10:08:27 2010 +++ src/lib/libbluetooth/sdp_data.3 Sat Jan 15 11:51:25 2011 @@ -1,4 +1,4 @@ -.\ $NetBSD: sdp_data.3,v 1.6 2010/12/16 10:08:27 wiz Exp $ +.\ $NetBSD: sdp_data.3,v 1.7 2011/01/15 11:51:25 plunky Exp $ .\ .\ Copyright (c) 2009 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -27,7 +27,7 @@ .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\ SUCH DAMAGE. .\ -.Dd December 16, 2010 +.Dd January 15, 2011 .Dt SDP_DATA 3 .Os .Sh NAME @@ -123,6 +123,8 @@ .Ft bool .Fn sdp_put_uint32 sdp_data_t *data uint32_t value .Ft bool +.Fn sdp_put_uint64 sdp_data_t *data uint64_t value +.Ft bool .Fn sdp_put_int sdp_data_t *data intmax_t value .Ft bool .Fn sdp_put_int8 sdp_data_t *data int8_t value @@ -131,6 +133,8 @@ .Ft bool .Fn sdp_put_int32 sdp_data_t *data int32_t value .Ft bool +.Fn sdp_put_int64 sdp_data_t *data int64_t value +.Ft bool .Fn sdp_put_seq sdp_data_t *data ssize_t length .Ft bool .Fn sdp_put_alt sdp_data_t *data ssize_t length
CVS commit: src/lib/libc/time
Module Name:src Committed By: martin Date: Sat Jan 15 12:31:57 UTC 2011 Modified Files: src/lib/libc/time: Makefile localtime.c zdump.c zic.c Log Message: Backout previous, it breaks the build big time and causes e.g. date(1) and top(1) to dump core. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libc/time/Makefile cvs rdiff -u -r1.52 -r1.53 src/lib/libc/time/localtime.c cvs rdiff -u -r1.18 -r1.19 src/lib/libc/time/zdump.c cvs rdiff -u -r1.27 -r1.28 src/lib/libc/time/zic.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/time/Makefile diff -u src/lib/libc/time/Makefile:1.2 src/lib/libc/time/Makefile:1.3 --- src/lib/libc/time/Makefile:1.2 Fri Jan 14 23:35:07 2011 +++ src/lib/libc/time/Makefile Sat Jan 15 12:31:56 2011 @@ -110,10 +110,6 @@ # -TTZ_DOMAINDIR=\/path\ to use /path for gettext directory; # the default is system-supplied, typically /usr/lib/locale # $(GCC_DEBUG_FLAGS) if you are using GCC and want lots of checking -# $(GCC_OVERFLOW_FLAGS) if you are using GCC 3.4 or later. -# If you are using a compiler other than GCC, and if it defaults to -# undefined behavior on integer overflow, then you need to specify a flag -# saying that integer arithmetic is supposed to wrap around on overflow. # -DNO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU=1 # if you do not want run time warnings about formats that may cause # year 2000 grief @@ -124,7 +120,6 @@ -Wall -Wcast-qual -Wconversion -Wmissing-prototypes \ -Wnested-externs -Wpointer-arith -Wshadow \ -Wtraditional # -Wstrict-prototypes -Wwrite-strings -GCC_OVERFLOW_FLAGS = -fwrapv # # If you want to use System V compatibility code, add # -DUSG_COMPAT @@ -391,7 +386,7 @@ public: $(ENCHILADA) make maintainer-clean - make CFLAGS=$(GCC_DEBUG_FLAGS) $(GCC_OVERFLOW_FLAGS) + make CFLAGS=$(GCC_DEBUG_FLAGS) -mkdir /tmp/,tzpublic -for i in $(TDATA) ; do zic -v -d /tmp/,tzpublic $$i 21 | grep -v starting year ; done for i in $(TDATA) ; do zic -d /tmp/,tzpublic $$i || exit; done Index: src/lib/libc/time/localtime.c diff -u src/lib/libc/time/localtime.c:1.52 src/lib/libc/time/localtime.c:1.53 --- src/lib/libc/time/localtime.c:1.52 Fri Jan 14 23:35:07 2011 +++ src/lib/libc/time/localtime.c Sat Jan 15 12:31:57 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: localtime.c,v 1.52 2011/01/14 23:35:07 christos Exp $ */ +/* $NetBSD: localtime.c,v 1.53 2011/01/15 12:31:57 martin Exp $ */ /* ** This file is in the public domain, so clarified as of @@ -10,7 +10,7 @@ #if 0 static char elsieid[] = @(#)localtime.c 8.9; #else -__RCSID($NetBSD: localtime.c,v 1.52 2011/01/14 23:35:07 christos Exp $); +__RCSID($NetBSD: localtime.c,v 1.53 2011/01/15 12:31:57 martin Exp $); #endif #endif /* LIBC_SCCS and not lint */ @@ -1704,10 +1704,8 @@ int number0; number0 = *number; - if (delta 0 ? number0 delta - INT_MIN : INT_MAX - delta number0) - return 1; *number += delta; - return 0; + return (*number number0) != (delta 0); } static int @@ -1716,10 +1714,8 @@ long number0; number0 = *number; - if (delta 0 ? number0 delta - LONG_MIN : LONG_MAX - delta number0) - return 1; *number += delta; - return 0; + return (*number number0) != (delta 0); } static int Index: src/lib/libc/time/zdump.c diff -u src/lib/libc/time/zdump.c:1.18 src/lib/libc/time/zdump.c:1.19 --- src/lib/libc/time/zdump.c:1.18 Fri Jan 14 23:35:07 2011 +++ src/lib/libc/time/zdump.c Sat Jan 15 12:31:57 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: zdump.c,v 1.18 2011/01/14 23:35:07 christos Exp $ */ +/* $NetBSD: zdump.c,v 1.19 2011/01/15 12:31:57 martin Exp $ */ /* ** This file is in the public domain, so clarified as of ** 2009-05-17 by Arthur David Olson. @@ -7,7 +7,7 @@ #include sys/cdefs.h #ifndef lint #ifndef NOID -__RCSID($NetBSD: zdump.c,v 1.18 2011/01/14 23:35:07 christos Exp $); +__RCSID($NetBSD: zdump.c,v 1.19 2011/01/15 12:31:57 martin Exp $); #endif /* !defined NOID */ #endif /* !defined lint */ @@ -26,7 +26,6 @@ #include stdlib.h /* for exit, malloc, atoi */ #include err.h #include float.h /* for FLT_MAX and DBL_MAX */ -#include limits.h /* for INT_MAX, LONG_MAX, etc. */ #include ctype.h /* for isalpha et al. */ #ifndef isascii #define isascii(x) 1 @@ -432,25 +431,21 @@ } } else if (0 (time_t) -1) { /* - ** time_t is signed. + ** time_t is signed. Assume overflow wraps around. */ - if (sizeof (time_t) == sizeof (int)) { - absolute_min_time = INT_MIN; - absolute_max_time = INT_MAX; - } else if (sizeof (time_t) == sizeof (long)) { - absolute_min_time = LONG_MIN; - absolute_max_time = LONG_MAX; -#if defined LLONG_MIN defined LLONG_MAX - } else if (sizeof (time_t) == sizeof (long long)) { - absolute_min_time = LLONG_MIN; - absolute_max_time = LLONG_MAX; -#endif - } else { - (void) fprintf(stderr, -_(%s: use of -v on system with signed time_t whose extrema are
CVS commit: src/external/mit/xorg/server/xorg-server
Module Name:src Committed By: jmcneill Date: Sat Jan 15 13:54:53 UTC 2011 Modified Files: src/external/mit/xorg/server/xorg-server/damageext: Makefile src/external/mit/xorg/server/xorg-server/dbe: Makefile.dbe src/external/mit/xorg/server/xorg-server/exa: Makefile.exa src/external/mit/xorg/server/xorg-server/glx: Makefile.glx Log Message: Ensure that HAVE_DIX_CONFIG_H is defined for damageext, dbe, exa, and glx builds. Fixes recent trouble with the Composite extension, and should fix some problems with the DAMAGE extension and who knows what else. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/mit/xorg/server/xorg-server/damageext/Makefile cvs rdiff -u -r1.5 -r1.6 \ src/external/mit/xorg/server/xorg-server/dbe/Makefile.dbe cvs rdiff -u -r1.4 -r1.5 \ src/external/mit/xorg/server/xorg-server/exa/Makefile.exa cvs rdiff -u -r1.7 -r1.8 \ src/external/mit/xorg/server/xorg-server/glx/Makefile.glx Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/server/xorg-server/damageext/Makefile diff -u src/external/mit/xorg/server/xorg-server/damageext/Makefile:1.2 src/external/mit/xorg/server/xorg-server/damageext/Makefile:1.3 --- src/external/mit/xorg/server/xorg-server/damageext/Makefile:1.2 Sat Aug 22 02:40:26 2009 +++ src/external/mit/xorg/server/xorg-server/damageext/Makefile Sat Jan 15 13:54:52 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2009/08/22 02:40:26 mrg Exp $ +# $NetBSD: Makefile,v 1.3 2011/01/15 13:54:52 jmcneill Exp $ .include ../Makefile.serverlib .include ../Makefile.servermod @@ -15,7 +15,8 @@ -I${DESTDIR}${X11INCDIR}/X11 \ -I${DESTDIR}${X11INCDIR}/xorg \ -I${DESTDIR}${X11INCDIR}/pixman-1 \ - -I${X11SRCDIR.xorg-server}/../include + -I${X11SRCDIR.xorg-server}/../include \ + ${X11FLAGS.DIX} ${X11INCS.DIX} COPTS.damageext.c+= -Wno-error Index: src/external/mit/xorg/server/xorg-server/dbe/Makefile.dbe diff -u src/external/mit/xorg/server/xorg-server/dbe/Makefile.dbe:1.5 src/external/mit/xorg/server/xorg-server/dbe/Makefile.dbe:1.6 --- src/external/mit/xorg/server/xorg-server/dbe/Makefile.dbe:1.5 Thu Jun 11 05:43:15 2009 +++ src/external/mit/xorg/server/xorg-server/dbe/Makefile.dbe Sat Jan 15 13:54:53 2011 @@ -1,11 +1,13 @@ -# $NetBSD: Makefile.dbe,v 1.5 2009/06/11 05:43:15 mrg Exp $ +# $NetBSD: Makefile.dbe,v 1.6 2011/01/15 13:54:53 jmcneill Exp $ .PATH: ${X11SRCDIR.xorg-server}/dbe SRCS.dbe= dbe.c midbe.c CPPFLAGS+= -I${X11SRCDIR.xorg-server}/include \ -I${X11SRCDIR.xorg-server}/Xext \ - -I${DESTDIR}${X11INCDIR}/pixman-1 + -I${DESTDIR}${X11INCDIR}/pixman-1 \ + -I${X11SRCDIR.xorg-server}/../include \ + ${X11FLAGS.DIX} ${X11INCS.DIX} .include bsd.x11.mk LIBDIR= ${XMODULEDIR} Index: src/external/mit/xorg/server/xorg-server/exa/Makefile.exa diff -u src/external/mit/xorg/server/xorg-server/exa/Makefile.exa:1.4 src/external/mit/xorg/server/xorg-server/exa/Makefile.exa:1.5 --- src/external/mit/xorg/server/xorg-server/exa/Makefile.exa:1.4 Tue Nov 23 08:22:30 2010 +++ src/external/mit/xorg/server/xorg-server/exa/Makefile.exa Sat Jan 15 13:54:53 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.exa,v 1.4 2010/11/23 08:22:30 mrg Exp $ +# $NetBSD: Makefile.exa,v 1.5 2011/01/15 13:54:53 jmcneill Exp $ .PATH: ${X11SRCDIR.xorg-server}/exa @@ -23,7 +23,8 @@ -I${DESTDIR}${X11INCDIR}/X11 \ -I${DESTDIR}${X11INCDIR}/xorg \ -I${DESTDIR}${X11INCDIR}/pixman-1 \ - -I${X11SRCDIR.xorg-server}/../include + -I${X11SRCDIR.xorg-server}/../include \ + ${X11FLAGS.DIX} ${X11INCS.DIX} .if !defined(XMODULEDIR) .include bsd.x11.mk Index: src/external/mit/xorg/server/xorg-server/glx/Makefile.glx diff -u src/external/mit/xorg/server/xorg-server/glx/Makefile.glx:1.7 src/external/mit/xorg/server/xorg-server/glx/Makefile.glx:1.8 --- src/external/mit/xorg/server/xorg-server/glx/Makefile.glx:1.7 Tue Nov 23 08:22:30 2010 +++ src/external/mit/xorg/server/xorg-server/glx/Makefile.glx Sat Jan 15 13:54:53 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.glx,v 1.7 2010/11/23 08:22:30 mrg Exp $ +# $NetBSD: Makefile.glx,v 1.8 2011/01/15 13:54:53 jmcneill Exp $ .PATH: ${X11SRCDIR.xorg-server}/glx .PATH: ${X11SRCDIR.MesaLib}/src/mesa/glapi @@ -60,7 +60,8 @@ CPPFLAGS+= \ -DGLXEXT \ -DGLX_USE_MESA \ - ${X11FLAGS.DIX} + -I${X11SRCDIR.xorg-server}/../include \ + ${X11FLAGS.DIX} ${X11INCS.DIX} .include bsd.x11.mk LIBDIR= ${XMODULEDIR}
CVS commit: src/lib/libc/time
Module Name:src Committed By: christos Date: Sat Jan 15 15:42:10 UTC 2011 Modified Files: src/lib/libc/time: localtime.c Log Message: Fix reversed oveflow check. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/lib/libc/time/localtime.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/time/localtime.c diff -u src/lib/libc/time/localtime.c:1.53 src/lib/libc/time/localtime.c:1.54 --- src/lib/libc/time/localtime.c:1.53 Sat Jan 15 07:31:57 2011 +++ src/lib/libc/time/localtime.c Sat Jan 15 10:42:10 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: localtime.c,v 1.53 2011/01/15 12:31:57 martin Exp $ */ +/* $NetBSD: localtime.c,v 1.54 2011/01/15 15:42:10 christos Exp $ */ /* ** This file is in the public domain, so clarified as of @@ -10,7 +10,7 @@ #if 0 static char elsieid[] = @(#)localtime.c 8.9; #else -__RCSID($NetBSD: localtime.c,v 1.53 2011/01/15 12:31:57 martin Exp $); +__RCSID($NetBSD: localtime.c,v 1.54 2011/01/15 15:42:10 christos Exp $); #endif #endif /* LIBC_SCCS and not lint */ @@ -1704,8 +1704,10 @@ int number0; number0 = *number; + if (delta 0 ? number0 INT_MIN - delta : INT_MAX - delta number0) + return 1; *number += delta; - return (*number number0) != (delta 0); + return 0; } static int @@ -1714,8 +1716,10 @@ long number0; number0 = *number; + if (delta 0 ? number0 LONG_MIN - delta : LONG_MAX - delta number0) + return 1; *number += delta; - return (*number number0) != (delta 0); + return 0; } static int
CVS commit: src
Module Name:src Committed By: joerg Date: Sat Jan 15 16:13:59 UTC 2011 Modified Files: src: UPDATING Log Message: Add entry about -tradition-cpp change for people not using build.sh. To generate a diff of this commit: cvs rdiff -u -r1.217 -r1.218 src/UPDATING Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/UPDATING diff -u src/UPDATING:1.217 src/UPDATING:1.218 --- src/UPDATING:1.217 Fri Dec 17 09:54:27 2010 +++ src/UPDATING Sat Jan 15 16:13:59 2011 @@ -1,4 +1,4 @@ -$NetBSD: UPDATING,v 1.217 2010/12/17 09:54:27 jruoho Exp $ +$NetBSD: UPDATING,v 1.218 2011/01/15 16:13:59 joerg Exp $ This file (UPDATING) is intended to be a brief reference to recent changes that might cause problems in the build process, and a guide for @@ -15,6 +15,13 @@ Recent changes: ^^^ +20110112: + Assembler files on amd64 and i386 no longer use -traditional-cpp. + This can break the build of individual parts of the tree. This is + handled correctly by build.sh. Manual builds have to update + /usr/share/mk and re-run config(1) for any kernel configurations as + needed. + 20101217: The tcpdump(8) program was changed to drop privileges and chroot(2) by default. It may be necessary to manually update passwd(5) and
CVS commit: src/tests/fs/tmpfs
Module Name:src Committed By: martin Date: Sat Jan 15 20:16:58 UTC 2011 Modified Files: src/tests/fs/tmpfs: h_tools.c Log Message: Fix off by one that made most of these tests die with a bus error in the sparc64 runs. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/fs/tmpfs/h_tools.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/fs/tmpfs/h_tools.c diff -u src/tests/fs/tmpfs/h_tools.c:1.2 src/tests/fs/tmpfs/h_tools.c:1.3 --- src/tests/fs/tmpfs/h_tools.c:1.2 Mon Apr 28 20:24:12 2008 +++ src/tests/fs/tmpfs/h_tools.c Sat Jan 15 20:16:57 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: h_tools.c,v 1.2 2008/04/28 20:24:12 martin Exp $ */ +/* $NetBSD: h_tools.c,v 1.3 2011/01/15 20:16:57 martin Exp $ */ /* * Copyright (c) 2005, 2006 The NetBSD Foundation, Inc. @@ -124,7 +124,7 @@ argc--; argv++; - changes = malloc(sizeof(struct kevent) * (argc - 1)); + changes = malloc(sizeof(struct kevent) * argc); if (changes == NULL) errx(EXIT_FAILURE, not enough memory);
CVS commit: xsrc/xfree/xc/extras/fontconfig/src
Module Name:xsrc Committed By: joerg Date: Sat Jan 15 21:34:03 UTC 2011 Modified Files: xsrc/xfree/xc/extras/fontconfig/src: fontconfig.man Log Message: Drop trailing tabs after .fi. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ xsrc/xfree/xc/extras/fontconfig/src/fontconfig.man Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/xfree/xc/extras/fontconfig/src/fontconfig.man diff -u xsrc/xfree/xc/extras/fontconfig/src/fontconfig.man:1.1.1.1 xsrc/xfree/xc/extras/fontconfig/src/fontconfig.man:1.2 --- xsrc/xfree/xc/extras/fontconfig/src/fontconfig.man:1.1.1.1 Fri Mar 5 14:26:14 2004 +++ xsrc/xfree/xc/extras/fontconfig/src/fontconfig.man Sat Jan 15 21:34:03 2011 @@ -305,7 +305,7 @@ int sfont; FcPattern **fonts; } FcFontSet; -.fi +.fi An FcFontSet contains a list of FcPatterns. Internally fontconfig uses this data structure to hold sets of fonts. Externally, fontconfig returns the results of listing fonts in this format. 'nfont' holds the number of
CVS commit: src/sys/arch/amiga/amiga
Module Name:src Committed By: phx Date: Sat Jan 15 21:56:53 UTC 2011 Modified Files: src/sys/arch/amiga/amiga: amiga_init.c Log Message: Make it compile without options M68040 and M68060. To generate a diff of this commit: cvs rdiff -u -r1.121 -r1.122 src/sys/arch/amiga/amiga/amiga_init.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/amiga/amiga/amiga_init.c diff -u src/sys/arch/amiga/amiga/amiga_init.c:1.121 src/sys/arch/amiga/amiga/amiga_init.c:1.122 --- src/sys/arch/amiga/amiga/amiga_init.c:1.121 Sun Jan 2 18:48:04 2011 +++ src/sys/arch/amiga/amiga/amiga_init.c Sat Jan 15 21:56:53 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: amiga_init.c,v 1.121 2011/01/02 18:48:04 tsutsui Exp $ */ +/* $NetBSD: amiga_init.c,v 1.122 2011/01/15 21:56:53 phx Exp $ */ /* * Copyright (c) 1994 Michael L. Hitch @@ -37,7 +37,7 @@ #include opt_m68k_arch.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: amiga_init.c,v 1.121 2011/01/02 18:48:04 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: amiga_init.c,v 1.122 2011/01/15 21:56:53 phx Exp $); #include sys/param.h #include sys/systm.h @@ -207,12 +207,15 @@ psize_t ptsize; u_int ptextra, kstsize; paddr_t Sysptmap_pa; - register st_entry_t sg_proto, *sg, *esg; + register st_entry_t sg_proto, *sg; +#if defined(M68040) || defined(M68060) + register st_entry_t *esg; +#endif register pt_entry_t pg_proto, *pg, *epg; vaddr_t end_loaded; - u_int ncd, i; + u_int ncd; #if defined(M68040) || defined(M68060) - u_int nl1desc, nl2desc; + u_int i, nl1desc, nl2desc; #endif vaddr_t kva; struct boot_memlist *ml;
CVS commit: src/usr.bin/stat
Module Name:src Committed By: njoly Date: Sat Jan 15 22:54:11 UTC 2011 Modified Files: src/usr.bin/stat: stat.c Log Message: Do not crash if a date cannot be represented (localtime returning NULL), use the Epoch value instead. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/usr.bin/stat/stat.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/stat/stat.c diff -u src/usr.bin/stat/stat.c:1.32 src/usr.bin/stat/stat.c:1.33 --- src/usr.bin/stat/stat.c:1.32 Thu Dec 16 05:42:14 2010 +++ src/usr.bin/stat/stat.c Sat Jan 15 22:54:10 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: stat.c,v 1.32 2010/12/16 05:42:14 dholland Exp $ */ +/* $NetBSD: stat.c,v 1.33 2011/01/15 22:54:10 njoly Exp $ */ /* * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #include sys/cdefs.h #if !defined(lint) -__RCSID($NetBSD: stat.c,v 1.32 2010/12/16 05:42:14 dholland Exp $); +__RCSID($NetBSD: stat.c,v 1.33 2011/01/15 22:54:10 njoly Exp $); #endif #if ! HAVE_NBTOOL_CONFIG_H @@ -719,6 +719,10 @@ small = (sizeof(secs) == 4); data = secs; tm = localtime(secs); + if (tm == NULL) { + secs = 0; + tm = localtime(secs); + } (void)strftime(path, sizeof(path), timefmt, tm); sdata = path; formats = FMTF_DECIMAL | FMTF_OCTAL | FMTF_UNSIGNED | FMTF_HEX |
CVS commit: src/sys/arch/sandpoint/conf
Module Name:src Committed By: phx Date: Sat Jan 15 23:06:07 UTC 2011 Modified Files: src/sys/arch/sandpoint/conf: GENERIC Log Message: Add some USB devices, which I tested successfully. Replace tab by blank after a device name, where it was forgotten. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/arch/sandpoint/conf/GENERIC 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/sandpoint/conf/GENERIC diff -u src/sys/arch/sandpoint/conf/GENERIC:1.51 src/sys/arch/sandpoint/conf/GENERIC:1.52 --- src/sys/arch/sandpoint/conf/GENERIC:1.51 Tue Jan 11 13:29:09 2011 +++ src/sys/arch/sandpoint/conf/GENERIC Sat Jan 15 23:06:07 2011 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.51 2011/01/11 13:29:09 nisimura Exp $ +# $NetBSD: GENERIC,v 1.52 2011/01/15 23:06:07 phx Exp $ # # machine description file for GENERIC NAS # @@ -22,7 +22,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident GENERIC-$Revision: 1.51 $ +#ident GENERIC-$Revision: 1.52 $ maxusers 32 @@ -47,7 +47,7 @@ #options PMAPDEBUG #options SYMTAB_SPACE=30 #options USERCONF # userconf(4) support -#options PIPE_SOCKETPAIR # smaller, but slower pipe(2) +#options PIPE_SOCKETPAIR # smaller, but slower pipe(2) options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel # Compatibility options @@ -69,7 +69,7 @@ #options TCP_COMPAT_42 # 4.2BSD TCP/IP bug compat. Not recommended. options COMPAT_LINUX # binary compatibility with Linux -options COMPAT_BSDPTY # /dev/[pt]ty?? ptys. +options COMPAT_BSDPTY # /dev/[pt]ty?? ptys. options MSGBUFSIZE=65536 @@ -102,7 +102,7 @@ #options EXT2FS_SYSTEM_FLAGS # makes ext2fs file flags (append and options INET -options INET6 # IPV6 +options INET6 # IPV6 #options TCP_DEBUG # Record last TCP_NDEBUG packets with SO_DEBUG #options ALTQ # Manipulate network interfaces' output queues @@ -162,14 +162,14 @@ eumb* at mainbus0 com0 at eumb? unit 0 # console at 0x4500 #com1 at eumb? unit 1 -satmgr0 at eumb? unit 1 # satmgr at 0x4600 +satmgr0 at eumb? unit 1 # satmgr at 0x4600 ociic* at eumb? iic* at ociic? rs5c372rtc* at iic? addr 0x32 # PCI IDE controllers - see pciide(4) for supported hardware. -cmdide* at pci? dev ? function ? # CMD tech IDE controllers -iteide* at pci? dev ? function ? # IT Express IDE controllers +cmdide* at pci? dev ? function ? # CMD tech IDE controllers +iteide* at pci? dev ? function ? # IT Express IDE controllers satalink* at pci? dev ? function ? # SiI SATALink controllers # ATA (IDE) bus support @@ -204,6 +204,14 @@ uhub* at usb? uhub* at uhub? port ? +# USB HID devices +uhidev* at uhub? port ? configuration ? interface ? # USB HID device +uthum* at uhidev? reportid ?# TEMPerHUM sensors +uhid* at uhidev? reportid ?# USB Generic HID + +# USB printer +ulpt* at uhub? port ? configuration ? interface ? # USB Printer + # USB Mass Storage umass* at uhub? port ? configuration ? interface ? wd* at umass?
CVS commit: src/sys/dev/isa
Module Name:src Committed By: jmcneill Date: Sun Jan 16 01:05:46 UTC 2011 Modified Files: src/sys/dev/isa: aps.c Log Message: - catch up with OpenBSD driver, adding support for newer Thinkpad models - add module hooks To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/dev/isa/aps.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/isa/aps.c diff -u src/sys/dev/isa/aps.c:1.10 src/sys/dev/isa/aps.c:1.11 --- src/sys/dev/isa/aps.c:1.10 Wed Feb 24 22:37:58 2010 +++ src/sys/dev/isa/aps.c Sun Jan 16 01:05:45 2011 @@ -1,8 +1,9 @@ -/* $NetBSD: aps.c,v 1.10 2010/02/24 22:37:58 dyoung Exp $ */ +/* $NetBSD: aps.c,v 1.11 2011/01/16 01:05:45 jmcneill Exp $ */ /* $OpenBSD: aps.c,v 1.15 2007/05/19 19:14:11 tedu Exp $ */ - +/* $OpenBSD: aps.c,v 1.17 2008/06/27 06:08:43 canacar Exp $ */ /* * Copyright (c) 2005 Jonathan Gray j...@openbsd.org + * Copyright (c) 2008 Can Erkin Acar cana...@openbsd.org * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -23,13 +24,14 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: aps.c,v 1.10 2010/02/24 22:37:58 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: aps.c,v 1.11 2011/01/16 01:05:45 jmcneill Exp $); #include sys/param.h #include sys/systm.h #include sys/device.h #include sys/kernel.h #include sys/callout.h +#include sys/module.h #include sys/bus.h @@ -44,23 +46,62 @@ #define DPRINTF(x) #endif -#define APS_ACCEL_STATE 0x04 -#define APS_INIT 0x10 -#define APS_STATE 0x11 -#define APS_XACCEL 0x12 -#define APS_YACCEL 0x14 -#define APS_TEMP 0x16 -#define APS_XVAR 0x17 -#define APS_YVAR 0x19 -#define APS_TEMP2 0x1b -#define APS_UNKNOWN 0x1c -#define APS_INPUT 0x1d -#define APS_CMD 0x1f -#define APS_STATE_NEWDATA 0x50 +/* + * EC interface on Thinkpad Laptops, from Linux HDAPS driver notes. + * From Renesans H8S/2140B Group Hardware Manual + * http://documentation.renesas.com/eng/products/mpumcu/rej09b0300_2140bhm.pdf + * + * EC uses LPC Channel 3 registers TWR0..15 + */ + +/* STR3 status register */ +#define APS_STR3 0x04 + +#define APS_STR3_IBF3B 0x80 /* Input buffer full (host-slave) */ +#define APS_STR3_OBF3B 0x40 /* Output buffer full (slave-host)*/ +#define APS_STR3_MWMF 0x20 /* Master write mode */ +#define APS_STR3_SWMF 0x10 /* Slave write mode */ + + +/* Base address of TWR registers */ +#define APS_TWR_BASE 0x10 +#define APS_TWR_RET 0x1f + +/* TWR registers */ +#define APS_CMD 0x00 +#define APS_ARG1 0x01 +#define APS_ARG2 0x02 +#define APS_ARG3 0x03 +#define APS_RET 0x0f + +/* Sensor values */ +#define APS_STATE 0x01 +#define APS_XACCEL 0x02 +#define APS_YACCEL 0x04 +#define APS_TEMP 0x06 +#define APS_XVAR 0x07 +#define APS_YVAR 0x09 +#define APS_TEMP2 0x0b +#define APS_UNKNOWN 0x0c +#define APS_INPUT 0x0d + +/* write masks for I/O, send command + 0-3 arguments*/ +#define APS_WRITE_0 0x0001 +#define APS_WRITE_1 0x0003 +#define APS_WRITE_2 0x0007 +#define APS_WRITE_3 0x000f + +/* read masks for I/O, read 0-3 values (skip command byte) */ +#define APS_READ_0 0x +#define APS_READ_1 0x0002 +#define APS_READ_2 0x0006 +#define APS_READ_3 0x000e -#define APS_CMD_START 0x01 +#define APS_READ_RET 0x8000 +#define APS_READ_ALL 0x +/* Bit definitions for APS_INPUT value */ #define APS_INPUT_KB (1 5) #define APS_INPUT_MS (1 6) #define APS_INPUT_LIDOPEN (1 7) @@ -95,6 +136,7 @@ struct aps_softc { bus_space_tag_t sc_iot; bus_space_handle_t sc_ioh; + bool sc_bus_space_valid; struct sysmon_envsys *sc_sme; envsys_data_t sc_sensor[APS_NUM_SENSORS]; @@ -108,23 +150,93 @@ static int aps_detach(device_t, int); static int aps_init(struct aps_softc *); -static uint8_t aps_mem_read_1(bus_space_tag_t, bus_space_handle_t, - int, uint8_t); -static void aps_refresh_sensor_data(struct aps_softc *sc); +static int aps_read_data(struct aps_softc *); +static void aps_refresh_sensor_data(struct aps_softc *); static void aps_refresh(void *); +static int aps_do_io(bus_space_tag_t, bus_space_handle_t, + unsigned char *, int, int); static bool aps_suspend(device_t, const pmf_qual_t *); static bool aps_resume(device_t, const pmf_qual_t *); CFATTACH_DECL_NEW(aps, sizeof(struct aps_softc), aps_match, aps_attach, aps_detach, NULL); +/* properly communicate with the controller, writing a set of memory + * locations and reading back another set */ +static int +aps_do_io(bus_space_tag_t iot, bus_space_handle_t ioh, + unsigned char *buf, int wmask, int rmask) +{ + int bp, stat, n; + + DPRINTF((aps_do_io: CMD: 0x%02x, wmask: 0x%04x, rmask: 0x%04x\n, + buf[0], wmask, rmask)); + + /* write init byte using arbitration */ + for (n = 0; n 100; n++) { + stat = bus_space_read_1(iot, ioh, APS_STR3); + if (stat (APS_STR3_OBF3B |
CVS commit: src/sys/modules/aps
Module Name:src Committed By: jmcneill Date: Sun Jan 16 01:07:33 UTC 2011 Added Files: src/sys/modules/aps: Makefile aps.ioconf Log Message: support building aps(4) as a module To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/modules/aps/Makefile \ src/sys/modules/aps/aps.ioconf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/modules/aps/Makefile diff -u /dev/null src/sys/modules/aps/Makefile:1.1 --- /dev/null Sun Jan 16 01:07:33 2011 +++ src/sys/modules/aps/Makefile Sun Jan 16 01:07:32 2011 @@ -0,0 +1,13 @@ +# $NetBSD: Makefile,v 1.1 2011/01/16 01:07:32 jmcneill Exp $ + +.include ../Makefile.inc + +.PATH: ${S}/dev/isa + +KMOD= aps +IOCONF= aps.ioconf +SRCS= aps.c + +WARNS= 3 + +.include bsd.kmodule.mk Index: src/sys/modules/aps/aps.ioconf diff -u /dev/null src/sys/modules/aps/aps.ioconf:1.1 --- /dev/null Sun Jan 16 01:07:33 2011 +++ src/sys/modules/aps/aps.ioconf Sun Jan 16 01:07:32 2011 @@ -0,0 +1,10 @@ +# $NetBSD: aps.ioconf,v 1.1 2011/01/16 01:07:32 jmcneill Exp $ + +ioconf aps + +include conf/files +include dev/isa/files.isa + +pseudo-root isa* + +aps0 at isa? port 0x1600
CVS commit: src
Module Name:src Committed By: jmcneill Date: Sun Jan 16 01:13:10 UTC 2011 Modified Files: src/distrib/sets/lists/modules: md.amd64 md.i386 src/sys/modules: Makefile Log Message: build and install aps module on i386 and amd64 To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/distrib/sets/lists/modules/md.amd64 cvs rdiff -u -r1.12 -r1.13 src/distrib/sets/lists/modules/md.i386 cvs rdiff -u -r1.58 -r1.59 src/sys/modules/Makefile 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/modules/md.amd64 diff -u src/distrib/sets/lists/modules/md.amd64:1.11 src/distrib/sets/lists/modules/md.amd64:1.12 --- src/distrib/sets/lists/modules/md.amd64:1.11 Sun Jan 9 15:12:33 2011 +++ src/distrib/sets/lists/modules/md.amd64 Sun Jan 16 01:13:10 2011 @@ -1,4 +1,4 @@ -# $NetBSD: md.amd64,v 1.11 2011/01/09 15:12:33 jruoho Exp $ +# $NetBSD: md.amd64,v 1.12 2011/01/16 01:13:10 jmcneill Exp $ ./@MODULEDIR@/acpiacadbase-kernel-modules kmod ./@MODULEDIR@/acpiacad/acpiacad.kmod base-kernel-modules kmod ./@MODULEDIR@/acpibatbase-kernel-modules kmod @@ -25,6 +25,8 @@ ./@MODULEDIR@/acpiwmi/acpiwmi.kmod base-kernel-modules kmod ./@MODULEDIR@/aibsbase-kernel-modules kmod ./@MODULEDIR@/aibs/aibs.kmod base-kernel-modules kmod +./@MODULEDIR@/apsbase-kernel-modules kmod +./@MODULEDIR@/aps/aps.kmod base-kernel-modules kmod ./@MODULEDIR@/asusbase-kernel-modules kmod ./@MODULEDIR@/asus/asus.kmod base-kernel-modules kmod ./@MODULEDIR@/au8522base-kernel-modules kmod Index: src/distrib/sets/lists/modules/md.i386 diff -u src/distrib/sets/lists/modules/md.i386:1.12 src/distrib/sets/lists/modules/md.i386:1.13 --- src/distrib/sets/lists/modules/md.i386:1.12 Sun Jan 9 15:12:33 2011 +++ src/distrib/sets/lists/modules/md.i386 Sun Jan 16 01:13:10 2011 @@ -1,4 +1,4 @@ -# $NetBSD: md.i386,v 1.12 2011/01/09 15:12:33 jruoho Exp $ +# $NetBSD: md.i386,v 1.13 2011/01/16 01:13:10 jmcneill Exp $ ./@MODULEDIR@/acpiacadbase-kernel-modules kmod ./@MODULEDIR@/acpiacad/acpiacad.kmod base-kernel-modules kmod ./@MODULEDIR@/acpibatbase-kernel-modules kmod @@ -25,6 +25,8 @@ ./@MODULEDIR@/acpiwmi/acpiwmi.kmod base-kernel-modules kmod ./@MODULEDIR@/aibsbase-kernel-modules kmod ./@MODULEDIR@/aibs/aibs.kmod base-kernel-modules kmod +./@MODULEDIR@/apsbase-kernel-modules kmod +./@MODULEDIR@/aps/aps.kmod base-kernel-modules kmod ./@MODULEDIR@/asusbase-kernel-modules kmod ./@MODULEDIR@/asus/asus.kmod base-kernel-modules kmod ./@MODULEDIR@/au8522base-kernel-modules kmod Index: src/sys/modules/Makefile diff -u src/sys/modules/Makefile:1.58 src/sys/modules/Makefile:1.59 --- src/sys/modules/Makefile:1.58 Sun Jan 9 15:12:34 2011 +++ src/sys/modules/Makefile Sun Jan 16 01:13:10 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.58 2011/01/09 15:12:34 jruoho Exp $ +# $NetBSD: Makefile,v 1.59 2011/01/16 01:13:10 jmcneill Exp $ .include bsd.own.mk @@ -142,6 +142,7 @@ .if ${MACHINE_ARCH} == i386 || \ ${MACHINE_ARCH} == x86_64 +SUBDIR+= aps SUBDIR+= au8522 SUBDIR+= auvitek SUBDIR+= xc5k
CVS commit: src/libexec/ld.elf_so
Module Name:src Committed By: matt Date: Sun Jan 16 01:22:29 UTC 2011 Modified Files: src/libexec/ld.elf_so: headers.c rtld.h src/libexec/ld.elf_so/arch/powerpc: ppc_reloc.c rtld_start.S Log Message: Add secure-plt support for powerpc to ld.elf_so. As part of this, we have to stop calling into the GOT/_DYNAMIC since they are no longer executable. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/libexec/ld.elf_so/headers.c cvs rdiff -u -r1.97 -r1.98 src/libexec/ld.elf_so/rtld.h cvs rdiff -u -r1.45 -r1.46 src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c cvs rdiff -u -r1.13 -r1.14 src/libexec/ld.elf_so/arch/powerpc/rtld_start.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/headers.c diff -u src/libexec/ld.elf_so/headers.c:1.38 src/libexec/ld.elf_so/headers.c:1.39 --- src/libexec/ld.elf_so/headers.c:1.38 Fri Dec 24 12:41:43 2010 +++ src/libexec/ld.elf_so/headers.c Sun Jan 16 01:22:29 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: headers.c,v 1.38 2010/12/24 12:41:43 skrll Exp $ */ +/* $NetBSD: headers.c,v 1.39 2011/01/16 01:22:29 matt Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -40,7 +40,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: headers.c,v 1.38 2010/12/24 12:41:43 skrll Exp $); +__RCSID($NetBSD: headers.c,v 1.39 2011/01/16 01:22:29 matt Exp $); #endif /* not lint */ #include err.h @@ -241,6 +241,11 @@ #endif break; #endif +#ifdef __powerpc__ + case DT_PPC_GOT: + obj-gotptr = (Elf_Addr *)(obj-relocbase + dynp-d_un.d_ptr); + break; +#endif case DT_FLAGS_1: obj-z_now = ((dynp-d_un.d_val DF_1_BIND_NOW) != 0); Index: src/libexec/ld.elf_so/rtld.h diff -u src/libexec/ld.elf_so/rtld.h:1.97 src/libexec/ld.elf_so/rtld.h:1.98 --- src/libexec/ld.elf_so/rtld.h:1.97 Fri Dec 24 12:41:43 2010 +++ src/libexec/ld.elf_so/rtld.h Sun Jan 16 01:22:29 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rtld.h,v 1.97 2010/12/24 12:41:43 skrll Exp $ */ +/* $NetBSD: rtld.h,v 1.98 2011/01/16 01:22:29 matt Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -167,6 +167,9 @@ Elf_Wordsymtabno; /* Number of dynamic symbols */ Elf_Wordgotsym; /* First dynamic symbol in GOT */ #endif +#ifdef __powerpc__ + Elf_Addr *gotptr; /* GOT table (secure-plt only) */ +#endif const Elf_Symindx *buckets; /* Hash table buckets array */ unsigned long unused1; /* Used to be nbuckets */ Index: src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c diff -u src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c:1.45 src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c:1.46 --- src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c:1.45 Fri Aug 6 16:33:18 2010 +++ src/libexec/ld.elf_so/arch/powerpc/ppc_reloc.c Sun Jan 16 01:22:29 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ppc_reloc.c,v 1.45 2010/08/06 16:33:18 joerg Exp $ */ +/* $NetBSD: ppc_reloc.c,v 1.46 2011/01/16 01:22:29 matt Exp $ */ /*- * Copyright (C) 1998 Tsubai Masanari @@ -30,7 +30,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: ppc_reloc.c,v 1.45 2010/08/06 16:33:18 joerg Exp $); +__RCSID($NetBSD: ppc_reloc.c,v 1.46 2011/01/16 01:22:29 matt Exp $); #endif /* not lint */ #include stdarg.h @@ -50,10 +50,11 @@ ((u_int32_t)(x) + 0x1) : (u_int32_t)(x)) 16) #define l(x) ((u_int32_t)(x) 0x) -void _rtld_bind_start(void); +void _rtld_bind_bssplt_start(void); +void _rtld_bind_secureplt_start(void); void _rtld_relocate_nonplt_self(Elf_Dyn *, Elf_Addr); caddr_t _rtld_bind(const Obj_Entry *, Elf_Word); -static inline int _rtld_relocate_plt_object(const Obj_Entry *, +static int _rtld_relocate_plt_object(const Obj_Entry *, const Elf_Rela *, int, Elf_Addr *); /* @@ -67,7 +68,7 @@ */ /* - * Setup the plt glue routines. + * Setup the plt glue routines (for bss-plt). */ #define PLTCALL_SIZE 20 #define PLTRESOLVE_SIZE 24 @@ -75,34 +76,42 @@ void _rtld_setup_pltgot(const Obj_Entry *obj) { - Elf_Word *pltcall, *pltresolve; - Elf_Word *jmptab; - int N = obj-pltrelalim - obj-pltrela; - - /* Entries beyond 8192 take twice as much space. */ - if (N 8192) - N += N-8192; - - pltcall = obj-pltgot; - jmptab = pltcall + 18 + N * 2; - - memcpy(pltcall, _rtld_powerpc_pltcall, PLTCALL_SIZE); - pltcall[1] |= ha(jmptab); - pltcall[2] |= l(jmptab); - - pltresolve = obj-pltgot + 8; - - memcpy(pltresolve, _rtld_powerpc_pltresolve, PLTRESOLVE_SIZE); - pltresolve[0] |= ha(_rtld_bind_start); - pltresolve[1] |= l(_rtld_bind_start); - pltresolve[3] |= ha(obj); - pltresolve[4] |= l(obj); - /* - * Invalidate the icache for only the code part of the PLT - * (and not the jump table at the end). + * Secure-PLT is much more sane. */ - __syncicache(pltcall, (char *)jmptab - (char *)pltcall); + if (obj-gotptr != NULL) { + obj-gotptr[1] = (Elf_Addr) _rtld_bind_secureplt_start; + obj-gotptr[2] = (Elf_Addr) obj; + } else { + Elf_Word *pltcall, *pltresolve; + Elf_Word *jmptab; + int
CVS commit: src/lib/libisns
Module Name:src Committed By: agc Date: Sun Jan 16 01:22:51 UTC 2011 Update of /cvsroot/src/lib/libisns In directory ivanova.netbsd.org:/tmp/cvs-serv9549 Log Message: Initial import of libisns, contributed to the NetBSD Foundation by Wasabi Systems, Inc. libisns(3) is an implementation of the iSNS protocol as defined in IETF RFC 4171, exporting an API that simplifies Internet Storage Name Service (iSNS) client implementations. Status: Vendor Tag: WASABI Release Tags: libisns-base N src/lib/libisns/isns_config.h N src/lib/libisns/Makefile N src/lib/libisns/isns.3 N src/lib/libisns/isns.c N src/lib/libisns/isns.h N src/lib/libisns/isns_fileio.c N src/lib/libisns/isns_defs.h N src/lib/libisns/isns_fileio.h N src/lib/libisns/isns_pdu.c N src/lib/libisns/isns_pdu.h N src/lib/libisns/isns_socketio.c N src/lib/libisns/isns_socketio.h N src/lib/libisns/isns_task.c N src/lib/libisns/isns_task.h N src/lib/libisns/isns_thread.c N src/lib/libisns/isns_thread.h N src/lib/libisns/isns_util.c N src/lib/libisns/isns_util.h N src/lib/libisns/shlib_version No conflicts created by this import
CVS commit: src/libexec/ld.elf_so
Module Name:src Committed By: matt Date: Sun Jan 16 02:36:05 UTC 2011 Modified Files: src/libexec/ld.elf_so: Makefile Log Message: Warn about DT_TEXTRELs To generate a diff of this commit: cvs rdiff -u -r1.101 -r1.102 src/libexec/ld.elf_so/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/Makefile diff -u src/libexec/ld.elf_so/Makefile:1.101 src/libexec/ld.elf_so/Makefile:1.102 --- src/libexec/ld.elf_so/Makefile:1.101 Thu Dec 16 22:52:32 2010 +++ src/libexec/ld.elf_so/Makefile Sun Jan 16 02:36:05 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.101 2010/12/16 22:52:32 joerg Exp $ +# $NetBSD: Makefile,v 1.102 2011/01/16 02:36:05 matt Exp $ # # NOTE: when changing ld.so, ensure that ldd still compiles. # @@ -40,6 +40,8 @@ LDFLAGS+= -shared -symbolic -nostartfiles LDFLAGS+= -Wl,-static +LDFLAGS+= -Wl,--warn-shared-textrel + CFLAGS+= -fvisibility=hidden # Adds SRCS, CPPFLAGS, LDFLAGS, etc. Must go first so MD startup source
CVS commit: src/sys/arch/powerpc/include
Module Name:src Committed By: matt Date: Sun Jan 16 02:41:55 UTC 2011 Modified Files: src/sys/arch/powerpc/include: asm.h Log Message: Add PIC_GOTSETUP and PIC_TOCSETUP which replace the old methods to get the GOT (via a bl) to the new REL16 based relocs. This is another step to supporting secure plt. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/arch/powerpc/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/powerpc/include/asm.h diff -u src/sys/arch/powerpc/include/asm.h:1.31 src/sys/arch/powerpc/include/asm.h:1.32 --- src/sys/arch/powerpc/include/asm.h:1.31 Sat Jan 15 07:23:49 2011 +++ src/sys/arch/powerpc/include/asm.h Sun Jan 16 02:41:55 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: asm.h,v 1.31 2011/01/15 07:23:49 matt Exp $ */ +/* $NetBSD: asm.h,v 1.32 2011/01/16 02:41:55 matt Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -46,6 +46,24 @@ #define PIC_PROLOGUE XXX #define PIC_EPILOGUE XXX #define PIC_PLT(x) x@plt +#ifdef __STDC__ +#define PIC_TOCNAME(name) .LCTOC_##name +#else +#define PIC_TOCNAME(name) .LCTOC_/**/name +#endif +#define PIC_TOCSETUP(name, reg) \ + .pushsection .got2,aw;\ + PIC_TOCNAME(name) = . + 32768 ;\ + .popsection ;\ + bcl 20,31,1001f ;\ + 1001: mflr reg ;\ + addis reg,reg,PIC_TOCNAME(name)-1001b@ha ;\ + addi reg,reg,PIC_TOCNAME(name)-1001b@l +#define PIC_GOTSETUP(reg) \ + bcl 20,31,2002f ;\ + 2002: mflr reg ;\ + addis reg,reg,_GLOBAL_OFFSET_TABLE_-2002b@ha ;\ + addi reg,reg,_GLOBAL_OFFSET_TABLE_-2002b@l #ifdef __STDC__ #define PIC_GOT(x) XXX #define PIC_GOTOFF(x) XXX @@ -59,6 +77,8 @@ #define PIC_PLT(x) x #define PIC_GOT(x) x #define PIC_GOTOFF(x) x +#define PIC_GOTSETUP(r) +#define PIC_TOCSETUP(n, r) #endif #endif
CVS commit: src/lib/libc/arch/powerpc
Module Name:src Committed By: matt Date: Sun Jan 16 02:43:11 UTC 2011 Modified Files: src/lib/libc/arch/powerpc: Makefile.inc src/lib/libc/arch/powerpc/gen: swapcontext.S src/lib/libc/arch/powerpc/string: bzero.S src/lib/libc/arch/powerpc/sys: __clone.S brk.S cerror.S ptrace.S sbrk.S Log Message: Switch to the PIC_GOTSETUP/PIC_TOCSETUP macros for PIC code. Now libc will be built to use secureplt by default. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/lib/libc/arch/powerpc/Makefile.inc cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/powerpc/gen/swapcontext.S cvs rdiff -u -r1.8 -r1.9 src/lib/libc/arch/powerpc/string/bzero.S cvs rdiff -u -r1.3 -r1.4 src/lib/libc/arch/powerpc/sys/__clone.S cvs rdiff -u -r1.11 -r1.12 src/lib/libc/arch/powerpc/sys/brk.S cvs rdiff -u -r1.7 -r1.8 src/lib/libc/arch/powerpc/sys/cerror.S cvs rdiff -u -r1.5 -r1.6 src/lib/libc/arch/powerpc/sys/ptrace.S cvs rdiff -u -r1.10 -r1.11 src/lib/libc/arch/powerpc/sys/sbrk.S 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/powerpc/Makefile.inc diff -u src/lib/libc/arch/powerpc/Makefile.inc:1.11 src/lib/libc/arch/powerpc/Makefile.inc:1.12 --- src/lib/libc/arch/powerpc/Makefile.inc:1.11 Sat Jan 15 07:31:12 2011 +++ src/lib/libc/arch/powerpc/Makefile.inc Sun Jan 16 02:43:10 2011 @@ -1,7 +1,8 @@ -# $NetBSD: Makefile.inc,v 1.11 2011/01/15 07:31:12 matt Exp $ +# $NetBSD: Makefile.inc,v 1.12 2011/01/16 02:43:10 matt Exp $ SRCS+= __sigaction14_sigtramp.c __sigtramp2.S -CPPFLAGS+= -D_NOREGNAMES + +CPPFLAGS+= -I. -D_NOREGNAMES .if defined(MKSOFTFLOAT) (${MKSOFTFLOAT} != no) .include softfloat/Makefile.inc Index: src/lib/libc/arch/powerpc/gen/swapcontext.S diff -u src/lib/libc/arch/powerpc/gen/swapcontext.S:1.5 src/lib/libc/arch/powerpc/gen/swapcontext.S:1.6 --- src/lib/libc/arch/powerpc/gen/swapcontext.S:1.5 Sat Jan 15 07:31:12 2011 +++ src/lib/libc/arch/powerpc/gen/swapcontext.S Sun Jan 16 02:43:10 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: swapcontext.S,v 1.5 2011/01/15 07:31:12 matt Exp $ */ +/* $NetBSD: swapcontext.S,v 1.6 2011/01/16 02:43:10 matt Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -32,30 +32,39 @@ #include SYS.h #include assym.h -__RCSID($NetBSD: swapcontext.S,v 1.5 2011/01/15 07:31:12 matt Exp $) +__RCSID($NetBSD: swapcontext.S,v 1.6 2011/01/16 02:43:10 matt Exp $) -#define CALLFRAME_UCP (CALLFRAMELEN - 1*SZREG) -#define CALLFRAME_OUCP (CALLFRAMELEN - 2*SZREG) +#define XCALLFRAMELEN (((2+3)*SZREG + CALLFRAMELEN - 1) -CALLFRAMELEN) +#define XCALLFRAME_R30 (XCALLFRAMELEN-1*SZREG) +#define XCALLFRAME_UCP (XCALLFRAMELEN-2*SZREG) +#define XCALLFRAME_OUCP (XCALLFRAMELEN-3*SZREG) ENTRY(swapcontext) - stwu %r1,-CALLFRAMELEN(%r1) # set up new stack frame + stwu %r1,-XCALLFRAMELEN(%r1) # set up new stack frame mflr %r0 - stw %r0,CALLFRAMELEN+CALLFRAME_LR(%r1) # save link register - stw %r3,CALLFRAME_OUCP(%r1) # must save oucp - stw %r4,CALLFRAME_UCP(%r1) # must save ucp + stw %r0,XCALLFRAMELEN+CALLFRAME_LR(%r1) # save link register + stw %r3,XCALLFRAME_OUCP(%r1) # must save oucp + stw %r4,XCALLFRAME_UCP(%r1) # must save ucp +#ifdef PIC + stw %r30,XCALLFRAME_R30(%r1) # must save r30 + PIC_TOCSETUP(swapcontext,%r30) # setup toc pointer +#endif bl PIC_PLT(_C_LABEL(_getcontext)) # getcontext(oucp) cmpwi %r3,0 bne 1f - lwz %r11,CALLFRAME_OUCP(%r1) # load oucp for adjustment - lwz %r0,CALLFRAMELEN+CALLFRAME_LR(%r1) + lwz %r11,XCALLFRAME_OUCP(%r1) # load oucp for adjustment + lwz %r0,XCALLFRAMELEN+CALLFRAME_LR(%r1) stw %r0,UC_GREGS_PC(%r11) # pc - lr - addi %r0,%r1,CALLFRAMELEN - stw %r0,UC_GREGS_R1(%r11) # save adjusted sp - lwz %r3,CALLFRAME_UCP(%r1) # load ucp + addi %r0,%r1,XCALLFRAMELEN + stw %r0,UC_GREGS_R1(%r11) # adjust sp + lwz %r3,XCALLFRAME_UCP(%r1) # load ucp bl PIC_PLT(_C_LABEL(setcontext)) # setcontext(ucp) 1: - lwz %r0,CALLFRAMELEN+CALLFRAME_LR(%r1) + lwz %r0,XCALLFRAMELEN+CALLFRAME_LR(%r1) +#ifdef PIC + lwz %r30,XCALLFRAME_R30(%r1) +#endif mtlr %r0 - addi %r1,%r1,CALLFRAMELEN + addi %r1,%r1,XCALLFRAMELEN blr END(swapcontext) Index: src/lib/libc/arch/powerpc/string/bzero.S diff -u src/lib/libc/arch/powerpc/string/bzero.S:1.8 src/lib/libc/arch/powerpc/string/bzero.S:1.9 --- src/lib/libc/arch/powerpc/string/bzero.S:1.8 Sat Jan 15 07:31:12 2011 +++ src/lib/libc/arch/powerpc/string/bzero.S Sun Jan 16 02:43:10 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: bzero.S,v 1.8 2011/01/15 07:31:12 matt Exp $ */ +/* $NetBSD: bzero.S,v 1.9 2011/01/16 02:43:10 matt Exp $ */ /*- * Copyright (C) 2001 Martin J. Laubach m...@netbsd.org @@ -32,7 +32,7 @@ #if defined(LIBC_SCCS) !defined(lint) -__RCSID($NetBSD: bzero.S,v 1.8 2011/01/15 07:31:12 matt Exp $) +__RCSID($NetBSD: bzero.S,v 1.9 2011/01/16 02:43:10 matt Exp $) #endif /* LIBC_SCCS !lint */ #ifdef _KERNEL @@ -76,8 +76,7 @@ /* First find out cache line size */
CVS commit: src/lib/libc/compat/arch/powerpc/sys
Module Name:src Committed By: matt Date: Sun Jan 16 02:45:48 UTC 2011 Modified Files: src/lib/libc/compat/arch/powerpc/sys: compat_sigpending13.S Log Message: align comments To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/lib/libc/compat/arch/powerpc/sys/compat_sigpending13.S 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/compat/arch/powerpc/sys/compat_sigpending13.S diff -u src/lib/libc/compat/arch/powerpc/sys/compat_sigpending13.S:1.2 src/lib/libc/compat/arch/powerpc/sys/compat_sigpending13.S:1.3 --- src/lib/libc/compat/arch/powerpc/sys/compat_sigpending13.S:1.2 Sat Jan 15 07:31:13 2011 +++ src/lib/libc/compat/arch/powerpc/sys/compat_sigpending13.S Sun Jan 16 02:45:48 2011 @@ -1,20 +1,20 @@ -/* $NetBSD: compat_sigpending13.S,v 1.2 2011/01/15 07:31:13 matt Exp $ */ +/* $NetBSD: compat_sigpending13.S,v 1.3 2011/01/16 02:45:48 matt Exp $ */ #include SYS.h #if defined(LIBC_SCCS) -__RCSID($NetBSD: compat_sigpending13.S,v 1.2 2011/01/15 07:31:13 matt Exp $) +__RCSID($NetBSD: compat_sigpending13.S,v 1.3 2011/01/16 02:45:48 matt Exp $) #endif WARN_REFERENCES(sigpending, \ warning: reference to compatibility sigpending(); include signal.h for correct reference) ENTRY(sigpending) - mr %r5,%r3 # save pointer - _DOSYSCALL(compat_13_sigpending13) # sigpending() + mr %r5,%r3# save pointer + _DOSYSCALL(compat_13_sigpending13) # sigpending() bso 1f - stw %r3,0(%r5) # store return value - li %r3,0 # and return 0 + stw %r3,0(%r5) # store return value + li %r3,0# and return 0 blr 1: b _C_LABEL(__cerror)
CVS commit: src/lib/libedit
Module Name:src Committed By: christos Date: Sun Jan 16 03:05:51 UTC 2011 Modified Files: src/lib/libedit: history.c Log Message: off by one in fetching history data. From: Gerry Swislow To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/lib/libedit/history.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/libedit/history.c diff -u src/lib/libedit/history.c:1.37 src/lib/libedit/history.c:1.38 --- src/lib/libedit/history.c:1.37 Sun Jan 3 13:27:10 2010 +++ src/lib/libedit/history.c Sat Jan 15 22:05:51 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: history.c,v 1.37 2010/01/03 18:27:10 christos Exp $ */ +/* $NetBSD: history.c,v 1.38 2011/01/16 03:05:51 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = @(#)history.c 8.1 (Berkeley) 6/4/93; #else -__RCSID($NetBSD: history.c,v 1.37 2010/01/03 18:27:10 christos Exp $); +__RCSID($NetBSD: history.c,v 1.38 2011/01/16 03:05:51 christos Exp $); #endif #endif /* not lint not SCCSID */ @@ -857,7 +857,7 @@ int retval; for (retval = HCURR(h, ev); retval != -1; retval = HPREV(h, ev)) - if (num-- = 0) { + if (ev-num == num) { if (d) *d = ((history_t *)h-h_ref)-cursor-data; return (0);
CVS commit: src/sys/lib/libkern/arch/powerpc
Module Name:src Committed By: matt Date: Sun Jan 16 03:22:19 UTC 2011 Modified Files: src/sys/lib/libkern/arch/powerpc: Makefile.inc Log Message: Add -D_NOREGNAMES To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/lib/libkern/arch/powerpc/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/powerpc/Makefile.inc diff -u src/sys/lib/libkern/arch/powerpc/Makefile.inc:1.28 src/sys/lib/libkern/arch/powerpc/Makefile.inc:1.29 --- src/sys/lib/libkern/arch/powerpc/Makefile.inc:1.28 Fri Aug 14 19:23:54 2009 +++ src/sys/lib/libkern/arch/powerpc/Makefile.inc Sun Jan 16 03:22:19 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.28 2009/08/14 19:23:54 dsl Exp $ +# $NetBSD: Makefile.inc,v 1.29 2011/01/16 03:22:19 matt Exp $ SRCS+= bswap16.c bswap32.c SRCS+= htonl.c htons.c ntohl.c ntohs.c @@ -6,6 +6,8 @@ SRCS+= ffs.S memset.S strlen.S +CPPFLAGS+= -D_NOREGNAMES + # Disable the asm versions on evbppc because they break the Explora .if ${MACHINE} == evbppc memcpy.o: memcpy.c
CVS commit: src/lib
Module Name:src Committed By: matt Date: Sun Jan 16 03:29:36 UTC 2011 Modified Files: src/lib/libposix/sys: Makefile.inc src/lib/librt/sys: Makefile.inc Log Message: For cerror, allow -I../libc to allow inclusion of any assym.h, if up. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/lib/libposix/sys/Makefile.inc cvs rdiff -u -r1.6 -r1.7 src/lib/librt/sys/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/libposix/sys/Makefile.inc diff -u src/lib/libposix/sys/Makefile.inc:1.20 src/lib/libposix/sys/Makefile.inc:1.21 --- src/lib/libposix/sys/Makefile.inc:1.20 Fri Jan 14 05:20:00 2011 +++ src/lib/libposix/sys/Makefile.inc Sun Jan 16 03:29:36 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.20 2011/01/14 05:20:00 matt Exp $ +# $NetBSD: Makefile.inc,v 1.21 2011/01/16 03:29:36 matt Exp $ # sys sources .PATH: ${.CURDIR}/sys @@ -11,7 +11,7 @@ CLEANFILES+= ${PSEUDO} SRCS+= cerror.S -CPPFLAGS+= -D__cerror=__posix_cerror +CPPFLAGS+= -D__cerror=__posix_cerror -I../libc ASMDEPS= ${.CURDIR}/sys/Makefile.inc ${ARCHDIR}/SYS.h \ ${DESTDIR}/usr/include/sys/syscall.h Index: src/lib/librt/sys/Makefile.inc diff -u src/lib/librt/sys/Makefile.inc:1.6 src/lib/librt/sys/Makefile.inc:1.7 --- src/lib/librt/sys/Makefile.inc:1.6 Fri Jan 14 05:19:59 2011 +++ src/lib/librt/sys/Makefile.inc Sun Jan 16 03:29:36 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.6 2011/01/14 05:19:59 matt Exp $ +# $NetBSD: Makefile.inc,v 1.7 2011/01/16 03:29:36 matt Exp $ .PATH: ${.CURDIR}/sys .PATH: ${ARCHDIR}/sys @@ -13,7 +13,7 @@ CLEANFILES+= ${ASM} SRCS+= cerror.S -CPPFLAGS+= -D__cerror=__rt_cerror +CPPFLAGS+= -D__cerror=__rt_cerror -I../libc ASMDEPS= ${.CURDIR}/sys/Makefile.inc ${ARCHDIR}/SYS.h \ ${DESTDIR}/usr/include/sys/syscall.h