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]
Date:   Tue, 28 Aug 2018 19:55:31 +0100
From:   John Whitmore <johnfwhitmore@...il.com>
To:     linux-kernel@...r.kernel.org
Cc:     devel@...verdev.osuosl.org, gregkh@...uxfoundation.org,
        John Whitmore <johnfwhitmore@...il.com>
Subject: [PATCH 0/4] staging:rtl8192u: Style and a question?

This short series of coding style changes clears the remaining checkpatch
issues in the files r8180_93cx6.h and dot11d.h. The file dot11d.h does
still contain lines over the 80 character limit, but most of these lines
are MACRO definitions, and I'm not sure splitting them will add anything
to the style and readability of the code.

My question is with respect to the member variable 'enabled' which has
been refactored in the third patch of the series. I've renamed the
variable to 'dot11d_enabled', (in addition to changing it's type as
suggested by checkpatch), so that it is easier to search for in code.
Now that it is easier to search for 'dot11d_enabled' and it's associated
macro IS_DOT11D_ENABLE(ieee) it becomes apparent that the variable is
initialised to FALSE, (and elsewhere '0'), but appears never to be set.

The function dot11d_update_country_ie(), in file dot11d.c, states in its
header block comment that it assumes that the value of dot11d_enabled is
true.

The dot11d_info structure is allocated:

ieee->dot11d_info = kzalloc(sizeof(struct rt_dot11d_info), GFP_KERNEL);

And dot11d_enabled could be set with a memcopy or a memset, but if it
is being set I've missed it completely. There may be a kernel specific
mechanism which I'm not yet familiar with?

In my ignorance I'd be tempted to remove all code which relies on the
variable being True, but then that function dot11d_update_country_ie()
specifically assumes it's true and is an exported symbol.

John Whitmore (4):
  staging:rtl8192u: Remove unused definitions - Style
  staging:rtl8192u: Add required SPDX-License-Identifier - Style
  staging:rtl8192u: Refactor member variable enabled - Style
  staging:rtl8192u: Rename member pDot11dInfo - Style

 drivers/staging/rtl8192u/ieee80211/dot11d.c   | 66 +++++++++----------
 drivers/staging/rtl8192u/ieee80211/dot11d.h   |  6 +-
 .../staging/rtl8192u/ieee80211/ieee80211.h    |  2 +-
 .../rtl8192u/ieee80211/ieee80211_softmac.c    |  8 +--
 drivers/staging/rtl8192u/r8180_93cx6.h        | 19 +-----
 drivers/staging/rtl8192u/r8192U_core.c        |  2 +-
 6 files changed, 43 insertions(+), 60 deletions(-)

-- 
2.18.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ