public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nikolay Borisov <kernel@kyup.com>
To: herton@redhat.com, fabf@skynet.be
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Subject: Re: [PATCH] Add ability to override kernel release check
Date: Thu, 29 Sep 2016 16:15:50 +0300	[thread overview]
Message-ID: <57ED1406.80204@kyup.com> (raw)
In-Reply-To: <1475154874-6314-1-git-send-email-kernel@kyup.com>



On 09/29/2016 04:14 PM, Nikolay Borisov wrote:
> From: Nikolay Borisov <n.borisov@siteground.com>
> 
> 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 <n.borisov@siteground.com>
> ---
>  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 :(

      reply	other threads:[~2016-09-29 13:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-29 13:14 [PATCH] Add ability to override kernel release check Nikolay Borisov
2016-09-29 13:15 ` Nikolay Borisov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57ED1406.80204@kyup.com \
    --to=kernel@kyup.com \
    --cc=akpm@linux-foundation.org \
    --cc=fabf@skynet.be \
    --cc=herton@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox