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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 13 Dec 2006 20:19:51 +0100 (MET)
From:	Jan Engelhardt <jengelh@...ux01.gwdg.de>
To:	Silviu Craciunas <silviu.craciunas@....ac.at>
cc:	linux-kernel@...r.kernel.org
Subject: Re: get device from file struct


>in fs/read_write.c, the vfs_read function does:
>
>file->f_op->read(file, buf, count, pos);
>
>after this call is it possible to determine where the
>data is coming from?
>e.g., the first hard disk, a pipe or from a socket.

For hard disks:
  file->f_dentry->d_inode->d_sb->s_bdev gives you the block device
  in case it is a non-virtual filesystem.

For pipes/sockets I do not know of a may to go from a filp to a
struct sock or struct socket.

>If it is a socket we are interested
>from which device (eth0, eth1, lo, ...) the data was received.

I do not think that is possible either.


	-`J'
-- 
-
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