Re: Minor net/core/sock.c security issue?

From: Alexey Kuznetsov (kuznet@ms2.inr.ac.ru)
Date: Tue Jul 24 2001 - 17:24:55 EST


Hello!

> 1) Signedness, what you have discovered.
>
> 2) Arg evaluation.

Damn, I always assumed that min/max are macros and took into account #2,
which was painful sometimes. :-)

The fact that it is defined in sock.h (and the definition is truly
crazy, add #4: it is funny what happens on 64bit archs, when one of args
happens to be long)

> 1) have standard inline functions with names that suggest the
> signedness, much like Rusty's netfilter macros.

min/max are macros. I do not know how to make a valid inline
for it: cast to long has problems with unsigned longs, cast to unsigned long
have the same problems with signedness.

Alexey
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jul 31 2001 - 21:00:23 EST