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:   Mon, 17 Oct 2022 19:53:53 -0700
From:   Kees Cook <keescook@...omium.org>
To:     "Gustavo A. R. Silva" <gustavoars@...nel.org>
Cc:     Kalle Valo <kvalo@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
        linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-hardening@...r.kernel.org
Subject: Re: [PATCH 6/6][next] airo: Avoid clashing function prototypes

On Mon, Oct 17, 2022 at 03:36:20PM -0500, Gustavo A. R. Silva wrote:
> [...]
> @@ -6312,16 +6326,16 @@ static int airo_get_mode(struct net_device *dev,
>  	/* If not managed, assume it's ad-hoc */
>  	switch (local->config.opmode & MODE_CFG_MASK) {
>  		case MODE_STA_ESS:
> -			*uwrq = IW_MODE_INFRA;
> +			uwrq->mode = IW_MODE_INFRA;
>  			break;
>  		case MODE_AP:
> -			*uwrq = IW_MODE_MASTER;
> +			uwrq->mode = IW_MODE_MASTER;
>  			break;
>  		case MODE_AP_RPTR:
> -			*uwrq = IW_MODE_REPEAT;
> +			uwrq->mode = IW_MODE_REPEAT;
>  			break;
>  		default:
> -			*uwrq = IW_MODE_ADHOC;
> +			uwrq->mode = IW_MODE_ADHOC;
>  	}
>  
>  	return 0;

Sometimes you use the union directly, sometimes not. What was your
heuristic for that?

Regardless, looks good!

Reviewed-by: Kees Cook <keescook@...omium.org>

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ