Message ID | 362c4787-e114-1b90-66e2-f9a1cbafe567@xs4all.nl (mailing list archive) |
---|---|
State | Accepted, archived |
Headers |
Received: from vger.kernel.org ([209.132.180.67]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from <linux-media-owner@vger.kernel.org>) id 1igsQk-00HPUn-FJ; Mon, 16 Dec 2019 15:37:06 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728286AbfLPPh3 (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Mon, 16 Dec 2019 10:37:29 -0500 Received: from lb1-smtp-cloud9.xs4all.net ([194.109.24.22]:42993 "EHLO lb1-smtp-cloud9.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728234AbfLPPh3 (ORCPT <rfc822;linux-media@vger.kernel.org>); Mon, 16 Dec 2019 10:37:29 -0500 Received: from [IPv6:2001:983:e9a7:1:319d:6a65:b2d0:e9e9] ([IPv6:2001:983:e9a7:1:319d:6a65:b2d0:e9e9]) by smtp-cloud9.xs4all.net with ESMTPA id gsR3i0rvIGyJwgsR4i8Jux; Mon, 16 Dec 2019 16:37:27 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xs4all.nl; s=s1; t=1576510647; bh=gtdS5UOT8c4Yjl2uuM8f04Ct7MToS3O6I26eVwciy8w=; h=From:Subject:To:Message-ID:Date:MIME-Version:Content-Type:From: Subject; b=qfEFrHlBSrNMLVpoy3fIdjgiscUvr7tHUmhXSuXZK24SZzseQiRiqZJdT2b0/9sNl Xm9P6CJ7htY2dAy6UlY6JClq3yrkJFrBiPMHsTam8h9Jmol5Pi4Vwd1ZjuD8fkGoBA dWpgNopbf3qUC9s7XFM/nvC0HkWQv9rkmSMHSLemRO6WRRXgYJDEk4h53VJTNdx7mW ZP62H4Hetlx5mKe+CMDYq1Eq94UsoyozyTtUmPjGittLLiqDPyLQcE+743YD99Sivf qCOOYOZKDuUVU5ThN1MQR7Y1fg7V9AOdRcGu/+zq07g8qpEVDKY9HF2ZCQ8TlcDQnn dyw8IJOfzAjBw== From: Hans Verkuil <hverkuil@xs4all.nl> Subject: [GIT PULL FOR v5.6] y2038 safety in v4l2 To: Linux Media Mailing List <linux-media@vger.kernel.org> Cc: Arnd Bergmann <arnd@arndb.de> Message-ID: <362c4787-e114-1b90-66e2-f9a1cbafe567@xs4all.nl> Date: Mon, 16 Dec 2019 16:37:25 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfNfmlpi+KU+o1aO5LPfhKU8TFJoqT6Mu41vyN//K/Pmso/yiWlP9WpKgdlO4thXmptvjf4f1lVqLR+Dh+GBG9wPRmv9Th7w8HIZMYiovZTtY1f+XUlrl jgXRGsQXF2B5hPO/3P+LkBDIpuMiEGsZx/Xtz+Lpm13Ins+6GSCMReCzxEGVSD+uy8aXlDpdOOCMhWt2rG9hsC7VyNqaj7o2HIslBOfNlIJTN+GvUGoBX4aR Y3bXRd3mupEW8WqUekhNeNnQZWTijJxo/LtBmzxp3630He5g0eSZne5v4eNvvbvd Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org |
Series |
[GIT,PULL,FOR,v5.6] y2038 safety in v4l2
|
|
Pull-request
git://linuxtv.org/hverkuil/media_tree.git tags/br-y2038Message
Hans Verkuil
Dec. 16, 2019, 3:37 p.m. UTC
Hi Mauro, This series makes the V4L2 API y2038 safe. Many thanks to Arnd for working on this! I have tested this using the test-media script and v4l2-ctl/v4l2-compliance binaries compiled for x86_64, i686, i686 with 64-bit time_t under both a 64 bit kernel (so the compat-ioctl32 code is called) and a native 32 bit kernel (to make sure both the 32 and 64-bit time_t versions are handled correctly). Regards, Hans The following changes since commit 0885acd77eb4644fd88f6d9f41e433f4ee9bc37a: media: vivid: support multiplanar touch devices (2019-12-16 13:24:16 +0100) are available in the Git repository at: git://linuxtv.org/hverkuil/media_tree.git tags/br-y2038 for you to fetch changes up to 416f076ff267d2208d4e09767080558cc619dd9c: media: v4l2-core: fix compat v4l2_buffer handling for time64 ABI (2019-12-16 15:27:20 +0100) ---------------------------------------------------------------- Tag branch ---------------------------------------------------------------- Arnd Bergmann (8): media: documentation: fix video_event description media: v4l2: abstract timeval handling in v4l2_buffer media: v4l2-core: compat: ignore native command codes media: v4l2-core: split out data copy from video_usercopy media: v4l2-core: fix VIDIOC_DQEVENT for time64 ABI media: v4l2-core: fix v4l2_buffer handling for time64 ABI media: v4l2-core: fix compat VIDIOC_DQEVENT for time64 ABI media: v4l2-core: fix compat v4l2_buffer handling for time64 ABI Documentation/media/uapi/dvb/video-get-event.rst | 2 +- Documentation/media/uapi/dvb/video_types.rst | 2 +- drivers/media/common/videobuf2/videobuf2-v4l2.c | 4 +- drivers/media/pci/meye/meye.c | 4 +- drivers/media/usb/cpia2/cpia2_v4l.c | 4 +- drivers/media/usb/stkwebcam/stk-webcam.c | 2 +- drivers/media/usb/usbvision/usbvision-video.c | 4 +- drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 476 +++++++++++++++++++++++++++++++++++++++++++++--------- drivers/media/v4l2-core/v4l2-event.c | 5 +- drivers/media/v4l2-core/v4l2-ioctl.c | 211 +++++++++++++++++++----- drivers/media/v4l2-core/v4l2-subdev.c | 26 ++- drivers/media/v4l2-core/videobuf-core.c | 5 +- include/media/v4l2-common.h | 21 +++ include/media/v4l2-ioctl.h | 55 +++++++ include/trace/events/v4l2.h | 2 +- include/uapi/linux/videodev2.h | 29 ++++ 16 files changed, 717 insertions(+), 135 deletions(-)
Comments
From: builder@linuxtv.org
Pull request: https://patchwork.linuxtv.org/patch/60777/
Build log: https://builder.linuxtv.org/job/patchwork/29469/
Build time: 00:38:59
Link: https://lore.kernel.org/linux-media/362c4787-e114-1b90-66e2-f9a1cbafe567@xs4all.nl
gpg: Signature made Mon 16 Dec 2019 03:12:40 PM UTC
gpg: using RSA key AAA7FFBA4D2D77EF4CAEA1421326E0CD23ABDCE5
gpg: Good signature from "Hans Verkuil <hverkuil-cisco@xs4all.nl>" [unknown]
gpg: aka "Hans Verkuil <hverkuil@xs4all.nl>" [full]
Summary: 5 patches and/or PDF generation with issues, being 0 at build time
Error/warnings:
Error #256 when running ./scripts/checkpatch.pl --terse --mailback --no-summary --strict patches/0003-media-v4l2-core-compat-ignore-native-command-codes.patch:
$ ./scripts/checkpatch.pl --terse --mailback --no-summary --strict patches/0003-media-v4l2-core-compat-ignore-native-command-codes.patch
patches/0003-media-v4l2-core-compat-ignore-native-command-codes.patch:71: ERROR: trailing statements should be on next line
patches/0003-media-v4l2-core-compat-ignore-native-command-codes.patch:72: ERROR: trailing statements should be on next line
patches/0003-media-v4l2-core-compat-ignore-native-command-codes.patch:73: ERROR: trailing statements should be on next line
patches/0003-media-v4l2-core-compat-ignore-native-command-codes.patch:74: ERROR: trailing statements should be on next line
patches/0003-media-v4l2-core-compat-ignore-native-command-codes.patch:75: ERROR: trailing statements should be on next line
patches/0003-media-v4l2-core-compat-ignore-native-command-codes.patch:76: ERROR: trailing statements should be on next line
patches/0003-media-v4l2-core-compat-ignore-native-command-codes.patch:77: ERROR: trailing statements should be on next line
patches/0003-media-v4l2-core-compat-ignore-native-command-codes.patch:78: ERROR: trailing statements should be on next line
patches/0003-media-v4l2-core-compat-ignore-native-command-codes.patch:79: ERROR: trailing statements should be on next line
patches/0003-media-v4l2-core-compat-ignore-native-command-codes.patch:80: ERROR: trailing statements should be on next line
patches/0003-media-v4l2-core-compat-ignore-native-command-codes.patch:81: ERROR: trailing statements should be on next line
patches/0003-media-v4l2-core-compat-ignore-native-command-codes.patch:82: ERROR: trailing statements should be on next line
patches/0003-media-v4l2-core-compat-ignore-native-command-codes.patch:83: ERROR: trailing statements should be on next line
patches/0003-media-v4l2-core-compat-ignore-native-command-codes.patch:84: ERROR: trailing statements should be on next line
patches/0003-media-v4l2-core-compat-ignore-native-command-codes.patch:85: ERROR: trailing statements should be on next line
patches/0003-media-v4l2-core-compat-ignore-native-command-codes.patch:86: ERROR: trailing statements should be on next line
patches/0003-media-v4l2-core-compat-ignore-native-command-codes.patch:87: ERROR: trailing statements should be on next line
patches/0003-media-v4l2-core-compat-ignore-native-command-codes.patch:88: ERROR: trailing statements should be on next line
patches/0003-media-v4l2-core-compat-ignore-native-command-codes.patch:89: ERROR: trailing statements should be on next line
patches/0003-media-v4l2-core-compat-ignore-native-command-codes.patch:90: ERROR: trailing statements should be on next line
patches/0003-media-v4l2-core-compat-ignore-native-command-codes.patch:91: ERROR: trailing statements should be on next line
patches/0003-media-v4l2-core-compat-ignore-native-command-codes.patch:92: ERROR: trailing statements should be on next line
patches/0003-media-v4l2-core-compat-ignore-native-command-codes.patch:93: ERROR: trailing statements should be on next line
patches/0003-media-v4l2-core-compat-ignore-native-command-codes.patch:94: ERROR: trailing statements should be on next line
patches/0003-media-v4l2-core-compat-ignore-native-command-codes.patch:95: ERROR: trailing statements should be on next line
patches/0003-media-v4l2-core-compat-ignore-native-command-codes.patch:96: ERROR: trailing statements should be on next line
Error #256 when running ./scripts/checkpatch.pl --terse --mailback --no-summary --strict patches/0005-media-v4l2-core-fix-VIDIOC_DQEVENT-for-time64-ABI.patch:
$ ./scripts/checkpatch.pl --terse --mailback --no-summary --strict patches/0005-media-v4l2-core-fix-VIDIOC_DQEVENT-for-time64-ABI.patch
patches/0005-media-v4l2-core-fix-VIDIOC_DQEVENT-for-time64-ABI.patch:62: WARNING: Avoid logging continuation uses where feasible
patches/0005-media-v4l2-core-fix-VIDIOC_DQEVENT-for-time64-ABI.patch:63: CHECK: Alignment should match open parenthesis
Error #256 when running ./scripts/checkpatch.pl --terse --mailback --no-summary --strict patches/0006-media-v4l2-core-fix-v4l2_buffer-handling-for-time64-.patch:
$ ./scripts/checkpatch.pl --terse --mailback --no-summary --strict patches/0006-media-v4l2-core-fix-v4l2_buffer-handling-for-time64-.patch
patches/0006-media-v4l2-core-fix-v4l2_buffer-handling-for-time64-.patch:47: WARNING: Avoid logging continuation uses where feasible
patches/0006-media-v4l2-core-fix-v4l2_buffer-handling-for-time64-.patch:48: CHECK: Alignment should match open parenthesis
patches/0006-media-v4l2-core-fix-v4l2_buffer-handling-for-time64-.patch:174: CHECK: Please use a blank line after function/struct/union/enum declarations
Error #256 when running ./scripts/checkpatch.pl --terse --mailback --no-summary --strict patches/0007-media-v4l2-core-fix-compat-VIDIOC_DQEVENT-for-time64.patch:
$ ./scripts/checkpatch.pl --terse --mailback --no-summary --strict patches/0007-media-v4l2-core-fix-compat-VIDIOC_DQEVENT-for-time64.patch
patches/0007-media-v4l2-core-fix-compat-VIDIOC_DQEVENT-for-time64.patch:98: WARNING: space prohibited between function name and open parenthesis '('
patches/0007-media-v4l2-core-fix-compat-VIDIOC_DQEVENT-for-time64.patch:98: ERROR: Macros with complex values should be enclosed in parentheses
patches/0007-media-v4l2-core-fix-compat-VIDIOC_DQEVENT-for-time64.patch:108: ERROR: trailing statements should be on next line
patches/0007-media-v4l2-core-fix-compat-VIDIOC_DQEVENT-for-time64.patch:123: WARNING: line over 80 characters
Error #256 when running ./scripts/checkpatch.pl --terse --mailback --no-summary --strict patches/0008-media-v4l2-core-fix-compat-v4l2_buffer-handling-for-.patch:
$ ./scripts/checkpatch.pl --terse --mailback --no-summary --strict patches/0008-media-v4l2-core-fix-compat-v4l2_buffer-handling-for-.patch
patches/0008-media-v4l2-core-fix-compat-v4l2_buffer-handling-for-.patch:84: WARNING: line over 80 characters
patches/0008-media-v4l2-core-fix-compat-v4l2_buffer-handling-for-.patch:247: WARNING: line over 80 characters
patches/0008-media-v4l2-core-fix-compat-v4l2_buffer-handling-for-.patch:332: ERROR: trailing statements should be on next line
patches/0008-media-v4l2-core-fix-compat-v4l2_buffer-handling-for-.patch:336: ERROR: trailing statements should be on next line
patches/0008-media-v4l2-core-fix-compat-v4l2_buffer-handling-for-.patch:338: ERROR: trailing statements should be on next line
patches/0008-media-v4l2-core-fix-compat-v4l2_buffer-handling-for-.patch:346: WARNING: line over 80 characters
patches/0008-media-v4l2-core-fix-compat-v4l2_buffer-handling-for-.patch:346: ERROR: trailing statements should be on next line
Hi Arnd, On 12/16/19 4:37 PM, Hans Verkuil wrote: > Hi Mauro, > > This series makes the V4L2 API y2038 safe. Many thanks to Arnd for working on > this! > > I have tested this using the test-media script and v4l2-ctl/v4l2-compliance > binaries compiled for x86_64, i686, i686 with 64-bit time_t under both a > 64 bit kernel (so the compat-ioctl32 code is called) and a native 32 bit > kernel (to make sure both the 32 and 64-bit time_t versions are handled > correctly). For completeness: I have now also tested this on arm and arm64 architectures. Everything looks fine! Regards, Hans > > Regards, > > Hans > > The following changes since commit 0885acd77eb4644fd88f6d9f41e433f4ee9bc37a: > > media: vivid: support multiplanar touch devices (2019-12-16 13:24:16 +0100) > > are available in the Git repository at: > > git://linuxtv.org/hverkuil/media_tree.git tags/br-y2038 > > for you to fetch changes up to 416f076ff267d2208d4e09767080558cc619dd9c: > > media: v4l2-core: fix compat v4l2_buffer handling for time64 ABI (2019-12-16 15:27:20 +0100) > > ---------------------------------------------------------------- > Tag branch > > ---------------------------------------------------------------- > Arnd Bergmann (8): > media: documentation: fix video_event description > media: v4l2: abstract timeval handling in v4l2_buffer > media: v4l2-core: compat: ignore native command codes > media: v4l2-core: split out data copy from video_usercopy > media: v4l2-core: fix VIDIOC_DQEVENT for time64 ABI > media: v4l2-core: fix v4l2_buffer handling for time64 ABI > media: v4l2-core: fix compat VIDIOC_DQEVENT for time64 ABI > media: v4l2-core: fix compat v4l2_buffer handling for time64 ABI > > Documentation/media/uapi/dvb/video-get-event.rst | 2 +- > Documentation/media/uapi/dvb/video_types.rst | 2 +- > drivers/media/common/videobuf2/videobuf2-v4l2.c | 4 +- > drivers/media/pci/meye/meye.c | 4 +- > drivers/media/usb/cpia2/cpia2_v4l.c | 4 +- > drivers/media/usb/stkwebcam/stk-webcam.c | 2 +- > drivers/media/usb/usbvision/usbvision-video.c | 4 +- > drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 476 +++++++++++++++++++++++++++++++++++++++++++++--------- > drivers/media/v4l2-core/v4l2-event.c | 5 +- > drivers/media/v4l2-core/v4l2-ioctl.c | 211 +++++++++++++++++++----- > drivers/media/v4l2-core/v4l2-subdev.c | 26 ++- > drivers/media/v4l2-core/videobuf-core.c | 5 +- > include/media/v4l2-common.h | 21 +++ > include/media/v4l2-ioctl.h | 55 +++++++ > include/trace/events/v4l2.h | 2 +- > include/uapi/linux/videodev2.h | 29 ++++ > 16 files changed, 717 insertions(+), 135 deletions(-) >