Re: [alsa-devel] [PATCH] hda: add bounds checking for the codec command fields v2
On Fri, Jul 17, 2009 at 06:46:01PM +0800, Takashi Iwai wrote:
At Fri, 17 Jul 2009 18:41:05 +0800, Guo, Chaohong wrote:
Although it does address this issue, I am not comfortable with this fixing. It seems more like a workaround than fix.
No, it's rather for catching a bug. This is definitely neither "workaround" nor "fix".
Yes, I wrote this mainly for catching unknown bugs.
Moreover, if long format node ID is used in the future, the code will cause little trouble for maintaining.
Well, the current code doesn't support the long id (as the restriction of HD-audio controller side), so we'd need major changes in anyway. Thus this check is no big issue for maintenance, at least to me :)
Does the HDA spec define cmd format that accept long form NID? If so, can you point me to the specific location please? Thanks.
what I want is to fix it during parsing connection list, and verify the node id is valid there .
Heh, this was already fixed :)
AFAIK, snd_hda_get_connections() won't return NIDs bigger than 0x7f(short) or 0x7ffff(long).
Thanks, Fengguang
Cc: Guo, Chaohong; alsa-devel@alsa-project.org; Jaroslav Kysela; John Villalovos Subject: Re: [PATCH] hda: add bounds checking for the codec command fields v2
On Fri, Jul 17, 2009 at 06:46:01PM +0800, Takashi Iwai wrote:
At Fri, 17 Jul 2009 18:41:05 +0800, Guo, Chaohong wrote:
Although it does address this issue, I am not comfortable
with this fixing.
It seems more like a workaround than fix.
No, it's rather for catching a bug. This is definitely neither "workaround" nor "fix".
Yes, I wrote this mainly for catching unknown bugs.
Oh, I misunderstood your intention. So, we still need to investigate the bug which occurs on RH i386 version :)
Moreover, if long format node ID is used in the future, the code will cause little
trouble for maintaining.
Well, the current code doesn't support the long id (as the
restriction
of HD-audio controller side), so we'd need major changes in anyway. Thus this check is no big issue for maintenance, at least to me :)
Does the HDA spec define cmd format that accept long form NID? If so, can you point me to the specific location please? Thanks.
No. AFAIK, HDA doesn't specifiy long NID verb yet, I said "In the feature". but who knows why hardware vendors want to use long NID in the future, seems 128 is enough.
-minskey
what I want is to fix it during parsing connection list,
and verify the node
id is valid there .
Heh, this was already fixed :)
AFAIK, snd_hda_get_connections() won't return NIDs bigger than 0x7f(short) or 0x7ffff(long).
Thanks, Fengguang
participants (2)
-
Guo, Chaohong
-
Wu Fengguang