<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/x86/crypto, branch linux-4.12.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.12.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.12.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2017-08-25T00:15:01Z</updated>
<entry>
<title>crypto: x86/sha1 - Fix reads beyond the number of blocks passed</title>
<updated>2017-08-25T00:15:01Z</updated>
<author>
<name>megha.dey@linux.intel.com</name>
</author>
<published>2017-08-02T20:49:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=aac1a12cc70022e56c95d50485a578f717a2edd9'/>
<id>urn:sha1:aac1a12cc70022e56c95d50485a578f717a2edd9</id>
<content type='text'>
commit 8861249c740fc4af9ddc5aee321eafefb960d7c6 upstream.

It was reported that the sha1 AVX2 function(sha1_transform_avx2) is
reading ahead beyond its intended data, and causing a crash if the next
block is beyond page boundary:
http://marc.info/?l=linux-crypto-vger&amp;m=149373371023377

This patch makes sure that there is no overflow for any buffer length.

It passes the tests written by Jan Stancek that revealed this problem:
https://github.com/jstancek/sha1-avx2-crash

I have re-enabled sha1-avx2 by reverting commit
b82ce24426a4071da9529d726057e4e642948667

Fixes: b82ce24426a4 ("crypto: sha1-ssse3 - Disable avx2")
Originally-by: Ilya Albrekht &lt;ilya.albrekht@intel.com&gt;
Tested-by: Jan Stancek &lt;jstancek@redhat.com&gt;
Signed-off-by: Megha Dey &lt;megha.dey@linux.intel.com&gt;
Reported-by: Jan Stancek &lt;jstancek@redhat.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>crypto: sha1-ssse3 - Disable avx2</title>
<updated>2017-07-21T04:59:11Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2017-07-04T04:21:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5cdd0a929031fc3aca9ec09c56ee729065cbc758'/>
<id>urn:sha1:5cdd0a929031fc3aca9ec09c56ee729065cbc758</id>
<content type='text'>
commit b82ce24426a4071da9529d726057e4e642948667 upstream.

It has been reported that sha1-avx2 can cause page faults by reading
beyond the end of the input.  This patch disables it until it can be
fixed.

Fixes: 7c1da8d0d046 ("crypto: sha - SHA1 transform x86_64 AVX2")
Reported-by: Jan Stancek &lt;jstancek@redhat.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>crypto: glue_helper - remove the le128_gf128mul_x_ble function</title>
<updated>2017-04-05T13:58:37Z</updated>
<author>
<name>Ondrej Mosnáček</name>
</author>
<published>2017-04-02T19:19:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=692016bdf7cf33abaaa7f2b080b47f504c98810c'/>
<id>urn:sha1:692016bdf7cf33abaaa7f2b080b47f504c98810c</id>
<content type='text'>
The le128_gf128mul_x_ble function in glue_helper.h is now obsolete and
can be replaced with the gf128mul_x_ble function from gf128mul.h.

Signed-off-by: Ondrej Mosnacek &lt;omosnacek@gmail.com&gt;
Reviewd-by: Eric Biggers &lt;ebiggers@google.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: gf128mul - switch gf128mul_x_ble to le128</title>
<updated>2017-04-05T13:58:37Z</updated>
<author>
<name>Ondrej Mosnáček</name>
</author>
<published>2017-04-02T19:19:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e55318c84f199d6056a0bcd98bc4612d01ccfe80'/>
<id>urn:sha1:e55318c84f199d6056a0bcd98bc4612d01ccfe80</id>
<content type='text'>
Currently, gf128mul_x_ble works with pointers to be128, even though it
actually interprets the words as little-endian. Consequently, it uses
cpu_to_le64/le64_to_cpu on fields of type __be64, which is incorrect.

This patch fixes that by changing the function to accept pointers to
le128 and updating all users accordingly.

Signed-off-by: Ondrej Mosnacek &lt;omosnacek@gmail.com&gt;
Reviewd-by: Eric Biggers &lt;ebiggers@google.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto, x86: aesni - fix token pasting for clang</title>
<updated>2017-03-24T14:02:55Z</updated>
<author>
<name>Michael Davidson</name>
</author>
<published>2017-03-15T22:36:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fdb2726f4e61c5e3abc052f547d5a5f6c0dc5504'/>
<id>urn:sha1:fdb2726f4e61c5e3abc052f547d5a5f6c0dc5504</id>
<content type='text'>
aes_ctrby8_avx-x86_64.S uses the C preprocessor for token pasting
of character sequences that are not valid preprocessor tokens.
While this is allowed when preprocessing assembler files it exposes
an incompatibilty between the clang and gcc preprocessors where
clang does not strip leading white space from macro parameters,
leading to the CONCAT(%xmm, i) macro expansion on line 96 resulting
in a token with a space character embedded in it.

While this could be resolved by deleting the offending space character,
the assembler is perfectly capable of doing the token pasting correctly
for itself so we can just get rid of the preprocessor macros.

Signed-off-by: Michael Davidson &lt;md@google.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: sha512-mb - Protect sha512 mb ctx mgr access</title>
<updated>2017-02-11T09:50:41Z</updated>
<author>
<name>Tim Chen</name>
</author>
<published>2017-02-01T18:45:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c459bd7beda0295ea67db0ce2004a49addb2f765'/>
<id>urn:sha1:c459bd7beda0295ea67db0ce2004a49addb2f765</id>
<content type='text'>
The flusher and regular multi-buffer computation via mcryptd may race with another.
Add here a lock and turn off interrupt to to access multi-buffer
computation state cstate-&gt;mgr before a round of computation. This should
prevent the flusher code jumping in.

Signed-off-by: Tim Chen &lt;tim.c.chen@linux.intel.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6</title>
<updated>2017-02-03T10:14:10Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2017-02-03T10:14:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=34cb58213948a0c26a228da903a3b37c2505843c'/>
<id>urn:sha1:34cb58213948a0c26a228da903a3b37c2505843c</id>
<content type='text'>
Merge the crypto tree to pick up arm64 output IV patch.
</content>
</entry>
<entry>
<title>crypto: aesni - Fix failure when pcbc module is absent</title>
<updated>2017-02-03T09:45:48Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2017-02-01T14:17:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c26819900036f5b91608051a0fc7c76f6b4ffc7b'/>
<id>urn:sha1:c26819900036f5b91608051a0fc7c76f6b4ffc7b</id>
<content type='text'>
When aesni is built as a module together with pcbc, the pcbc module
must be present for aesni to load.  However, the pcbc module may not
be present for reasons such as its absence on initramfs.  This patch
allows the aesni to function even if the pcbc module is enabled but
not present.

Reported-by: Arkadiusz Miśkiewicz &lt;arekm@maven.pl&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: x86 - make constants readonly, allow linker to merge them</title>
<updated>2017-01-23T14:50:29Z</updated>
<author>
<name>Denys Vlasenko</name>
</author>
<published>2017-01-19T21:33:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e183914af00e15eb41ae666d44e323bfa154be13'/>
<id>urn:sha1:e183914af00e15eb41ae666d44e323bfa154be13</id>
<content type='text'>
A lot of asm-optimized routines in arch/x86/crypto/ keep its
constants in .data. This is wrong, they should be on .rodata.

Mnay of these constants are the same in different modules.
For example, 128-bit shuffle mask 0x000102030405060708090A0B0C0D0E0F
exists in at least half a dozen places.

There is a way to let linker merge them and use just one copy.
The rules are as follows: mergeable objects of different sizes
should not share sections. You can't put them all in one .rodata
section, they will lose "mergeability".

GCC puts its mergeable constants in ".rodata.cstSIZE" sections,
or ".rodata.cstSIZE.&lt;object_name&gt;" if -fdata-sections is used.
This patch does the same:

	.section .rodata.cst16.SHUF_MASK, "aM", @progbits, 16

It is important that all data in such section consists of
16-byte elements, not larger ones, and there are no implicit
use of one element from another.

When this is not the case, use non-mergeable section:

	.section .rodata[.VAR_NAME], "a", @progbits

This reduces .data by ~15 kbytes:

    text    data     bss     dec      hex filename
11097415 2705840 2630712 16433967  fac32f vmlinux-prev.o
11112095 2690672 2630712 16433479  fac147 vmlinux.o

Merged objects are visible in System.map:

ffffffff81a28810 r POLY
ffffffff81a28810 r POLY
ffffffff81a28820 r TWOONE
ffffffff81a28820 r TWOONE
ffffffff81a28830 r PSHUFFLE_BYTE_FLIP_MASK &lt;- merged regardless of
ffffffff81a28830 r SHUF_MASK   &lt;------------- the name difference
ffffffff81a28830 r SHUF_MASK
ffffffff81a28830 r SHUF_MASK
..
ffffffff81a28d00 r K512 &lt;- merged three identical 640-byte tables
ffffffff81a28d00 r K512
ffffffff81a28d00 r K512

Use of object names in section name suffixes is not strictly necessary,
but might help if someday link stage will use garbage collection
to eliminate unused sections (ld --gc-sections).

Signed-off-by: Denys Vlasenko &lt;dvlasenk@redhat.com&gt;
CC: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
CC: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
CC: Xiaodong Liu &lt;xiaodong.liu@intel.com&gt;
CC: Megha Dey &lt;megha.dey@intel.com&gt;
CC: linux-crypto@vger.kernel.org
CC: x86@kernel.org
CC: linux-kernel@vger.kernel.org
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: x86/crc32c - fix %progbits -&gt; @progbits</title>
<updated>2017-01-23T14:50:26Z</updated>
<author>
<name>Denys Vlasenko</name>
</author>
<published>2017-01-19T21:28:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=587d531b8f67ebe62f8326849a7a685a03cbc904'/>
<id>urn:sha1:587d531b8f67ebe62f8326849a7a685a03cbc904</id>
<content type='text'>
%progbits form is used on ARM (where @ is a comment char).

x86 consistently uses @progbits everywhere else.

Signed-off-by: Denys Vlasenko &lt;dvlasenk@redhat.com&gt;
CC: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
CC: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
CC: Xiaodong Liu &lt;xiaodong.liu@intel.com&gt;
CC: Megha Dey &lt;megha.dey@intel.com&gt;
CC: George Spelvin &lt;linux@horizon.com&gt;
CC: linux-crypto@vger.kernel.org
CC: x86@kernel.org
CC: linux-kernel@vger.kernel.org
Reviewed-by: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
</feed>
