All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laszlo Valko <valko@linux.karinthy.hu>
To: "David S. Miller" <davem@redhat.com>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: [PATCH] sparc64 compatibility netfilter patches
Date: Thu, 2 Jan 2003 10:20:11 +0100	[thread overview]
Message-ID: <20030102102011.A28219@linux.karinthy.hu> (raw)
In-Reply-To: <20030101.222223.122334112.davem@redhat.com>; from davem@redhat.com on Wed, Jan 01, 2003 at 10:22:23PM -0800

On Wed, Jan 01, 2003 at 10:22:23PM -0800, David S. Miller wrote:
> 
> The hack for building the tools is wrong, there are 64-bit
> compilers and userspace available.

I totally agree that this hack is the wrong way to do it.
It will definitely not work with 64-bit userspace.

> The real fix for that (for when your tools are 32-bit) is
> to run "sparc32 /bin/sh" and compile in that environment.

I don't see how that would solve our problem. It will probably
produce working code with 64-bit userspace, but not in the mixed
bit-length case.

Actually, the hack with KERNEL_64_USERSPACE_32 in the tools had
existed before I even looked at the code. It was too tempting to
extend it to my case even tough I know it's not good :)


There are basically two "good" and a "worse" solution:

1) make the kernel interface saner by excluding longs and pointers
   altogether, and cleaning it up by separating "interface" and
   "kernel internal" variables/structures (complicated, introducing
   incompatible API changes),

2) do kernel side 32-64 bit conversions (ugly, big performance
   penalty, looks like a big hack, difficult to maintain),

3) make a similar hack, like there currently is, but with correct
   userspace-kernelspace bit-length checking, and do the magic in
   the tools (even uglier, but no performance penalty and easier to
   maintain).

None of them are simple.

In the long run, I vote for the first one.
If I have a spare week, I might as well try to "sink" into the
netfilter code, and implement something...

> I'll be looking at the kernel side patch next, it should be
> ok.

Thanks.

Laszlo
e-mail: <valko@linux.karinthy.hu>

  reply	other threads:[~2003-01-02  9:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-01 16:16 [PATCH] sparc64 compatibility netfilter patches Laszlo Valko
2003-01-01 20:32 ` Laszlo Valko
2003-01-02  6:22   ` David S. Miller
2003-01-02  9:20     ` Laszlo Valko [this message]
2003-01-07  8:47   ` David S. Miller
2003-01-02  8:57 ` Harald Welte
2003-01-02  9:09   ` David S. Miller
2003-01-02  9:31     ` Laszlo Valko
2003-01-02  9:41       ` David S. Miller

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=20030102102011.A28219@linux.karinthy.hu \
    --to=valko@linux.karinthy.hu \
    --cc=davem@redhat.com \
    --cc=netfilter-devel@lists.netfilter.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 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.