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] [day] [month] [year] [list]
Date: Mon, 31 Jul 2023 09:03:05 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Leon Romanovsky <leon@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
 pabeni@...hat.com, Stephen Hemminger <stephen@...workplumber.org>
Subject: Re: [PATCH net-next] net: make sure we never create ifindex = 0

On Sun, 30 Jul 2023 16:32:19 +0300 Leon Romanovsky wrote:
> > @@ -11271,7 +11272,6 @@ static int __net_init netdev_init(struct net *net)
> >  	if (net->dev_index_head == NULL)
> >  		goto err_idx;
> >  
> > -	net->ifindex = 1;
> >  	xa_init_flags(&net->dev_by_index, XA_FLAGS_ALLOC);  
> 
> You don't need to change xa_limit_31b, just change XA_FLAGS_ALLOC to be XA_FLAGS_ALLOC1
> and allocations will start from 1.

Because obviously there is a magic flag for this...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ