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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190802173732.GF12733@vkoul-mobl.Dlink>
Date:   Fri, 2 Aug 2019 23:07:32 +0530
From:   Vinod Koul <vkoul@...nel.org>
To:     Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
Cc:     alsa-devel@...a-project.org, tiwai@...e.de,
        gregkh@...uxfoundation.org, linux-kernel@...r.kernel.org,
        broonie@...nel.org, srinivas.kandagatla@...aro.org,
        jank@...ence.com, slawomir.blauciak@...el.com,
        Sanyog Kale <sanyog.r.kale@...el.com>
Subject: Re: [alsa-devel] [RFC PATCH 06/40] soundwire: intel: prevent
 possible dereference in hw_params

On 02-08-19, 11:52, Pierre-Louis Bossart wrote:
> 
> 
> On 8/2/19 10:57 AM, Vinod Koul wrote:
> > On 02-08-19, 10:16, Pierre-Louis Bossart wrote:
> > > 
> > > 
> > > On 8/2/19 6:55 AM, Vinod Koul wrote:
> > > > On 25-07-19, 18:39, Pierre-Louis Bossart wrote:
> > > > > This should not happen in production systems but we should test for
> > > > > all callback arguments before invoking the config_stream callback.
> > > > 
> > > > so you are saying callback arg is mandatory, if so please document that
> > > > assumption
> > > 
> > > no, what this says is that if a config_stream is provided then it needs to
> > > have a valid argument.
> > 
> > well typically args are not mandatory..
> > 
> > > I am not sure what you mean by "document that assumption", comment in the
> > > code (where?) or SoundWire documentation?
> > 
> > The callback documentation which in this is in include/linux/soundwire/sdw_intel.h
> > 
> 
> /**
>  * struct sdw_intel_ops: Intel audio driver callback ops
>  *
>  * @config_stream: configure the stream with the hw_params
>  */
> struct sdw_intel_ops {
> 	int (*config_stream)(void *arg, void *substream,
> 			     void *dai, void *hw_params, int stream_num);
> };
> 
> all parameters are mandatory really, not sure what you are trying to get at.

It would be good to make a note that argument is mandatory!

Thanks
-- 
~Vinod

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ