All of lore.kernel.org
 help / color / mirror / Atom feed
From: Erik Andersen <andersen@codepoet.org>
To: "David S. Miller" <davem@davemloft.net>
Cc: mmazur@kernel.pl, linux-kernel@vger.kernel.org
Subject: Re: [ANNOUNCE] linux-libc-headers 2.6.8.1
Date: Mon, 30 Aug 2004 01:48:35 -0600	[thread overview]
Message-ID: <20040830074835.GA12963@codepoet.org> (raw)
In-Reply-To: <20040830002422.4b634c6c.davem@davemloft.net>

On Mon Aug 30, 2004 at 12:24:22AM -0700, David S. Miller wrote:
> On Mon, 30 Aug 2004 00:28:56 -0600
> Erik Andersen <andersen@codepoet.org> wrote:
> 
> > I really do not like this change.  Since PAGE_SIZE has always
> > been a constant, the change you have made is likely to break a
> > fair amount of code, basically any code doing stuff like:
> 
> It has never been a constant, and any portable piece of
> software needs to evaluate it not at compile time.
> 
> When I first did the sparc64 port, the biggest source of
> portability problems was of the "uses PAGE_SIZE in some way"
> nature.
> 
> This is a positive change, we should break the build of these
> apps and thus get them fixed.

There is no question that using PAGE_SIZE should be considered
harmful.  But this particular change to the linux-libc-headers
makes it easy for the common case (bog standard x86) folk to keep
using a fixed PAGE_SIZE value, and keep writing crap code which
is now _guaranteed_ to blow chunks on mips, x86_64, etc.

I think outright removal of PAGE_SIZE from user space may be a
much better choice, with some sortof #error perhaps...  Wouldn't
it be better for the whole world if people would get errors like

    foo.c:10:2: #error "Don't use PAGE_SIZE, use sysconf(_SC_PAGESIZE)"

making people actually fix their code?

 -Erik

--
Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--

  reply	other threads:[~2004-08-30  7:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-29 20:32 [ANNOUNCE] linux-libc-headers 2.6.8.1 Mariusz Mazur
2004-08-30  6:28 ` Erik Andersen
2004-08-30  7:24   ` David S. Miller
2004-08-30  7:48     ` Erik Andersen [this message]
2004-08-30  8:07       ` William Lee Irwin III
2004-08-30  8:43         ` Erik Andersen
2004-08-30 11:17       ` Mariusz Mazur
2004-08-30  9:22 ` Andrew Walrond
  -- strict thread matches above, loose matches on Subject: below --
2004-08-30 13:36 Albert Cahalan

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=20040830074835.GA12963@codepoet.org \
    --to=andersen@codepoet.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmazur@kernel.pl \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.