From: Andreas Schwab <schwab@suse.de>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Linus Torvalds <torvalds@osdl.org>,
<linux-kernel@vger.kernel.org>, Matthew Wilcox <willy@debian.org>
Subject: Re: [PATCH] use size_t for the broken ioctl numbers
Date: Mon, 08 Sep 2003 15:33:08 +0200 [thread overview]
Message-ID: <jeptibxv57.fsf@sykes.suse.de> (raw)
In-Reply-To: <200309081503.20459.arnd@arndb.de> (Arnd Bergmann's message of "Mon, 8 Sep 2003 15:03:20 +0200")
Arnd Bergmann <arnd@arndb.de> writes:
> --- 1.1/include/asm-i386/ioctl.h Tue Feb 5 18:39:44 2002
> +++ edited/include/asm-i386/ioctl.h Mon Sep 8 13:21:28 2003
> @@ -52,11 +52,21 @@
> ((nr) << _IOC_NRSHIFT) | \
> ((size) << _IOC_SIZESHIFT))
>
> +/* provoke compile error for invalid uses of size argument */
> +extern int __invalid_size_argument_for_IOC;
> +#define _IOC_TYPECHECK(t) \
> + ((sizeof(t) == sizeof(t[1]) && \
> + sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
> + sizeof(t) : __invalid_size_argument_for_IOC)
This will fail when compiled unoptimized, which means that glibc could not
use <asm/ioctls.h> any more.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2003-09-08 13:38 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <tbGb.75d.15@gated-at.bofh.it>
[not found] ` <tbPO.7j9.5@gated-at.bofh.it>
2003-09-07 21:28 ` [PATCH] use size_t for the broken ioctl numbers Arnd Bergmann
2003-09-07 23:15 ` Linus Torvalds
2003-09-07 23:21 ` Linus Torvalds
2003-09-08 13:03 ` Arnd Bergmann
2003-09-08 13:33 ` Andreas Schwab [this message]
2003-09-08 13:35 ` Andries Brouwer
2003-09-07 6:22 Matthew Wilcox
2003-09-07 16:48 ` Andreas Schwab
2003-09-07 17:29 ` Linus Torvalds
2003-09-07 17:34 ` Andreas Schwab
2003-09-08 13:10 ` Ingo Oeser
2003-09-08 12:38 ` Andries Brouwer
2003-09-08 15:13 ` Linus Torvalds
2003-09-08 18:40 ` Andries Brouwer
2003-09-08 18:54 ` Linus Torvalds
2003-09-08 19:28 ` Randy.Dunlap
2003-09-08 19:53 ` Jeff Garzik
2003-09-08 20:15 ` Linus Torvalds
2003-09-08 20:26 ` Dave Jones
2003-09-08 21:53 ` Jeff Garzik
2003-09-08 22:25 ` Dave Jones
2003-09-08 20:27 ` Andries Brouwer
2003-09-08 20:43 ` Linus Torvalds
2003-09-09 11:40 ` Jens Axboe
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=jeptibxv57.fsf@sykes.suse.de \
--to=schwab@suse.de \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
--cc=willy@debian.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox