mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Mosberger <davidm@napali.hpl.hp.com>
To: Jamie Lokier <jamie@shareable.org>
Cc: davidm@hpl.hp.com, linux-ia64@linuxia64.org, "Siddha,
	Suresh B" <suresh.b.siddha@intel.com>,
	Andrew Morton <akpm@osdl.org>, Kurt Garloff <garloff@suse.de>,
	linux-kernel@vger.kernel.org, mingo@redhat.com
Subject: Re: [PATCH] (IA64) Fix ugly __[PS]* macros in <asm-ia64/pgtable.h>
Date: Wed, 14 Apr 2004 12:02:58 -0700	[thread overview]
Message-ID: <16509.35554.807689.904871@napali.hpl.hp.com> (raw)
In-Reply-To: <20040414184603.GA12105@mail.shareable.org>

>>>>> On Wed, 14 Apr 2004 19:46:03 +0100, Jamie Lokier <jamie@shareable.org> said:

  Jamie> David Mosberger wrote:
  >> Huh?  You haven't actually checked, have you?

  Jamie> Yes I have.  Quite thoroughly.

Then you should have noticed that drivers/char/mem.c is using PAGE_COPY.
Various architecture-dependent code is also using PAGE_foo macros.

  Jamie> In theory the Alpha can do exec-only pages, but it's __[PS]*
  Jamie> map always gives read permission when there's execute
  Jamie> permission.  I'm not sure if there's a reason for that, or if
  Jamie> it just historically copied the i386 behaviour (Alpha was the
  Jamie> first port).

I know why: back in those days, GCC emitted code for nested C
functions that assumed an executable stack.  Also, Linus wasn't
terribly eager to turn off execute-permission on data/stacks.  Even on
ia64 we started out that way, until I saw the error in my ways.

  Jamie> I agree it is best to avoid namespace pollution.  However
  Jamie> this is one area where ia64 sticks out because it's approach
  Jamie> is different from other ports.  All of them except Alpha used
  Jamie> PAGE_* names to clarify the __[PS]* map, defining additional
  Jamie> names as needed.

The reality is that whenever you introduce a globally visible name
that is not used on x86, there is a very definite risk that someone
will use that same name and cause a conflict.  We have had that happen
several times and that's the reason I'm normally religious about
prefixing all ia64-specific names with a "ia64_" or "IA64_" (yes, this
makes code a bit uglier, but you can't have it both ways).  Your
argument that the Alpha and other ports are doing something different
doesn't buy me anything.  If the ia64 break builds, the Alpha
maintainer won't fix it up for me, after all.

	--david

  reply	other threads:[~2004-04-14 19:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-14  7:28 Non-Exec stack patches Siddha, Suresh B
2004-04-14  8:23 ` Jamie Lokier
2004-04-14  8:35   ` PowerPC exec page protection Jamie Lokier
2004-04-14  8:44     ` Anton Blanchard
2004-04-14  9:35       ` Jamie Lokier
2004-04-14 11:37   ` [PATCH] (IA64) Fix ugly __[PS]* macros in <asm-ia64/pgtable.h> Jamie Lokier
2004-04-14 16:07     ` David Mosberger
2004-04-14 18:46       ` Jamie Lokier
2004-04-14 19:02         ` David Mosberger [this message]
2004-04-14 19:14           ` Jamie Lokier
2004-04-14 19:28           ` Jamie Lokier
2004-04-14 20:05             ` David Mosberger
2004-04-14 21:05               ` Jamie Lokier
2004-04-14 22:34                 ` David Mosberger
2004-04-15 15:26                   ` Jamie Lokier
2004-04-15 17:45                     ` David Mosberger
2004-04-14  9:47 ` Non-Exec stack patches Jamie Lokier
2004-04-14 18:30   ` Kurt Garloff
2004-04-14 20:54     ` Jeff Dike
2004-04-14 18:35 ` Kurt Garloff

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=16509.35554.807689.904871@napali.hpl.hp.com \
    --to=davidm@napali.hpl.hp.com \
    --cc=akpm@osdl.org \
    --cc=davidm@hpl.hp.com \
    --cc=garloff@suse.de \
    --cc=jamie@shareable.org \
    --cc=linux-ia64@linuxia64.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=suresh.b.siddha@intel.com \
    /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®