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:   Tue, 6 Aug 2019 15:32:14 -0700
From:   Jakub Kicinski <jakub.kicinski@...ronome.com>
To:     David Ahern <dsahern@...nel.org>
Cc:     davem@...emloft.net, netdev@...r.kernel.org, jiri@...nulli.us,
        David Ahern <dsahern@...il.com>
Subject: Re: [PATCH net] netdevsim: Restore per-network namespace accounting
 for fib entries

On Tue,  6 Aug 2019 12:15:17 -0700, David Ahern wrote:
> From: David Ahern <dsahern@...il.com>
> 
> Prior to the commit in the fixes tag, the resource controller in netdevsim
> tracked fib entries and rules per network namespace. Restore that behavior.
> 
> Fixes: 5fc494225c1e ("netdevsim: create devlink instance per netdevsim instance")
> Signed-off-by: David Ahern <dsahern@...il.com>

Thanks.

Let's see what Jiri says, but to me this patch seems to indeed restore
the original per-namespace accounting when the more natural way forward
may perhaps be to make nsim only count the fib entries where

	fib_info->net == devlink_net(devlink)

> -void nsim_fib_destroy(struct nsim_fib_data *data)
> +int nsim_fib_init(void)
>  {
> -	unregister_fib_notifier(&data->fib_nb);
> -	kfree(data);
> +	int err;
> +
> +	err = register_pernet_subsys(&nsim_fib_net_ops);
> +	if (err < 0) {
> +		pr_err("Failed to register pernet subsystem\n");
> +		goto err_out;
> +	}
> +
> +	err = register_fib_notifier(&nsim_fib_nb, nsim_fib_dump_inconsistent);
> +	if (err < 0) {
> +		pr_err("Failed to register fib notifier\n");

		unregister_pernet_subsys(&nsim_fib_net_ops);
?

> +		goto err_out;
> +	}
> +
> +err_out:
> +	return err;
>  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ