vop setattr and secure levels

Ryan Stone rysto32 at gmail.com
Mon Oct 29 20:37:14 UTC 2012


On Mon, Oct 29, 2012 at 9:00 AM, Luca Ferrari <fluca1978 at infinito.it> wrote:
> Hi all,
> I'm trying to undertsand the path to some low level file operations,
> with particular regard to where and when the secure level is checked.
> While digging the code I found that there is an operation in the vop
> operation structure that is named vop_setattr which is often referred
> to an operation that will be called by a lot of syscalls related to
> file system operations. I'd like to understand when and how such
> operation is called, since I cannot find any direct reference in, for
> instance, the ufs implementation. I suspect it is a general routine
> called by the kernel itself somewhere I cannot find.
>
> I've tried to post the same question on the freebsd forums, but
> without any reply, so I believe that this mailing list can give me
> some hints.

The kernel build process generates some .c and .h files which define
VOP_SETATTR, VOP_SETATTR_AP and VOP_SETATTR_APV, which are called from
various places in the kernel.  These functions are what end up calling
vop_setattr.


More information about the freebsd-fs mailing list