lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230911125936.10648-1-yunfei.dong@mediatek.com>
Date:   Mon, 11 Sep 2023 20:59:22 +0800
From:   Yunfei Dong <yunfei.dong@...iatek.com>
To:     NĂ­colas F . R . A . Prado 
        <nfraprado@...labora.com>,
        Nicolas Dufresne <nicolas.dufresne@...labora.com>,
        Hans Verkuil <hverkuil-cisco@...all.nl>,
        AngeloGioacchino Del Regno 
        <angelogioacchino.delregno@...labora.com>,
        Benjamin Gaignard <benjamin.gaignard@...labora.com>,
        Nathan Hebert <nhebert@...omium.org>
CC:     Chen-Yu Tsai <wenst@...omium.org>,
        Hsin-Yi Wang <hsinyi@...omium.org>,
        Fritz Koenig <frkoenig@...omium.org>,
        Daniel Vetter <daniel@...ll.ch>,
        "Steve Cho" <stevecho@...omium.org>,
        Yunfei Dong <yunfei.dong@...iatek.com>,
        <linux-media@...r.kernel.org>, <devicetree@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-mediatek@...ts.infradead.org>,
        <Project_Global_Chrome_Upstream_Group@...iatek.com>
Subject: [PATCH 00/14] add driver to support secure video decoder

In order to support secure video decoder for mt8195/mt8188 h264 driver,
need to use tee client interface to communicate with optee-os. Firstly,
open tee context and tee session for each hardware.

Secondly, allocate two shared memory msg and vsi, msg used to send ipi to
optee-os and get ack msg from optee-os, vsi used to store syntax for
hardware decoder.

Thirdly, adding two CID controls: V4L2_CID_MPEG_MTK_SET_SECURE_MODE and
V4L2_CID_MPEG_MTK_GET_SECURE_HANDLE, get secure handle used for user space
to convert secure fd to secure handle, set secure mode used to tell decoder
driver to initialize tee interface to decode secure video.

Lastly, re-construct h264 driver to support secure video decoder.

Patch 1~4  initialize tee related interface and parameters.
Patch 5~6  allocate/free secure memory.
Patch 7    map vsi for secure mode.
Patch 8    support one plane capture buffer.
Patch 9~10 re-construct h264 driver to support secure mode.
patch 11   used to convert secure fd to secure handle.
Patch 12   used to set secure decoder mode.
Patch 13   disable interrupt.
Patch 14   support tee decode
---
Reference series:
[1]: v1 of this series is submitted by Yong Wu.
	message-id: 20230911023038.30649-1-yong.wu@...iatek.com

Yunfei Dong (14):
  media: mediatek: vcodec: add tee client interface to communiate with
    optee-os
  media: mediatek: vcodec: allocate tee share memory
  media: mediatek: vcodec: send share memory data to optee
  media: mediatek: vcodec: initialize msg and vsi information
  media: mediatek: vcodec: using encoder's device to alloc/free memory
  media: mediatek: vcodec: add interface to allocate/free secure memory
  media: mediatek: vcodec: using shared memory as vsi address
  media: medkatek: vcodec: support one plane capture buffer
  media: medkatek: vcodec: re-construct h264 driver to support svp mode
  media: medkatek: vcodec: remove parse nal_info in kernel
  media: medkatek: vcodec: covert secure fd to secure handle
  media: medkatek: vcodec: set secure mode to decoder driver
  media: medkatek: vcodec: disable wait interrupt for svp mode
  media: medkatek: vcodec: support tee decoder

 .../media/platform/mediatek/vcodec/Kconfig    |   1 +
 .../mediatek/vcodec/common/mtk_vcodec_util.c  | 177 ++++++++-
 .../mediatek/vcodec/common/mtk_vcodec_util.h  |   3 +
 .../platform/mediatek/vcodec/decoder/Makefile |   1 +
 .../mediatek/vcodec/decoder/mtk_vcodec_dec.c  |  24 +-
 .../vcodec/decoder/mtk_vcodec_dec_drv.c       |   9 +
 .../vcodec/decoder/mtk_vcodec_dec_drv.h       |   7 +
 .../vcodec/decoder/mtk_vcodec_dec_hw.c        |  34 +-
 .../vcodec/decoder/mtk_vcodec_dec_optee.c     | 373 ++++++++++++++++++
 .../vcodec/decoder/mtk_vcodec_dec_optee.h     | 156 ++++++++
 .../vcodec/decoder/mtk_vcodec_dec_stateless.c |  80 +++-
 .../decoder/vdec/vdec_h264_req_common.c       |  16 +-
 .../decoder/vdec/vdec_h264_req_multi_if.c     | 334 +++++++++-------
 .../mediatek/vcodec/decoder/vdec_drv_if.c     |   4 +-
 .../mediatek/vcodec/decoder/vdec_msg_queue.c  |   9 +-
 .../mediatek/vcodec/decoder/vdec_vpu_if.c     |  54 ++-
 .../mediatek/vcodec/decoder/vdec_vpu_if.h     |   4 +
 drivers/media/v4l2-core/v4l2-ctrls-defs.c     |  10 +
 include/uapi/linux/v4l2-controls.h            |   5 +
 19 files changed, 1110 insertions(+), 191 deletions(-)
 create mode 100644 drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_optee.c
 create mode 100644 drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_optee.h

-- 
2.18.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ