[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFyiCg23eL=y0nE8a-6_tBAtB097J8v_BtpUcHU8sc3hyQ@mail.gmail.com>
Date: Wed, 26 Nov 2014 10:58:43 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Sasha Levin <sasha.levin@...cle.com>,
Dan Carpenter <dan.carpenter@...cle.com>
Cc: Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...nel.org>
Subject: Re: [RFC 1/2] compiler: use compiler to detect integer overflows
On Wed, Nov 26, 2014 at 10:50 AM, Sasha Levin <sasha.levin@...cle.com> wrote:
>
> The kernel still has it's share of *signed* integer overflows. Example? fadvise64_64():
Yes, those would definitely be worth fixing.
[ Although quite frankly, since I know gcc already knows about the
whole "check for overflow" pattern, from a QoI standpoint it is sad
that it then might optimize it away. Kind of like how it would trust
the type-based strict alias analysis more than the obvious *static*
alias analysis. Oh well ]
I don't think coccinelle can do signedness checks, though, especially
of the kind that are hidden deep behind some typedef like "loff_t".
Maybe I'm wrong. Maybe smatch can? Adding Dan Carpenter to the cc..
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists