public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Albert Cahalan <acahalan@gmail.com>
Cc: olaf@aepfle.de, akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] remove PAGE_SIZE from headers_install
Date: Sat, 14 Jul 2007 20:19:47 -0700	[thread overview]
Message-ID: <46999253.6020004@zytor.com> (raw)
In-Reply-To: <787b0d920707141948t71b4059s7ae68610f9f81eac@mail.gmail.com>

Albert Cahalan wrote:
> 
> A real constant-value PAGE_SIZE is useful and doable.
> 
> It's useful because a getpagesize() can't be used for numerous
> things, such as setting the size of an array.
> 
> It's doable, even on architectures that support multiple page
> sizes, because ABIs specify alignment requirements. There are
> two alignments of interest here:
> 
> a. the smallest that mmap() will ever naturally return on any
>   correct implementation of the architecture's ABI ("naturally"
>   meaning that MAP_FIXED was not used)
> 
> b. the smallest that mprotect() will tolerate on all
>   correct implementations of the architecture
> 
> Pick either to be the Linux definition of PAGE_SIZE.
> 

If you specify it to be one of these, people will mis-use it for the
other.  This is a bad idea.

	-hpa

  reply	other threads:[~2007-07-15  3:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-15  2:48 [PATCH] remove PAGE_SIZE from headers_install Albert Cahalan
2007-07-15  3:19 ` H. Peter Anvin [this message]
2007-07-15  3:43 ` David Miller
2007-07-15  4:49   ` Albert Cahalan
  -- strict thread matches above, loose matches on Subject: below --
2007-07-14 21:40 Mikael Pettersson
2007-07-14 20:57 Olaf Hering
2007-07-14 21:04 ` Mike Frysinger
2007-07-15  6:27   ` Olaf Hering
2007-07-15  7:20     ` Mike Frysinger
2007-07-15 10:10       ` David Woodhouse
2007-08-04 10:04       ` Olaf Hering
2007-07-15  7:51   ` Olaf Hering
2007-07-14 21:12 ` H. Peter Anvin
2007-07-14 21:34   ` Olaf Hering
2007-07-14 22:59     ` Mike Frysinger
2007-07-15  8:01     ` David Woodhouse

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=46999253.6020004@zytor.com \
    --to=hpa@zytor.com \
    --cc=acahalan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olaf@aepfle.de \
    /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