mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Oeser <ioe-lkml@axxeo.de>
To: Arjan van de Ven <arjan@infradead.org>
Cc: Linux Kernel ML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2.6] fix mprotect() with len=(size_t)(-1) to return -ENOMEM
Date: Mon, 14 Mar 2005 22:58:01 +0100	[thread overview]
Message-ID: <200503142258.01611.ioe-lkml@axxeo.de> (raw)
In-Reply-To: <1110794932.6288.58.camel@laptopd505.fenrus.org>

Hi Arjan,

You wrote:
> shouldn't we just fix the alignment code instead that the overflow case
> doesn't align to 0???
> that sounds really odd.

How? You have to align and you are out of bits for representing the
next number. What is the next number you can round to? "null" right!

Just remember that integer math with limited bits is always ring math ;-)

I love to abuse this for buffers and save an if.

Regards

Ingo Oeser




  reply	other threads:[~2005-03-14 22:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-14  9:55 Gordon Jin
2005-03-14 10:08 ` Arjan van de Ven
2005-03-14 21:58   ` Ingo Oeser [this message]
2005-03-15  3:04 ` [PATCH 2.6] fix mmap() return value to conform POSIX Gordon Jin

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=200503142258.01611.ioe-lkml@axxeo.de \
    --to=ioe-lkml@axxeo.de \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.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®