Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp266734ybz; Fri, 17 Apr 2020 00:25:42 -0700 (PDT) X-Google-Smtp-Source: APiQypKoDJwJvkRIMEFGJvLDFhkhipOJEj+IJL1GWy+M4lAGnw7WG6bHqGi6b07YY8shvbDL6XD1 X-Received: by 2002:a05:6402:2d5:: with SMTP id b21mr1595906edx.291.1587108341806; Fri, 17 Apr 2020 00:25:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587108341; cv=none; d=google.com; s=arc-20160816; b=Un/1GX9a9/74vvOE2v4x/xruvmPmSXD7Y75IEdHGVmrGqC/EfaosOdNA4Up0we7LEz 40ANaIlPwbekhkLagWMPs00oeIyuFK+5YtIvo0XE4DvpFkdG7WQLby2H7m+m5Fpg4/h6 48xXRzqJ3Bbo6Eo6Bia6YKnUgJgB+zbNh2uOt0zdAGYIeH25Gladfj28oOFBzmy0RJM5 4yeCAHgnk3bN+unqB3avBoITv2ITuUgA6kP0HRbtqP+ehOi75LGgLSh43rYwUDCBQruF M5TwRmyy2OJbcmZbYbO53zNdONatb6QNRT45HURhTIWORZQzjwmYRQLpVIZ79EhI1Vad BoYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=BwBrUiLXOMWHdZo0ksMocuatfdqJAEGoyiWjzyIYkPM=; b=ipsC/z6X+qxNeu/s4/BQQZO5BZeOUGJ7FndNBrmTFwNBHOggOZPKi5urEyayC/Dfh6 aGM70I0jFyHc81DMzNtH0/7yDBnc4R5XdyKBughk3tNpupuwm6FSk3UvtS3aSWTBogSg c08ibpUCBo4k/1axsiLOzIwALfr+cSEqI+0jR+PSNMguJOeRPYdoFyRT8rekRD3qs43Y bOSaGUbBe+acyMUb8Ac2vOz4ZGuSirVpS00qmAeFMt1lrrlm+ygLfQikgHgMOjRLB1xa ovbPIj9QL8kGb7V3zpmIrzSlS/bZspPykQKIY66z9arbMcw8AX213MLCT7dWBfMvymIp 3OQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GGtYUYFg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s4si13611333ejx.332.2020.04.17.00.25.16; Fri, 17 Apr 2020 00:25:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GGtYUYFg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728938AbgDQHYH (ORCPT + 99 others); Fri, 17 Apr 2020 03:24:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:34898 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728419AbgDQHYH (ORCPT ); Fri, 17 Apr 2020 03:24:07 -0400 Received: from coco.lan (ip5f5ad4d8.dynamic.kabel-deutschland.de [95.90.212.216]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4CB0E2054F; Fri, 17 Apr 2020 07:24:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587108247; bh=VVl6eQijGUYnBJboOjeT+LbLAwqwN9J8c1/DpsLE62o=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=GGtYUYFg/oe0o91C3yetUX8RyOViYWYJ/jfWLd9vExgJWm9MiA9cYb7NO6q0/V9cr KeO1MY5X2OogGXs677cfMETU7OOwBiXaL4m6tnNII03oZ7UKrGoyD7tJ8/FAQZfJwE Tq2gYkqeT2JX/3hFTlLy8IHrt2SS7RpRzRexwNfs= Date: Fri, 17 Apr 2020 09:24:02 +0200 From: Mauro Carvalho Chehab To: sy0816.kang@samsung.com Cc: Hans Verkuil , Arnd Bergmann , Greg Kroah-Hartman , Thomas Gleixner , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] media: v4l2-compat-ioctl32.c: copy reserved2 field in get_v4l2_buffer32 Message-ID: <20200417092402.3322e2da@coco.lan> In-Reply-To: <20200417024543.66785-1-sy0816.kang@samsung.com> References: <20200417024543.66785-1-sy0816.kang@samsung.com> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Fri, 17 Apr 2020 11:45:23 +0900 sy0816.kang@samsung.com escreveu: > From: Sunyoung Kang > > get_v4l2_buffer32() didn't copy reserved2 field from userspace to driver. > So the reserved2 value is not received through compat-ioctl32 in driver. > This patch copy reserved2 field of v4l2_buffer in get_v4l2_buffer32(). Why should it copy reserved values? Those should not be used anywhere. > > Signed-off-by: Sunyoung Kang > --- > drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c > index a99e82ec9ab6..e9b2b9c0ec9a 100644 > --- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c > +++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c > @@ -665,6 +665,7 @@ static int get_v4l2_buffer32(struct v4l2_buffer __user *p64, > if (V4L2_TYPE_IS_OUTPUT(type)) > if (assign_in_user(&p64->bytesused, &p32->bytesused) || > assign_in_user(&p64->field, &p32->field) || > + assign_in_user(&p64->reserved2, &p32->reserved2) || > assign_in_user(&p64->timestamp.tv_sec, > &p32->timestamp.tv_sec) || > assign_in_user(&p64->timestamp.tv_usec, Thanks, Mauro