Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 55465 - snd-ioctl32 causes sparc4u machines to lock up
Summary: snd-ioctl32 causes sparc4u machines to lock up
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Jeremy Huddleston (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on: 72006
Blocks:
  Show dependency tree
 
Reported: 2004-06-28 12:45 UTC by Jeremy Huddleston (RETIRED)
Modified: 2004-11-24 00:43 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
fixes SNDRV_CTL_IOCTL_ELEM_LIST (ioctl32.c.patch,1.69 KB, patch)
2004-11-20 01:17 UTC, Jeremy Huddleston (RETIRED)
Details | Diff
Fixes all but pcm32.c (ioctl32.patch,7.30 KB, patch)
2004-11-20 01:59 UTC, Jeremy Huddleston (RETIRED)
Details | Diff
Fixes all but pcm32.c (ioctl32.patch,7.30 KB, patch)
2004-11-20 02:09 UTC, Jeremy Huddleston (RETIRED)
Details | Diff
Fixes all but pcm32.c (ioctl32.patch,3.68 KB, patch)
2004-11-20 02:37 UTC, Jeremy Huddleston (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Huddleston (RETIRED) gentoo-dev 2004-06-28 12:45:37 UTC
This is a known issue that I'm going to be looking at soon...

I've noticed this in 2.6.5-2.6.7, and I've heard it's never worked.  fvdpol is going to test it out on amd64 for me since my amd64 box is a production system that I can't afford to lockup and wait 3 hours for RAID to resync =).  Thanks.

I really want this issue solved before we tackle the cs4231 problems on sparc.
Comment 1 Jason Wever (RETIRED) gentoo-dev 2004-07-04 13:33:45 UTC
Alsa has a bug for this at https://bugtrack.alsa-project.org/alsa-bug/bug_view_page.php?bug_id=0000167
Comment 2 Jeremy Huddleston (RETIRED) gentoo-dev 2004-07-09 02:34:15 UTC
I bit the bullet and verrified that it was sparc specific... so it's probably some asm-* or endian issue...
Comment 3 Jason Wever (RETIRED) gentoo-dev 2004-11-14 09:17:14 UTC
Some new info about this on the sparclinux ml recently.  The following is from davem;

On Thu, 11 Nov 2004 12:00:24 +0100
sjoerd@spring.luon.net (Sjoerd Simons) wrote:

>   After some debugging it seems that some alsa ioctl have a pointer to a
>   userspace pointer in their argument struct. When doing a copy_to_user in the
>   native ioctl to that address (thus directly to the 32bit userspace program
>   while get_fs() == KERNEL_DS), the machine just hangs.  Is this something 
>   that can't be done on sparc64 ?

That's right, this action is illegal and will hang the machine.
Unfortunately, on x86_64 this happens to work and that appears
to be where most of the ioctl32 compat stuff gets tested and
developed.

If get_fs() == KERNEL_DS all "user" pointers are expected to be in
kernel space and thus access to real user addresses will fail.
Comment 4 Jeremy Huddleston (RETIRED) gentoo-dev 2004-11-14 11:01:20 UTC
whee... that's good news.  I've got test hell this week, but maybe next week we can et this working
Comment 5 Jeremy Huddleston (RETIRED) gentoo-dev 2004-11-19 12:24:49 UTC
On Tue, Nov 16, 2004 at 09:55:23PM -0800, Jeremy Huddleston wrote:
> Hi,
> 
> I've been keeping this very issue on the backburner for quite some time
> now as it's been a real pain in the arse to debug.  Do you have a patch
> that you could provide?  Have you fixed the other ioclt or atleast have
> a list of the ones you haven't gotten to yet?

I had the one mentioned in my mail fixed, but it's pretty easy. Hopefully i can
play again this weekend to get the others ``fixed''. I saw there were some
fixes to the ioctl32 stuff in 2.6.10-rc2, so it's worth to start there.

Basically to find the wrong ioctls, just grep for compat_ptr in
sound/core/ioctl32. I think it makes for a total of 3 or 4 ioctl's that need
fixing. 

  Sjoerd
Comment 6 Jeremy Huddleston (RETIRED) gentoo-dev 2004-11-20 01:17:15 UTC
Created attachment 44333 [details, diff]
fixes SNDRV_CTL_IOCTL_ELEM_LIST

This fixes SNDRV_CTL_IOCTL_ELEM_LIST (NOT ALL OF THEM).  I made this patch
based on the suggestions mentioned above from list... this gets 'amixer' to
work...
Comment 7 Jeremy Huddleston (RETIRED) gentoo-dev 2004-11-20 01:59:58 UTC
Created attachment 44336 [details, diff]
Fixes all but pcm32.c

Ok, this patch fixes two more IOCTL32 problems... and the only ones left to fix
are in pcm32.c ... but it's 2am, and I'm wiggin' out... if someone else wants
to finish this and leave me a nice present in the morning, I'll be very
happy... otherwise, I'll try to get to it this weekend...
Comment 8 Jeremy Huddleston (RETIRED) gentoo-dev 2004-11-20 02:09:00 UTC
Created attachment 44338 [details, diff]
Fixes all but pcm32.c

2am brainfart... #fi -> #endif ... lala ok...
Comment 9 Jeremy Huddleston (RETIRED) gentoo-dev 2004-11-20 02:37:59 UTC
Created attachment 44339 [details, diff]
Fixes all but pcm32.c

silly symlinking in alsa-driver caused the patch to "double"... proof again
that I need to get sleep...
Comment 10 Jeremy Huddleston (RETIRED) gentoo-dev 2004-11-21 19:03:35 UTC
ok, patch submitted upstream, added to alsa-driver-1.0.7, and I've made a patch to linux-2.6.7 which will hopefully be in g-d-s-2.6.7-r15 soon... at that point, I'll make a sub-profile to unmask the alsa USE flag and setup package.mask to block versions with bad ioctl32.
Comment 11 Jeremy Huddleston (RETIRED) gentoo-dev 2004-11-24 00:43:52 UTC
in portage... YAY!