From: Anton Blanchard <anton@linuxcare.com.au>
To: linux-lvm@sistina.com, Mauelshagen@sistina.com,
linux-kernel@vger.kernel.org, lvm@sistina.com
Subject: Re: [linux-lvm] Re: *** ANNOUNCEMENT *** LVM 0.9.1 beta1 available at www.sistina.com
Date: Sun, 14 Jan 2001 12:23:03 +1100 [thread overview]
Message-ID: <20010114122303.E20398@linuxcare.com> (raw)
In-Reply-To: <20010113114507.D15915@linuxcare.com> <200101130143.f0D1hNF19829@webber.adilger.net> <20010113170616.B22699@caldera.de>
In-Reply-To: <20010113170616.B22699@caldera.de>; from hch@ns.caldera.de on Sat, Jan 13, 2001 at 05:06:16PM +0100
> The longs are the biggest problem AFAICS.
> long is 64bit on sparc64 and 32bit on sparc32...
Embedding pointers in ioctls is much worse. When this happens we basically
end up duplicating the ioctl parsing code (this code courtesy of jakub's
sharp mind, but it would be nice not to require this :)
Anton
case VG_CREATE:
v = kmalloc(sizeof(vg_t), GFP_KERNEL);
if (!v) return -ENOMEM;
if (copy_from_user(v, (void *)arg, (long)&((vg32_t *)0)->proc) ||
__get_user(v->proc, &((vg32_t *)arg)->proc)) {
kfree(v);
return -EFAULT;
}
karg = v;
memset(v->pv, 0, sizeof(v->pv) + sizeof(v->lv));
if (v->pv_max > ABS_MAX_PV || v->lv_max > ABS_MAX_LV)
return -EPERM;
for (i = 0; i < v->pv_max; i++) {
err = __get_user(ptr, &((vg32_t *)arg)->pv[i]);
if (err) break;
if (ptr) {
v->pv[i] = kmalloc(sizeof(pv_t), GFP_KERNEL);
if (!v->pv[i]) {
err = -ENOMEM;
break;
}
err = copy_from_user(v->pv[i], (void *)A(ptr), sizeof(pv32_t) - 8);
if (err) {
err = -EFAULT;
break;
}
v->pv[i]->pe = NULL; v->pv[i]->inode = NULL;
}
}
if (!err) {
for (i = 0; i < v->lv_max; i++) {
err = __get_user(ptr, &((vg32_t *)arg)->lv[i]);
if (err) break;
if (ptr) {
v->lv[i] = get_lv_t(ptr, &err);
if (err) break;
}
}
}
break;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2001-01-14 1:26 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-13 1:15 [linux-lvm] *** ANNOUNCEMENT *** LVM 0.9.1 beta1 available at www.sistina.com Heinz J. Mauelshagen
2001-01-13 1:15 ` Heinz J. Mauelshagen
2001-01-13 0:45 ` Anton Blanchard
2001-01-13 1:43 ` [linux-lvm] " Andreas Dilger
2001-01-13 1:43 ` Andreas Dilger
2001-01-13 3:00 ` Anton Blanchard
2001-01-13 16:06 ` [linux-lvm] " Christoph Hellwig
2001-01-13 16:06 ` Christoph Hellwig
2001-01-14 1:23 ` Anton Blanchard [this message]
2001-01-16 8:51 ` Patrick Caulfield
2001-01-16 8:51 ` Patrick Caulfield
2001-01-16 20:10 ` Charles Duffy
2001-01-17 10:16 ` Patrick Caulfield
2001-01-13 16:04 ` [linux-lvm] " Jan Niehusmann
2001-01-13 18:08 ` Holger Grothe
2001-01-13 18:30 ` Holger Grothe
2001-01-13 20:59 ` William L. Jones
2001-01-13 22:35 ` Rob Fugina
2001-01-13 23:26 ` Steven Lembark
2001-01-14 13:29 ` Jan Niehusmann
2001-01-14 14:17 ` Jan Niehusmann
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=20010114122303.E20398@linuxcare.com \
--to=anton@linuxcare.com.au \
--cc=Mauelshagen@sistina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-lvm@sistina.com \
--cc=lvm@sistina.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.