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: <ZYBQ0zcqufs-s6hk@nanopsycho>
Date: Mon, 18 Dec 2023 15:01:55 +0100
From: Jiri Pirko <jiri@...nulli.us>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: netdev@...r.kernel.org, kuba@...nel.org, pabeni@...hat.com,
	davem@...emloft.net, edumazet@...gle.com, jacob.e.keller@...el.com,
	jhs@...atatu.com, johannes@...solutions.net,
	amritha.nambiar@...el.com, sdf@...gle.com, horms@...nel.org,
	przemyslaw.kitszel@...el.com
Subject: Re: [patch net-next v8 5/9] genetlink: introduce per-sock family
 private storage

Mon, Dec 18, 2023 at 12:01:09PM CET, andriy.shevchenko@...ux.intel.com wrote:
>On Sat, Dec 16, 2023 at 01:29:57PM +0100, Jiri Pirko wrote:
>> From: Jiri Pirko <jiri@...dia.com>
>> 
>> Introduce an xarray for Generic netlink family to store per-socket
>> private. Initialize this xarray only if family uses per-socket privs.
>> 
>> Introduce genl_sk_priv_get() to get the socket priv pointer for a family
>> and initialize it in case it does not exist.
>> Introduce __genl_sk_priv_get() to obtain socket priv pointer for a
>> family under RCU read lock.
>> 
>> Allow family to specify the priv size, init() and destroy() callbacks.
>
>...
>
>> +	void			(*sock_priv_init)(void *priv);
>
>Can in some cases init fail? Shouldn't we allow to propagate the error code
>and fail the flow?

Currently not needed. Easy to add when (if ever) this is going to be
needed.

>
>> +	void			(*sock_priv_destroy)(void *priv);
>
>...
>
>P.S> I'm fine with either, just consider above as a material to think about.

I always do consider these :)


>
>-- 
>With Best Regards,
>Andy Shevchenko
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ