All of lore.kernel.org
 help / color / mirror / Atom feed
From: viro@parcelfarce.linux.theplanet.co.uk
To: mike.miller@hp.com
Cc: akpm@osdl.org, axboe@suse.de, linux-kernel@vger.kernel.org
Subject: Re: cciss update for 2.6.7-rc1
Date: Fri, 4 Jun 2004 21:53:41 +0100	[thread overview]
Message-ID: <20040604205341.GP12308@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <20040602201326.GA1346@beardog.cca.cpqcorp.net>

On Wed, Jun 02, 2004 at 03:13:26PM -0500, mikem@beardog.cca.cpqcorp.net wrote:

a) use compat_alloc_user_space() and copy_in_user()

> +	err |= copy_from_user(&arg64.LUN_info, &arg32->LUN_info, sizeof(arg64.LUN_info));
> +	err |= copy_from_user(&arg64.Request, &arg32->Request, sizeof(arg64.Request));
> +	err |= copy_from_user(&arg64.error_info, &arg32->error_info, sizeof(arg64.error_info));
> +	err |= get_user(arg64.buf_size, &arg32->buf_size);

b) use compat_ptr() to convert pointers

> +	err |= get_user(arg64.buf, &arg32->buf);


c) and do not bother with get_fs()/set_fs() at all - with
compat_alloc_user_space() variant you won't need it.

> +	old_fs = get_fs();
> +	set_fs(KERNEL_DS);
> +	err = sys_ioctl(fd, CCISS_PASSTHRU, (unsigned long) &arg64);
> +	set_fs(old_fs);

  parent reply	other threads:[~2004-06-04 20:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-02 20:13 cciss update for 2.6.7-rc1 mikem
2004-06-04 20:42 ` Andrew Morton
2004-06-04 20:53 ` viro [this message]
     [not found] <23tkF-7Hg-29@gated-at.bofh.it>
2004-06-04 21:59 ` Andi Kleen

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=20040604205341.GP12308@parcelfarce.linux.theplanet.co.uk \
    --to=viro@parcelfarce.linux.theplanet.co.uk \
    --cc=akpm@osdl.org \
    --cc=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike.miller@hp.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.