All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Anjali Kulkarni <anjali.k.kulkarni@oracle.com>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"zbr@ioremap.net" <zbr@ioremap.net>,
	"brauner@kernel.org" <brauner@kernel.org>,
	"johannes@sipsolutions.net" <johannes@sipsolutions.net>,
	"ecree.xilinx@gmail.com" <ecree.xilinx@gmail.com>,
	"leon@kernel.org" <leon@kernel.org>,
	"keescook@chromium.org" <keescook@chromium.org>,
	"socketcan@hartkopp.net" <socketcan@hartkopp.net>,
	"petrm@nvidia.com" <petrm@nvidia.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH v1 2/5] connector/cn_proc: Add filtering to fix some bugs
Date: Tue, 14 Mar 2023 21:59:45 -0700	[thread overview]
Message-ID: <20230314215945.3336aeb3@kernel.org> (raw)
In-Reply-To: <BY5PR10MB41295AF42563F023651E109FC4BE9@BY5PR10MB4129.namprd10.prod.outlook.com>

On Tue, 14 Mar 2023 02:32:13 +0000 Anjali Kulkarni wrote:
> This is clearly a layering violation, right?
> Please don't add "if (family_x)" to the core netlink code.
>
> ANJALI> Yes, it is, but there does not seem a very clean way to do it
> ANJALI> otherwise and I saw a check for protocol NETLINK_GENERIC just
> ANJALI> below it, so used it for connector as well. There is no
> ANJALI> release or free callback in the netlink_sock. Is it ok to add
> ANJALI> it? There was another bug (for which I have not yet sent a
> ANJALI> patch) in which, we need to decrement
> ANJALI> proc_event_num_listeners, when client exits without calling
> ANJALI> IGNORE, else that count again gets out of status of actual no
> ANJALI> of listeners.   
> The other option is to add a flag in netlink_sock, something like
> NETLINK_F_SK_USER_DATA_FREE, which will free the sk_user_data, if
> this flag is set. But it does not solve the above scenario.

Please fix your email setup, it's really hard to read your replies.

There is an unbind callback, and a notifier. Can neither of those 
be made to work? ->sk_user_data is not a great choice of a field,
either, does any other netlink family use it this way?
Adding a new field for family use to struct netlink_sock may be better.

  reply	other threads:[~2023-03-15  4:59 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10 22:15 [PATCH v1 0/5] Process connector bug fixes & enhancements Anjali Kulkarni
2023-03-10 22:15 ` [PATCH v1 1/5] netlink: Reverse the patch which removed filtering Anjali Kulkarni
2023-03-10 22:15 ` [PATCH v1 2/5] connector/cn_proc: Add filtering to fix some bugs Anjali Kulkarni
2023-03-14  0:24   ` Jakub Kicinski
2023-03-14  2:32     ` Anjali Kulkarni
2023-03-15  4:59       ` Jakub Kicinski [this message]
2023-03-15 19:08         ` Anjali Kulkarni
2023-03-15 19:13           ` Anjali Kulkarni
2023-03-15 19:50           ` Jakub Kicinski
2023-03-15 20:12             ` Anjali Kulkarni
2023-03-14  8:38     ` Christian Brauner
2023-03-14 18:51       ` Anjali Kulkarni
2023-04-01 18:32       ` Anjali Kulkarni
2023-03-10 22:15 ` [PATCH v1 3/5] connector/cn_proc: Test code for proc connector Anjali Kulkarni
2023-03-10 22:15 ` [PATCH v1 4/5] connector/cn_proc: Allow non-root users access Anjali Kulkarni
2023-03-10 22:15 ` [PATCH v1 5/5] connector/cn_proc: Performance improvements Anjali Kulkarni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230314215945.3336aeb3@kernel.org \
    --to=kuba@kernel.org \
    --cc=anjali.k.kulkarni@oracle.com \
    --cc=brauner@kernel.org \
    --cc=davem@davemloft.net \
    --cc=ecree.xilinx@gmail.com \
    --cc=edumazet@google.com \
    --cc=johannes@sipsolutions.net \
    --cc=keescook@chromium.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=socketcan@hartkopp.net \
    --cc=zbr@ioremap.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.