public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
To: viro@parcelfarce.linux.theplanet.co.uk
Cc: linux-kernel@vger.kernel.org
Subject: Re: [patch] to add device+inode check to ipt_owner.c - HACKED UP
Date: Wed, 8 Sep 2004 14:35:47 +0100	[thread overview]
Message-ID: <20040908133547.GB1017@lkcl.net> (raw)
In-Reply-To: <20040908104739.GX23987@parcelfarce.linux.theplanet.co.uk>

hello, hello, thank you v. much for responding.

On Wed, Sep 08, 2004 at 11:47:39AM +0100, viro@parcelfarce.linux.theplanet.co.uk wrote:

> On Wed, Sep 08, 2004 at 11:39:22AM +0100, Luke Kenneth Casson Leighton wrote:
> > +static int
> > +match_inode(const struct sk_buff *skb, const char *devname, unsigned long i_num)
> > +{
> > +	struct task_struct *g, *p;
> > +	struct files_struct *files;
> > +	/*
> > +	struct inode *inode;
> > +	struct super_block *sb;
> > +	struct block_device *bd;
> > +	*/
> > +	int i;
> > +	read_lock(&tasklist_lock);
> > +
> > +	/* lkcl: these are fairly obvious (just obtuse): hunt for the
> > +	 * filesystem device, then its superblock, then the inode is
> > +	 * relevant to that superblock, _then_ we can find the inode.
> > +	bd = bdget(dev);
> 
> 
> ... the hell?  Where does that "dev" come from?

it's code commented out that i put in there when i _really_ wasn't
sure what i was doing.

it might come in handy so i haven't deleted it yet.

basically in an earlier experiment, i put the device (dev_t)
major/minor number into ipt_owner.h.

then i discovered that fs/proc/base.c could look up a vfsmount
struct, which according to struct vfsmount contains the _name_
of the device.

i'm counting on that actually working.

if it doesn't work, then it's back to the drawing board and uncommenting
the stuff that you have noticed is all commented out, above.

l.


-- 
--
Truth, honesty and respect are rare commodities that all spring from
the same well: Love.  If you love yourself and everyone and everything
around you, funnily and coincidentally enough, life gets a lot better.
--
<a href="http://lkcl.net">      lkcl.net      </a> <br />
<a href="mailto:lkcl@lkcl.net"> lkcl@lkcl.net </a> <br />


  reply	other threads:[~2004-09-08 14:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-08 10:09 [patch] to add device+inode check to ipt_owner.c - HACKED UP Luke Kenneth Casson Leighton
2004-09-08 10:14 ` Arjan van de Ven
2004-09-08 13:43   ` Luke Kenneth Casson Leighton
2004-09-08 10:39 ` Luke Kenneth Casson Leighton
2004-09-08 10:47   ` viro
2004-09-08 13:35     ` Luke Kenneth Casson Leighton [this message]
2004-09-10  7:49   ` Gianni Tedesco
2004-09-10  9:57     ` Luke Kenneth Casson Leighton
2004-09-10 11:11     ` Luke Kenneth Casson Leighton

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=20040908133547.GB1017@lkcl.net \
    --to=lkcl@lkcl.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@parcelfarce.linux.theplanet.co.uk \
    /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