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>] [day] [month] [year] [list]
Date:	Wed, 06 May 2015 10:10:51 +0100
From:	Ian Abbott <abbotti@....co.uk>
To:	nick <xerofoify@...il.com>
CC:	hsweeten@...ionengravers.com, gregkh@...uxfoundation.org,
	chase.southwood@...il.com, ebru.akagunduz@...il.com,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: Question about the function,ni_stc_dma_channel_select_bitfield

On 06/05/15 01:22, nick wrote:
> Greetings All,
> I am wondering if in the function,ni_stc_dma_channel_select_bitfield the line:
> return 1 << channel;
> is guaranteed to be below the threshold that guarantees us to not overflow on
> a unsigned 32 integer due to bit wise shifting to the left.
> Thanks Nick
>

	if (channel < 4)
		return 1 << channel;

So, yes.

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@....co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-
--
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