All of lore.kernel.org
 help / color / mirror / Atom feed
* Practical questions about locking and re-encrypting
@ 2014-09-22 15:32 Kenneth Waegeman
  2014-09-22 15:58 ` Tyler Hicks
  0 siblings, 1 reply; 4+ messages in thread
From: Kenneth Waegeman @ 2014-09-22 15:32 UTC (permalink / raw)
  To: ecryptfs

Hi all,


We want to use ecryptfs on GPFS. How does ecryptfs handles locking if  
an encrypted directory is mounted on different boxes ? Is data  
corruption possible while writing?

Another question: Is there an easy way to re-encrypt a directory with  
another key? (when having compromised key or so).


Thank you!!

Kenneth


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Practical questions about locking and re-encrypting
  2014-09-22 15:32 Practical questions about locking and re-encrypting Kenneth Waegeman
@ 2014-09-22 15:58 ` Tyler Hicks
  2014-09-23  9:39   ` Kenneth Waegeman
  0 siblings, 1 reply; 4+ messages in thread
From: Tyler Hicks @ 2014-09-22 15:58 UTC (permalink / raw)
  To: Kenneth Waegeman; +Cc: ecryptfs

[-- Attachment #1: Type: text/plain, Size: 1477 bytes --]

On 2014-09-22 17:32:57, Kenneth Waegeman wrote:
> Hi all,

Hi Kenneth

> 
> 
> We want to use ecryptfs on GPFS. How does ecryptfs handles locking if an
> encrypted directory is mounted on different boxes ? Is data corruption
> possible while writing?

eCryptfs is not well suited for being stacked on top of a distributed
file system such as GPFS.

That would result in each node having its own eCryptfs mount. Each
eCryptfs mount has its own page cache. eCryptfs doesn't do any sort of
coordination between remote mounts and there's no way for the lower
filesystem to make eCryptfs aware that file contents, which may be in
the eCryptfs page cache, have been modified by a remote node.

That means that if a file is read into the eCryptfs page cache on node A
and then that file is updated on node B, node A will never know an
update has been made and will never invalidate the old, cached file
contents from its page cache.

> 
> Another question: Is there an easy way to re-encrypt a directory with
> another key? (when having compromised key or so).

Unfortunately, no. You'd need to set up a new eCryptfs mount, with a new
key, and copy the files between the two eCryptfs mounts.

Tyler

> 
> 
> Thank you!!
> 
> Kenneth
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe ecryptfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Practical questions about locking and re-encrypting
  2014-09-22 15:58 ` Tyler Hicks
@ 2014-09-23  9:39   ` Kenneth Waegeman
  2014-09-23 15:53     ` Tyler Hicks
  0 siblings, 1 reply; 4+ messages in thread
From: Kenneth Waegeman @ 2014-09-23  9:39 UTC (permalink / raw)
  To: Tyler Hicks; +Cc: ecryptfs


----- Message from Tyler Hicks <tyhicks@canonical.com> ---------
    Date: Mon, 22 Sep 2014 10:58:25 -0500
    From: Tyler Hicks <tyhicks@canonical.com>
Subject: Re: Practical questions about locking and re-encrypting
      To: Kenneth Waegeman <Kenneth.Waegeman@UGent.be>
      Cc: ecryptfs@vger.kernel.org


> On 2014-09-22 17:32:57, Kenneth Waegeman wrote:
>> Hi all,
>
> Hi Kenneth
>
>>
>>
>> We want to use ecryptfs on GPFS. How does ecryptfs handles locking if an
>> encrypted directory is mounted on different boxes ? Is data corruption
>> possible while writing?
>
> eCryptfs is not well suited for being stacked on top of a distributed
> file system such as GPFS.
>
> That would result in each node having its own eCryptfs mount. Each
> eCryptfs mount has its own page cache. eCryptfs doesn't do any sort of
> coordination between remote mounts and there's no way for the lower
> filesystem to make eCryptfs aware that file contents, which may be in
> the eCryptfs page cache, have been modified by a remote node.
>
> That means that if a file is read into the eCryptfs page cache on node A
> and then that file is updated on node B, node A will never know an
> update has been made and will never invalidate the old, cached file
> contents from its page cache.

When is the pagecache flushed? is sync honoured? or does that happen  
only on unmount?
Does this also apply for directories? What happens if 2 hosts  
modifying different files in same directory?

Thank you for the explanation!

Kenneth

>
>>
>> Another question: Is there an easy way to re-encrypt a directory with
>> another key? (when having compromised key or so).
>
> Unfortunately, no. You'd need to set up a new eCryptfs mount, with a new
> key, and copy the files between the two eCryptfs mounts.
>
> Tyler
>
>>
>>
>> Thank you!!
>>
>> Kenneth
>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe ecryptfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html


----- End message from Tyler Hicks <tyhicks@canonical.com> -----

-- 

Met vriendelijke groeten,
Kenneth Waegeman

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Practical questions about locking and re-encrypting
  2014-09-23  9:39   ` Kenneth Waegeman
@ 2014-09-23 15:53     ` Tyler Hicks
  0 siblings, 0 replies; 4+ messages in thread
From: Tyler Hicks @ 2014-09-23 15:53 UTC (permalink / raw)
  To: Kenneth Waegeman; +Cc: ecryptfs

[-- Attachment #1: Type: text/plain, Size: 2763 bytes --]

On 2014-09-23 11:39:55, Kenneth Waegeman wrote:
> 
> ----- Message from Tyler Hicks <tyhicks@canonical.com> ---------
>    Date: Mon, 22 Sep 2014 10:58:25 -0500
>    From: Tyler Hicks <tyhicks@canonical.com>
> Subject: Re: Practical questions about locking and re-encrypting
>      To: Kenneth Waegeman <Kenneth.Waegeman@UGent.be>
>      Cc: ecryptfs@vger.kernel.org
> 
> 
> >On 2014-09-22 17:32:57, Kenneth Waegeman wrote:
> >>Hi all,
> >
> >Hi Kenneth
> >
> >>
> >>
> >>We want to use ecryptfs on GPFS. How does ecryptfs handles locking if an
> >>encrypted directory is mounted on different boxes ? Is data corruption
> >>possible while writing?
> >
> >eCryptfs is not well suited for being stacked on top of a distributed
> >file system such as GPFS.
> >
> >That would result in each node having its own eCryptfs mount. Each
> >eCryptfs mount has its own page cache. eCryptfs doesn't do any sort of
> >coordination between remote mounts and there's no way for the lower
> >filesystem to make eCryptfs aware that file contents, which may be in
> >the eCryptfs page cache, have been modified by a remote node.
> >
> >That means that if a file is read into the eCryptfs page cache on node A
> >and then that file is updated on node B, node A will never know an
> >update has been made and will never invalidate the old, cached file
> >contents from its page cache.
> 
> When is the pagecache flushed?

The typical times (periodic background writeout, sync, unmount, etc.)
and when a file is closed.

> is sync honoured? or does that happen only on unmount?

Sync is honored.

> Does this also apply for directories?

Yes

> What happens if 2 hosts modifying different files in same directory?

If one host has pieces of a file cached and then another host modifies
those pieces, then the first host will have outdated cached contents. It
doesn't matter if the files are in the same directory or in different
directories.

Tyler

> 
> Thank you for the explanation!
> 
> Kenneth
> 
> >
> >>
> >>Another question: Is there an easy way to re-encrypt a directory with
> >>another key? (when having compromised key or so).
> >
> >Unfortunately, no. You'd need to set up a new eCryptfs mount, with a new
> >key, and copy the files between the two eCryptfs mounts.
> >
> >Tyler
> >
> >>
> >>
> >>Thank you!!
> >>
> >>Kenneth
> >>
> >>
> >>--
> >>To unsubscribe from this list: send the line "unsubscribe ecryptfs" in
> >>the body of a message to majordomo@vger.kernel.org
> >>More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 
> ----- End message from Tyler Hicks <tyhicks@canonical.com> -----
> 
> -- 
> 
> Met vriendelijke groeten,
> Kenneth Waegeman
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-09-23 15:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-22 15:32 Practical questions about locking and re-encrypting Kenneth Waegeman
2014-09-22 15:58 ` Tyler Hicks
2014-09-23  9:39   ` Kenneth Waegeman
2014-09-23 15:53     ` Tyler Hicks

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.