From: "Giuliano Procida" <giuliano.procida@googlemail.com>
To: "Mikael Pettersson" <mikpe@it.uu.se>, rgooch@atnf.csiro.au
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH]: MTRR: fix 32-bit ioctls on x64_32
Date: Tue, 16 Jan 2007 17:59:15 +0000 [thread overview]
Message-ID: <5c8016cf0701160959l1489b56t980779f1f6e49848@mail.gmail.com> (raw)
In-Reply-To: <200701161248.l0GCmG7O025771@harpo.it.uu.se>
Hi.
On 16/01/07, Mikael Pettersson <mikpe@it.uu.se> wrote:
> On Tue, 16 Jan 2007 08:14:30 +0000, Giuliano Procida wrote:
> These #ifdefs are too ugly.
Agreed that the #ifdefs are rather ugly, but they were the smallest change.
Whoever wrote the original compat changes was relying on the IOC
constants being different for 32- and 64-bit userspace. This allowed the
lazy reuse of the whole ioctl function rather than having to write a complete
replacement compat_ioctl for fops.
> Since you apparently just add aliases for the case labels,
> and do no actual code changes, why not
> 1. make the new cases unconditional, or
The constants are only visible under CONFIG_COMPAT. I think they
should stay that way.
> 2. invoke a translation function before the switch which
> maps the MTRRCIOC32_ constants to what the kernel uses
Other things I considered:
3. write a wrapper compat function that calls the original, make the
original pure 64-bit
4. macroise the case labels away somehow
5. update cmd in place (cannot do this as it re-used in the third switch)
6. add real_cmd and switch on that instead (your 2.),
requires yet another switch and #ifdef.
It might be nicer to decode the IOC constants and use action, size and R/W flags
to control all the switches. Not sure myself.
Giuliano.
next prev parent reply other threads:[~2007-01-16 17:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-16 12:48 Mikael Pettersson
2007-01-16 17:59 ` Giuliano Procida [this message]
2007-01-17 3:51 ` H. Peter Anvin
2007-01-23 13:23 ` Giuliano Procida
-- strict thread matches above, loose matches on Subject: below --
2007-01-16 8:14 Giuliano Procida
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=5c8016cf0701160959l1489b56t980779f1f6e49848@mail.gmail.com \
--to=giuliano.procida@googlemail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mikpe@it.uu.se \
--cc=rgooch@atnf.csiro.au \
/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®