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: <d7743747-1ec2-4557-9f2f-4cffd77284b3@kernel.org>
Date: Fri, 16 Feb 2024 08:21:38 +0100
From: Jiri Slaby <jirislaby@...nel.org>
To: Alexey Gladkov <legion@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
 Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [RFC PATCH v1 0/5] VT: Add ability to get font requirements

On 15. 02. 24, 16:37, Alexey Gladkov wrote:
> We now have KD_FONT_OP_SET_TALL, but in fact such large fonts cannot be
> loaded. No console driver supports tall fonts.

I thought fbcon can, no? If not, we should likely remove all the 
KD_FONT_OP_SET_TALL checks here and there.

> Unfortunately, userspace
> cannot distinguish the lack of support in the driver from errors in the
> font itself. In all cases, EINVAL will be returned.

Yeah, AFAIR userspace just tries many possibilities and sees what trial 
worked.

> How about adding another operator to get the supported font size so that
> userspace can handle this situation correctly?

The whole font interface is horrid (and we got rid of v1 interface only 
recently). Like (ab)using height = vpitch in KD_FONT_OP_SET_TALL :(.

So perhaps, as a band-aid, this might be fine (note you give no 
opportunity to find out supported vpitch for example). Eventually, we 
need to invent a v3 interface with some better font_op struct with 
reserved fields for future use and so on.

> I mean something like this proof-of-concept.
> 
> ---
> 
> Alexey Gladkov (5):
>    VT: Add KD_FONT_OP_GET_INFO operation
>    newport_con: Allow to get max font width and height
>    sticon: Allow to get max font width and height
>    vgacon: Allow to get max font width and height
>    fbcon: Allow to get max font width and height
> 
>   drivers/tty/vt/vt.c                 | 27 +++++++++++++++++++++++++++
>   drivers/tty/vt/vt_ioctl.c           |  2 +-
>   drivers/video/console/newport_con.c | 21 +++++++++++++++++----
>   drivers/video/console/sticon.c      | 21 +++++++++++++++++++--
>   drivers/video/console/vgacon.c      | 17 ++++++++++++++++-
>   drivers/video/fbdev/core/fbcon.c    | 18 +++++++++++++++++-
>   include/linux/console.h             |  1 +
>   include/uapi/linux/kd.h             |  1 +
>   8 files changed, 99 insertions(+), 9 deletions(-)
> 

-- 
js
suse labs


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ