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:   Wed, 11 Mar 2020 22:48:21 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     mkubecek@...e.cz
Cc:     netdev@...r.kernel.org, kuba@...nel.org, jiri@...nulli.us,
        andrew@...n.ch, f.fainelli@...il.com, linville@...driver.com,
        johannes@...solutions.net, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 04/15] ethtool: add ethnl_parse_bitset() helper

From: Michal Kubecek <mkubecek@...e.cz>
Date: Wed, 11 Mar 2020 22:40:23 +0100 (CET)

> +int ethnl_parse_bitset(unsigned long *val, unsigned long *mask,
> +		       unsigned int nbits, const struct nlattr *attr,
> +		       ethnl_string_array_t names,
> +		       struct netlink_ext_ack *extack)
> +{
 ...
> +		if (bit_val)
> +			set_bit(idx, val);
> +		if (!no_mask)
> +			set_bit(idx, mask);

You can certainly use non-atomic __set_bit() in this context.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ