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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 14 Mar 2017 08:02:50 +0800
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Gioh Kim <gi-oh.kim@...fitbricks.com>
Cc:     sergio.paracuellos@...il.com, devel@...verdev.osuosl.org,
        gurugio@...mail.net, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] staging: wlan-ng: introduce a macro read_u16

On Mon, Mar 13, 2017 at 02:14:25PM +0100, Gioh Kim wrote:
> read_u16 is wrapper of le16_to_cpu to read u16 variable,
> rather than __le16.
> 
> Signed-off-by: Gioh Kim <gi-oh.kim@...fitbricks.com>
> ---
>  drivers/staging/wlan-ng/prism2mgmt.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/staging/wlan-ng/prism2mgmt.h b/drivers/staging/wlan-ng/prism2mgmt.h
> index 88b979f..97ede25 100644
> --- a/drivers/staging/wlan-ng/prism2mgmt.h
> +++ b/drivers/staging/wlan-ng/prism2mgmt.h
> @@ -63,6 +63,9 @@
>  extern int prism2_reset_holdtime;
>  extern int prism2_reset_settletime;
>  
> +#define read_u16(x) ({ u32 __r = (u32)le16_to_cpu((__force __le16)(x)); \
> +			__r; })
> +

Eeek, no, this should not be needed at all, if the code is written
correctly.  Please fix things up to work properly, don't paper over them
with forced casts.

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ