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-next>] [day] [month] [year] [list]
Message-Id: <20180711192149.21621-1-johnfwhitmore@gmail.com>
Date:   Wed, 11 Jul 2018 20:21:39 +0100
From:   John Whitmore <johnfwhitmore@...il.com>
To:     linux-kernel@...r.kernel.org
Cc:     devel@...verdev.osuosl.org, gregkh@...uxfoundation.org,
        aastha.gupta4104@...il.com, keescook@...omium.org,
        pombredanne@...b.com, kstewart@...uxfoundation.org,
        tglx@...utronix.de
Subject: [0/10] staging:rtl8192u: One significant change...

The first 9 patches in this series are coding style changes, including a
number of patches to remove the "typedef" directive from a number of data
structure definitions. This clears the checkpatch warning about defining new
data types in the code.

The last patch in the series, however, changes the data type of a member
variable from a u8 to an enumerated type. Generally in C an enumerated type is
implemented by the compiler as an int, but can be changed by compiler
directives. Either way the member variable will most probably have its size
changed by this patch. I don't think that the structure is mapped to hardware
or physical memory location, but is allocated and populated in the
rtl8192_usb_probe() function in the file r8192U_core.c. Given that
allocation/population I don't think that the size of the member variable is of
run time significance, bar the slight increase in size of the overall
structure.

The reason for doing this is to enable the compiler's checking of assignments
to the variable defined as an enumerated type. The alternative is to leave the
variable as a u8 and remove the enumerated type, replacing it with #define
definitions of the possible values.

I raised this issue on the kernel newbies mailing list and of the two
alternatives enumerated type won out.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ