<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/lib/test_overflow.c, branch v5.1-rc4</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>test_overflow: Add shift overflow tests</title>
<updated>2018-08-08T15:47:26+00:00</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2018-08-01T21:25:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d36b6ad27c7b95e3f6bfbf6ea33757c8e8accf01'/>
<id>d36b6ad27c7b95e3f6bfbf6ea33757c8e8accf01</id>
<content type='text'>
This adds overflow tests for the new check_shift_overflow() helper to
validate overflow, signedness glitches, storage glitches, etc.

Co-developed-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds overflow tests for the new check_shift_overflow() helper to
validate overflow, signedness glitches, storage glitches, etc.

Co-developed-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test_overflow: fix an IS_ERR() vs NULL bug</title>
<updated>2018-06-12T23:19:22+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2018-06-12T12:04:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8958fd411ba08aa3ac1aeb19828abaf9cf33f7b8'/>
<id>8958fd411ba08aa3ac1aeb19828abaf9cf33f7b8</id>
<content type='text'>
root_device_register() returns error pointers, it never returns NULL.

Fixes: ca90800a91ba ("test_overflow: Add memory allocation overflow tests")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
root_device_register() returns error pointers, it never returns NULL.

Fixes: ca90800a91ba ("test_overflow: Add memory allocation overflow tests")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test_overflow: Add memory allocation overflow tests</title>
<updated>2018-06-05T19:16:51+00:00</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2018-05-10T23:40:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ca90800a91ba723d78ded634d037c1d2df8b54d6'/>
<id>ca90800a91ba723d78ded634d037c1d2df8b54d6</id>
<content type='text'>
Make sure that the memory allocators are behaving as expected in the face
of overflows of multiplied arguments or when using the array_size()-family
helpers.

Example output of new tests (with the expected __alloc_pages_slowpath
and vmalloc warnings about refusing giant allocations removed):

[   93.062076] test_overflow: kmalloc detected saturation
[   93.062988] test_overflow: kmalloc_node detected saturation
[   93.063818] test_overflow: kzalloc detected saturation
[   93.064539] test_overflow: kzalloc_node detected saturation
[   93.120386] test_overflow: kvmalloc detected saturation
[   93.143458] test_overflow: kvmalloc_node detected saturation
[   93.166861] test_overflow: kvzalloc detected saturation
[   93.189924] test_overflow: kvzalloc_node detected saturation
[   93.221671] test_overflow: vmalloc detected saturation
[   93.246326] test_overflow: vmalloc_node detected saturation
[   93.270260] test_overflow: vzalloc detected saturation
[   93.293824] test_overflow: vzalloc_node detected saturation
[   93.294597] test_overflow: devm_kmalloc detected saturation
[   93.295383] test_overflow: devm_kzalloc detected saturation
[   93.296217] test_overflow: all tests passed

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make sure that the memory allocators are behaving as expected in the face
of overflows of multiplied arguments or when using the array_size()-family
helpers.

Example output of new tests (with the expected __alloc_pages_slowpath
and vmalloc warnings about refusing giant allocations removed):

[   93.062076] test_overflow: kmalloc detected saturation
[   93.062988] test_overflow: kmalloc_node detected saturation
[   93.063818] test_overflow: kzalloc detected saturation
[   93.064539] test_overflow: kzalloc_node detected saturation
[   93.120386] test_overflow: kvmalloc detected saturation
[   93.143458] test_overflow: kvmalloc_node detected saturation
[   93.166861] test_overflow: kvzalloc detected saturation
[   93.189924] test_overflow: kvzalloc_node detected saturation
[   93.221671] test_overflow: vmalloc detected saturation
[   93.246326] test_overflow: vmalloc_node detected saturation
[   93.270260] test_overflow: vzalloc detected saturation
[   93.293824] test_overflow: vzalloc_node detected saturation
[   93.294597] test_overflow: devm_kmalloc detected saturation
[   93.295383] test_overflow: devm_kzalloc detected saturation
[   93.296217] test_overflow: all tests passed

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test_overflow: Report test failures</title>
<updated>2018-06-05T19:16:51+00:00</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2018-05-10T05:13:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8fee81aa4598484c073c845281a25d94fb204cf6'/>
<id>8fee81aa4598484c073c845281a25d94fb204cf6</id>
<content type='text'>
This adjusts the overflow test to report failures, and prepares to
add allocation tests.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adjusts the overflow test to report failures, and prepares to
add allocation tests.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test_overflow: macrofy some more, do more tests for free</title>
<updated>2018-06-05T19:16:51+00:00</updated>
<author>
<name>Rasmus Villemoes</name>
<email>linux@rasmusvillemoes.dk</email>
</author>
<published>2018-06-04T06:41:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6d3344324b5ae49fc8cb599a2c687e5607ba6e9f'/>
<id>6d3344324b5ae49fc8cb599a2c687e5607ba6e9f</id>
<content type='text'>
Obviously a+b==b+a and a*b==b*a, but the implementation of the fallback
checks are not entirely symmetric in how they treat a and b. So we might
as well check the (b,a,r,of) tuple as well as the (a,b,r,of) one for +
and *. Rather than more copy-paste, factor out the common part to
check_one_op.

Signed-off-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Obviously a+b==b+a and a*b==b*a, but the implementation of the fallback
checks are not entirely symmetric in how they treat a and b. So we might
as well check the (b,a,r,of) tuple as well as the (a,b,r,of) one for +
and *. Rather than more copy-paste, factor out the common part to
check_one_op.

Signed-off-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: add runtime test of check_*_overflow functions</title>
<updated>2018-06-05T19:16:51+00:00</updated>
<author>
<name>Rasmus Villemoes</name>
<email>linux@rasmusvillemoes.dk</email>
</author>
<published>2018-05-07T22:36:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=455a35a6cdb6f53fe9294e23301eb056f2908bd9'/>
<id>455a35a6cdb6f53fe9294e23301eb056f2908bd9</id>
<content type='text'>
This adds a small module for testing that the check_*_overflow
functions work as expected, whether implemented in C or using gcc
builtins.

Example output:

test_overflow: u8 : 18 tests
test_overflow: s8 : 19 tests
test_overflow: u16: 17 tests
test_overflow: s16: 17 tests
test_overflow: u32: 17 tests
test_overflow: s32: 17 tests
test_overflow: u64: 17 tests
test_overflow: s64: 21 tests

Signed-off-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
[kees: add output to commit log, drop u64 tests on 32-bit]
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds a small module for testing that the check_*_overflow
functions work as expected, whether implemented in C or using gcc
builtins.

Example output:

test_overflow: u8 : 18 tests
test_overflow: s8 : 19 tests
test_overflow: u16: 17 tests
test_overflow: s16: 17 tests
test_overflow: u32: 17 tests
test_overflow: s32: 17 tests
test_overflow: u64: 17 tests
test_overflow: s64: 21 tests

Signed-off-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
[kees: add output to commit log, drop u64 tests on 32-bit]
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
