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: Thu, 15 Feb 2024 11:03:27 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: devicetree@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Andy Shevchenko <andy@...nel.org>, Rob Herring <robh+dt@...nel.org>, 
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>, Conor Dooley <conor+dt@...nel.org>, 
	Robin van der Gracht <robin@...tonic.nl>, Paul Burton <paulburton@...nel.org>
Subject: Re: [PATCH v2 03/15] auxdisplay: linedisp: Use unique number for id

On Mon, Feb 12, 2024 at 6:04 PM Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> wrote:
> The absence of decrementation of linedisp_id is incorrect in two ways,
> i.e. it may cause:
> - an ID exhaustion
> - (and if the above is addressed) a duplicate id number may be allocated
>   next time a device is added
>
> Replace above mentioned approach by using IDA framework.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

Reviewed-by: Geert Uytterhoeven <geert@...ux-m68k.org>

> --- a/drivers/auxdisplay/line-display.h
> +++ b/drivers/auxdisplay/line-display.h
> @@ -14,6 +14,7 @@
>  /**
>   * struct linedisp - character line display private data structure
>   * @dev: the line display device
> + * @id: instance id of this display
>   * @timer: timer used to implement scrolling
>   * @update: function called to update the display
>   * @buf: pointer to the buffer for the string currently displayed
> @@ -25,6 +26,7 @@
>   */
>  struct linedisp {
>         struct device dev;
> +       unsigned int id;

Note that there is a hole on 64-bit platforms.
Hence I'd move id below, so the hole is at the end of the
structure, and might be filled by future changes.

>         struct timer_list timer;
>         void (*update)(struct linedisp *linedisp);
>         char *buf;

Gr{oetje,eeting}s,

                        Geert


--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68korg

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ