Casey Schaufler <casey@schaufler-ca.com> wrote:If you wish. Personally, I find it clearer than object or subject. Filesystem? CacheFiles is acting on behalf of a filesystem and must override the context that that filesystem was using, so that it can access a different filesystem. 99.99% probable that I will want a different subjective context for talking to the cache to the objective context of the task I'm doing work on behalf of. What daemon are you referring to? You've misunderstood, I think. Consider readpages. CacheFiles really wants to run in the process context of whoever called readpages. The main reason for this is one of performance: readpages() is called an awful lot, and we don't want to be changing process context at least twice per call if we can avoid it. Indeed. I have mentioned that I intend to create a patch to provide an LSM hook by which a kernel service can ask the LSM module for a new cred struct, appropriate to that service. That way, all details of SIDs, secids, transformations, etc are hidden inside the LSM module. Sigh. Only by saving and restoring the complete credential context from/to the task struct. Exchanging task structs is highly impractical, I think. Performance. This is actually the simpler and cleaner solution. It has been assumed, generally, to this point that subjective context == objective context, but we have two cases where we need to break that assumption. ? I didn't mention passing a cred, did I? Actually, I think you were right. I shouldn't be exposing secids like that. There's no requirement for an LSM to have such a concept. Of course the LSM must be involved, but secids aren't needed. No, all I really need is something like: struct cred *security_get_kernel_service_cred(const char *name); And maybe: int security_create_files_as(struct cred *, struct inode *); So that I can say I want to be able to create files that look the same as that inode there. The LSM can then check that the subjective context in the cred struct is allowed to do that. David -
| Peter Zijlstra | [PATCH 00/23] per device dirty throttling -v8 |
| david | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Greg Kroah-Hartman | [PATCH 005/196] Chinese: add translation of SubmittingDrivers |
| Vladislav Bolkhovitin | Re: Integration of SCST in the mainstream Linux kernel |
git: | |
| Gerrit Renker | [PATCH 03/37] dccp: List management for new feature negotiation |
| Frans Pop | svc: failed to register lockdv1 RPC service (errno 97). |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| David Miller | [GIT]: Networking |
