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]
Date:   Thu, 30 Mar 2017 22:16:05 -0700
From:   Joe Perches <joe@...ches.com>
To:     "Tobin C. Harding" <me@...in.cc>, linux-kernel@...r.kernel.org
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Wolfram Sang <wsa@...-dreams.de>, devel@...uxdriverproject.org,
        Tycho Andersen <tycho@...ho.ws>
Subject: Re: [PATCH RFC] staging: ks7010: remove custom Michael MIC
 implementation

On Fri, 2017-03-31 at 15:47 +1100, Tobin C. Harding wrote:
> ks7010 currently uses a custom implementation of the Michael MIC
> algorithm. The kernel has an implementation of this algorithm
> already, we should use it.

ok, trivia:

Do please run your patch through checkpatch and fix a few style nits.

$ ./scripts/checkpatch.pl ~/1.mbox --strict --terse | cut -f2- -d":"
161: WARNING: line over 80 characters
170: WARNING: Missing a blank line after declarations
205: WARNING: line over 80 characters
229: WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
263: WARNING: Prefer using "%s", __func__ to embedded function names
264: ERROR: code indent should use tabs where possible
264: WARNING: quoted string split across lines
272: WARNING: Prefer using "%s", __func__ to embedded function names
273: ERROR: code indent should use tabs where possible
273: WARNING: quoted string split across lines
325: WARNING: Prefer pr_warn(... to pr_warning(...
 2 errors, 9 warnings, 0 checks, 262 lines checked

and

> diff --git a/drivers/staging/ks7010/mic.c b/drivers/staging/ks7010/mic.c
[]
> +int ks_wlan_mic(struct crypto_shash *tfm_michael, u8 *key,
> +		u8 priority, u8 *data, size_t data_len, u8 *mic)
> +{
> +	SHASH_DESC_ON_STACK(desc, tfm_michael);
> +	u8 hdr[ETH_HLEN + 2]; /* 16 bytes */

It might be better to declare a struct for this

> +	hdr[ETH_ALEN * 2] = priority;
> +	hdr[ETH_ALEN * 2 + 1] = 0;
> +	hdr[ETH_ALEN * 2 + 2] = 0;
> +	hdr[ETH_ALEN * 2 + 3] = 0;

And use struct members here.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ