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: <20250327121203.69eb78d0@kernel.org>
Date: Thu, 27 Mar 2025 12:12:03 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Stanislav Fomichev <sdf@...ichev.me>
Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
 pabeni@...hat.com
Subject: Re: [PATCH net v2 06/11] netdevsim: add dummy device notifiers

On Thu, 27 Mar 2025 06:56:54 -0700 Stanislav Fomichev wrote:
> In order to exercise and verify notifiers' locking assumptions,
> register dummy notifiers and assert that netdev is ops locked
> for REGISTER/UNREGISTER/UP.

> +static int nsim_net_event(struct notifier_block *this, unsigned long event,
> +			  void *ptr)
> +{
> +	struct net_device *dev = netdev_notifier_info_to_dev(ptr);
> +
> +	switch (event) {
> +	case NETDEV_REGISTER:
> +	case NETDEV_UNREGISTER:
> +	case NETDEV_UP:
> +		netdev_ops_assert_locked(dev);
> +		break;
> +	default:
> +		break;
> +	}
> +
> +	return NOTIFY_DONE;
> +}

Can we register empty notifiers in nsim (just to make sure it has 
a callback) but do the validation in rtnl_net_debug.c
I guess we'd need to transform rtnl_net_debug.c a little,
make it less rtnl specific, compile under DEBUG_NET and ifdef
out the small rtnl parts?

That way we'll have coverage without netdevsim loaded which would 
be all HW testing.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ