Re: [PATCH v4 2/3] VT: Add KDFONTINFO ioctl

Greg Kroah-Hartman <[email protected]> Wed, 3 Apr 2024 06:55:08 +0200
Newsgroups dev.linux.lists.kbd,org.kernel.vger.linux-api,org.kernel.vger.linux-fbdev,org.kernel.vger.linux-kernel,org.kernel.vger.linux-serial
Message-ID <2024040306-unleash-scrubbed-1c2b@gregkh>
On Tue, Apr 02, 2024 at 07:50:45PM +0200, Alexey Gladkov wrote:
> +struct console_font_info {
> +	unsigned int min_width, min_height;	/* minimal font size */
> +	unsigned int max_width, max_height;	/* maximum font size */
> +	unsigned int flags;			/* KD_FONT_INFO_FLAG_* */
> +};

As Jiri said, this will not work for an ioctl structure at all, sorry.
Please read the kernel documentation about how to write a new ioctl for
how to do this correctly (hint, you can not use 'unsigned int' in a
structure that crosses the kernel/user boundry for new ioctls.)

thanks,

greg k-h