linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Kasatkin <dmitry.kasatkin@gmail.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	Dmitry Kasatkin <d.kasatkin@samsung.com>,
	linux-mm@kvack.org, linux-fsdevel@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	akpm@linux-foundation.org, Al Viro <viro@zeniv.linux.org.uk>,
	Mimi Zohar <zohar@linux.vnet.ibm.com>,
	linux-security-module <linux-security-module@vger.kernel.org>,
	Greg KH <gregkh@linuxfoundation.org>
Subject: Re: IMA: kernel reading files opened with O_DIRECT
Date: Wed, 2 Jul 2014 22:07:38 +0300	[thread overview]
Message-ID: <CACE9dm-NZqC_qz8ip-9wUamwK7daOnKs_dTKQrT+zG4E2BJ=Jw@mail.gmail.com> (raw)
In-Reply-To: <x49tx6ztx9d.fsf@segfault.boston.devel.redhat.com>

On 2 July 2014 21:45, Jeff Moyer <jmoyer@redhat.com> wrote:
> Christoph Hellwig <hch@infradead.org> writes:
>
>> On Wed, Jul 02, 2014 at 11:55:41AM -0400, Jeff Moyer wrote:
>>> It's acceptable.
>>
>> It's not because it will then also affect other reads going on at the
>> same time.
>

> OK, that part I was fuzzy on.  I wasn't sure if they were preventing
> other reads/writes to the same file somehow.  I should have mentioned
> that.
>
> Cheers,
> Jeff


What Christoph says is not very correct.

At open there cannot be any reads going on at the same time. IMA
reading is guarded by mutex. Following opens do not perform any IMA
readings and do not do what he says...

If file was modified with direct-io, VFS code itself always invalidate
pages before and after any write. It is basically what Christoph says.
But that is not IMA problem but direct-io itself. As it is stupid
interface. I would be more looking to kind of fadvise interface to
control amount of page caching...

So I think what Jeff suggest suites well to IMA.

-- 
Thanks,
Dmitry

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2014-07-02 19:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-02  9:40 Dmitry Kasatkin
2014-07-02 15:55 ` Jeff Moyer
2014-07-02 18:12   ` Dmitry Kasatkin
2014-07-02 18:40   ` Christoph Hellwig
2014-07-02 18:45     ` Jeff Moyer
2014-07-02 19:07       ` Dmitry Kasatkin [this message]
2014-07-11 20:10     ` Pavel Machek
2014-07-11 22:22       ` Dmitry Kasatkin
2014-07-15 13:03         ` Pavel Machek
2014-07-16 12:48           ` Mimi Zohar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACE9dm-NZqC_qz8ip-9wUamwK7daOnKs_dTKQrT+zG4E2BJ=Jw@mail.gmail.com' \
    --to=dmitry.kasatkin@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=d.kasatkin@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=zohar@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox