diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2008-11-26 17:39:33 -0500 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2008-11-26 17:43:07 -0500 |
commit | 62794910c3ec360552209063fc2b9295e3382ca3 (patch) | |
tree | 0b64327cf4e95c95c8412b75e362d7da154c44ee | |
parent | 557320bbd95429836d2a077ac81337fcc3d3d354 (diff) | |
download | systemtap-steved-62794910c3ec360552209063fc2b9295e3382ca3.tar.gz systemtap-steved-62794910c3ec360552209063fc2b9295e3382ca3.tar.xz systemtap-steved-62794910c3ec360552209063fc2b9295e3382ca3.zip |
PR4886: enable assertive build-id checking for new kernels
-rw-r--r-- | runtime/ChangeLog | 6 | ||||
-rw-r--r-- | runtime/sym.c | 13 | ||||
-rw-r--r-- | translate.cxx | 2 |
3 files changed, 18 insertions, 3 deletions
diff --git a/runtime/ChangeLog b/runtime/ChangeLog index f3c5f2e3..93ee18d2 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,5 +1,11 @@ 2008-11-26 Frank Ch. Eigler <fche@elastic.org> + PR 4886. + * sym.c (_stp_module_check): Perform assertive + build-id checking for kernel versions >= 2.6.27. + +2008-11-26 Frank Ch. Eigler <fche@elastic.org> + * autoconf-synchronize-sched.c: New file. 2008-11-25 Frank Ch. Eigler <fche@elastic.org> diff --git a/runtime/sym.c b/runtime/sym.c index d7b079d2..06ac14a5 100644 --- a/runtime/sym.c +++ b/runtime/sym.c @@ -205,14 +205,23 @@ static int _stp_module_check(void) /* XXX: consider using kread() instead of above. */ if (theory != practice) { + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) + _stp_error ("%s: inconsistent %s build-id byte #%d " + "(0x%x [actual] vs. 0x%x [debuginfo])\n", + THIS_MODULE->name, m->name, j, + practice, theory); + return 1; + #else + /* This branch is a surrogate for + kernels affected by Fedora bug + #465873. */ printk(KERN_WARNING "%s: inconsistent %s build-id byte #%d " "(0x%x [actual] vs. 0x%x [debuginfo])\n", THIS_MODULE->name, m->name, j, practice, theory); break; /* Note just the first mismatch. */ - /* XXX: If it were not for Fedora bug #465873, - we could "return 1;" here to abort the script. */ + #endif } } } diff --git a/translate.cxx b/translate.cxx index 41a424ed..49a86160 100644 --- a/translate.cxx +++ b/translate.cxx @@ -1124,7 +1124,7 @@ c_unparser::emit_module_init () o->newline() << "rc = -EINVAL;"; o->newline(-1) << "}"; - // XXX: perform buildid-based checking if able + // perform buildid-based checking if able o->newline() << "if (_stp_module_check()) rc = -EINVAL;"; o->newline(-1) << "}"; |