All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ftp.linux.org.uk>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Jens Axboe <jens.axboe@oracle.com>,
	linux-kernel@vger.kernel.org, davem@davemloft.net, hch@lst.de
Subject: Re: [patch 0/9] compat_ioctl: introduce block/compat_ioctl.c
Date: Mon, 8 Oct 2007 06:12:18 +0100	[thread overview]
Message-ID: <20071008051218.GS8181@ftp.linux.org.uk> (raw)
In-Reply-To: <20071006181902.141862534@arndb.de>

On Sat, Oct 06, 2007 at 08:19:02PM +0200, Arnd Bergmann wrote:
> This is my block ioctl series split up into managable chunks. I'm not
> really sure about the last two of these, I'd prefer to get a second
> opinion on those.
> 
> Please apply once your tests have gone though.

BTW, one note: 0x1260 thing (
       /* The mkswap binary hard codes it to Intel value :-((( */
       case 0x1260:
       case BLKGETSIZE:
) is an ancient piece of BS.  It had appeared in 2.1.115-pre3 and AFAICS
it's a misunderstanding.

What happens here:
	* mkswap(8) used to hardcode BLKGETSIZE as 0x1260 (instead of
_IO(0x12,0x60)).  If _IO is undefined, it still does.  Several old
architectures (including i386) have the right value still equal to 0x1260
due to the way their _IO() is defined.
	* 0x1260 does *NOT* work on sparc32, exactly because its _IO()
is different.  _IO(0x12,0x60) works.
	* sparc64 for some insane reason (I suspect misreading the mkswap
source) tries to support 0x1260 for 32bit tasks.  Note that binary that
tries to pull that off will _not_ work on native sparc32.

As the matter of fact, all biarch targets old enough to have 32bit counterpart
present prior to 1.3.45 (when BLKGETSIZE went _IO(0x12,60)) either have
it still equal to 0x1260 on both 32bit and 64bit (i386/amd64) or have it
_not_ equal to 0x1260 on either (ppc/ppc64 and sparc/sparc64).  In the latter
case 0x1260 doesn't work on 32bit, so having it accepted from 32bit tasks
on 64bit is insane.

IOW, that stuff is useless and always had been.  In the current form it's
simply invalid C on e.g. amd64 - you get duplicate case there, which breaks
the build.

I'd simply kill that.

  parent reply	other threads:[~2007-10-08  5:12 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-06 18:19 [patch 0/9] compat_ioctl: introduce block/compat_ioctl.c Arnd Bergmann
2007-10-06 18:19 ` [patch 1/9] compat_ioctl: move common block ioctls to compat_blkdev_ioctl Arnd Bergmann
2007-10-06 18:55   ` Christoph Hellwig
2007-10-06 23:44     ` Arnd Bergmann
2007-10-06 18:19 ` [patch 2/9] compat_ioctl: add compat_blkdev_driver_ioctl() Arnd Bergmann
2007-10-06 18:19 ` [patch 3/9] compat_ioctl: handle blk_trace ioctls Arnd Bergmann
2007-10-06 18:19 ` [patch 4/9] compat_ioctl: move hdio calls to block/compat_ioctl.c Arnd Bergmann
2007-10-06 18:19 ` [patch 5/9] compat_ioctl: move BLKPG handling " Arnd Bergmann
2007-10-06 18:19 ` [patch 6/9] compat_ioctl: move cdrom handlers " Arnd Bergmann
2007-10-06 18:19 ` [patch 7/9] compat_ioctl: move floppy " Arnd Bergmann
2007-10-06 18:19 ` [patch 8/9] compat_ioctl: call disk->fops->compat_ioctl without BKL Arnd Bergmann
2007-10-07  9:53   ` Al Viro
2007-10-07 11:02     ` Arnd Bergmann
2007-10-06 18:19 ` [patch 9/9] compat_ioctl: fix compat_fd_ioctl pointer access Arnd Bergmann
2007-10-07  9:59   ` Al Viro
2007-10-08  5:12 ` Al Viro [this message]
2007-10-08  6:04   ` [patch 0/9] compat_ioctl: introduce block/compat_ioctl.c David Miller
2007-10-08  6:38     ` [PATCHv2 1/9] compat_ioctl: move common block ioctls to compat_blkdev_ioctl Arnd Bergmann
2007-10-09 11:24 ` [patch 0/9] compat_ioctl: introduce block/compat_ioctl.c 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=20071008051218.GS8181@ftp.linux.org.uk \
    --to=viro@ftp.linux.org.uk \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=hch@lst.de \
    --cc=jens.axboe@oracle.com \
    --cc=linux-kernel@vger.kernel.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 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.