<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pm24.git/tools/testing/selftests/openat2, branch v5.7</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://git.kobert.dev/pm24.git/atom?h=v5.7</id>
<link rel='self' href='https://git.kobert.dev/pm24.git/atom?h=v5.7'/>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/'/>
<updated>2020-03-25T10:50:48Z</updated>
<entry>
<title>.gitignore: add SPDX License Identifier</title>
<updated>2020-03-25T10:50:48Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2020-03-03T13:35:59Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=d198b34f3855eee2571dda03eea75a09c7c31480'/>
<id>urn:sha1:d198b34f3855eee2571dda03eea75a09c7c31480</id>
<content type='text'>
Add SPDX License Identifier to all .gitignore files.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: openat2: fix build error on newer glibc</title>
<updated>2020-02-13T20:15:45Z</updated>
<author>
<name>Aleksa Sarai</name>
<email>cyphar@cyphar.com</email>
</author>
<published>2020-02-13T07:26:56Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=9a0584f05687947d5a0b87f046bcd2592a55e67c'/>
<id>urn:sha1:9a0584f05687947d5a0b87f046bcd2592a55e67c</id>
<content type='text'>
It appears that newer glibcs check that openat(O_CREAT) was provided a
fourth argument (rather than passing garbage), resulting in the
following build error:

&gt; In file included from /usr/include/fcntl.h:301,
&gt;                  from helpers.c:9:
&gt; In function 'openat',
&gt;     inlined from 'touchat' at helpers.c:49:11:
&gt; /usr/include/x86_64-linux-gnu/bits/fcntl2.h:126:4: error: call to
&gt; '__openat_missing_mode' declared with attribute error: openat with O_CREAT
&gt; or O_TMPFILE in third argument needs 4 arguments
&gt;   126 |    __openat_missing_mode ();
&gt;       |    ^~~~~~~~~~~~~~~~~~~~~~~~

Reported-by: Shuah Khan &lt;shuah@kernel.org&gt;
Signed-off-by: Aleksa Sarai &lt;cyphar@cyphar.com&gt;
Tested-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: fix spelling mistaked "chaigned" -&gt; "chained"</title>
<updated>2020-02-11T00:58:45Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2020-01-16T09:29:03Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=7714d469dcba572bbfb9cc47217fed7e7ddeb051'/>
<id>urn:sha1:7714d469dcba572bbfb9cc47217fed7e7ddeb051</id>
<content type='text'>
There is a spelling mistake in a literal string, fix it.

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Reviewed-by: Aleksa Sarai &lt;cyphar@cyphar.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: add openat2(2) selftests</title>
<updated>2020-01-18T14:19:18Z</updated>
<author>
<name>Aleksa Sarai</name>
<email>cyphar@cyphar.com</email>
</author>
<published>2020-01-18T12:08:00Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=b28a10aedcd4d175470171a32f4f20b0a60a612b'/>
<id>urn:sha1:b28a10aedcd4d175470171a32f4f20b0a60a612b</id>
<content type='text'>
Test all of the various openat2(2) flags. A small stress-test of a
symlink-rename attack is included to show that the protections against
".."-based attacks are sufficient.

The main things these self-tests are enforcing are:

  * The struct+usize ABI for openat2(2) and copy_struct_from_user() to
    ensure that upgrades will be handled gracefully (in addition,
    ensuring that misaligned structures are also handled correctly).

  * The -EINVAL checks for openat2(2) are all correctly handled to avoid
    userspace passing unknown or conflicting flag sets (most
    importantly, ensuring that invalid flag combinations are checked).

  * All of the RESOLVE_* semantics (including errno values) are
    correctly handled with various combinations of paths and flags.

  * RESOLVE_IN_ROOT correctly protects against the symlink rename(2)
    attack that has been responsible for several CVEs (and likely will
    be responsible for several more).

Cc: Shuah Khan &lt;shuah@kernel.org&gt;
Signed-off-by: Aleksa Sarai &lt;cyphar@cyphar.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
</feed>
