kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Garrit Franke <garritfranke@gmail.com>
Cc: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>,
	"Linux Kernel List" <kernelnewbies@kernelnewbies.org>
Subject: Re: What's tha KOBJ_MAX action used for?
Date: Tue, 14 Jul 2020 18:12:08 +0200	[thread overview]
Message-ID: <20200714161208.GA2081624@kroah.com> (raw)
In-Reply-To: <CAD16O84x+4cO7CuS3rvV1mDY686s76u-eC56=V-EjGTjw0Eeeg@mail.gmail.com>

A: http://en.wikipedia.org/wiki/Top_post
Q: Were do I find info about this thing called top-posting?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

A: No.
Q: Should I include quotations after my reply?

http://daringfireball.net/2007/07/on_top

On Tue, Jul 14, 2020 at 04:36:15PM +0200, Garrit Franke wrote:
> Thanks for your replies. Also, thanks greg for your thorough review on my
> corresponding patch (https://lkml.org/lkml/2020/7/14/84), I learned a lot!
> 
> I have been digging around about Kobjects a bit. They are nicely documented.
> Still, no documentation exists about this KOBJ_MAX action.

Please look at commit 60a96a59569b ("Driver core: accept all valid
action-strings in uevent-trigger") in the tree.  That's when it was
added, and it was used.

Then a short bit later, 5c5daf657cb5 ("Driver core: exclude
kobject_uevent.c for !CONFIG_HOTPLUG") stopped using it in the .c files,
and no one noticed that it should have been removed.


> This post on stackoverflow mentions that it's a "special" field that marks the
> end of the enum (if I understand correctly):
> https://stackoverflow.com/a/23149574/9046809
> This lead me to think that this is a convention I'm not aware of, but
> I could not find any
> resources that described such a thing, so I discarded that idea.
> 
> If I understand correctly, this action can in fact be passed to userspace by the
> kobject_uevent function, so it would be a bad idea to remove it. Is my
> reasoning correct?

Yes, if it did get passed to userspace.  But it doesn't, as you can see
by the last commit I referenced above.  We pass strings to userspace for
the kobject events and we take that same string sent to us from
userspace to send "fake" kobject uevents as well.

Also, the loop that we checked for KOBJ_MAX is no longer present, we do
a much more sane ARRAY_SIZE() check, right?  So I don't think it's
needed.

Can you rewrite your changelog text with all of this new information and
resend it?  I'll be glad to take the patch then.

thanks,

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

      reply	other threads:[~2020-07-14 16:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-13 11:17 What's tha KOBJ_MAX action used for? Garrit Franke
2020-07-13 12:35 ` Greg KH
2020-07-14  2:15   ` Valdis Klētnieks
2020-07-14 14:36     ` Garrit Franke
2020-07-14 16:12       ` Greg KH [this message]

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=20200714161208.GA2081624@kroah.com \
    --to=greg@kroah.com \
    --cc=garritfranke@gmail.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=valdis.kletnieks@vt.edu \
    /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).