lkml.org 
[lkml]   [2007]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [TOMOYO #5 02/18] Add wrapper functions for VFShelperfunctions.
From
Date
Hello.

Trond Myklebust wrote:
> The problem is that you have thrown away the main tool for documenting
> the requirement, and for enforcing correctness (i.e. function argument
> checking by the compiler).
I'm sorry. I wanted to know whether the below approach is possible.

> The old functions are still there, are still exported, and still take
> the same arguments as before, but you have now added a hidden
> requirement that I have to set last_vfsmount when I call them. If I
> haven't read your patch, and just call one of those vfs_* functions as
> before, without setting last_vfsmount, I break your model, and I won't
> find out until someone reports an obscure bug at runtime.
I don't care if some kernel module calls vfs_* without setting last_vfsmount
because there is no reason to reject requests from kernel code.
Setting last_vfsmount is required for requests from userland process.
This approach makes it possible to
(1) tell whether the vfs_* calls are from userland or kernel
and
(2) leave kernel modules that are not called from userland unchanged.
This is why this patch doesn't and needn't to modify fs/*/ files.

Thanks.

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

\
 
 \ /
  Last update: 2007-11-17 05:07    [W:0.469 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site