<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/testing/selftests/ptp/testptp.c, branch linux-4.16.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.16.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.16.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-01-04T13:57:10+00:00</updated>
<entry>
<title>posix-timers: Prevent UB from shifting negative signed value</title>
<updated>2018-01-04T13:57:10+00:00</updated>
<author>
<name>Nick Desaulniers</name>
<email>nick.desaulniers@gmail.com</email>
</author>
<published>2017-12-29T03:11:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=29f1b2b0fecfae69e31833836f1da3136696eee5'/>
<id>urn:sha1:29f1b2b0fecfae69e31833836f1da3136696eee5</id>
<content type='text'>
Shifting a negative signed number is undefined behavior. Looking at the
macros MAKE_PROCESS_CPUCLOCK and FD_TO_CLOCKID, it seems that the
subexpression:

(~(clockid_t) (pid) &lt;&lt; 3)

where clockid_t resolves to a signed int, which once negated, is
undefined behavior to shift the value of if the results thus far are
negative.

It was further suggested to make these macros into inline functions.

Suggested-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Nick Desaulniers &lt;nick.desaulniers@gmail.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Dimitri Sivanich &lt;sivanich@hpe.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: linux-kselftest@vger.kernel.org
Cc: Shuah Khan &lt;shuah@kernel.org&gt;
Cc: Deepa Dinamani &lt;deepa.kernel@gmail.com&gt;
Link: https://lkml.kernel.org/r/1514517100-18051-1-git-send-email-nick.desaulniers@gmail.com

</content>
</entry>
<entry>
<title>selftests: move ptp tests from Documentation/ptp</title>
<updated>2016-09-20T15:54:38+00:00</updated>
<author>
<name>Shuah Khan</name>
<email>shuahkh@osg.samsung.com</email>
</author>
<published>2016-09-13T17:30:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8dbbf854202610a033a0788c33d8feb1548d3eeb'/>
<id>urn:sha1:8dbbf854202610a033a0788c33d8feb1548d3eeb</id>
<content type='text'>
Remove ptp from Makefile to move the test to selftests. Update ptp Makefile
to work under selftests. ptp will not be run as part of selftests suite and
will not be included in install targets. They can be built separately for
now.

Acked-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
</feed>
