All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alasdair G Kergon <agk@redhat.com>
To: Guido Guenther <agx@sigxcpu.org>
Cc: Andrew Morton <akpm@osdl.org>, dm-devel@redhat.com
Subject: Re: dm-ioctl on amd64 with 32bit userspace
Date: Thu, 20 Sep 2007 16:32:10 +0100	[thread overview]
Message-ID: <20070920153210.GP18444@agk.fab.redhat.com> (raw)
In-Reply-To: <20070917165726.GA11958@bogon.ms20.nix>

On Mon, Sep 17, 2007 at 06:57:26PM +0200, Guido Guenther wrote:
> -	if (new_name < (char *) (param + 1) ||
> +	if (new_name < (char *) ((void*)(param + 1) - 4) ||

Does this (untested) also work for you?

+	if (new_name < (char *) (align_ptr(param + 1) - 4) ||

I think that's slightly better as it should leave the 32-bit
case unchanged.

One day, we'll fix all this properly by making the structure size in the
interface architecture-independent as it should have been in the first
place...

[http://www.kernel.org/pub/linux/kernel/people/agk/patches/2.6/editing/dm-ioctl-fix-compat-bounds-test.patch
but wait for it to resync]

Alasdair
-- 
agk@redhat.com

  parent reply	other threads:[~2007-09-20 15:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-17 16:57 dm-ioctl on amd64 with 32bit userspace Guido Guenther
2007-09-20  0:26 ` Andrew Morton
2007-09-20  1:24   ` Alasdair G Kergon
2007-09-20  7:07     ` Guido Guenther
2007-09-20 15:32 ` Alasdair G Kergon [this message]
2007-09-20 18:46   ` Guido Guenther
     [not found]     ` <20070929132754.GA19089@bogon.ms20.nix>
     [not found]       ` <20071002010519.GB18444@agk.fab.redhat.com>
     [not found]         ` <20071002071647.GA11183@bogon.ms20.nix>
2007-10-04 17:28           ` Alasdair G Kergon

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=20070920153210.GP18444@agk.fab.redhat.com \
    --to=agk@redhat.com \
    --cc=agx@sigxcpu.org \
    --cc=akpm@osdl.org \
    --cc=dm-devel@redhat.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 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.