[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070827091655.4e0bb5fe@freepuppy.rosehill.hemminger.net>
Date: Mon, 27 Aug 2007 09:16:55 -0700
From: Stephen Hemminger <shemminger@...ux-foundation.org>
To: Karsten Keil <kkeil@...e.de>
Cc: isdn4linux@...tserv.isdn4linux.de, netdev@...r.kernel.org
Subject: Re: [PATCH] isdn capi driver broken on 64 bit.
On Mon, 27 Aug 2007 13:02:26 +0200
Karsten Keil <kkeil@...e.de> wrote:
> On Fri, Aug 24, 2007 at 11:08:11AM -0700, Stephen Hemminger wrote:
> > The following driver API is broken on any architecture with 64 bit addresses.
> > because of cast that loses high bits.
> >
> > Signed-off-by: Stephen Hemminger <shemminger@...ux-foundation.org>
> >
> >
> > --- a/drivers/isdn/capi/capidrv.c 2007-06-25 09:03:12.000000000 -0700
> > +++ b/drivers/isdn/capi/capidrv.c 2007-08-24 11:06:46.000000000 -0700
> > @@ -1855,6 +1855,9 @@ static int if_sendbuf(int id, int channe
> > return 0;
> > }
> > datahandle = nccip->datahandle;
> > +
> > + /* This won't work on 64 bit! */
> > + BUILD_BUG_ON(sizeof(skb->data) > sizeof(u32));
> > capi_fill_DATA_B3_REQ(&sendcmsg, global.ap.applid, card->msgid++,
> > nccip->ncci, /* adr */
> > (u32) skb->data, /* Data */
>
>
> NACK.
>
> It is not a BUG.
>
> This is OK, since this field must have a value and on 32 it has the correct
> one) On 64 bit this field is ignored (but also need a value, random data is
> bad as well).
If you are using it as a transaction ID, then you should generate one.
There is no guarantee that two skb's won't have the same 32 bit data value
on 64 bit.
--
Stephen Hemminger <shemminger@...ux-foundation.org>
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists