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: <9d96db4f-0b79-0940-ef95-d9bd70dc9a18@gmail.com>
Date:   Mon, 25 Sep 2023 21:11:14 +0200
From:   Philipp Hortmann <philipp.g.hortmann@...il.com>
To:     Arnd Bergmann <arnd@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Arnd Bergmann <arnd@...db.de>,
        Tree Davies <tdavies@...kphysics.net>,
        Yogesh Hegde <yogi.kernel@...il.com>,
        Sumitra Sharma <sumitraartsy@...il.com>,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] staging: rtl8192e: fix structure alignment

On 9/25/23 17:54, Arnd Bergmann wrote:
> From: Arnd Bergmann<arnd@...db.de>
> 
> A recent cleanup changed the rtl8192e from using the custom misaligned
> rtllib_hdr_3addr structure to the generic ieee80211_hdr_3addr definition
> that enforces 16-bit structure alignment in memory.
> 
> This causes a gcc warning about conflicting alignment requirements:
> 
> drivers/staging/rtl8192e/rtllib.h:645:1: error: alignment 1 of 'struct rtllib_authentication' is less than 2 [-Werror=packed-not-aligned]
>    645 | } __packed;
>        | ^
> rtllib.h:650:1: error: alignment 1 of 'struct rtllib_disauth' is less than 2 [-Werror=packed-not-aligned]
> rtllib.h:655:1: error: alignment 1 of 'struct rtllib_disassoc' is less than 2 [-Werror=packed-not-aligned]
> rtllib.h:661:1: error: alignment 1 of 'struct rtllib_probe_request' is less than 2 [-Werror=packed-not-aligned]
> rtllib.h:672:1: error: alignment 1 of 'struct rtllib_probe_response' is less than 2 [-Werror=packed-not-aligned]
> rtllib.h:683:1: error: alignment 1 of 'struct rtllib_assoc_request_frame' is less than 2 [-Werror=packed-not-aligned]
> rtllib.h:691:1: error: alignment 1 of 'struct rtllib_assoc_response_frame' is less than 2 [-Werror=packed-not-aligned]
> 
> Change all of the structure definitions that include this one to also
> use 16-bit alignment. This assumes that the objects are actually aligned
> in memory, but that is normally guaranteed by the slab allocator already.
> 
> All members of the structure definitions are already 16-bit aligned,
> so the layouts do not change. As an added benefit, 16-bit accesses are
> generally faster than 8-bit accesses, so architectures without unaligned
> load/store instructions can produce better code now by avoiding byte-wise
> accesses.
> 
> Fixes: 71ddc43ed7c71 ("staging: rtl8192e: Replace struct rtllib_hdr_3addr in structs of rtllib.h")
> Signed-off-by: Arnd Bergmann<arnd@...db.de>

Hi,

thanks for your support.

your patches cannot be applied on top of the 24 patches which are in the 
queue. But may be Greg will not accept all of the patches send in.

Will see what happens when Greg sorts them out.

I tried your patches on hardware without the 24 patches send in. All OK

Tested-by: Philipp Hortmann <philipp.g.hortmann@...il.com>



I use the following command to compile. Why I am not seeing the issue above?
make "KCFLAGS=-pipe -Wpacked-not-aligned" -C . M=drivers/staging /rtl8192e

Thanks

Bye Philipp


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ