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: <ecacf1f2-48e0-4132-bbce-1be9fffc2798@redhat.com>
Date: Thu, 24 Oct 2024 16:38:16 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Philo Lu <lulie@...ux.alibaba.com>, netdev@...r.kernel.org
Cc: willemdebruijn.kernel@...il.com, davem@...emloft.net,
 edumazet@...gle.com, kuba@...nel.org, dsahern@...nel.org,
 antony.antony@...unet.com, steffen.klassert@...unet.com,
 linux-kernel@...r.kernel.org, dust.li@...ux.alibaba.com,
 jakub@...udflare.com, fred.cc@...baba-inc.com,
 yubing.qiuyubing@...baba-inc.com
Subject: Re: [PATCH v5 net-next 1/3] net/udp: Add a new struct for hash2 slot



On 10/24/24 16:31, Paolo Abeni wrote:
> On 10/18/24 13:45, Philo Lu wrote:
>> @@ -3438,16 +3436,17 @@ void __init udp_table_init(struct udp_table *table, const char *name)
>>  					      UDP_HTABLE_SIZE_MIN,
>>  					      UDP_HTABLE_SIZE_MAX);
>>  
>> -	table->hash2 = table->hash + (table->mask + 1);
>> +	table->hash2 = (void *)(table->hash + (table->mask + 1));
>>  	for (i = 0; i <= table->mask; i++) {
>>  		INIT_HLIST_HEAD(&table->hash[i].head);
>>  		table->hash[i].count = 0;
>>  		spin_lock_init(&table->hash[i].lock);
>>  	}
>>  	for (i = 0; i <= table->mask; i++) {
>> -		INIT_HLIST_HEAD(&table->hash2[i].head);
>> -		table->hash2[i].count = 0;
>> -		spin_lock_init(&table->hash2[i].lock);
>> +		INIT_HLIST_HEAD(&table->hash2[i].hslot.head);
>> +		table->hash2[i].hslot.count = 0;
>> +		spin_lock_init(&table->hash2[i].hslot.lock);
>> +		table->hash2[i].hash4_cnt = 0;
> 
> Does not build for CONFIG_BASE_SMALL=y kernels. You need to put all the
> hash4_cnt access under compiler guards.

I see now it's fixed in the next patch, but it's not good enough: we
want to preserve bisectability. You should introduce
udp_table_hash4_init() in this patch.

Thanks,

Paolo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ