<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/crypto, branch v4.10-rc4</title>
<subtitle>Linux Kernel (branches are rebased on master from time to time)</subtitle>
<id>https://sre.ring0.de/linux/atom?h=v4.10-rc4</id>
<link rel='self' href='https://sre.ring0.de/linux/atom?h=v4.10-rc4'/>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/'/>
<updated>2016-12-31T05:47:05Z</updated>
<entry>
<title>fscrypt: fix renaming and linking special files</title>
<updated>2016-12-31T05:47:05Z</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@google.com</email>
</author>
<published>2016-12-19T22:20:13Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=42d97eb0ade31e1bc537d086842f5d6e766d9d51'/>
<id>urn:sha1:42d97eb0ade31e1bc537d086842f5d6e766d9d51</id>
<content type='text'>
Attempting to link a device node, named pipe, or socket file into an
encrypted directory through rename(2) or link(2) always failed with
EPERM.  This happened because fscrypt_has_permitted_context() saw that
the file was unencrypted and forbid creating the link.  This behavior
was unexpected because such files are never encrypted; only regular
files, directories, and symlinks can be encrypted.

To fix this, make fscrypt_has_permitted_context() always return true on
special files.

This will be covered by a test in my encryption xfstests patchset.

Fixes: 9bd8212f981e ("ext4 crypto: add encryption policy and password salt support")
Signed-off-by: Eric Biggers &lt;ebiggers@google.com&gt;
Reviewed-by: Richard Weinberger &lt;richard@nod.at&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>fscrypt: fix the test_dummy_encryption mount option</title>
<updated>2016-12-28T00:46:27Z</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2016-12-28T00:46:27Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=fe4f6c801c03bc13113d0dc32f02d4ea8ed89ffd'/>
<id>urn:sha1:fe4f6c801c03bc13113d0dc32f02d4ea8ed89ffd</id>
<content type='text'>
Commit f1c131b45410a: "crypto: xts - Convert to skcipher" now fails
the setkey operation if the AES key is the same as the tweak key.
Previously this check was only done if FIPS mode is enabled.  Now this
check is also done if weak key checking was requested.  This is
reasonable, but since we were using the dummy key which was a constant
series of 0x42 bytes, it now caused dummy encrpyption test mode to
fail.

Fix this by using 0x42... and 0x24... for the two keys, so they are
different.

Fixes: f1c131b45410a202eb45cc55980a7a9e4e4b4f40
Cc: stable@vger.kernel.org
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>fscrypt: Rename FS_WRITE_PATH_FL to FS_CTX_HAS_BOUNCE_BUFFER_FL</title>
<updated>2016-12-11T21:33:18Z</updated>
<author>
<name>David Gstir</name>
<email>david@sigma-star.at</email>
</author>
<published>2016-12-06T22:53:58Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=6a34e4d2be07255cc59e6ccaf820669cfd7f815c'/>
<id>urn:sha1:6a34e4d2be07255cc59e6ccaf820669cfd7f815c</id>
<content type='text'>
... to better explain its purpose after introducing in-place encryption
without bounce buffer.

Signed-off-by: David Gstir &lt;david@sigma-star.at&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>fscrypt: Delay bounce page pool allocation until needed</title>
<updated>2016-12-11T21:33:11Z</updated>
<author>
<name>David Gstir</name>
<email>david@sigma-star.at</email>
</author>
<published>2016-12-06T22:53:57Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=f32d7ac20a5864483c1f96e4970daa083e18bfd1'/>
<id>urn:sha1:f32d7ac20a5864483c1f96e4970daa083e18bfd1</id>
<content type='text'>
Since fscrypt users can now indicated if fscrypt_encrypt_page() should
use a bounce page, we can delay the bounce page pool initialization util
it is really needed. That is until fscrypt_operations has no
FS_CFLG_OWN_PAGES flag set.

Signed-off-by: David Gstir &lt;david@sigma-star.at&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>fscrypt: Cleanup page locking requirements for fscrypt_{decrypt,encrypt}_page()</title>
<updated>2016-12-11T21:26:12Z</updated>
<author>
<name>David Gstir</name>
<email>david@sigma-star.at</email>
</author>
<published>2016-12-06T22:53:56Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=bd7b8290388dd58a8c0a3710b171e58ef952ca4d'/>
<id>urn:sha1:bd7b8290388dd58a8c0a3710b171e58ef952ca4d</id>
<content type='text'>
Rename the FS_CFLG_INPLACE_ENCRYPTION flag to FS_CFLG_OWN_PAGES which,
when set, indicates that the fs uses pages under its own control as
opposed to writeback pages which require locking and a bounce buffer for
encryption.

Signed-off-by: David Gstir &lt;david@sigma-star.at&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>fscrypt: Cleanup fscrypt_{decrypt,encrypt}_page()</title>
<updated>2016-12-11T21:26:12Z</updated>
<author>
<name>David Gstir</name>
<email>david@sigma-star.at</email>
</author>
<published>2016-12-06T22:53:55Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=1400451f04f2ff28b658b92557495e5090914aee'/>
<id>urn:sha1:1400451f04f2ff28b658b92557495e5090914aee</id>
<content type='text'>
- Improve documentation
- Add BUG_ON(len == 0) to avoid accidental switch of offs and len
parameters
- Improve variable names for readability

Signed-off-by: David Gstir &lt;david@sigma-star.at&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>fscrypt: Never allocate fscrypt_ctx on in-place encryption</title>
<updated>2016-12-11T21:26:11Z</updated>
<author>
<name>David Gstir</name>
<email>david@sigma-star.at</email>
</author>
<published>2016-12-06T22:53:54Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=9e532772b4e36888584efc7a9531143bd43355b3'/>
<id>urn:sha1:9e532772b4e36888584efc7a9531143bd43355b3</id>
<content type='text'>
In case of in-place encryption fscrypt_ctx was allocated but never
released. Since we don't need it for in-place encryption, we skip
allocating it.

Fixes: 1c7dcf69eea3 ("fscrypt: Add in-place encryption mode")

Signed-off-by: David Gstir &lt;david@sigma-star.at&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>fscrypt: Use correct index in decrypt path.</title>
<updated>2016-12-11T21:26:10Z</updated>
<author>
<name>David Gstir</name>
<email>david@sigma-star.at</email>
</author>
<published>2016-12-06T22:53:53Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=e550c16c8aab95c7996b0c864d5fcedc2c430a43'/>
<id>urn:sha1:e550c16c8aab95c7996b0c864d5fcedc2c430a43</id>
<content type='text'>
Actually use the fs-provided index instead of always using page-&gt;index
which is only set for page-cache pages.

Fixes: 9c4bb8a3a9b4 ("fscrypt: Let fs select encryption index/tweak")

Signed-off-by: David Gstir &lt;david@sigma-star.at&gt;
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
</content>
</entry>
<entry>
<title>fscrypt: move non-public structures and constants to fscrypt_private.h</title>
<updated>2016-12-11T21:26:09Z</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2016-11-27T03:05:18Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=cc4e0df038ddb73510c01712abf302b3f0130147'/>
<id>urn:sha1:cc4e0df038ddb73510c01712abf302b3f0130147</id>
<content type='text'>
Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Reviewed-by: Eric Biggers &lt;ebiggers@google.com&gt;
</content>
</entry>
<entry>
<title>fscrypt: unexport fscrypt_initialize()</title>
<updated>2016-12-11T21:26:08Z</updated>
<author>
<name>Theodore Ts'o</name>
<email>tytso@mit.edu</email>
</author>
<published>2016-11-27T01:43:09Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=b98701df349b7003efd52d9330acbb7be5a255c6'/>
<id>urn:sha1:b98701df349b7003efd52d9330acbb7be5a255c6</id>
<content type='text'>
The fscrypt_initalize() function isn't used outside fs/crypto, so
there's no point making it be an exported symbol.

Signed-off-by: Theodore Ts'o &lt;tytso@mit.edu&gt;
Reviewed-by: Eric Biggers &lt;ebiggers@google.com&gt;
</content>
</entry>
</feed>
