lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 4 Sep 2012 11:06:07 +0800
From:	Changbin Du <changbin.du@...il.com>
To:	sean@...s.org
Cc:	mchehab@...radead.org, paul.gortmaker@...driver.com,
	sfr@...b.auug.org.au, srinivas.kandagatla@...com,
	linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] [media] rc: filter out not allowed protocols when decoding

> >               mutex_lock(&ir_raw_handler_lock);
> > -             list_for_each_entry(handler, &ir_raw_handler_list, list)
> > -                     handler->decode(raw->dev, ev);
> > +             list_for_each_entry(handler, &ir_raw_handler_list, list) {
> > +                     /* use all protocol by default */
> > +                     if (raw->dev->allowed_protos == RC_TYPE_UNKNOWN ||
> > +                         raw->dev->allowed_protos & handler->protocols)
> > +                             handler->decode(raw->dev, ev);
> > +             }
>
> Each IR protocol decoder already checks whether it is enabled or not;
> should it not be so that only allowed protocols can be enabled rather
> than checking both enabled_protocols and allowed_protocols?
>
> Just from reading store_protocols it looks like decoders which aren't
> in allowed_protocols can be enabled, which makes no sense. Also
> ir_raw_event_register all protocols are enabled rather than the
> allowed ones.
>
>
> Lastely I don't know why raw ir drivers should dictate which protocols
> can be enabled. Would it not be better to remove it entirely?


I agree with you. I just thought that the only thing a decoder should care
is its decoding logic, but not including decoder management. My idaea is:
     1) use enabled_protocols to select decoders in ir_raw.c, but not
placed in decoders to do the judgement.
     2) remove  allowed_protocols or just use it to set the default
decoder (also should rename allowed_protocols  to default_protocol).

I also have a question:
     Is there a requirement that one more decoders are enabled for a
IR device at the same time?
    And if that will lead to a issue that each decoder may decode a
same pulse sequence to different evnets since their protocol is
different?

[Du, Changbin]
>
>
> >               raw->prev_ev = ev;
> >               mutex_unlock(&ir_raw_handler_lock);
> >       }
> > --
> > 1.7.9.5
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-media" in
> > the body of a message to majordomo@...r.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ