[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <18718.1399652125@jrobl>
Date: Sat, 10 May 2014 01:15:25 +0900
From: "J. R. Okajima" <hooanon05g@...il.com>
To: Mimi Zohar <zohar@...ux.vnet.ibm.com>,
Dmitry Kasatkin <d.kasatkin@...sung.com>,
viro@...iv.linux.org.uk, ebiederm@...ssion.com,
linux-security-module@...r.kernel.org, eparis@...hat.com,
dmitry.kasatkin@...il.com, linux-kernel@...r.kernel.org
Subject: Re: IMA + O_DIRECT (Re: [PATCH 0/1] fix IMA + Apparmor kernel panic)
"J. R. Okajima":
> do_blockdev_direct_IO(), I'd suggest
> - make two new static inline functions like
> r = ima_aware_file_inode_mutex_lock(file) and ..._unlock(r, file).
> - these new functions are complied when CONFIG_IMA is enabled, otherwise
> they are plain mutex_lock/unlock().
> - then do_blockdev_direct_IO() can call them blindly.
> - of course, O_DIRECT_HAVELOCK should be complied only when CONFIG_IMA
> is enabled too.
One more thing.
Since struct file is a sharable object, it might be better to put
task-id into struct file. Hmm, then should we support for multiple tasks
by list or something? Oh the code grows...
J. R. Okajima
--
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