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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 19 Mar 2017 16:13:41 -0700
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Alexey Dobriyan <adobriyan@...il.com>
Cc:     steffen.klassert@...unet.com, herbert@...dor.apana.org.au,
        davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH 2/4] flowcache: make flow_cache_hash_size() return
 "unsigned int"

On Mon, 2017-03-20 at 01:24 +0300, Alexey Dobriyan wrote:
> Hash size can't negative so "unsigned int" is logically correct.


>  	struct flow_cache_percpu *fcp = per_cpu_ptr(fc->percpu, cpu);
> -	size_t sz = sizeof(struct hlist_head) * flow_cache_hash_size(fc);
> +	unsigned int sz = sizeof(struct hlist_head) * flow_cache_hash_size(fc);
>  
>  	if (!fcp->hash_table) {
>  		fcp->hash_table = kzalloc_node(sz, GFP_KERNEL, cpu_to_node(cpu));
>  		if (!fcp->hash_table) {
> -			pr_err("NET: failed to allocate flow cache sz %zu\n", sz);
> +			pr_err("NET: failed to allocate flow cache sz %u\n", sz);


I do not see any improvement here.

What is wrong with size_t exactly ?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ