From: Eric Dumazet <hidden> Date: 2014-12-16 21:47:44
On Tue, 2014-12-16 at 16:19 -0500, Sasha Levin wrote:
Hi Eric,
While fuzzing with trinity on a -next kernel with the undefined behaviour
sanitizer path, I've observed the following warning in code which was
introduced in 04ca6973f7 ("ip: make IP identifiers less predictable"):
This is a false positive.
We don't really care of the value if (now - old) is too big :
No packet was sent recently, so IP ID being X or Y is not a concern.
From: Hannes Frederic Sowa <hidden> Date: 2014-12-16 23:09:20
On Tue, Dec 16, 2014, at 22:47, Eric Dumazet wrote:
On Tue, 2014-12-16 at 16:19 -0500, Sasha Levin wrote:
quoted
Hi Eric,
While fuzzing with trinity on a -next kernel with the undefined behaviour
sanitizer path, I've observed the following warning in code which was
introduced in 04ca6973f7 ("ip: make IP identifiers less predictable"):
This is a false positive.
Also we compile the whole kernel with -fno-strict-overflow, so every
report of signed overflow leading to undefined behavior is probably a
false positive. I don't know if it is worth to try to get rid of them, I
doubt it.
Bye,
Hannes
From: Eric Dumazet <hidden> Date: 2014-12-16 23:22:31
On Wed, 2014-12-17 at 00:09 +0100, Hannes Frederic Sowa wrote:
Also we compile the whole kernel with -fno-strict-overflow, so every
report of signed overflow leading to undefined behavior is probably a
false positive. I don't know if it is worth to try to get rid of them, I
doubt it.
Presumably we could have uatomic_t , or atomic_u32_t, whatever...
This particular xadd() is heavily hit in some cases, we really do not
want a cmpxchg()
On 12/16/2014 06:09 PM, Hannes Frederic Sowa wrote:
On Tue, Dec 16, 2014, at 22:47, Eric Dumazet wrote:
quoted
quoted
On Tue, 2014-12-16 at 16:19 -0500, Sasha Levin wrote:
quoted
quoted
Hi Eric,
While fuzzing with trinity on a -next kernel with the undefined behaviour
sanitizer path, I've observed the following warning in code which was
introduced in 04ca6973f7 ("ip: make IP identifiers less predictable"):
This is a false positive.
Also we compile the whole kernel with -fno-strict-overflow, so every
report of signed overflow leading to undefined behavior is probably a
false positive. I don't know if it is worth to try to get rid of them, I
doubt it.
I reported this one because there's usually some code to handle overflow
in code that expects that and here there was none (I could see).
For example, the ntp code had a few cases where a user could generate
overflows and mess up quite a few things (he got what he asked for -
problems).
Thanks,
Sasha
From: Eric Dumazet <hidden> Date: 2014-12-17 14:11:44
On Tue, 2014-12-16 at 20:15 -0500, Sasha Levin wrote:
I reported this one because there's usually some code to handle overflow
in code that expects that and here there was none (I could see).
IP ID are best effort.
When sending one million IPv4 frames per second to a particular
destination, the 16bit ID space is recycled so fast that really their
precise values do not matter anymore.
You pray that IP fragments wont be needed at all.
(One of the idea I had was to detect this kind of stress and fallback to
a random generation, reducing false sharing, but this seemed a micro
optimization targeting synthetic benchmarks )
Thanks