* Re: Another Brute Force And Ignorance(tm) derived question...
1999-04-12 0:08 Another Brute Force And Ignorance(tm) derived question Peter Jones
@ 1999-04-12 1:26 ` David Miller
1999-04-12 4:04 ` Peter Jones
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 1999-04-12 1:26 UTC (permalink / raw)
To: ultralinux
Date: Sun, 11 Apr 1999 20:08:46 -0400 (EDT)
From: Peter Jones <pjones@redhat.com>
<4>sys32_ioctl: Unknown cmd fd(3) cmd(40044dfe) arg(0002563c)
...
open("/dev/mixer", O_RDWR) = 4
ioctl(4, SOUND_MIXER_READ_DEVMASK, 0x2563c) = -1 EINVAL (Invalid argument)
...
Have I missed something obvious?
Might want to double-check on strace, have it print out the raw hex
value for the ioctl cmd code and make sure it matches up.
Later,
David S. Miller
davem@redhat.com
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: Another Brute Force And Ignorance(tm) derived question...
1999-04-12 0:08 Another Brute Force And Ignorance(tm) derived question Peter Jones
1999-04-12 1:26 ` David Miller
@ 1999-04-12 4:04 ` Peter Jones
1999-04-12 4:11 ` David Miller
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Peter Jones @ 1999-04-12 4:04 UTC (permalink / raw)
To: ultralinux
On Sun, 11 Apr 1999, David Miller wrote:
> Date: Sun, 11 Apr 1999 20:08:46 -0400 (EDT)
> From: Peter Jones <pjones@redhat.com>
>
> <4>sys32_ioctl: Unknown cmd fd(3) cmd(40044dfe) arg(0002563c)
>
> ...
>
> open("/dev/mixer", O_RDWR) = 4
> ioctl(4, SOUND_MIXER_READ_DEVMASK, 0x2563c) = -1 EINVAL (Invalid argument)
>
> ...
>
> Have I missed something obvious?
>
> Might want to double-check on strace, have it print out the raw hex
> value for the ioctl cmd code and make sure it matches up.
open("/dev/mixer", O_RDWR) = 4
ioctl(0x4, 0x40044dfe, 0x2563c) = -1 (errno 22)
No dice, matches up just fine. Any more ideas?
-- Peter
"I stick my neck out for nobody."
-- Bogart
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: Another Brute Force And Ignorance(tm) derived question...
1999-04-12 0:08 Another Brute Force And Ignorance(tm) derived question Peter Jones
1999-04-12 1:26 ` David Miller
1999-04-12 4:04 ` Peter Jones
@ 1999-04-12 4:11 ` David Miller
1999-04-12 4:50 ` Peter Jones
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 1999-04-12 4:11 UTC (permalink / raw)
To: ultralinux
Date: Mon, 12 Apr 1999 00:04:05 -0400 (EDT)
From: Peter Jones <pjones@redhat.com>
> Might want to double-check on strace, have it print out the raw hex
> value for the ioctl cmd code and make sure it matches up.
open("/dev/mixer", O_RDWR) = 4
ioctl(0x4, 0x40044dfe, 0x2563c) = -1 (errno 22)
No dice, matches up just fine. Any more ideas?
Could be a compiler bug then, put some debugging printk's into
sys32_ioctl(), one right before the big switch which goes:
printk("sys32_ioctl(before switch): cmd(%08x) "
"SOUND_MIXER_READ_DEVMASK(%08x)\n",
cmd, SOUND_MIXER_READ_DEVMASK);
Then put a similar printk right below the case for
SOUND_MIXER_READ_DEVMASK itself.
This bug would explain some problems I had with the gnome mixer applet
and some other sound programs on sparc64...
Later,
David S. Miller
davem@redhat.com
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: Another Brute Force And Ignorance(tm) derived question...
1999-04-12 0:08 Another Brute Force And Ignorance(tm) derived question Peter Jones
` (2 preceding siblings ...)
1999-04-12 4:11 ` David Miller
@ 1999-04-12 4:50 ` Peter Jones
1999-04-12 4:58 ` David Miller
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Peter Jones @ 1999-04-12 4:50 UTC (permalink / raw)
To: ultralinux
On Sun, 11 Apr 1999, David Miller wrote:
> Date: Mon, 12 Apr 1999 00:04:05 -0400 (EDT)
> From: Peter Jones <pjones@redhat.com>
>
> > Might want to double-check on strace, have it print out the raw hex
> > value for the ioctl cmd code and make sure it matches up.
>
> open("/dev/mixer", O_RDWR) = 4
> ioctl(0x4, 0x40044dfe, 0x2563c) = -1 (errno 22)
>
> No dice, matches up just fine. Any more ideas?
>
> Could be a compiler bug then, put some debugging printk's into
> sys32_ioctl(), one right before the big switch which goes:
>
> printk("sys32_ioctl(before switch): cmd(%08x) "
> "SOUND_MIXER_READ_DEVMASK(%08x)\n",
> cmd, SOUND_MIXER_READ_DEVMASK);
>
> Then put a similar printk right below the case for
> SOUND_MIXER_READ_DEVMASK itself.
>
> This bug would explain some problems I had with the gnome mixer applet
> and some other sound programs on sparc64...
Hrm. Odd. When aumix calls that, its sending 0x20044dfe, which is what
kernelspace is _expecting_ to get. somewhere in the middle its becoming
0x40044dfe , which is falling through the case. Any ideas?
Anyway, I'm going to bed. I've managed to be in line for a 9:30 meating
tomorrow.
-- Peter
Stay sane inside insanity.
-- RHPS
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: Another Brute Force And Ignorance(tm) derived question...
1999-04-12 0:08 Another Brute Force And Ignorance(tm) derived question Peter Jones
` (3 preceding siblings ...)
1999-04-12 4:50 ` Peter Jones
@ 1999-04-12 4:58 ` David Miller
1999-04-12 5:14 ` Jakub Jelinek
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 1999-04-12 4:58 UTC (permalink / raw)
To: ultralinux
Date: Mon, 12 Apr 1999 00:50:47 -0400 (EDT)
From: Peter Jones <pjones@redhat.com>
> This bug would explain some problems I had with the gnome mixer applet
> and some other sound programs on sparc64...
Hrm. Odd. When aumix calls that, its sending 0x20044dfe, which is what
kernelspace is _expecting_ to get. somewhere in the middle its becoming
0x40044dfe , which is falling through the case. Any ideas?
Maybe rebuild aumix with more recent kernel header files. I saw this
too with xcdplay, so it might be the same problem.
Actually, I couldn't completely parse your recollection of the
debugging printk output, can you show me exactly what the kernel said
with your debugging statements? (even better yet, tell me the machine
where you did this poking so I can go on and snoop around :-)
Later,
David S. Miller
davem@redhat.com
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: Another Brute Force And Ignorance(tm) derived question...
1999-04-12 0:08 Another Brute Force And Ignorance(tm) derived question Peter Jones
` (4 preceding siblings ...)
1999-04-12 4:58 ` David Miller
@ 1999-04-12 5:14 ` Jakub Jelinek
1999-04-12 12:46 ` Peter Jones
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Jakub Jelinek @ 1999-04-12 5:14 UTC (permalink / raw)
To: ultralinux
>
> On Sun, 11 Apr 1999, David Miller wrote:
>
> > Date: Mon, 12 Apr 1999 00:04:05 -0400 (EDT)
> > From: Peter Jones <pjones@redhat.com>
> >
> > > Might want to double-check on strace, have it print out the raw hex
> > > value for the ioctl cmd code and make sure it matches up.
> >
> > open("/dev/mixer", O_RDWR) = 4
> > ioctl(0x4, 0x40044dfe, 0x2563c) = -1 (errno 22)
> >
> > No dice, matches up just fine. Any more ideas?
> >
> > Could be a compiler bug then, put some debugging printk's into
> > sys32_ioctl(), one right before the big switch which goes:
> >
> > printk("sys32_ioctl(before switch): cmd(%08x) "
> > "SOUND_MIXER_READ_DEVMASK(%08x)\n",
> > cmd, SOUND_MIXER_READ_DEVMASK);
> >
> > Then put a similar printk right below the case for
> > SOUND_MIXER_READ_DEVMASK itself.
> >
> > This bug would explain some problems I had with the gnome mixer applet
> > and some other sound programs on sparc64...
>
> Hrm. Odd. When aumix calls that, its sending 0x20044dfe, which is what
> kernelspace is _expecting_ to get. somewhere in the middle its becoming
> 0x40044dfe , which is falling through the case. Any ideas?
>
> Anyway, I'm going to bed. I've managed to be in line for a 9:30 meating
> tomorrow.
It must be some userland compilation problem. Make sure it passes
ioctl(?, 0x20044dfe, ????????) to the kernel, then I don't see any
translation beeing done on it. If I do such ioctl (don't have soundcard, but
it should not matter), it does not print any kernel warning about undefined
ioctl.
Cheers,
Jakub
___________________________________________________________________
Jakub Jelinek | jj@sunsite.mff.cuni.cz | http://sunsite.mff.cuni.cz
Administrator of SunSITE Czech Republic, MFF, Charles University
___________________________________________________________________
UltraLinux | http://ultra.linux.cz/ | http://ultra.penguin.cz/
Linux version 2.2.5 on a sparc64 machine (3958.37 BogoMips)
___________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: Another Brute Force And Ignorance(tm) derived question...
1999-04-12 0:08 Another Brute Force And Ignorance(tm) derived question Peter Jones
` (5 preceding siblings ...)
1999-04-12 5:14 ` Jakub Jelinek
@ 1999-04-12 12:46 ` Peter Jones
1999-04-12 13:22 ` Jakub Jelinek
1999-04-12 14:53 ` Peter Jones
8 siblings, 0 replies; 10+ messages in thread
From: Peter Jones @ 1999-04-12 12:46 UTC (permalink / raw)
To: ultralinux
On Sun, 11 Apr 1999, David Miller wrote:
> Date: Mon, 12 Apr 1999 00:50:47 -0400 (EDT)
> From: Peter Jones <pjones@redhat.com>
>
> > This bug would explain some problems I had with the gnome mixer applet
> > and some other sound programs on sparc64...
>
> Hrm. Odd. When aumix calls that, its sending 0x20044dfe, which is what
> kernelspace is _expecting_ to get. somewhere in the middle its becoming
> 0x40044dfe , which is falling through the case. Any ideas?
>
> Maybe rebuild aumix with more recent kernel header files. I saw this
> too with xcdplay, so it might be the same problem.
>
> Actually, I couldn't completely parse your recollection of the
> debugging printk output, can you show me exactly what the kernel said
> with your debugging statements? (even better yet, tell me the machine
> where you did this poking so I can go on and snoop around :-)
When I add
printk("sys32_ioctl(before switch): cmd(%#010x) "
"SOUND_MIXER_READ_DEVMASK(%#010x)\n",cmd,SOUND_MIXER_READ_DEVMASK);
before the switch, and the same surrounding the case in question, I get:
Apr 12 00:40:42 localhost kernel: sys32_ioctl(before switch):
cmd(0x80047482) SOUND_MIXER_READ_DEVMASK(0x20044dfe)
Apr 12 00:40:42 localhost kernel: sys32_ioctl(before case):
cmd(0x80047482) SOUND_MIXER_READ_DEVMASK(0x20044dfe)
Apr 12 00:40:42 localhost kernel: sys32_ioctl(after case): cmd(0x80047482)
SOUND_MIXER_READ_DEVMASK(0x20044dfe)
for most ioctl()'s, And when I actually try and use
SOUND_MIXER_READ_DEVMASK I get:
Apr 12 00:40:42 localhost kernel: sys32_ioctl(before switch):
cmd(0x40044dfe) SOUND_MIXER_READ_DEVMASK(0x20044dfe)
Apr 12 00:40:42 localhost kernel: sys32_ioctl: Unknown cmd fd(3)
cmd(40044dfe) arg(0002563c)
Which seems strange to me in itself, because It doesn't look like its
actually hitting that case. Unfortunatly, this is on a friend's box, not
a box at work (being as I'm a tech support person, not a developer ;)
Also (maybe useful) if I go change aumix, so that its got:
printf("SOUND_MIXER_READ_DEVMASK(%#010x)\n",SOUND_MIXER_READ_DEVMASK);
if (ioctl(mixer_fd, SOUND_MIXER_READ_DEVMASK, &devmask))
return (3);
I get:
SOUND_MIXER_READ_DEVMASK(0x20044dfe)
out of aumix, and
Apr 12 08:36:30 localhost kernel: sys32_ioctl: Unknown cmd fd(4)
cmd(40044dfe) arg(0002563c)
out of the kernel. (Unfortunatly, I already booted back to a kernel
that didn't obscenely log on every ioctl() . I'll try that again later)
Its looking like if I do ioctl(mixer_fd,0x20044dfe,&devmask), it doesn't
seem to do that, which is strange as well. I'll test this again once I
rebuild that debug kernel later. *sigh*. Off too meetings now.
If I'm completely nuts, let me know. Hell, if you think you can talk them
to letting me go buy one of these cards and stick it on one of the boxes
in the testlab so you can look at this, let me know ;)
-- Peter
"Don't everyone thank me at once!"
-- Solo
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: Another Brute Force And Ignorance(tm) derived question...
1999-04-12 0:08 Another Brute Force And Ignorance(tm) derived question Peter Jones
` (6 preceding siblings ...)
1999-04-12 12:46 ` Peter Jones
@ 1999-04-12 13:22 ` Jakub Jelinek
1999-04-12 14:53 ` Peter Jones
8 siblings, 0 replies; 10+ messages in thread
From: Jakub Jelinek @ 1999-04-12 13:22 UTC (permalink / raw)
To: ultralinux
> When I add
>
> printk("sys32_ioctl(before switch): cmd(%#010x) "
> "SOUND_MIXER_READ_DEVMASK(%#010x)\n",cmd,SOUND_MIXER_READ_DEVMASK);
I think you wrote in some other mail that strace prints out 0x40044dfe, thus
it has really no value to look for bugs in the kernel.
Either gcc is broken, or you have some problems with includes, or whatever.
Anyway, what distribution is it? UP, BlueSky or what?
On UP1.1.9, I get
open("/dev/mixer", O_RDWR) = 7
ioctl(7, 0x20044dfe, 0x25a20) = -1 ENOTTY (Inappropriate ioctl for device)
and no kernel errors from that ioctl (ENOTTY because my /dev/mixer is ->
/dev/null, no soundcard here).
So, I'd suggest carefully looking at gcc -E output and step through it with
gdb.
Cheers,
Jakub
___________________________________________________________________
Jakub Jelinek | jj@sunsite.mff.cuni.cz | http://sunsite.mff.cuni.cz
Administrator of SunSITE Czech Republic, MFF, Charles University
___________________________________________________________________
UltraLinux | http://ultra.linux.cz/ | http://ultra.penguin.cz/
Linux version 2.2.5 on a sparc64 machine (3958.37 BogoMips)
___________________________________________________________________
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: Another Brute Force And Ignorance(tm) derived question...
1999-04-12 0:08 Another Brute Force And Ignorance(tm) derived question Peter Jones
` (7 preceding siblings ...)
1999-04-12 13:22 ` Jakub Jelinek
@ 1999-04-12 14:53 ` Peter Jones
8 siblings, 0 replies; 10+ messages in thread
From: Peter Jones @ 1999-04-12 14:53 UTC (permalink / raw)
To: ultralinux
On Mon, 12 Apr 1999, Jakub Jelinek wrote:
> > When I add
> >
> > printk("sys32_ioctl(before switch): cmd(%#010x) "
> > "SOUND_MIXER_READ_DEVMASK(%#010x)\n",cmd,SOUND_MIXER_READ_DEVMASK);
>
> I think you wrote in some other mail that strace prints out 0x40044dfe, thus
> it has really no value to look for bugs in the kernel.
Right. Makes sense.
> Either gcc is broken, or you have some problems with includes, or whatever.
> Anyway, what distribution is it? UP, BlueSky or what?
UP from mid-february. Might stick 5.9 on it sometime soon just to see. I
think this is in includes somewhere. I'll check later.
> On UP1.1.9, I get
> open("/dev/mixer", O_RDWR) = 7
> ioctl(7, 0x20044dfe, 0x25a20) = -1 ENOTTY (Inappropriate ioctl for device)
> and no kernel errors from that ioctl (ENOTTY because my /dev/mixer is ->
> /dev/null, no soundcard here).
>
> So, I'd suggest carefully looking at gcc -E output and step through it with
> gdb.
Will do. Thanks bunches for the help.
-- Peter
"I cannot believe that God plays dice with the cosmos."
-- Einstein
^ permalink raw reply [flat|nested] 10+ messages in thread