From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755338AbcI2NQE (ORCPT ); Thu, 29 Sep 2016 09:16:04 -0400 Received: from mail-wm0-f54.google.com ([74.125.82.54]:35799 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754226AbcI2NPz (ORCPT ); Thu, 29 Sep 2016 09:15:55 -0400 Subject: Re: [PATCH] Add ability to override kernel release check To: herton@redhat.com, fabf@skynet.be References: <1475154874-6314-1-git-send-email-kernel@kyup.com> Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org From: Nikolay Borisov Message-ID: <57ED1406.80204@kyup.com> Date: Thu, 29 Sep 2016 16:15:50 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <1475154874-6314-1-git-send-email-kernel@kyup.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/29/2016 04:14 PM, Nikolay Borisov wrote: > From: Nikolay Borisov > > In some situation it might be useful to disable checking the > kernel release. This happens when a kernel module is being rebuilt > and then probed. Without this override one has to reboot the machine > with the new kernel (and module) and then use systemtap. > > To rectify the situation add a new define STP_NO_VERREL_CHECK, > which disables the relevant code in the resulting systemtap module. > > This can be used with the following syntax: > stap -DSTP_NO_VERREL_CHECK script.stp > > Signed-off-by: Nikolay Borisov > --- > translate.cxx | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/translate.cxx b/translate.cxx > index 489bd2e2de1a..f792343e0cae 100644 > --- a/translate.cxx > +++ b/translate.cxx > @@ -1728,6 +1728,7 @@ c_unparser::emit_module_init () > // run a probe compiled for a different version. Catch this early, > // just in case modversions didn't. > o->newline() << "{"; > + o->newline() << "#ifndef STP_NO_VERREL_CHECK"; > o->newline(1) << "const char* release = UTS_RELEASE;"; > o->newline() << "#ifdef STAPCONF_GENERATED_COMPILE"; > o->newline() << "const char* version = UTS_VERSION;"; > @@ -1762,6 +1763,7 @@ c_unparser::emit_module_init () > o->newline() << "rc = -EINVAL;"; > o->newline(-1) << "}"; > o->newline() << "#endif"; > + o->newline() << "#endif"; > > // perform buildid-based checking if able > o->newline() << "if (_stp_module_check()) rc = -EINVAL;"; > Please ignore, that was clearly an error... silly me :(