mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rusty Lynch" <rusty@linux.co.intel.com>
To: "Rusty Lynch" <rusty@linux.co.intel.com>,
	"Arjan van de Ven" <arjanv@redhat.com>, "Andi Kleen" <ak@suse.de>
Cc: <linux-kernel@vger.kernel.org>, <rusty@linux.co.intel.com>
Subject: Re: [PATCH][2.5.47]Add exported valid_kernel_address()
Date: Wed, 13 Nov 2002 14:30:32 -0800	[thread overview]
Message-ID: <01b101c28b64$47301880$77d40a0a@amr.corp.intel.com> (raw)
In-Reply-To: <013101c28b5b$0efcab80$77d40a0a@amr.corp.intel.com>

To clarify further, I am talking about the sample driver I submitted earlier
at
http://marc.theaimsgroup.com/?l=linux-kernel&m=103721364225087&w=2

The patch implements a char device that enables arbitrary printk's to be
inserted at in arbitrary kernel addresses.  It is used by writing strings of
the
form "0xADDRESS MESSAGE" to the device.

I was looking for a way to verify the address passed in was valid before
creating and inserting a new probe.

Maybe there is a better way to verify a kernel address is valid before
messing
with it?

    -rusty
----- Original Message -----
From: "Rusty Lynch" <rusty@linux.co.intel.com>
To: "Arjan van de Ven" <arjanv@redhat.com>; "Andi Kleen" <ak@suse.de>
Cc: <linux-kernel@vger.kernel.org>; <rusty@linux.co.intel.com>
Sent: Wednesday, November 13, 2002 1:24 PM
Subject: Re: [PATCH][2.5.47]Add exported valid_kernel_address()


> I had a need for it in a sample kprobes driver where I wanted to verify
that
> some address
> was a valid kernel space address before I handed a probe to kprobes.
>
> So I would do something like:
>
> if (!valid_kernel_address(probe->addr)) {
>     ret = -EINVAL;
>     goto out;
> }
>
> register_kprobe(probe);
>
> and then kpboes will go and attempt to set *(probe->addr) = BREAK_POINT;
>
>     -rustyl
> ----- Original Message -----
> From: "Andi Kleen" <ak@suse.de>
> To: "Arjan van de Ven" <arjanv@redhat.com>
> Cc: <linux-kernel@vger.kernel.org>; <rusty@linux.co.intel.com>
> Sent: Wednesday, November 13, 2002 1:14 PM
> Subject: Re: [PATCH][2.5.47]Add exported valid_kernel_address()
>
>
> > Arjan van de Ven <arjanv@redhat.com> writes:
> >
> > > it is customary that people who ask for an export explain why they
need
> > > it.... would you mind explaining that ?
> >
> > For modular lkcd I guess. Make a lot of sense to do it modular.
> >
> > -Andi
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/


  reply	other threads:[~2002-11-13 22:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200211132013.gADKDhS01389@linux.intel.com.suse.lists.linux.kernel>
     [not found] ` <1037220406.2889.4.camel@localhost.localdomain.suse.lists.linux.kernel>
2002-11-13 21:14   ` Andi Kleen
2002-11-13 21:24     ` Rusty Lynch
2002-11-13 22:30       ` Rusty Lynch [this message]
2002-11-13 20:13 Rusty Lynch
2002-11-13 20:46 ` Arjan van de Ven

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='01b101c28b64$47301880$77d40a0a@amr.corp.intel.com' \
    --to=rusty@linux.co.intel.com \
    --cc=ak@suse.de \
    --cc=arjanv@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

Powered by JetHome