From: Jens Axboe <jens.axboe@oracle.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-kernel@vger.kernel.org, davem@davemloft.net, hch@lst.de,
Al Viro <viro@ftp.linux.org.uk>
Subject: Re: [PATCH] Fix blktrace setup 32-bit ioctl on 64-bit kernels
Date: Thu, 4 Oct 2007 20:16:06 +0200 [thread overview]
Message-ID: <20071004181606.GH5711@kernel.dk> (raw)
In-Reply-To: <200710040048.20676.arnd@arndb.de>
On Thu, Oct 04 2007, Arnd Bergmann wrote:
> On Wednesday 03 October 2007, Arnd Bergmann wrote:
> > Jens, I think the best overall solution would be to have a
> > block/compat_ioctl.c file with all the compat handling for block
> > devices moved over from fs/compat_ioctl.c, and done in a nicer way.
> > If you agree, with this approach, I'd volunteer to come up with a
> > patch.
>
> Sometimes I find it hard to stop myself once I have the idea.
> The patch below moves all block related ioctl conversion out
> of fs/compat_ioctl.c into the compat_blkdev_ioctl() function.
>
> Is that a direction we should be heading towards? If so, I
> can do some testing and split this big patch into more
> logical units for better review.
This looks a lot better! I don't mind seperating the block bits, when we
get the whole bunch in there. Just seemed overly silly and complicated
to do it for just one ioctl command. When you are happy with this patch,
I'll add it to the pending block stuff for 2.6.24. The blktrace fix
isn't a regression so need not go into 2.6.23.
It seems some bits are missing though (like BLKTRACESETUP32), did you
send the whole thing?
> I also found a few interesting bugs in the process:
> * BLKRASET is both ULONG_IOCTL and COMPATIBLE_IOCTL, but this should
> be entirely harmless
> * BLKSECTGET writes 2 bytes normally, our compat_ version writes
> 4 bytes!
> * FDSETPRM32, FDDEFPRM32 and FDGETPRM32 are doing potentially dangerous
> stuff with kernel pointers. sparse actually warns about this, but
> from what I could see from floppy.c, the kernel always ignores these
> pointers. I did not check any other floppy drivers implementing the
> same calls.
Always nice to find bugs when doing cleanups ;-)
--
Jens Axboe
next prev parent reply other threads:[~2007-10-04 18:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-02 7:39 [PATCH] Fix blktrace setup 32-bit ioctl on 64-bit kernels Jens Axboe
2007-10-02 7:52 ` David Miller
2007-10-02 8:15 ` Arnd Bergmann
2007-10-02 8:37 ` Jens Axboe
2007-10-02 9:28 ` Jens Axboe
2007-10-03 9:34 ` Arnd Bergmann
2007-10-03 15:55 ` Arnd Bergmann
2007-10-03 22:48 ` Arnd Bergmann
2007-10-04 18:16 ` Jens Axboe [this message]
2007-10-04 18:44 ` Arnd Bergmann
2007-10-05 10:41 ` Jens Axboe
2007-10-05 12:30 ` [PATCH] block: move ioctl conversion to compat_blkdev_ioctl Arnd Bergmann
2007-10-05 12:41 ` Jens Axboe
2007-10-05 12:41 ` Arnd Bergmann
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=20071004181606.GH5711@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@ftp.linux.org.uk \
/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