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] [day] [month] [year] [list]
Message-ID: <20121116180918.GB20496@arwen.pp.htv.fi>
Date:	Fri, 16 Nov 2012 20:09:18 +0200
From:	Felipe Balbi <balbi@...com>
To:	Andy Shevchenko <andy.shevchenko@...il.com>
CC:	<balbi@...com>,
	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	Vinod Koul <vinod.koul@...el.com>,
	spear-devel <spear-devel@...t.st.com>,
	<linux-kernel@...r.kernel.org>,
	Viresh Kumar <viresh.kumar@...aro.org>
Subject: Re: [PATCH 3/6] dma: dw_dmac: check direction properly in
 dw_dma_cyclic_prep

Hi,

On Fri, Nov 16, 2012 at 05:30:21PM +0200, Andy Shevchenko wrote:
> On Fri, Nov 16, 2012 at 3:56 PM, Felipe Balbi <balbi@...com> wrote:
> > On Fri, Nov 16, 2012 at 03:59:16PM +0200, Andy Shevchenko wrote:
> >> dma_transfer_direction is a normal enum. It means we can't usually use the
> >> values as bit fields. Let's adjust this check and move it above the usage of
> >> the direction parameter.
> >
> > why above the direction parameter ? You need to explain why ? Is it just
> > because 'it looks nicer' or have you found another bug triggered by
> > that ?
> 
> Many of current users do something like this:
> 
> if (dir == MEM_TO_DEV)
>  { ... }
> *else*
>  { ... }
> 
> that potentially could trigger the bug.

looks like this deserves to go into commit log ;-)

-- 
balbi

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ