kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: richard@nod.at (Richard Weinberger)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Regarding enumerating Block devices registered in kernel mode
Date: Tue, 12 Nov 2013 09:50:47 +0100	[thread overview]
Message-ID: <5281EBE7.1070007@nod.at> (raw)
In-Reply-To: <SNT147-DS17A2287E45B507AEC6CB1BA7FE0@phx.gbl>

Am 12.11.2013 09:47, schrieb vaibhav:
> Thanks for replying Richard,
> 
> I need to access the blockdevice structure associated with each block device
> so that I can patch its block_device_operations to receive ioctls calls in
> my code. In my code I check for ioctls that I handle and pass it to the
> original ioctl handler if the ioctl is not understood by me.  
> 
> I intend to patch these block_device structures during my module
> initialization hence I need to iterate all BD's available in the system at
> that point. Also need to keep track of new BD's appearing in the system so
> that I can patch them as soon as they are available.

Please don't do that.
Such patching/hooking/etc...-games are doomed to failure.

Thanks,
//richard

      reply	other threads:[~2013-11-12  8:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-12  5:24 Regarding enumerating Block devices registered in kernel mode vaibhav
2013-11-12  8:08 ` Richard Weinberger
2013-11-12  8:47   ` vaibhav
2013-11-12  8:50     ` Richard Weinberger [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=5281EBE7.1070007@nod.at \
    --to=richard@nod.at \
    --cc=kernelnewbies@lists.kernelnewbies.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;
as well as URLs for NNTP newsgroup(s).