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: <20231215174707.6ae0a290@kernel.org>
Date: Fri, 15 Dec 2023 17:47:07 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Jiri Pirko <jiri@...nulli.us>
Cc: netdev@...r.kernel.org, pabeni@...hat.com, davem@...emloft.net,
 edumazet@...gle.com, jacob.e.keller@...el.com, jhs@...atatu.com,
 johannes@...solutions.net, andriy.shevchenko@...ux.intel.com,
 amritha.nambiar@...el.com, sdf@...gle.com, horms@...nel.org,
 przemyslaw.kitszel@...el.com
Subject: Re: [patch net-next v7 5/9] genetlink: introduce per-sock family
 private storage

Sorry for the latency...

On Fri, 15 Dec 2023 11:17:14 +0100 Jiri Pirko wrote:
> Wait, let me make your suggestion clear. Do you suggest to remove the
> WARN_ON_ONCE from __genl_sk_priv_get() as well?
> 
> To put it in code:
> void *__genl_sk_priv_get(struct genl_family *family, struct sock *sk)
> {
> 	if (WARN_ON_ONCE(!family->sock_privs))
> 		return ERR_PTR(-EINVAL);
> 	return xa_load(family->sock_privs, (unsigned long) sk);
> }

I meant this, although no strong feelings.

> OR:
> void *__genl_sk_priv_get(struct genl_family *family, struct sock *sk)
> {
> 	if (!family->sock_privs)
> 		return ERR_PTR(-EINVAL);
> 	return xa_load(family->sock_privs, (unsigned long) sk);
> }
> ?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ