public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* BLKSECTGET userland API breakage (2.4 and 2.6 incompatible)
@ 2005-10-13 23:49 Alexander Viro
  2005-10-14  4:06 ` David S. Miller
  2005-10-14  6:53 ` Jens Axboe
  0 siblings, 2 replies; 4+ messages in thread
From: Alexander Viro @ 2005-10-13 23:49 UTC (permalink / raw)
  To: torvalds; +Cc: axboe, linux-kernel

[that had started as "BLKSECTGET 32bit compat is broken"]

Situation:

all 2.4:      BLKSECTGET takes long * and is supported by several block drivers
bio-14-pre9:  Takes BLKSECTGET to drivers/block/blkpg.c, defining it for all
              block drivers *AND* making it take unsigned short *
2.5.1-pre2:   bio merge
all 2.[56] kernels since then: BLKSECTGET takes unsigned short *
32bit compat: unchanged since 2.4 and thus broken on 2.[56]
applications: we have seen ones using 2.6 ABI and getting buggered in
              32bit compat.  Most likely there are some using 2.4 ABI...

IMO the least painful variant is to switch 2.6 compat code to match
2.6 native (i.e. use COMPATIBLE_IOCTL()), leave 2.4 as-is and live
with the fact of userland ABI change between 2.4 and 2.6...


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: BLKSECTGET userland API breakage (2.4 and 2.6 incompatible)
  2005-10-13 23:49 BLKSECTGET userland API breakage (2.4 and 2.6 incompatible) Alexander Viro
@ 2005-10-14  4:06 ` David S. Miller
  2005-10-14  6:54   ` Jens Axboe
  2005-10-14  6:53 ` Jens Axboe
  1 sibling, 1 reply; 4+ messages in thread
From: David S. Miller @ 2005-10-14  4:06 UTC (permalink / raw)
  To: aviro; +Cc: torvalds, axboe, linux-kernel

From: Alexander Viro <aviro@redhat.com>
Date: Thu, 13 Oct 2005 19:49:34 -0400

> all 2.4:      BLKSECTGET takes long * and is supported by several block drivers
> bio-14-pre9:  Takes BLKSECTGET to drivers/block/blkpg.c, defining it for all
>               block drivers *AND* making it take unsigned short *
> 2.5.1-pre2:   bio merge
> all 2.[56] kernels since then: BLKSECTGET takes unsigned short *
> 32bit compat: unchanged since 2.4 and thus broken on 2.[56]
> applications: we have seen ones using 2.6 ABI and getting buggered in
>               32bit compat.  Most likely there are some using 2.4 ABI...
> 
> IMO the least painful variant is to switch 2.6 compat code to match
> 2.6 native (i.e. use COMPATIBLE_IOCTL()), leave 2.4 as-is and live
> with the fact of userland ABI change between 2.4 and 2.6...

Well, what's the userland state and why in the world did this
happen in the first place?

I guess you're right that keeping the 2.6.x ABI for this ioctl
and fixing up the compat code is probably the least painful
thing to do.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: BLKSECTGET userland API breakage (2.4 and 2.6 incompatible)
  2005-10-13 23:49 BLKSECTGET userland API breakage (2.4 and 2.6 incompatible) Alexander Viro
  2005-10-14  4:06 ` David S. Miller
@ 2005-10-14  6:53 ` Jens Axboe
  1 sibling, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2005-10-14  6:53 UTC (permalink / raw)
  To: Alexander Viro; +Cc: torvalds, linux-kernel

On Thu, Oct 13 2005, Alexander Viro wrote:
> [that had started as "BLKSECTGET 32bit compat is broken"]
> 
> Situation:
> 
> all 2.4:      BLKSECTGET takes long * and is supported by several block drivers
> bio-14-pre9:  Takes BLKSECTGET to drivers/block/blkpg.c, defining it for all
>               block drivers *AND* making it take unsigned short *
> 2.5.1-pre2:   bio merge
> all 2.[56] kernels since then: BLKSECTGET takes unsigned short *
> 32bit compat: unchanged since 2.4 and thus broken on 2.[56]
> applications: we have seen ones using 2.6 ABI and getting buggered in
>               32bit compat.  Most likely there are some using 2.4 ABI...

Unfortunate situation :(

> IMO the least painful variant is to switch 2.6 compat code to match
> 2.6 native (i.e. use COMPATIBLE_IOCTL()), leave 2.4 as-is and live
> with the fact of userland ABI change between 2.4 and 2.6...

Agree.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: BLKSECTGET userland API breakage (2.4 and 2.6 incompatible)
  2005-10-14  4:06 ` David S. Miller
@ 2005-10-14  6:54   ` Jens Axboe
  0 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2005-10-14  6:54 UTC (permalink / raw)
  To: David S. Miller; +Cc: aviro, torvalds, linux-kernel

On Thu, Oct 13 2005, David S. Miller wrote:
> From: Alexander Viro <aviro@redhat.com>
> Date: Thu, 13 Oct 2005 19:49:34 -0400
> 
> > all 2.4:      BLKSECTGET takes long * and is supported by several block drivers
> > bio-14-pre9:  Takes BLKSECTGET to drivers/block/blkpg.c, defining it for all
> >               block drivers *AND* making it take unsigned short *
> > 2.5.1-pre2:   bio merge
> > all 2.[56] kernels since then: BLKSECTGET takes unsigned short *
> > 32bit compat: unchanged since 2.4 and thus broken on 2.[56]
> > applications: we have seen ones using 2.6 ABI and getting buggered in
> >               32bit compat.  Most likely there are some using 2.4 ABI...
> > 
> > IMO the least painful variant is to switch 2.6 compat code to match
> > 2.6 native (i.e. use COMPATIBLE_IOCTL()), leave 2.4 as-is and live
> > with the fact of userland ABI change between 2.4 and 2.6...
> 
> Well, what's the userland state and why in the world did this
> happen in the first place?

Given that this change happened over 4 years ago, I cannot remember the
details of it. But it wasn't a conscious decision to change it, must
have been an unfortunate typo when killing maxsectors[].

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-10-14  6:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-13 23:49 BLKSECTGET userland API breakage (2.4 and 2.6 incompatible) Alexander Viro
2005-10-14  4:06 ` David S. Miller
2005-10-14  6:54   ` Jens Axboe
2005-10-14  6:53 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox