diff options
-rw-r--r-- | ChangeLog | 18 | ||||
-rwxr-xr-x | configure | 17 | ||||
-rw-r--r-- | configure.ac | 10 | ||||
-rwxr-xr-x | examples/small_demos/prof.stp | 2 | ||||
-rw-r--r-- | runtime/staprun/ChangeLog | 5 | ||||
-rw-r--r-- | runtime/staprun/symbols.c | 4 | ||||
-rw-r--r-- | systemtap.spec.in | 2 | ||||
-rw-r--r-- | tapsets.cxx | 7 | ||||
-rw-r--r-- | testsuite/ChangeLog | 11 | ||||
-rw-r--r-- | testsuite/lib/stap_run.exp | 11 | ||||
-rwxr-xr-x | testsuite/systemtap.syscall/alarm.c | 12 | ||||
-rw-r--r-- | testsuite/systemtap.syscall/stat.c | 9 |
12 files changed, 98 insertions, 10 deletions
@@ -1,3 +1,21 @@ +2008-01-12 Frank Ch. Eigler <fche@elastic.org> + + PR 5603. + * configure.ac: Add "--enable-ssp" to select -fstack-protector-all + and similar runtime checking directives. + * configure: Regenerated. + +2008-01-09 David Smith <dsmith@redhat.com> + + * systemtap.spec.in: Since "make check" was removed + from the rpm build step, we no longer need to require dejagnu at + build time. + +2008-01-09 Frank Ch. Eigler <fche@elastic.org> + + * tapsets.cxx (dwflpp::setup): Improve missing kernel-debuginfo + message. + 2008-01-02 Frank Ch. Eigler <fche@elastic.org> From Mark McLoughlin <markmc@redhat.com>: @@ -1312,6 +1312,7 @@ Optional Features: --enable-dependency-tracking do not reject slow dependency extractors --enable-perfmon enable perfmon support (default is disabled) --enable-prologues make -P prologue-searching default + --enable-ssp enable gcc stack-protector Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -5822,6 +5823,8 @@ fi + + # Check whether --enable-perfmon was given. if test "${enable_perfmon+set}" = set; then enableval=$enable_perfmon; perfmon_support=$enableval @@ -6033,6 +6036,20 @@ sqlite3_LIBS="$LIBS" LIBS="$SAVE_LIBS" + +# Check whether --enable-ssp was given. +if test "${enable_ssp+set}" = set; then + enableval=$enable_ssp; +fi + +if test "x$enable_ssp" == xyes; then + CFLAGS="$CFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" + CXXFLAGS="$CXXFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" + { echo "$as_me:$LINENO: Compiling with gcc -fstack-protector-all et al." >&5 +echo "$as_me: Compiling with gcc -fstack-protector-all et al." >&6;} +fi + + build_elfutils=no # Check whether --with-elfutils was given. diff --git a/configure.ac b/configure.ac index d2a150b0..522af8d7 100644 --- a/configure.ac +++ b/configure.ac @@ -25,6 +25,8 @@ AC_PROG_MAKE_SET AC_SUBST(CFLAGS) AC_SUBST(CXXFLAGS) + + dnl enable option to generate code for using perfmon AC_ARG_ENABLE(perfmon, [ --enable-perfmon enable perfmon support (default is disabled)], @@ -81,6 +83,14 @@ sqlite3_LIBS="$LIBS" AC_SUBST(sqlite3_LIBS) LIBS="$SAVE_LIBS" + +AC_ARG_ENABLE([ssp], + [AC_HELP_STRING([--enable-ssp], [enable gcc stack-protector])]) +AS_IF([test "x$enable_ssp" == xyes], + [CFLAGS="$CFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" + CXXFLAGS="$CXXFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2" + AC_MSG_NOTICE([Compiling with gcc -fstack-protector-all et al.])]) + build_elfutils=no AC_ARG_WITH([elfutils], AC_HELP_STRING([--with-elfutils=DIRECTORY], diff --git a/examples/small_demos/prof.stp b/examples/small_demos/prof.stp index e08aa21c..389f743a 100755 --- a/examples/small_demos/prof.stp +++ b/examples/small_demos/prof.stp @@ -28,7 +28,7 @@ probe kernel.function("sys_*").return { probe end { printf("\n") foreach (x in ttime) - printf("%-20s\tcalls:%6d\tavg time (ms):%5d\ttotal(ms):%7d\n", + printf("%-20s\tcalls:%6d\tavg time (us):%5d\ttotal(us):%7d\n", x, @count(ttime[x]), @avg(ttime[x]), @sum(ttime[x])) } diff --git a/runtime/staprun/ChangeLog b/runtime/staprun/ChangeLog index 5cd036fd..a7b00a9c 100644 --- a/runtime/staprun/ChangeLog +++ b/runtime/staprun/ChangeLog @@ -1,3 +1,8 @@ +2008-01-12 Frank Ch. Eigler <fche@elastic.org> + + PR 5603 horrible hack. + * symbols.c (do_kernel_symbols): Make buf[256] instead of [128]. + 2007-12-11 Martin Hunt <hunt@redhat.com> PR5368 * relay_old.c (init_oldrelayfs): Don't start threads diff --git a/runtime/staprun/symbols.c b/runtime/staprun/symbols.c index 315362fa..e4d96ee0 100644 --- a/runtime/staprun/symbols.c +++ b/runtime/staprun/symbols.c @@ -198,7 +198,7 @@ void do_kernel_symbols(void) { FILE *kallsyms=NULL; char *sym_base=NULL, *data_base=NULL; - char buf[128], *ptr, *name, *data, *dataptr, *datamax, type; + char buf[256], *ptr, *name, *data, *dataptr, *datamax, type; unsigned long addr; struct _stp_symbol *syms; int num_syms, i = 0, max_syms= MAX_SYMBOLS; @@ -226,7 +226,7 @@ void do_kernel_symbols(void) /* put empty string in data */ *dataptr++ = 0; - while (fgets_unlocked(buf, 128, kallsyms) && dataptr < datamax) { + while (fgets_unlocked(buf, 256, kallsyms) && dataptr < datamax) { addr = strtoul(buf, &ptr, 16); while (isspace(*ptr)) ptr++; type = *ptr++; diff --git a/systemtap.spec.in b/systemtap.spec.in index 576626d7..21acffc0 100644 --- a/systemtap.spec.in +++ b/systemtap.spec.in @@ -47,8 +47,6 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: kernel >= 2.6.9-11 BuildRequires: libcap-devel -# make check -BuildRequires: dejagnu %if %{sqlite} BuildRequires: sqlite-devel Requires: sqlite diff --git a/tapsets.cxx b/tapsets.cxx index d2cd3bcd..ebc07ba3 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -746,7 +746,12 @@ struct dwflpp /* selection predicate */ NULL); if (debuginfo_needed) - dwfl_assert ("missing kernel debuginfo", rc); + dwfl_assert (string("missing kernel ") + + sess.kernel_release + + string(" ") + + sess.architecture + + string(" debuginfo"), + rc); // XXX: it would be nice if we could do a single // ..._report_offline call for an entire systemtap script, so diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index 42de95f4..d8d26ce9 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2008-01-09 Masami Hiramatsu <mhiramat@redhat.com> + + PR5554 + * systemtap.syscall/alarm.c: Fix expected output patterns on ia64. + * systemtap.syscall/stat.c: Ditto. + +2008-01-09 Masami Hiramatsu <mhiramat@redhat.com> + + PR5544 + * lib/stap_run.exp (stap_run): Support warning before ending probe. + 2008-01-07 William Cohen <wcohen@redhat.com> * lib/systemtap.exp (as_root): new proc. * systemtap.context/context.exp: diff --git a/testsuite/lib/stap_run.exp b/testsuite/lib/stap_run.exp index c9131562..5bd1549c 100644 --- a/testsuite/lib/stap_run.exp +++ b/testsuite/lib/stap_run.exp @@ -22,6 +22,7 @@ proc stap_run { TEST_NAME {LOAD_GEN_FUNCTION ""} {OUTPUT_CHECK_STRING ""} args } # initialize probe_errors and skipped_probes to 0 set probe_errors 0 set skipped_probes 0 + set warning_regexp {^WARNING: Number of errors: ([0-9]+), skipped probes: ([0-9]+)\r\n} if {[info procs installtest_p] != "" && ![installtest_p]} { untested $TEST_NAME; return } @@ -56,6 +57,10 @@ proc stap_run { TEST_NAME {LOAD_GEN_FUNCTION ""} {OUTPUT_CHECK_STRING ""} args } expect { -timeout 20 + -re $warning_regexp { + set probe_errors $expect_out(1,string) + set skipped_probes $expect_out(2,string) + exp_continue} -re $output { pass "$TEST_NAME shutdown and output" expect { @@ -63,9 +68,9 @@ proc stap_run { TEST_NAME {LOAD_GEN_FUNCTION ""} {OUTPUT_CHECK_STRING ""} args } -re {^Pass\ ([5]):[^\r]*\ in\ ([0-9]+)usr/([0-9]+)sys/([0-9]+)real\ ms\.\r\n} {set pass$expect_out(1,string) "\t$expect_out(2,string)\t$expect_out(3,string)\t$expect_out(4,string)" verbose -log "metric:\t$TEST_NAME $pass1$pass2$pass3$pass4$pass5"} - -re {^WARNING: Number of errors: ([0-9]+), skipped probes: ([0-9]+)\r\n} - {set probe_errors $expect_out(1,string) - set skipped_probes $expect_out(2,string)} + -re $warning_regexp { + set probe_errors $expect_out(1,string) + set skipped_probes $expect_out(2,string)} } } timeout { fail "$TEST_NAME shutdown (timeout)" } diff --git a/testsuite/systemtap.syscall/alarm.c b/testsuite/systemtap.syscall/alarm.c index bae92253..7cb17164 100755 --- a/testsuite/systemtap.syscall/alarm.c +++ b/testsuite/systemtap.syscall/alarm.c @@ -19,13 +19,25 @@ int main() sigaction(SIGALRM, &sigrt_act, NULL); alarm(1); +#ifdef __ia64__ + // setitimer (ITIMER_REAL, \[0.000000,1.000000\], XXXX) = 0 +#else // alarm (1) = 0 +#endif pause(); +#ifdef __ia64__ + // rt_sigsuspend () = +#else // pause () = +#endif alarm(0); +#ifdef __ia64__ + // setitimer (ITIMER_REAL, \[0.000000,0.000000\], XXXX) = 0 +#else // alarm (0) = 0 +#endif sleep(1); // nanosleep (\[1.000000000\], XXXX) = 0 diff --git a/testsuite/systemtap.syscall/stat.c b/testsuite/systemtap.syscall/stat.c index 1b31d816..deade3e0 100644 --- a/testsuite/systemtap.syscall/stat.c +++ b/testsuite/systemtap.syscall/stat.c @@ -36,12 +36,19 @@ int main() ubuf.actime = 1; ubuf.modtime = 1135641600; utime("foobar", &ubuf); +#ifdef __ia64__ + // utimes ("foobar", \[1.000000\]\[1135641600.000000\]) = +#else // utime ("foobar", \[1970/01/01-00:00:01, 2005/12/27-00:00:00\]) = 0 +#endif ubuf.actime = 1135690000; ubuf.modtime = 1135700000; utime("foobar", &ubuf); +#ifdef __ia64__ + // utimes ("foobar", \[1135690000.000000\]\[1135700000.000000\]) = +#else // utime ("foobar", \[2005/12/27-13:26:40, 2005/12/27-16:13:20\]) = 0 - +#endif return 0; } |