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]
Date:   Sat, 7 Jan 2023 10:20:13 +0100
From:   Jiri Pirko <jiri@...nulli.us>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
        pabeni@...hat.com, jacob.e.keller@...el.com
Subject: Re: [PATCH net-next 7/9] devlink: allow registering parameters after
 the instance

Fri, Jan 06, 2023 at 10:22:51PM CET, kuba@...nel.org wrote:
>On Fri, 6 Jan 2023 13:55:53 +0100 Jiri Pirko wrote:
>> >@@ -5263,7 +5263,13 @@ static void devlink_param_notify(struct devlink *devlink,
>> > 	WARN_ON(cmd != DEVLINK_CMD_PARAM_NEW && cmd != DEVLINK_CMD_PARAM_DEL &&
>> > 		cmd != DEVLINK_CMD_PORT_PARAM_NEW &&
>> > 		cmd != DEVLINK_CMD_PORT_PARAM_DEL);
>> >-	ASSERT_DEVLINK_REGISTERED(devlink);
>> >+
>> >+	/* devlink_notify_register() / devlink_notify_unregister()
>> >+	 * will replay the notifications if the params are added/removed
>> >+	 * outside of the lifetime of the instance.
>> >+	 */
>> >+	if (!devl_is_registered(devlink))
>> >+		return;  
>> 
>> This helper would be nice to use on other places as well.
>> Like devlink_trap_group_notify(), devlink_trap_notify() and others. I
>> will take care of that in a follow-up.
>
>Alternatively we could reorder back to registering sub-objects
>after the instance and not have to worry about re-sending 
>notifications :S

Hmm, let me explore that path. Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ