From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A928C433DF for ; Tue, 14 Jul 2020 16:13:06 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9EF3A2075B for ; Tue, 14 Jul 2020 16:13:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b="HxMyKPXr"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="RoGfk/Tt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9EF3A2075B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kroah.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.94) (envelope-from ) id 1jvNXd-0003Az-AZ; Tue, 14 Jul 2020 12:12:25 -0400 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by shelob.surriel.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1jvNXZ-0003As-5H for kernelnewbies@kernelnewbies.org; Tue, 14 Jul 2020 12:12:21 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 173CDB66; Tue, 14 Jul 2020 12:12:13 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 14 Jul 2020 12:12:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=/Hk48pi/pq5m2Itfyu4D9Q6CTi4 EE/rWTLkAFyJHENs=; b=HxMyKPXrKQR2U4qW9XKgnVHdYfyKv3+l/iVxwitSd/v q7lJ82Mtk+HWH+pKLRJ2HSvm8Hr2cApqp+dYZa+hXg8/sZKHeLv4snAfNm80GMjU hjk/gFsTxHk16z8ZyFHHIBML5PodSiWPoXK4c5kbSHZO9ffjQRjN/LoKrDLW5wcM E6liYCRHcOzw3ZCC+xPzuLcl1tSUJohyLeF7RARJG18mic2aGFUp0YOO7asipqUU RRxntST6JI81vp1m2YCrj17sKzDwwnDiv9J5siaRCDuzfvBQUeaU+kKs1ob6XXSC HOvwppb3wLs1ZO3CoNrIYFSgA50He3B6RDZa1vxZLlA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=/Hk48p i/pq5m2Itfyu4D9Q6CTi4EE/rWTLkAFyJHENs=; b=RoGfk/TtZuPzH/kc+bY5Uu TvA0nS6d3R7KtqpzK8ajr6/YEkuQ/TNs3R4lngGLnQrSWWoNmjAtlWnUfP+ugEex 3oIQwoh3Vl2g/zzOH8ckeT+sugrkFAivUW2lzuCwDliu2iMbalQH/eCu7dqqM5gU rC7A6rGOIsjqfzBymrvwgzYgkLhf+sEPZky5Ravy0HN8sE2PtLnOoIgj554ohfay WxaQa4UoOLlmDUvOiLCKGaOqhd4OXOUXuS3tPxSpIw/N7bFoZb+sRdbWw/+Y227F Sj0eIVtch6pSYzoWL3SQkDQfXNh9XNgmWkwkixJoR5Wbj2LJZr2VkEylIWLPDKDg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrfedtgddutddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefirhgvghcu mffjuceoghhrvghgsehkrhhorghhrdgtohhmqeenucggtffrrghtthgvrhhnpeetteegfe etudduvdejffeileeludegteeuveekiedthedtieeigfehteejueegveenucffohhmrghi nhepfihikhhiphgvughirgdrohhrghdpuggrrhhinhhgfhhirhgvsggrlhhlrdhnvghtpd hlkhhmlhdrohhrghdpshhtrggtkhhovhgvrhhflhhofidrtghomhenucfkphepkeefrdek iedrkeelrddutdejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepghhrvghgsehkrhhorghhrdgtohhm X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 11B2830600A6; Tue, 14 Jul 2020 12:12:11 -0400 (EDT) Date: Tue, 14 Jul 2020 18:12:08 +0200 From: Greg KH To: Garrit Franke Subject: Re: What's tha KOBJ_MAX action used for? Message-ID: <20200714161208.GA2081624@kroah.com> References: <20200713111725.kxjwte5hahmk23ik@CKC-BS-N0240> <20200713123523.GB3092589@kroah.com> <431434.1594692923@turing-police> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Cc: Valdis =?utf-8?Q?Kl=C4=93tnieks?= , Linux Kernel List X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kernelnewbies-bounces@kernelnewbies.org 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