ia64/xen-unstable

annotate stubdom/newlib-chk.patch @ 19828:180ae4bca33e

VT-d: don't disable VT-d engine in suspend for security purpose

force_iommu option is used to force enabling and using IOMMU for
security purpose. So when force_iommu is set, it shouldn't disable
VT-d engines in suspend.

Signed-off-by: Weidong Han <weidong.han@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Jun 24 11:15:31 2009 +0100 (2009-06-24)
parents dbc4014882d0
children
rev   line source
keir@19482 1 --- newlib/libc/stdio/fprintf_chk.c 1969-12-31 19:00:00.000000000 -0500
keir@19482 2 +++ newlib/libc/stdio/fprintf_chk.c 2009-02-26 19:02:53.000000000 -0500
keir@19481 3 @@ -0,0 +1,21 @@
keir@19481 4 +#include <stdarg.h>
keir@19481 5 +#include <stdio.h>
keir@19481 6 +
keir@19481 7 +/*
keir@19481 8 + * Stub implementation of __fprintf_chk adapted from glibc 2.7. This
keir@19481 9 + * doesn't actually implement any buffer overflow protection. It just makes
keir@19481 10 + * the linker happy :)
keir@19481 11 +*/
keir@19481 12 +int
keir@19481 13 +__fprintf_chk (FILE *fp, int flag, const char *format, ...)
keir@19481 14 +{
keir@19481 15 + va_list ap;
keir@19481 16 + int done;
keir@19481 17 +
keir@19481 18 + va_start (ap, format);
keir@19481 19 + done = vfprintf (fp, format, ap);
keir@19481 20 + va_end (ap);
keir@19481 21 +
keir@19481 22 + return done;
keir@19481 23 +}
keir@19481 24 +
keir@19482 25 --- newlib/libc/stdio/Makefile.am 2007-08-02 16:23:06.000000000 -0400
keir@19482 26 +++ newlib/libc/stdio/Makefile.am 2009-02-26 18:14:53.000000000 -0500
keir@19481 27 @@ -20,6 +20,7 @@
keir@19481 28 flags.c \
keir@19481 29 fopen.c \
keir@19481 30 fprintf.c \
keir@19481 31 + fprintf_chk.c \
keir@19481 32 fputc.c \
keir@19481 33 fputs.c \
keir@19481 34 fread.c \
keir@19481 35 @@ -65,6 +66,7 @@
keir@19481 36 sniprintf.c \
keir@19481 37 snprintf.c \
keir@19481 38 sprintf.c \
keir@19481 39 + sprintf_chk.c \
keir@19481 40 sscanf.c \
keir@19481 41 stdio.c \
keir@19481 42 tmpfile.c \
keir@19482 43 --- newlib/libc/stdio/Makefile.in 2007-12-19 17:36:38.000000000 -0500
keir@19482 44 +++ newlib/libc/stdio/Makefile.in 2009-02-26 18:43:52.000000000 -0500
keir@19481 45 @@ -63,7 +63,8 @@
keir@19481 46 lib_a-fgets.$(OBJEXT) lib_a-fileno.$(OBJEXT) \
keir@19481 47 lib_a-findfp.$(OBJEXT) lib_a-fiprintf.$(OBJEXT) \
keir@19481 48 lib_a-flags.$(OBJEXT) lib_a-fopen.$(OBJEXT) \
keir@19481 49 - lib_a-fprintf.$(OBJEXT) lib_a-fputc.$(OBJEXT) \
keir@19481 50 + lib_a-fprintf.$(OBJEXT) lib_a-fprintf_chk.$(OBJEXT) \
keir@19481 51 + lib_a-fputc.$(OBJEXT) \
keir@19481 52 lib_a-fputs.$(OBJEXT) lib_a-fread.$(OBJEXT) \
keir@19481 53 lib_a-freopen.$(OBJEXT) lib_a-fscanf.$(OBJEXT) \
keir@19481 54 lib_a-fiscanf.$(OBJEXT) lib_a-fseek.$(OBJEXT) \
keir@19481 55 @@ -86,6 +87,7 @@
keir@19481 56 lib_a-setvbuf.$(OBJEXT) lib_a-siprintf.$(OBJEXT) \
keir@19481 57 lib_a-siscanf.$(OBJEXT) lib_a-sniprintf.$(OBJEXT) \
keir@19481 58 lib_a-snprintf.$(OBJEXT) lib_a-sprintf.$(OBJEXT) \
keir@19481 59 + lib_a-sprintf_chk.$(OBJEXT) \
keir@19481 60 lib_a-sscanf.$(OBJEXT) lib_a-stdio.$(OBJEXT) \
keir@19481 61 lib_a-tmpfile.$(OBJEXT) lib_a-tmpnam.$(OBJEXT) \
keir@19481 62 lib_a-ungetc.$(OBJEXT) lib_a-vdiprintf.$(OBJEXT) \
keir@19481 63 @@ -122,15 +124,15 @@
keir@19481 64 LTLIBRARIES = $(noinst_LTLIBRARIES)
keir@19481 65 am__objects_4 = clearerr.lo fclose.lo fdopen.lo feof.lo ferror.lo \
keir@19481 66 fflush.lo fgetc.lo fgetpos.lo fgets.lo fileno.lo findfp.lo \
keir@19481 67 - fiprintf.lo flags.lo fopen.lo fprintf.lo fputc.lo fputs.lo \
keir@19481 68 - fread.lo freopen.lo fscanf.lo fiscanf.lo fseek.lo fsetpos.lo \
keir@19481 69 + fiprintf.lo flags.lo fopen.lo fprintf.lo fprintf_chk.lo fputc.lo \
keir@19481 70 + fputs.lo fread.lo freopen.lo fscanf.lo fiscanf.lo fseek.lo fsetpos.lo \
keir@19481 71 ftell.lo fvwrite.lo fwalk.lo fwrite.lo getc.lo getchar.lo \
keir@19481 72 getc_u.lo getchar_u.lo getdelim.lo getline.lo gets.lo \
keir@19481 73 iprintf.lo iscanf.lo makebuf.lo perror.lo printf.lo putc.lo \
keir@19481 74 putchar.lo putc_u.lo putchar_u.lo puts.lo refill.lo remove.lo \
keir@19481 75 rename.lo rewind.lo rget.lo scanf.lo sccl.lo setbuf.lo \
keir@19481 76 setbuffer.lo setlinebuf.lo setvbuf.lo siprintf.lo siscanf.lo \
keir@19481 77 - sniprintf.lo snprintf.lo sprintf.lo sscanf.lo stdio.lo \
keir@19481 78 + sniprintf.lo snprintf.lo sprintf.lo sprintf_chk.lo sscanf.lo stdio.lo \
keir@19481 79 tmpfile.lo tmpnam.lo ungetc.lo vdiprintf.lo vdprintf.lo \
keir@19481 80 viprintf.lo viscanf.lo vprintf.lo vscanf.lo vsiprintf.lo \
keir@19481 81 vsiscanf.lo vsnprintf.lo vsniprintf.lo vsprintf.lo vsscanf.lo \
keir@19481 82 @@ -344,6 +346,7 @@
keir@19481 83 flags.c \
keir@19481 84 fopen.c \
keir@19481 85 fprintf.c \
keir@19481 86 + fprintf_chk.c \
keir@19481 87 fputc.c \
keir@19481 88 fputs.c \
keir@19481 89 fread.c \
keir@19481 90 @@ -389,6 +392,7 @@
keir@19481 91 sniprintf.c \
keir@19481 92 snprintf.c \
keir@19481 93 sprintf.c \
keir@19481 94 + sprintf_chk.c \
keir@19481 95 sscanf.c \
keir@19481 96 stdio.c \
keir@19481 97 tmpfile.c \
keir@19481 98 @@ -508,6 +512,7 @@
keir@19481 99 siprintf.def \
keir@19481 100 siscanf.def \
keir@19481 101 sprintf.def \
keir@19481 102 + sprintf_chk.def \
keir@19481 103 sscanf.def \
keir@19481 104 tmpfile.def \
keir@19481 105 tmpnam.def \
keir@19481 106 @@ -678,6 +683,12 @@
keir@19481 107 lib_a-fprintf.obj: fprintf.c
keir@19481 108 $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fprintf.obj `if test -f 'fprintf.c'; then $(CYGPATH_W) 'fprintf.c'; else $(CYGPATH_W) '$(srcdir)/fprintf.c'; fi`
keir@19481 109
keir@19481 110 +lib_a-fprintf_chk.o: fprintf_chk.c
keir@19481 111 + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fprintf_chk.o `test -f 'fprintf_chk.c' || echo '$(srcdir)/'`fprintf_chk.c
keir@19481 112 +
keir@19481 113 +lib_a-fprintf_chk.obj: fprintf_chk.c
keir@19481 114 + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fprintf_chk.obj `if test -f 'fprintf_chk.c'; then $(CYGPATH_W) 'fprintf_chk.c'; else $(CYGPATH_W) '$(srcdir)/fprintf_chk.c'; fi`
keir@19481 115 +
keir@19481 116 lib_a-fputc.o: fputc.c
keir@19481 117 $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fputc.o `test -f 'fputc.c' || echo '$(srcdir)/'`fputc.c
keir@19481 118
keir@19481 119 @@ -948,6 +959,12 @@
keir@19481 120 lib_a-sprintf.obj: sprintf.c
keir@19481 121 $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sprintf.obj `if test -f 'sprintf.c'; then $(CYGPATH_W) 'sprintf.c'; else $(CYGPATH_W) '$(srcdir)/sprintf.c'; fi`
keir@19481 122
keir@19481 123 +lib_a-sprintf_chk.o: sprintf_chk.c
keir@19481 124 + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sprintf_chk.o `test -f 'sprintf_chk.c' || echo '$(srcdir)/'`sprintf_chk.c
keir@19481 125 +
keir@19481 126 +lib_a-sprintf_chk.obj: sprintf_chk.c
keir@19481 127 + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sprintf_chk.obj `if test -f 'sprintf_chk.c'; then $(CYGPATH_W) 'sprintf_chk.c'; else $(CYGPATH_W) '$(srcdir)/sprintf_chk.c'; fi`
keir@19481 128 +
keir@19481 129 lib_a-sscanf.o: sscanf.c
keir@19481 130 $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sscanf.o `test -f 'sscanf.c' || echo '$(srcdir)/'`sscanf.c
keir@19481 131
keir@19482 132 --- newlib/libc/stdio/sprintf_chk.c 1969-12-31 19:00:00.000000000 -0500
keir@19482 133 +++ newlib/libc/stdio/sprintf_chk.c 2009-02-26 19:02:26.000000000 -0500
keir@19481 134 @@ -0,0 +1,21 @@
keir@19481 135 +#include <stdarg.h>
keir@19481 136 +#include <stdio.h>
keir@19481 137 +
keir@19481 138 +/*
keir@19481 139 + * Stub implementation of __sprintf_chk adapted from glibc 2.7. This
keir@19481 140 + * doesn't actually implement any buffer overflow protection. It just makes
keir@19481 141 + * the linker happy :)
keir@19481 142 +*/
keir@19481 143 +int
keir@19481 144 +__sprintf_chk (char *s, int flags, size_t slen, const char *format, ...)
keir@19481 145 +{
keir@19481 146 + va_list arg;
keir@19481 147 + int done;
keir@19481 148 +
keir@19481 149 + va_start (arg, format);
keir@19481 150 + done = vsprintf (s, format, arg);
keir@19481 151 + va_end (arg);
keir@19481 152 +
keir@19481 153 + return done;
keir@19481 154 +}
keir@19481 155 +