lkml.org 
[lkml]   [2015]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [GIT] Networking
Date
On Wed, Oct 28 2015, Hannes Frederic Sowa <hannes@stressinduktion.org> wrote:

> Hi Linus,
>
> On Wed, Oct 28, 2015, at 10:39, Linus Torvalds wrote:
>> Get rid of it. And I don't *ever* want to see that shit again.
>
> I don't want to give up on that this easily:
>
> In future I would like to see an interface like this. It is often hard
> to do correct overflow/wrap-around tests and it would be great if there
> are helper functions which could easily and without a lot of thinking be
> used by people to remove those problems from the kernel.

I agree - proper overflow checking can be really hard. Quick, assuming a
and b have the same unsigned integer type, is 'a+b<a' sufficient to
check overflow? Of course not (hint: promotion rules). And as you say,
it gets even more complicated for signed types.

A few months ago I tried posting a complete set of fallbacks for older
compilers (https://lkml.org/lkml/2015/7/19/358), but nothing really
happened. Now I know where Linus stands, so I guess I can just delete
that branch.

Rasmus


\
 
 \ /
  Last update: 2015-10-28 15:41    [W:1.564 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site