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] [day] [month] [year] [list]
Message-ID: <CAHp75VfkS_geLqSjMz95yb8smNqKTQTfyCA3KeeUGMSg1=EfOw@mail.gmail.com>
Date: Sun, 21 Sep 2025 21:33:02 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: David Lechner <dlechner@...libre.com>
Cc: Jonathan Cameron <jic23@...nel.org>, Nuno Sá <nuno.sa@...log.com>, 
	Andy Shevchenko <andy@...nel.org>, linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iio: adc: at91-sama5d2_adc: explain why indio_dev->name =
 dev_name() is wrong

On Sat, Sep 20, 2025 at 7:44 PM David Lechner <dlechner@...libre.com> wrote:
>
> Add an explanatory comment on why indio_dev->name = dev_name(dev) is
> wrong, and that we can't fix it without breaking userspace.
>
> The idea is to prevent future drivers from making the same mistake by
> copying this code. And if this driver is ever modified again, we can
> at least make sure any new compatible IDs use the correct name.

...

> +       /*
> +        * The device name is supposed to be the "part number", not the kobject
> +        * name. Do not copy this code for new drivers. We can't "fix" this
> +        * without breaking userspace, so we have to live with it. However, if
> +        * any new compatible IDs are added, please do something similar to
> +        * adc/ltc2497-core.c so that at least the new part numbers are correct.

Please, use the full path from the root of the source tree, i.e.
drivers/iio/adc/ltc2497-core.c. IIRC the Sphynx might even render the
links properly (if it ever goes to this deep comment, which is not
marked as kernel-doc).

> +        */
>         indio_dev->name = dev_name(&pdev->dev);

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ