Received: by 2002:ab2:4a89:0:b0:1f4:a8b6:6e69 with SMTP id w9csp261000lqj; Wed, 10 Apr 2024 09:36:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUAY+o2vzPMpiuOudXYPVEoGJO2PPH2QTbe9i9VUxRkfdoMbk2vrdlD7uKflDqt9tonr/jxKyHnQ5pruREbvdJ3wQg698FL8liYqBNeEg== X-Google-Smtp-Source: AGHT+IFv8CbxGqgNz3OyTp0K5KO9U5L8uCKAMPH1RZg3rF2kWXoMkP6zT8P20hlaTsCbDFpvIe13 X-Received: by 2002:a17:906:5586:b0:a52:1695:a645 with SMTP id y6-20020a170906558600b00a521695a645mr711129ejp.30.1712766985895; Wed, 10 Apr 2024 09:36:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712766985; cv=pass; d=google.com; s=arc-20160816; b=fUI45HxnoKPxGbR4cLf5WxrQPnC7XAaXyx9Q+Q9eMfSM6gcQiuDVOjbWh179sTRUIl ACx5+ep7y7ZCcdyRfyg4hQAJl2tnbj5fbPAd0OlZwW1t7fhhxz9hjTye9n6JjxghGbnj U+TfJdEbYeMtMtlBWYlBk5Vykaex+wxbC4dbOs5zyBr3Tad91OXBHRRG2dQgv0L08XNk LacJ3Pbjrnte0+yeEjgQER+AFspnBMWNTflv6iT1FF9KdtjthcagK30xKQ18Rq5jF8o2 l4AHF9z5snkMDB9x0OOPaAgmn2tFkCZH75OBZ8+owJPP4AjKIqCn6AlRspKC4/ysGbjt 2Byw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=p+W04xMJcUPr9f846uo/0B2epSNIBBlPRs3Dj5oFDOU=; fh=fffhgQomylnSOy2yviDX1N9EZYOf5kPGCLJwk77+9H0=; b=HMH5/jCnP0/pI2wtG+BPbd6ZdUXTBbiq46shrvC56tKSUpOZmPy9dIqWXh+Oq56sqm x4t0twlBs+N3Ab6K+jDflbvcov0YvUT1b5XRdPef1C7IpE81Yi4D7sVXH+808uOBjSH5 PqEouAStqlqKUDZ2S1lAsxojEYsyzRg8WPV5uLNqYeiW6UGbUQXRCFziR6W2cOKJiU6w CpBGkiKw8FponJOg7663humvqRto5AkpVK4gcNtYZ9QYCelspdr7fDbNXEF6JhobBo52 pFhrKjKuiQhdk0HlKhgqHsmFS+bmSz3wad5zOMtmZHKuixJ4L/hz6MVdhYeRGrkQkBdj LoEg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hJWktyAE; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-138986-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138986-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id gs44-20020a1709072d2c00b00a4a342223d3si6260452ejc.287.2024.04.10.09.36.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 09:36:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-138986-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hJWktyAE; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-138986-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138986-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 752AF1F21BD5 for ; Wed, 10 Apr 2024 16:36:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 10C2517B4F6; Wed, 10 Apr 2024 16:36:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hJWktyAE" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2C5651779A9; Wed, 10 Apr 2024 16:36:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712766977; cv=none; b=gUNaOCJZQIQQRbQgJcJgo1w50YgAXHHwdl1cq3058iz2he9Wne9gGxpz/+0eeZ1NxIH8ePUt351IuhPcLZpnUiQ+qDfp5+HcfVTc5SMcCOlDjEhxlK9Ek8/ifMa+68weDPhnENqoBuGKQ6z6eyJwYKSplCwA0nhRysLJvsWAiDQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712766977; c=relaxed/simple; bh=va6aJQDCMR2Z82GIPrLoBSIBd2Bs9Em2LFb+DW3sePg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Tl7ZMDqY8yNeAU9HEha5duSf19hs/9TKCo2viBTyYuYG3+3qTyWtDpXWq2NHaHCqP5dIFIMWQLxyWFghC35ujJA8cLWXtszI/+xDc7nBq6q5yk6mMcfgBPXpUmnCgujVJK56IFPKB5S7XpkArL22mmJuqJGDvwRycFwsB1FHJps= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hJWktyAE; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 08E27C433F1; Wed, 10 Apr 2024 16:36:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712766976; bh=va6aJQDCMR2Z82GIPrLoBSIBd2Bs9Em2LFb+DW3sePg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hJWktyAEKduiTPIVXOuA9YcJrobuE94Y3FtLE3/zgzQ+xGs57CPEIuvPx6yPdFTxQ 4oNzU/41oBNCEf91OPo+v6EDV/Zr7BBgJ9QlmssvXr8+MAblRmp3gcwSihl9KSSRDw 7jA80OPbu7HYoYm1HvPQ7S083R5L9dqSJgcR3o1h91te/2EsuHWvcc9j62L5hYL5aY j0f+t80N4qijG67S/7T/2tFP9T/Kfp3bJz3DJ8ghj7ncJMVIWQqBmQiLJTQTdXkNCg OIGgxnlZEwhFT/sEVDjMTVezlYbvG8fct7/iIiTj+1SZ6D0NC1xoG7FS980rcEB7fJ cAMthVoOVOScw== Date: Wed, 10 Apr 2024 18:36:11 +0200 From: Alexey Gladkov To: Jiri Slaby Cc: Greg Kroah-Hartman , LKML , kbd@lists.linux.dev, linux-api@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-serial@vger.kernel.org, Helge Deller Subject: Re: [PATCH v4 2/3] VT: Add KDFONTINFO ioctl Message-ID: References: <74ca50e0-61b1-4d4c-85dd-a5d920548c04@kernel.org> <7cd32f988a147d7617742c9e074c753de0c6bc1f.1712080158.git.legion@kernel.org> <211f3c45-7064-475b-b9e1-f6adbbba8879@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <211f3c45-7064-475b-b9e1-f6adbbba8879@kernel.org> On Wed, Apr 03, 2024 at 07:05:14AM +0200, Jiri Slaby wrote: > First, there was no need to send this v4 so quickly. Provided we have > not settled in v3... This makes the review process painful. > > And then: > > On 02. 04. 24, 19:50, Alexey Gladkov wrote: > > Each driver has its own restrictions on font size. There is currently no > > way to understand what the requirements are. The new ioctl allows > > userspace to get the minimum and maximum font size values. > > > > Acked-by: Helge Deller > > Signed-off-by: Alexey Gladkov > ... > > --- a/drivers/tty/vt/vt_ioctl.c > > +++ b/drivers/tty/vt/vt_ioctl.c > > @@ -479,6 +479,17 @@ static int vt_k_ioctl(struct tty_struct *tty, unsigned int cmd, > > break; > > } > > > > + case KDFONTINFO: { > > + struct console_font_info fnt_info; > > + > > + ret = con_font_info(vc, &fnt_info); > > + if (ret) > > + return ret; > > + if (copy_to_user(up, &fnt_info, sizeof(fnt_info))) > > sizeof, I already commented. I'm not sure I understand. sizeof(*up), but 'up' is 'void __user *up'. > Now you leak info to userspace unless everyone sets everything in > fnt_info. IOW, do memset() above. Yes. I miss it. Sorry. -- Rgrds, legion