mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: Anatol Pomozov <anatol.pomozov@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>, Tejun Heo <tj@kernel.org>,
	bernie@develer.com, Geert Uytterhoeven <geert@linux-m68k.org>
Subject: Re: do_div() silently truncates "base" to 32bit
Date: Fri, 30 Aug 2013 16:28:39 -0700	[thread overview]
Message-ID: <1377905319.2070.38.camel@joe-AO722> (raw)
In-Reply-To: <52212128.3000100@infradead.org>

On Fri, 2013-08-30 at 15:48 -0700, Randy Dunlap wrote:
> On 08/30/13 15:14, Anatol Pomozov wrote:
> > But another question still remains: why compiler does not warn that
> > size truncation happens? How to prevent bugs like CFQ one in the
> > future? Should we add a compile-time assert to do_div() to prevent
> > passing 64 numbers in "base" macro parameter?
> That sounds like a fine idea to me.

Geert thought so too and submitted a patch

http://www.spinics.net/lists/linux-btrfs/msg26788.html



  reply	other threads:[~2013-08-30 23:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-30 17:21 Anatol Pomozov
2013-08-30 21:23 ` Randy Dunlap
2013-08-30 22:14   ` Anatol Pomozov
2013-08-30 22:48     ` Randy Dunlap
2013-08-30 23:28       ` Joe Perches [this message]
2013-08-31  0:50         ` Anatol Pomozov
2013-09-04 15:32           ` Anatol Pomozov
2013-09-04 17:20             ` Randy Dunlap
2013-10-08 16:10 ` [PATCH] core: Catch overflows in do_div() function Anatol Pomozov
2013-10-08 16:18   ` Joe Perches
2013-10-08 16:45     ` Richard Weinberger
2013-10-08 16:51       ` Joe Perches
2013-10-08 17:28       ` Anatol Pomozov
2013-10-08 17:40         ` Anatol Pomozov
2013-10-08 17:15   ` Eric Dumazet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1377905319.2070.38.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=anatol.pomozov@gmail.com \
    --cc=bernie@develer.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®