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] [day] [month] [year] [list]
Date:	Tue, 02 Sep 2008 17:53:23 -0700
From:	Jeremy Fitzhardinge <jeremy@...p.org>
To:	Randy Dunlap <randy.dunlap@...cle.com>
CC:	Firstname Lastname <skb632@...oo.com>, linux-kernel@...r.kernel.org
Subject: Re: targets of function pointer invocations

Randy Dunlap wrote:
> On Sat, 30 Aug 2008 00:12:12 -0700 (PDT) Firstname Lastname wrote:
>
>   
>> Hi all,
>>
>> The lines 522-523 in function do_acct_process in file kernel/acct.c in version 2.6.26.3 are:
>>
>>  file->f_op->write(file, (char *)&ac,sizeof(acct_t), &file->f_pos);
>>
>> What are the full set of targets of this function pointer invocation and how can one be sure, by examining the code, that this is in fact the complete set?
>>     
>
> If I understand your question, you want to know what are the ->write()
> function parameters and how does one determine them?
>
> 'file' is struct file, found in include/linux/fs.h.
> 'f_op' is struct file_operations, in the same file.
> 'write' is defined in struct file_operations as:
>
> 	ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
>
> 4 typed parameters, returning ssize_t.
>
> Is that what you meant?
>   

Actually, I think OP is asking what's the complete set of functions
->write can point to.  You can look for all the in-tree assignments to
f_ops (or all the struct file_ops) to get the in-kernel estimate.  But
any out of tree module could also install file_ops.write, so you can't
be exhaustive.

    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