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]
Date:   Mon, 22 Aug 2022 20:01:20 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     Paul Cercueil <paul@...pouillou.net>
Cc:     Artur Rojek <contact@...ur-rojek.eu>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Chris Morgan <macromorgan@...mail.com>,
        linux-mips@...r.kernel.org, linux-iio@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-input@...r.kernel.org
Subject: Re: [PATCH 4/4] input: joystick: Fix buffer data parsing

> >>   		case 2:
> >>  -			data_u16 = (const u16 *)data + idx;
> >>  -
> >>   			/*
> >>   			 * Data is aligned to the sample size by IIO core.
> >>   			 * Call `get_unaligned_xe16` to hide type casting.
> >>   			 */
> >>   			if (endianness == IIO_BE)
> >>  -				val = get_unaligned_be16(data_u16);
> >>  +				val = get_unaligned_be16(chan_data);  
> > 
> > I obviously missed this previously but these are aligned so we don't 
> > need the
> > unaligned form.  
> 
> Yes, the comment above says that it's used to hide type casting.
oops :)

Thanks for pointing out my lack of observation!

Jonathan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ