Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3512448pxj; Tue, 15 Jun 2021 02:33:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznlX6+37l5tqapF9qqGbto79mxG4S2Rh122b3gRbteyiAmSoWJb9AtmH1/BMFsNWjdQwLQ X-Received: by 2002:a17:906:b41:: with SMTP id v1mr19578724ejg.246.1623749606161; Tue, 15 Jun 2021 02:33:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623749606; cv=none; d=google.com; s=arc-20160816; b=zDHeQBzE0xBOziP02V9ItZ6VqEOn8im5ckfQhxiQvXljOYsyIKiJyFhCb2EYAqT4Bc hBHV6DYTvb+QxGJ3B8R/nt23krRfJU2xYs7lZbAf0qtLeMj1Mk9xRGS9Tr37ef50rHQ7 W/R9MQOzqxqOXhM/e0fASGneFR0TJanGSisQAoqsMhr6uXonyDAfzWeupJ4SMvDL4EdA GYwHqo6EtV/D/3F7C6Xql5P+h7FSAgWow3mDctL4UA41cab/XIS9InPRMxpYOc5bR47A VhGxa5iaAoe/ivOjdyy+zK4UmbtcqSmpVFAwwWlP90Q3cUm78PrSPDDYURCXvyr6/0+R BhnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Ptw5vq2Y7Uc0rtLVbykO0B1LNyehh7RDwfwMJ4G0KnY=; b=JonA6JgAHQQ746cr++CwrHVE0qy/yHMKZxIT8meVGekP76AZRZMSk5iStD+20l+ydR 78ZhvTJHehG1IU4ZsbPxZ2YMNa/EvhDv9Of7JN6MyXAXpDiiFqsd0VnTgQDF1tLS/9Gi sbf4EYHAnG7Tde3xWCGm1ZkAQxUSwyfrgBG2pIwQQ/tfyfXPEdTwEDd26KmqBrySClbD ih2zTmfkaIna3bCXBRkAMTA786lh9Axsn5fXBcQ0Js/KFoqEsqHF1/WO3yxPLKA1HWp5 QK9x9dgMIAM2Y9IqlvBv29MhUqRndDGyfn88TakyObBoC0tjAElTucZieqCbSNzYwe1J /xig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="qX/2gxMv"; 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 h6si13715051eds.229.2021.06.15.02.33.03; Tue, 15 Jun 2021 02:33:26 -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=k20201202 header.b="qX/2gxMv"; 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 S231286AbhFOJeM (ORCPT + 99 others); Tue, 15 Jun 2021 05:34:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:55508 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230502AbhFOJeL (ORCPT ); Tue, 15 Jun 2021 05:34:11 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8F0BA6144B; Tue, 15 Jun 2021 09:32:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623749527; bh=WbofU3FbbPnSFXGeih/K3AMtLhSjIQgK3sc/aG4zmXU=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=qX/2gxMvKmjEEelxOB0d3buCBcdgjJ3LuV3zdSKhspD6phd/ocQduCf2DWfEuk2ze EQkYq0fUHWhH5t/LvP57FzSkz0SMJUg2nPOxzp4+Le58orVZdwG/Hz30do9NHk85TJ ELOZE2UrIFsnpXBKVkLt9RdEoUBIvZkFjMBb6IOMtiXPVGjA4QkJPXOFuoKrPXb02m YGndUlA+P7sqcIieDzJoEh7AisaFTttGuPcMzig0v356w0OD8Y19xRqpUrbt/kOZ12 QqjPWFHGKVzVULtDgaUFOcvsu96UuiGo8aYVmgmKpOQc2MSRVfe6ECypmxSq8zvo1P HJ6AGyQb2mj0Q== Received: by mail-wr1-f41.google.com with SMTP id z8so17541282wrp.12; Tue, 15 Jun 2021 02:32:07 -0700 (PDT) X-Gm-Message-State: AOAM533L7ljlCzkQPGvb+0Qp8kVdDwzadHhQhrRG1s1rvNccO0diBHjp Va+muUiV0mIXQn+7/0+VDvRtxzJRwPagfadL+D8= X-Received: by 2002:a5d:530c:: with SMTP id e12mr24054560wrv.165.1623749526074; Tue, 15 Jun 2021 02:32:06 -0700 (PDT) MIME-Version: 1.0 References: <20210614103409.3154127-1-arnd@kernel.org> <20210614103409.3154127-5-arnd@kernel.org> In-Reply-To: From: Arnd Bergmann Date: Tue, 15 Jun 2021 11:30:01 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 4/8] media: subdev: remove VIDIOC_DQEVENT_TIME32 handling To: Hans Verkuil Cc: Laurent Pinchart , Mauro Carvalho Chehab , "Lad, Prabhakar" , Eduardo Valentin , Sakari Ailus , Greg Kroah-Hartman , Vaibhav Gupta , Liu Shixin , Jacopo Mondi , Andy Shevchenko , Linux Kernel Mailing List , Linux Media Mailing List , linux-staging@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 15, 2021 at 10:48 AM Hans Verkuil wrote: > > On 15/06/2021 10:43, Arnd Bergmann wrote: > > On Mon, Jun 14, 2021 at 7:02 PM Laurent Pinchart > > wrote: > >> > >> On Mon, Jun 14, 2021 at 12:34:05PM +0200, Arnd Bergmann wrote: > >>> From: Arnd Bergmann > >>> > >>> Converting the VIDIOC_DQEVENT_TIME32/VIDIOC_DQEVENT32/ > >>> VIDIOC_DQEVENT32_TIME32 arguments to the canonical form is done in common > >>> code, but for some reason I ended up adding another conversion helper to > >>> subdev_do_ioctl() as well. I must have concluded that this does not go > >>> through the common conversion, but it has done that since the ioctl > >>> handler was first added. > >>> > >>> I assume this one is harmless as there should be no way to arrive here > >>> from user space, but since it is dead code, it should just get removed. > > I changed this to: > > "I assume this one is harmless as there should be no way to arrive here > from user space if CONFIG_COMPAT_32BIT_TIME is set," > > If it is not set, then this will just fall into the default case and is > handled as if it is a potential custom ioctl, as you would expect. > > Let me know if you have a better text, I can still update it. Looks good. One more sentence I would add: "On a 64-bit architecture, as well as a 32-bit architecture without CONFIG_COMPAT_32BIT_TIME, handling this command is a mistake, and the kernel should return an error". Arnd