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]
Message-ID: <4B6060F2.3070702@vflare.org>
Date:	Wed, 27 Jan 2010 21:21:14 +0530
From:	Nitin Gupta <ngupta@...are.org>
To:	Pekka Enberg <penberg@...helsinki.fi>
CC:	Greg KH <greg@...ah.com>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/3] use lock for 64-bit stats

On 01/27/2010 08:40 PM, Pekka Enberg wrote:
> Nitin Gupta wrote:
>> +static void stat_dec(u32 *v)
>> +{
>> +    *v = *v - 1;
>> +}
>> +
>> +static void stat64_inc(struct ramzswap *rzs, u64 *v)
>> +{
>> +    spin_lock(&rzs->stat64_lock);
>> +    *v = *v + 1;
>> +    spin_unlock(&rzs->stat64_lock);
>> +}
>> +
>> +static void stat64_dec(struct ramzswap *rzs, u64 *v)
>> +{
>> +    spin_lock(&rzs->stat64_lock);
>> +    *v = *v - 1;
>> +    spin_unlock(&rzs->stat64_lock);
>> +}
>> +
>> +static u64 stat64_read(struct ramzswap *rzs, u64 *v)
>> +{
>> +    u64 val;
>> +
>> +    spin_lock(&rzs->stat64_lock);
>> +    val = *v;
>> +    spin_unlock(&rzs->stat64_lock);
>> +
>> +    return val;
>> +}
>> +#else
>> +#define stat_inc(v)
>> +#define stat_dec(v)
>> +#define stat64_inc(r, v)
>> +#define stat64_dec(r, v)
>> +#define stat64_read(r, v)
>> +#endif /* CONFIG_RAMZSWAP_STATS */
> 
> I think I complained about this before: the names are too generic and
> could collide with core kernel code. I think they ought to be called
> ramzsawp_stat*().
> 


I somehow missed this point. I will rename these to rzs_stat*()
('rzs_' prefix is used for other one-liner functions too).

Thanks,
Nitin
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ