Search Linux Wireless

Re: zd1211rw (2.6.22 sparc64): unaligned access (do_rx)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> I think I've figured out what's happening here.
> 
> The kernel makes no effort whatsoever to translate iwe streams in
> compat environments.  And userspace then tries to "correct" this and
> does so miserably.  Likely this is what causes the bus error.

Quite possible. I wanted this fixed too but Jean refused to do it in the
kernel. And personally, I'm no longer touching wext with a 10 foot pole.
Too much backslash.

> The fix is that we need to add some handling code
> fs/compat_ioctl.c:do_wireless_ioctl() for the case where we are
> returning an iwe stream (SIOCGIWSCAN).
> 
> It should not be very difficult to do this, since the compat format
> will be the same size or smaller, it should be easy to recode the
> thing in-place in the user buffer.
> 
> So you make a pass over the user buffer fixing things up and then you
> adjust the iw_data length for the new size.
> 
> Alternatively, you can allocate a kernel buffer for this, use a 'fs =
> get_fs(); set_fs(KERNEL_DS); ioctl(); set_fs(fs);' sequence, fixup the
> iwe stream, then copy the everything back out to userspace.

That may work, but wext also broadcasts iw_point inside netlink messages
for scan notifications etc. I don't see a good way to fix this part.

> Then we can delete all of this incredibly stupid code in the wireless
> tools that attempts to fix this up in userspace.

I wish. Really, I do.

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux