netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: hadi@cyberus.ca, Zhang Rui <rui.zhang@intel.com>,
	netdev@vger.kernel.org,
	"linux-acpi@vger" <linux-acpi@vger.kernel.org>,
	lenb@kernel.org, Thomas Graf <tgraf@suug.ch>
Subject: Re: Fwd: [PATCH] [-mm] ACPI: export ACPI events via netlink
Date: Fri, 29 Jun 2007 15:23:21 +0200	[thread overview]
Message-ID: <468507C9.2000800@trash.net> (raw)
In-Reply-To: <1183122920.4089.63.camel@johannes.berg>

Johannes Berg wrote:
> On Fri, 2007-06-29 at 15:11 +0200, Patrick McHardy wrote:
> 
> 
>>>Hm. I'm starting to dislike the dynamic registration the more I think
>>>about it. Now when a group is unregistered I'd have to unbind everybody
>>>who's currently using it... At least when I want to enforce
>>>root/non-root binds which is a further goal.
>>
>>
>>How about using module references to prevent unloading while sockets
>>are bound? We already do the same thing for netlink families.
> 
> 
> Ah, no, you're both thinking something different. I'm thinking if we
> allow dynamic registration the only sensible thing is to have dynamic
> unregistration as well, and then we can have this sequence
> 
>  (1) register group X with non-root
>  (2) non-root app A binds group X
>  (3) kernel unregisters group X
>  (4) something else in kernel reregisters group ID X but root-only
> -> non-root app A is bound to root-only group X


I'm not sure that "the only sensible thing to do" is right, we
do allow dynamic registration of netlink families and do the
module reference thing anyway (admittedly, I never liked that
and the autoloading part very much). I guess it depends on how
this will be used in the end, if you really do have a group per
device or something like that you probably need to be able to
unregister at any time. But as I said previously I believe its
more in the spirit of netlink to group things logically by
message type, in which case some core part would own the
family and not a single device.

If you do want the dynamic unregistation *and* the non-root mc
listening then I guess you don't have a choice but to unbind
sockets at unregistration. That shouln't be a real problem,
without having though much about it, I believe just clearing
the mc group from the bitmap and calling netlink_update_subscriptions
should be fine.


  reply	other threads:[~2007-06-29 13:23 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-22  9:47 [PATCH] [-mm] ACPI: export ACPI events via netlink Zhang Rui
2007-05-22 10:05 ` Samuel Ortiz
2007-05-22 10:10   ` Evgeniy Polyakov
2007-05-22 11:03 ` jamal
2007-05-23  1:17   ` Zhang Rui
2007-05-27  9:40   ` Zhang Rui
     [not found]     ` <4466a10705270629h31977813hd2fc8330bcd87f78@mail.gmail.com>
2007-05-27 13:34       ` Fwd: " jamal
2007-06-14  8:59         ` Zhang Rui
2007-06-14 11:28           ` jamal
2007-06-15  1:01             ` Zhang Rui
2007-06-15 10:26               ` jamal
2007-06-18 15:01               ` jamal
2007-06-19  3:32                 ` Zhang Rui
2007-06-25 22:40                   ` Johannes Berg
2007-06-26 13:33                     ` jamal
2007-06-26 13:42                       ` Johannes Berg
2007-06-27 23:24                     ` jamal
2007-06-28  9:45                       ` Johannes Berg
2007-06-29 11:17                         ` jamal
2007-06-29 11:28                           ` Johannes Berg
2007-06-29 11:48                             ` jamal
2007-06-29 11:58                               ` Johannes Berg
2007-06-29 11:51                         ` Patrick McHardy
2007-06-29 11:59                           ` Johannes Berg
2007-06-29 12:04                             ` Patrick McHardy
2007-06-29 12:01                           ` jamal
2007-06-29 12:09                             ` Patrick McHardy
2007-06-29 12:46                           ` Johannes Berg
2007-06-29 12:48                             ` Patrick McHardy
2007-06-29 12:51                               ` Johannes Berg
2007-06-29 13:02                               ` jamal
2007-06-29 13:12                                 ` Patrick McHardy
2007-06-29 13:27                                   ` jamal
2007-06-29 13:32                                     ` Patrick McHardy
2007-06-29 13:13                                 ` Johannes Berg
2007-06-29 12:57                       ` Johannes Berg
2007-06-29 13:11                         ` Patrick McHardy
2007-06-29 13:15                           ` Johannes Berg
2007-06-29 13:23                             ` Patrick McHardy [this message]
2007-06-29 13:34                               ` Johannes Berg
2007-06-29 13:44                                 ` Patrick McHardy
2007-06-29 13:49                                   ` Johannes Berg
2007-06-29 13:53                                     ` Patrick McHardy
2007-06-29 14:05                                       ` Johannes Berg
2007-06-29 14:18                                         ` Johannes Berg
2007-06-29 14:56                                           ` Johannes Berg
2007-06-30 15:32                                             ` jamal
2007-07-02  8:43                                               ` Johannes Berg
2007-07-02 12:56                                                 ` Patrick McHardy
2007-07-02 14:34                                                   ` Johannes Berg
2007-07-02 14:38                                                     ` Patrick McHardy
2007-07-02 14:48                                                       ` Johannes Berg
2007-07-02 22:12                                                         ` Johannes Berg
2007-07-03 10:08                                                           ` [PATCH] netlink: allocate group bitmaps dynamically Johannes Berg
2007-07-03 12:05                                                             ` Patrick McHardy
2007-07-03 14:09                                                               ` Johannes Berg
2007-07-03 14:11                                                                 ` Patrick McHardy
2007-07-03 14:32                                                                   ` Johannes Berg
2007-07-03 23:13                                                                   ` Johannes Berg
2007-07-03 10:09                                                           ` [PATCH] netlink: allow removing multicast groups Johannes Berg
2007-07-03 10:10                                                           ` [PATCH] generic netlink: dynamic " Johannes Berg
2007-07-03 11:56                                                           ` Fwd: [PATCH] [-mm] ACPI: export ACPI events via netlink Patrick McHardy
2007-06-29 13:24                             ` jamal
2007-06-29 13:11                         ` jamal
2007-06-19 11:30                 ` Johannes Berg
2007-06-19 16:20                   ` jamal
2007-06-20 11:25                     ` Johannes Berg
2007-06-21 15:47                       ` jamal
2007-06-22 10:09                         ` Johannes Berg
2007-06-25 17:08                           ` jamal
2007-06-26  8:50                             ` Johannes Berg

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=468507C9.2000800@trash.net \
    --to=kaber@trash.net \
    --cc=hadi@cyberus.ca \
    --cc=johannes@sipsolutions.net \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=tgraf@suug.ch \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).