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]
Message-ID: <7c3a13ce-c5df-4ea7-a3b1-32a13ab95274@kernel.org>
Date: Wed, 16 Apr 2025 07:12:45 +0200
From: Jiri Slaby <jirislaby@...nel.org>
To: Nicolas Pitre <nico@...xnic.net>,
 Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Nicolas Pitre <npitre@...libre.com>, linux-serial@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 13/13] vt: refresh ucs_width_table.h and adjust code in
 ucs.c accordingly

On 15. 04. 25, 21:18, Nicolas Pitre wrote:
> From: Nicolas Pitre <npitre@...libre.com>
> 
> Width tables are now split into BMP (16-bit) and non-BMP (above 16-bit).
> This reduces the corresponding text size by 20-25%.
> 
> Note: scripts/checkpatch.pl complains about "... exceeds 100 columns".
>        Please ignore.
...
> --- a/drivers/tty/vt/ucs.c
> +++ b/drivers/tty/vt/ucs.c
> @@ -5,17 +5,34 @@
...
> -static int interval_cmp(const void *key, const void *element)
> +static int interval16_cmp(const void *key, const void *element)
> +{
> +	u16 cp = *(u16 *)key;

You cast away const. Does the compiler not complain?

> +	const struct ucs_interval16 *entry = element;
> +
> +	if (cp < entry->first)
> +		return -1;
> +	if (cp > entry->last)
> +		return 1;
> +	return 0;
> +}
> +
> +static int interval32_cmp(const void *key, const void *element)
>   {
>   	u32 cp = *(u32 *)key;

Apparently not, given we do this for ages. I wonder why?

Anyway:

Reviewed-by: Jiri Slaby <jirislaby@...nel.org>

-- 
js
suse labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ