lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 12 Dec 2006 10:04:08 +0100
From:	Silviu Craciunas <silviu.craciunas@....ac.at>
To:	Brice Goglin <Brice.Goglin@...-lyon.org>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: get device from file struct

On Mon, 2006-12-11 at 19:34 +0100, Brice Goglin wrote:
> Silviu Craciunas wrote:
> > quick question for the gurus.. is it possible to determine the hardware
> > device from a file struct during read/write system call. For example in
> > fs/read_write.c when doing a vfs_read.  
> >   
> 
> file->f_dentry->d_inode gives you the inode. If the inode is on top of a
> block device, inode->i_bdev gives you a struct block_device that might
> help you.
> 
> Brice

thanks for the reply, the block device can be determined with the major
and minor numbers , what I would be more interested in is if one can get
the net_device struct from the file struct

silviu

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ