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]
Date:   Mon, 12 Dec 2022 14:27:46 +0100
From:   Oliver Neukum <oneukum@...e.com>
To:     Johan Hovold <johan@...nel.org>, Oliver Neukum <oneukum@...e.com>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Vincent Mailhol <mailhol.vincent@...adoo.fr>,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] USB: drop misleading usb_set_intfdata() kernel doc



On 12.12.22 14:14, Johan Hovold wrote:
> On Mon, Dec 12, 2022 at 12:13:54PM +0100, Oliver Neukum wrote:

>> 1. that the function exists and its purpose
> 
> That should be apparent from the function name (and implementation).
> 
>> 2. its parameters
> 
> Apparent from the prototype.
> 
> But sure, it would not show up in generated documentation (like many
> other functions).

purpose, yes. existence, no.

> it seems. Not sure how much value there is in that, though.

I am afraid there is no consensus answer to that question.
  
> And in this case there was also no kernel doc for usb_get_intfdata()
> which is equally self documenting. Why add redundant docs for only one
> of these functions?

Because knowing that one of them exists makes the other much more
obvious.

> I'd rather drop this particular documentation which was added due to a
> misunderstanding then go down the rabbit hole of adding mindless kernel
> doc to every helper we have.

Yes, but those are not the alternatives.
Removing the perfectly good part of the kerneldoc is a needless regression,
albeit a minor one.

> Yes. The (device group) attributes are removed by driver core before
> ->remove() is called, otherwise you'd have an even bigger issue with the
> driver data itself which is typically deallocated before the pointer is

So what happens if user space calls read() or write() on an existing fd?
Sorry, but this is an issue we need to be sure about.

	Regards
		Oliver

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ